feat: add installment name input for custom installments

This commit is contained in:
Methapon Metanipat 2024-10-31 13:40:49 +07:00
parent 71e400a809
commit 4afcda0bf2

View file

@ -57,9 +57,10 @@ const payType = defineModel<
const paySplitCount = defineModel<number | null>('paySplitCount', {
default: 1,
});
const paySplit = defineModel<{ no: number; amount: number }[]>('paySplit', {
required: true,
});
const paySplit = defineModel<{ no: number; name?: string; amount: number }[]>(
'paySplit',
{ required: true },
);
const summaryPrice = defineModel<{
totalPrice: number;
totalDiscount: number;
@ -269,6 +270,15 @@ watch(
:class="{ 'q-mb-sm': i !== paySplit.length }"
>
{{ `${$t('quotation.periodNo')} ${i + 1}` }}
<q-input
:readonly="readonly"
:label="$t('general.name')"
v-if="payType === 'SplitCustom'"
v-model="period.name"
class="col q-mx-sm"
dense
outlined
/>
<q-input
:readonly="readonly || payType === 'Split'"
class="col q-mx-sm"