Browse Source

获取各审批人数据调整

MaiXinRong 5 years ago
parent
commit
30e6cc22c0
3 changed files with 3 additions and 3 deletions
  1. 1 1
      app/service/stage_bonus.js
  2. 1 1
      app/service/stage_jgcl.js
  3. 1 1
      app/service/stage_other.js

+ 1 - 1
app/service/stage_bonus.js

@@ -24,7 +24,7 @@ module.exports = app => {
 
         async getStageData(sid) {
             const data = await this.getAllDataByCondition({where: { sid: sid }});
-            if (this.ctx.stage.readOnly && this.ctx.stage.status !== auditConst.status.checked) {
+            if (this.ctx.stage && this.ctx.stage.readOnly && this.ctx.stage.status !== auditConst.status.checked) {
                 for (const d of data) {
                     const his = d.shistory ? JSON.parse(d.shistory) : [];
                     const h = this.ctx.helper._.find(his, {

+ 1 - 1
app/service/stage_jgcl.js

@@ -24,7 +24,7 @@ module.exports = app => {
 
         async getStageData(sid) {
             const data = await this.getAllDataByCondition({where: { sid: sid }});
-            if (this.ctx.stage.readOnly && this.ctx.stage.status !== auditConst.status.checked) {
+            if (this.ctx.stage && this.ctx.stage.readOnly && this.ctx.stage.status !== auditConst.status.checked) {
                 for (const d of data) {
                     const his = d.shistory ? JSON.parse(d.shistory) : [];
                     const h = this.ctx.helper._.find(his, {

+ 1 - 1
app/service/stage_other.js

@@ -24,7 +24,7 @@ module.exports = app => {
 
         async getStageData(sid) {
             const data = await this.getAllDataByCondition({where: { sid: sid }});
-            if (this.ctx.stage.readOnly && this.ctx.stage.status !== auditConst.status.checked) {
+            if (this.ctx.stage && this.ctx.stage.readOnly && this.ctx.stage.status !== auditConst.status.checked) {
                 for (const d of data) {
                     const his = d.shistory ? JSON.parse(d.shistory) : [];
                     const h = this.ctx.helper._.find(his, {