2952-ticket.sale-checked #1246
|
@ -17,18 +17,15 @@
|
||||||
<vn-th field="itemFk" number>Item</vn-th>
|
<vn-th field="itemFk" number>Item</vn-th>
|
||||||
<vn-th field="concept">Description</vn-th>
|
<vn-th field="concept">Description</vn-th>
|
||||||
<vn-th field="quantity" number>Quantity</vn-th>
|
<vn-th field="quantity" number>Quantity</vn-th>
|
||||||
<vn-th></vn-th>
|
|
||||||
<vn-th></vn-th>
|
|
||||||
</vn-tr>
|
</vn-tr>
|
||||||
</vn-thead>
|
</vn-thead>
|
||||||
<vn-tbody>
|
<vn-tbody>
|
||||||
<vn-tr ng-repeat="sale in sales">
|
<vn-tr ng-repeat="sale in sales">
|
||||||
<vn-td center>
|
<vn-td center shrink>
|
||||||
<span class="chip {{::$ctrl.chipHasSaleGroupDetail(sale.id)}} vn-mx-xs chip2" vn-tooltip="has saleGroupDetail"></span>
|
<vn-check
|
||||||
<span class="chip {{::$ctrl.chipIsPreviousSelected()}} vn-ml-xs" vn-tooltip="is previousSelected"></span>
|
vn-one ng-model="sale.isChecked.isChecked"
|
||||||
<span class="chip {{::$ctrl.chipIsPrevious()}} vn-mr-xs" vn-tooltip="is previous"></span>
|
disabled="true">
|
||||||
<span class="chip {{::$ctrl.chipIsPrepared()}} vn-mx-xs" vn-tooltip="is prepared"></span>
|
</vn-check>
|
||||||
<span class="chip {{::$ctrl.chipIsControled()}} vn-mx-xs" vn-tooltip="is controled"></span>
|
|
||||||
</vn-td>
|
</vn-td>
|
||||||
<vn-td number>
|
<vn-td number>
|
||||||
<span
|
<span
|
||||||
|
@ -51,20 +48,6 @@
|
||||||
</vn-fetched-tags>
|
</vn-fetched-tags>
|
||||||
</vn-td>
|
</vn-td>
|
||||||
<vn-td number>{{::sale.quantity}}</vn-td>
|
<vn-td number>{{::sale.quantity}}</vn-td>
|
||||||
<vn-td center>
|
|
||||||
<vn-icon-button
|
|
||||||
vn-click-stop="$ctrl.showSaleTracking(sale)"
|
|
||||||
vn-tooltip="Sale tracking"
|
|
||||||
icon="history">
|
|
||||||
</vn-icon-button>
|
|
||||||
</vn-td>
|
|
||||||
<vn-td>
|
|
||||||
<vn-icon-button
|
|
||||||
vn-click-stop="$ctrl.showItemShelvingSale(sale)"
|
|
||||||
vn-tooltip="ItemShelvings sale"
|
|
||||||
icon="icon-inventory">
|
|
||||||
</vn-icon-button>
|
|
||||||
</vn-td>
|
|
||||||
</vn-tr>
|
</vn-tr>
|
||||||
</vn-tbody>
|
</vn-tbody>
|
||||||
</vn-table>
|
</vn-table>
|
||||||
|
@ -75,96 +58,3 @@
|
||||||
warehouse-fk="$ctrl.ticket.warehouseFk"
|
warehouse-fk="$ctrl.ticket.warehouseFk"
|
||||||
ticket-fk="$ctrl.ticket.id">
|
ticket-fk="$ctrl.ticket.id">
|
||||||
</vn-item-descriptor-popover>
|
</vn-item-descriptor-popover>
|
||||||
|
|
||||||
<vn-popup vn-id="saleTracking">
|
|
||||||
<vn-crud-model
|
|
||||||
vn-id="modelSaleTracking"
|
|
||||||
url="SaleTrackings/listSaleTracking"
|
|
||||||
link="{saleFk: $ctrl.saleId}"
|
|
||||||
limit="20"
|
|
||||||
data="sales"
|
|
||||||
order="itemFk DESC"
|
|
||||||
auto-load="true">
|
|
||||||
</vn-crud-model>
|
|
||||||
<vn-data-viewer model="modelSaleTracking">
|
|
||||||
<vn-card class="vn-w-lg">
|
|
||||||
<vn-table model="modelSaleTracking">
|
|
||||||
<vn-thead>
|
|
||||||
<vn-tr>
|
|
||||||
<vn-th field="quantity" number>Quantity</vn-th>
|
|
||||||
<vn-th field="originalQuantity" number>Original</vn-th>
|
|
||||||
<vn-th field="workerFk">Worker</vn-th>
|
|
||||||
<vn-th field="state" shrink>State</vn-th>
|
|
||||||
<vn-th field="created" expand>Created</vn-th>
|
|
||||||
</vn-tr>
|
|
||||||
</vn-thead>
|
|
||||||
<vn-tbody>
|
|
||||||
<vn-tr ng-repeat="sale in sales">
|
|
||||||
<vn-td number>{{::sale.quantity}}</vn-td>
|
|
||||||
<vn-td number>{{::sale.originalQuantity}}</vn-td>
|
|
||||||
<vn-td expand>
|
|
||||||
<span
|
|
||||||
class="link"
|
|
||||||
ng-click="workerDescriptor.show($event, sale.workerFk)">
|
|
||||||
{{::sale.userNickname | dashIfEmpty}}
|
|
||||||
</span>
|
|
||||||
</vn-td>
|
|
||||||
<vn-td shrink>{{::sale.state}}</vn-td>
|
|
||||||
<vn-td expand>{{::sale.created | date: 'dd/MM/yyyy HH:mm'}}</vn-td>
|
|
||||||
</vn-tr>
|
|
||||||
</vn-tbody>
|
|
||||||
</vn-table>
|
|
||||||
</vn-card>
|
|
||||||
</vn-data-viewer>
|
|
||||||
<vn-item-descriptor-popover
|
|
||||||
vn-id="item-descriptor"
|
|
||||||
warehouse-fk="$ctrl.ticket.warehouseFk">
|
|
||||||
</vn-item-descriptor-popover>
|
|
||||||
<vn-worker-descriptor-popover
|
|
||||||
vn-id="worker-descriptor">
|
|
||||||
</vn-worker-descriptor-popover>
|
|
||||||
</vn-popup>
|
|
||||||
|
|
||||||
<vn-popup vn-id="itemShelvingSale">
|
|
||||||
<vn-crud-model
|
|
||||||
vn-id="modelSaleTracking"
|
|
||||||
url="ItemShelvingSales/filter"
|
|
||||||
link="{saleFk: $ctrl.saleId}"
|
|
||||||
limit="20"
|
|
||||||
data="$ctrl.itemShelvingSales"
|
|
||||||
auto-load="true">
|
|
||||||
</vn-crud-model>
|
|
||||||
<vn-data-viewer model="modelSaleTracking">
|
|
||||||
<vn-card class="vn-w-lg">
|
|
||||||
<vn-table model="modelSaleTracking">
|
|
||||||
<vn-thead>
|
|
||||||
<vn-tr>
|
|
||||||
<vn-th field="quantity" number>Quantity</vn-th>
|
|
||||||
<vn-th field="workerFk">Worker</vn-th>
|
|
||||||
<vn-th field="shelving" shrink>Shelving</vn-th>
|
|
||||||
<vn-th field="parking" shrink>Parking</vn-th>
|
|
||||||
<vn-th field="created" expand>Created</vn-th>
|
|
||||||
</vn-tr>
|
|
||||||
</vn-thead>
|
|
||||||
<vn-tbody>
|
|
||||||
<vn-tr ng-repeat="itemShelvingSale in $ctrl.itemShelvingSales">
|
|
||||||
<vn-td number>{{::itemShelvingSale.quantity}}</vn-td>
|
|
||||||
<vn-td expand>
|
|
||||||
<span
|
|
||||||
class="link"
|
|
||||||
ng-click="workerDescriptor.show($event, itemShelvingSale.userFk)">
|
|
||||||
{{::itemShelvingSale.name | dashIfEmpty}}
|
|
||||||
</span>
|
|
||||||
</vn-td>
|
|
||||||
<vn-td shrink>{{::itemShelvingSale.shelvingFk}}</vn-td>
|
|
||||||
<vn-td shrink>{{::itemShelvingSale.code}}</vn-td>
|
|
||||||
<vn-td expand>{{::itemShelvingSale.created | date: 'dd/MM/yyyy HH:mm'}}</vn-td>
|
|
||||||
</vn-tr>
|
|
||||||
</vn-tbody>
|
|
||||||
</vn-table>
|
|
||||||
</vn-card>
|
|
||||||
</vn-data-viewer>
|
|
||||||
<vn-worker-descriptor-popover
|
|
||||||
vn-id="worker-descriptor">
|
|
||||||
</vn-worker-descriptor-popover>
|
|
||||||
</vn-popup>
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import ngModule from '../module';
|
import ngModule from '../module';
|
||||||
import Section from 'salix/components/section';
|
import Section from 'salix/components/section';
|
||||||
import './style.scss';
|
|
||||||
|
|
||||||
class Controller extends Section {
|
class Controller extends Section {
|
||||||
constructor($element, $) {
|
constructor($element, $) {
|
||||||
|
@ -18,15 +17,6 @@ class Controller extends Section {
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
$onInit() {
|
|
||||||
const query = `Sales/${this.$params.id}/salePreparingList`;
|
|
||||||
this.$http.get(query)
|
|
||||||
.then(res => {
|
|
||||||
this.salePreparingList = res.data;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
showItemDescriptor(event, sale) {
|
showItemDescriptor(event, sale) {
|
||||||
this.quicklinks = {
|
this.quicklinks = {
|
||||||
btnThree: {
|
btnThree: {
|
||||||
|
@ -41,44 +31,6 @@ class Controller extends Section {
|
||||||
};
|
};
|
||||||
this.$.itemDescriptor.show(event.target, sale.itemFk);
|
this.$.itemDescriptor.show(event.target, sale.itemFk);
|
||||||
}
|
}
|
||||||
|
|
||||||
chipHasSaleGroupDetail(saleId) {
|
|
||||||
this.salePreparing = this.salePreparingList.find(element => element.saleFk == saleId);
|
|
||||||
if (this.salePreparing.hasSaleGroupDetail) return 'pink';
|
|
||||||
else return 'message';
|
|
||||||
}
|
|
||||||
|
|
||||||
chipIsPreviousSelected() {
|
|
||||||
if (this.salePreparing.isPreviousSelected) return 'notice';
|
|
||||||
else return 'message';
|
|
||||||
}
|
|
||||||
|
|
||||||
chipIsPrevious() {
|
|
||||||
if (this.salePreparing.isPrevious) return 'dark-notice';
|
|
||||||
else return 'message';
|
|
||||||
}
|
|
||||||
|
|
||||||
chipIsPrepared() {
|
|
||||||
if (this.salePreparing.isPrepared) return 'warning';
|
|
||||||
else return 'message';
|
|
||||||
}
|
|
||||||
|
|
||||||
chipIsControled() {
|
|
||||||
if (this.salePreparing.isControled) return 'yellow';
|
|
||||||
else return 'message';
|
|
||||||
}
|
|
||||||
|
|
||||||
showSaleTracking(sale) {
|
|
||||||
this.saleId = sale.id;
|
|
||||||
this.$.saleTracking.show();
|
|
||||||
}
|
|
||||||
|
|
||||||
showItemShelvingSale(sale) {
|
|
||||||
this.saleId = sale.id;
|
|
||||||
this.$.itemShelvingSale.show();
|
|
||||||
|
|
||||||
console.log(this.itemShelvingSales);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngModule.vnComponent('vnTicketSaleChecked', {
|
ngModule.vnComponent('vnTicketSaleChecked', {
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
ItemShelvings sale: Carros línea
|
|
|
@ -1,7 +0,0 @@
|
||||||
@import "variables";
|
|
||||||
|
|
||||||
.chip {
|
|
||||||
display: inline-block;
|
|
||||||
min-width: 10px;
|
|
||||||
min-height: 20px;
|
|
||||||
}
|
|
Loading…
Reference in New Issue