|  |  |  | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <template slot="title"> | 
|---|
|  |  |  | <div class="header"> | 
|---|
|  |  |  | <span class="header-label">机会名称</span> | 
|---|
|  |  |  | <span class="header-label">销售机会</span> | 
|---|
|  |  |  | <span class="header-title">{{ detailConfig.infomation.name }}</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <!-- 推进 --> | 
|---|
|  |  |  | <DetailAdvanceDialog v-if="advanceConfig.visible" :advance-config="advanceConfig" /> | 
|---|
|  |  |  | <DetailAdvanceDialog v-if="advanceConfig.visible" :advance-config="advanceConfig" @pushed="updatePushData" /> | 
|---|
|  |  |  | </el-drawer> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | 
|---|
|  |  |  | 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: { | 
|---|
|  |  |  | 
|---|
|  |  |  | computed: {}, | 
|---|
|  |  |  | data() { | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | statusList: [], | 
|---|
|  |  |  | detailConfig: this.opportunityDetail, | 
|---|
|  |  |  | activeName: "first", | 
|---|
|  |  |  | isSchduleExpand: true, // 进度追踪 | 
|---|
|  |  |  | 
|---|
|  |  |  | 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: { | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 更新推进记录 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | updatePushData(e){ | 
|---|
|  |  |  | this.sale_active = e.step - 1 | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | async getSaleStageList() { | 
|---|
|  |  |  | await getSaleStageList().then((res) => { | 
|---|
|  |  |  | this.stepsList = res.data.list | 
|---|
|  |  |  | 
|---|
|  |  |  | leftStr: "商机来源", | 
|---|
|  |  |  | leftValue: item.sales_sources.name, | 
|---|
|  |  |  | rightStr: "商机类型", | 
|---|
|  |  |  | rightValue: "" // item.SaleType.name | 
|---|
|  |  |  | rightValue: item.sale_type.name | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | leftStr: "销售阶段", | 
|---|
|  |  |  | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | leftStr: "老客户营销", | 
|---|
|  |  |  | leftValue: item.regular_customers_id, | 
|---|
|  |  |  | leftValue: item.regular_customers.name, | 
|---|
|  |  |  | rightStr: "审批状态", | 
|---|
|  |  |  | rightValue: "" | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | leftStr: "竞争对手", | 
|---|
|  |  |  | leftValue: "", | 
|---|
|  |  |  | leftValue: item.competitors, | 
|---|
|  |  |  | rightStr: "创建人", | 
|---|
|  |  |  | rightValue: "" | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | 
|---|
|  |  |  | leftStr: "预计合同金额", | 
|---|
|  |  |  | leftValue: item.projected_amount, | 
|---|
|  |  |  | rightStr: "当前状态", | 
|---|
|  |  |  | rightValue: item.status_id | 
|---|
|  |  |  | rightValue: this.statusList.find(ele=>ele.id === item.status_id)?.name ?? '' | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | this.dynamicInfoList = [ | 
|---|
|  |  |  | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | leftStr: "详细地址", | 
|---|
|  |  |  | leftValue: "", | 
|---|
|  |  |  | leftValue: item.detail_address, | 
|---|
|  |  |  | rightStr: "", | 
|---|
|  |  |  | rightValue: "" | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | options: options, | 
|---|
|  |  |  | id: this.detailConfig.infomation.id | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | getAllData(){ | 
|---|
|  |  |  | return getAllData() | 
|---|
|  |  |  | .then((res) => { | 
|---|
|  |  |  | return res.data.status | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | .catch((err) => { | 
|---|
|  |  |  | console.log(err) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|