2021-01-18 13:16:39 +00:00
|
|
|
<vn-crud-model
|
|
|
|
vn-id="model"
|
|
|
|
url="FixedPrices/filter"
|
|
|
|
limit="20"
|
2021-01-19 19:56:33 +00:00
|
|
|
data="prices"
|
2021-01-18 13:16:39 +00:00
|
|
|
auto-load="true"
|
|
|
|
order="itemFk">
|
|
|
|
</vn-crud-model>
|
|
|
|
<vn-crud-model
|
|
|
|
auto-load="true"
|
|
|
|
url="Warehouses"
|
|
|
|
data="warehouses"
|
|
|
|
order="name">
|
|
|
|
</vn-crud-model>
|
|
|
|
<vn-portal slot="topbar">
|
|
|
|
<vn-searchbar
|
|
|
|
auto-state="false"
|
|
|
|
panel="vn-fixed-price-search-panel"
|
|
|
|
info="Search prices by item ID or code"
|
2021-01-19 12:30:07 +00:00
|
|
|
placeholder="Search fixed prices"
|
2021-01-18 13:16:39 +00:00
|
|
|
filter="{}"
|
|
|
|
model="model">
|
|
|
|
</vn-searchbar>
|
|
|
|
</vn-portal>
|
2021-01-28 14:10:47 +00:00
|
|
|
<div class="vn-w-lg">
|
2021-01-18 13:16:39 +00:00
|
|
|
<vn-card>
|
|
|
|
<vn-table model="model">
|
|
|
|
<vn-thead>
|
|
|
|
<vn-tr>
|
2021-01-28 14:10:47 +00:00
|
|
|
<vn-th field="itemFk" shrink>Item ID</vn-th>
|
|
|
|
<vn-th field="itemFk">Description</vn-th>
|
2021-01-18 13:16:39 +00:00
|
|
|
<vn-th field="warehouseFk">Warehouse</vn-th>
|
|
|
|
<vn-th field="rate2">P.P.U.</vn-th>
|
|
|
|
<vn-th field="rate3">P.P.P.</vn-th>
|
|
|
|
<vn-th field="minPrice">Min price</vn-th>
|
|
|
|
<vn-th field="started" style="width: 90px">Started</vn-th>
|
|
|
|
<vn-th field="ended" style="width: 90px">Ended</vn-th>
|
|
|
|
<vn-th shrink></vn-th>
|
|
|
|
</vn-tr>
|
|
|
|
</vn-thead>
|
|
|
|
<vn-tbody>
|
2021-01-19 19:56:33 +00:00
|
|
|
<vn-tr ng-repeat="price in prices">
|
2021-01-28 14:10:47 +00:00
|
|
|
<vn-td shrink>
|
2021-01-18 13:16:39 +00:00
|
|
|
<span
|
|
|
|
ng-if="price.itemFk"
|
|
|
|
ng-click="itemDescriptor.show($event, price.itemFk)"
|
|
|
|
class="link">
|
|
|
|
{{price.itemFk}}
|
|
|
|
</span>
|
|
|
|
<vn-autocomplete
|
|
|
|
class="dense"
|
|
|
|
ng-if="!price.itemFk"
|
|
|
|
vn-focus
|
2021-08-30 09:23:46 +00:00
|
|
|
url="Items/withName"
|
2021-01-18 13:16:39 +00:00
|
|
|
ng-model="price.itemFk"
|
|
|
|
show-field="name"
|
|
|
|
value-field="id"
|
|
|
|
search-function="$ctrl.itemSearchFunc($search)"
|
|
|
|
on-change="$ctrl.upsertPrice(price)"
|
|
|
|
order="id DESC"
|
|
|
|
tabindex="1">
|
|
|
|
<tpl-item>
|
|
|
|
{{::id}} - {{::name}}
|
|
|
|
</tpl-item>
|
|
|
|
</vn-autocomplete>
|
|
|
|
</vn-td>
|
2021-01-28 14:10:47 +00:00
|
|
|
<vn-td vn-fetched-tags>
|
2021-09-23 15:19:47 +00:00
|
|
|
<div>
|
|
|
|
<vn-one title="{{price.name}}">{{price.name}}</vn-one>
|
|
|
|
<vn-one ng-if="price.subName">
|
|
|
|
<h3 title="{{price.subName}}">{{price.subName}}</h3>
|
|
|
|
</vn-one>
|
|
|
|
</div>
|
2021-01-28 14:10:47 +00:00
|
|
|
<vn-fetched-tags
|
|
|
|
max-length="6"
|
|
|
|
item="price"
|
|
|
|
tabindex="-1">
|
|
|
|
</vn-fetched-tags>
|
2021-01-18 13:16:39 +00:00
|
|
|
</vn-td>
|
|
|
|
<vn-td>
|
|
|
|
<vn-autocomplete
|
|
|
|
vn-one
|
|
|
|
label="Warehouse"
|
|
|
|
ng-model="price.warehouseFk"
|
|
|
|
url="Warehouses"
|
|
|
|
on-change="$ctrl.upsertPrice(price)"
|
|
|
|
tabindex="2">
|
|
|
|
</vn-autocomplete>
|
|
|
|
</vn-td>
|
|
|
|
<vn-td-editable number>
|
|
|
|
<text>{{price.rate2 | currency: 'EUR':2}}</text>
|
|
|
|
<field>
|
|
|
|
<vn-input-number
|
|
|
|
class="dense"
|
|
|
|
vn-focus
|
|
|
|
ng-model="price.rate2"
|
|
|
|
on-change="$ctrl.upsertPrice(price)">
|
|
|
|
</vn-input-number>
|
|
|
|
</field>
|
|
|
|
</vn-td-editable>
|
|
|
|
<vn-td-editable number>
|
|
|
|
<text>{{price.rate3 | currency: 'EUR':2}}</text>
|
|
|
|
<field>
|
|
|
|
<vn-input-number
|
|
|
|
class="dense"
|
|
|
|
vn-focus
|
|
|
|
ng-model="price.rate3"
|
|
|
|
on-change="$ctrl.upsertPrice(price)">
|
|
|
|
</vn-input-number>
|
|
|
|
</field>
|
|
|
|
</vn-td-editable>
|
|
|
|
<vn-td-editable number>
|
|
|
|
<text>{{(price.hasMinPrice ? (price.minPrice | currency: 'EUR':2) : "-")}}</text>
|
|
|
|
<field>
|
|
|
|
<vn-input-number
|
|
|
|
class="dense"
|
|
|
|
vn-focus
|
|
|
|
ng-model="price.minPrice"
|
|
|
|
on-change="$ctrl.upsertPrice(price)">
|
|
|
|
</vn-input-number>
|
|
|
|
</field>
|
|
|
|
</vn-td-editable>
|
|
|
|
<vn-td>
|
|
|
|
<vn-date-picker
|
|
|
|
vn-one
|
|
|
|
label="Started"
|
|
|
|
ng-model="price.started"
|
|
|
|
on-change="$ctrl.upsertPrice(price)">
|
|
|
|
</vn-date-picker>
|
|
|
|
</vn-td>
|
|
|
|
<vn-td>
|
|
|
|
<vn-date-picker
|
|
|
|
vn-one
|
|
|
|
label="Ended"
|
|
|
|
ng-model="price.ended"
|
|
|
|
on-change="$ctrl.upsertPrice(price)">
|
|
|
|
</vn-date-picker>
|
|
|
|
</vn-td>
|
|
|
|
<vn-td shrink>
|
|
|
|
<vn-icon-button
|
|
|
|
icon="delete"
|
|
|
|
vn-tooltip="Delete"
|
|
|
|
ng-click="$ctrl.removePrice($index)">
|
|
|
|
</vn-icon-button>
|
|
|
|
</vn-td>
|
|
|
|
</vn-tr>
|
|
|
|
</vn-tbody>
|
|
|
|
</vn-table>
|
|
|
|
<div class="vn-pa-md">
|
|
|
|
<vn-icon-button
|
|
|
|
vn-tooltip="Add fixed price"
|
|
|
|
icon="add_circle"
|
|
|
|
vn-bind="+"
|
|
|
|
ng-click="model.insert()">
|
|
|
|
</vn-icon-button>
|
|
|
|
</div>
|
|
|
|
</vn-card>
|
|
|
|
</div>
|
|
|
|
<vn-item-descriptor-popover
|
2021-05-21 13:31:05 +00:00
|
|
|
vn-id="item-descriptor"
|
|
|
|
warehouse-fk="$ctrl.vnConfig.warehouseFk">
|
2021-01-18 13:16:39 +00:00
|
|
|
</vn-item-descriptor-popover>
|