salix/modules/entry/front/latest-buys/index.html

270 lines
11 KiB
HTML
Raw Normal View History

2020-07-20 09:31:47 +00:00
<vn-crud-model
vn-id="model"
2020-08-26 14:33:47 +00:00
url="Buys/latestBuysFilter"
order="itemFk DESC"
2020-07-20 09:31:47 +00:00
limit="20"
2021-05-12 10:11:27 +00:00
data="$ctrl.buys"
auto-load="true">
2020-07-20 09:31:47 +00:00
</vn-crud-model>
<vn-portal slot="topbar">
<vn-searchbar
2020-10-06 06:17:12 +00:00
vn-focus
2020-07-20 09:31:47 +00:00
panel="vn-latest-buys-search-panel"
2020-08-26 14:33:47 +00:00
placeholder="Search by item id or name"
info="You can search by item id or name"
suggested-filter="{isActive: true}"
2020-07-20 09:31:47 +00:00
model="model"
auto-state="false">
</vn-searchbar>
</vn-portal>
<vn-card>
<smart-table
2020-07-20 09:31:47 +00:00
model="model"
view-config-id="latestBuys"
options="$ctrl.smartTableOptions"
expr-builder="$ctrl.exprBuilder(param, value)">
<slot-table>
<table>
<thead>
<tr>
<th shrink>
2021-11-11 15:38:41 +00:00
<vn-multi-check
checked="$ctrl.checkAll"
model="model"
2021-11-15 13:40:35 +00:00
check-field="$checked">
</vn-multi-check>
</th>
2021-11-15 07:45:21 +00:00
<th translate>Picture</th>
<th field="itemFk">
<span translate>Item ID</span>
</th>
<th field="packing" number>
<span translate>Packing</span>
</th>
<th field="grouping" number>
<span translate>Grouping</span>
</th>
<th field="quantity" number>
<span translate>Quantity</span>
</th>
<th field="description">
<span translate>Description</span>
</th>
<th field="size">
<span translate>Size</span>
</th>
<th field="name">
<span translate>Tags</span>
</th>
<th field="code">
<span translate>Type</span>
</th>
<th field="intrastat">
<span translate>Intrastat</span>
</th>
<th field="origin">
<span translate>Origin</span>
</th>
<th field="density">
<span translate>Density</span>
</th>
<th field="isActive">
<span translate>Active</span>
</th>
<th field="family">
<span translate>Family</span>
</th>
<th field="entryFk">
<span translate>Entry</span>
</th>
<th field="buyingValue" number>
<span translate>Buying value</span>
</th>
<th field="freightValue" number>
<span translate>Freight value</span>
</th>
<th field="comissionValue" number>
<span translate>Commission value</span>
</th>
<th field="packageValue" number>
<span translate>Package value</span>
</th>
<th field="isIgnored">
<span translate>Is ignored</span>
</th>
<th field="price2" number>
<span translate>Grouping</span>
</th>
<th field="price3" number>
<span translate>Packing</span>
</th>
<th field="minPrice" number>
<span translate>Min</span>
</th>
<th field="ektFk">
<span translate>Ekt</span>
</th>
<th field="weight">
<span translate>Weight</span>
</th>
<th field="packageFk">
<span translate>Package</span>
</th>
<th field="packingOut">
<span translate>Package out</span>
</th>
<th field="landing">
<span translate>Landing</span>
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="buy in $ctrl.buys"
vn-anchor="::{
state: 'entry.card.buy.index',
params: {id: {{::buy.entryFk}}}
}">
<td>
<vn-check
ng-model="buy.$checked"
vn-click-stop>
</vn-check>
</td>
<td >
<img
ng-src="{{::$root.imagePath('catalog', '50x50', buy.itemFk)}}"
zoom-image="{{::$root.imagePath('catalog', '1600x900', buy.itemFk)}}"
vn-click-stop
on-error-src/>
</td>
<td>
<span
vn-click-stop="itemDescriptor.show($event, buy.itemFk)"
class="link">
2021-11-12 13:15:35 +00:00
{{::buy.itemFk}}
</span>
</td>
<td number>
<vn-chip class="transparent" translate-attr="buy.groupingMode == 2 ? {title: 'Minimun amount'} : {title: 'Packing'}" ng-class="{'message': buy.groupingMode == 2}">
<span translate>{{::buy.packing | dashIfEmpty}}</span>
</vn-chip>
</td>
<td number>
<vn-chip class="transparent" translate-attr="buy.groupingMode == 1 ? {title: 'Minimun amount'} : {title: 'Grouping'}" ng-class="{'message': buy.groupingMode == 1}">
<span translate>{{::buy.grouping | dashIfEmpty}}</span>
</vn-chip>
</td>
<td number>{{::buy.quantity}}</td>
<td vn-two title="{{::buy.description}}">
{{::buy.description | dashIfEmpty}}
</td>
<td number>{{::buy.size}}</td>
<td vn-fetched-tags>
<div>
<vn-one title="{{::buy.name}}">{{::buy.name}}</vn-one>
<vn-one ng-if="::buy.subName">
<h3 title="{{::buy.subName}}">{{::buy.subName}}</h3>
</vn-one>
</div>
<vn-fetched-tags
max-length="6"
item="::buy"
tabindex="-1">
</vn-fetched-tags>
</td>
<td title="{{::buy.type}}">
{{::buy.code}}
</td>
<td title="{{::item.intrastat}}">
{{::buy.intrastat}}
</td>
<td>{{::buy.origin}}</td>
<td>{{::buy.density}}</td>
<td>
<vn-check
disabled="true"
ng-model="::buy.isActive">
</vn-check>
</td>
<td>{{::buy.family}}</td>
<td>
<span
vn-click-stop="entryDescriptor.show($event, buy.entryFk)"
class="link">
{{::buy.entryFk}}
</span>
</td>
<td number>{{::buy.buyingValue | currency: 'EUR':2}}</td>
<td number>{{::buy.freightValue | currency: 'EUR':2}}</td>
<td number>{{::buy.comissionValue | currency: 'EUR':2}}</td>
<td number>{{::buy.packageValue | currency: 'EUR':2}}</td>
<td>
<vn-check
disabled="true"
ng-model="::buy.isIgnored">
</vn-check>
</td>
<td number>{{::buy.price2 | currency: 'EUR':2}}</td>
<td number>{{::buy.price3 | currency: 'EUR':2}}</td>
<td number>{{::buy.minPrice | currency: 'EUR':2}}</td>
<td>{{::buy.ektFk | dashIfEmpty}}</td>
<td>{{::buy.weight}}</td>
<td>{{::buy.packageFk}}</td>
<td>{{::buy.packingOut}}</td>
<td>{{::buy.landing | date: 'dd/MM/yyyy'}}</td>
</tr>
</tbody>
</table>
</slot-table>
</smart-table>
</vn-card>
2020-07-20 09:31:47 +00:00
<div fixed-bottom-right>
<vn-vertical style="align-items: center;">
<vn-button class="round sm vn-mb-sm"
icon="edit"
ng-show="$ctrl.totalChecked > 0"
2020-08-26 14:33:47 +00:00
ng-click="edit.show($event)"
2020-08-27 13:29:48 +00:00
vn-tooltip="Edit buy(s)"
2020-07-20 09:31:47 +00:00
tooltip-position="left">
</vn-button>
</vn-vertical>
</div>
2020-08-26 14:33:47 +00:00
<vn-dialog class="edit"
vn-id="edit"
on-accept="$ctrl.onEditAccept()"
on-close="$ctrl.editedColumn = null">
2020-08-26 14:33:47 +00:00
<tpl-body>
<span translate>Edit</span>
<span class="countLines">
{{::$ctrl.totalChecked}}
2021-03-10 08:49:24 +00:00
</span>
<span translate>buy(s)</span>
2020-08-26 14:33:47 +00:00
<vn-horizontal>
<vn-autocomplete
vn-two
ng-model="$ctrl.editedColumn.field"
data="$ctrl.columns"
value-field="field"
2020-09-02 11:09:30 +00:00
show-field="displayName"
2020-08-26 14:33:47 +00:00
label="Field to edit">
</vn-autocomplete>
<vn-textfield
vn-one
label="Value"
ng-model="$ctrl.editedColumn.newValue">
</vn-textfield>
</vn-horizontal>
</tpl-body>
<tpl-buttons>
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
<button response="accept" translate>Create</button>
</tpl-buttons>
</vn-dialog>
<vn-item-descriptor-popover
vn-id="item-descriptor"
warehouse-fk="$ctrl.vnConfig.warehouseFk">
2020-08-26 14:33:47 +00:00
</vn-item-descriptor-popover>
<vn-entry-descriptor-popover
vn-id="entry-descriptor">
2020-08-26 14:33:47 +00:00
</vn-entry-descriptor-popover>