From 3bd59622961f569ac181a0f17aeffd44858efa4f Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期日, 28 四月 2024 17:19:13 +0800
Subject: [PATCH]  价税合计和数量,采购单价 3者之间计算管理的逻辑处理

---
 src/views/supplierManage/supplier/RaleteSupplierList.vue |   26 +++++++++++++++++---------
 1 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/src/views/supplierManage/supplier/RaleteSupplierList.vue b/src/views/supplierManage/supplier/RaleteSupplierList.vue
index 9f70e62..c888f6b 100644
--- a/src/views/supplierManage/supplier/RaleteSupplierList.vue
+++ b/src/views/supplierManage/supplier/RaleteSupplierList.vue
@@ -23,7 +23,7 @@
 </template>
 
 <script>
-import { getProductList } from "@/api/productManage/product"
+import { getProductListTwo,getSupplierByNumber} from "@/api/productManage/product"
 import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
 import DetailSupplier from "@/views/supplierManage/supplier/DetailSupplier"
 export default {
@@ -58,7 +58,8 @@
         { label: "閲囪喘浠锋牸", prop: "purchasePrice", min: 130 },
         { label: "渚涜揣澶╂暟", prop: "deliveryTime", min: 130 },
         { label: "鐗╂祦鏃堕暱(澶�)", prop: "shippingDuration", min: 130 }
-      ]
+      ],
+      thatNumber:''
     }
   },
   created() {
@@ -100,14 +101,13 @@
     // 浜у搧鍒楄〃
     async getProductList(val, content) {
       console.log(val, content)
-      await getProductList({
+      await getProductListTwo({
         number: this.editConfig.infomation.number,
-        supplierId: this.editConfig.infomation.supplierId,
         page: this.pagerOptions.currPage,
         pageSize: this.pagerOptions.pageSize
       }).then((res) => {
         console.log(res.data)
-        const list = res.data.data.list.map((item) => {
+        const list = res.data.list.map((item) => {
           return {
             ...item,
             supplierNumber: item.supplier.number,
@@ -115,16 +115,24 @@
           }
         })
         this.tableList.tableInfomation = list || []
-        this.pagerOptions.totalCount = res.data.data.total
+        this.pagerOptions.totalCount = res.data.total
+      })
+    },
+    // 鍗曟潯渚涘簲鍟嗘暟鎹�-璇︽儏
+    async getSupplierByNumber() {
+      await getSupplierByNumber(
+        this.thatNumber
+      ).then((res) => {
+        this.commonDetail.infomation = { ...res.data.res }
       })
     },
     handleClose() {
       this.editConfig.visible = false
     },
-    selCommonClick(row) {
-      console.log(row)
+    async selCommonClick(row) {
+      this.thatNumber=row.supplier.number
+      await this.getSupplierByNumber()
       this.commonDetail.visible = true
-      this.commonDetail.infomation = { ...row.supplier }
     }
   }
 }

--
Gitblit v1.8.0