fix: #242
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 6s

This commit is contained in:
Thanaphon Saengchan 2025-10-14 14:45:39 +07:00
parent d06c26c3c8
commit 5c867a496d
2 changed files with 112 additions and 92 deletions

View file

@ -661,12 +661,19 @@ onMounted(async () => {
</template>
<!-- การรบชำระ -->
<template v-if="payment.paymentStatus === 'PaymentSuccess'">
<section
class="q-px-md q-py-xs text-weight-medium row items-center"
style="background-color: hsla(var(--info-bg) / 0.1)"
>
{{ $t('quotation.receiptDialog.paymentMethod') }}
</section>
<q-form
class="column full-height"
@submit.prevent
@submit="triggerSubmit(payment.id)"
>
<div
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"
class="col-md-2 col-6"
:rules="[
(val: string) => !!val || $t('form.error.required'),
]"
:option="[
{
label: $t('creditNote.label.Cash'),
@ -710,6 +720,10 @@ onMounted(async () => {
(!formPaymentMethod[i].isEdit && !!payment.channel)
"
:label="$t('quotation.refNo')"
:rules="[
(val: string) => !!val || $t('form.error.required'),
]"
hide-bottom-space
/>
<SelectInput
v-if="formPaymentMethod[i].channel === 'BankTransfer'"
@ -723,6 +737,9 @@ onMounted(async () => {
class="col"
:option="accountOpt"
:label="$t('quotation.bankAccount')"
:rules="[
(val: string) => !!val || $t('form.error.required'),
]"
/>
<div class="q-ml-auto">
<UndoButton
@ -740,7 +757,7 @@ onMounted(async () => {
<SaveButton
v-if="!payment.channel || formPaymentMethod[i].isEdit"
icon-only
@click="triggerSubmit(payment.id)"
type="submit"
/>
<EditButton
v-if="
@ -751,6 +768,8 @@ onMounted(async () => {
/>
</div>
</div>
</q-form>
</template>
<!-- ปโหลดใบเสร -->
<section

View file

@ -378,7 +378,7 @@ async function assignFormData(id: string) {
selectedProductGroup.value =
data.productServiceList[0]?.product.productGroup?.id || '';
((previousValue = {
(previousValue = {
id: data.id || undefined,
debitNoteQuotationId: data.debitNoteQuotationId || undefined,
productServiceList: structuredClone(
@ -404,7 +404,7 @@ async function assignFormData(id: string) {
quotationId: data.debitNoteQuotationId,
remark: data.remark || undefined,
}),
(currentFormData.value = structuredClone(previousValue)));
(currentFormData.value = structuredClone(previousValue));
assignProductServiceList();
assignSelectedWorker();
@ -1139,6 +1139,7 @@ async function submitAccepted() {
<PaymentForm
v-if="view === QuotationStatus.PaymentPending"
is-debit-note
:branch-id="quotationData?.registeredBranchId"
:readonly="isRoleInclude(['sale', 'head_of_sale'])"
:data="debitNoteData"
@fetch-status="