From 26c39cd359bc0d2edc88408ff51ef70554e32a90 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期四, 29 二月 2024 09:48:17 +0800
Subject: [PATCH] 跟进记录明细报价单没点击弹框下拉数据为空的问题选择机会或者报价单赋值客户名称
---
src/views/sales/salesDetails/AddSalesDetailsDialog.vue | 57 +++++++++++++++++++++++++++++++++++++++++----------------
1 files changed, 41 insertions(+), 16 deletions(-)
diff --git a/src/views/sales/salesDetails/AddSalesDetailsDialog.vue b/src/views/sales/salesDetails/AddSalesDetailsDialog.vue
index a7a24a2..de79216 100644
--- a/src/views/sales/salesDetails/AddSalesDetailsDialog.vue
+++ b/src/views/sales/salesDetails/AddSalesDetailsDialog.vue
@@ -554,7 +554,7 @@
computed: {
clientList() {
return this.$store.state.getClientName.clientList
- }
+ },
// saleChancelist() {
// return this.$store.state.getClientName.saleChancelist
// },
@@ -637,6 +637,10 @@
}
}
}
+ },
+ mounted(){
+ this.getSaleChanceList()
+ this.getQuotation()
},
created() {
if (this.editConfig.title !== "鏂板缓") {
@@ -820,13 +824,16 @@
},
// 鑾峰彇鎶ヤ环鍗�
getQuotation(id, value) {
- getQuotationList({
- page: 0,
+ let params={
+ page: 0,
pageSize: 0,
- search_map: {
- sale_chance_id: id
- }
- }).then((res) => {
+ }
+ if(id){
+ params.search_map={
+ sale_chance_id: id
+ }
+ }
+ getQuotationList(params).then((res) => {
if (res.code == 200) {
console.log(res)
this.quotationList = res.data.list
@@ -856,15 +863,11 @@
restaurants = this.clientList
console.log(restaurants, "瀹㈡埛鍗�")
} else if (value === "chance") {
- if (this.editConfig.infomation.client_name) {
restaurants = this.saleChancelist
- }
} else if (value === "subbill") {
restaurants = this.subOrderList
} else if (value === "quotation") {
- if (this.editConfig.infomation.sale_chance_name) {
restaurants = this.quotationList
- }
}
var results = queryString ? restaurants.filter(this.createStateFilter(queryString, value)) : restaurants
cb(results)
@@ -880,13 +883,22 @@
},
// 閿�鍞満浼氬垪琛�
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
})
@@ -915,7 +927,10 @@
} else if (value === "chance") {
this.saleChanceId = item.id
this.editConfig.infomation.sale_chance_name = item.name
+ this.clientId = item.client.id
+ this.editConfig.infomation.client_name = item.client.name
this.isAddQuatation = false
+ this.getSaleChanceList({id:this.clientId})
this.getQuotation(item.id)
} else if (value === "subbill") {
console.log("涓嬫媺妗嗙偣鍑�", item)
@@ -926,6 +941,14 @@
this.tableData = item.products
this.editConfig.infomation.quotation_number = item.number
this.quotationId = item.id
+ //鍙嶅悜 瀹㈡埛鍚嶇О
+ this.editConfig.infomation.client_name = item.client.name
+ this.clientId = item.client.id
+ this.getSaleChanceList({id:this.clientId})
+ //鍙嶅悜 閿�鍞満浼�
+ this.editConfig.infomation.sale_chance_name = item.sale_chance.name
+ this.saleChanceId = item.sale_chance.id
+ this.getQuotation(this.saleChanceId)
}
},
selClientClick(value) {
@@ -1002,12 +1025,14 @@
this.clientId = 0
this.saleChanceId = 0
this.subbillId = 0
+ this.getSaleChanceList()
} else if (value === "chance") {
this.editConfig.infomation.sale_chance_name = ""
this.saleChanceId = 0
this.isAddQuatation = true
this.editConfig.infomation.quotation_number = ""
this.quotationId = 0
+ this.getQuotation(this.saleChanceId)
} else if (value === "subbill") {
this.editConfig.infomation.subbill_name = ""
this.subbillId = 0
--
Gitblit v1.8.0