Browse Source

修复变更批量上报bug

ellisran 10 months atrás
parent
commit
90a1d590cc
2 changed files with 14 additions and 0 deletions
  1. 1 0
      app/controller/change_controller.js
  2. 13 0
      app/view/change/modal.ejs

+ 1 - 0
app/controller/change_controller.js

@@ -156,6 +156,7 @@ module.exports = app => {
                 changePlanList,
                 apLists,
                 auditType,
+                precision: ctx.tender.info.precision,
             };
 
             if (ctx.session.sessionProject.page_show.openChangeState) {

+ 13 - 0
app/view/change/modal.ejs

@@ -332,6 +332,7 @@
 <script src="/public/js/gcl_gather.js"></script>
 <script>
     const shenpiConst = JSON.parse(unescape('<%- escape(JSON.stringify(shenpiConst)) %>'));
+    const precision = JSON.parse('<%- JSON.stringify(precision) %>');
     $(function () {
         const intervalIds = {};
         <% if (tender.user_id === ctx.session.sessionUser.accountId) { %>
@@ -1096,6 +1097,18 @@
             return needUpdate;
         }
 
+        function findDecimal(unit) {
+            let value = precision.other.value;
+            const changeUnits = precision;
+            for (const d in changeUnits) {
+                if (changeUnits[d].unit !== undefined && changeUnits[d].unit === unit) {
+                    value = changeUnits[d].value;
+                    break;
+                }
+            }
+            return value;
+        }
+
         // 编号排序,多重判断
         function sortByCode(a, b) {
             let code1 = a.code.split('-');