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 || '';
|
const id = currentQuotationId.value || quotationFormData.value.id || '';
|
||||||
|
|
||||||
await quotationForm.assignFormData(id, quotationFormState.value.mode);
|
await quotationForm.assignFormData(id, quotationFormState.value.mode);
|
||||||
|
|
||||||
tempPaySplitCount.value = quotationFormData.value.paySplitCount || 0;
|
tempPaySplitCount.value = quotationFormData.value.paySplitCount || 0;
|
||||||
tempPaySplit.value = JSON.parse(
|
tempPaySplit.value = JSON.parse(
|
||||||
JSON.stringify(quotationFormData.value.paySplit),
|
JSON.stringify(quotationFormData.value.paySplit),
|
||||||
|
|
@ -609,6 +610,7 @@ async function convertDataToFormSubmit() {
|
||||||
status: quotationFormData.value.status,
|
status: quotationFormData.value.status,
|
||||||
discount: quotationFormData.value.discount,
|
discount: quotationFormData.value.discount,
|
||||||
remark: quotationFormData.value.remark || '',
|
remark: quotationFormData.value.remark || '',
|
||||||
|
agentPrice: agentPrice.value,
|
||||||
};
|
};
|
||||||
|
|
||||||
newWorkerList.value = [];
|
newWorkerList.value = [];
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ export const DEFAULT_DATA: QuotationPayload = {
|
||||||
_count: { worker: 0 },
|
_count: { worker: 0 },
|
||||||
status: 'CREATED',
|
status: 'CREATED',
|
||||||
remark: '#[quotation-labor]<br/><br/>#[quotation-payment]',
|
remark: '#[quotation-labor]<br/><br/>#[quotation-payment]',
|
||||||
|
agentPrice: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
const DEFAULT_DATA_INVOICE: InvoicePayload = {
|
const DEFAULT_DATA_INVOICE: InvoicePayload = {
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,7 @@ export const useQuotationStore = defineStore('quotation-store', () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function editQuotation(data: QuotationPayload & { id: string }) {
|
async function editQuotation(data: QuotationPayload & { id: string }) {
|
||||||
const { _count, ...payload } = data;
|
const { _count, agentPrice, ...payload } = data;
|
||||||
const res = await api.put(`/quotation/${data.id}`, {
|
const res = await api.put(`/quotation/${data.id}`, {
|
||||||
...payload,
|
...payload,
|
||||||
quotationStatus:
|
quotationStatus:
|
||||||
|
|
|
||||||
|
|
@ -371,6 +371,7 @@ export type QuotationPayload = {
|
||||||
status?: Status;
|
status?: Status;
|
||||||
remark?: string;
|
remark?: string;
|
||||||
quotationStatus?: QuotationStatus;
|
quotationStatus?: QuotationStatus;
|
||||||
|
agentPrice?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type EmployeeWorker = {
|
export type EmployeeWorker = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue