浏览代码

fix: 定位在项目管理某建设项目,点击工具栏的“新建”,默认的计价规则与原建设项目的计价规则不同时,未刷新,导致读取的后台设置是错误的。

zhangweicheng 3 年之前
父节点
当前提交
d95b740b15
共有 2 个文件被更改,包括 29 次插入9 次删除
  1. 13 0
      config/config.js
  2. 16 9
      web/building_saas/pm/js/pm_newMain.js

+ 13 - 0
config/config.js

@@ -56,6 +56,19 @@ module.exports = {
         },
         importURL:"172.18.111.231:6050"
     },
+    pp_outer:{  server: "112.74.42.187",
+    port: "27017",
+    options:{
+        user:'smartcost',
+        pass:'SmartCost3850888',
+        auth: {
+            "authdb": "admin"
+        },
+        connectTimeoutMS: 50000,
+        useMongoClient: true
+    },
+    importURL:"112.74.42.187:6050"
+},
     uat: {
         server: "112.74.42.187",
         port: "27017",

+ 16 - 9
web/building_saas/pm/js/pm_newMain.js

@@ -2087,13 +2087,7 @@ $(document).ready(function() {
 
     //选择计价规则
     $("#valuation").change(function () {
-        curValuation = $(this).val();
-        curValuationName = $(this).text();
-        let engineeringList = getEngineeringList();
-        let engineeringHtml = getEngineeringHtml(engineeringList);
-        $("#tender-engineering").html(engineeringHtml);
-        $('#valuation-info').hide();
-        changeEngineering();
+        changeValuation($(this).val(),$(this).text())
     });
 
     //选择计税方式
@@ -2121,13 +2115,16 @@ $(document).ready(function() {
         let nameList = getNameList($('#poj-name-list').children());
         let isExist = hasListName(nameList, pojName);
         if(!isExist){
-            if(pojName !== ''){
-                console.log(curValuation);
+            if(pojName !== ''){    
+                if($("#valuation").val()) {
+                    changeValuation($("#valuation").val(),$("#valuation").text()); //这时候计价规则可能变了
+                }
                 //新建建设项目,显示计价规则、文件类型、计税方法选项
                 $('#newProjectSet').show();
                 $('input[name="fileKind-tender"]:eq(0)').prop('checked', true);
                 $('input[name="taxType-tender"]:eq(0)').prop('checked', true);
                 curTaxType = 1;
+       
                 getStdCalcProgramFiles();
                 replaceClass($('#poj-name-info'), 'text-danger', 'text-info');
                 setDangerInfo($('#poj-name-info'), `新建“${pojName}”`);
@@ -2787,6 +2784,16 @@ async function changeEngineering(){
     initFeeStandardSel();
 }
 
+function changeValuation(newValuation,newName) {
+    curValuation = newValuation;
+    curValuationName = newName;
+    let engineeringList = getEngineeringList();
+    let engineeringHtml = getEngineeringHtml(engineeringList);
+    $("#tender-engineering").html(engineeringHtml);
+    $('#valuation-info').hide();
+    changeEngineering();
+}
+
 function changeFeeRate(engLib) {
     if(engLib){
         /*