163 lines
7.4 KiB
HTML
163 lines
7.4 KiB
HTML
|
<mg-ajax path="dms/upload" options="vnPost"></mg-ajax>
|
||
|
<vn-watcher
|
||
|
vn-id="watcher"
|
||
|
data="$ctrl.dms">
|
||
|
</vn-watcher>
|
||
|
<form
|
||
|
name="form"
|
||
|
ng-submit="$ctrl.onSubmit()"
|
||
|
class="vn-ma-md">
|
||
|
<div class="vn-w-md">
|
||
|
<vn-card class="vn-pa-lg">
|
||
|
<!-- <vn-horizontal>
|
||
|
<vn-textfield
|
||
|
vn-one
|
||
|
vn-focus
|
||
|
label="Reference"
|
||
|
ng-model="$ctrl.dms.reference"
|
||
|
rule>
|
||
|
</vn-textfield>
|
||
|
<vn-autocomplete vn-one
|
||
|
label="Company"
|
||
|
ng-model="$ctrl.dms.companyId"
|
||
|
url="Companies"
|
||
|
show-field="code"
|
||
|
value-field="id">
|
||
|
</vn-autocomplete>
|
||
|
</vn-horizontal>
|
||
|
<vn-horizontal>
|
||
|
<vn-autocomplete vn-one
|
||
|
label="Warehouse"
|
||
|
ng-model="$ctrl.dms.warehouseId"
|
||
|
url="Warehouses"
|
||
|
show-field="name"
|
||
|
value-field="id">
|
||
|
</vn-autocomplete>
|
||
|
<vn-autocomplete vn-one
|
||
|
label="Type"
|
||
|
ng-model="$ctrl.dms.dmsTypeId"
|
||
|
url="DmsTypes"
|
||
|
show-field="name"
|
||
|
value-field="id">
|
||
|
</vn-autocomplete>
|
||
|
</vn-horizontal>
|
||
|
<vn-horizontal>
|
||
|
<vn-textarea
|
||
|
vn-one
|
||
|
label="Description"
|
||
|
ng-model="$ctrl.dms.description"
|
||
|
rule>
|
||
|
</vn-textarea>
|
||
|
</vn-horizontal> -->
|
||
|
<vn-horizontal>
|
||
|
<vn-textfield
|
||
|
vn-one
|
||
|
label="Invoice"
|
||
|
ng-model="$ctrl.import.invoice">
|
||
|
</vn-textfield>
|
||
|
</vn-horizontal>
|
||
|
<vn-horizontal>
|
||
|
<vn-textarea
|
||
|
vn-one
|
||
|
label="Notes"
|
||
|
ng-model="$ctrl.import.description">
|
||
|
</vn-textarea>
|
||
|
</vn-horizontal>
|
||
|
<vn-horizontal>
|
||
|
<vn-input-file
|
||
|
vn-one
|
||
|
label="File"
|
||
|
ng-model="$ctrl.import.file"
|
||
|
on-change="$ctrl.onFileChange($event)"
|
||
|
required="true"
|
||
|
multiple="true">
|
||
|
<append>
|
||
|
<vn-icon vn-none
|
||
|
color-marginal
|
||
|
title="{{$ctrl.contentTypesInfo}}"
|
||
|
icon="info">
|
||
|
</vn-icon>
|
||
|
</append>
|
||
|
</vn-input-file>
|
||
|
</vn-horizontal>
|
||
|
<vn-horizontal>
|
||
|
<table class="vn-table">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th translate center>Item ID</th>
|
||
|
<th translate expand>Description</th>
|
||
|
<th translate center>Size</th>
|
||
|
<th translate center>Quantity</th>
|
||
|
<th translate center>Stickers</th>
|
||
|
<th translate center>Packing</th>
|
||
|
<th translate center>Grouping</th>
|
||
|
<th translate center>Buying value</th>
|
||
|
<!-- <th translate center>Package</th>
|
||
|
<th translate center>Weight</th>
|
||
|
-->
|
||
|
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody ng-repeat="buy in $ctrl.import.buys">
|
||
|
<tr>
|
||
|
<td title="{{::buy.itemFk}}">
|
||
|
<vn-autocomplete
|
||
|
class="dense"
|
||
|
vn-focus
|
||
|
url="Items"
|
||
|
ng-model="buy.itemFk"
|
||
|
show-field="name"
|
||
|
value-field="id"
|
||
|
search-function="$ctrl.itemSearchFunc($search)"
|
||
|
order="id DESC"
|
||
|
tabindex="1">
|
||
|
<tpl-item>
|
||
|
{{::id}} - {{::name}}
|
||
|
</tpl-item>
|
||
|
</vn-autocomplete>
|
||
|
</td>
|
||
|
<td title="{{::buy.description}}" expand>{{::buy.description | dashIfEmpty}}</td>
|
||
|
<td center title="{{::buy.size}}">{{::buy.size | dashIfEmpty}}</td>
|
||
|
<td center title="{{::buy.quantity}}">{{::line.quantity}}</td>
|
||
|
<td center title="{{::buy.stickers | dashIfEmpty}}">{{::line.stickers | dashIfEmpty}}</td>
|
||
|
<td center>
|
||
|
<vn-chip translate-attr="line.groupingMode == 2 ? {title: 'Minimun amount'} : {title: 'Packing'}" ng-class="{'message': line.groupingMode == 2}">
|
||
|
<span translate>{{::buy.packing | dashIfEmpty}}</span>
|
||
|
</vn-chip>
|
||
|
</td>
|
||
|
<td center>
|
||
|
<vn-chip translate-attr="line.groupingMode == 1 ? {title: 'Minimun amount'} : {title: 'Grouping'}" ng-class="{'message': line.groupingMode == 1}">
|
||
|
<span translate>{{::buy.grouping | dashIfEmpty}}</span>
|
||
|
</vn-chip>
|
||
|
</vn-td>
|
||
|
<td>{{::buy.buyingValue | currency: 'EUR':2}}</td>
|
||
|
<!-- <td center title="{{::line.packageFk | dashIfEmpty}}">{{::line.packageFk | dashIfEmpty}}</td> -->
|
||
|
<!-- <td center title="{{::line.weight}}">{{::line.weight}}</td>
|
||
|
|
||
|
<td center>
|
||
|
<vn-chip translate-attr="line.groupingMode == 1 ? {title: 'Minimun amount'} : {title: 'Grouping'}" ng-class="{'message': line.groupingMode == 1}">
|
||
|
<span translate>{{::line.grouping | dashIfEmpty}}</span>
|
||
|
</vn-chip>
|
||
|
</vn-td>
|
||
|
<td center title="{{::line.buyingValue | currency: 'EUR':2}}">{{::line.buyingValue | currency: 'EUR':2}}</td>
|
||
|
<td center title="{{::line.quantity * line.buyingValue | currency: 'EUR':2}}">{{::line.quantity * line.buyingValue | currency: 'EUR':2}}</td>
|
||
|
<td center title="{{::line.price2 | currency: 'EUR':2}}">{{::line.price2 | currency: 'EUR':2}}</td>
|
||
|
<td center title="{{::line.price3 | currency: 'EUR':2}}">{{::line.price3 | currency: 'EUR':2}}</td> -->
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</vn-horizontal>
|
||
|
</vn-card>
|
||
|
<vn-button-bar>
|
||
|
<vn-submit
|
||
|
label="Upload">
|
||
|
</vn-submit>
|
||
|
<vn-button
|
||
|
class="cancel"
|
||
|
label="Cancel"
|
||
|
ui-sref="entry.card.buy.index"></vn-button>
|
||
|
</vn-button>
|
||
|
</vn-button-bar>
|
||
|
</div>
|
||
|
</form>
|