浏览代码

1. 计量台账,审批退回,要求必须完成中间计量
2. 计量台账,查找定位,漏计判断调整:截止本期完成 < 台账数量 + 截止本期数量变更

MaiXinRong 5 年之前
父节点
当前提交
76ac60153a
共有 5 个文件被更改,包括 12 次插入8 次删除
  1. 1 1
      app/public/js/ledger_audit.js
  2. 1 1
      app/public/js/revise.js
  3. 4 5
      app/public/js/stage.js
  4. 5 0
      app/public/js/stage_gather.js
  5. 1 1
      app/service/stage_audit.js

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

@@ -216,8 +216,8 @@ $(document).ready(() => {
     }
     // 显示层次
     (function (select, sheet) {
-        if (!sheet.zh_tree) return;
         $(select).click(function () {
+            if (!sheet.zh_tree) return;
             const tag = $(this).attr('tag');
             const tree = sheet.zh_tree;
             switch (tag) {

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

@@ -1273,8 +1273,8 @@ $(document).ready(() => {
 
     // 显示层次
     (function (select, sheet) {
-        if (!sheet.zh_tree) return;
         $(select).click(function () {
+            if (!sheet.zh_tree) return;
             const tag = $(this).attr('tag');
             const tree = sheet.zh_tree;
             switch (tag) {

+ 4 - 5
app/public/js/stage.js

@@ -1361,13 +1361,13 @@ $(document).ready(() => {
             for (const node of sortData) {
                 if (node.children && node.children.length > 0) continue;
                 if (node.quantity) {
-                    if (ZhCalc.sub(node.quantity, node.end_gather_qty) > 0) {
+                    if (ZhCalc.sub(ZhCalc.add(node.quantity, node.end_qc_qty), node.end_gather_qty) > 0) {
                         const data = JSON.parse(JSON.stringify(node));
                         data.visible = true;
                         this.searchResult.push(data);
                     }
                 } else if (node.total_price) {
-                    if (ZhCalc.sub(node.total_price, node.end_gather_tp) > 0) {
+                    if (ZhCalc.sub(ZhCalc.add(node.total_price, node.end_qc_tp), node.end_gather_tp) > 0) {
                         const data = JSON.parse(JSON.stringify(node));
                         data.visible = true;
                         this.searchResult.push(data);
@@ -1400,7 +1400,7 @@ $(document).ready(() => {
                         }
                         if (checkEmpty) {
                             if (sd.quantity) {
-                                if (!sd.end_gather_qty || ZhCalc.sub(sd.quantity, sd.end_gather_qty) > 0) match = true;
+                                if (!sd.end_gather_qty || ZhCalc.sub(ZhCalc(sd.quantity, ad.end_qc_qty), sd.end_gather_qty) > 0) match = true;
                             }
                         }
                         if (keyword && keyword !== '' && sd.name && sd.name.indexOf(keyword) === -1) match = false;
@@ -1661,7 +1661,6 @@ $(document).ready(() => {
             toast('附件信息获取失败', 'error');
         }
     });
-
     $('body').on('click', '#btn-att a', function () {
         const content = $(this).attr('content');
         const fid = $('#showAttachment').attr('file-id');
@@ -1780,8 +1779,8 @@ $(document).ready(() => {
     });
     // 显示层次
     (function (select, sheet) {
-        if (!sheet.zh_tree) return;
         $(select).click(function () {
+            if (!sheet.zh_tree) return;
             const tag = $(this).attr('tag');
             const tree = sheet.zh_tree;
             switch (tag) {

+ 5 - 0
app/public/js/stage_gather.js

@@ -13,6 +13,9 @@ $(document).ready(function () {
     if (per && !_.isNaN(per)) {
         $('#over-percent').val(per >= 50 ? (per <= 100 ? per : 100) : 50);
     }
+
+    let overType = $('#' + getLocalCache('StageGatherOverType'))[0];
+    if (overType) overType.checked = true;
     autoFlashHeight();
     // 初始化工程量清单
     const gclSpread = SpreadJsObj.createNewSpread($('#gcl-spread')[0]);
@@ -93,11 +96,13 @@ $(document).ready(function () {
         }
     });
     $('.custom-radio').click(() => {
+        setLocalCache('StageGatherOverType', $('input[name=customRadio]:checked').attr('id'));
         checkOverRange();
         // 收起菜单
         $('.dropdown-menu').click();
     });
     $('#over-percent').change(function () {
+        this.value = this.value >= 50 ? (this.value <= 100 ? ZhCalc.round(this.value, 2) : 100) : 50;
         setLocalCache('StageGatherOverPercent', this.value);
         checkOverRange();
     });

+ 1 - 1
app/service/stage_audit.js

@@ -298,7 +298,7 @@ module.exports = app => {
         async _checkNo(stageId, checkData, times) {
             const time = new Date();
             // 整理当前流程审核人状态更新
-            const audit = await this.getDataByCondition({sid: stageId, times: times, status: auditConst.status.checking});
+            const audit = await this.getDataByCondition({sid: stageId, times: times, status: auditConst.status.checking, check_detail: false});
             if (!audit) {
                 throw '审核数据错误';
             }