From bd554a3040ab933a62335175203bfcbb22e9256a Mon Sep 17 00:00:00 2001
From: zuozhengqing <a13193816592@163.com>
Date: 星期四, 19 十月 2023 13:54:34 +0800
Subject: [PATCH] Merge branch 'dev' of http://192.168.5.5:10010/r/web/WMS into zzq

---
 src/views/overview/OverviewListView.vue |   56 +++++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 41 insertions(+), 15 deletions(-)

diff --git a/src/views/overview/OverviewListView.vue b/src/views/overview/OverviewListView.vue
index 555dab7..2cfd31b 100644
--- a/src/views/overview/OverviewListView.vue
+++ b/src/views/overview/OverviewListView.vue
@@ -11,12 +11,22 @@
     </div>
     <div class="list-view">
       <div class="table">
-        <TableCommonView
-          ref="tableListRef"
-          :table-list="tableList"
-          @selTableCol="selTableCol"
-          @tableRowClick="tableRowClick"
-        ></TableCommonView>
+        <TableCommonView ref="tableListRef" :table-list="tableList" @selTableCol="selTableCol">
+          <template slot="tableButton">
+            <el-table-column label="鎿嶄綔" width="100">
+              <template slot-scope="scope">
+                <el-button @click="tableRowClick(scope.row, '鏌ョ湅')" type="text" size="small">鏌ョ湅</el-button>
+                <el-button
+                  v-if="scope.row.status !== 4"
+                  @click="tableRowClick(scope.row, '缂栬緫')"
+                  type="text"
+                  size="small"
+                  >缂栬緫</el-button
+                >
+              </template>
+            </el-table-column>
+          </template>
+        </TableCommonView>
       </div>
       <div class="btn-pager">
         <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
@@ -28,6 +38,7 @@
       :work-type="workType"
       :edit-common-config="editConfig"
       :add-name="this.$route.params.name"
+      :display-edit="displayEdit"
     />
   </div>
 </template>
@@ -60,19 +71,35 @@
         infomation: {}
       },
       workType: this.$route.params.workType,
-      keyword: ""
+      keyword: "",
+      params: {},
+      displayEdit: false
     }
   },
   created() {
     this.setTable()
+    var paramsData = sessionStorage.getItem("paramsData")
+    let params = {}
+    if (paramsData) {
+      params = JSON.parse(sessionStorage.getItem("paramsData"))
+    } else {
+      params = this.$route.params
+      sessionStorage.setItem("paramsData", JSON.stringify(params))
+    }
+    this.params = params
     this.getData()
-    console.log(this.$route.params.workType)
+    // console.log(this.$route.params.workType)
+  },
+  // 椤甸潰閿�姣佷箣鍓�
+  beforeDestroy() {
+    sessionStorage.removeItem("paramsData")
   },
   methods: {
     setTable() {
       this.tableList = {
         tableInfomation: [],
-        selectBox: true,
+        selectBox: false,
+        selectIndex: true,
         showcol: this.showcol,
         allcol: [],
         tableColumn: this.setTableColumn(this.showcol)
@@ -182,10 +209,9 @@
     async getData() {
       await getOperation({
         number: this.keyword,
-        operationTypeId: this.$route.params.id,
+        operationTypeId: this.params.id,
         page: this.pagerOptions.currPage,
-        pageSize: this.pagerOptions.pageSize,
-        sourceNumber: this.keyword
+        pageSize: this.pagerOptions.pageSize
       }).then((res) => {
         console.log(res.data)
         if (res.code === 200) {
@@ -208,11 +234,11 @@
       this.pagerOptions.currPage = 1
       this.getData()
     },
-    // 琛岀偣鍑�
-    tableRowClick(row) {
+    // 鏌ョ湅 缂栬緫
+    tableRowClick(row, val) {
       console.log(row)
       this.editConfig.visible = true
-      this.editConfig.title = "缂栬緫"
+      this.editConfig.title = val
       this.editConfig.operationTypeId = this.$route.params.id
       this.editConfig.infomation = { ...row }
     },

--
Gitblit v1.8.0