|
@ -12,7 +12,7 @@ async function getReceivedDetail(ctx) { |
|
|
} |
|
|
} |
|
|
let findOption = { |
|
|
let findOption = { |
|
|
where: where, |
|
|
where: where, |
|
|
order: [['id', 'DESC']] |
|
|
order: [['id', 'ASC']] |
|
|
} |
|
|
} |
|
|
if (!toExport) {//非导出时考虑分页
|
|
|
if (!toExport) {//非导出时考虑分页
|
|
|
if (limit) { |
|
|
if (limit) { |
|
@ -132,7 +132,7 @@ async function getAchievementDetail(ctx) { |
|
|
} |
|
|
} |
|
|
let findOption = { |
|
|
let findOption = { |
|
|
where: where, |
|
|
where: where, |
|
|
order: [['id', 'DESC']] |
|
|
order: [['id', 'ASC']] |
|
|
} |
|
|
} |
|
|
if (!toExport) {//非导出时考虑分页
|
|
|
if (!toExport) {//非导出时考虑分页
|
|
|
if (limit) { |
|
|
if (limit) { |
|
@ -349,7 +349,7 @@ async function getContractDetail(ctx) { |
|
|
where: where, |
|
|
where: where, |
|
|
offset: Number(page) * Number(limit), |
|
|
offset: Number(page) * Number(limit), |
|
|
limit: Number(limit), |
|
|
limit: Number(limit), |
|
|
order: [['id', 'DESC']] |
|
|
order: [['id', 'ASC']] |
|
|
}); |
|
|
}); |
|
|
ctx.status = 200 |
|
|
ctx.status = 200 |
|
|
ctx.body = contractDetail; |
|
|
ctx.body = contractDetail; |
|
@ -376,7 +376,7 @@ async function getInvoicingDetail(ctx) { |
|
|
where: where, |
|
|
where: where, |
|
|
offset: Number(page) * Number(limit), |
|
|
offset: Number(page) * Number(limit), |
|
|
limit: Number(limit), |
|
|
limit: Number(limit), |
|
|
order: [['id', 'DESC']] |
|
|
order: [['id', 'ASC']] |
|
|
}); |
|
|
}); |
|
|
ctx.status = 200 |
|
|
ctx.status = 200 |
|
|
ctx.body = invoiceDetail; |
|
|
ctx.body = invoiceDetail; |
|
@ -394,7 +394,7 @@ async function exportContractDetail(ctx) { |
|
|
try { |
|
|
try { |
|
|
const { models } = ctx.fs.dc; |
|
|
const { models } = ctx.fs.dc; |
|
|
let exportData = await models.ContractDetail.findAll({ |
|
|
let exportData = await models.ContractDetail.findAll({ |
|
|
order: [['id', 'DESC']] |
|
|
order: [['id', 'ASC']] |
|
|
}); |
|
|
}); |
|
|
const { utils: { simpleExcelDown, contractDetailsColumnKeys } } = ctx.app.fs; |
|
|
const { utils: { simpleExcelDown, contractDetailsColumnKeys } } = ctx.app.fs; |
|
|
let header = []; |
|
|
let header = []; |
|
@ -423,7 +423,7 @@ async function exportInvoicingDetail(ctx) { |
|
|
try { |
|
|
try { |
|
|
const { models } = ctx.fs.dc; |
|
|
const { models } = ctx.fs.dc; |
|
|
let exportData = await models.InvoiceDetail.findAll({ |
|
|
let exportData = await models.InvoiceDetail.findAll({ |
|
|
order: [['id', 'DESC']] |
|
|
order: [['id', 'ASC']] |
|
|
}); |
|
|
}); |
|
|
const { utils: { simpleExcelDown, invoicingDetailsColumnKeys } } = ctx.app.fs; |
|
|
const { utils: { simpleExcelDown, invoicingDetailsColumnKeys } } = ctx.app.fs; |
|
|
let header = []; |
|
|
let header = []; |
|
|