fix: type error
This commit is contained in:
parent
61b7f19577
commit
d740a48c7f
5 changed files with 57 additions and 57 deletions
|
|
@ -2171,7 +2171,7 @@ const emptyCreateDialog = ref(false);
|
|||
} else {
|
||||
res = await customerStore.createBranch({
|
||||
...customerFormData.customerBranch[idx],
|
||||
customerId: customerFormState.editCustomerId,
|
||||
customerId: customerFormState.editCustomerId || '',
|
||||
id: undefined,
|
||||
});
|
||||
}
|
||||
|
|
@ -2230,6 +2230,7 @@ const emptyCreateDialog = ref(false);
|
|||
<EmployerFormBranch
|
||||
:index="idx"
|
||||
prefixId="form"
|
||||
v-if="customerFormData.customerBranch"
|
||||
v-model:customer="customerFormData"
|
||||
v-model:customer-branch="customerFormData.customerBranch[idx]"
|
||||
:onCreate="customerFormState.dialogType === 'create'"
|
||||
|
|
@ -2245,6 +2246,8 @@ const emptyCreateDialog = ref(false);
|
|||
@cancel="() => customerFormUndo(false)"
|
||||
@delete="
|
||||
async () => {
|
||||
if (!customerFormState.editCustomerId) return;
|
||||
|
||||
if (idx === 0) {
|
||||
deleteCustomerById(customerFormState.editCustomerId);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@ const registerName = defineModel<string>('registerName', { default: '' });
|
|||
const citizenId = defineModel<string>('citizenId', { default: '' });
|
||||
const legalPersonNo = defineModel<string>('legalPersonNo', { default: '' });
|
||||
|
||||
const businessType = defineModel<'string'>('businessType');
|
||||
const jobPosition = defineModel<'string'>('jobPosition');
|
||||
const businessType = defineModel<string>('businessType');
|
||||
const jobPosition = defineModel<string>('jobPosition');
|
||||
const telephoneNo = defineModel<string>('telephoneNo', { default: '' });
|
||||
|
||||
const branchOptions = defineModel<{ id: string; name: string }[]>(
|
||||
|
|
|
|||
|
|
@ -157,9 +157,7 @@ export const useCustomerForm = defineStore('form-customer', () => {
|
|||
wageRateText: v.wageRateText,
|
||||
payDate: v.payDate,
|
||||
jobDescription: v.jobDescription,
|
||||
jobPositionEN: v.jobPositionEN,
|
||||
jobPosition: v.jobPosition,
|
||||
businessTypeEN: v.businessTypeEN,
|
||||
businessType: v.businessType,
|
||||
employmentOffice: v.employmentOffice,
|
||||
employmentOfficeEN: v.employmentOfficeEN,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue