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"
|
2022-03-16 13:58:07 +00:00
|
|
|
order="itemFk"
|
|
|
|
auto-load="false">
|
2021-01-18 13:16:39 +00:00
|
|
|
</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
|
|
|
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>
|
2022-03-16 13:58:07 +00:00
|
|
|
<smart-table
|
2021-11-16 06:45:15 +00:00
|
|
|
model="model"
|
2022-03-16 13:58:07 +00:00
|
|
|
options="$ctrl.smartTableOptions"
|
|
|
|
expr-builder="$ctrl.exprBuilder(param, value)">
|
|
|
|
<slot-table>
|
|
|
|
<table>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th field="itemFk">
|
|
|
|
<span translate>Item ID</span>
|
|
|
|
</th>
|
|
|
|
<th field="itemFk">
|
|
|
|
<span translate>Description</span>
|
|
|
|
</th>
|
|
|
|
<th field="warehouseFk">
|
|
|
|
<span translate>Warehouse</span>
|
|
|
|
</th>
|
|
|
|
<th
|
|
|
|
field="rate2"
|
|
|
|
vn-tooltip="Price By Unit">
|
|
|
|
<span translate>P.P.U.</span>
|
|
|
|
</th>
|
|
|
|
<th
|
|
|
|
field="rate3"
|
|
|
|
vn-tooltip="Price By Package">
|
|
|
|
<span translate>P.P.P.</span>
|
|
|
|
</th>
|
|
|
|
<th field="minPrice">
|
|
|
|
<span translate>Min price</span>
|
|
|
|
</th>
|
|
|
|
<th field="started">
|
|
|
|
<span translate>Started</span>
|
|
|
|
</th>
|
|
|
|
<th field="ended">
|
|
|
|
<span translate>Ended</span>
|
|
|
|
</th>
|
|
|
|
<th shrink></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr ng-repeat="price in prices">
|
|
|
|
<td>
|
|
|
|
<vn-autocomplete
|
|
|
|
vn-focus
|
|
|
|
class="dense"
|
|
|
|
url="Items/withName"
|
|
|
|
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}}
|
|
|
|
</tpl-item>
|
|
|
|
</vn-autocomplete>
|
|
|
|
</td>
|
|
|
|
<td vn-fetched-tags>
|
|
|
|
<div>
|
|
|
|
<span
|
|
|
|
vn-one
|
|
|
|
ng-if="price.itemFk"
|
|
|
|
ng-click="itemDescriptor.show($event, price.itemFk)"
|
|
|
|
class="link">
|
|
|
|
{{price.name}}
|
|
|
|
</span>
|
|
|
|
<vn-one ng-if="price.subName">
|
|
|
|
<h3 title="{{price.subName}}">{{price.subName}}</h3>
|
|
|
|
</vn-one>
|
|
|
|
</div>
|
|
|
|
<vn-fetched-tags
|
|
|
|
max-length="6"
|
|
|
|
item="price"
|
|
|
|
tabindex="-1">
|
|
|
|
</vn-fetched-tags>
|
|
|
|
</td>
|
|
|
|
<td mid>
|
|
|
|
<vn-autocomplete
|
|
|
|
vn-one
|
|
|
|
label="Warehouse"
|
|
|
|
ng-model="price.warehouseFk"
|
|
|
|
data="warehouses"
|
|
|
|
on-change="$ctrl.upsertPrice(price)"
|
|
|
|
tabindex="2">
|
|
|
|
</vn-autocomplete>
|
|
|
|
</td>
|
|
|
|
<td mid>
|
|
|
|
<span>
|
|
|
|
<vn-input-number
|
|
|
|
ng-model="price.rate2"
|
|
|
|
on-change="$ctrl.upsertPrice(price)">
|
|
|
|
</vn-input-number>
|
|
|
|
</span>
|
|
|
|
</td>
|
|
|
|
<td mid>
|
|
|
|
<vn-input-number
|
|
|
|
ng-model="price.rate3"
|
|
|
|
on-change="$ctrl.upsertPrice(price)">
|
|
|
|
</vn-input-number>
|
|
|
|
</td>
|
|
|
|
<td shrink-date>
|
|
|
|
<vn-check
|
|
|
|
vn-one
|
|
|
|
ng-model="price.hasMinPrice">
|
|
|
|
</vn-check>
|
|
|
|
<vn-input-number
|
|
|
|
disabled="!price.hasMinPrice"
|
|
|
|
ng-model="price.minPrice"
|
|
|
|
on-change="$ctrl.upsertPrice(price)"
|
|
|
|
step="0.01">
|
|
|
|
</vn-input-number>
|
|
|
|
</td>
|
|
|
|
<td shrink-date>
|
|
|
|
<vn-date-picker
|
|
|
|
vn-one
|
|
|
|
label="Started"
|
|
|
|
ng-model="price.started"
|
|
|
|
on-change="$ctrl.upsertPrice(price)">
|
|
|
|
</vn-date-picker>
|
|
|
|
</td>
|
|
|
|
<td shrink-date>
|
|
|
|
<vn-date-picker
|
|
|
|
vn-one
|
|
|
|
label="Ended"
|
|
|
|
ng-model="price.ended"
|
|
|
|
on-change="$ctrl.upsertPrice(price)">
|
|
|
|
</vn-date-picker>
|
|
|
|
</td>
|
|
|
|
<td shrink>
|
|
|
|
<vn-icon-button
|
|
|
|
icon="delete"
|
|
|
|
vn-tooltip="Delete"
|
|
|
|
ng-click="deleteFixedPrice.show({$index})">
|
|
|
|
</vn-icon-button>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<div class="vn-pa-md">
|
|
|
|
<vn-icon-button
|
|
|
|
vn-tooltip="Add fixed price"
|
|
|
|
icon="add_circle"
|
|
|
|
vn-bind="+"
|
|
|
|
ng-click="$ctrl.add()">
|
|
|
|
</vn-icon-button>
|
|
|
|
</div>
|
|
|
|
<vn-pagination
|
|
|
|
model="model"
|
|
|
|
class="vn-pt-md"
|
|
|
|
scroll-selector="vn-item-price-fixed vn-table"
|
|
|
|
scroll-offset="100">
|
|
|
|
</vn-pagination>
|
|
|
|
</slot-table>
|
|
|
|
</smart-table>
|
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>
|