salix/modules/entry/front/basic-data/index.html

124 lines
3.9 KiB
HTML
Raw Normal View History

2020-10-13 06:42:13 +00:00
<mg-ajax path="Entries/{{patch.params.id}}" options="vnPatch"></mg-ajax>
<vn-watcher
vn-id="watcher"
data="$ctrl.entry"
2020-10-13 06:42:13 +00:00
form="form"
save="patch">
</vn-watcher>
<form name="form" ng-submit="watcher.submit()" class="vn-w-md">
<vn-card class="vn-pa-lg">
<vn-horizontal>
<vn-autocomplete
vn-one
ng-model="$ctrl.entry.supplierFk"
url="Suppliers"
show-field="nickname"
search-function="{or: [{id: $search}, {nickname: {like: '%'+ $search +'%'}}]}"
value-field="id"
order="nickname"
label="Supplier"
required="true">
<tpl-item>
{{::id}} - {{::nickname}}
</tpl-item>
</vn-autocomplete>
<vn-autocomplete
vn-one
ng-model="$ctrl.entry.travelFk"
url="Travels/filter"
search-function="$ctrl.searchFunction($search)"
value-field="id"
order="id"
label="Travel"
required="true">
<tpl-item>
{{::agencyModeName}} - {{::warehouseInName}} ({{::shipped | date: 'dd/MM/yyyy'}}) &#x2192;
{{::warehouseOutName}} ({{::landed | date: 'dd/MM/yyyy'}})
</tpl-item>
</vn-autocomplete>
</vn-horizontal>
2020-10-05 07:24:49 +00:00
<vn-horizontal>
<vn-textfield
vn-one
label="Reference"
ng-model="$ctrl.entry.ref"
rule
vn-focus>
</vn-textfield>
<vn-textfield
vn-one
label="Notes"
ng-model="$ctrl.entry.notes"
rule
vn-focus>
</vn-textfield>
</vn-horizontal>
<vn-horizontal>
<vn-textarea
vn-one
label="Observation"
ng-model="$ctrl.entry.observation"
rule>
</vn-textarea>
</vn-horizontal>
<vn-horizontal>
<vn-autocomplete
vn-one
label="Currency"
ng-model="$ctrl.entry.currencyFk"
url="Currencies"
show-field="code"
value-field="id">
</vn-autocomplete>
<vn-input-number
vn-one
min="0"
step="0.1"
label="Commission"
ng-model="$ctrl.entry.commission"
rule>
</vn-input-number>
<vn-autocomplete
url="Companies"
label="Company"
show-field="code"
value-field="id"
ng-model="$ctrl.entry.companyFk">
</vn-autocomplete>
</vn-horizontal>
<vn-horizontal>
<vn-check
label="Ordered"
ng-model="$ctrl.entry.isOrdered">
</vn-check>
<vn-check
label="Confirmed"
ng-model="$ctrl.entry.isConfirmed">
</vn-check>
<vn-check
label="Inventory"
ng-model="$ctrl.entry.isInventory">
</vn-check>
<vn-check
label="Raid"
ng-model="$ctrl.entry.isRaid">
</vn-check>
<vn-check
label="Booked"
ng-model="$ctrl.entry.isBooked">
</vn-check>
</vn-horizontal>
</vn-card>
<vn-button-bar>
2020-12-14 16:35:32 +00:00
<vn-submit
2020-12-15 15:53:56 +00:00
disabled="!watcher.dataChanged()"
2020-12-14 16:35:32 +00:00
label="Save">
</vn-submit>
<vn-button
2020-12-15 15:53:56 +00:00
class="cancel"
2020-12-14 16:35:32 +00:00
label="Undo changes"
2020-12-15 15:53:56 +00:00
disabled="!watcher.dataChanged()"
2020-12-14 16:35:32 +00:00
ng-click="watcher.loadOriginalData()">
</vn-button>
</vn-button-bar>
</form>