|  | @@ -22,13 +22,13 @@ module.exports = app => {
 | 
												
													
														
															|  |              this.tableName = 'stage_jgcl';
 |  |              this.tableName = 'stage_jgcl';
 | 
												
													
														
															|  |          }
 |  |          }
 | 
												
													
														
															|  |  
 |  |  
 | 
												
													
														
															|  | -        async getStageData(sid) {
 |  | 
 | 
												
													
														
															|  | -            const data = await this.getAllDataByCondition({where: { sid: sid }});
 |  | 
 | 
												
													
														
															|  | -            if (this.ctx.stage && this.ctx.stage.readOnly && this.ctx.stage.status !== auditConst.status.checked) {
 |  | 
 | 
												
													
														
															|  | 
 |  | +        async getStageData(stage) {
 | 
												
													
														
															|  | 
 |  | +            const data = await this.getAllDataByCondition({where: { sid: stage.id }});
 | 
												
													
														
															|  | 
 |  | +            if (stage && stage.readOnly && stage.status !== auditConst.status.checked) {
 | 
												
													
														
															|  |                  for (const d of data) {
 |  |                  for (const d of data) {
 | 
												
													
														
															|  |                      const his = d.shistory ? JSON.parse(d.shistory) : [];
 |  |                      const his = d.shistory ? JSON.parse(d.shistory) : [];
 | 
												
													
														
															|  |                      const h = this.ctx.helper._.find(his, {
 |  |                      const h = this.ctx.helper._.find(his, {
 | 
												
													
														
															|  | -                        stimes: this.ctx.stage.curTimes, sorder: this.ctx.stage.curOrder
 |  | 
 | 
												
													
														
															|  | 
 |  | +                        stimes: stage.curTimes, sorder: stage.curOrder
 | 
												
													
														
															|  |                      });
 |  |                      });
 | 
												
													
														
															|  |                      if (h) {
 |  |                      if (h) {
 | 
												
													
														
															|  |                          d.arrive_qty = h.arrive_qty ? h.arrive_qty : h.arraive_qty;
 |  |                          d.arrive_qty = h.arrive_qty ? h.arrive_qty : h.arraive_qty;
 |