#1165 Añadir al buscador avanzado de order la búsqueda por ticket
gitea/salix/dev This commit looks good Details

This commit is contained in:
Gerard 2019-03-04 16:06:41 +01:00
parent 96704cc4df
commit d6683918bb
2 changed files with 19 additions and 0 deletions

View File

@ -35,6 +35,10 @@ module.exports = Self => {
arg: 'clientFk',
type: 'Integer',
description: `The client id`
}, {
arg: 'ticketFk',
type: 'Integer',
description: `The ticket id`
}, {
arg: 'agencyModeFk',
type: 'Integer',
@ -78,6 +82,8 @@ module.exports = Self => {
return {'o.agency_id': value};
case 'sourceApp':
return {'o.source_app': value};
case 'ticketFk':
return {'ort.ticketFk': value};
case 'isConfirmed':
return {'o.confirmed': value ? 1 : 0};
case 'id':
@ -118,6 +124,12 @@ module.exports = Self => {
LEFT JOIN worker wk ON wk.id = c.salesPersonFk
LEFT JOIN account.user u ON u.id = wk.userFk
LEFT JOIN company co ON co.id = o.company_id`);
if (ctx.args && ctx.args.ticketFk) {
stmt.merge({
sql: `LEFT JOIN orderTicket ort ON ort.orderFk = o.id`
});
}
stmt.merge(conn.makeSuffix(filter));
stmts.push(stmt);

View File

@ -50,6 +50,13 @@
model="filter.to">
</vn-date-picker>
</vn-horizontal>
<vn-horizontal>
<vn-textfield
vn-one
label="Ticket id"
model="filter.ticketFk">
</vn-textfield>
</vn-horizontal>
<vn-horizontal>
<vn-autocomplete
vn-one