客户表单优化

This commit is contained in:
‘huanghaiixia’
2025-12-01 13:38:41 +08:00
parent a568c3040e
commit b1cd0a5168

View File

@ -50,14 +50,14 @@
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="客户简称" name="cuSName">
<a-input v-model:value="formState.cuSName" :disabled="isDisable" placeholder="请输入客户简称" />
<a-form-item label="客户简称" name="cuSname">
<a-input v-model:value="formState.cuSname" :disabled="isDisable" placeholder="请输入客户简称" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="国内/国际" name="di">
<a-select v-model:value="formState.di" :disabled="isDisable" placeholder="请选择国内/国际" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.diList" :key="item.code" :value="item.code">
<a-form-item label="国内/国际" name="dI">
<a-select v-model:value="formState.dI" :disabled="isDisable" placeholder="请选择国内/国际" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.dIList" :key="item.code" :value="item.code">
{{ item.name }}
</a-select-option>
</a-select>
@ -407,8 +407,9 @@
const rules: Record<string, Rule[]> = {
cuSname: [{ required: true, message: "该项为必填项", trigger: 'change' }],
cuMcode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
di: [{ required: true, message: "该项为必填项", trigger: 'change' }],
dI: [{ required: true, message: "该项为必填项", trigger: 'change' }],
cuName: [{ required: true, message: "该项为必填项", trigger: 'change'}],
natureCode: [{ required: true, message: "该项为必填项", trigger: 'change'}],
classCode: [{ required: true, message: "该项为必填项", trigger: 'change'}],
@ -462,7 +463,7 @@
const dataContact= reactive([]);
let optionSelect= reactive({
natureCodeList: [],
diList: [],
dIList: [],
validList: [],
approCodeList: [],
classCodeList: [],
@ -521,7 +522,7 @@
}
async function getOption() {
optionSelect.natureCodeList = await getDictionary('LNG_ENT_PR')
optionSelect.diList = await getDictionary('LNG_NATURE')
optionSelect.dIList = await getDictionary('LNG_NATURE')
optionSelect.classCodeList = await getDictionary('LNG_CLASS')
optionSelect.typeCodeList = await getDictionary('LNG_CU_TYP')
optionSelect.propCodeList = await getDictionary('LNG_CU_RPT')
@ -723,13 +724,13 @@
v.dateTo = dayjs(v.dateTo ).valueOf()
})
const data = await addLngCustomer(obj);
obj.id = data
// notification.success({
// message: 'Tip',
// description: pageType.value === 'add' ? t('新增成功!') : t('修改成功!')
// }); //提示消息
// formRef.value.resetFields();
return obj
return data
// setTimeout(() => {
// bus.emit(FORM_LIST_MODIFIED, { path: formPath });
// close();