fix: quotation customer

This commit is contained in:
puriphatt 2024-10-11 14:01:17 +07:00
parent 9845b95de2
commit af243af3bf
2 changed files with 14 additions and 17 deletions

View file

@ -63,7 +63,6 @@ async function init(val: string, type: 'branch' | 'customer') {
})
: await customerStore.fetchListCustomeBranch({
query: val,
registeredBranchId: branchId.value || undefined,
pageSize: 30,
});
if (res) {
@ -91,15 +90,15 @@ onMounted(async () => {
await init('', 'customer');
});
watch(
() => branchId.value,
async (v) => {
if (v && customerBranchId.value && props.onCreate) {
console.log('form');
customerBranchId.value = '';
}
},
);
// watch(
// () => branchId.value,
// async (v) => {
// if (v && customerBranchId.value && props.onCreate) {
// console.log('form');
// customerBranchId.value = '';
// }
// },
// );
</script>
<template>
<div class="row">
@ -149,7 +148,6 @@ watch(
<SelectInput
:readonly
incremental
:disable="!branchId"
v-model="customerBranchId"
class="col-md col-12"
id="quotation-customer"

View file

@ -544,11 +544,11 @@ watch(
url.searchParams.set('customerBranchId', v);
history.pushState({}, '', url.toString());
if (!v) return;
const retEmp = await customerStore.fetchBranchEmployee(v);
if (retEmp) {
workerList.value = workerList.value = retEmp.data.result;
}
// if (!v) return;
// const retEmp = await customerStore.fetchBranchEmployee(v);
// if (retEmp) {
// workerList.value = retEmp.data.result;
// }
},
);
@ -559,7 +559,6 @@ watch(
const url = new URL(window.location.href);
url.searchParams.set('branchId', v);
history.pushState({}, '', url.toString());
quotationFormData.value.customerBranchId = '';
},
);
</script>