refactor: at edit handle _count
This commit is contained in:
parent
3c66ca2a46
commit
ef82393db1
1 changed files with 3 additions and 2 deletions
|
|
@ -81,8 +81,9 @@ export const useQuotationStore = defineStore('quotation-store', () => {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function editQuotation(payload: QuotationPayload & { id: string }) {
|
async function editQuotation(data: QuotationPayload & { id: string }) {
|
||||||
const res = await api.put(`/quotation/${payload.id}`, {
|
const { _count, ...payload } = data;
|
||||||
|
const res = await api.put(`/quotation/${data.id}`, {
|
||||||
...payload,
|
...payload,
|
||||||
productServiceList: payload.productServiceList.map((v) => ({
|
productServiceList: payload.productServiceList.map((v) => ({
|
||||||
vat: v.vat,
|
vat: v.vat,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue