Browse Source

标段概况,显示设置,使用数量纠正完成率

MaiXinRong 4 years ago
parent
commit
bf8764dd65

+ 1 - 0
app/const/tender_info.js

@@ -108,6 +108,7 @@ const defaultInfo = {
         thousandth: false,
         stage: {
             realComplete: false,
+            correct: false,
         }
     },
     chapter: [

+ 1 - 0
app/public/js/ledger.js

@@ -3270,6 +3270,7 @@ $(document).ready(function() {
             }
         });
         check2Viewing({
+            extra: ZhCalc.div(ledgerTree.datas.length + pos.datas.length, 10000, 0),
             randomWait: true,
             prefix: 'check2-',
             checks: result,

+ 9 - 12
app/public/js/stage.js

@@ -507,12 +507,12 @@ $(document).ready(() => {
     const slSpread = SpreadJsObj.createNewSpread($('#stage-ledger')[0]);
     customizeStageTreeSetting(ledgerSpreadSetting, customColDisplay());
     // 数量变更列,添加按钮
-    const col = _.find(ledgerSpreadSetting.cols, {field: 'qc_qty'});
-    col.readOnly = true;
-    col.cellType = 'activeImageBtn';
-    col.normalImg = '#ellipsis-icon';
-    col.indent = 5;
-    col.showImage = function (data) {
+    const qcCol = _.find(ledgerSpreadSetting.cols, {field: 'qc_qty'});
+    qcCol.readOnly = true;
+    qcCol.cellType = 'activeImageBtn';
+    qcCol.normalImg = '#ellipsis-icon';
+    qcCol.indent = 5;
+    qcCol.showImage = function (data) {
         if (!data || (data.children && data.children.length > 0) || !(data.b_code && data.b_code !== '')) {
             return false;
         } else {
@@ -520,6 +520,8 @@ $(document).ready(() => {
             return !(nodePos && nodePos.length > 0);
         }
     };
+    const ratioCol = ledgerSpreadSetting.cols.find(x => {return x.field === 'end_gather_percent' || x.field === 'end_correct_percent'});
+    ratioCol.field = tenderInfo.display.stage.correct ? 'end_correct_percent' : 'end_gather_percent';
     ledgerSpreadSetting.imageClick = function (data) {
         if (data.children && data.children.length > 0) return;
 
@@ -3625,6 +3627,7 @@ $(document).ready(() => {
     $('#ledger-check2').click(() => {
         const result = ledgerCheck2(stageCheckerSetting);
         check2Viewing({
+            extra: ZhCalc.div(stageTree.datas.length + stagePos.datas.length, 10000, 0),
             randomWait: true,
             prefix: 'check2-',
             checks: result,
@@ -3781,10 +3784,4 @@ $(document).ready(() => {
         }
         stageTreeSpreadObj.measureByBatch(posName, ratio, apply2sibling);
     });
-    $('#correct_percent').click(function () {
-        const sheet = slSpread.getActiveSheet();
-        const col = sheet.zh_setting.cols.find(x => {return x.field === 'end_gather_percent' || x.field === 'end_correct_percent'});
-        col.field = this.checked ? 'end_correct_percent' : 'end_gather_percent';
-        SpreadJsObj.reLoadColsData(sheet, [sheet.zh_setting.cols.indexOf(col)]);
-    })
 });

+ 0 - 1
app/service/stage_pay.js

@@ -269,7 +269,6 @@ module.exports = app => {
             const stagePays = stage.status === auditConst.stage.status.checked
                 ? await this.getStageLastestPays(stage.id)
                 : await this.getStagePays(stage);
-            console.log(stagePays);
             const sf = this._.find(stagePays, {ptype: payConst.payType.sf});
             return sf;
         }

+ 1 - 1
app/view/shares/check_modal2.ejs

@@ -109,7 +109,7 @@
         if (!setting.prefix) setting.prefix = 'check2-';
         if (setting.randomWait) {
             for (const c of setting.checks) {
-                c.wait = _.random(1, 5);
+                c.wait = _.random(1, 5) + setting.extra;
             }
         }
 

+ 0 - 3
app/view/stage/index.ejs

@@ -36,9 +36,6 @@
                     <a id="exportExcel" class="btn btn-primary btn-sm" href="javascript: void(0)">导出计量台账Excel</a>
                     <a class="btn btn-sm btn-primary" href="javascript: void(0);" id="ledger-check2">数据检查</a>
                 </div>
-                <div class="d-inline-block">
-                    <a class="btn btn-sm btn-primary" href="#correct" data-toggle="modal" data-target="#correct"><i class="fa fa-cog"></i></a>
-                </div>
             </div>
             <div class="ml-auto">
             </div>

+ 0 - 18
app/view/stage/modal.ejs

@@ -450,24 +450,6 @@
         </div>
     </div>
 </div>
-<div class="modal fade" id="correct" data-backdrop="static">
-    <div class="modal-dialog" role="document">
-        <div class="modal-content">
-            <div class="modal-header">
-                <h5 class="modal-title">操作确认</h5>
-            </div>
-            <div class="modal-body">
-                <div class="custom-control custom-checkbox">
-                    <input type="checkbox" class="custom-control-input" id="correct_percent">
-                    <label class="custom-control-label " for="correct_percent">使用数量纠正完成率</label>
-                </div>
-            </div>
-            <div class="modal-footer">
-                <button type="button" class="btn btn-sm btn-primary" data-dismiss="modal">确认</button>
-            </div>
-        </div>
-    </div>
-</div>
 <% include ./audit_modal.ejs %>
 <% include ../shares/merge_peg_modal.ejs %>
 <% include ../shares/check_modal2.ejs %>

+ 14 - 9
app/view/tender/detail_modal.ejs

@@ -625,20 +625,24 @@
             <div class="modal-body">
                 <div class="form-group">
                     <div class="custom-control custom-checkbox mb-2">
-                        <input type="checkbox" class="form-check-input" id="ledger-dgn-qty" checked="">
-                        <label class="form-check-label" for="ledger-dgn-qty">项目节数量</label>
+                        <input type="checkbox" class="custom-control-input" id="ledger-dgn-qty" checked="">
+                        <label class="custom-control-label" for="ledger-dgn-qty">项目节数量</label>
                     </div>
                     <div class="custom-control custom-checkbox mb-2">
-                        <input type="checkbox" class="form-check-input" id="ledger-cl-qty" checked="">
-                        <label class="form-check-label" for="ledger-cl-qty">错漏增减</label>
+                        <input type="checkbox" class="custom-control-input" id="ledger-cl-qty" checked="">
+                        <label class="custom-control-label" for="ledger-cl-qty">错漏增减</label>
                     </div>
                     <div class="custom-control custom-checkbox mb-2">
-                        <input type="checkbox" class="form-check-input" id="thousandth" checked="">
-                        <label class="form-check-label" for="thousandth">千分位</label>
+                        <input type="checkbox" class="custom-control-input" id="thousandth" checked="">
+                        <label class="custom-control-label" for="thousandth">千分位</label>
                     </div>
                     <div class="custom-control custom-checkbox mb-2">
-                        <input type="checkbox" class="form-check-input" id="stage-rc" checked="">
-                        <label class="form-check-label" for="stage-rc">实际完成量</label>
+                        <input type="checkbox" class="custom-control-input" id="stage-rc" checked="">
+                        <label class="custom-control-label" for="stage-rc">实际完成量</label>
+                    </div>
+                    <div class="custom-control custom-checkbox mb-2">
+                        <input type="checkbox" class="custom-control-input" checked="" id="stage-correct">
+                        <label class="custom-control-label" for="stage-correct">使用数量纠正完成率</label>
                     </div>
                 </div>
             </div>
@@ -1307,6 +1311,7 @@
         $('#ledger-cl-qty')[0].checked = property.display.ledger.clQty;
         $('#thousandth')[0].checked = property.display.thousandth;
         $('#stage-rc')[0].checked = property.display.stage.realComplete;
+        $('#stage-correct')[0].checked = property.display.stage.correct;
     }
     $('#bd-set-5').on('show.bs.modal', function () {
         loadDisplayProperty();
@@ -1316,7 +1321,7 @@
             display: {
                 ledger: { dgnQty: $('#ledger-dgn-qty')[0].checked, clQty: $('#ledger-cl-qty')[0].checked, },
                 thousandth: $('#thousandth')[0].checked,
-                stage: { realComplete: $('#stage-rc')[0].checked, },
+                stage: { realComplete: $('#stage-rc')[0].checked, correct: $('#stage-correct')[0].checked },
             },
         };
         const tenderId = window.location.pathname.split('/')[2];