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>
|
2022-03-15 14:18:27 +00:00
|
|
|
<div class="vn-w-xl">
|
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>
|
2022-03-15 14:18:27 +00:00
|
|
|
<vn-th field="warehouseFk" shrink>Warehouse</vn-th>
|
|
|
|
<vn-th
|
|
|
|
field="rate2"
|
|
|
|
vn-tooltip="Price By Unit"
|
|
|
|
center>
|
|
|
|
P.P.U.
|
|
|
|
</vn-th>
|
|
|
|
<vn-th
|
|
|
|
field="rate3"
|
|
|
|
vn-tooltip="Price By Package"
|
|
|
|
center>
|
|
|
|
P.P.P.
|
|
|
|
</vn-th>
|
|
|
|
<vn-th></vn-th>
|
2021-01-18 13:16:39 +00:00
|
|
|
<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>
|
2022-03-15 14:18:27 +00:00
|
|
|
<text>{{price.itemFk}}</text>
|
2021-01-18 13:16:39 +00:00
|
|
|
<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>
|
2022-03-15 14:18:27 +00:00
|
|
|
<span
|
|
|
|
vn-one
|
|
|
|
ng-if="price.itemFk"
|
|
|
|
ng-click="itemDescriptor.show($event, price.itemFk)"
|
|
|
|
class="link">
|
|
|
|
{{price.name}}
|
|
|
|
</span>
|
2021-09-23 15:19:47 +00:00
|
|
|
<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>
|
2022-03-15 14:18:27 +00:00
|
|
|
<vn-td shrink>
|
2021-01-18 13:16:39 +00:00
|
|
|
<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>
|
2022-03-15 14:18:27 +00:00
|
|
|
<vn-td shrink>
|
|
|
|
<vn-check
|
|
|
|
vn-one
|
|
|
|
ng-model="price.hasMinPrice">
|
|
|
|
</vn-check>
|
|
|
|
</vn-td>
|
2021-01-18 13:16:39 +00:00
|
|
|
<vn-td-editable number>
|
2022-03-15 14:18:27 +00:00
|
|
|
<text>{{price.minPrice | currency: 'EUR':2}}</text>
|
2021-01-18 13:16:39 +00:00
|
|
|
<field>
|
|
|
|
<vn-input-number
|
2022-03-15 14:18:27 +00:00
|
|
|
disabled="!price.hasMinPrice"
|
2021-01-18 13:16:39 +00:00
|
|
|
class="dense"
|
|
|
|
vn-focus
|
|
|
|
ng-model="price.minPrice"
|
2021-11-16 07:41:27 +00:00
|
|
|
on-change="$ctrl.upsertPrice(price)"
|
|
|
|
step="0.01">
|
2021-01-18 13:16:39 +00:00
|
|
|
</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"
|
2021-11-16 07:41:27 +00:00
|
|
|
ng-click="deleteFixedPrice.show({$index})">
|
2021-01-18 13:16:39 +00:00
|
|
|
</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>
|
2021-11-16 06:45:15 +00:00
|
|
|
<vn-pagination
|
|
|
|
model="model"
|
|
|
|
class="vn-pt-md">
|
|
|
|
</vn-pagination>
|
2021-01-18 13:16:39 +00:00
|
|
|
</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-11-16 07:41:27 +00:00
|
|
|
</vn-item-descriptor-popover>
|
|
|
|
<vn-confirm
|
|
|
|
vn-id="deleteFixedPrice"
|
|
|
|
on-accept="$ctrl.removePrice($data.$index)"
|
|
|
|
question="Are you sure you want to continue?"
|
|
|
|
message="This row will be removed">
|
|
|
|
</vn-confirm>
|