Browse Source

调整物料提示框

002390 1 year ago
parent
commit
7e740150ff

+ 88 - 39
src/views/material/basicFile/details.vue

@@ -660,8 +660,15 @@
     </el-dialog>
 
     <!-- 参照弹窗 -->
-    <el-dialog :title="MoreDataDialog.msg.name" :visible.sync="MoreDataDialog.show" width="70%" class="MoreDataDialog"
-               :close-on-press-escape="false" :close-on-click-modal="false" :before-close="handleCloseRefer">
+    <el-dialog 
+      :title="MoreDataDialog.msg.name" 
+      :visible.sync="MoreDataDialog.show" 
+      width="70%" 
+      class="MoreDataDialog"
+      :close-on-press-escape="false" 
+      :close-on-click-modal="false" 
+      :before-close="handleCloseRefer"
+    >
       <div>
         <el-row>
           <el-col :span="1.5">
@@ -669,22 +676,40 @@
           </el-col>
         </el-row>
         <!-- 树形 -->
-        <el-tree class="referTree" v-loading="MoreDataDialog.loading" v-if="MoreDataDialog.type == 'tree'"
-                 :data="MoreDataDialog.list" @node-click="handleNodeClick" :key="refer"
-                 :props="MoreDataDialog.msg.apiUrl == 'queryMedcineItemDrug' ? drugProps : defaultProps" node-key="id">
+        <el-tree 
+          class="referTree" 
+          v-loading="MoreDataDialog.loading" 
+          v-if="MoreDataDialog.type == 'tree'"
+          :data="MoreDataDialog.list" 
+          @node-click="handleNodeClick" 
+          :key="refer"
+          :props="MoreDataDialog.msg.apiUrl == 'queryMedcineItemDrug' ? drugProps : defaultProps" 
+          node-key="id"
+        >
         </el-tree>
         <!-- queryMedcineItemDrug -->
         <!-- 列表 -->
         <div v-else>
-          <el-table  border :data="MoreDataDialog.list" v-loading="MoreDataDialog.loading" style="width: 100%"
-                    @row-click="handleCurentRow" highlight-current-row>
+          <el-table  
+            border 
+            :data="MoreDataDialog.list"
+            v-loading="MoreDataDialog.loading" 
+            style="width: 100%"
+            @row-click="handleCurentRow" 
+            highlight-current-row
+          >
             <el-table-column type="index" label="序号" width="55" align="center"/>
             <el-table-column v-for="m in MoreDataDialog.form" v-if="m.show" :prop="m.prop" :label="m.name"/>
           </el-table>
 
-          <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
-                         :current-page="queryParams.pageNum" :page-sizes="[10, 20, 50, 100]"
-                         layout="total, sizes, prev, pager, next, jumper" :total="queryParams.total">
+          <el-pagination 
+            @size-change="handleSizeChange" 
+            @current-change="handleCurrentChange"
+            :current-page="queryParams.pageNum" 
+            :page-sizes="[10, 20, 50, 100]"
+            layout="total, sizes, prev, pager, next, jumper" 
+            :total="queryParams.total"
+          >
           </el-pagination>
         </div>
 
@@ -1509,7 +1534,8 @@
 
       // 新增
       handleInster() {
-        this.$message({
+        this.$notify({
+          title: '警告',
           message: '物料只能通过申请审批增加,不能在节点直接录入!',
           type: 'warning'
         });
@@ -1529,7 +1555,8 @@
             // 查询其他标签页列表详情
             this.getOtherListDetails(activeTab.code, this.otherDeatils.queryKey);
           } else {
-            this.$message({
+            this.$notify({
+              title: '警告',
               message: '修改请选择单个数据!',
               type: 'warning'
             });
@@ -1583,10 +1610,11 @@
               break;
           }
         } else {
-          this.$message({
-            message: '请选择需要删除的数据!',
-            type: 'warning'
-          });
+          this.$notify({
+              title: '警告',
+              message: '请选择需要删除的数据!',
+              type: 'warning'
+            });
         }
       },
       // 其他标签页刷新
@@ -1728,7 +1756,8 @@
             _this.maintainNewVersion = res.data.result;
             // 维护版本消息展示 by shiy 2023/05/31
             if (!res.data.result) {
-              this.$message({
+              this.$notify({
+                title: '警告',
                 message: res.data.msg,
                 type: 'warning'
               });
@@ -1782,7 +1811,11 @@
               this.handleRefresh();
             })
           } else {
-            this.$message.error('存在必填项未填写');
+            this.$notify.error({
+              title: '错误',
+              message: '存在必填项未填写!'
+            });
+            
             console.log('error submit!!');
             return false;
           }
@@ -1828,10 +1861,12 @@
                 })
               })
             } else {
-              this.$message({
+              this.$notify({
+                title: '警告',
                 message: '请选择需要删除的信息!',
                 type: 'warning'
               });
+              
             }
             break;
           // 取消
@@ -1861,10 +1896,12 @@
                 })
                 // 保存
               } else {
-                this.$message({
-                  message: '不能保存空数据或存在数据为空!',
-                  type: 'warning'
-                });
+                this.$notify({
+                title: '警告',
+                message: '不能保存空数据或存在数据为空!',
+                type: 'warning'
+              });
+                
               }
             } else {
               // 非编辑状态
@@ -1876,10 +1913,11 @@
           default:
             console.log('物料类别刷新');
             if (this.materialType.isEdit) {
-              this.$message({
+              this.$notify({
+                title: '警告',
                 message: '请先保存数据!',
                 type: 'warning'
-              })
+              });
             } else {
               this.materialType.loading = true;
               this.getTagList('material_medcine_item', (form) => {
@@ -1895,10 +1933,11 @@
       handleCloseTypeDetails(done) {
 
         console.log('物料类别弹窗关闭前');
-        this.materialType.isEdit ? this.$message({
-          message: '请先保存数据!',
-          type: 'warning'
-        }) : done();
+        this.materialType.isEdit ? this.$notify({
+                title: '警告',
+                message: '请先保存数据!',
+                type: 'warning'
+              }): done();
 
       },
       // 保存修改并新增
@@ -1951,7 +1990,8 @@
         console.log('其他页签详情弹窗关闭事件');
         // 处于编辑状态
         if (this.otherDeatils.isEdit) {
-          this.$message({
+          this.$notify({
+            title: '警告',
             message: '请先退出编辑操作',
             type: 'warning'
           });
@@ -2082,7 +2122,8 @@
               let drug = _this.materialType.value.filter(d => d.drugId == _this.MoreDataDialog.value['id'])
               console.log(drug, 'drug------------------------------------');
               if (drug.length) {
-                _this.$message({
+                _this.$notify({
+                  title: '警告',
                   message: '不能维护相同的物料类别!',
                   type: 'warning'
                 });
@@ -2208,7 +2249,8 @@
           if (code == 200) {
             this.otherDeatils.isEdit = false;
             this.handleOtherRefresh();
-            this.$message({
+            this.$notify({
+              title: '成功',
               message: msg,
               type: 'success'
             });
@@ -2240,7 +2282,8 @@
           if (code == 200) {
             this.otherDeatils.isEdit = false;
             this.handleOtherRefresh();
-            this.$message({
+            this.$notify({
+              title: '成功',
               message: msg,
               type: 'success'
             });
@@ -2269,7 +2312,8 @@
           if (code == 200) {
             this.otherDeatils.isEdit = false;
             this.handleOtherRefresh();
-            this.$message({
+            this.$notify({
+              title: '成功',
               message: msg,
               type: 'success'
             });
@@ -2298,7 +2342,8 @@
           if (code == 200) {
             this.otherDeatils.isEdit = false;
             this.handleOtherRefresh();
-            this.$message({
+            this.$notify({
+              title: '成功',
               message: msg,
               type: 'success'
             });
@@ -2328,7 +2373,8 @@
           if (code == 200) {
             this.otherDeatils.isEdit = false;
             this.handleOtherRefresh();
-            this.$message({
+            this.$notify({
+              title: '成功',
               message: msg,
               type: 'success'
             });
@@ -2357,7 +2403,8 @@
           if (code == 200) {
             this.otherDeatils.isEdit = false;
             this.handleOtherRefresh();
-            this.$message({
+            this.$notify({
+              title: '成功',
               message: msg,
               type: 'success'
             });
@@ -2538,11 +2585,13 @@
 <style lang="scss">
   .material-details {
     padding: 12px;
-    height: calc(100vh - 158px);
+    height: 100%;
+    // height: calc(100vh - 158px);
     box-sizing: border-box;
 
     .el-card__body {
-      height: calc(100vh - 160px);
+      // height: calc(100vh - 160px);
+      height: 100%;
       box-sizing: border-box;
       padding: 12px;
       overflow-y: auto;

+ 51 - 28
src/views/material/basicFile/index.vue

@@ -40,6 +40,11 @@
 
       </el-row>
 
+     
+    </div>
+
+    <!-- 主体列表 -->
+    <el-card class="material-list" v-loading="loading">
       <el-row 
         :gutter="10" 
         class="mb10"
@@ -97,17 +102,27 @@
 
 
       </el-row>
-    </div>
 
-    <!-- 主体列表 -->
-    <el-card class="material-list" v-loading="loading">
-      <el-table border :data="taskList" ref="materialTable" @cell-dblclick="handledbClick" :row-key="getRowKey"
-                @selection-change="handleSelectionChange" @select="handleSelect" @select-all="handleSelectAll">
+      <el-table 
+        border 
+        :data="taskList" 
+        ref="materialTable" 
+        @cell-dblclick="handledbClick" 
+        :row-key="getRowKey"
+        @selection-change="handleSelectionChange" 
+        @select="handleSelect" 
+        @select-all="handleSelectAll"
+      >
         <!--  -->
         <el-table-column type="selection" width="45" :reserve-selection="true"/>
         <el-table-column type="index" label="序号" width="55" align="center"/>
-        <el-table-column width="150" v-for="h in  tableHeader" v-if="h.show" :label="h.name" align="center"
-                         show-overflow-tooltip>
+        <el-table-column 
+          width="150" 
+          v-for="h in  tableHeader" v-if="h.show" 
+          :label="h.name" 
+          align="center"
+          show-overflow-tooltip
+        >
           <!-- :prop="h.attribute == 'select' ? `${h.prop}Name` : h.prop" -->
           <template slot-scope="scope">
             {{ h.attribute == 'select' ? scope.row[`${h.prop}Name`] :
@@ -119,9 +134,14 @@
         </el-table-column>
       </el-table>
 
-      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
-                     :current-page="queryParams.pageNum" :page-sizes="[10, 20, 50, 100]"
-                     layout="total, sizes, prev, pager, next, jumper" :total="total">
+      <el-pagination 
+        @size-change="handleSizeChange" 
+        @current-change="handleCurrentChange"
+        :current-page="queryParams.pageNum" 
+        :page-sizes="[10, 20, 50, 100]"
+        layout="total, sizes, prev, pager, next, jumper" 
+        :total="total"
+      >
       </el-pagination>
     </el-card>
 
@@ -216,7 +236,8 @@
       },
       // 新增
       handleInster() {
-        this.$message({
+        this.$notify({
+          title: '警告',
           message: '物料只能通过申请审批增加,不能在节点直接录入!',
           type: 'warning'
         });
@@ -231,7 +252,8 @@
             }
           });
         } else {
-          this.$message({
+          this.$notify({
+            title: '警告',
             message: `${this.checkedList.length > 1 ? '修改只能选择单个数据!' : '请选择需要修改的信息!'}`,
             type: 'warning'
           });
@@ -252,8 +274,9 @@
             }
           })
         } else {
-          this.$message({
-            message: '请选择需要删除的数据!',
+          this.$notify({
+            title: '警告',
+            message: `请选择需要删除的数据!`,
             type: 'warning'
           });
         }
@@ -364,21 +387,23 @@
                       })
                     }
                   }
-                  this.$message({
+                  this.$notify({
                     message: res.data.msg,
                     type: res.data.flag ? 'warning' : 'success'
                   });
+                  
                 } else {
-                  this.$message({
+                  this.$notify({
                     message: res.msg,
                     type: res.code == 200 ? 'success' : 'warning'
                   });
                 }
               })
             } else {
-              this.$message({
+              this.$notify({
+                title:'警告',
                 message: '请上传文件之后在确认!',
-                type: 'warning'
+                type: 'warning',
               });
             }
             break;
@@ -407,10 +432,11 @@
           }
           this.download('/system/material/export', params, `物料基本信息${new Date().getTime()}.xlsx`);
         } else {
-          this.$message({
-            message: '请选择需要导出的数据!',
-            type: 'warning'
-          });
+          this.$notify({
+                title:'警告',
+                message: '请选择需要导出的数据!',
+                type: 'warning'
+              });
         }
 
       },
@@ -543,7 +569,7 @@
 <style lang="scss">
   .material-list {
     // height: calc(100% - 100px);
-    height: calc(100% - 70px);
+    // height: calc(100% - 70px);
 
 
     .el-card__body {
@@ -551,17 +577,14 @@
       box-sizing: border-box;
 
       .el-table {
-        height: calc(100% - 35px);
+        // height: calc(100% - 35px);
         overflow: auto;
 
         .el-table__body-wrapper {
           // height: calc(100% - 150px);
-          height: calc(100% - 70px);
+          // height: calc(100% - 70px);
           overflow-y: auto !important;
           overflow-x: auto !important;
-          // .el-table__body {
-          //   height: 100%;
-          // }
         }
       }
     }

+ 1 - 1
src/views/material/basicFile/style/index.scss

@@ -1,6 +1,6 @@
 // 物料信息基础档案
 .material-basic {
-  height: calc(100vh - 84px);
+  // height: calc(100vh - 84px);
   padding: 12px;
   box-sizing: border-box;