diff --git a/src/pages/05_quotation/QuotationForm.vue b/src/pages/05_quotation/QuotationForm.vue index 21319162..5760808d 100644 --- a/src/pages/05_quotation/QuotationForm.vue +++ b/src/pages/05_quotation/QuotationForm.vue @@ -265,9 +265,9 @@ async function convertDataToFormSubmit() { quotationFormData.value.productServiceList = JSON.parse( JSON.stringify( productServiceList.value.map((v) => ({ - workerIndex: [0, 1], - discount: 1, - amount: 1, + workerIndex: v.workerIndex, + discount: v.discount, + amount: v.amount, product: v.product, work: v.work, service: v.service, diff --git a/src/pages/05_quotation/form.ts b/src/pages/05_quotation/form.ts index 33ef6b06..e98971c3 100644 --- a/src/pages/05_quotation/form.ts +++ b/src/pages/05_quotation/form.ts @@ -101,23 +101,8 @@ export const useQuotationForm = defineStore('form-quotation', () => { resetFormData = Object.assign(data, { productServiceList: data.productServiceList.map((v) => ({ ...v, - worker: v.worker.map((value, index) => ({ - // passportNo: obj.data.passportNo, wait api add - //documentExpireDate: obj.data.documentExpireDate, - id: value.id, - lastNameEN: value.lastNameEN, - lastName: value.lastName, - middleNameEN: value.middleNameEN, - middleName: value.middleName, - firstNameEN: value.firstNameEN, - firstName: value.firstName, - namePrefix: value.namePrefix, - nationality: value.nationality, - gender: value.gender, - dateOfBirth: value.dateOfBirth, - })), workerIndex: v.worker.map((a) => - data.worker.findIndex((b) => b.employeeId === a.id), + data.worker.findIndex((b) => b.employeeId === a.employeeId), ), })), dueDate: new Date(data.dueDate),