Ver Fonte

1.物料基本信息列表-关闭导入弹窗清空导入列表中的数据
2.物料基本信息详情-隐藏财物页签中的删除按钮

002390 há 2 anos atrás
pai
commit
fc85aa96c5

+ 25 - 12
src/views/material/basicFile/details.vue

@@ -71,7 +71,7 @@
       <el-col :span="1.5">
         <el-button-group>
           <el-button size="small" @click="handleOtherEdit">修改</el-button>
-          <el-button size="small" @click="handleOtherDel">删除</el-button>
+          <el-button size="small" v-show="activeMainTab != 'material_finance'" @click="handleOtherDel">删除</el-button>
         </el-button-group>
         <el-button-group>
           <el-button size="small" @click="handleOtherListRefresh">刷新</el-button>
@@ -88,8 +88,7 @@
         </el-col>
         <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-group> <el-button size="small" icon="el-icon-paperclip" @click="handleFile"></el-button></el-button-group> -->
 
           <!-- 切换 -->
           <!-- <el-button-group>
@@ -100,7 +99,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>
 
@@ -213,7 +212,7 @@
                 <el-table v-else :data="mainMsg.value" @cell-dblclick="handleMaindbClick"
                   @selection-change="handleMainChange">
                   <el-table-column type="selection" width="55" />
-                  <el-table-column type="index" label="序号" width="55" align="center" />
+                  <el-table-column type="index" v-if="mainMsg.form.length" label="序号" width="55" align="center" />
                   <el-table-column v-for="m in  mainMsg.form" v-if="m.show" :label="m.name" align="center"
                     :prop="m.attribute == 'select' ? `${m.prop}Name` : m.prop" show-overflow-tooltip>
                     <template slot-scope="scope">
@@ -303,7 +302,7 @@
                     <!-- 辅计量 -->
                     <el-table v-else-if="activeViceTab == 'material_unit'" :data="unitDetails.value"
                       class="material-table">
-                      <el-table-column type="index" label="序号" width="55" align="center" />
+                      <el-table-column type="index" v-if="unitDetails.form.length" label="序号" width="55" align="center" />
                       <el-table-column v-for="v in  unitDetails.form" v-if="v.show" :label="v.name" align="center"
                         :prop="v.attribute == 'select' ? `${v.prop}Name` : v.prop" show-overflow-tooltip>
                         <template slot-scope="scope">
@@ -319,7 +318,8 @@
                     <!-- 辅助属性 -->
                     <el-table v-else-if="activeViceTab == 'material_property'" :data="propertyDetail.value"
                       class="material-table">
-                      <el-table-column type="index" label="序号" width="55" align="center" />
+                      <el-table-column type="index" v-if="propertyDetail.form.length" label="序号" width="55"
+                        align="center" />
                       <el-table-column v-for="v in  propertyDetail.form" v-if="v.show" :label="v.name" align="center"
                         :prop="v.attribute == 'select' ? `${v.prop}Name` : v.prop" show-overflow-tooltip>
                         <template slot-scope="scope">
@@ -1871,24 +1871,36 @@ export default {
     handledDelCenter(ids) {
       console.log('删除利润中心信息');
       materialApi.delCenter(ids).then(res => {
+        if (res.code == 200) {
+          this.handleOtherListRefresh();
+        }
       })
     },
     // 删除库存信息
     handleDelInventory(ids) {
       console.log('删除库存信息');
       materialApi.delInventory(ids).then(res => {
+        if (res.code == 200) {
+          this.handleOtherListRefresh();
+        }
       })
     },
     // 删除成本信息
     handleDelCost(ids) {
       console.log('删除成本信息');
       materialApi.delCost(ids).then(res => {
+        if (res.code == 200) {
+          this.handleOtherListRefresh();
+        }
       })
     },
     // 删除计划信息
     handleDelPlan(ids) {
       console.log('删除计划信息');
       materialApi.delPlan(ids).then(res => {
+        if (res.code == 200) {
+          this.handleOtherListRefresh();
+        }
 
       })
     },
@@ -1896,17 +1908,18 @@ export default {
     handleDelFinance(ids) {
       console.log('删除财物信息');
       materialApi.delFinance(ids).then(res => {
-
-        // if(res.code == 200){
-        //   this.handleOtherRefresh();
-        // }
+        if (res.code == 200) {
+          this.handleOtherListRefresh();
+        }
       })
     },
     // 删除采购信息
     handledelPurchase(ids) {
       console.log('删除采购信息');
       materialApi.delPurchase(ids).then(res => {
-
+        if (res.code == 200) {
+          this.handleOtherListRefresh();
+        }
       });
     },
 

+ 1 - 1
src/views/material/basicFile/index.vue

@@ -128,7 +128,7 @@
     </el-dialog>
 
     <!-- 导入弹窗 -->
-    <el-dialog title="批量导入" :visible.sync="importData.show" width="35%" center @before-close="handlefileDialogColse">
+    <el-dialog title="批量导入" :visible.sync="importData.show" width="35%" center :before-close="handlefileDialogColse">
       <div class="mb-import">
         <el-upload class="upload-demo" accept=".xls, .xlsx" ref="upload" action="#" :on-remove="handleFileRemove"
           :file-list="importData.list" :auto-upload="false" :on-change="handleChangeFile" :limit="1">

+ 4 - 4
vue.config.js

@@ -137,10 +137,10 @@ module.exports = {
         },
       });
       config.optimization.runtimeChunk("single"),
-        {
-          from: path.resolve(__dirname, "./public/robots.txt"), //防爬虫文件
-          to: "./", //到根目录下
-        };
+      {
+        from: path.resolve(__dirname, "./public/robots.txt"), //防爬虫文件
+        to: "./", //到根目录下
+      };
     });
   },
 };