fix: simplify @update-bic
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
bc6d11846f
commit
82f4397fd4
|
@ -15,7 +15,6 @@ const { t } = useI18n();
|
|||
const route = useRoute();
|
||||
|
||||
const bankEntitiesRef = ref(null);
|
||||
const bankEntity = ref();
|
||||
|
||||
const filter = {
|
||||
fields: ['id', 'bic', 'name'],
|
||||
|
@ -26,10 +25,6 @@ const getBankEntities = (data, formData) => {
|
|||
bankEntitiesRef.value.fetch();
|
||||
formData.bankEntityFk = Number(data.id);
|
||||
};
|
||||
|
||||
const autofillSwiftBic = (bankEntityFk) => {
|
||||
bankEntity.value = bankEntityFk;
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -52,7 +47,7 @@ const autofillSwiftBic = (bankEntityFk) => {
|
|||
<VnInputBic
|
||||
:label="t('IBAN')"
|
||||
v-model="data.iban"
|
||||
@update-bic="autofillSwiftBic($event)"
|
||||
@update-bic="(bankEntityFk) => (data.bankEntityFk = bankEntityFk)"
|
||||
/>
|
||||
<VnSelectDialog
|
||||
:label="t('Swift / BIC')"
|
||||
|
@ -65,7 +60,7 @@ const autofillSwiftBic = (bankEntityFk) => {
|
|||
hide-selected
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
v-model="bankEntity"
|
||||
v-model="data.bankEntityFk"
|
||||
>
|
||||
<template #form>
|
||||
<CreateBankEntityForm
|
||||
|
|
|
@ -31,7 +31,6 @@ const postcodesOptions = ref([]);
|
|||
const user = useState().getUser();
|
||||
const defaultPayMethod = ref();
|
||||
const bankEntitiesRef = ref();
|
||||
const bankEntity = ref();
|
||||
const dataKey = 'WorkerList';
|
||||
const columns = computed(() => [
|
||||
{
|
||||
|
@ -164,10 +163,6 @@ function generateCodeUser(worker) {
|
|||
|
||||
if (!worker.companyFk) worker.companyFk = user.companyFk;
|
||||
}
|
||||
|
||||
const autofillSwiftBic = (bankEntityFk) => {
|
||||
bankEntity.value = bankEntityFk;
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
<FetchData
|
||||
|
@ -332,13 +327,15 @@ const autofillSwiftBic = (bankEntityFk) => {
|
|||
:label="t('IBAN')"
|
||||
v-model="data.iban"
|
||||
:disable="data.isFreelance"
|
||||
@update-bic="autofillSwiftBic($event)"
|
||||
@update-bic="
|
||||
(bankEntityFk) => (data.bankEntityFk = bankEntityFk)
|
||||
"
|
||||
/>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<VnSelectDialog
|
||||
:label="t('worker.create.bankEntity')"
|
||||
v-model="bankEntity"
|
||||
v-model="data.bankEntityFk"
|
||||
:options="bankEntitiesOptions"
|
||||
option-label="name"
|
||||
option-value="id"
|
||||
|
|
Loading…
Reference in New Issue