From dbab45ef6e56c32ca3b2d286ec5cb7ed0c86bfea Mon Sep 17 00:00:00 2001
From: charles <981744753@qq.com>
Date: 星期四, 18 七月 2024 21:57:21 +0800
Subject: [PATCH] feat:实现crm与aps共用token
---
src/views/sales/quotation/AddQuotationDialog.vue | 32 ++++++++++++++++++++++++++------
1 files changed, 26 insertions(+), 6 deletions(-)
diff --git a/src/views/sales/quotation/AddQuotationDialog.vue b/src/views/sales/quotation/AddQuotationDialog.vue
index 241096a..8bd4326 100644
--- a/src/views/sales/quotation/AddQuotationDialog.vue
+++ b/src/views/sales/quotation/AddQuotationDialog.vue
@@ -453,6 +453,9 @@
saleChancelist: []
}
},
+ mounted(){
+ this.getSaleChanceList()
+ },
created() {
this.$store.dispatch("geClient")
this.$store.dispatch("geContact")
@@ -617,12 +620,17 @@
}
},
handleSelectClient(value, item) {
- console.log(value)
+ console.log(item,'item')
if (value === "client") {
this.clientId = item.id
+ this.editConfig.infomation.client_name = item.name
this.getSaleChanceList(item)
} else if (value === "chance") {
this.saleChanceId = item.id
+ this.editConfig.infomation.sale_chance_name = item.name
+ this.editConfig.infomation.client_name = item.client.name
+ this.clientId = item.client.id
+ this.getSaleChanceList({id:this.clientId})
this.productTableList.tableData = item.products ? item.products : []
this.tableData = item.products ? item.products : []
} else {
@@ -663,26 +671,38 @@
if (value === "client") {
this.editConfig.infomation.client_name = ""
this.clientId = 0
+ this.getSaleChanceList()
} else if (value === "chance") {
this.editConfig.infomation.sale_chance_name = ""
this.saleChanceId = 0
+ this.getSaleChanceList({id:this.clientId})
} else {
this.editConfig.infomation.contact_name = ""
this.contactId = 0
}
+
this.productTableList.tableData = []
this.tableData = []
this.refresh()
},
// 閿�鍞満浼氬垪琛�
async getSaleChanceList(item) {
- await getSaleChanceList({
- page: 1,
- pageSize: 15,
- search_map: {
+ let params={}
+ if(item){
+ params={
+ page: 0,
+ pageSize: 0,
+ }
+ params.search_map={
client_id: item.id
}
- }).then((res) => {
+ }else{
+ params={
+ page: 0,
+ pageSize: 0,
+ }
+ }
+ await getSaleChanceList(params).then((res) => {
console.log(res)
this.saleChancelist = res.data.list
})
--
Gitblit v1.8.0