Browse Source

1. 计量单元加载调整
2. 新建标段默认第一个计价规范
3. 新建概算控制默认第一个标准

MaiXinRong 3 years ago
parent
commit
f05a94e6e6
3 changed files with 7 additions and 6 deletions
  1. 3 2
      app/public/js/stage.js
  2. 2 2
      app/view/budget/list_modal.ejs
  3. 2 2
      app/view/tender/modal.ejs

+ 3 - 2
app/public/js/stage.js

@@ -1624,9 +1624,10 @@ $(document).ready(() => {
             const sheet = slSpread.getActiveSheet();
             const node = SpreadJsObj.getSelectObject(sheet);
             if (node) {
-                spSpread.getActiveSheet().zh_setting.readOnly = node.lock || (node.children && node.children.length > 0);
+                const posReadOnly = node.lock || (node.children && node.children.length > 0);
+                spSpread.getActiveSheet().zh_setting.readOnly = posReadOnly;
                 const posData = stagePos.ledgerPos[itemsPre + node.id] || [];
-                SpreadJsObj.loadSheetData(spSpread.getActiveSheet(), 'data', posData, true);
+                SpreadJsObj.loadSheetData(spSpread.getActiveSheet(), 'data', posData, posReadOnly);
                 getNodeList(node.id);
             } else {
                 spSpread.getActiveSheet().zh_setting.readOnly = true;

+ 2 - 2
app/view/budget/list_modal.ejs

@@ -14,9 +14,9 @@
                 <div class="form-group">
                     <label>概预算标准<b class="text-danger">*</b></label>
                     <div>
-                        <% for (const bs of budgetStd) { %>
+                        <% for (const [i, bs] of budgetStd.entries()) { %>
                         <div class="form-check form-check-inline mt-2">
-                            <input class="form-check-input" name="std_id" type="radio" id="std<%- bs.id %>" value="<%- bs.id %>" checked="">
+                            <input class="form-check-input" name="std_id" type="radio" id="std<%- bs.id %>" value="<%- bs.id %>" <% if (i === 0) { %>checked<% } %>>
                             <label class="form-check-label" for="std<%- bs.id %>"><%- bs.name %></label>
                         </div>
                         <% } %>

+ 2 - 2
app/view/tender/modal.ejs

@@ -18,9 +18,9 @@
                     </style>
                     <label ><b class="text-danger">*</b>计价标准<a style="" href="javascript:void(0)" data-toggle="tooltip" data-placement="right" title="" data-original-title="用于初始化新建模板、项目节、标准清单" class="ml-2"><i class="fa fa-info-circle"></i></a></label>
                     <div>
-                        <% for (const v of valuations) { %>
+                        <% for (const [i, v] of valuations.entries()) { %>
                         <div class="form-check form-check-inline mt-2">
-                            <input class="form-check-input" name="valuation" type="radio" id="valuation<%- v.id %>" value="<%- v.id %>" checked="">
+                            <input class="form-check-input" name="valuation" type="radio" id="valuation<%- v.id %>" value="<%- v.id %>" <% if (i === 0) { %>checked<% } %>>
                             <label class="form-check-label" for="valuation<%- v.id %>"><%- v.name %></label>
                         </div>
                         <% } %>