refactor: เพิ่ม optionsBranch
This commit is contained in:
parent
93af8ce47b
commit
9b76806d24
1 changed files with 22 additions and 1 deletions
|
|
@ -9,6 +9,7 @@ const process = defineModel<number>('process');
|
||||||
const name = defineModel<string>('name');
|
const name = defineModel<string>('name');
|
||||||
const code = defineModel<string>('code');
|
const code = defineModel<string>('code');
|
||||||
|
|
||||||
|
const registeredBranchId = defineModel<string>('registeredBranchId');
|
||||||
const codeOption = ref([]);
|
const codeOption = ref([]);
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
|
|
@ -17,6 +18,7 @@ defineProps<{
|
||||||
readonly?: boolean;
|
readonly?: boolean;
|
||||||
separator?: boolean;
|
separator?: boolean;
|
||||||
isType?: boolean;
|
isType?: boolean;
|
||||||
|
optionsBranch: { id: string; name: string }[];
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
|
@ -58,6 +60,25 @@ onMounted(async () => {
|
||||||
:rules="[(val: string) => !!val]"
|
:rules="[(val: string) => !!val]"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<q-select
|
||||||
|
id="input-source-nationality"
|
||||||
|
:dense="dense"
|
||||||
|
outlined
|
||||||
|
:readonly="readonly"
|
||||||
|
:hide-dropdown-icon="readonly"
|
||||||
|
hide-bottom-space
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
options-dense
|
||||||
|
:label="$t('registeredBranch')"
|
||||||
|
class="col-3"
|
||||||
|
option-label="name"
|
||||||
|
option-value="id"
|
||||||
|
v-model="registeredBranchId"
|
||||||
|
:options="optionsBranch"
|
||||||
|
:rules="[(val) => !!val]"
|
||||||
|
/>
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
for="input-name"
|
for="input-name"
|
||||||
:dense="dense"
|
:dense="dense"
|
||||||
|
|
@ -65,7 +86,7 @@ onMounted(async () => {
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
:borderless="readonly"
|
:borderless="readonly"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
class="col-9"
|
class="col-6"
|
||||||
:label="$t('productName')"
|
:label="$t('productName')"
|
||||||
v-model="name"
|
v-model="name"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue