|
@@ -322,7 +322,9 @@ module.exports = app => {
|
|
|
(ctx.detail.status === auditConst.status.uncheck || ctx.detail.status === auditConst.status.checkNo)) {
|
|
|
const rptTpl = await ctx.service.rptTpl.getDataById(ctx.trInfo.rpt_id);
|
|
|
if (rptTpl) {
|
|
|
- const pageRst = await ctx.service.jpcReport.getAllPreviewPagesCommon(rptTpl, 'A4');
|
|
|
+ // const pageRst = await ctx.service.jpcReport.getAllPreviewPagesCommon(rptTpl, 'A4');
|
|
|
+ rptTpl.source_type = 101;
|
|
|
+ const pageRst = await ctx.service.jpcReport.getPreviewPagesWithDiscreteDataCommon(ctx, rptTpl, 'A4', this.app.baseDir, null);
|
|
|
const rptMsg = pageRst.items[0];
|
|
|
// 判断与原有的报表审批人列表是否有区别
|
|
|
let difference = false;
|
|
@@ -390,7 +392,7 @@ module.exports = app => {
|
|
|
const content = [];
|
|
|
// 获取当前报表人
|
|
|
const rptAudit = await ctx.service.paymentRptAudit.getDataByCondition({ td_id: ctx.detail.id, uid: ctx.session.sessionUser.accountId });
|
|
|
- if (report_json && report_json.items[0].interact_cells.length > 0) {
|
|
|
+ if (report_json && report_json.items && report_json.items.length > 0 && report_json.items[0].interact_cells.length > 0) {
|
|
|
for (const [i, cell] of report_json.items[0].interact_cells.entries()) {
|
|
|
cell.index = i;
|
|
|
}
|
|
@@ -654,7 +656,7 @@ module.exports = app => {
|
|
|
throw '权限不足';
|
|
|
}
|
|
|
let [tenderRptList, rptProjectList] = await this._returnRptProjectList(ctx, true);
|
|
|
- const safeRpt = tenderRptList.find(x => { return x.type === 1 });
|
|
|
+ const safeRpt = tenderRptList.find(x => { return x.type === 1; });
|
|
|
tenderRptList = ctx.helper._.filter(tenderRptList, { type: 0, is_del: 0 });
|
|
|
// for (const tr of tenderRptList) {
|
|
|
// if (tr.status === shenpiConst.sp_status.gdspl) {
|
|
@@ -789,6 +791,7 @@ module.exports = app => {
|
|
|
const rptTpl = await ctx.service.rptTpl.getDataById(trInfo.rpt_id);
|
|
|
if (rptTpl) {
|
|
|
const pageRst = await ctx.service.jpcReport.getAllPreviewPagesCommon(rptTpl, 'A4');
|
|
|
+ // const pageRst = await ctx.service.jpcReport.getPreviewPagesWithDiscreteDataCommon(ctx, rptTpl, 'A4', this.app.baseDir, null);
|
|
|
renderData.rptMsg = pageRst.items[0];
|
|
|
// 判断与原有的报表审批人列表是否有区别
|
|
|
let difference = false;
|
|
@@ -900,7 +903,7 @@ module.exports = app => {
|
|
|
responseData.data = await ctx.service.paymentTenderRpt.updateRptAudit(trInfo, data.rpt_audit);
|
|
|
break;
|
|
|
case 'add-detail':
|
|
|
- responseData.data = await ctx.service.paymentDetail.addDetail(trInfo, data.code, data.s_time);
|
|
|
+ responseData.data = await ctx.service.paymentDetail.addDetail(ctx, trInfo, data.code, data.s_time);
|
|
|
break;
|
|
|
default: throw '参数有误';
|
|
|
}
|