Browse Source

Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass

luobang 2 năm trước cách đây
mục cha
commit
ca7a8db8b7

+ 8 - 9
src/views/TMS/components/importedMine/addWagonloadCopy.vue

@@ -204,7 +204,7 @@
       </div>
       <div class="button-box">
         <el-button @click="cancel">取消</el-button>
-        <el-button type="primary" :disabled="disable" @click="makeSure"
+        <el-button type="primary" :loading="isLoading" @click="makeSure"
           >确定</el-button
         >
       </div>
@@ -256,7 +256,7 @@ export default {
   components: { PageTitle },
   data() {
     return {
-      disable: false,
+      isLoading: false,
       list: [],
       form1: {},
       tableData: [],
@@ -523,7 +523,7 @@ export default {
     },
     // 确定
     makeSure() {
-      this.disable = true;
+      this.isLoading = true;
       let state = 0;
       if (
         this.list.length > 0 &&
@@ -538,7 +538,7 @@ export default {
       ) {
         state = 1;
       } else {
-        this.disable = false;
+        this.isLoading = false;
         console.log(this.list.length);
         if (this.list.length == 0) {
           this.$message({
@@ -627,7 +627,7 @@ export default {
           });
           if(!flag){
             this.$message.warning("拼装车的标重不存在!");
-            this.disable = false;
+            this.isLoading = false;
             return ;
           }
         }
@@ -640,19 +640,18 @@ export default {
                 type: "success",
                 message: "新增成功"
               });
-              this.disable = false;
               this.cancel();
             } else {
-              this.disable = false;
               this.$message({
                 type: "error",
                 message: res.data.data
               });
             }
+            this.isLoading = false;
           })
           .catch(() => {
             this.$message.error("请联系管理员");
-            this.disable = false;
+            this.isLoading = false;
           });
       }
     },
@@ -690,7 +689,7 @@ export default {
         if (rows.length > 0) {
           that.list = [];
           that.tableData = [];
-          that.disable = false;
+          that.isLoading = false;
           if (typeof rows[0]["车皮号"] == "undefined") {
             that.$message({
               message: "车皮号不存在!请参考下方格式!",

+ 5 - 1
src/views/TMS/components/importedShip/addUnloadShip.vue

@@ -18,7 +18,7 @@
       </div>
     </div>
     <div class="button_box">
-      <el-button type="primary" @click="makeSure">新增卸船作业</el-button>
+      <el-button type="primary" :loading="isLoading" @click="makeSure">新增卸船作业</el-button>
     </div>
   </div>
 </template>
@@ -31,6 +31,7 @@ export default {
   data() {
     return {
       input: "",
+      isLoading:false,
       restaurants: [],
       state: "",
       form: {},
@@ -77,9 +78,11 @@ export default {
     },
     // 新增
     makeSure() {
+      this.isLoading=true;
       console.log(this.unloadMap);
       if (JSON.stringify(this.unloadMap).length == 2) {
         this.$message.error("请先选择卸船的船只!");
+        this.isLoading=false;
         return;
       }
       if (
@@ -133,6 +136,7 @@ export default {
           } else {
             this.$message.error("新增失败!");
           }
+          this.isLoading=false;
         });
     },
     loadAll() {