fix: quotation select
This commit is contained in:
parent
bab448f47b
commit
05779c760c
5 changed files with 18 additions and 11 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ const currentTab = defineModel<string>('currentTab');
|
|||
class="col full-height column full-width"
|
||||
:class="{
|
||||
dark: $q.dark.isActive,
|
||||
'surface-0': !employee,
|
||||
'surface-2': !employee,
|
||||
'surface-tab': employee || tabsList,
|
||||
}"
|
||||
:style="`background: ${bgColor} !important`"
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ function reset() {
|
|||
<!-- body -->
|
||||
<div
|
||||
class="col form-body full-width"
|
||||
:class="`${bgColor || 'surface-0'} ${$q.dark.isActive && 'dark'}`"
|
||||
:class="`${bgColor || 'surface-2'} ${$q.dark.isActive && 'dark'}`"
|
||||
>
|
||||
<slot></slot>
|
||||
<slot name="info"></slot>
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ const props = withDefaults(
|
|||
clearable?: boolean;
|
||||
incremental?: boolean;
|
||||
fillInput?: boolean;
|
||||
disable?: boolean;
|
||||
|
||||
rules?: ((value: string) => string | true)[];
|
||||
}>(),
|
||||
|
|
@ -34,6 +35,7 @@ const props = withDefaults(
|
|||
optionValue: 'value',
|
||||
hideSelected: true,
|
||||
fillInput: true,
|
||||
disable: false,
|
||||
},
|
||||
);
|
||||
|
||||
|
|
@ -65,6 +67,7 @@ watch(
|
|||
:placeholder="placeholder"
|
||||
outlined
|
||||
:clearable
|
||||
:disable
|
||||
use-input
|
||||
emit-value
|
||||
map-options
|
||||
|
|
|
|||
|
|
@ -860,6 +860,7 @@ watch(() => pageState.currentTab, fetchQuotationList);
|
|||
style="height: 100%; max-height: 100%; overflow-y: auto"
|
||||
>
|
||||
<FormAbout
|
||||
on-create
|
||||
v-model:branch-id="branchId"
|
||||
v-model:customer-branch-id="quotationFormData.customerBranchId"
|
||||
@add-customer="triggerSelectTypeCustomerd()"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue