From 90943dd32237e9e1c9f0cd66e33b2145c26883ff Mon Sep 17 00:00:00 2001
From: songshankun <songshankun@foxmail.com>
Date: 星期一, 25 九月 2023 14:14:47 +0800
Subject: [PATCH] feat: 侧边栏样式调整; 表格组件样式调整; 新增搜索组件; 销售线索模块布局样式调整
---
src/views/client/contacts/index.vue | 64 +++++++++++++++++++------------
1 files changed, 39 insertions(+), 25 deletions(-)
diff --git a/src/views/client/contacts/index.vue b/src/views/client/contacts/index.vue
index 014eb51..a8f919f 100644
--- a/src/views/client/contacts/index.vue
+++ b/src/views/client/contacts/index.vue
@@ -9,6 +9,8 @@
ref="searchCommonView"
:query-class-options="queryClassOptions"
:search-options="searchOptions"
+ @searchClick="searchClick"
+ @resetClick="resetClick"
/>
<div class="btn-pager">
<PublicFunctionBtnView :operates-list="operatesList" :allocation="false" @batchDelete="delClick" />
@@ -55,6 +57,12 @@
isDetail: {
type: Boolean,
default: false
+ },
+ addConfig: {
+ type: Object,
+ default: () => {
+ return {}
+ }
}
},
mixins: [pageMixin],
@@ -105,12 +113,20 @@
visible: false,
title: "鏂板缓",
infomation: {}
- }
+ },
+ search_map: {}
}
},
created() {
this.setTable()
- this.getData()
+ if (!this.isDetail) {
+ this.search_map = {}
+ } else {
+ this.search_map = {
+ [this.addConfig.id_name]: this.addConfig.client_name
+ }
+ }
+ this.getData(this.search_map)
},
methods: {
setTable() {
@@ -122,8 +138,8 @@
{ label: "鑱旂郴浜虹紪鍙�", prop: "number", min: 100 }, // 鑱旂郴浜虹紪鍙�
{ label: "鑱屽姟", prop: "position", min: 120 }, // 鑱屽姟
{ label: "鎵嬫満", prop: "phone", min: 100 }, // 鎵嬫満鍙风爜
- { label: "閿�鍞礋璐d汉", prop: "member_id", min: 120 }, // 閿�鍞礋璐d汉
- { label: "棣栬鑱旂郴浜�", prop: "is_first", min: 90 } // 棣栬鑱旂郴浜�
+ { label: "閿�鍞礋璐d汉", prop: "member_name", min: 120 }, // 閿�鍞礋璐d汉
+ { label: "棣栬鑱旂郴浜�", prop: "is_first", isFirst: true, min: 90 } // 棣栬鑱旂郴浜�
]
}
this.searchOptions = []
@@ -137,7 +153,7 @@
async getData() {
this.loading = true
await getContactList({
- keyword: "",
+ search_map: this.search_map,
page: this.pagerOptions.currPage,
pageSize: this.pagerOptions.pageSize
})
@@ -149,7 +165,8 @@
return {
...item,
client_name: item.Client.name,
- is_first: item.is_first ? "鏄�" : "鍚�"
+ client_id: item.Client.id,
+ member_name: item.member.username
}
})
this.tableList.tableInfomation = list || []
@@ -168,11 +185,24 @@
this.loading = false
})
},
+ // 鎼滅储
+ searchClick(val, content) {
+ console.log(val, content)
+ this.search_map = {
+ [val.value]: content
+ }
+ this.getData()
+ },
+ resetClick() {
+ this.search_map = {}
+ this.getData()
+ },
// 鏂板缓
addBtnClick() {
this.editConfig.visible = true
this.editConfig.title = "鏂板缓"
- this.editConfig.infomation = {}
+ console.log(this.addIdConfig)
+ this.editConfig.infomation = { ...this.addConfig }
},
// 缂栬緫
handleClick(row) {
@@ -183,23 +213,6 @@
},
// 鍒犻櫎
delClick() {
- // this.$confirm("鏄惁纭鍒犻櫎?", "璀﹀憡", {
- // confirmButtonText: "纭畾",
- // cancelButtonText: "鍙栨秷",
- // type: "warning"
- // })
- // .then(function () {
- // return getDeleteContact({ id: id })
- // })
- // .then((response) => {
- // if (response.code === 200) {
- // this.$message.success("鍒犻櫎鎴愬姛")
- // this.getData()
- // } else {
- // this.$message.warning("鍒犻櫎澶辫触")
- // }
- // })
- // .catch(function () {})
if (this.selValueList && this.selValueList.length > 0) {
this.$confirm("鏄惁纭鍒犻櫎?", "璀﹀憡", {
confirmButtonText: "纭畾",
@@ -243,7 +256,8 @@
...row.Client,
client_name: row.Client.name,
client_level: row.Client.client_level.name,
- client_status: row.Client.client_status.name
+ client_status: row.Client.client_status.name,
+ contact_name: row.name
}
},
// 璺熻繘
--
Gitblit v1.8.0