Explorar o código

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

laiguoran %!s(int64=2) %!d(string=hai) anos
pai
achega
4af69d52b5
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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;
                     }