2018-08-30 06:50:03 +00:00
|
|
|
<vn-crud-model
|
|
|
|
vn-id="model"
|
2019-10-24 22:53:53 +00:00
|
|
|
url="ItemNiches"
|
2018-08-30 06:50:03 +00:00
|
|
|
fields="['id', 'itemFk', 'warehouseFk', 'code']"
|
2020-03-17 13:43:46 +00:00
|
|
|
link="{itemFk: $ctrl.$params.id}"
|
2018-12-19 14:59:35 +00:00
|
|
|
data="niches"
|
|
|
|
auto-load="true">
|
2018-08-30 06:50:03 +00:00
|
|
|
</vn-crud-model>
|
2018-04-04 17:59:03 +00:00
|
|
|
<vn-watcher
|
|
|
|
vn-id="watcher"
|
2018-08-30 06:50:03 +00:00
|
|
|
data="niches"
|
2018-04-04 17:59:03 +00:00
|
|
|
form="form">
|
|
|
|
</vn-watcher>
|
2020-09-17 18:12:52 +00:00
|
|
|
<vn-crud-model
|
|
|
|
auto-load="true"
|
|
|
|
url="Warehouses"
|
2020-09-21 09:17:40 +00:00
|
|
|
data="warehouses"
|
2020-09-17 18:12:52 +00:00
|
|
|
order="name"
|
|
|
|
vn-id="warehouse-model">
|
|
|
|
</vn-crud-model>
|
2019-11-10 10:08:44 +00:00
|
|
|
<form name="form" ng-submit="$ctrl.onSubmit()" class="vn-w-md">
|
2019-10-04 22:16:57 +00:00
|
|
|
<vn-card class="vn-pa-lg">
|
2018-08-30 06:50:03 +00:00
|
|
|
<vn-horizontal ng-repeat="niche in niches track by $index">
|
2020-09-17 18:12:52 +00:00
|
|
|
<vn-autocomplete vn-one vn-focus
|
2020-09-21 09:17:40 +00:00
|
|
|
data="warehouses"
|
2020-09-17 18:12:52 +00:00
|
|
|
label="Warehouse"
|
2018-04-04 17:59:03 +00:00
|
|
|
show-field="name"
|
|
|
|
value-field="id"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="niche.warehouseFk"
|
2020-09-17 18:12:52 +00:00
|
|
|
vn-acl="buyer,replenisher">
|
2018-04-04 17:59:03 +00:00
|
|
|
</vn-autocomplete>
|
|
|
|
<vn-textfield
|
2018-04-05 07:06:35 +00:00
|
|
|
vn-three
|
2018-04-04 17:59:03 +00:00
|
|
|
label="Code"
|
2019-10-09 22:47:29 +00:00
|
|
|
ng-model="niche.code"
|
2019-10-11 15:38:04 +00:00
|
|
|
rule="ItemNiche"
|
2018-04-04 17:59:03 +00:00
|
|
|
vn-acl="buyer,replenisher">
|
|
|
|
</vn-textfield>
|
2018-08-30 06:50:03 +00:00
|
|
|
<vn-none>
|
2019-02-21 10:40:27 +00:00
|
|
|
<vn-icon-button
|
2018-08-30 06:50:03 +00:00
|
|
|
vn-acl="buyer,replenisher"
|
|
|
|
pointer
|
|
|
|
vn-tooltip="Remove niche"
|
2018-12-11 07:50:54 +00:00
|
|
|
icon="delete"
|
2018-08-30 06:50:03 +00:00
|
|
|
ng-click="model.remove($index)">
|
2019-02-21 10:40:27 +00:00
|
|
|
</vn-icon-button>
|
2018-08-30 06:50:03 +00:00
|
|
|
</vn-none>
|
2018-04-04 17:59:03 +00:00
|
|
|
</vn-horizontal>
|
2018-04-05 07:06:35 +00:00
|
|
|
<vn-one>
|
2018-04-19 12:46:06 +00:00
|
|
|
<vn-icon-button
|
2018-04-05 07:06:35 +00:00
|
|
|
vn-acl="buyer, replenisher"
|
2018-04-19 12:46:06 +00:00
|
|
|
vn-tooltip="Add niche"
|
2018-04-23 09:17:30 +00:00
|
|
|
vn-bind="+"
|
2018-05-22 09:44:24 +00:00
|
|
|
icon="add_circle"
|
2018-08-30 06:50:03 +00:00
|
|
|
ng-click="model.insert()">
|
2018-04-19 12:46:06 +00:00
|
|
|
</vn-icon-button>
|
2018-04-05 07:06:35 +00:00
|
|
|
</vn-one>
|
2018-04-04 17:59:03 +00:00
|
|
|
</vn-card>
|
|
|
|
<vn-button-bar>
|
2020-12-13 12:54:17 +00:00
|
|
|
<vn-submit
|
2020-12-15 15:07:34 +00:00
|
|
|
disabled="!watcher.dataChanged()"
|
2020-12-13 12:54:17 +00:00
|
|
|
label="Save">
|
|
|
|
</vn-submit>
|
2020-12-15 15:07:34 +00:00
|
|
|
<!-- # #2680 Undo changes button bugs -->
|
|
|
|
<!-- <vn-button
|
|
|
|
class="cancel"
|
|
|
|
label="Undo changes"
|
|
|
|
disabled="!watcher.dataChanged()"
|
|
|
|
ng-click="watcher.loadOriginalData()">
|
|
|
|
</vn-button> -->
|
2018-04-04 17:59:03 +00:00
|
|
|
</vn-button-bar>
|
|
|
|
</form>
|