Merge branch '8944-FixedPriceChanges' of https://gitea.verdnatura.es/verdnatura/salix-front into 8944-FixedPriceChanges
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
gitea/salix-front/pipeline/pr-dev This commit is unstable
Details
This commit is contained in:
commit
b490dac628
|
@ -684,8 +684,10 @@ const handleHeaderSelection = (evt, data) => {
|
||||||
ref="CrudModelRef"
|
ref="CrudModelRef"
|
||||||
@on-fetch="
|
@on-fetch="
|
||||||
(...args) => {
|
(...args) => {
|
||||||
|
if ($props.multiCheck.expand) {
|
||||||
selectAll = false;
|
selectAll = false;
|
||||||
selected = [];
|
selected = [];
|
||||||
|
}
|
||||||
emit('onFetch', ...args);
|
emit('onFetch', ...args);
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
|
|
|
@ -30,7 +30,7 @@ const onClick = async () => {
|
||||||
params: { filter: JSON.stringify(filter) },
|
params: { filter: JSON.stringify(filter) },
|
||||||
};
|
};
|
||||||
try {
|
try {
|
||||||
const { data } = axios.get(props.url, params);
|
const { data } = await axios.get(props.url, params);
|
||||||
rows.value = data;
|
rows.value = data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
const response = error.response;
|
const response = error.response;
|
||||||
|
@ -83,7 +83,7 @@ defineEmits(['update:selected', 'select:all']);
|
||||||
/>
|
/>
|
||||||
<span
|
<span
|
||||||
v-else
|
v-else
|
||||||
v-text="t('records', { rows: rows.length ?? 0 })"
|
v-text="t('records', { rows: rows?.length ?? 0 })"
|
||||||
/>
|
/>
|
||||||
</QItemLabel>
|
</QItemLabel>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
|
|
|
@ -12,6 +12,7 @@ const $props = defineProps({
|
||||||
const isWorker = ref(false);
|
const isWorker = ref(false);
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
if (!$props.workerId) return;
|
||||||
try {
|
try {
|
||||||
const {
|
const {
|
||||||
data: { exists },
|
data: { exists },
|
||||||
|
|
|
@ -165,7 +165,6 @@ const updateDateParams = (value, params) => {
|
||||||
v-if="campaignList"
|
v-if="campaignList"
|
||||||
data-key="CustomerConsumption"
|
data-key="CustomerConsumption"
|
||||||
url="Clients/consumption"
|
url="Clients/consumption"
|
||||||
:order="['itemTypeFk', 'itemName', 'itemSize', 'description']"
|
|
||||||
:filter="{ where: { clientFk: route.params.id } }"
|
:filter="{ where: { clientFk: route.params.id } }"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
search-url="consumption"
|
search-url="consumption"
|
||||||
|
|
|
@ -130,20 +130,22 @@ async function onDataSaved(formData, { id }) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getSupplierClientReferences(value) {
|
async function getSupplierClientReferences(data) {
|
||||||
if (!value) return (initialData.description = '');
|
if (!data) return (initialData.description = '');
|
||||||
const params = { bankAccount: value };
|
const params = { bankAccount: data.compensationAccount };
|
||||||
const { data } = await axios(`Clients/getClientOrSupplierReference`, { params });
|
const { data: reference } = await axios(`Clients/getClientOrSupplierReference`, {
|
||||||
if (!data.clientId) {
|
params,
|
||||||
initialData.description = t('Supplier Compensation Reference', {
|
});
|
||||||
supplierId: data.supplierId,
|
if (reference.supplierId) {
|
||||||
supplierName: data.supplierName,
|
data.description = t('Supplier Compensation Reference', {
|
||||||
|
supplierId: reference.supplierId,
|
||||||
|
supplierName: reference.supplierName,
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
initialData.description = t('Client Compensation Reference', {
|
data.description = t('Client Compensation Reference', {
|
||||||
clientId: data.clientId,
|
clientId: reference.clientId,
|
||||||
clientName: data.clientName,
|
clientName: reference.clientName,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,7 +254,7 @@ async function getAmountPaid() {
|
||||||
:label="t('Compensation account')"
|
:label="t('Compensation account')"
|
||||||
clearable
|
clearable
|
||||||
v-model="data.compensationAccount"
|
v-model="data.compensationAccount"
|
||||||
@blur="getSupplierClientReferences(data.compensationAccount)"
|
@blur="getSupplierClientReferences(data)"
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
</div>
|
</div>
|
||||||
|
@ -288,6 +290,9 @@ async function getAmountPaid() {
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<i18n>
|
<i18n>
|
||||||
|
en:
|
||||||
|
Supplier Compensation Reference: ({supplierId}) Ntro Proveedor {supplierName}
|
||||||
|
Client Compensation Reference: ({clientId}) Ntro Cliente {clientName}
|
||||||
es:
|
es:
|
||||||
New payment: Añadir pago
|
New payment: Añadir pago
|
||||||
Date: Fecha
|
Date: Fecha
|
||||||
|
|
Loading…
Reference in New Issue