Ver Fonte

处理其他主页签刷新按钮,刷新的是基本信息页签问题

002390 há 2 anos atrás
pai
commit
fb268677ad
1 ficheiros alterados com 65 adições e 61 exclusões
  1. 65 61
      src/views/material/basicFile/details.vue

+ 65 - 61
src/views/material/basicFile/details.vue

@@ -29,7 +29,7 @@
               </el-dropdown-menu>
             </el-dropdown>
 
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <el-button size="small" @click="handleQuery">查询</el-button> -->
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <el-button size="small" @click="handleQuery">查询</el-button> -->
             <el-button size="small" @click="handleRefresh">刷新</el-button>
 
           </el-button-group>
@@ -47,7 +47,7 @@
               启用
               <el-dropdown-menu slot="dropdown">
                 <el-dropdown-item :command="isInvoke(true)">启用</el-dropdown-item>
-                                                                                                                      <el-dropdown-item :command="isInvoke(false)">停用</el-dropdown-item></el-dropdown-menu></el-dropdown> -->
+                                                                                                                            <el-dropdown-item :command="isInvoke(false)">停用</el-dropdown-item></el-dropdown-menu></el-dropdown> -->
           </el-button-group>
         </el-col>
 
@@ -56,7 +56,7 @@
           <el-button-group>
             <el-button size="small" @click="handleQueryForm">申请单查询</el-button>
           </el-button-group>
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                </el-col> -->
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      </el-col> -->
 
         <!-- 导入导出 -->
       <!-- <el-col :span="1.5">
@@ -64,7 +64,7 @@
             <el-button size="small" @click="handleImport">批量导入</el-button>
             <el-button size="small" @click="handleExport">批量导出</el-button>
           </el-button-group>
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  </el-col> -->
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </el-col> -->
 
       </el-row>
 
@@ -94,7 +94,7 @@
           <el-button size="small" @click="handleOtherDel">删除</el-button>
         </el-button-group>
         <el-button-group>
-          <el-button size="small" @click="handleRefresh">刷新</el-button>
+          <el-button size="small" @click="handleOtherListRefresh">刷新</el-button>
         </el-button-group>
       </el-col>
     </el-row>
@@ -109,7 +109,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>
@@ -120,7 +120,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>
 
@@ -430,7 +430,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)" />
@@ -827,59 +827,7 @@ export default {
       this.collapseActive.splice(1, 1, this.activeMainTab);
       console.log(this.collapseActive, 'this.collapseActive');
 
-      switch (this.activeMainTab) {
-
-        // 基本信息
-        case 'material':
-          this.getTagList('material', (form) => {
-            this.basicData.form = form;
-            this.getMaterialDetails(this.materialId, 'material');
-          })
-          break;
-        // 财物信息
-        case 'material_finance':
-          this.getTagList('material_finance', (form) => {
-            this.mainMsg.form = form;
-            this.getFinanceList(this.materialId);
-          });
-          break;
-        // 利润中心信息
-        case 'profit_center':
-          this.getTagList('profit_center', (form) => {
-            this.mainMsg.form = form;
-            this.getCenterList(this.materialId);
-          });
-          break;
-        // 采购信息
-        case 'material_purchase':
-          this.getTagList('material_purchase', (form) => {
-            this.mainMsg.form = form;
-            this.getPurchaseList(this.materialId);
-          });
-          break;
-        // 库存信息
-        case 'material_inventory':
-          this.getTagList('material_inventory', (form) => {
-            this.mainMsg.form = form;
-            this.getInventoryList(this.materialId);
-          });
-          break;
-        // 计划信息
-        case 'material_plan':
-          this.getTagList('material_plan', (form) => {
-            this.mainMsg.form = form;
-            this.getPlanList(this.materialId);
-          });
-          break;
-        // 成本信息
-        case 'material_cost':
-          this.getTagList('material_cost', (form) => {
-            this.mainMsg.form = form;
-            this.getCostList(this.materialId);
-          });
-          break;
-        default: break;
-      }
+      this.handleOtherListRefresh();
 
     },
     // 切换副表信息
@@ -1423,6 +1371,62 @@ export default {
         });
       }
     },
+    // 其他标签页刷新
+    handleOtherListRefresh() {
+      switch (this.activeMainTab) {
+
+        // 基本信息
+        case 'material':
+          this.getTagList('material', (form) => {
+            this.basicData.form = form;
+            this.getMaterialDetails(this.materialId, 'material');
+          })
+          break;
+        // 财物信息
+        case 'material_finance':
+          this.getTagList('material_finance', (form) => {
+            this.mainMsg.form = form;
+            this.getFinanceList(this.materialId);
+          });
+          break;
+        // 利润中心信息
+        case 'profit_center':
+          this.getTagList('profit_center', (form) => {
+            this.mainMsg.form = form;
+            this.getCenterList(this.materialId);
+          });
+          break;
+        // 采购信息
+        case 'material_purchase':
+          this.getTagList('material_purchase', (form) => {
+            this.mainMsg.form = form;
+            this.getPurchaseList(this.materialId);
+          });
+          break;
+        // 库存信息
+        case 'material_inventory':
+          this.getTagList('material_inventory', (form) => {
+            this.mainMsg.form = form;
+            this.getInventoryList(this.materialId);
+          });
+          break;
+        // 计划信息
+        case 'material_plan':
+          this.getTagList('material_plan', (form) => {
+            this.mainMsg.form = form;
+            this.getPlanList(this.materialId);
+          });
+          break;
+        // 成本信息
+        case 'material_cost':
+          this.getTagList('material_cost', (form) => {
+            this.mainMsg.form = form;
+            this.getCostList(this.materialId);
+          });
+          break;
+        default: break;
+      }
+    },
     // 修改
     handleBasicEdit() {
       console.log('修改基本信息');