fix: handle show group name
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 5s
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 5s
This commit is contained in:
parent
42e545dd66
commit
b21949712b
1 changed files with 9 additions and 3 deletions
|
|
@ -51,6 +51,8 @@ const emit = defineEmits<{
|
||||||
const selectedProductGroup = defineModel<string>('selectedProductGroup', {
|
const selectedProductGroup = defineModel<string>('selectedProductGroup', {
|
||||||
default: '',
|
default: '',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const selectedProductGroupOption = ref<ProductGroup | undefined>();
|
||||||
const model = defineModel<boolean>();
|
const model = defineModel<boolean>();
|
||||||
const inputSearch = defineModel<string>('inputSearch');
|
const inputSearch = defineModel<string>('inputSearch');
|
||||||
const productGroup = defineModel<ProductGroup[]>('productGroup', {
|
const productGroup = defineModel<ProductGroup[]>('productGroup', {
|
||||||
|
|
@ -569,14 +571,18 @@ watch(
|
||||||
{{
|
{{
|
||||||
productGroup.find(
|
productGroup.find(
|
||||||
(g) => g.id === selectedProductGroup,
|
(g) => g.id === selectedProductGroup,
|
||||||
)?.name || '-'
|
)?.name ||
|
||||||
|
selectedProductGroupOption?.name ||
|
||||||
|
'-'
|
||||||
}}
|
}}
|
||||||
</span>
|
</span>
|
||||||
<span class="text-caption app-text-muted">
|
<span class="text-caption app-text-muted">
|
||||||
{{
|
{{
|
||||||
productGroup.find(
|
productGroup.find(
|
||||||
(g) => g.id === selectedProductGroup,
|
(g) => g.id === selectedProductGroup,
|
||||||
)?.code || '-'
|
)?.code ||
|
||||||
|
selectedProductGroupOption?.code ||
|
||||||
|
'-'
|
||||||
}}
|
}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -862,13 +868,13 @@ watch(
|
||||||
<span class="q-pr-sm">
|
<span class="q-pr-sm">
|
||||||
{{ $t('productService.group.title') }}
|
{{ $t('productService.group.title') }}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<SelectProductGroup
|
<SelectProductGroup
|
||||||
class="col-md-4 col-12"
|
class="col-md-4 col-12"
|
||||||
:class="{ 'q-mb-sm': $q.screen.lt.md }"
|
:class="{ 'q-mb-sm': $q.screen.lt.md }"
|
||||||
id="product-group-select"
|
id="product-group-select"
|
||||||
clearable
|
clearable
|
||||||
v-model:value="selectedProductGroup"
|
v-model:value="selectedProductGroup"
|
||||||
|
v-model:value-option="selectedProductGroupOption"
|
||||||
:placeholder="
|
:placeholder="
|
||||||
!selectedProductGroup
|
!selectedProductGroup
|
||||||
? $t('general.select', {
|
? $t('general.select', {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue