Browse Source

解决物料档案维护新版本失败之后加载效果没有关闭

002390 2 năm trước cách đây
mục cha
commit
22fc0059af
1 tập tin đã thay đổi với 10 bổ sung5 xóa
  1. 10 5
      src/views/material/basicFile/details.vue

+ 10 - 5
src/views/material/basicFile/details.vue

@@ -89,7 +89,7 @@
         <el-col :span="6" style="text-align: right;">
           <!-- 附件管理 -->
         <!-- <el-button-group>
-                                                                                                                                                    <el-button size="small" icon="el-icon-paperclip" @click="handleFile"></el-button></el-button-group> -->
+                                                                                                                                                      <el-button size="small" icon="el-icon-paperclip" @click="handleFile"></el-button></el-button-group> -->
 
           <!-- 切换 -->
         <!-- <el-button-group>
@@ -100,7 +100,7 @@
             <el-button size="small" icon="el-icon-arrow-right" :disabled="!handleBasicEdit"
               @click="handleChangePage('next')" />
             <el-button size="small" icon="el-icon-d-arrow-right" :disabled="!handleBasicEdit"
-                                                                                                                                                  @click="handleChangePage('end')" /></el-button-group> -->
+                                                                                                                                                    @click="handleChangePage('end')" /></el-button-group> -->
         </el-col>
       </el-row>
 
@@ -410,7 +410,7 @@
               :disabled="!(materialType.isEdit && mt.edit)" v-model="scope.row[mt.prop]" :key="scope.row[mt.prop]">
               <el-option v-if="mt.dictId" v-for="d in mt.dictId" :key="d.dictValue" :label="d.dictLabel"
                 :value="d.dictValue">
-                                                                                                                                                                </el-option></el-select> -->
+                                                                                                                                                                  </el-option></el-select> -->
 
             <!-- 其他类型 -->
             <el-input v-else size="small" v-model="scope.row[mt.prop]" :readonly="!(materialType.isEdit && mt.edit)" />
@@ -1511,11 +1511,14 @@ export default {
       }
       materialApi.saveVersions(data).then(res => {
         console.log(res, '维护物料保存');
-        this.loading = false;
+
         if (res.code == 200) {
           cb();
         }
       })
+        .catch((error) => {
+          this.loading = false;
+        })
     },
     // 取消保存
     handleCancel() {
@@ -1917,9 +1920,11 @@ export default {
       param.diCode = param.diCode.replace(/ /g, '');
       console.log(param, '保存物料以及相关页签param');
       materialApi.insertMaterialInfo(param).then(res => {
-        this.loading = false;
+        
         console.log(res, '保存物料以及相关页签');
         if (res.code == 200) cb();
+      }).catch((error)=>{
+        this.loading = false;
       })
     },
     // 保存财务信息——单个数据