zhangweicheng 6 gadi atpakaļ
vecāks
revīzija
7b7ad50fe9

+ 4 - 2
modules/pm/models/project_model.js

@@ -147,8 +147,10 @@ ProjectsDAO.prototype.updateUserProjects = async function (userId, compilationId
                         user_id: userId,
                         root_project_id: data.updateData.property.rootProjectID
                     };
-                    let overWrite = require("../../.."+compilation.overWriteUrl);
-                    if(overWrite.getDefalutAssistProductionFeeRate) insertData.assistProductionFeeRate = overWrite.getDefalutAssistProductionFeeRate();
+                    if(compilation.overWriteUrl && compilation.overWriteUrl!=""){
+                        let overWrite = require("../../.."+compilation.overWriteUrl);
+                        if(overWrite.getDefalutAssistProductionFeeRate) insertData.assistProductionFeeRate = overWrite.getDefalutAssistProductionFeeRate();
+                    }
                     let addResult = await unitPriceFileModel.add(insertData);
                     if (!addResult) {
                         callback(1, '新增单价文件失败.', null);

+ 3 - 0
web/building_saas/pm/js/pm_newMain.js

@@ -3678,6 +3678,9 @@ $("#confirm-import").click(function() {
                 $.bootstrapLoading.progressEnd();
                 if(response.error == 1){
                     alert(response.msg);
+                    setTimeout(function () {
+                        $.bootstrapLoading.progressEnd();//不做这个的话太快,页面不会自动关闭
+                    },500)
                 }else {
                     refreshAllPage();
                 }