feat: add code to query string
This commit is contained in:
parent
f2c1e84490
commit
5e26e38e0b
2 changed files with 5 additions and 0 deletions
|
|
@ -190,6 +190,7 @@ export class QuotationController extends Controller {
|
||||||
@Query() payCondition?: PayCondition,
|
@Query() payCondition?: PayCondition,
|
||||||
@Query() status?: QuotationStatus,
|
@Query() status?: QuotationStatus,
|
||||||
@Query() urgentFirst?: boolean,
|
@Query() urgentFirst?: boolean,
|
||||||
|
@Query() code?: string,
|
||||||
@Query() query = "",
|
@Query() query = "",
|
||||||
) {
|
) {
|
||||||
const where = {
|
const where = {
|
||||||
|
|
@ -209,6 +210,7 @@ export class QuotationController extends Controller {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]),
|
]),
|
||||||
|
code,
|
||||||
payCondition,
|
payCondition,
|
||||||
registeredBranch: isSystem(req.user) ? undefined : { OR: permissionCond(req.user) },
|
registeredBranch: isSystem(req.user) ? undefined : { OR: permissionCond(req.user) },
|
||||||
quotationStatus: status,
|
quotationStatus: status,
|
||||||
|
|
|
||||||
|
|
@ -73,9 +73,11 @@ export class RequestDataController extends Controller {
|
||||||
@Query() query: string = "",
|
@Query() query: string = "",
|
||||||
@Query() requestDataStatus?: RequestDataStatus,
|
@Query() requestDataStatus?: RequestDataStatus,
|
||||||
@Query() quotationId?: string,
|
@Query() quotationId?: string,
|
||||||
|
@Query() code?: string,
|
||||||
) {
|
) {
|
||||||
const where = {
|
const where = {
|
||||||
OR: queryOrNot<Prisma.RequestDataWhereInput[]>(query, [
|
OR: queryOrNot<Prisma.RequestDataWhereInput[]>(query, [
|
||||||
|
{ code: { contains: query, mode: "insensitive" } },
|
||||||
{ quotation: { code: { contains: query, mode: "insensitive" } } },
|
{ quotation: { code: { contains: query, mode: "insensitive" } } },
|
||||||
{ quotation: { workName: { contains: query } } },
|
{ quotation: { workName: { contains: query } } },
|
||||||
{
|
{
|
||||||
|
|
@ -109,6 +111,7 @@ export class RequestDataController extends Controller {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]),
|
]),
|
||||||
|
code,
|
||||||
requestDataStatus,
|
requestDataStatus,
|
||||||
quotation: {
|
quotation: {
|
||||||
id: quotationId,
|
id: quotationId,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue