Merge branch 'dev' into 2721-Add_column_stem_multiplier
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Jorge Benedito 2021-01-18 10:53:49 +00:00
commit 622c43f4a0
5 changed files with 21 additions and 8 deletions

View File

@ -721,9 +721,9 @@ export default {
},
workerSummary: {
header: 'vn-worker-summary h5',
id: 'vn-worker-summary vn-one:nth-child(1) > vn-label-value:nth-child(2) > section > span',
email: 'vn-worker-summary vn-one:nth-child(1) > vn-label-value:nth-child(3) > section > span',
department: 'vn-worker-summary vn-one:nth-child(1) > vn-label-value:nth-child(4) > section > span',
id: 'vn-worker-summary vn-one:nth-child(1) > vn-label-value:nth-child(3) > section > span',
email: 'vn-worker-summary vn-one:nth-child(1) > vn-label-value:nth-child(4) > section > span',
department: 'vn-worker-summary vn-one:nth-child(1) > vn-label-value:nth-child(5) > section > span',
userId: 'vn-worker-summary vn-one:nth-child(2) > vn-label-value:nth-child(2) > section > span',
userName: 'vn-worker-summary vn-one:nth-child(2) > vn-label-value:nth-child(3) > section > span',
role: 'vn-worker-summary vn-one:nth-child(2) > vn-label-value:nth-child(4) > section > span',

View File

@ -93,7 +93,12 @@ module.exports = Self => {
let where = buildFilter(ctx.args, (param, value) => {
switch (param) {
case 'search':
return {'e.id': value};
return /^\d+$/.test(value)
? {'e.id': value}
: {or: [
{'s.name': {like: `%${value}%`}},
{'s.nickname': {like: `%${value}%`}}
]};
case 'ref':
param = `e.${param}`;
return {[param]: {like: `%${value}%`}};
@ -141,6 +146,7 @@ module.exports = Self => {
e.invoiceInFk,
t.landed,
s.name AS supplierName,
s.nickname AS supplierAlias,
co.code AS companyCode,
cu.code AS currencyCode
FROM vn.entry e

View File

@ -8,11 +8,14 @@
<vn-searchbar
vn-focus
panel="vn-entry-search-panel"
info="Search entrys by id"
info="Search entry by id or a suppliers by name or alias"
model="model">
</vn-searchbar>
</vn-portal>
<vn-portal slot="menu">
<vn-left-menu></vn-left-menu>
</vn-portal>
<ui-view></ui-view>
<ui-view></ui-view>

View File

@ -5,7 +5,7 @@
vn-one
label="General search"
ng-model="filter.search"
info="Search entries by id"
info="Search entry by id or a suppliers by name or alias"
vn-focus>
</vn-textfield>
</vn-horizontal>
@ -45,8 +45,11 @@
label="Supplier"
ng-model="filter.supplierFk"
url="Suppliers"
fields="['name','nickname']"
search-function="{or: [{nickname: {like: '%'+ $search +'%'}}, {name: {like: '%'+ $search +'%'}}]}"
show-field="name"
value-field="id">
<tpl-item>{{name}}: {{nickname}}</tpl-item>
</vn-autocomplete>
<vn-date-picker
vn-one

View File

@ -4,4 +4,5 @@ Nickname: Alias
From: Desde
To: Hasta
Agency: Agencia
Warehouse: Almacén
Warehouse: Almacén
Search entry by id or a suppliers by name or alias: Buscar entrada por id o proveedores por nombre y alias