From 58ac82fceff96784dd9e16872d1e2316fa2cfdec Mon Sep 17 00:00:00 2001
From: zuozhengqing <a13193816592@163.com>
Date: 星期五, 24 十一月 2023 14:36:12 +0800
Subject: [PATCH] 入库明细报表修改状态进度展示

---
 src/views/overview/index.vue |   84 +++++++++++++++++++++++++++++++-----------
 1 files changed, 62 insertions(+), 22 deletions(-)

diff --git a/src/views/overview/index.vue b/src/views/overview/index.vue
index 91e33e5..9ddec17 100644
--- a/src/views/overview/index.vue
+++ b/src/views/overview/index.vue
@@ -1,7 +1,7 @@
 <template>
   <div class="rightContent">
     <div class="top">
-      <SearchCommonView :show-add="false" :placeholder="'璇疯緭鍏ヤ骇鍝佸悕绉�'" :amount-view="false" @searchClick="getList" />
+      <SearchCommonView :show-add="false" :placeholder="'璇疯緭鍏ヤ笟鍔$被鍨�'" :amount-view="false" @searchClick="getList" />
     </div>
     <div class="content">
       <div class="list-view">
@@ -14,33 +14,46 @@
             overview_done: item.baseOperationType === 2,
             overview_todo: item.baseOperationType === 3
           }"
+          @click="labelClick(item)"
         >
           <div class="top">
             <div class="label">
-              <span style="cursor: pointer" @click="labelClick(item)">{{ item.name }}</span>
+              <span style="cursor: pointer">{{ item.name }}</span>
             </div>
-            <div class="set">...</div>
+            <el-dropdown class="set" placement="bottom" trigger="click" @command="handleCommand">
+              <div @click.stop="moreClick()">...</div>
+              <el-dropdown-menu slot="dropdown">
+                <el-dropdown-item :command="{ command: 0, item }">鍏ㄩ儴</el-dropdown-item>
+                <el-dropdown-item :command="{ command: 3, item }">灏辩华</el-dropdown-item>
+                <el-dropdown-item :command="{ command: 4, item }">瀹屾垚</el-dropdown-item>
+              </el-dropdown-menu>
+            </el-dropdown>
           </div>
           <div class="bottom">
             <div class="left">
-              <div class="left_view">
-                <span>2</span>
-                <span style="margin-left: 5px">寰呭鐞�</span>
+              <div class="left_view" @click.stop="statusClick(item, 3)">
+                <span>{{ item.readyCount }}</span>
+                <span style="margin-left: 5px">灏辩华</span>
               </div>
             </div>
             <div class="right">
-              <div class="right_status">
-                <span style="cursor: pointer">2 姝e湪绛夊緟</span>
+              <div class="right_status" @click.stop="statusClick(item, 4)">
+                <span style="cursor: pointer">{{ item.finishCount + " 瀹屾垚" }}</span>
               </div>
-              <div class="right_status" style="margin-top: 5px">
+              <!-- <div class="right_status" style="margin-top: 5px">
                 <span style="cursor: pointer">4 寤舵湡</span>
+              </div> -->
+            </div>
+            <div class="right">
+              <div class="right_status" @click.stop="statusClick(item, 5)">
+                <span style="cursor: pointer">{{ item.cancelCount + " 宸插彇娑�" }}</span>
               </div>
             </div>
           </div>
         </div>
       </div>
       <div class="btn-pager">
-        <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
+        <PagerView class="page" :page-sizes="pageSizes" :pager-options="pagerOptions" v-on="pagerEvents" />
       </div>
     </div>
   </div>
@@ -62,41 +75,61 @@
       editConfig: {
         visible: false,
         title: "鏂板缓",
-        infomation: {}
-      }
+        infomation: {},
+        keyword: ""
+      },
+      pageSizes: [30, 45]
     }
   },
   created() {
+    this.pagerOptions.pageSize = 30
     this.getData()
   },
   methods: {
     getList(val) {
       console.log(val)
+      this.keyword = val
+      this.getData()
     },
-    labelClick(item) {
+    labelClick(item, status) {
       console.log(item)
       this.$router.push({
         name: "overviewList",
-        params: { name: item.name, workType: item.baseOperationType, id: item.id }
+        params: { name: item.name, workType: item.baseOperationType, id: item.id, status: status,code:item.warehouse.code }
       })
     },
     async getData() {
       await getOperationType({
-        keyword: "",
+        keyword: this.keyword,
         page: this.pagerOptions.currPage,
         pageSize: this.pagerOptions.pageSize
       }).then((res) => {
-        console.log(res.data.data)
-        if (res.data.code === 200) {
-          const list = res.data.data.map((item) => {
+        console.log(res.data)
+        if (res.code === 200) {
+          const list = res.data.map((item) => {
             return {
               ...item
             }
           })
           this.tableList = list || []
-          this.pagerOptions.totalCount = res.data.total
+          this.pagerOptions.totalCount = res.total
         }
       })
+    },
+    handleCommand(val) {
+      console.log(val)
+      if (val.command === "鍏ㄩ儴") {
+        this.labelClick(val.item, "")
+      } else {
+        this.labelClick(val.item, val.command)
+      }
+    },
+    // 鏇村
+    moreClick() {},
+    // 鐘舵��
+    statusClick(item, status) {
+      console.log(item)
+      this.labelClick(item, status)
     }
   }
 }
@@ -105,7 +138,7 @@
 <!-- Add "scoped" attribute to limit CSS to this component only -->
 <style lang="scss" scoped>
 .content {
-  height: calc(100% - 150px);
+  height: calc(100% - 112px);
   background: #fff;
   border-radius: 12px;
   .list-view {
@@ -125,6 +158,7 @@
       box-shadow: inset 0 0 2px #dee2e6;
       -moz-box-shadow: inset 0 0 2px #dee2e6;
       -webkit-box-shadow: inset 0 0 2px #dee2e6;
+      cursor: pointer;
       .top {
         height: 35px;
         line-height: 35px;
@@ -136,7 +170,7 @@
           margin-left: auto;
           margin-right: 20px;
           font-size: 20px;
-          cursor: no-drop;
+          // cursor: no-drop;
           color: #000;
           transform: rotate(-90deg);
           -moz-transform: rotate(-90deg);
@@ -146,6 +180,7 @@
       .bottom {
         display: flex;
         font-size: 13px;
+        margin-top: 30px;
         .left {
           width: 50%;
           // background: #1d80e2;
@@ -163,8 +198,9 @@
           }
         }
         .right {
-          width: 50%;
+          width: 25%;
           .right_status {
+            margin-top: 5px;
           }
         }
       }
@@ -180,4 +216,8 @@
     }
   }
 }
+
+.btn-pager {
+  margin-top: 0;
+}
 </style>

--
Gitblit v1.8.0