From e6e0141c664330129faceac14844b8f98194d04b Mon Sep 17 00:00:00 2001 From: songshankun <songshankun@foxmail.com> Date: 星期四, 12 十月 2023 20:31:15 +0800 Subject: [PATCH] fix: 修复机会详情老客户营销/状态未正确显示的问题 --- src/views/sales/salesOpportunity/DetailOpportunity.vue | 31 +++++++++++++++++++++++++------ 1 files changed, 25 insertions(+), 6 deletions(-) diff --git a/src/views/sales/salesOpportunity/DetailOpportunity.vue b/src/views/sales/salesOpportunity/DetailOpportunity.vue index f4ef747..ff5dd3e 100644 --- a/src/views/sales/salesOpportunity/DetailOpportunity.vue +++ b/src/views/sales/salesOpportunity/DetailOpportunity.vue @@ -268,6 +268,7 @@ import ServiceContract from "@/views/service/serviceContract" import DetailAdvanceDialog from "@/views/sales/salesOpportunity/DetailAdvanceDialog" import { getSaleStageList } from "@/api/sales/salesOpportunity" +import {getAllData} from "@/api/client/client"; export default { name: "DetailClientManage", props: { @@ -285,6 +286,7 @@ computed: {}, data() { return { + statusList: [], detailConfig: this.opportunityDetail, activeName: "first", isSchduleExpand: true, // 杩涘害杩借釜 @@ -330,8 +332,15 @@ sale_chance_name: this.detailConfig.infomation.name, sale_chance_id: this.detailConfig.infomation.id } - this.getSaleStageList() - this.setData(this.detailConfig.infomation) + this.getSaleStageList().then(()=>{ + return this.getAllData() + }).then((statusList)=>{ + this.statusList =statusList + + this.setData(this.detailConfig.infomation) + + }) + console.log('this.detailConfig.infomation',this.detailConfig.infomation) }, mounted() {}, methods: { @@ -363,7 +372,7 @@ leftStr: "鍟嗘満鏉ユ簮", leftValue: item.sales_sources.name, rightStr: "鍟嗘満绫诲瀷", - rightValue: "" // item.SaleType.name + rightValue: item.sale_type.name }, { leftStr: "閿�鍞樁娈�", @@ -373,13 +382,13 @@ }, { leftStr: "鑰佸鎴疯惀閿�", - leftValue: item.regular_customers_id, + leftValue: item.regular_customers.name, rightStr: "瀹℃壒鐘舵��", rightValue: "" }, { leftStr: "绔炰簤瀵规墜", - leftValue: "", + leftValue: item.competitors, rightStr: "鍒涘缓浜�", rightValue: "" }, @@ -407,7 +416,7 @@ leftStr: "棰勮鍚堝悓閲戦", leftValue: item.projected_amount, rightStr: "褰撳墠鐘舵��", - rightValue: item.status_id + rightValue: this.statusList.find(ele=>ele.id === item.status_id)?.name ?? '' } ] this.dynamicInfoList = [ @@ -553,6 +562,16 @@ options: options, id: this.detailConfig.infomation.id } + }, + + getAllData(){ + return getAllData() + .then((res) => { + return res.data.status + }) + .catch((err) => { + console.log(err) + }) } } } -- Gitblit v1.8.0