瀏覽代碼

1. 中间计量,禁止审批人修改生成规则
2. 中间计量,下一期记住上一期生成规则

MaiXinRong 6 年之前
父節點
當前提交
8cb54f554f
共有 2 個文件被更改,包括 5 次插入1 次删除
  1. 1 1
      app/public/js/stage_detail.js
  2. 4 0
      app/service/stage.js

+ 1 - 1
app/public/js/stage_detail.js

@@ -409,11 +409,11 @@ $(document).ready(() => {
                     }
                 }
             });
-            SpreadJsObj.loadSheetData(gsSpread.getActiveSheet(), SpreadJsObj.DataType.Tree, gsTree);
             const gatherNodes = stage.im_gather_node ? _.map(stage.im_gather_node.split(',')) : [];
             for (const node of gsTree.datas) {
                 node.check = gatherNodes.indexOf(node.id + '') !== -1;
             }
+            SpreadJsObj.loadSheetData(gsSpread.getActiveSheet(), SpreadJsObj.DataType.Tree, gsTree);
             gsTree.expandByLevel(4);
             SpreadJsObj.refreshTreeRowVisible(gsSpread.getActiveSheet());
             SpreadJsObj.resetFieldReadOnly(gsSpread.getActiveSheet, 'check', !$('#im-gather-check')[0].checked);

+ 4 - 0
app/service/stage.js

@@ -148,6 +148,10 @@ module.exports = app => {
                 user_id: this.ctx.session.sessionUser.accountId,
             };
             if (preStage) {
+                newStage.im_type = preStage.im_type;
+                newStage.im_pre = preStage.im_pre;
+                newStage.im_gather = preStage.im_gather;
+                newStage.im_gather_node = preStage.im_gather_node;
                 newStage.pre_contract_tp = this.ctx.helper.add(preStage.pre_contract_tp, preStage.contract_tp);
                 newStage.pre_qc_tp = this.ctx.helper.add(preStage.pre_qc_tp, preStage.qc_tp);
             }