diff --git a/src/components/05_quotation/ProductItem.vue b/src/components/05_quotation/ProductItem.vue index 35168c2c..10bb420e 100644 --- a/src/components/05_quotation/ProductItem.vue +++ b/src/components/05_quotation/ProductItem.vue @@ -16,6 +16,7 @@ import { useConfigStore } from 'stores/config'; import { Product, Service, Work } from 'src/stores/product-service/types'; defineProps<{ + readonly?: boolean; agentPrice: boolean; employeeRows?: { foreignRefNo: string; @@ -365,7 +366,10 @@ watch( {{ formatNumberDecimal(calcPrice(props.row), 2) }} -
+
-
+
(undefined); const date = ref(); const preSelectedWorker = ref([]); +const readonly = computed(() => { + return !( + quotationFormState.value.mode === 'create' || + quotationFormState.value.mode === 'edit' + ); +}); + const selectedWorker = ref< (Employee & { attachment?: { @@ -367,7 +374,6 @@ async function assignWorkerToSelectedWorker() { ); if (retEmp) { workerList.value = retEmp.data.result; - console.log(retEmp.data.result); quotationFormData.value.worker.forEach((value) => { const tempValue: Employee | undefined = retEmp.data.result.find( (v) => v.id === value.id, @@ -562,6 +568,7 @@ watch( input-only v-model:branch-id="branchId" v-model:customer-branch-id="quotationFormData.customerBranchId" + :readonly="readonly" @add-customer="triggerSelectTypeCustomerd()" /> @@ -601,15 +608,18 @@ watch( > {{ $t('quotation.employeeList') }} - - {{ - toggleWorker - ? $t('general.specify') - : $t('general.noSpecify') - }} +