refactor: add agent price
This commit is contained in:
parent
0be0ce4c49
commit
5c3d2f1499
4 changed files with 5 additions and 1 deletions
|
|
@ -427,6 +427,7 @@ async function fetchQuotation() {
|
|||
const id = currentQuotationId.value || quotationFormData.value.id || '';
|
||||
|
||||
await quotationForm.assignFormData(id, quotationFormState.value.mode);
|
||||
|
||||
tempPaySplitCount.value = quotationFormData.value.paySplitCount || 0;
|
||||
tempPaySplit.value = JSON.parse(
|
||||
JSON.stringify(quotationFormData.value.paySplit),
|
||||
|
|
@ -609,6 +610,7 @@ async function convertDataToFormSubmit() {
|
|||
status: quotationFormData.value.status,
|
||||
discount: quotationFormData.value.discount,
|
||||
remark: quotationFormData.value.remark || '',
|
||||
agentPrice: agentPrice.value,
|
||||
};
|
||||
|
||||
newWorkerList.value = [];
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ export const DEFAULT_DATA: QuotationPayload = {
|
|||
_count: { worker: 0 },
|
||||
status: 'CREATED',
|
||||
remark: '#[quotation-labor]<br/><br/>#[quotation-payment]',
|
||||
agentPrice: false,
|
||||
};
|
||||
|
||||
const DEFAULT_DATA_INVOICE: InvoicePayload = {
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ export const useQuotationStore = defineStore('quotation-store', () => {
|
|||
}
|
||||
|
||||
async function editQuotation(data: QuotationPayload & { id: string }) {
|
||||
const { _count, ...payload } = data;
|
||||
const { _count, agentPrice, ...payload } = data;
|
||||
const res = await api.put(`/quotation/${data.id}`, {
|
||||
...payload,
|
||||
quotationStatus:
|
||||
|
|
|
|||
|
|
@ -371,6 +371,7 @@ export type QuotationPayload = {
|
|||
status?: Status;
|
||||
remark?: string;
|
||||
quotationStatus?: QuotationStatus;
|
||||
agentPrice?: boolean;
|
||||
};
|
||||
|
||||
export type EmployeeWorker = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue