refactor: get contact number and name
This commit is contained in:
parent
11047e569d
commit
d09484a52a
2 changed files with 15 additions and 0 deletions
|
|
@ -4,6 +4,9 @@ import { CustomerBranch } from 'src/stores/customer';
|
|||
import SelectCustomer from '../shared/select/SelectCustomer.vue';
|
||||
import SelectBranch from '../shared/select/SelectBranch.vue';
|
||||
|
||||
import { CustomerBranch } from 'src/stores/customer';
|
||||
import { ref } from 'vue';
|
||||
|
||||
const branchId = defineModel<string>('branchId');
|
||||
const customerBranchId = defineModel<string>('customerBranchId');
|
||||
const agentPrice = defineModel<boolean>('agentPrice');
|
||||
|
|
@ -73,6 +76,7 @@ defineEmits<{
|
|||
required
|
||||
:readonly
|
||||
/>
|
||||
|
||||
<SelectCustomer
|
||||
id="about-select-customer-branch-id"
|
||||
for="about-select-customer-branch-id"
|
||||
|
|
|
|||
|
|
@ -96,6 +96,8 @@ type ProductGroupId = string;
|
|||
|
||||
const API_BASE_URL = import.meta.env.VITE_API_BASE_URL;
|
||||
|
||||
const customerBranchOption = ref<CustomerBranch>();
|
||||
|
||||
const employeeStore = useEmployeeStore();
|
||||
const route = useRoute();
|
||||
const useReceiptStore = useReceipt();
|
||||
|
|
@ -1110,6 +1112,15 @@ watch(
|
|||
|
||||
const productServiceNodes = ref<ProductTree>([]);
|
||||
|
||||
watch(customerBranchOption, () => {
|
||||
if (!customerBranchOption.value) return;
|
||||
|
||||
quotationFormData.value.contactName =
|
||||
customerBranchOption.value.contactName || '';
|
||||
quotationFormData.value.contactTel =
|
||||
customerBranchOption.value.contactTel || '';
|
||||
});
|
||||
|
||||
watch(
|
||||
() => productServiceList.value,
|
||||
() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue