diff --git a/src/pages/05_quotation/QuotationForm.vue b/src/pages/05_quotation/QuotationForm.vue index 95733208..489ff35a 100644 --- a/src/pages/05_quotation/QuotationForm.vue +++ b/src/pages/05_quotation/QuotationForm.vue @@ -2,18 +2,16 @@ import { ref } from 'vue'; import { QSelect } from 'quasar'; -import AppBox from 'components/app/AppBox.vue'; -import MainDialog from 'components/05_quotation/MainDialog.vue'; import WorkerItem from 'components/05_quotation/WorkerItem.vue'; import QuotationFormInfo from './QuotationFormInfo.vue'; import { AddButton, SaveButton } from 'components/button'; +import ToggleButton from 'src/components/button/ToggleButton.vue'; +import ProductItem from 'src/components/05_quotation/ProductItem.vue'; defineProps<{ readonly?: boolean; }>(); -const dialogState = defineModel({ default: true }); - const selectedBranchIssuer = ref(''); const selectedCustomer = ref(''); const toggleWorker = ref(true); @@ -26,24 +24,32 @@ const telephone = ref(''); const documentReceivePoint = ref(''); const dueDate = ref(''); const payType = ref(''); -const paySplitCount = ref(''); +const paySplitCount = ref(1); const payBank = ref(''); diff --git a/src/pages/05_quotation/QuotationFormInfo.vue b/src/pages/05_quotation/QuotationFormInfo.vue index 465bf883..3f132aca 100644 --- a/src/pages/05_quotation/QuotationFormInfo.vue +++ b/src/pages/05_quotation/QuotationFormInfo.vue @@ -3,8 +3,11 @@ import { Icon } from '@iconify/vue'; import { QSelect } from 'quasar'; import { selectFilterOptionRefMod } from 'src/stores/utils'; import { onMounted, ref, watch } from 'vue'; +import { useI18n } from 'vue-i18n'; import AppBox from 'components/app/AppBox.vue'; +import DatePicker from 'src/components/shared/DatePicker.vue'; +import SelectInput from 'src/components/shared/SelectInput.vue'; import useOptionStore from 'src/stores/options'; @@ -19,6 +22,8 @@ defineProps<{ }; }>(); +const { t } = useI18n(); + const quotationNo = defineModel('quotationNo', { required: true }); const actor = defineModel('actor', { required: true }); const workName = defineModel('workName', { required: true }); @@ -29,11 +34,37 @@ const documentReceivePoint = defineModel('documentReceivePoint', { }); const dueDate = defineModel('dueDate', { required: true }); const payType = defineModel('payType', { required: true }); -const paySplitCount = defineModel('paySplitCount', { required: true }); +const paySplitCount = defineModel('paySplitCount', { + required: true, + default: 1, +}); const payBank = defineModel('payBank', { required: true }); const optionStore = useOptionStore(); +// fullAmountCash +// installmentsCash +// fullAmountBill +// installmentsBill +const payTypeOpion = ref([ + { + value: 'fullAmountCash', + label: t('quotation.type.fullAmountCash'), + }, + { + value: 'installmentsCash', + label: t('quotation.type.installmentsCash'), + }, + { + value: 'fullAmountBill', + label: t('quotation.type.fullAmountBill'), + }, + { + value: 'installmentsBill', + label: t('quotation.type.installmentsBill'), + }, +]); + const bankBookOptions = ref[]>([]); let bankBoookFilter: ( value: string, @@ -71,14 +102,15 @@ watch( - {{ $t('quotation.label.infoDocument') }} + {{ $t('general.information', { msg: $t('general.attachment') }) }}
-
@@ -142,51 +178,96 @@ watch( - {{ $t('quotation.label.infoPayment') }} + {{ $t('quotation.paymentCondition') }}
- -
- - - -
-
- -
+ + ({{ $t('quotation.payTotal', { msg: '10,000' }) }}) + +
+ +
+ +
+ +
+ + + - {{ $t('quotation.label.infoSummary') }} + {{ $t('quotation.summary') }}
@@ -290,10 +371,17 @@ watch( {{ data?.totalVatExcluded || 0 }} ฿
- {{ $t('general.totalVatIncluded') }} + {{ $t('general.totalVatIncluded') + ' 7%' }} {{ data?.totalVatIncluded || 0 }} ฿
+
+ {{ $t('general.totalAmount') }} + + + {{ data?.totalVatIncluded || 0 }} ฿ + +
diff --git a/src/router/routes.ts b/src/router/routes.ts index dc4dad24..1fdb55b2 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -87,6 +87,12 @@ const routes: RouteRecordRaw[] = [ ], }, + { + path: '/quotation/add-quotation', + name: 'QuotationAdd', + component: () => import('pages/05_quotation/QuotationForm.vue'), + }, + // Always leave this as last one, // but you can also remove it {