Ver código fonte

计划内拜访页面添加物料发放历史按钮

zhujindu 7 meses atrás
pai
commit
be58d35075

+ 7 - 1
src/views/deviceOutside/suishenbangOutstoreVisit.vue

@@ -925,7 +925,7 @@ export default {
   position: relative;
 }
 .el-dialog__wrapper {
-  z-index: 3333 !important;
+  z-index: 9999 !important;
   display: flex;
   justify-content: center;
   align-items: center;
@@ -935,8 +935,14 @@ export default {
     display: flex;
     flex-direction: column;
     max-height: 70%;
+    margin-top: 0 !important;
     .el-dialog__header {
       height: 40px;
+      display: flex;
+      justify-content: right;
+      .el-dialog__headerbtn {
+        position: static !important;
+      }
     }
     .el-dialog__body {
       padding: 30px 20px !important;

+ 75 - 0
src/views/deviceWithin/storeVisit.vue

@@ -43,6 +43,15 @@
           @click="overbookingFn(urlParameter)"
           >去下单</van-button
         >
+        <van-button
+          type="info"
+          style="background: rgb(0, 87, 186); color: #fff; margin: 10px; border-radius: 5px"
+          size="small"
+          plain
+          class="centerBtn"
+          @click="wuliaoLog(urlParameter)"
+          >物料历史</van-button
+        >
         <van-button
           v-if="insert"
           type="info"
@@ -124,6 +133,21 @@
       </div>
     </van-dialog>
     <div id="allmap"></div>
+    <!-- 物料历史列表 -->
+    <el-dialog
+      :visible.sync="wuliaoTable"
+      width="90%"
+      :append-to-body="true"
+      :close-on-click-modal="false"
+      @close="wuliaoTableClose"
+      custom-class="wuliaoTable">
+      <el-table :data="wuliaoList" border style="width: 100%">
+        <el-table-column label="物料名称" prop="materialDataName" align="center" />
+        <el-table-column label="发放时间" prop="issuerTime" align="center" />
+        <el-table-column label="数量" prop="inventoryNum" width="60" align="center" />
+        <el-table-column label="签收状态" prop="receiptState" width="60" align="center" />
+      </el-table>
+    </el-dialog>
   </div>
 </template>
 
@@ -136,6 +160,7 @@ import {
   stopVisit,
   restartProcess,
   buryingPoint,
+  getMaterialHistory,
 } from '@/api/index';
 import axios from 'axios';
 import sp from './../../assets/sp.png';
@@ -185,6 +210,8 @@ export default {
       uType: '-1',
       showOrderButton: null,
       restartProcessButtion: false,
+      wuliaoTable: false,
+      wuliaoList: [],
     };
   },
   created() {
@@ -706,6 +733,24 @@ export default {
         this.$router.go(-1);
       }
     },
+    // 物料历史
+    wuliaoLog() {
+      this.toastLoading(0, '加载中...', true);
+      getMaterialHistory({ storeId: this.storeId })
+        .then((res) => {
+          this.toastLoading().clear();
+          if (res.code == 200 && res.data) {
+            this.wuliaoList = res.data;
+            this.wuliaoTable = true;
+          }
+        })
+        .catch(() => {
+          this.toastLoading().clear();
+        });
+    },
+    wuliaoTableClose() {
+      this.wuliaoTable = false;
+    },
     endVisitsFn(val) {
       let loading1 = this.$toast.loading({
         duration: 0,
@@ -888,4 +933,34 @@ export default {
   left: -1000px;
   position: relative;
 }
+.el-dialog__wrapper {
+  z-index: 9999 !important;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  background: rgba(0, 0, 0, 0.5) !important;
+  .wuliaoTable {
+    overflow: hidden;
+    display: flex;
+    flex-direction: column;
+    max-height: 70%;
+    margin-top: 0 !important;
+    .el-dialog__header {
+      height: 40px;
+      display: flex;
+      justify-content: right;
+      .el-dialog__headerbtn {
+        position: static !important;
+      }
+    }
+    .el-dialog__body {
+      padding: 30px 20px !important;
+      overflow-y: auto;
+      flex: 1;
+    }
+    .cell {
+      font-size: 12px;
+    }
+  }
+}
 </style>