fix: variable name
This commit is contained in:
parent
0ab67596c3
commit
66a8d0a8b9
1 changed files with 17 additions and 12 deletions
|
|
@ -84,12 +84,14 @@ const employeeFormStore = useEmployeeForm();
|
|||
const optionStore = useOptionStore();
|
||||
const ocrStore = useOcrStore();
|
||||
|
||||
const filtdRequire = ref<{ [key: string]: (keyof CustomerBranchCreate)[] }>({
|
||||
main: ['citizenId', 'legalPersonNo', 'registerName'],
|
||||
address: ['address', 'addressEN', 'provinceId', 'districtId'],
|
||||
business: [],
|
||||
contact: ['contactName', 'telephoneNo'],
|
||||
});
|
||||
const tabFieldRequired = ref<{ [key: string]: (keyof CustomerBranchCreate)[] }>(
|
||||
{
|
||||
main: ['citizenId', 'legalPersonNo', 'registerName'],
|
||||
address: ['address', 'addressEN', 'provinceId', 'districtId'],
|
||||
business: [],
|
||||
contact: ['contactName', 'telephoneNo'],
|
||||
},
|
||||
);
|
||||
|
||||
const { state: customerFormState, currentFormData: customerFormData } =
|
||||
storeToRefs(customerFormStore);
|
||||
|
|
@ -1951,7 +1953,7 @@ const emptyCreateDialog = ref(false);
|
|||
if (!customerFormState.editCustomerId) return;
|
||||
|
||||
if (customerFormData.customerType === 'CORP') {
|
||||
filtdRequire.main = [
|
||||
tabFieldRequired.main = [
|
||||
'legalPersonNo',
|
||||
'registerName',
|
||||
'address',
|
||||
|
|
@ -1959,12 +1961,12 @@ const emptyCreateDialog = ref(false);
|
|||
];
|
||||
}
|
||||
if (customerFormData.customerType === 'PERS') {
|
||||
filtdRequire.main = ['citizenId'];
|
||||
tabFieldRequired.main = ['citizenId'];
|
||||
}
|
||||
|
||||
let tapIsUndefined = validateTabField(
|
||||
customerFormData.customerBranch?.[idx],
|
||||
filtdRequire,
|
||||
tabFieldRequired,
|
||||
);
|
||||
|
||||
if (tapIsUndefined.length > 0) {
|
||||
|
|
@ -3122,15 +3124,18 @@ const emptyCreateDialog = ref(false);
|
|||
if (!customerFormState.editCustomerId) return;
|
||||
|
||||
if (customerFormData.customerType === 'CORP') {
|
||||
filtdRequire.main = ['legalPersonNo', 'registerName'];
|
||||
tabFieldRequired.main = [
|
||||
'legalPersonNo',
|
||||
'registerName',
|
||||
];
|
||||
}
|
||||
if (customerFormData.customerType === 'PERS') {
|
||||
filtdRequire.main = ['citizenId'];
|
||||
tabFieldRequired.main = ['citizenId'];
|
||||
}
|
||||
|
||||
let tapIsUndefined = validateTabField(
|
||||
customerFormData.customerBranch?.[idx],
|
||||
filtdRequire,
|
||||
tabFieldRequired,
|
||||
);
|
||||
|
||||
if (tapIsUndefined.length > 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue