diff --git a/src/pages/05_quotation/QuotationForm.vue b/src/pages/05_quotation/QuotationForm.vue index 0a28b86f..0825ce10 100644 --- a/src/pages/05_quotation/QuotationForm.vue +++ b/src/pages/05_quotation/QuotationForm.vue @@ -1236,6 +1236,38 @@ function getInvoice() { } } +function handleWorkName() { + const validService = productService.value.find( + (item) => 'service' in item && item.service !== null, + ); + + if (!validService || validService?.service === null) return; + + const workName = validService?.service.name; + + if ( + !!quotationFormData.value.workName && + !(quotationFormData.value.workName === workName) + ) { + dialogCheckData({ + action: () => { + quotationFormData.value.workName = workName; + }, + checkData: () => { + return { + oldData: [ + { nameField: 'workName', value: quotationFormData.value.workName }, + ], + newData: [{ nameField: 'workName', value: workName }], + }; + }, + cancel: () => {}, + }); + } else { + quotationFormData.value.workName = workName; + } +} + watch( [ () => quotationFormState.value.statusFilterRequest, @@ -1266,6 +1298,7 @@ async function formDownload() {