123 lines
4.1 KiB
HTML
123 lines
4.1 KiB
HTML
|
<div class="vn-w-md">
|
||
|
<vn-data-viewer
|
||
|
data="data"
|
||
|
class="vn-w-md vn-mb-xl">
|
||
|
<vn-card>
|
||
|
<vn-table>
|
||
|
<vn-thead>
|
||
|
<vn-tr>
|
||
|
<vn-th field="id">Id</vn-th>
|
||
|
<vn-th field="name">Status</vn-th>
|
||
|
</vn-tr>
|
||
|
</vn-thead>
|
||
|
<vn-tbody>
|
||
|
<vn-tr
|
||
|
ng-repeat="client in data track by client.id">
|
||
|
<vn-td>
|
||
|
<span
|
||
|
vn-click-stop="clientDescriptor.show($event, client.id)"
|
||
|
class="link">
|
||
|
{{::client.id}}
|
||
|
</span>
|
||
|
</vn-td>
|
||
|
<vn-td>
|
||
|
<vn-spinner
|
||
|
ng-if="client.status == 'waiting'"
|
||
|
enable="true">
|
||
|
</vn-spinner>
|
||
|
<vn-icon
|
||
|
ng-if="client.status == 'ok'"
|
||
|
icon="check">
|
||
|
</vn-icon>
|
||
|
<vn-icon
|
||
|
class="error"
|
||
|
ng-if="client.status == 'error'"
|
||
|
icon="error">
|
||
|
</vn-icon>
|
||
|
</vn-td>
|
||
|
</vn-tr>
|
||
|
</vn-tbody>
|
||
|
</vn-table>
|
||
|
</vn-card>
|
||
|
</vn-data-viewer>
|
||
|
</div>
|
||
|
|
||
|
<vn-side-menu side="right">
|
||
|
<vn-crud-model
|
||
|
auto-load="true"
|
||
|
url="InvoiceOutSerials"
|
||
|
data="invoiceOutSerials"
|
||
|
order="code">
|
||
|
</vn-crud-model>
|
||
|
<vn-crud-model
|
||
|
auto-load="true"
|
||
|
url="Companies"
|
||
|
data="companies"
|
||
|
order="code">
|
||
|
</vn-crud-model>
|
||
|
<form class="vn-pa-md">
|
||
|
<vn-vertical>
|
||
|
<vn-date-picker
|
||
|
vn-one
|
||
|
label="Invoice date"
|
||
|
ng-model="$ctrl.invoice.invoiceDate">
|
||
|
</vn-date-picker>
|
||
|
<vn-date-picker
|
||
|
vn-one
|
||
|
label="Max date"
|
||
|
ng-model="$ctrl.invoice.maxShipped">
|
||
|
</vn-date-picker>
|
||
|
</vn-vertical>
|
||
|
<vn-horizontal>
|
||
|
<vn-radio
|
||
|
label="All clients"
|
||
|
val="allClients"
|
||
|
ng-model="$ctrl.clientsNumber"
|
||
|
ng-click="$ctrl.$onInit()">
|
||
|
</vn-radio>
|
||
|
<vn-radio
|
||
|
label="Clients range"
|
||
|
val="clientsRange"
|
||
|
ng-model="$ctrl.clientsNumber">
|
||
|
</vn-radio>
|
||
|
</vn-horizontal>
|
||
|
<vn-vertical ng-show="$ctrl.clientsNumber == 'clientsRange'">
|
||
|
<vn-autocomplete
|
||
|
url="Clients"
|
||
|
label="From client"
|
||
|
search-function="{or: [{id: $search}, {name: {like: '%'+$search+'%'}}]}"
|
||
|
order="id"
|
||
|
show-field="name"
|
||
|
value-field="id"
|
||
|
ng-model="$ctrl.invoice.fromClientId">
|
||
|
<tpl-item>{{::id}} - {{::name}}</tpl-item>
|
||
|
</vn-autocomplete>
|
||
|
<vn-autocomplete
|
||
|
url="Clients"
|
||
|
label="To client"
|
||
|
search-function="{or: [{id: $search}, {name: {like: '%'+$search+'%'}}]}"
|
||
|
order="id"
|
||
|
show-field="name"
|
||
|
value-field="id"
|
||
|
ng-model="$ctrl.invoice.toClientId">
|
||
|
<tpl-item>{{::id}} - {{::name}}</tpl-item>
|
||
|
</vn-autocomplete>
|
||
|
</vn-vertical>
|
||
|
<vn-horizontal>
|
||
|
<vn-autocomplete
|
||
|
url="Companies"
|
||
|
label="Company"
|
||
|
show-field="code"
|
||
|
value-field="id"
|
||
|
ng-model="$ctrl.invoice.companyFk">
|
||
|
</vn-autocomplete>
|
||
|
</vn-horizontal>
|
||
|
<vn-submit vn-id="invoiceButton" ng-click="$ctrl.makeInvoice()" label="Invoice" class="vn-mt-sm" ></vn-submit>
|
||
|
<vn-button ng-click="$ctrl.clean()" label="Clean" class="vn-mt-sm"></vn-button>
|
||
|
</form>
|
||
|
</vn-side-menu>
|
||
|
|
||
|
<vn-client-descriptor-popover
|
||
|
vn-id="clientDescriptor">
|
||
|
</vn-client-descriptor-popover>
|