From e3edb24ee6b15cb7e67abf6c0ebfe731fbcb4a4c Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期六, 22 四月 2023 09:50:49 +0800
Subject: [PATCH] 1.采购收货单新增查看详情功能

---
 src/views/purchasesManager/arrivalNoticeList.vue |   86 +++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 82 insertions(+), 4 deletions(-)

diff --git a/src/views/purchasesManager/arrivalNoticeList.vue b/src/views/purchasesManager/arrivalNoticeList.vue
index 5c0d816..5106c20 100644
--- a/src/views/purchasesManager/arrivalNoticeList.vue
+++ b/src/views/purchasesManager/arrivalNoticeList.vue
@@ -342,7 +342,7 @@
                     class="el-icon-view"
                     :style="{color:$store.state.settings.theme}"
                     style="cursor: pointer;"
-                    @click="$message.info('鏆傛棤鏉冮檺锛�')"
+                    @click="viewDetails(row)"
                   />
                 </el-tooltip>
               </div>
@@ -352,6 +352,55 @@
       </div>
 
     </div>
+
+    <el-dialog
+      v-el-drag-dialog
+      title="鏌ョ湅璇︽儏"
+      :visible.sync="dialogVisible"
+      width="800px"
+
+      top="15vh"
+      :close-on-click-modal="false"
+      @closed="handleClose"
+      @close="handleClose"
+    >
+
+      <div style="margin-bottom: 20px">
+        <i class="el-icon-s-comment" :style="{color:$store.state.settings.theme}" /> 鐗╂枡淇℃伅锛� {{ viewSelectValue }}
+      </div>
+
+      <el-collapse style="height: 500px;overflow: auto">
+        <el-collapse-item v-for="item in dialogDataArr" :key="item.hbarcode" :title="item.hbarcode" :name="item.hbarcode">
+          <el-descriptions>
+            <el-descriptions-item label="鏍囩缂栫爜">{{ item.hbarcode }}</el-descriptions-item>
+            <el-descriptions-item label="鍗曟嵁缂栫爜">{{ item.hbillno }}</el-descriptions-item>
+            <el-descriptions-item label="婧愬崟鍗曞彿">{{ item.hsourcebillno }}</el-descriptions-item>
+            <el-descriptions-item label="璐ㄩ噺鐘舵��">
+              <!--              {{ item.qualitystatus }}-->
+
+              <div v-if="item.qualitystatus==='OK'">
+                <i class="el-icon-success" :style="{color:$store.state.settings.theme}" style="margin-right: 2px" />
+                鍚堟牸
+              </div>
+              <div v-if="item.hcheckstaus==='NG'">
+                <i class="el-icon-info" style="margin-right: 2px" />
+                涓嶈壇
+              </div>
+
+              <!--                  <el-tag type=""></el-tag>-->
+            </el-descriptions-item>
+            <el-descriptions-item label="鏍囩鏁伴噺">{{ item.hqty }}</el-descriptions-item>
+            <el-descriptions-item label="鎵规缂栧彿">{{ item.hbatchno?item.hbatchno:'/' }}</el-descriptions-item>
+          </el-descriptions>
+        </el-collapse-item>
+      </el-collapse>
+
+      <span slot="footer" class="dialog-footer">
+        <div class="footerButton">
+          <el-button v-waves @click="dialogVisible=false">鍙� 娑�</el-button>
+        </div>
+      </span>
+    </el-dialog>
 
   </div>
 </template>
@@ -363,7 +412,7 @@
 import TableColumnSettings from '@/components/TableColumnSettings'
 import {
   ClosedPurchaseArrivalOrder,
-  PurchaseArrivalOrderSearch,
+  PurchaseArrivalOrderSearch, PurchaseArrivalOrderSubLabDetails,
   PurchaseArrivalOrderSubSearch
 } from '@/api/purchasesManager'
 import { DepartMentSelect, PurchSupplierSelect } from '@/api/basicInfo'
@@ -508,7 +557,10 @@
       ],
       tableTimeStampKey: new Date().getTime(), // 琛ㄦ牸key
       radioSelected: '',
-      tableDataDetail: []// 瀛愯〃
+      tableDataDetail: [], // 瀛愯〃
+      dialogVisible: false,
+      dialogDataArr: [],
+      viewSelectValue: ''
 
     }
   },
@@ -648,7 +700,23 @@
     },
     tableRowClassName({ row, rowIndex }) {
       return 'custom-row'
+    },
+    async viewDetails(val) {
+      this.viewSelectValue = val.partname
+      const row = this.tableData.find(i => i.hbillno === this.radioSelected)
+      const data = {
+        sourceorder: row.hsourcebillno,
+        arrivelodercode: row.hbillno,
+        partcode: val.partcode
+      }
+      const res = await PurchaseArrivalOrderSubLabDetails(data)
+      this.dialogDataArr = res.data
+      this.dialogVisible = true
+    },
+    handleClose() {
+      this.dialogDataArr = []
     }
+
   }
 }
 </script>
@@ -716,7 +784,8 @@
 }
 
 ::v-deep .el-dialog__body {
-  padding: 20px 100px !important;
+  //padding: 20px 100px !important;
+  padding: 20px 50px !important;
 }
 
 ::v-deep .dialogVisibleRoles .el-dialog__body {
@@ -787,6 +856,15 @@
     height: 100% !important;
   }
 }
+
+::v-deep .el-collapse-item__header{
+  font-size: 18px;
+  //font-weight: bold;
+}
+
+::v-deep .el-descriptions-item__label{
+  font-weight: bold;
+}
 </style>
 <style>
 

--
Gitblit v1.9.3