fix: quotation => handle change pay type

This commit is contained in:
puriphatt 2024-12-23 09:40:47 +07:00
parent d55a2448b5
commit 5c3c8f3d6a

View file

@ -732,6 +732,10 @@ function triggerProductServiceDialog() {
}
function handleChangePayType(type: PayCondition) {
if (type === 'Full') {
quotationFormData.value.paySplitCount = 0;
}
if (
type === 'Split' &&
tempPaySplitCount.value !== undefined &&
@ -750,7 +754,10 @@ function handleChangePayType(type: PayCondition) {
if (type === 'SplitCustom') {
quotationFormData.value.paySplitCount = 1;
quotationFormData.value.paySplit.push({ no: Number(1), amount: 0 });
if (tempPaySplit.value.length === 0) {
quotationFormData.value.paySplit = [];
quotationFormData.value.paySplit.push({ no: Number(1), amount: 0 });
}
}
}
@ -1269,7 +1276,6 @@ watch(
() => quotationFormState.value.inputSearchRequest,
],
() => {
console.log('asdasd');
fetchRequest();
},
);