Browse Source

结束loading

Qukatie 13 hours ago
parent
commit
74b013464f

+ 8 - 2
src/views/tirePartsMall/purchasingManagement/warehouseEntryOrder/detailsPage.vue

@@ -127,7 +127,12 @@
                 <el-button v-if="reservoirArea == 1" type="success" size="small" @click="allClick('导入库区')" :disabled="editDisabled"
                   >导入库区</el-button
                 >
-                <el-button v-if="reservoirArea == 1" type="success" size="small" @click="allClick('一键清空库区')" :disabled="editDisabled|| selectionMultilist.length == 0"
+                <el-button
+                  v-if="reservoirArea == 1"
+                  type="success"
+                  size="small"
+                  @click="allClick('一键清空库区')"
+                  :disabled="editDisabled || selectionMultilist.length == 0"
                   >一键清空库区</el-button
                 >
               </template>
@@ -1093,7 +1098,7 @@ export default {
                 this.refresh(this.form.id);
               } else {
                 this.$message.success("撤销成功");
-                this.refresh(this.form.id,true);
+                this.refresh(this.form.id, true);
               }
             })
             .finally(() => {
@@ -1151,6 +1156,7 @@ export default {
           })
             .then(res => {
               if (res.data.code === 601) {
+                loading.close();
                 this.$message({
                   type: "error",
                   message: res.data.msg

+ 5 - 4
src/views/tirePartsMall/salesManagement/outboundWorkOrder/detailsPage.vue

@@ -740,7 +740,7 @@ export default {
                 this.refresh(this.form.id);
               } else {
                 this.$message.success("撤销成功");
-                this.refresh(this.form.id,true);
+                this.refresh(this.form.id, true);
               }
             })
             .finally(() => {
@@ -805,6 +805,7 @@ export default {
           })
             .then(res => {
               if (res.data.code === 601) {
+                loading.close();
                 this.$message({
                   type: "error",
                   message: res.data.msg
@@ -884,20 +885,20 @@ export default {
         }
       });
     },
-    refresh(id,type) {
+    refresh(id, type) {
       const loading = this.$loading({
         lock: true,
         text: "加载中",
         spinner: "el-icon-loading",
         background: "rgba(255,255,255,0.7)"
       });
-      getDetails({ id:id })
+      getDetails({ id: id })
         .then(res => {
           if (res.data.data.statusName == "已出库") {
             this.editDisabled = true;
             this.optionForm.disabled = true;
           }
-          if(type&&!this.editButton){
+          if (type && !this.editButton) {
             this.editDisabled = false;
             this.optionForm.disabled = false;
           }