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