refactor: add quotation payload
This commit is contained in:
parent
317aadb0f7
commit
e558a19350
1 changed files with 3 additions and 0 deletions
|
|
@ -73,6 +73,7 @@ export const useQuotationStore = defineStore('quotation-store', () => {
|
|||
const res = await api.post('/quotation', {
|
||||
...payload,
|
||||
paySplit: data.paySplit.map((v) => ({
|
||||
name: v.name,
|
||||
amount: v.amount,
|
||||
})),
|
||||
productServiceList: data.productServiceList.map((v) => ({
|
||||
|
|
@ -108,6 +109,7 @@ export const useQuotationStore = defineStore('quotation-store', () => {
|
|||
const res = await api.put(`/quotation/${data.id}`, {
|
||||
...payload,
|
||||
paySplit: data.paySplit.map((v) => ({
|
||||
name: v.name,
|
||||
amount: v.amount,
|
||||
})),
|
||||
productServiceList: payload.productServiceList.map((v) => ({
|
||||
|
|
@ -119,6 +121,7 @@ export const useQuotationStore = defineStore('quotation-store', () => {
|
|||
workId: v.work?.id,
|
||||
serviceId: v.service?.id,
|
||||
workerIndex: v.workerIndex,
|
||||
installmentNo: v.installmentNo,
|
||||
})),
|
||||
id: undefined,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue