Prechádzať zdrojové kódy

部颁2018计价标准隐藏‘预算’

TonyKang 3 rokov pred
rodič
commit
7b8d2bdd50

+ 6 - 4
web/building_saas/pm/html/project-management.html

@@ -365,10 +365,12 @@
                                     <label class="custom-control-label" checked for="radioRation">清单预算</label>
                                 </div>
                             <% } else {%>
-                                <div class="custom-control custom-radio custom-control-inline">
-                                    <input type="radio" value="bill" id="radioBill" name="valuation_type" class="custom-control-input">
-                                    <label class="custom-control-label" <%= (compilationName.includes('公路造价')) ? '' : 'checked' %> for="radioBill">预算</label>
-                                </div>
+                                <% if (!compilationName.includes('部颁2018计价标准')) { %>
+                                    <div class="custom-control custom-radio custom-control-inline">
+                                        <input type="radio" value="bill" id="radioBill" name="valuation_type" class="custom-control-input">
+                                        <label class="custom-control-label" <%= (compilationName.includes('公路造价')) ? '' : 'checked' %> for="radioBill">预算</label>
+                                    </div>
+                                <% } %>
                                 <div class="custom-control custom-radio custom-control-inline" <% if (!compilationName.includes("广东农村养护(2021)")) { %> style="display:none" <% } %>>
                                     <input type="radio" value="ration" id="radioRation" name="valuation_type" class="custom-control-input">
                                     <label class="custom-control-label" for="radioRation">工程量清单</label>

+ 14 - 7
web/building_saas/pm/js/pm_newMain.js

@@ -2604,8 +2604,8 @@ function initProjectOptSet($target) {
                                 ` : ``
                             }
                             ${(COMPILATION_NAME !== '内蒙古高速公路日常养护估算(2021)' && COMPILATION_NAME !== '四川养护(2013)') ? `
-                                ${_getOptionDivDomStr(BUDGET, "valuation-type", "预算", "type-budget", !COMPILATION_NAME.includes('公路造价'))}
-                                ${_getOptionDivDomStr(BOQ, "valuation-type", "工程量清单", "type-boq", false)}
+                                ${ !COMPILATION_NAME.includes('部颁2018计价标准') ? _getOptionDivDomStr(BUDGET, "valuation-type", "预算", "type-budget", !COMPILATION_NAME.includes('公路造价')) : '' }
+                                ${_getOptionDivDomStr(BOQ, "valuation-type", "工程量清单", "type-boq", COMPILATION_NAME.includes('部颁2018计价标准'))}
                                 ` : ``
                             }
                         </div>
@@ -2622,12 +2622,19 @@ function initProjectOptSet($target) {
     $target.append($(html));
     $('input[name="valuation-type"]').on('change', function () {
         const valuationType = $(this).val();
-        // 当项目类型是“工程量清单”时,清单类型可见可选
-        changeValuationType(valuationType);
-        valuationType === BOQ
-            ? $('#boq-type').removeClass('hide-area')
-            : $('#boq-type').addClass('hide-area');
+        onChangeValuationType(valuationType);
     });
+    if (COMPILATION_NAME.includes('部颁2018计价标准')) {
+        onChangeValuationType($('input[name="valuation-type"]').val());
+    }
+}
+
+function onChangeValuationType(valuationType) {
+    // 当项目类型是“工程量清单”时,清单类型可见可选
+    changeValuationType(valuationType);
+    valuationType === BOQ
+        ? $('#boq-type').removeClass('hide-area')
+        : $('#boq-type').addClass('hide-area');
 }
 
 function bindModalShown(folderDialog, projDialog, tenderDialog) {