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