From e5b0818e29737e7d5466ed87102fc3fbe351b181 Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期四, 19 十月 2023 11:34:52 +0800
Subject: [PATCH] 概述、调拨、业务类型列表增加查看和编辑及新建弹窗调整

---
 src/views/operate/allot/index.vue                            |   28 +++++++++----
 src/views/overview/AddOverviewDialog.vue                     |    7 +++
 src/views/overview/OverviewListView.vue                      |   32 +++++++++++-----
 src/views/warehouseManage/bussinessType/AddBussinessType.vue |    3 +
 src/views/warehouseManage/bussinessType/index.vue            |   20 ++++++----
 5 files changed, 62 insertions(+), 28 deletions(-)

diff --git a/src/views/operate/allot/index.vue b/src/views/operate/allot/index.vue
index 6c29d52..7e8cc34 100644
--- a/src/views/operate/allot/index.vue
+++ b/src/views/operate/allot/index.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" />
@@ -236,11 +246,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.infomation = { ...row }
     },
     // 鏂板缓
diff --git a/src/views/overview/AddOverviewDialog.vue b/src/views/overview/AddOverviewDialog.vue
index 4b8465d..54a2cf0 100644
--- a/src/views/overview/AddOverviewDialog.vue
+++ b/src/views/overview/AddOverviewDialog.vue
@@ -410,10 +410,15 @@
         this.showEdit = false
         this.showFooter = true
         this.isValidateClick = false
-      } else if (this.editConfig.title === "鏌ョ湅" && this.editConfig.infomation.status !== 4) {
+      } else if (this.editConfig.title === "缂栬緫") {
         this.showButton = true
         this.showEdit = false
         this.isDelClick = true
+        this.showFooter = true
+      } else if (this.editConfig.title === "鏌ョ湅" && this.editConfig.infomation.status !== 4) {
+        this.showButton = true
+        this.showEdit = true
+        this.isDelClick = true
         this.showFooter = false
         if (this.editConfig.infomation.status === "瀹屾垚") {
           this.isValidateClick = false
diff --git a/src/views/overview/OverviewListView.vue b/src/views/overview/OverviewListView.vue
index 4f5a945..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>
@@ -61,7 +72,8 @@
       },
       workType: this.$route.params.workType,
       keyword: "",
-      params: {}
+      params: {},
+      displayEdit: false
     }
   },
   created() {
@@ -222,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 }
     },
diff --git a/src/views/warehouseManage/bussinessType/AddBussinessType.vue b/src/views/warehouseManage/bussinessType/AddBussinessType.vue
index df2d806..39d532e 100644
--- a/src/views/warehouseManage/bussinessType/AddBussinessType.vue
+++ b/src/views/warehouseManage/bussinessType/AddBussinessType.vue
@@ -294,6 +294,9 @@
         this.showButton = false
         this.showEdit = false
         this.showFooter = true
+      } else if (this.editConfig.title === "缂栬緫") {
+        this.showEdit = false
+        this.showFooter = true
       } else {
         this.showEdit = true
         this.showFooter = false
diff --git a/src/views/warehouseManage/bussinessType/index.vue b/src/views/warehouseManage/bussinessType/index.vue
index fa0c8c9..3f6eeea 100644
--- a/src/views/warehouseManage/bussinessType/index.vue
+++ b/src/views/warehouseManage/bussinessType/index.vue
@@ -11,12 +11,16 @@
     </div>
     <div class="list-view">
       <div class="table">
-        <TableCommonView
-          ref="tableListRef"
-          :table-list="tableList"
-          :show-checkcol="false"
-          @tableRowClick="tableRowClick"
-        ></TableCommonView>
+        <TableCommonView ref="tableListRef" :table-list="tableList" :show-checkcol="false">
+          <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 @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" />
@@ -122,8 +126,8 @@
       this.getData()
     },
     // 琛岀偣鍑�
-    tableRowClick(row) {
-      this.editConfig.title = "缂栬緫"
+    tableRowClick(row, val) {
+      this.editConfig.title = val
       let obj = JSON.parse(JSON.stringify(row))
       for (let i in obj) {
         if (i == "name" || i == "prefix") {

--
Gitblit v1.8.0