fix: quotation customer
This commit is contained in:
parent
9845b95de2
commit
af243af3bf
2 changed files with 14 additions and 17 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue