This commit is contained in:
parent
d06c26c3c8
commit
5c867a496d
2 changed files with 112 additions and 92 deletions
|
|
@ -661,12 +661,19 @@ onMounted(async () => {
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- วิธีการรับชำระ -->
|
<!-- วิธีการรับชำระ -->
|
||||||
|
<template v-if="payment.paymentStatus === 'PaymentSuccess'">
|
||||||
<section
|
<section
|
||||||
class="q-px-md q-py-xs text-weight-medium row items-center"
|
class="q-px-md q-py-xs text-weight-medium row items-center"
|
||||||
style="background-color: hsla(var(--info-bg) / 0.1)"
|
style="background-color: hsla(var(--info-bg) / 0.1)"
|
||||||
>
|
>
|
||||||
{{ $t('quotation.receiptDialog.paymentMethod') }}
|
{{ $t('quotation.receiptDialog.paymentMethod') }}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<q-form
|
||||||
|
class="column full-height"
|
||||||
|
@submit.prevent
|
||||||
|
@submit="triggerSubmit(payment.id)"
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
class="surface-2 q-px-md q-py-sm row q-col-gutter-sm items-center"
|
class="surface-2 q-px-md q-py-sm row q-col-gutter-sm items-center"
|
||||||
>
|
>
|
||||||
|
|
@ -679,6 +686,9 @@ onMounted(async () => {
|
||||||
"
|
"
|
||||||
v-model="formPaymentMethod[i].channel"
|
v-model="formPaymentMethod[i].channel"
|
||||||
class="col-md-2 col-6"
|
class="col-md-2 col-6"
|
||||||
|
:rules="[
|
||||||
|
(val: string) => !!val || $t('form.error.required'),
|
||||||
|
]"
|
||||||
:option="[
|
:option="[
|
||||||
{
|
{
|
||||||
label: $t('creditNote.label.Cash'),
|
label: $t('creditNote.label.Cash'),
|
||||||
|
|
@ -710,6 +720,10 @@ onMounted(async () => {
|
||||||
(!formPaymentMethod[i].isEdit && !!payment.channel)
|
(!formPaymentMethod[i].isEdit && !!payment.channel)
|
||||||
"
|
"
|
||||||
:label="$t('quotation.refNo')"
|
:label="$t('quotation.refNo')"
|
||||||
|
:rules="[
|
||||||
|
(val: string) => !!val || $t('form.error.required'),
|
||||||
|
]"
|
||||||
|
hide-bottom-space
|
||||||
/>
|
/>
|
||||||
<SelectInput
|
<SelectInput
|
||||||
v-if="formPaymentMethod[i].channel === 'BankTransfer'"
|
v-if="formPaymentMethod[i].channel === 'BankTransfer'"
|
||||||
|
|
@ -723,6 +737,9 @@ onMounted(async () => {
|
||||||
class="col"
|
class="col"
|
||||||
:option="accountOpt"
|
:option="accountOpt"
|
||||||
:label="$t('quotation.bankAccount')"
|
:label="$t('quotation.bankAccount')"
|
||||||
|
:rules="[
|
||||||
|
(val: string) => !!val || $t('form.error.required'),
|
||||||
|
]"
|
||||||
/>
|
/>
|
||||||
<div class="q-ml-auto">
|
<div class="q-ml-auto">
|
||||||
<UndoButton
|
<UndoButton
|
||||||
|
|
@ -740,7 +757,7 @@ onMounted(async () => {
|
||||||
<SaveButton
|
<SaveButton
|
||||||
v-if="!payment.channel || formPaymentMethod[i].isEdit"
|
v-if="!payment.channel || formPaymentMethod[i].isEdit"
|
||||||
icon-only
|
icon-only
|
||||||
@click="triggerSubmit(payment.id)"
|
type="submit"
|
||||||
/>
|
/>
|
||||||
<EditButton
|
<EditButton
|
||||||
v-if="
|
v-if="
|
||||||
|
|
@ -751,6 +768,8 @@ onMounted(async () => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</q-form>
|
||||||
|
</template>
|
||||||
|
|
||||||
<!-- อัปโหลดใบเสร็จ -->
|
<!-- อัปโหลดใบเสร็จ -->
|
||||||
<section
|
<section
|
||||||
|
|
|
||||||
|
|
@ -378,7 +378,7 @@ async function assignFormData(id: string) {
|
||||||
selectedProductGroup.value =
|
selectedProductGroup.value =
|
||||||
data.productServiceList[0]?.product.productGroup?.id || '';
|
data.productServiceList[0]?.product.productGroup?.id || '';
|
||||||
|
|
||||||
((previousValue = {
|
(previousValue = {
|
||||||
id: data.id || undefined,
|
id: data.id || undefined,
|
||||||
debitNoteQuotationId: data.debitNoteQuotationId || undefined,
|
debitNoteQuotationId: data.debitNoteQuotationId || undefined,
|
||||||
productServiceList: structuredClone(
|
productServiceList: structuredClone(
|
||||||
|
|
@ -404,7 +404,7 @@ async function assignFormData(id: string) {
|
||||||
quotationId: data.debitNoteQuotationId,
|
quotationId: data.debitNoteQuotationId,
|
||||||
remark: data.remark || undefined,
|
remark: data.remark || undefined,
|
||||||
}),
|
}),
|
||||||
(currentFormData.value = structuredClone(previousValue)));
|
(currentFormData.value = structuredClone(previousValue));
|
||||||
|
|
||||||
assignProductServiceList();
|
assignProductServiceList();
|
||||||
assignSelectedWorker();
|
assignSelectedWorker();
|
||||||
|
|
@ -1139,6 +1139,7 @@ async function submitAccepted() {
|
||||||
<PaymentForm
|
<PaymentForm
|
||||||
v-if="view === QuotationStatus.PaymentPending"
|
v-if="view === QuotationStatus.PaymentPending"
|
||||||
is-debit-note
|
is-debit-note
|
||||||
|
:branch-id="quotationData?.registeredBranchId"
|
||||||
:readonly="isRoleInclude(['sale', 'head_of_sale'])"
|
:readonly="isRoleInclude(['sale', 'head_of_sale'])"
|
||||||
:data="debitNoteData"
|
:data="debitNoteData"
|
||||||
@fetch-status="
|
@fetch-status="
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue