diff --git a/src/components/05_quotation/ProductItem.vue b/src/components/05_quotation/ProductItem.vue index 09cc18e9..3db6066a 100644 --- a/src/components/05_quotation/ProductItem.vue +++ b/src/components/05_quotation/ProductItem.vue @@ -60,7 +60,6 @@ const summaryPrice = defineModel<{ const currentBtnOpen = ref<{ title: string; opened: boolean[] }[]>([ { title: '', opened: [] }, ]); -const finalDiscount4Show = ref(finalDiscount.value.toString()); function calcPrice(c: (typeof rows.value)[number]) { return precisionRound( diff --git a/src/pages/05_quotation/QuotationForm.vue b/src/pages/05_quotation/QuotationForm.vue index 71c0370d..fc504de6 100644 --- a/src/pages/05_quotation/QuotationForm.vue +++ b/src/pages/05_quotation/QuotationForm.vue @@ -72,9 +72,9 @@ import { group } from 'node:console'; import { precisionRound } from 'src/utils/arithmetic'; import { useConfigStore } from 'src/stores/config'; -defineProps<{ - readonly?: boolean; -}>(); +// defineProps<{ +// readonly?: boolean; +// }>(); type Node = { [key: string]: any; @@ -558,7 +558,6 @@ onMounted(async () => { currentQuotationId.value, quotationFormState.value.mode, ); - await assignWorkerToSelectedWorker(); } await assignToProductServiceList(); @@ -609,7 +608,10 @@ watch( {{ $t('quotation.processOn', { - msg: `${dateFormat(date, true)} ${dateFormat(date, true, true)}`, + msg: + quotationFormState.mode === 'create' + ? `${dateFormat(date, true)} ${dateFormat(date, true, true)}` + : `${dateFormat(quotationFull?.createdAt, true)} ${dateFormat(quotationFull?.createdAt, true, true)}`, }) }} @@ -822,8 +824,8 @@ watch( :class="{ 'full-height': $q.screen.gt.xs }" > ('urgent', { required: true, default: false, }); -const quotationNo = defineModel('quotationNo', { required: true }); const actor = defineModel('actor', { required: true }); const workName = defineModel('workName', { required: true }); const contactor = defineModel('contactor', { required: true }); @@ -71,7 +71,9 @@ const summaryPrice = defineModel<{ const optionStore = useOptionStore(); -const finalDiscount = defineModel('finalDiscount', { default: 0 }); +const finalDiscount = defineModel('finalDiscount', { default: 0 }); +const finalDiscount4Show = ref(finalDiscount.value.toString()); + const payTypeOpion = ref([ { value: 'Full', @@ -180,6 +182,7 @@ watch( class="q-ml-auto" size="xs" :label="$t('general.urgent')" + :disable="readonly" /> @@ -190,7 +193,7 @@ watch( :label="$t('general.itemNo', { msg: $t('quotation.title') })" :readonly :model-value="!quotationNo ? $t('general.generated') : quotationNo" - disable + :disable="!readonly" class="col-12" dense outlined @@ -200,7 +203,7 @@ watch( :label="$t('quotation.actor')" :readonly v-model="actor" - disable + :disable="!readonly" class="col-12" dense outlined @@ -503,13 +506,24 @@ watch(
{{ $t('general.discountAfterVat') }}