Merge branch 'master' into hotFix_orderCatalogFilter_values
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:
commit
42d24359cd
|
@ -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);
|
||||
|
@ -18,17 +16,16 @@ const state = useState();
|
|||
|
||||
const customer = computed(() => state.get('customer'));
|
||||
|
||||
const countriesFilter = {
|
||||
fields: ['id', 'name', 'code'],
|
||||
};
|
||||
|
||||
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 +41,6 @@ onMounted(async () => {
|
|||
<template>
|
||||
<FetchData
|
||||
url="Countries"
|
||||
:filter="countriesFilter"
|
||||
auto-load
|
||||
@on-fetch="(data) => (countriesOptions = data)"
|
||||
/>
|
||||
|
@ -54,6 +50,7 @@ onMounted(async () => {
|
|||
:title="t('title')"
|
||||
:subtitle="t('subtitle')"
|
||||
:form-initial-data="bankEntityFormData"
|
||||
:filter="countriesFilter"
|
||||
@on-data-saved="onDataSaved"
|
||||
>
|
||||
<template #form-inputs="{ data, validate }">
|
||||
|
@ -85,7 +82,13 @@ 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"
|
||||
|
|
|
@ -99,7 +99,13 @@ const mixinRules = [
|
|||
<QIcon
|
||||
name="close"
|
||||
size="xs"
|
||||
v-if="hover && value && !$attrs.disabled && $props.clearable"
|
||||
v-if="
|
||||
hover &&
|
||||
value &&
|
||||
!$attrs.disabled &&
|
||||
!$attrs.readonly &&
|
||||
$props.clearable
|
||||
"
|
||||
@click="
|
||||
() => {
|
||||
value = null;
|
||||
|
|
|
@ -126,7 +126,6 @@ const setWireTransfer = async () => {
|
|||
(_, requestResponse) =>
|
||||
onBankEntityCreated(requestResponse, row)
|
||||
"
|
||||
:show-entity-field="false"
|
||||
/>
|
||||
</template>
|
||||
<template #option="scope">
|
||||
|
|
|
@ -239,7 +239,7 @@ function makeInvoiceDialog() {
|
|||
}
|
||||
async function makeInvoice() {
|
||||
const params = {
|
||||
ticketsIds: [parseInt(ticketId)],
|
||||
ticketsIds: [parseInt(ticketId.value)],
|
||||
};
|
||||
await axios.post(`Tickets/invoiceTicketsAndPdf`, params);
|
||||
|
||||
|
@ -265,7 +265,7 @@ async function transferClient(client) {
|
|||
|
||||
async function addTurn(day) {
|
||||
const params = {
|
||||
ticketFk: parseInt(ticketId),
|
||||
ticketFk: parseInt(ticketId.value),
|
||||
weekDay: day,
|
||||
agencyModeFk: ticket.value.agencyModeFk,
|
||||
};
|
||||
|
@ -280,7 +280,7 @@ async function addTurn(day) {
|
|||
|
||||
async function createRefund(withWarehouse) {
|
||||
const params = {
|
||||
ticketsIds: [parseInt(ticketId)],
|
||||
ticketsIds: [parseInt(ticketId.value)],
|
||||
withWarehouse: withWarehouse,
|
||||
negative: true,
|
||||
};
|
||||
|
@ -368,7 +368,7 @@ async function uploadDocuware(force) {
|
|||
|
||||
const { data } = await axios.post(`Docuwares/upload`, {
|
||||
fileCabinet: 'deliveryNote',
|
||||
ticketIds: [parseInt(ticketId)],
|
||||
ticketIds: [parseInt(ticketId.value)],
|
||||
});
|
||||
|
||||
if (data) notify({ message: t('PDF sent!'), type: 'positive' });
|
||||
|
|
Loading…
Reference in New Issue