From fbdb1d15b6cf692d27598806eee6be6f16e1f36d Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期五, 22 九月 2023 17:54:55 +0800
Subject: [PATCH] 产品出入库明细接口联调、调拨列表接口联调、出入库搜索功能增加

---
 src/views/reportForm/inboundOutboundDetail/index.vue |   69 ++++++++++++++++++++--------------
 1 files changed, 40 insertions(+), 29 deletions(-)

diff --git a/src/views/reportForm/inboundOutboundDetail/index.vue b/src/views/reportForm/inboundOutboundDetail/index.vue
index 8ac2cc1..d65260c 100644
--- a/src/views/reportForm/inboundOutboundDetail/index.vue
+++ b/src/views/reportForm/inboundOutboundDetail/index.vue
@@ -21,18 +21,20 @@
         <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
       </div>
     </div>
+    <!-- 缂栬緫 -->
+    <AddOverviewDialog v-if="editConfig.visible" :edit-common-config="editConfig" :add-name="this.$route.params.name" />
   </div>
 </template>
 
 <script>
 import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
-import { getProductList } from "@/api/product/product"
-// import DetailProduct from "@/views/productManage/product/DetailProduct"
+import { getProductOperatonList } from "@/api/product/product"
+import AddOverviewDialog from "@/views/overview/AddOverviewDialog"
 
 export default {
   name: "InboundOutboundDetail",
   props: {},
-  components: {},
+  components: { AddOverviewDialog },
   mixins: [pageMixin],
   computed: {},
   data() {
@@ -49,7 +51,9 @@
         visible: false,
         title: "鏂板缓",
         infomation: {}
-      }
+      },
+      productId: this.$route.params.id,
+      productName: this.$route.params.name
     }
   },
   created() {
@@ -78,43 +82,44 @@
       let tableColumn = [
         {
           label: "鏃ユ湡",
-          prop: "id",
+          prop: "operationDate",
           isShowColumn: true,
-          default: true
+          default: true,
+          date: true
         },
         {
-          label: "鍙傝��",
-          prop: "id",
+          label: "鍗曞彿",
+          prop: "number",
           isShowColumn: true,
           default: true
         },
         {
           label: "浜у搧",
-          prop: "id",
+          prop: "productName",
           isShowColumn: true,
           default: true
         },
         {
           label: "浠�",
-          prop: "deviceName",
+          prop: "from",
           isShowColumn: true,
           default: true
         },
         {
           label: "鑷�",
-          prop: "id",
+          prop: "to",
           isShowColumn: true,
           default: true
         },
         {
-          label: "鍏徃",
-          prop: "shopName",
-          isShowColumn: showcol.includes("鍏徃"),
-          default: false
+          label: "鏁伴噺",
+          prop: "amount",
+          isShowColumn: true,
+          default: true
         },
         {
-          label: "鏁伴噺",
-          prop: "deviceId",
+          label: "鍗曚綅",
+          prop: "unit",
           isShowColumn: true,
           default: true
         },
@@ -124,11 +129,13 @@
           width: 120,
           isShowColumn: showcol.includes("鐘舵��"),
           default: false,
-          status: true
+          status: true,
+          isCallMethod: true,
+          getCallMethod: this.getStatus
         },
         {
           label: "瀹屾垚鑰�",
-          prop: "preTime",
+          prop: "admin",
           isShowColumn: showcol.includes("瀹屾垚鑰�"),
           default: false
         }
@@ -140,23 +147,23 @@
       this.tableList.tableColumn = this.setTableColumn(val)
     },
     // 璇锋眰鏁版嵁
-    async getData(val, content) {
-      await getProductList({
-        [val]: content,
+    async getData() {
+      await getProductOperatonList({
+        productId: this.productId,
         page: this.pagerOptions.currPage,
         pageSize: this.pagerOptions.pageSize
       }).then((res) => {
-        if (res.data.code === 200) {
-          const list = res.data.data.list.map((item) => {
+        if (res.code === 200) {
+          const list = res.data.map((item) => {
             return {
               ...item,
-              supplierNumber: item.supplier.number,
-              status: "灏辩华",
-              preTime: "2023-09-04 11:20:00"
+              from: item.fromLocation.name,
+              to: item.toLocation.name,
+              productName: this.productName
             }
           })
           this.tableList.tableInfomation = list || []
-          this.pagerOptions.totalCount = res.data.data.total
+          this.pagerOptions.totalCount = res.total
         }
       })
     },
@@ -168,13 +175,17 @@
     tableRowClick(row) {
       console.log(row)
       this.editConfig.visible = true
-      this.editConfig.title = "缂栬緫"
+      this.editConfig.title = "鏌ョ湅"
       this.editConfig.infomation = { ...row }
     },
     // 鏂板缓
     addBtnClick() {
       this.editConfig.visible = true
       this.editConfig.title = "鏂板缓"
+    },
+    // 鐘舵��
+    getStatus(val) {
+      return val === 1 ? "鑽夌" : val === 3 ? "灏辩华" : "瀹屾垚"
     }
   }
 }

--
Gitblit v1.8.0