浏览代码

单价文件、费率文件选择为空时的处理

zhongzewei 7 年之前
父节点
当前提交
1c7fe925cb

+ 5 - 0
web/building_saas/main/js/models/project_glj.js

@@ -502,6 +502,11 @@ ProjectGLJ.prototype.changeFile = function (changeData,callback) {
             }
             $.bootstrapLoading.end();
         });
+    }, function (err) {
+        if($.bootstrapLoading.isLoading()){
+            $.bootstrapLoading.end();
+        }
+        alert(err.msg);
     });
 };
 

+ 7 - 0
web/building_saas/main/js/views/fee_rate_view.js

@@ -791,6 +791,13 @@ var feeRateObject={
     changeFeeRateFileFromCurrent:function(){
         $.bootstrapLoading.start();
         var newVal = $("#currentOptions").val();
+        if(!$("#currentOptions").val()){
+            if($.bootstrapLoading.isLoading()){
+                $.bootstrapLoading.end();
+            }
+            alert('费率文件不可为空');
+            return;
+        }
         if($("#currentOptions").val()==this.activateFeeRate.ID){
             return;
         }

+ 4 - 0
web/building_saas/main/js/views/project_glj_view.js

@@ -1205,6 +1205,10 @@ $(function () {
         if (type === 0) {
             // 从本项目中选择
             changeUnitPriceId = $("#self-file").val();
+            if(!changeUnitPriceId){
+                alert('单价文件不可为空');
+                return;
+            }
         } else {
             // 从其他项目中复制
             changeUnitPriceId = $("#other-file").val();