From 6752afa10d0feee2acd6f9d883db875dd19ba0d3 Mon Sep 17 00:00:00 2001
From: songshankun <songshankun@foxmail.com>
Date: 星期四, 28 九月 2023 10:16:46 +0800
Subject: [PATCH] feat: 销售机会页列表配置列显隐控制
---
src/views/other/commonDialog/SelectCommonDialog.vue | 45 ++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 42 insertions(+), 3 deletions(-)
diff --git a/src/views/other/commonDialog/SelectCommonDialog.vue b/src/views/other/commonDialog/SelectCommonDialog.vue
index 60238cb..1225670 100644
--- a/src/views/other/commonDialog/SelectCommonDialog.vue
+++ b/src/views/other/commonDialog/SelectCommonDialog.vue
@@ -45,6 +45,7 @@
import { getServiceContractList } from "@/api/serviceManage/serviceContract"
import { getServiceOrderList } from "@/api/serviceManage/clientServiceOrder"
import { getProductList } from "@/api/common/other"
+import { getSalesReturnList } from "@/api/sales/salesReturn"
export default {
name: "EditSelCommonDialog",
props: {
@@ -149,7 +150,18 @@
{ label: "浜у搧缂栧彿", prop: "number" }
]
}
- this.searchSel = { value: "Name", label: "浜у搧鍚嶇О" }
+ this.searchSel = { value: "name", label: "浜у搧鍚嶇О" }
+ } else if (this.editConfig.title === "閿�鍞��璐у崟") {
+ this.tableList = {
+ tableInfomation: [],
+ tableColumn: [
+ { label: "閫�璐у崟缂栧彿", prop: "number", isClick: true },
+ { label: "閫�璐ф棩鏈�", prop: "returnDate" },
+ { label: "鐘舵��", prop: "salesReturnStatus_name" },
+ { label: "閫�鍏ヤ粨搴�", prop: "repository" }
+ ]
+ }
+ this.searchSel = { value: "number", label: "閿�鍞��璐у崟缂栧彿" }
}
this.searchOptions = []
for (let i = 0; i < this.tableList.tableColumn.length; i++) {
@@ -173,6 +185,8 @@
this.getServiceOrderList()
} else if (this.editConfig.title === "浜у搧鍚嶇О") {
this.getProductList()
+ } else if (this.editConfig.title === "閿�鍞��璐у崟") {
+ this.getSalesReturnList()
}
},
// 閿�鍞�诲崟
@@ -305,8 +319,8 @@
// 浜у搧鍚嶇О
async getProductList() {
await getProductList({
- productName: "",
- productNumber: "",
+ productName: this.keywordType === "浜у搧鍚嶇О" ? this.keyword : "",
+ productNumber: this.keywordType === "浜у搧缂栧彿" ? this.keyword : "",
page: 1,
pageSize: 5
}).then((res) => {
@@ -316,6 +330,29 @@
const list = res.data.data.data.map((item) => {
return {
...item
+ }
+ })
+ this.tableList.tableInfomation = list.slice(0, 5) || []
+ } else {
+ this.tableList.tableInfomation = []
+ }
+ }
+ this.loading = false
+ })
+ },
+ async getSalesReturnList() {
+ await getSalesReturnList({
+ keyword: this.keyword,
+ keywordType: this.keywordType,
+ page: 0,
+ pageSize: 0
+ }).then((res) => {
+ if (res.code === 200) {
+ if (res.data.list && res.data.list.length > 0) {
+ const list = res.data.list.map((item) => {
+ return {
+ ...item,
+ salesReturnStatus_name: item.SalesReturnStatus.name
}
})
this.tableList.tableInfomation = list.slice(0, 5) || []
@@ -343,6 +380,8 @@
this.$emit("selClient", row, "customService")
} else if (this.editConfig.title === "浜у搧鍚嶇О") {
this.$emit("selClient", row, "productName")
+ } else if (this.editConfig.title === "閿�鍞��璐у崟") {
+ this.$emit("selClient", row, "salesReturn")
}
},
// 鎼滅储
--
Gitblit v1.8.0