Browse Source

报表,期汇总,全选

MaiXinRong 3 years ago
parent
commit
5f8bc893e2
2 changed files with 12 additions and 1 deletions
  1. 8 1
      app/public/report/js/rpt_custom.js
  2. 4 0
      app/view/report/rpt_all_popup.ejs

+ 8 - 1
app/public/report/js/rpt_custom.js

@@ -363,6 +363,13 @@ const rptCustomObj = (function () {
             rptCustomObj.resetStageSelect(resolve);
             // $("#stage-select").modal('hide');
         });
+        $('#stage-select-all').unbind('click');
+        $('#stage-select-all').bind('click', function () {
+            const material = $('[name=stage-select-check]');
+            for (const m of material) {
+                m.checked = this.checked;
+            }
+        });
     };
     const initChangeSelect = function (gsSetting, rptName, resolve = null) {
         changeObj.show('选择工程变更' + (rptName ? '-' + rptName : ''), resolve);
@@ -398,7 +405,7 @@ const rptCustomObj = (function () {
             for (const m of material) {
                 m.checked = this.checked;
             }
-        })
+        });
     };
     const init = function (cDefine, sfData, cSelect, rptName, resolve = null) {
         stageFlow = sfData;

+ 4 - 0
app/view/report/rpt_all_popup.ejs

@@ -437,6 +437,10 @@
                 <div class="alert alert-danger my-2 p-2" id="stage-select-hint">我是提示呀</div>
             </div>
             <div class="modal-footer">
+                <div class="form-check form-check-inline mr-auto">
+                    <input class="form-check-input" type="checkbox" id="stage-select-all">
+                    <label class="form-check-label" for="stage-select-all">全选</label>
+                </div>
                 <button type="button" class="btn btn-sm btn-secondary" data-dismiss="modal">取消</button>
                 <button class="btn btn-sm btn-primary" id="stage-select-ok">确定</button>
             </div>