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 optionStore = useOptionStore();
|
||||||
const ocrStore = useOcrStore();
|
const ocrStore = useOcrStore();
|
||||||
|
|
||||||
const filtdRequire = ref<{ [key: string]: (keyof CustomerBranchCreate)[] }>({
|
const tabFieldRequired = ref<{ [key: string]: (keyof CustomerBranchCreate)[] }>(
|
||||||
main: ['citizenId', 'legalPersonNo', 'registerName'],
|
{
|
||||||
address: ['address', 'addressEN', 'provinceId', 'districtId'],
|
main: ['citizenId', 'legalPersonNo', 'registerName'],
|
||||||
business: [],
|
address: ['address', 'addressEN', 'provinceId', 'districtId'],
|
||||||
contact: ['contactName', 'telephoneNo'],
|
business: [],
|
||||||
});
|
contact: ['contactName', 'telephoneNo'],
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
const { state: customerFormState, currentFormData: customerFormData } =
|
const { state: customerFormState, currentFormData: customerFormData } =
|
||||||
storeToRefs(customerFormStore);
|
storeToRefs(customerFormStore);
|
||||||
|
|
@ -1951,7 +1953,7 @@ const emptyCreateDialog = ref(false);
|
||||||
if (!customerFormState.editCustomerId) return;
|
if (!customerFormState.editCustomerId) return;
|
||||||
|
|
||||||
if (customerFormData.customerType === 'CORP') {
|
if (customerFormData.customerType === 'CORP') {
|
||||||
filtdRequire.main = [
|
tabFieldRequired.main = [
|
||||||
'legalPersonNo',
|
'legalPersonNo',
|
||||||
'registerName',
|
'registerName',
|
||||||
'address',
|
'address',
|
||||||
|
|
@ -1959,12 +1961,12 @@ const emptyCreateDialog = ref(false);
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
if (customerFormData.customerType === 'PERS') {
|
if (customerFormData.customerType === 'PERS') {
|
||||||
filtdRequire.main = ['citizenId'];
|
tabFieldRequired.main = ['citizenId'];
|
||||||
}
|
}
|
||||||
|
|
||||||
let tapIsUndefined = validateTabField(
|
let tapIsUndefined = validateTabField(
|
||||||
customerFormData.customerBranch?.[idx],
|
customerFormData.customerBranch?.[idx],
|
||||||
filtdRequire,
|
tabFieldRequired,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (tapIsUndefined.length > 0) {
|
if (tapIsUndefined.length > 0) {
|
||||||
|
|
@ -3122,15 +3124,18 @@ const emptyCreateDialog = ref(false);
|
||||||
if (!customerFormState.editCustomerId) return;
|
if (!customerFormState.editCustomerId) return;
|
||||||
|
|
||||||
if (customerFormData.customerType === 'CORP') {
|
if (customerFormData.customerType === 'CORP') {
|
||||||
filtdRequire.main = ['legalPersonNo', 'registerName'];
|
tabFieldRequired.main = [
|
||||||
|
'legalPersonNo',
|
||||||
|
'registerName',
|
||||||
|
];
|
||||||
}
|
}
|
||||||
if (customerFormData.customerType === 'PERS') {
|
if (customerFormData.customerType === 'PERS') {
|
||||||
filtdRequire.main = ['citizenId'];
|
tabFieldRequired.main = ['citizenId'];
|
||||||
}
|
}
|
||||||
|
|
||||||
let tapIsUndefined = validateTabField(
|
let tapIsUndefined = validateTabField(
|
||||||
customerFormData.customerBranch?.[idx],
|
customerFormData.customerBranch?.[idx],
|
||||||
filtdRequire,
|
tabFieldRequired,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (tapIsUndefined.length > 0) {
|
if (tapIsUndefined.length > 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue