fixed ticket list pagination
This commit is contained in:
parent
bc2554e6f9
commit
8879005854
|
@ -6,53 +6,7 @@ export default class Controller {
|
|||
this.ticketSelected = null;
|
||||
|
||||
this.filter = {
|
||||
include: [
|
||||
{
|
||||
relation: 'address',
|
||||
scope: {
|
||||
fields: ['provinceFk'],
|
||||
include: {
|
||||
relation: 'province',
|
||||
scope: {
|
||||
fields: ['name']
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
relation: 'warehouse',
|
||||
scope: {
|
||||
fields: ['name']
|
||||
}
|
||||
}, {
|
||||
relation: 'agencyMode',
|
||||
scope: {
|
||||
fields: ['name']
|
||||
}
|
||||
}, {
|
||||
relation: 'tracking',
|
||||
scope: {
|
||||
fields: ['stateFk'],
|
||||
include: {
|
||||
relation: 'state',
|
||||
scope: {
|
||||
fields: ['name']
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
relation: 'client',
|
||||
scope: {
|
||||
fields: ['salesPersonFk'],
|
||||
include: {
|
||||
relation: 'salesPerson',
|
||||
scope: {
|
||||
fields: ['name']
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
order: 'shipped DESC, ticketFk'
|
||||
order: 'shipped DESC'
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ BEGIN
|
|||
-- El disponible es menor que 0
|
||||
INSERT INTO tmp.ticketProblems(ticketFk, problem)
|
||||
SELECT tt.ticketFk, i.name
|
||||
FROM tmp.ticketGetProblems tt
|
||||
FROM tmp.ticketListFiltered tt
|
||||
JOIN vn.ticket t ON t.id = tt.ticketFk
|
||||
LEFT JOIN vn.sale s ON s.ticketFk = t.id
|
||||
JOIN vn.item i ON i.id = s.itemFk
|
||||
|
@ -122,7 +122,7 @@ BEGIN
|
|||
-- Amarillo: El disponible es mayor que cero y la cantidad supera el visible, estando aun sin preparar
|
||||
INSERT INTO tmp.ticketProblems(ticketFk, problem)
|
||||
SELECT tt.ticketFk, CONCAT('Delay', i.name)
|
||||
FROM tmp.ticketGetProblems tt
|
||||
FROM tmp.ticketListFiltered tt
|
||||
JOIN vn.ticket t ON t.id = tt.ticketFk
|
||||
LEFT JOIN vn.sale s ON s.ticketFk = t.id
|
||||
JOIN vn.item i ON i.id = s.itemFk
|
||||
|
@ -148,3 +148,4 @@ BEGIN
|
|||
END$$
|
||||
|
||||
DELIMITER ;
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ module.exports = Self => {
|
|||
tp.problem
|
||||
FROM tmp.filter f
|
||||
LEFT JOIN tmp.ticketProblems tp ON tp.ticketFk = f.ticketFk`);
|
||||
stmt.merge(Self.buildSuffix(filter, 'f'));
|
||||
stmt.merge(Self.buildOrderBy(filter, 'f'));
|
||||
let ticketsIndex = stmts.push(stmt) - 1;
|
||||
|
||||
stmts.push(
|
||||
|
|
Loading…
Reference in New Issue