fix: service => default installment 1

This commit is contained in:
puriphatt 2025-01-06 13:16:57 +07:00
parent 006eab0b2f
commit 8df3197fc1
2 changed files with 5 additions and 7 deletions

View file

@ -454,7 +454,7 @@ watch(
dense
type="number"
v-model="product.installmentNo"
min="0"
min="1"
/>
</span>
</span>

View file

@ -282,7 +282,7 @@ const formService = ref<ServiceCreate>({
name: '',
code: '',
productGroupId: '',
installments: 0,
installments: 1,
});
const hideStat = ref(false);
@ -935,8 +935,6 @@ async function assignFormService(id: string) {
if (workflowRet) currWorkflow.value = workflowRet;
}
console.log(res);
prevService.value = {
code: res.code,
name: res.name,
@ -1082,7 +1080,7 @@ function clearFormService() {
work: [],
status: undefined,
productGroupId: '',
installments: 0,
installments: 1,
};
tempWorkItems.value = [];
workItems.value = [];
@ -1252,7 +1250,7 @@ function submitAddWorkProduct() {
if (!productExists) {
workItems.value[currentWorkIndex.value].product.push({
...i,
installmentNo: !!formService.value.installments ? 1 : 0,
installmentNo: !!formService.value.installments ? 1 : 1,
nameEn: '',
});
workItems.value[currentWorkIndex.value].attributes.workflowStep.forEach(
@ -4085,7 +4083,7 @@ watch(
style="width: 54px"
dense
outlined
min="0"
min="1"
class="split-pay q-mx-sm"
input-class="text-caption text-right"
type="number"