|
@@ -58,7 +58,7 @@ module.exports = app => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- async listLoad(ctx) {
|
|
|
+ async paymentLoad(ctx) {
|
|
|
const responseData = {
|
|
|
err: 0, msg: '', data: {},
|
|
|
};
|
|
@@ -207,7 +207,7 @@ module.exports = app => {
|
|
|
const id = parseInt(ctx.params.id);
|
|
|
if (!id) throw '参数错误';
|
|
|
const info = await ctx.service.paymentDetail.getDataById(id);
|
|
|
- const rptTpl = await ctx.service.rptTpl.getDataById(3030);
|
|
|
+ const rptTpl = await ctx.service.rptTpl.getDataById(3029);
|
|
|
const pageRst = ctx.service.jpcReport.getAllPreviewPagesCommon(rptTpl, 'A4');
|
|
|
const renderData = {
|
|
|
info,
|
|
@@ -223,7 +223,7 @@ module.exports = app => {
|
|
|
|
|
|
async process(ctx) {
|
|
|
try {
|
|
|
- const id = parseInt(ctx.params.pid);
|
|
|
+ const id = parseInt(ctx.params.tid);
|
|
|
if (!id) throw '参数错误';
|
|
|
const info = await ctx.service.paymentTender.getDataById(id);
|
|
|
if (!info) throw '标段不存在';
|
|
@@ -237,14 +237,18 @@ module.exports = app => {
|
|
|
const rptTpl = await ctx.service.rptTpl.getDataById(rpt.ID);
|
|
|
// 根据模板ID获取报表JSON
|
|
|
const pageRst = ctx.service.jpcReport.getAllPreviewPagesCommon(rptTpl, 'A4');
|
|
|
+ console.log(pageRst.items[0]);
|
|
|
+ // return;
|
|
|
rptTplList.push(pageRst.items[0]);
|
|
|
}
|
|
|
}
|
|
|
+ const tenderRptList = await ctx.service.paymentTenderRpt.getProcessList(id, rptProjectList);
|
|
|
const renderData = {
|
|
|
info,
|
|
|
jsFiles: this.app.jsFiles.common.concat(this.app.jsFiles.payment.process),
|
|
|
rptProjectList,
|
|
|
rptTplList,
|
|
|
+ tenderRptList,
|
|
|
};
|
|
|
await this.layout('payment/process.ejs', renderData, 'payment/process_modal.ejs');
|
|
|
} catch (err) {
|