feat: add itemShelvingSale popup
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
10a6c280a0
commit
16c20e4700
|
@ -0,0 +1,2 @@
|
|||
INSERT INTO `salix`.`ACL` (`model`,`property`,`accessType`,`permission`,`principalId`)
|
||||
VALUES ('ItemShelvingSale','*','*','ALLOW','employee');
|
|
@ -1143,10 +1143,10 @@ INSERT INTO `vn`.`itemShelving` (`itemFk`, `shelvingFk`, `visible`, `grouping`,
|
|||
|
||||
INSERT INTO `vn`.`itemShelvingSale` (`itemShelvingFk`, `saleFk`, `quantity`, `created`, `userFk`)
|
||||
VALUES
|
||||
('1', '1', '1', '', '1106'),
|
||||
('2', '2', '5', '', '1106'),
|
||||
('1', '7', '1', '', '1106'),
|
||||
('2', '8', '5', '', '1106');
|
||||
('1', '1', '1', util.VN_CURDATE(), '1106'),
|
||||
('2', '2', '5', util.VN_CURDATE(), '1106'),
|
||||
('1', '7', '1', util.VN_CURDATE(), '1106'),
|
||||
('2', '8', '5', util.VN_CURDATE(), '1106');
|
||||
|
||||
INSERT INTO `vncontrol`.`accion`(`accion_id`, `accion`)
|
||||
VALUES
|
||||
|
|
|
@ -41,6 +41,11 @@
|
|||
"type": "belongsTo",
|
||||
"model": "Account",
|
||||
"foreignKey": "userFk"
|
||||
},
|
||||
"shelving": {
|
||||
"type": "belongsTo",
|
||||
"model": "Shelving",
|
||||
"foreignKey": "shelvingFk"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,14 +54,14 @@
|
|||
<vn-td center>
|
||||
<vn-icon-button
|
||||
vn-click-stop="$ctrl.showSaleTracking(sale)"
|
||||
vn-tooltip="Status log"
|
||||
vn-tooltip="Sale tracking"
|
||||
icon="history">
|
||||
</vn-icon-button>
|
||||
</vn-td>
|
||||
<vn-td>
|
||||
<vn-icon-button
|
||||
vn-click-stop="$ctrl.showLog(expedition)"
|
||||
vn-tooltip="Status log"
|
||||
vn-click-stop="$ctrl.showItemShelvingSale(sale)"
|
||||
vn-tooltip="ItemShelvings sale"
|
||||
icon="icon-inventory">
|
||||
</vn-icon-button>
|
||||
</vn-td>
|
||||
|
@ -124,3 +124,46 @@
|
|||
vn-id="worker-descriptor">
|
||||
</vn-worker-descriptor-popover>
|
||||
</vn-popup>
|
||||
|
||||
<vn-popup vn-id="itemShelvingSale">
|
||||
<vn-crud-model
|
||||
vn-id="modelSaleTracking"
|
||||
url="ItemShelvingSales"
|
||||
filter="::$ctrl.filterItemShelvingSale"
|
||||
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" number>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 number>{{::itemShelvingSale.userFk}}</vn-td>
|
||||
<vn-td shrink>{{::itemShelvingSale.itemShelving.shelvingFk}}</vn-td>
|
||||
<vn-td shrink>{{::itemShelvingSale.state}}</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-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>
|
||||
|
|
|
@ -17,6 +17,27 @@ class Controller extends Section {
|
|||
}
|
||||
]
|
||||
};
|
||||
|
||||
this.filterItemShelvingSale = {
|
||||
include: {
|
||||
relation: 'itemShelving',
|
||||
scope: {
|
||||
fields: ['shelvingFk'],
|
||||
include: {
|
||||
relation: 'shelving',
|
||||
scope: {
|
||||
fields: ['parkingFk'],
|
||||
include: {
|
||||
relation: 'parking',
|
||||
scope: {
|
||||
fields: ['id', 'code']
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
$onInit() {
|
||||
|
@ -72,6 +93,13 @@ class Controller extends Section {
|
|||
this.saleId = sale.id;
|
||||
this.$.saleTracking.show();
|
||||
}
|
||||
|
||||
showItemShelvingSale(sale) {
|
||||
this.saleId = sale.id;
|
||||
this.$.itemShelvingSale.show();
|
||||
|
||||
console.log(this.itemShelvingSales);
|
||||
}
|
||||
}
|
||||
|
||||
ngModule.vnComponent('vnTicketSaleChecked', {
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
ItemShelvings sale: Carros línea
|
Loading…
Reference in New Issue