fix: fix create bankEntity
gitea/salix-front/pipeline/pr-master This commit looks good
Details
gitea/salix-front/pipeline/pr-master This commit looks good
Details
This commit is contained in:
parent
ff272ab6c3
commit
2806c94fdb
|
@ -9,8 +9,6 @@ import VnRow from 'components/ui/VnRow.vue';
|
|||
import FormModelPopup from './FormModelPopup.vue';
|
||||
import { useState } from 'src/composables/useState';
|
||||
|
||||
defineProps({ showEntityField: { type: Boolean, default: true } });
|
||||
|
||||
const emit = defineEmits(['onDataSaved']);
|
||||
const { t } = useI18n();
|
||||
const bicInputRef = ref(null);
|
||||
|
@ -22,13 +20,8 @@ const bankEntityFormData = reactive({
|
|||
name: null,
|
||||
bic: null,
|
||||
countryFk: customer.value?.countryFk,
|
||||
id: null,
|
||||
});
|
||||
|
||||
const countriesFilter = {
|
||||
fields: ['id', 'name', 'code'],
|
||||
};
|
||||
|
||||
const countriesOptions = ref([]);
|
||||
|
||||
const onDataSaved = (...args) => {
|
||||
|
@ -44,7 +37,6 @@ onMounted(async () => {
|
|||
<template>
|
||||
<FetchData
|
||||
url="Countries"
|
||||
:filter="countriesFilter"
|
||||
auto-load
|
||||
@on-fetch="(data) => (countriesOptions = data)"
|
||||
/>
|
||||
|
@ -85,7 +77,12 @@ onMounted(async () => {
|
|||
:rules="validate('bankEntity.countryFk')"
|
||||
/>
|
||||
</div>
|
||||
<div v-if="showEntityField" class="col">
|
||||
<div
|
||||
v-if="
|
||||
countriesOptions.find((c) => c.id === data.countryFk).code == 'ES'
|
||||
"
|
||||
class="col"
|
||||
>
|
||||
<VnInput
|
||||
:label="t('id')"
|
||||
v-model="data.id"
|
||||
|
|
|
@ -126,7 +126,6 @@ const setWireTransfer = async () => {
|
|||
(_, requestResponse) =>
|
||||
onBankEntityCreated(requestResponse, row)
|
||||
"
|
||||
:show-entity-field="false"
|
||||
/>
|
||||
</template>
|
||||
<template #option="scope">
|
||||
|
|
Loading…
Reference in New Issue