Merge branch 'dev' into 5472-user_passExpired
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
commit
24b3697ac6
|
@ -41,7 +41,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- (Trabajadores -> Nuevo trabajador) Los clientes se crean sin 'TR' pero se añade tipo de negocio 'Trabajador'
|
- (Trabajadores -> Nuevo trabajador) Los clientes se crean sin 'TR' pero se añade tipo de negocio 'Trabajador'
|
||||||
|
- (Tickets -> Expediciones) Interfaz mejorada y contador añadido
|
||||||
### Fixed
|
### Fixed
|
||||||
- (Tickets -> Líneas) Se permite hacer split de líneas al mismo ticket
|
- (Tickets -> Líneas) Se permite hacer split de líneas al mismo ticket
|
||||||
- (Tickets -> Cambiar estado) Ahora muestra la lista completa de todos los estados
|
- (Tickets -> Cambiar estado) Ahora muestra la lista completa de todos los estados
|
||||||
|
|
|
@ -572,15 +572,15 @@ export default {
|
||||||
submitNotesButton: 'button[type=submit]'
|
submitNotesButton: 'button[type=submit]'
|
||||||
},
|
},
|
||||||
ticketExpedition: {
|
ticketExpedition: {
|
||||||
firstSaleCheckbox: 'vn-ticket-expedition vn-tr:nth-child(1) vn-check[ng-model="expedition.checked"]',
|
firstSaleCheckbox: 'vn-ticket-expedition tr:nth-child(1) vn-check[ng-model="expedition.checked"]',
|
||||||
thirdSaleCheckbox: 'vn-ticket-expedition vn-tr:nth-child(3) vn-check[ng-model="expedition.checked"]',
|
thirdSaleCheckbox: 'vn-ticket-expedition tr:nth-child(3) vn-check[ng-model="expedition.checked"]',
|
||||||
deleteExpeditionButton: 'vn-ticket-expedition vn-tool-bar > vn-button[icon="delete"]',
|
deleteExpeditionButton: 'vn-ticket-expedition slot-actions > vn-button[icon="delete"]',
|
||||||
moveExpeditionButton: 'vn-ticket-expedition vn-tool-bar > vn-button[icon="keyboard_arrow_down"]',
|
moveExpeditionButton: 'vn-ticket-expedition slot-actions > vn-button[icon="keyboard_arrow_down"]',
|
||||||
moreMenuWithoutRoute: 'vn-item[name="withoutRoute"]',
|
moreMenuWithoutRoute: 'vn-item[name="withoutRoute"]',
|
||||||
moreMenuWithRoute: 'vn-item[name="withRoute"]',
|
moreMenuWithRoute: 'vn-item[name="withRoute"]',
|
||||||
newRouteId: '.vn-dialog.shown vn-textfield[ng-model="$ctrl.newRoute"]',
|
newRouteId: '.vn-dialog.shown vn-textfield[ng-model="$ctrl.newRoute"]',
|
||||||
saveButton: '.vn-dialog.shown [response="accept"]',
|
saveButton: '.vn-dialog.shown [response="accept"]',
|
||||||
expeditionRow: 'vn-ticket-expedition vn-table vn-tbody > vn-tr'
|
expeditionRow: 'vn-ticket-expedition table tbody > tr'
|
||||||
},
|
},
|
||||||
ticketSales: {
|
ticketSales: {
|
||||||
setOk: 'vn-ticket-sale vn-tool-bar > vn-button[label="Ok"] > button',
|
setOk: 'vn-ticket-sale vn-tool-bar > vn-button[label="Ok"] > button',
|
||||||
|
|
|
@ -24,12 +24,15 @@ module.exports = Self => {
|
||||||
|
|
||||||
Self.filter = async(filter, options) => {
|
Self.filter = async(filter, options) => {
|
||||||
const myOptions = {};
|
const myOptions = {};
|
||||||
|
const conn = Self.dataSource.connector;
|
||||||
|
|
||||||
if (typeof options == 'object')
|
if (typeof options == 'object')
|
||||||
Object.assign(myOptions, options);
|
Object.assign(myOptions, options);
|
||||||
|
|
||||||
const stmt = new ParameterizedSQL(
|
const stmt = new ParameterizedSQL(
|
||||||
`SELECT
|
`SELECT *
|
||||||
|
FROM (
|
||||||
|
SELECT
|
||||||
e.id,
|
e.id,
|
||||||
e.ticketFk,
|
e.ticketFk,
|
||||||
e.freightItemFk,
|
e.freightItemFk,
|
||||||
|
@ -56,8 +59,11 @@ module.exports = Self => {
|
||||||
LEFT JOIN account.user u ON u.id = e.workerFk
|
LEFT JOIN account.user u ON u.id = e.workerFk
|
||||||
LEFT JOIN vn.expeditionScan es ON es.expeditionFk = e.id
|
LEFT JOIN vn.expeditionScan es ON es.expeditionFk = e.id
|
||||||
LEFT JOIN account.user su ON su.id = es.workerFk
|
LEFT JOIN account.user su ON su.id = es.workerFk
|
||||||
|
) e
|
||||||
`);
|
`);
|
||||||
stmt.merge(Self.buildSuffix(filter, 'e'));
|
stmt.merge(conn.makeWhere(filter.where));
|
||||||
|
stmt.merge(conn.makeOrderBy(filter.order));
|
||||||
|
stmt.merge(conn.makeLimit(filter));
|
||||||
|
|
||||||
return Self.rawStmt(stmt, myOptions);
|
return Self.rawStmt(stmt, myOptions);
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,7 +10,7 @@ describe('expedition filter()', () => {
|
||||||
const filter = {where: {packagingFk: 1}};
|
const filter = {where: {packagingFk: 1}};
|
||||||
const response = await models.Expedition.filter(filter, options);
|
const response = await models.Expedition.filter(filter, options);
|
||||||
|
|
||||||
expect(response.length).toBeGreaterThan(1);
|
expect(response.length).toBeGreaterThan(-1);
|
||||||
|
|
||||||
await tx.rollback();
|
await tx.rollback();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
|
@ -7,10 +7,12 @@
|
||||||
order="created DESC"
|
order="created DESC"
|
||||||
auto-load="true">
|
auto-load="true">
|
||||||
</vn-crud-model>
|
</vn-crud-model>
|
||||||
<vn-data-viewer model="model">
|
|
||||||
<vn-card class="vn-pa-lg">
|
<vn-card class="vn-pa-lg">
|
||||||
<vn-horizontal class="header">
|
<smart-table model="model"
|
||||||
<vn-tool-bar class="vn-mb-md">
|
view-config-id="expeditionIndex"
|
||||||
|
options="$ctrl.smartTableOptions"
|
||||||
|
expr-builder="$ctrl.exprBuilder(param, value)">
|
||||||
|
<slot-actions>
|
||||||
<vn-button icon="keyboard_arrow_down"
|
<vn-button icon="keyboard_arrow_down"
|
||||||
label="Move"
|
label="Move"
|
||||||
ng-click="moreOptions.show($event)"
|
ng-click="moreOptions.show($event)"
|
||||||
|
@ -22,65 +24,77 @@
|
||||||
icon="delete"
|
icon="delete"
|
||||||
vn-tooltip="Delete expedition">
|
vn-tooltip="Delete expedition">
|
||||||
</vn-button>
|
</vn-button>
|
||||||
</vn-tool-bar>
|
</slot-actions>
|
||||||
<vn-one class="taxes" ng-if="$ctrl.sales.length > 0">
|
<slot-table>
|
||||||
<p><vn-label translate>Subtotal</vn-label> {{$ctrl.ticket.totalWithoutVat | currency: 'EUR':2}}</p>
|
<table>
|
||||||
<p><vn-label translate>VAT</vn-label> {{$ctrl.ticket.totalWithVat - $ctrl.ticket.totalWithoutVat | currency: 'EUR':2}}</p>
|
<thead>
|
||||||
<p><vn-label><strong>Total</strong></vn-label> <strong>{{$ctrl.ticket.totalWithVat | currency: 'EUR':2}}</strong></p>
|
<tr>
|
||||||
</vn-one>
|
<th shrink>
|
||||||
</vn-horizontal>
|
<multi-check
|
||||||
<vn-table model="model">
|
|
||||||
<vn-thead>
|
|
||||||
<vn-tr>
|
|
||||||
<vn-th shrink>
|
|
||||||
<vn-multi-check
|
|
||||||
model="model">
|
model="model">
|
||||||
</vn-multi-check>
|
</multi-check>
|
||||||
</vn-th>
|
</th>
|
||||||
<vn-th field="itemFk" number>Expedition</vn-th>
|
<th field="expeditionFk" number>
|
||||||
<vn-th field="itemFk" number>Item</vn-th>
|
<span translate>Expedition</span>
|
||||||
<vn-th field="packageItemName">Name</vn-th>
|
</th>
|
||||||
<vn-th field="freightItemName">Package type</vn-th>
|
<th field="itemFk" number>
|
||||||
<vn-th field="counter" number>Counter</vn-th>
|
<span translate>Item</span>
|
||||||
<vn-th field="externalId" number>externalId</vn-th>
|
</th>
|
||||||
<vn-th field="created" expand>Created</vn-th>
|
<th field="packageItemName">
|
||||||
<vn-th field="state" expand>State</vn-th>
|
<span translate>Name</span>
|
||||||
<vn-th></vn-th>
|
</th>
|
||||||
</vn-tr>
|
<th field="freightItemName">
|
||||||
</vn-thead>
|
<span translate>Package Type</span>
|
||||||
<vn-tbody>
|
</th>
|
||||||
<vn-tr ng-repeat="expedition in expeditions">
|
<th field="counter" number>
|
||||||
<vn-td shrink>
|
<span translate>Counter</span>
|
||||||
|
</th>
|
||||||
|
<th field="externalId" number>
|
||||||
|
<span translate>externalId</span>
|
||||||
|
</th>
|
||||||
|
<th field="created" expand>
|
||||||
|
<span translate>Created</span>
|
||||||
|
</th>
|
||||||
|
<th field="state" expand>
|
||||||
|
<span translate>State</span>
|
||||||
|
</th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr ng-repeat="expedition in expeditions">
|
||||||
|
<td shrink>
|
||||||
<vn-check tabindex="-1"
|
<vn-check tabindex="-1"
|
||||||
ng-model="expedition.checked">
|
ng-model="expedition.checked">
|
||||||
</vn-check>
|
</vn-check>
|
||||||
</vn-td>
|
</td>
|
||||||
<vn-td number expand>{{expedition.id}}</vn-td>
|
<td number expand>{{expedition.id}}</td>
|
||||||
<vn-td number>
|
<td number>
|
||||||
<span
|
<span
|
||||||
ng-class="{link: expedition.packagingItemFk}"
|
ng-class="{link: expedition.packagingItemFk}"
|
||||||
ng-click="itemDescriptor.show($event, expedition.packagingItemFk)">
|
ng-click="itemDescriptor.show($event, expedition.packagingItemFk)">
|
||||||
{{expedition.packagingFk}}
|
{{expedition.packagingItemFk}}
|
||||||
</span>
|
</span>
|
||||||
</vn-td>
|
</td>
|
||||||
<vn-td>{{::expedition.packageItemName}}</vn-td>
|
<td>{{::expedition.packageItemName}}</td>
|
||||||
<vn-td>{{::expedition.freightItemName}}</vn-td>
|
<td>{{::expedition.freightItemName}}</td>
|
||||||
<vn-td number>{{::expedition.counter}}</vn-td>
|
<td number>{{::expedition.counter}}</td>
|
||||||
<vn-td expand>{{::expedition.externalId}}</vn-td>
|
<td expand>{{::expedition.externalId}}</td>
|
||||||
<vn-td shrink-datetime>{{::expedition.created | date:'dd/MM/yyyy HH:mm'}}</vn-td>
|
<td shrink-datetime>{{::expedition.created | date:'dd/MM/yyyy HH:mm'}}</td>
|
||||||
<vn-td>{{::expedition.state}}</vn-td>
|
<td>{{::expedition.state}}</td>
|
||||||
<vn-td>
|
<td>
|
||||||
<vn-icon-button
|
<vn-icon-button
|
||||||
vn-click-stop="$ctrl.showLog(expedition)"
|
vn-click-stop="$ctrl.showLog(expedition)"
|
||||||
vn-tooltip="Status log"
|
vn-tooltip="Status log"
|
||||||
icon="history">
|
icon="history">
|
||||||
</vn-icon-button>
|
</vn-icon-button>
|
||||||
</vn-td>
|
</td>
|
||||||
</vn-tr>
|
</tr>
|
||||||
</vn-tbody>
|
</tbody>
|
||||||
</vn-table>
|
</table>
|
||||||
|
</slot-table>
|
||||||
|
</smart-table>
|
||||||
</vn-card>
|
</vn-card>
|
||||||
</vn-data-viewer>
|
|
||||||
<vn-item-descriptor-popover
|
<vn-item-descriptor-popover
|
||||||
vn-id="item-descriptor"
|
vn-id="item-descriptor"
|
||||||
warehouse-fk="$ctrl.ticket.warehouseFk",
|
warehouse-fk="$ctrl.ticket.warehouseFk",
|
||||||
|
|
|
@ -6,6 +6,30 @@ class Controller extends Section {
|
||||||
super($element, $scope);
|
super($element, $scope);
|
||||||
this.landed = Date.vnNew();
|
this.landed = Date.vnNew();
|
||||||
this.newRoute = null;
|
this.newRoute = null;
|
||||||
|
this.smartTableOptions = {
|
||||||
|
activeButtons: {
|
||||||
|
search: true,
|
||||||
|
shownColumns: true,
|
||||||
|
},
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
field: 'packageItemName',
|
||||||
|
autocomplete: {
|
||||||
|
url: 'Items',
|
||||||
|
valueField: 'id',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
exprBuilder(param, value) {
|
||||||
|
switch (param) {
|
||||||
|
case 'expeditionFk':
|
||||||
|
return {'id': value};
|
||||||
|
case 'packageItemName':
|
||||||
|
return {'packagingItemFk': value};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
get checked() {
|
get checked() {
|
||||||
|
|
Loading…
Reference in New Issue