emoticon_xcx_back/src/views/business/LogisticsManage/Deliverys/components/DetailDialog.vue
2023-06-16 20:42:14 +08:00

105 lines
2.4 KiB
Vue

<!--
* @Descripttion: (配送模板/tb_delivery 详情弹窗)
* @version: (1.0)
* @Author: (黎文豪)
* @Date: (2023-06-16)
* @LastEditors: (黎文豪)
* @LastEditTime: (2023-06-16)
-->
<template>
<el-dialog v-model="props.modelValue" title="配送模板信息详情" width="900px" @closed="closeDialog" @open="openDialog">
<el-form ref="formRef" :model="formData" :disabled="true">
<el-row :gutter="20">
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="店铺guid" >
<el-input v-model="formData.shopGuid" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="模板名称" >
<el-input v-model="formData.deliveryName" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="计费方式" >
<el-radio-group v-model="formData.deliveryBillingMethod">
<el-radio v-for="item in charging_methods " :key="item.dictValue" :label="parseInt(item.dictValue)">{{item.dictLabel}}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="排序" >
<el-input-number v-model.number="formData.deliverySort" controls-position="right" :precision="2" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-dialog>
</template>
<script setup>
import { ElMessage } from 'element-plus'
import { reactive, ref, watch } from "vue";
// 打开弹窗时回调
const openDialog = async () => {
await getcharging_methods()
}
const formData = ref({
...props.data,
});
watch(props, async (v) => {
formData.value = v.data;
});
// -业务参数
// 计费方式字典选项列表
const charging_methods = ref([]);
// -业务方法
// 字典获取
async function getcharging_methods() {
await proxy.getDicts('charging_methods').then((res) => {
charging_methods.value = res.data
})
}
// 基础参数
const formRef = ref();
const labelWidth = 100;
const { proxy } = getCurrentInstance()
const props = defineProps({
modelValue: Boolean,
data: Object,
done: Function,
});
const emits = defineEmits(["update:modelValue"]);
// -基础方法
const closeDialog = () => {
emits("update:modelValue", false);
};
</script>