From bc0b37e98ba17b8a4c97d853c87e2b12e447b012 Mon Sep 17 00:00:00 2001
From: zuozhengqing <a13193816592@163.com>
Date: 星期五, 29 三月 2024 18:10:34 +0800
Subject: [PATCH] 合并分支

---
 src/views/supplierManage/supplier/index.vue         |    8 ++++----
 src/views/purchaseManage/purchase/index.vue         |    5 +++--
 src/views/other/commonDialog/SelectCommonDialog.vue |   24 +++++++++++++++++++-----
 3 files changed, 26 insertions(+), 11 deletions(-)

diff --git a/src/views/other/commonDialog/SelectCommonDialog.vue b/src/views/other/commonDialog/SelectCommonDialog.vue
index 8b0fedd..afff0b0 100644
--- a/src/views/other/commonDialog/SelectCommonDialog.vue
+++ b/src/views/other/commonDialog/SelectCommonDialog.vue
@@ -103,11 +103,13 @@
       searchSel: {},
       keyword: "",
       keywordType: "",
-      showProductCol: ["浜у搧鍚嶇О", "浜у搧缂栧彿", "閿�鍞崟浠�", "鍗曚綅", "浜у搧瑙勬牸", "鍨嬪彿"],
+      showPurchaseCol: ["浜у搧鍚嶇О", "浜у搧缂栧彿", "渚涘簲鍟�", "閲囪喘鍗曚环", "鍗曚綅", "浜у搧瑙勬牸", "鍨嬪彿"],
+      showProductCol: ["浜у搧鍚嶇О", "浜у搧缂栧彿", "閲囪喘鍗曚环", "鍗曚綅", "浜у搧瑙勬牸", "鍨嬪彿"],
       tableProductColumn: [
         { label: "浜у搧鍚嶇О", prop: "name", isClick: true },
         { label: "浜у搧缂栧彿", prop: "number" },
-        { label: "閿�鍞崟浠�", prop: "purchasePrice" },
+        { label: "渚涘簲鍟�", prop: "supplierName" },
+        { label: "閲囪喘鍗曚环", prop: "purchasePrice" },
         { label: "鍗曚綅", prop: "unit" },
         { label: "浜у搧瑙勬牸", prop: "specifications" },
         { label: "鍨嬪彿", prop: "modelNumber" }
@@ -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 = {
@@ -184,8 +191,15 @@
         if (res.code === 200) {
           if (res.data.list && res.data.list.length > 0) {
             const list = res.data.list.map((item) => {
-              return {
-                ...item
+              if (this.sign == "purchase") {
+                return {
+                  ...item,
+                  supplierName: item.supplier?.name
+                }
+              } else {
+                return {
+                  ...item
+                }
               }
             })
             this.tableList.tableInfomation = list
diff --git a/src/views/purchaseManage/purchase/index.vue b/src/views/purchaseManage/purchase/index.vue
index ab410a7..d606fe8 100644
--- a/src/views/purchaseManage/purchase/index.vue
+++ b/src/views/purchaseManage/purchase/index.vue
@@ -725,7 +725,7 @@
       //       this.$message.error(res.msg ? res.msg + "," : "" + "鑾峰彇淇℃伅澶辫触锛�")
       //     }
       //   })
-      // } else 
+      // } else
       if (this.TabsIndex == 1 && row.status == 1) {
         this.productTableList.tableInfomation = []
       } else if (
@@ -743,7 +743,8 @@
             this.$message.error(res.msg ? res.msg + "," : "" + "鑾峰彇淇℃伅澶辫触锛�")
           }
         })
-      } else if (this.TabsIndex == 0||
+      } else if (
+        this.TabsIndex == 0 ||
         (this.TabsIndex == 2 && row.status == 8) ||
         (this.TabsIndex == 2 && row.status == 2) ||
         (this.TabsIndex == 2 && row.status == 3)
diff --git a/src/views/supplierManage/supplier/index.vue b/src/views/supplierManage/supplier/index.vue
index 5a2ed24..6846206 100644
--- a/src/views/supplierManage/supplier/index.vue
+++ b/src/views/supplierManage/supplier/index.vue
@@ -58,7 +58,7 @@
             :amount-view="false"
             :show-screen="false"
             :show-action-btn="false"
-            :placeholder="'璇疯緭鍏ヤ骇鍝佸悕绉�'"
+            :placeholder="'璇疯緭鍏ヤ骇鍝佸悕绉�/浜у搧瑙勬牸/浜у搧缂栫爜'"
             @searchClick="onProductFilterSearch"
           >
             <template slot="leftButton">
@@ -341,7 +341,7 @@
     // 鎼滅储浜у搧
     onProductFilterSearch(searchText) {
       this.productPagerOptions.currPage = 1
-      this.getProductList("name", searchText)
+      this.getProductList("keyword", searchText)
     },
     // 鏂板缓渚涘簲鍟�
     addBtnClick() {
@@ -356,7 +356,7 @@
     async enableClick(row, value) {
       let status = value === "鍚敤" ? 1 : 0
       await changeSupplierStatus({
-        id:Number(row.id),
+        id: Number(row.id),
         status: status
       }).then((res) => {
         if (res.code === 200) {
@@ -446,7 +446,7 @@
       this.editPurchaseConfig.title = "鏂板缓"
       this.editPurchaseConfig.infomation = {
         supplierId: this.selectRow.id,
-        purchaseTypeId:"2",
+        purchaseTypeId: "2",
         supplierName: this.selectRow.name
       }
     }

--
Gitblit v1.8.0