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', {
|
const res = await api.post('/quotation', {
|
||||||
...payload,
|
...payload,
|
||||||
paySplit: data.paySplit.map((v) => ({
|
paySplit: data.paySplit.map((v) => ({
|
||||||
|
name: v.name,
|
||||||
amount: v.amount,
|
amount: v.amount,
|
||||||
})),
|
})),
|
||||||
productServiceList: data.productServiceList.map((v) => ({
|
productServiceList: data.productServiceList.map((v) => ({
|
||||||
|
|
@ -108,6 +109,7 @@ export const useQuotationStore = defineStore('quotation-store', () => {
|
||||||
const res = await api.put(`/quotation/${data.id}`, {
|
const res = await api.put(`/quotation/${data.id}`, {
|
||||||
...payload,
|
...payload,
|
||||||
paySplit: data.paySplit.map((v) => ({
|
paySplit: data.paySplit.map((v) => ({
|
||||||
|
name: v.name,
|
||||||
amount: v.amount,
|
amount: v.amount,
|
||||||
})),
|
})),
|
||||||
productServiceList: payload.productServiceList.map((v) => ({
|
productServiceList: payload.productServiceList.map((v) => ({
|
||||||
|
|
@ -119,6 +121,7 @@ export const useQuotationStore = defineStore('quotation-store', () => {
|
||||||
workId: v.work?.id,
|
workId: v.work?.id,
|
||||||
serviceId: v.service?.id,
|
serviceId: v.service?.id,
|
||||||
workerIndex: v.workerIndex,
|
workerIndex: v.workerIndex,
|
||||||
|
installmentNo: v.installmentNo,
|
||||||
})),
|
})),
|
||||||
id: undefined,
|
id: undefined,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue