fix(04): branch id select label
This commit is contained in:
parent
1661ce4b4a
commit
fba8992419
3 changed files with 16 additions and 21 deletions
|
|
@ -1,4 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { QSelect } from 'quasar';
|
||||
import { getRole } from 'src/services/keycloak';
|
||||
import { selectFilterOptionRefMod } from 'src/stores/utils';
|
||||
import { ref, onMounted } from 'vue';
|
||||
|
|
@ -15,7 +16,7 @@ const registeredBranchId = defineModel<string>('registeredBranchId');
|
|||
const codeOption = ref<{ id: string; name: string }[]>([]);
|
||||
const optionsBranch = defineModel<{ id: string; name: string }[]>(
|
||||
'optionsBranch',
|
||||
{ required: true },
|
||||
{ default: [] },
|
||||
);
|
||||
|
||||
defineProps<{
|
||||
|
|
@ -87,7 +88,6 @@ const branchFilter = selectFilterOptionRefMod(
|
|||
</q-item>
|
||||
</template>
|
||||
</q-select>
|
||||
|
||||
<q-select
|
||||
outlined
|
||||
clearable
|
||||
|
|
|
|||
|
|
@ -1,15 +1,12 @@
|
|||
<script setup lang="ts">
|
||||
import { QSelect } from 'quasar';
|
||||
import { getRole } from 'src/services/keycloak';
|
||||
import useOptionStore from 'src/stores/options';
|
||||
import { selectFilterOptionRefMod } from 'src/stores/utils';
|
||||
import { ref } from 'vue';
|
||||
|
||||
const optionStore = useOptionStore();
|
||||
|
||||
const remark = defineModel<string>('remark');
|
||||
const detail = defineModel<string>('detail');
|
||||
const name = defineModel<string>('name');
|
||||
const code = defineModel<string>('code');
|
||||
|
||||
const serviceCode = defineModel<string>('serviceCode');
|
||||
const serviceName = defineModel<string>('serviceNameTh');
|
||||
|
|
@ -19,7 +16,7 @@ const registeredBranchId = defineModel<string | null>('registeredBranchId');
|
|||
|
||||
const optionsBranch = defineModel<{ id: string; name: string }[]>(
|
||||
'optionsBranch',
|
||||
{ required: true },
|
||||
{ default: [] },
|
||||
);
|
||||
|
||||
defineProps<{
|
||||
|
|
|
|||
|
|
@ -1397,9 +1397,9 @@ watch(
|
|||
padding="xs"
|
||||
icon="mdi-folder-multiple-plus"
|
||||
@click="
|
||||
() => {
|
||||
async () => {
|
||||
clearFormProduct();
|
||||
fetchListOfOptionBranch();
|
||||
await fetchListOfOptionBranch();
|
||||
dialogProduct = true;
|
||||
}
|
||||
"
|
||||
|
|
@ -1413,10 +1413,10 @@ watch(
|
|||
padding="xs"
|
||||
icon="mdi-folder-multiple-plus"
|
||||
@click="
|
||||
() => {
|
||||
async () => {
|
||||
clearFormGroup();
|
||||
clearFormService();
|
||||
fetchListOfOptionBranch();
|
||||
await fetchListOfOptionBranch();
|
||||
currentServiceTab = 'serviceInformation';
|
||||
dialogService = true;
|
||||
}
|
||||
|
|
@ -2884,6 +2884,7 @@ watch(
|
|||
flat
|
||||
@click.stop="
|
||||
async () => {
|
||||
await fetchListOfOptionBranch();
|
||||
if (props.row.type === 'product') {
|
||||
currentIdProduct = props.row.id;
|
||||
assignFormDataProduct(props.row);
|
||||
|
|
@ -2895,7 +2896,6 @@ watch(
|
|||
assignFormDataProductService(props.row.id);
|
||||
dialogServiceEdit = true;
|
||||
}
|
||||
await fetchListOfOptionBranch();
|
||||
}
|
||||
"
|
||||
/>
|
||||
|
|
@ -2915,6 +2915,7 @@ watch(
|
|||
:id="`view-detail-btn-${props.row.name}-view`"
|
||||
@click.stop="
|
||||
async () => {
|
||||
await fetchListOfOptionBranch();
|
||||
if (props.row.type === 'product') {
|
||||
currentIdProduct = props.row.id;
|
||||
assignFormDataProduct(props.row);
|
||||
|
|
@ -2928,7 +2929,6 @@ watch(
|
|||
);
|
||||
dialogServiceEdit = true;
|
||||
}
|
||||
await fetchListOfOptionBranch();
|
||||
}
|
||||
"
|
||||
v-close-popup
|
||||
|
|
@ -2957,6 +2957,7 @@ watch(
|
|||
style="white-space: nowrap"
|
||||
@click="
|
||||
async () => {
|
||||
await fetchListOfOptionBranch();
|
||||
if (props.row.type === 'product') {
|
||||
currentIdProduct = props.row.id;
|
||||
infoProductEdit = true;
|
||||
|
|
@ -2971,8 +2972,6 @@ watch(
|
|||
);
|
||||
dialogServiceEdit = true;
|
||||
}
|
||||
|
||||
await fetchListOfOptionBranch();
|
||||
}
|
||||
"
|
||||
>
|
||||
|
|
@ -3073,6 +3072,7 @@ watch(
|
|||
"
|
||||
@menuViewDetail="
|
||||
async () => {
|
||||
await fetchListOfOptionBranch();
|
||||
if (row.type === 'product') {
|
||||
currentIdProduct = row.id;
|
||||
assignFormDataProduct(row);
|
||||
|
|
@ -3084,11 +3084,11 @@ watch(
|
|||
assignFormDataProductService(row.id);
|
||||
dialogServiceEdit = true;
|
||||
}
|
||||
await fetchListOfOptionBranch();
|
||||
}
|
||||
"
|
||||
@menuEdit="
|
||||
async () => {
|
||||
await fetchListOfOptionBranch();
|
||||
if (row.type === 'product') {
|
||||
currentIdProduct = row.id;
|
||||
infoProductEdit = true;
|
||||
|
|
@ -3101,8 +3101,6 @@ watch(
|
|||
assignFormDataProductService(row.id);
|
||||
dialogServiceEdit = true;
|
||||
}
|
||||
|
||||
await fetchListOfOptionBranch();
|
||||
}
|
||||
"
|
||||
/>
|
||||
|
|
@ -3202,7 +3200,6 @@ watch(
|
|||
<BasicInformation
|
||||
dense
|
||||
:isType="productMode === 'type'"
|
||||
v-model:options-branch="branchOption"
|
||||
v-model:remark="formDataGroup.remark"
|
||||
v-model:name="formDataGroup.name"
|
||||
v-model:detail="formDataGroup.detail"
|
||||
|
|
@ -3262,7 +3259,6 @@ watch(
|
|||
dense
|
||||
:isType="productMode === 'type'"
|
||||
:readonly="!isEdit"
|
||||
v-model:options-branch="branchOption"
|
||||
v-model:remark="formDataGroup.remark"
|
||||
v-model:name="formDataGroup.name"
|
||||
v-model:code="formDataGroup.code"
|
||||
|
|
@ -3817,8 +3813,10 @@ watch(
|
|||
v-ripple
|
||||
v-close-popup
|
||||
@click.stop="
|
||||
() => {
|
||||
async () => {
|
||||
if (!currentNode) return;
|
||||
|
||||
await fetchListOfOptionBranch();
|
||||
if (currentNode.type === 'type') {
|
||||
editByTree = 'type';
|
||||
currentStatusProduct = currentNode.status === 'INACTIVE';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue