#1165 Añadir al buscador avanzado de order la búsqueda por ticket
gitea/salix/dev This commit looks good
Details
gitea/salix/dev This commit looks good
Details
This commit is contained in:
parent
96704cc4df
commit
d6683918bb
|
@ -35,6 +35,10 @@ module.exports = Self => {
|
||||||
arg: 'clientFk',
|
arg: 'clientFk',
|
||||||
type: 'Integer',
|
type: 'Integer',
|
||||||
description: `The client id`
|
description: `The client id`
|
||||||
|
}, {
|
||||||
|
arg: 'ticketFk',
|
||||||
|
type: 'Integer',
|
||||||
|
description: `The ticket id`
|
||||||
}, {
|
}, {
|
||||||
arg: 'agencyModeFk',
|
arg: 'agencyModeFk',
|
||||||
type: 'Integer',
|
type: 'Integer',
|
||||||
|
@ -78,6 +82,8 @@ module.exports = Self => {
|
||||||
return {'o.agency_id': value};
|
return {'o.agency_id': value};
|
||||||
case 'sourceApp':
|
case 'sourceApp':
|
||||||
return {'o.source_app': value};
|
return {'o.source_app': value};
|
||||||
|
case 'ticketFk':
|
||||||
|
return {'ort.ticketFk': value};
|
||||||
case 'isConfirmed':
|
case 'isConfirmed':
|
||||||
return {'o.confirmed': value ? 1 : 0};
|
return {'o.confirmed': value ? 1 : 0};
|
||||||
case 'id':
|
case 'id':
|
||||||
|
@ -118,6 +124,12 @@ module.exports = Self => {
|
||||||
LEFT JOIN worker wk ON wk.id = c.salesPersonFk
|
LEFT JOIN worker wk ON wk.id = c.salesPersonFk
|
||||||
LEFT JOIN account.user u ON u.id = wk.userFk
|
LEFT JOIN account.user u ON u.id = wk.userFk
|
||||||
LEFT JOIN company co ON co.id = o.company_id`);
|
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));
|
stmt.merge(conn.makeSuffix(filter));
|
||||||
stmts.push(stmt);
|
stmts.push(stmt);
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,13 @@
|
||||||
model="filter.to">
|
model="filter.to">
|
||||||
</vn-date-picker>
|
</vn-date-picker>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
|
<vn-horizontal>
|
||||||
|
<vn-textfield
|
||||||
|
vn-one
|
||||||
|
label="Ticket id"
|
||||||
|
model="filter.ticketFk">
|
||||||
|
</vn-textfield>
|
||||||
|
</vn-horizontal>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
<vn-autocomplete
|
<vn-autocomplete
|
||||||
vn-one
|
vn-one
|
||||||
|
|
Loading…
Reference in New Issue