From 8a668aeb3faa31d68dc2987204a372ad32f7b4f7 Mon Sep 17 00:00:00 2001
From: zzq <a13193816592@163.com>
Date: 星期三, 27 九月 2023 20:46:40 +0800
Subject: [PATCH] "库存报表接口调用,api更新"

---
 src/views/reportForm/locationReport/index.vue |   84 ++++++++++++++++++------------------------
 1 files changed, 36 insertions(+), 48 deletions(-)

diff --git a/src/views/reportForm/locationReport/index.vue b/src/views/reportForm/locationReport/index.vue
index c2c9c46..8954e37 100644
--- a/src/views/reportForm/locationReport/index.vue
+++ b/src/views/reportForm/locationReport/index.vue
@@ -1,3 +1,4 @@
+<!-- 浣嶇疆鎶ヨ〃 -->
 <template>
   <div class="rightContent">
     <div class="top">
@@ -54,7 +55,7 @@
 
 <script>
 import pageMixin from "@/components/makepager/pager/mixin/pageMixin";
-import { getProductOperatonList } from "@/api/product/product";
+import { getLocationData,} from "@/api/locationApi/locationApi";
 import AddOverviewDialog from "@/views/overview/AddOverviewDialog";
 
 export default {
@@ -116,7 +117,7 @@
   },
   created() {
     this.setTable();
-    // this.getData();
+    this.getData();
   },
   methods: {
     setTable() {
@@ -136,26 +137,14 @@
         }
       }
       this.tableList.allcol = allcol;
-      this.tableList.tableInfomation = this.testArr;
     },
     setTableColumn(showcol) {
       let tableColumn = [
-        /* 
-          product:"鍗楁柟涓濆发xxx",
-          category:"涓濈桓鍒跺搧/鐪熶笣鐫¤",
-          cost:"800.00",
-          totalPrices:"0.00",
-          inStore:"0.00",
-          availableStore:"0.00",
-          inStorage:"0.00",
-          toStore:"0.00",
-          forecast:"0.00",
-          unit:"浠�"
-        */
         {
           label: "浣嶇疆",
-          prop: "product",
+          prop: "locationName",
           default: true,
+          isShowColumn: true,
         },
 
         {
@@ -166,39 +155,44 @@
         },
         {
           label: "浜у搧",
-          prop: "cost",
+          prop: "productName",
           default: true,
+          isShowColumn: true,
         },
         {
           label: "浜у搧绫诲埆",
-          prop: "totalPrices",
+          prop: "productTypeName",
           default: false,
           isShowColumn: showcol.includes("浜у搧绫诲埆"),
         },
         {
           label: "鍦ㄥ簱鏁伴噺",
-          prop: "inStore",
+          prop: "amount",
+          isShowColumn: true,
           default: true,
+          unit:""
         },
         {
           label: "棰勭暀鏁伴噺",
           prop: "availableStore",
-          sortable: true,
-          default: false,
-          isShowColumn: showcol.includes("棰勭暀鏁伴噺"),
+          isShowColumn: true,
+          default: true,
+          unit:""
         },
         {
           label: "鍗曚綅",
           prop: "unit",
-          isShowColumn: true,
-          default: true,
-        },
-        {
-          label: "浠峰��",
-          prop: "toStore",
           width: 120,
           default: false,
           isShowColumn: showcol.includes("浠峰��"),
+        },
+        {
+          label: "浠峰��",
+          prop: "value",
+          width: 120,
+          default: false,
+          isShowColumn: showcol.includes("浠峰��"),
+          unit:"锟�"
         },
       ];
       return tableColumn;
@@ -208,26 +202,19 @@
       this.tableList.tableColumn = this.setTableColumn(val);
     },
     // 璇锋眰鏁版嵁
-    // async getData() {
-    //   await getProductOperatonList({
-    //     productId: this.productId,
-    //     page: this.pagerOptions.currPage,
-    //     pageSize: this.pagerOptions.pageSize,
-    //   }).then((res) => {
-    //     if (res.code === 200) {
-    //       const list = res.data.map((item) => {
-    //         return {
-    //           ...item,
-    //           from: item.fromLocation.name,
-    //           to: item.toLocation.name,
-    //           productName: this.productName,
-    //         };
-    //       });
-    //       this.tableList.tableInfomation = list || [];
-    //       this.pagerOptions.totalCount = res.total;
-    //     }
-    //   });
-    // },
+    async getData() {
+      await getLocationData({
+        page: this.pagerOptions.currPage,
+        pageSize: this.pagerOptions.pageSize,
+      }).then((res) => {
+        if (res.code === 200) {
+          console.log(res.data,"鎺ュ彛璇锋眰鎴愬姛")
+          const list = res.data
+          this.tableList.tableInfomation = list || []
+          this.pagerOptions.totalCount = res.total
+        }
+      });
+    },
 
     // 鎼滅储
     getList(val) {
@@ -244,6 +231,7 @@
     addBtnClick() {
       this.editConfig.visible = true;
       this.editConfig.title = "鏂板缓";
+      this.getData()
     },
     // 鐘舵��
     getStatus(val) {

--
Gitblit v1.8.0