From d68b036a3b3c67273b8effa3c9925ef3869a91ba Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期三, 07 二月 2024 13:56:50 +0800
Subject: [PATCH] wms项目 wms系统参数设置的页面开发+路由+是否显示表头配置

---
 src/views/operate/allot/index.vue |   76 +++++++++++++++++++++++++-------------
 1 files changed, 50 insertions(+), 26 deletions(-)

diff --git a/src/views/operate/allot/index.vue b/src/views/operate/allot/index.vue
index 53dc714..c846757 100644
--- a/src/views/operate/allot/index.vue
+++ b/src/views/operate/allot/index.vue
@@ -11,19 +11,34 @@
     </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" />
       </div>
     </div>
     <!-- 鏂板缓/缂栬緫 -->
-    <AddOverviewDialog v-if="editConfig.visible" :work-type="'鍐呴儴璋冩嫧'" :edit-common-config="editConfig" />
+    <AddOverviewDialog
+      v-if="editConfig.visible"
+      :show-operation-type="true"
+      :work-type="3"
+      :edit-common-config="editConfig"
+    />
   </div>
 </template>
 
@@ -42,13 +57,8 @@
   data() {
     return {
       tableList: {},
-      showcol: ["浠�", "鑷�", "鑱旂郴浜�", "鏃ユ湡", "鏉ユ簮鍗曟嵁", "鍏徃", "鐘舵��"],
+      showcol: ["璋冨嚭浣嶇疆", "璋冨叆浣嶇疆", "鑱旂郴浜�", "鏃ユ湡", "鏉ユ簮鍗曟嵁", "鍏徃", "鐘舵��"],
       searchOptions: [],
-      commonDetail: {
-        visible: false,
-        title: "鏂板缓",
-        infomation: {}
-      },
       editConfig: {
         visible: false,
         title: "鏂板缓",
@@ -65,7 +75,8 @@
     setTable() {
       this.tableList = {
         tableInfomation: [],
-        selectBox: true,
+        selectBox: false,
+        selectIndex: true,
         showcol: this.showcol,
         allcol: [],
         tableColumn: this.setTableColumn(this.showcol)
@@ -88,15 +99,15 @@
           default: true
         },
         {
-          label: "浠�",
+          label: "璋冨嚭浣嶇疆",
           prop: "from",
-          isShowColumn: showcol.includes("浠�"),
+          isShowColumn: showcol.includes("璋冨嚭浣嶇疆"),
           default: false
         },
         {
-          label: "鑷�",
+          label: "璋冨叆浣嶇疆",
           prop: "to",
-          isShowColumn: showcol.includes("鑷�"),
+          isShowColumn: showcol.includes("璋冨叆浣嶇疆"),
           default: false
         },
         {
@@ -213,14 +224,13 @@
       await getAllList({
         number: this.keyword,
         page: this.pagerOptions.currPage,
-        pageSize: this.pagerOptions.pageSize,
-        sourceNumber: this.keyword
+        pageSize: this.pagerOptions.pageSize
       }).then((res) => {
         if (res.code === 200) {
           const list = res.data.map((item) => {
             return {
               ...item,
-              from: item.fromLocation.name,
+              from: item.location.jointName,
               to: item.toLocation.name
             }
           })
@@ -236,11 +246,25 @@
       this.pagerOptions.currPage = 1
       this.getData()
     },
-    // 琛岀偣鍑�
-    tableRowClick(row) {
-      console.log(row)
+    // 鏌ョ湅 缂栬緫
+    tableRowClick(row, val) {
+      console.log(row,"鏌ョ湅")
       this.editConfig.visible = true
-      this.editConfig.title = "缂栬緫"
+      this.editConfig.title = val
+      row.details.map((item)=>{
+        item.fromLocationId=item.fromLocation.jointName
+        item.toLocationId=item.toLocation.jointName
+      })
+      row.location={
+        value:row.location.id||row.location.value,
+        label:row.location.jointName||row.location.label
+      }
+      row.toLocation={
+        value:row.toLocation.id||row.toLocation.value,
+        label:row.toLocation.jointName||row.toLocation.label
+      }
+      row.locationID=row.location.jointName
+      row.locationId=row.location.value
       this.editConfig.infomation = { ...row }
     },
     // 鏂板缓
@@ -250,7 +274,7 @@
     },
     // 鐘舵��
     getStatus(val) {
-      return val === 1 ? "鑽夌" : val === 3 ? "灏辩华" : "瀹屾垚"
+      return val === 1 ? "鑽夌" : val === 3 ? "灏辩华" :val===4? "瀹屾垚": "鍙栨秷"
     }
   }
 }

--
Gitblit v1.8.0