fix: get contact number and name
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 4s
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 4s
This commit is contained in:
parent
49a9ab56c3
commit
c9c9ad927c
2 changed files with 19 additions and 0 deletions
|
|
@ -1,4 +1,6 @@
|
|||
<script setup lang="ts">
|
||||
import { CustomerBranch } from 'src/stores/customer';
|
||||
|
||||
import SelectCustomer from '../shared/select/SelectCustomer.vue';
|
||||
import SelectBranch from '../shared/select/SelectBranch.vue';
|
||||
|
||||
|
|
@ -7,6 +9,10 @@ const customerBranchId = defineModel<string>('customerBranchId');
|
|||
const agentPrice = defineModel<boolean>('agentPrice');
|
||||
const special = defineModel<boolean>('special');
|
||||
|
||||
const customerBranchOption = defineModel<CustomerBranch>(
|
||||
'customerBranchOption',
|
||||
);
|
||||
|
||||
defineProps<{
|
||||
outlined?: boolean;
|
||||
readonly?: boolean;
|
||||
|
|
@ -71,6 +77,7 @@ defineEmits<{
|
|||
id="about-select-customer-branch-id"
|
||||
for="about-select-customer-branch-id"
|
||||
v-model:value="customerBranchId"
|
||||
v-model:value-option="customerBranchOption"
|
||||
:label="$t('quotation.customer')"
|
||||
:creatable-disabled-text="`(${$t('form.error.selectField', {
|
||||
field: $t('quotation.branchVirtual'),
|
||||
|
|
|
|||
|
|
@ -80,6 +80,8 @@ import { RouterLink, useRoute } from 'vue-router';
|
|||
import { initLang, initTheme, Lang } from 'src/utils/ui';
|
||||
import { convertTemplate } from 'src/utils/string-template';
|
||||
|
||||
import { CustomerBranch } from 'src/stores/customer';
|
||||
|
||||
type Node = {
|
||||
[key: string]: any;
|
||||
opened?: boolean;
|
||||
|
|
@ -111,6 +113,8 @@ const $q = useQuasar();
|
|||
const openQuotation = ref<boolean>(false);
|
||||
const formMetadata = ref();
|
||||
|
||||
const customerBranchOption = ref<CustomerBranch>();
|
||||
|
||||
const rowsRequestList = ref<RequestData[]>([]);
|
||||
|
||||
const {
|
||||
|
|
@ -1074,6 +1078,13 @@ watch(
|
|||
},
|
||||
);
|
||||
|
||||
watch(customerBranchOption, () => {
|
||||
if (!customerBranchOption.value) return;
|
||||
|
||||
quotationFormData.value.contactName = customerBranchOption.value.contactName;
|
||||
quotationFormData.value.contactTel = customerBranchOption.value.contactTel;
|
||||
});
|
||||
|
||||
// async function searchEmployee(text: string) {
|
||||
// let query: string | undefined = text;
|
||||
// let pageSize = 50;
|
||||
|
|
@ -1519,6 +1530,7 @@ function covertToNode() {
|
|||
v-model:customer-branch-id="
|
||||
quotationFormData.customerBranchId
|
||||
"
|
||||
v-model:customer-branch-option="customerBranchOption"
|
||||
:readonly="readonly"
|
||||
/>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue