item.index default columns and filter with like
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
bd51ff3761
commit
469c544536
|
@ -3,4 +3,10 @@ CREATE TABLE `salix`.`defaultViewConfig`
|
|||
tableCode VARCHAR(25) not null,
|
||||
columns JSON not null
|
||||
)
|
||||
comment 'The default configuration of columns for views';
|
||||
comment 'The default configuration of columns for views';
|
||||
|
||||
INSERT INTO `salix`.`defaultViewConfig` (tableCode, columns)
|
||||
VALUES (
|
||||
'itemIndex',
|
||||
'{"id":true,"grouping":true,"packing":true,"name":true,"stems":true,"size":true,"typeFk":true,"category":true,"intrastat":false,"origin":true,"buyerFk":true,"density":false,"stemMultiplier":false,"active":false,"landed":true}'
|
||||
);
|
|
@ -37,9 +37,8 @@ export default class SmartTable extends Component {
|
|||
|
||||
set model(value) {
|
||||
this._model = value;
|
||||
if (value) {
|
||||
if (value)
|
||||
this.$.model = value;
|
||||
}
|
||||
}
|
||||
|
||||
get viewConfigId() {
|
||||
|
@ -239,6 +238,11 @@ export default class SmartTable extends Component {
|
|||
if (columnOptions)
|
||||
options = columnOptions.find(column => column.field == field);
|
||||
|
||||
if (options && options.searchable == false) {
|
||||
searchRow.appendChild(cell);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (options && options.autocomplete) {
|
||||
let props = ``;
|
||||
|
||||
|
|
|
@ -12,49 +12,49 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<th shrink></th>
|
||||
<th field="id" shrink>
|
||||
<span translate>Id</span>
|
||||
<th field="id">
|
||||
<span translate>Identifier</span>
|
||||
</th>
|
||||
<th field="grouping" shrink>
|
||||
<th field="grouping">
|
||||
<span translate>Grouping</span>
|
||||
</th>
|
||||
<th field="packing" shrink>
|
||||
<th field="packing">
|
||||
<span translate>Packing</span>
|
||||
</th>
|
||||
<th field="name">
|
||||
<span translate>Description</span>
|
||||
</th>
|
||||
<th field="stems" shrink>
|
||||
<th field="stems">
|
||||
<span translate>Stems</span>
|
||||
</th>
|
||||
<th field="size" shrink>
|
||||
<th field="size">
|
||||
<span translate>Size</span>
|
||||
</th>
|
||||
<th field="typeFk" shrink>
|
||||
<th field="typeFk">
|
||||
<span translate>Type</span>
|
||||
</th>
|
||||
<th field="category" shrink>
|
||||
<th field="category">
|
||||
<span translate>Category</span>
|
||||
</th>
|
||||
<th field="intrastat" shrink>
|
||||
<th field="intrastat">
|
||||
<span translate>Intrastat</span>
|
||||
</th>
|
||||
<th field="origin" shrink>
|
||||
<th field="origin">
|
||||
<span translate>Origin</span>
|
||||
</th>
|
||||
<th field="buyerFk" shrink>
|
||||
<th field="buyerFk">
|
||||
<span translate>Buyer</span>
|
||||
</th>
|
||||
<th field="density" shrink>
|
||||
<th field="density">
|
||||
<span translate>Density</span>
|
||||
</th>
|
||||
<th field="stemMultiplier" shrink>
|
||||
<th field="stemMultiplier">
|
||||
<span translate>Multiplier</span>
|
||||
</th>
|
||||
<th field="active" shrink>
|
||||
<th field="active">
|
||||
<span translate>Active</span>
|
||||
</th>
|
||||
<th field="landed" shrink-date>
|
||||
<th field="landed">
|
||||
<span translate>Landed</span>
|
||||
</th>
|
||||
<th></th>
|
||||
|
@ -66,22 +66,22 @@
|
|||
state: 'item.card.summary',
|
||||
params: {id: item.id}
|
||||
}">
|
||||
<td shrink>
|
||||
<td>
|
||||
<img
|
||||
ng-src="{{::$root.imagePath('catalog', '50x50', item.id)}}"
|
||||
zoom-image="{{::$root.imagePath('catalog', '1600x900', item.id)}}"
|
||||
vn-click-stop
|
||||
on-error-src/>
|
||||
</td>
|
||||
<td shrink>
|
||||
<td>
|
||||
<span
|
||||
vn-click-stop="itemDescriptor.show($event, item.id)"
|
||||
class="link">
|
||||
{{::item.id}}
|
||||
</span>
|
||||
</td>
|
||||
<td shrink>{{::item.grouping | dashIfEmpty}}</td>
|
||||
<td shrink>{{::item.packing | dashIfEmpty}}</td>
|
||||
<td>{{::item.grouping | dashIfEmpty}}</td>
|
||||
<td>{{::item.packing | dashIfEmpty}}</td>
|
||||
<td vn-fetched-tags>
|
||||
<div>
|
||||
<vn-one title="{{::item.name}}">{{::item.name}}</vn-one>
|
||||
|
@ -95,35 +95,35 @@
|
|||
tabindex="-1">
|
||||
</vn-fetched-tags>
|
||||
</td>
|
||||
<td shrink>{{::item.stems}}</td>
|
||||
<td shrink>{{::item.size}}</td>
|
||||
<td shrink title="{{::item.typeName}}">
|
||||
<td>{{::item.stems}}</td>
|
||||
<td>{{::item.size}}</td>
|
||||
<td title="{{::item.typeName}}">
|
||||
{{::item.typeName}}
|
||||
</td>
|
||||
<td shrink title="{{::item.category}}">
|
||||
<td title="{{::item.category}}">
|
||||
{{::item.category}}
|
||||
</td>
|
||||
<td shrink title="{{::item.intrastat}}">
|
||||
<td title="{{::item.intrastat}}">
|
||||
{{::item.intrastat}}
|
||||
</td>
|
||||
<td shrink>{{::item.origin}}</td>
|
||||
<td shrink title="{{::item.userName}}">
|
||||
<td>{{::item.origin}}</td>
|
||||
<td title="{{::item.userName}}">
|
||||
<span
|
||||
class="link"
|
||||
vn-click-stop="workerDescriptor.show($event, item.buyerFk)">
|
||||
{{::item.userName}}
|
||||
</span>
|
||||
</td>
|
||||
<td shrink>{{::item.density}}</td>
|
||||
<td shrink >{{::item.stemMultiplier}}</td>
|
||||
<td shrink>
|
||||
<td>{{::item.density}}</td>
|
||||
<td>{{::item.stemMultiplier}}</td>
|
||||
<td>
|
||||
<vn-check
|
||||
disabled="true"
|
||||
ng-model="::item.isActive">
|
||||
</vn-check>
|
||||
</td>
|
||||
<td shrink-date>{{::item.landed | date:'dd/MM/yyyy'}}</td>
|
||||
<td shrink>
|
||||
<td>
|
||||
<vn-horizontal class="buttons">
|
||||
<vn-icon-button
|
||||
vn-click-stop="clone.show(item.id)"
|
||||
|
|
|
@ -23,7 +23,7 @@ class Controller extends Section {
|
|||
field: 'origin',
|
||||
autocomplete: {
|
||||
url: 'Origins',
|
||||
showField: 'name',
|
||||
showField: 'code',
|
||||
valueField: 'code'
|
||||
}
|
||||
},
|
||||
|
@ -51,6 +51,14 @@ class Controller extends Section {
|
|||
valueField: 'id',
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'active',
|
||||
searchable: false
|
||||
},
|
||||
{
|
||||
field: 'landed',
|
||||
searchable: false
|
||||
},
|
||||
]
|
||||
};
|
||||
}
|
||||
|
@ -71,9 +79,10 @@ class Controller extends Section {
|
|||
return {'i.typeFk': value};
|
||||
case 'intrastat':
|
||||
return {'intr.description': value};
|
||||
case 'name':
|
||||
return {'i.name': {like: `%${value}%`}};
|
||||
case 'id':
|
||||
case 'size':
|
||||
case 'name':
|
||||
case 'subname':
|
||||
case 'isActive':
|
||||
case 'density':
|
||||
|
|
Loading…
Reference in New Issue