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 dense
type="number" type="number"
v-model="product.installmentNo" v-model="product.installmentNo"
min="0" min="1"
/> />
</span> </span>
</span> </span>

View file

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