forked from verdnatura/salix-front
refs #6595 fix invoiceInBasicData
This commit is contained in:
parent
7b974a2f32
commit
489ea94d3f
|
@ -144,18 +144,6 @@ function supplierRefFilter(val) {
|
||||||
where = Object.assign(where, params);
|
where = Object.assign(where, params);
|
||||||
suppliersRef.value.fetch({ where });
|
suppliersRef.value.fetch({ where });
|
||||||
}
|
}
|
||||||
function currencyRefFilter(val) {
|
|
||||||
let where = { limit: 30 };
|
|
||||||
let params = {};
|
|
||||||
let key = 'code';
|
|
||||||
|
|
||||||
if (new RegExp(/\d/g).test(val)) {
|
|
||||||
key = 'id';
|
|
||||||
}
|
|
||||||
params = { [key]: { like: `%${val}%` } };
|
|
||||||
where = Object.assign(where, params);
|
|
||||||
currenciesRef.value.fetch({ where });
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
<FetchData
|
||||||
|
@ -169,6 +157,7 @@ function currencyRefFilter(val) {
|
||||||
:filter="{ fields: ['id', 'code'] }"
|
:filter="{ fields: ['id', 'code'] }"
|
||||||
order="code"
|
order="code"
|
||||||
@on-fetch="(data) => (currencies = data)"
|
@on-fetch="(data) => (currencies = data)"
|
||||||
|
auto-load
|
||||||
/>
|
/>
|
||||||
<FetchData
|
<FetchData
|
||||||
ref="companiesRef"
|
ref="companiesRef"
|
||||||
|
@ -176,6 +165,7 @@ function currencyRefFilter(val) {
|
||||||
:filter="{ fields: ['id', 'code'] }"
|
:filter="{ fields: ['id', 'code'] }"
|
||||||
order="code"
|
order="code"
|
||||||
@on-fetch="(data) => (companies = data)"
|
@on-fetch="(data) => (companies = data)"
|
||||||
|
auto-load
|
||||||
/>
|
/>
|
||||||
<FetchData
|
<FetchData
|
||||||
ref="dmsTypesRef"
|
ref="dmsTypesRef"
|
||||||
|
@ -183,6 +173,7 @@ function currencyRefFilter(val) {
|
||||||
:filter="{ fields: ['id', 'name'] }"
|
:filter="{ fields: ['id', 'name'] }"
|
||||||
order="name"
|
order="name"
|
||||||
@on-fetch="(data) => (dmsTypes = data)"
|
@on-fetch="(data) => (dmsTypes = data)"
|
||||||
|
auto-load
|
||||||
/>
|
/>
|
||||||
<FetchData
|
<FetchData
|
||||||
ref="warehousesRef"
|
ref="warehousesRef"
|
||||||
|
@ -190,11 +181,13 @@ function currencyRefFilter(val) {
|
||||||
:filter="{ fields: ['id', 'name'] }"
|
:filter="{ fields: ['id', 'name'] }"
|
||||||
order="name"
|
order="name"
|
||||||
@on-fetch="(data) => (warehouses = data)"
|
@on-fetch="(data) => (warehouses = data)"
|
||||||
|
auto-load
|
||||||
/>
|
/>
|
||||||
<FetchData
|
<FetchData
|
||||||
ref="allowTypesRef"
|
ref="allowTypesRef"
|
||||||
url="DmsContainers/allowedContentTypes"
|
url="DmsContainers/allowedContentTypes"
|
||||||
@on-fetch="(data) => (allowedContentTypes = data)"
|
@on-fetch="(data) => (allowedContentTypes = data)"
|
||||||
|
auto-load
|
||||||
/>
|
/>
|
||||||
<FetchData
|
<FetchData
|
||||||
url="UserConfigs/getUserConfig"
|
url="UserConfigs/getUserConfig"
|
||||||
|
@ -431,9 +424,6 @@ function currencyRefFilter(val) {
|
||||||
:options="currencies"
|
:options="currencies"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
option-label="code"
|
option-label="code"
|
||||||
:input-debounce="100"
|
|
||||||
:default-filter="false"
|
|
||||||
@input-value="currencyRefFilter"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
|
|
Loading…
Reference in New Issue