From 7045ca2f6b6bcbc3987e388bf0b25281c250ccf5 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期五, 19 四月 2024 18:09:00 +0800
Subject: [PATCH] srm 新增编辑供应商,启用停用创建账号获取和保存企业/信用等级/供货范围 ,等大概7个接口的联调

---
 src/views/other/commonDialog/SelectCommonDialog.vue |   36 +++++++++++++++++++++++++-----------
 1 files changed, 25 insertions(+), 11 deletions(-)

diff --git a/src/views/other/commonDialog/SelectCommonDialog.vue b/src/views/other/commonDialog/SelectCommonDialog.vue
index aa2a6a4..afff0b0 100644
--- a/src/views/other/commonDialog/SelectCommonDialog.vue
+++ b/src/views/other/commonDialog/SelectCommonDialog.vue
@@ -72,7 +72,8 @@
           clientId: 0,
           isRequest: true,
           client_name: "",
-          tableInfomation: []
+          tableInfomation: [],
+          supplierId:null,
         }
       }
     },
@@ -102,7 +103,8 @@
       searchSel: {},
       keyword: "",
       keywordType: "",
-      showProductCol: ["浜у搧鍚嶇О", "浜у搧缂栧彿", "渚涘簲鍟�", "閲囪喘鍗曚环", "鍗曚綅", "浜у搧瑙勬牸", "鍨嬪彿"],
+      showPurchaseCol: ["浜у搧鍚嶇О", "浜у搧缂栧彿", "渚涘簲鍟�", "閲囪喘鍗曚环", "鍗曚綅", "浜у搧瑙勬牸", "鍨嬪彿"],
+      showProductCol: ["浜у搧鍚嶇О", "浜у搧缂栧彿", "閲囪喘鍗曚环", "鍗曚綅", "浜у搧瑙勬牸", "鍨嬪彿"],
       tableProductColumn: [
         { label: "浜у搧鍚嶇О", prop: "name", isClick: true },
         { label: "浜у搧缂栧彿", prop: "number" },
@@ -116,7 +118,7 @@
       tableColumn: [],
       selectArray: []
     }
-  },
+  },  
   created() {
     this.setTable()
     this.getData()
@@ -132,7 +134,12 @@
     },
     setTable() {
       if (this.editConfig.title === "浜у搧鍚嶇О") {
-        this.showCol = this.showProductCol
+        if (this.sign == "purchase") {
+          this.showCol = this.showPurchaseCol
+        } else {
+          this.showCol = this.showProductCol
+        }
+
         this.tableColumn = this.tableProductColumn
       }
       this.tableList = {
@@ -176,16 +183,23 @@
     async getProductList() {
       let fn = this.sign == "purchase" ? getProductList : getProductListFromGrpc
       await fn({
-        keyword: this.keyword,
-        page: this.pagerOptions.currPage,
-        pageSize: this.pagerOptions.pageSize
-      }).then((res) => {
+          keyword: this.keyword,
+          page: this.pagerOptions.currPage,
+          supplierId:this.editConfig.supplierId,
+          pageSize: this.pagerOptions.pageSize,
+        }).then((res) => {
         if (res.code === 200) {
           if (res.data.list && res.data.list.length > 0) {
             const list = res.data.list.map((item) => {
-              return {
-                ...item,
-                supplierName: item.supplier.name
+              if (this.sign == "purchase") {
+                return {
+                  ...item,
+                  supplierName: item.supplier?.name
+                }
+              } else {
+                return {
+                  ...item
+                }
               }
             })
             this.tableList.tableInfomation = list

--
Gitblit v1.8.0