浏览代码

修复新建期丢失报表数据问题

laiguoran 1 年之前
父节点
当前提交
4af69d52b5
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/controller/payment_controller.js

+ 1 - 1
app/controller/payment_controller.js

@@ -390,7 +390,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[0].interact_cells.length > 0) {
                     for (const [i, cell] of report_json.items[0].interact_cells.entries()) {
                         cell.index = i;
                     }