fix: quotation select

This commit is contained in:
puriphatt 2024-10-04 09:45:05 +07:00
parent bab448f47b
commit 05779c760c
5 changed files with 18 additions and 11 deletions

View file

@ -17,13 +17,15 @@ const agentPrice = defineModel<boolean>('agentPrice');
const branchOption = ref();
const customerOption = ref();
defineProps<{
const props = defineProps<{
outlined?: boolean;
readonly?: boolean;
separator?: boolean;
employee?: boolean;
title?: string;
inputOnly?: boolean;
onCreate?: boolean;
}>();
defineEmits<{
@ -83,14 +85,14 @@ onMounted(async () => {
await init('', 'customer');
});
// watch(
// () => branchId.value,
// async (v) => {
// if (v) {
// customerBranchId.value = '';
// }
// },
// );
watch(
() => branchId.value,
async (v) => {
if (v && props.onCreate) {
customerBranchId.value = '';
}
},
);
</script>
<template>
<div class="row">
@ -133,6 +135,7 @@ onMounted(async () => {
<SelectInput
:readonly
incremental
:disable="!branchId"
v-model="customerBranchId"
class="col-md col-12"
id="quotation-customer"