import React, { Component } from "react"; import { View, Input, Button, Text, Picker, RadioGroup, Label, Radio } from "@tarojs/components"; import Taro, { getCurrentInstance } from "@tarojs/taro"; import { getProvince } from '../../utils/tools/index' import { AtSearchBar, AtCheckbox, AtTextarea, AtModal, AtModalHeader, AtModalContent, AtModalAction, AtInput, AtIcon, AtButton, AtTag, AtRadio, AtInputNumber } from "taro-ui"; import Skeleton from "taro-skeleton"; import { queryByUidAll, updateUserDate, updateUser, addOneContact, findCustomerContacts, updateMainContact, limitUser, getBusinessProjectByName, } from "../../utils/servers/servers"; import "./index.less"; import "taro-ui/dist/style/components/icon.scss"; import "taro-ui/dist/style/components/textarea.scss"; import "taro-ui/dist/style/components/modal.scss"; import "taro-ui/dist/style/components/timeline.scss"; import "taro-ui/dist/style/components/calendar.scss"; import "taro-ui/dist/style/components/input.scss"; import "taro-ui/dist/style/components/checkbox.scss"; import "taro-ui/dist/style/components/search-bar.scss"; import "taro-ui/dist/style/components/tag.scss"; import MessageNoticebar from "../../components/common/messageNoticebar"; import { industry, channelTypeList } from '../../utils/tools/config'; import { getChannel } from "../../utils/tools"; import Superior from "../../components/common/superior"; import CheckboxPicker from "../../components/common/CheckboxPicker"; import AddressPicker from "../../components/common/addressPicker" import InteractList from "./components/InteractList"; class CustomerProfile extends Component { $instance = getCurrentInstance(); constructor(props) { super(props); this.state = { upType: -1, isOpened: false, dtails: {}, info: {}, sector: {}, isAdd: false, obj: {}, userList: [], options: [], checkOptions: [], isSuperior: false, channe: {}, isMask: false, addressPickerShow: false, region: [], customItem: [], multiplePickerShow: false, multiplePickerTitle: '', multiplePickerType: '', multiplePickerOptions: [], multiplePickerCheckedList: [], addItemShow: false, addItemType: '', addItemTitle: '', addItemInputVal: '', interactShow: false, interactShowType: '', interactTitle: '', interactList: [] }; this.queryByUidAll = this.queryByUidAll.bind(this); this.update = this.update.bind(this); this.add = this.add.bind(this); this.getUserList = this.getUserList.bind(this); this.getBusinessProjectByName = this.getBusinessProjectByName.bind(this); this.onSearchChange = this.onSearchChange.bind(this); this.handleOpenMultiplePicker = this.handleOpenMultiplePicker.bind(this); this.handleMultipleConfirm = this.handleMultipleConfirm.bind(this); this.handleAddItemSave = this.handleAddItemSave.bind(this); this.handleCloseAddItemDialog = this.handleCloseAddItemDialog.bind(this); } componentDidMount() { this.setState({ isMask: false }) this.queryByUidAll(); if (!this.isLogin()) { Taro.setStorageSync('currentPage', `/pages/customerProfile/index?id=${this.$instance.router.params.id}`) } } toggleAddressPicker(e) { const addressIds = getProvince(e.province, e.city, e.area); const { dtails } = this.state; dtails.locationProvince = addressIds[0]; dtails.locationProvinceName = e.province; dtails.locationCity = addressIds[1]; dtails.locationCityName = e.city; dtails.locationArea = addressIds[2]; dtails.locationAreaName = e.area; this.setState({ dtails, addressPickerShow: false }); } handleOpenMultiplePicker(type) { let multiplePickerOptions = []; let multiplePickerTitle = ''; let multiplePickerCheckedList = []; const { dtails } = this.state; switch (type) { case 'industry': // 企业所属行业 multiplePickerOptions = industry; multiplePickerCheckedList = !!dtails.industry ? dtails.industry.toString().split(',') : []; multiplePickerTitle = '请选择企业所属行业'; break; case 'externalInvestIndustry': // 对外投资控股的行业 multiplePickerOptions = industry; multiplePickerCheckedList = !!dtails.externalInvestIndustry ? dtails.externalInvestIndustry.toString().split(',') : []; multiplePickerTitle = '请选择对外投资控股的行业'; break; default: break; } this.setState({ multiplePickerShow: true, multiplePickerType: type, multiplePickerTitle, multiplePickerOptions, multiplePickerCheckedList: multiplePickerCheckedList.map(item => Number(item)) }) } handleMultipleConfirm(selectedIds, selectedLabels) { const { multiplePickerType, dtails } = this.state; switch (multiplePickerType) { case "industry": // 企业所属行业 dtails.industry = selectedIds.join(','); dtails.industryName = selectedLabels.join('、'); break; case "externalInvestIndustry": // 对外投资控股的行业 dtails.externalInvestIndustry = selectedIds.join(','); dtails.externalInvestIndustryName = selectedLabels.join('、'); break; default: break; } this.setState({ dtails }) } bindRegionChange (e) { console.log('picker发送选择改变,携带值为', e.detail.value) this.setState({ region: e.detail.value }) } isLogin() { return !!Taro.getStorageSync('userInfor'); } onShareAppMessage() { this.limitUser(); return { title: "客户档案", path: "/pages/customerProfile/index?id=" + this.$instance.router.params.id, }; } // 客户档案详情 queryByUidAll() { queryByUidAll( this.$instance.router.params.notRequired, { id: this.$instance.router.params.id, } ) .then((v) => { if (v.error.length === 0) { this.setState({ dtails: { ...v.data, companyCount: v.data.companyCount || 0, socialSecurityCount: v.data.socialSecurityCount || 0, externalInvestCount: v.data.externalInvestCount || 0, financialRevenue: v.data.financialRevenue || 0, financialTax: v.data.financialTax || 0, financialProperty: v.data.financialProperty || 0, financialRd: v.data.financialRd || 0, earlyCommunication: '', customerDemand: '', interviewIdeas: '', interviewPurpose: '', interviewRecommend: '', interviewFeedback: '', followUpPlan: '' } }) } else { setTimeout(() => { Taro.navigateBack({ delta: 1 }) }, 1800); Taro.showToast({ title: v.error[0].message, icon: "none", duration: 1800, }); } }) .catch((err) => { Taro.showToast({ title: "系统错误,请稍后再试", icon: "none" }); }); } validParams(params) { let flag = true; let message = ''; if (!params.locationProvince) { message = '请选择企业所在地省市区'; flag = false; } else if (!params.industry) { message = '请选择企业所属行业'; flag = false; } else if (!params.businessScope) { message = '主营产品不能为空'; flag = false; } else if (params.companyCount === '' || params.companyCount === undefined || params.companyCount === null) { message = '请输入母/子公司数'; flag = false; } else if (params.socialSecurityCount === '' || params.socialSecurityCount === undefined || params.socialSecurityCount === null) { message = '请输入社保人数'; flag = false; } else if (params.externalInvestCount === '' || params.externalInvestCount === undefined || params.externalInvestCount === null) { message = '请输入对外投资控股的企业数'; flag = false; } else if (params.financialRevenue === '' || params.financialRevenue === undefined || params.financialRevenue === null) { message = '请输入营收数据'; flag = false; } else if (params.financialTax === '' || params.financialTax === undefined || params.financialTax === null) { message = '请输入税收数据'; flag = false; } else if (params.financialProperty === '' || params.financialProperty === undefined || params.financialProperty === null) { message = '请输入资产数据'; flag = false; } else if (params.financialRd === '' || params.financialRd === undefined || params.financialRd === null) { message = '请输入研发费用'; flag = false; } else if (!params.externalInvestIndustry) { message = '请选择对外投资控股的行业'; flag = false; } else if (!params.externalInvestName) { message = '请选择对外投资控股的企业'; flag = false; } else if (!params.earlyCommunication || (params.earlyCommunication && params.earlyCommunication.length < 20)) { message = '请输入客户的难处,并且在20字以上'; flag = false; } else if (!params.customerDemand || (params.customerDemand && params.customerDemand.length < 20)) { message = '请输入客户的需求,并且在20字以上'; flag = false; } else if (!params.interviewIdeas || (params.interviewIdeas && params.interviewIdeas.length < 20)) { message = '请输入面谈思路,并且在20字以上'; flag = false; } else if (!params.interviewPurpose || (params.interviewPurpose && params.interviewPurpose.length < 20)) { message = '请输入面谈达成的目的,并且在20字以上'; flag = false; } else if (!params.interviewRecommend || (params.interviewRecommend && params.interviewRecommend.length < 20)) { message = '请输入经理/上级面谈建议,并且在20字以上'; flag = false; } else { if (this.state.dtails.interviewList.length) { if (!params.interviewFeedback || (params.interviewFeedback && params.interviewFeedback.length < 20)) { message = '请输入面谈后的反馈,并且在20字以上'; flag = false; } else if (!params.followUpPlan || (params.followUpPlan && params.followUpPlan.length < 20)) { message = '请输入后续跟进计划,并且在20字以上'; flag = false; } } } return { flag, message }; } onSaveAllData() { const { dtails } = this.state; const params = { id: dtails.id, uid: dtails.uid, industry: dtails.industry, industryName: dtails.industryName, earlyCommunication: dtails.earlyCommunication,     customerDemand: dtails.customerDemand,     interviewIdeas: dtails.interviewIdeas,     interviewPurpose: dtails.interviewPurpose,     interviewRecommend: dtails.interviewRecommend,     interviewFeedback: dtails.interviewFeedback,     followUpPlan: dtails.followUpPlan,     patentCount: dtails.patentCount,     inventionPatentCount: dtails.inventionPatentCount,     utilityModelCount: dtails.utilityModelCount,     appearancePatentCount: dtails.appearancePatentCount,     softwareWorksCount: dtails.softwareWorksCount,     otherCount: dtails.otherCount,     financialData: dtails.financialData,     companyCount: dtails.companyCount,     socialSecurityCount: dtails.socialSecurityCount,     externalInvestCount: dtails.externalInvestCount,     externalInvestIndustry: dtails.externalInvestIndustry, externalInvestIndustryName: dtails.externalInvestIndustryName, externalInvestId: '0,0',     externalInvestName: dtails.externalInvestName,     financialRevenue: dtails.financialRevenue,     financialTax: dtails.financialTax,     financialProperty: dtails.financialProperty,     financialRd: dtails.financialRd, locationProvince: dtails.locationProvince, locationProvinceName: dtails.locationProvinceName, locationCity: dtails.locationCity, locationCityName: dtails.locationCityName, locationArea: dtails.locationArea, locationAreaName: dtails.locationAreaName, standard: dtails.standard, businessScope: dtails.businessScope }; for (let key in params) { if (params[key] === undefined || params[key] === 'undefined' || params[key] === null || params[key] === 'null') { delete params[key]; } } const { flag, message } = this.validParams(params); if (!flag) { Taro.showToast({ title: message, icon: "none", }); return; } updateUser(params).then((v) => { if (v.error.length === 0) { Taro.showToast({ title: "修改成功", }); setTimeout(() => { //表示回到上一页面 Taro.navigateBack({ delta: 1 }); }, 1000) } else { Taro.showToast({ title: v.error[0].message, icon: "none", }); } }) } // 修改客户档案 update() { // const { upType, info } = this.state // console.log(info) // let tipList = [ // { key: "inventionPatentCount", value: "请填写发明专利数" }, // { key: "utilityModelCount", value: "请填写实用新型数" }, // { key: "appearancePatentCount", value: "请填写外观专利数" }, // { key: "softwareWorksCount", value: "请填写软著数" }, // { key: "otherCount", value: "请填写其他数量" }, // { key: "financialData", value: "请填写财务数据" }, // { key: "earlyCommunication", value: "请填写前期沟通" }, // { key: "interviewIdeas", value: "请填写面谈思路及目的" }, // { key: "interviewDistribution", value: "请填写主要面谈人及分工" }, // { key: "enterpriseCount", value: "请填写覆盖企业数" }, // { key: "channelIndicators", value: "请填写渠道考核指标" }, // ] // if (!info.id) { // delete info.id // } // for (let i in info) { // if (!info[i] && info[i] !== 0) { // for (var j = 0; j < tipList.length; j++) { // if (tipList[j].key == i) { // Taro.showToast({ // title: tipList[j].value, // icon: "none", // }); // } // } // return // } else if (info[i] == 0) { // if (i == "channelType") { // Taro.showToast({ // title: "请选择渠道类型", // icon: "none", // }); // return // } // } // if ((i == "financialData" || i == "earlyCommunication" || i == "interviewIdeas" || i == "interviewDistribution") // && info[i].length < 20) { // Taro.showToast({ // title: "至少20字以上", // icon: "none", // }); // return // } // } // updateUserDate(upType, info).then((v) => { // if (v.error.length === 0) { // Taro.showToast({ // title: "修改成功", // }); // this.setState({ // isOpened: false // }) // this.queryByUidAll() // } else { // Taro.showToast({ // title: v.error[0].message, // icon: "none", // }); // } // }).catch(() => { // }) this.setState({ isOpened: false, dtails: { ...this.state.dtails, ...this.state.info } }) } // 新建联系人 add() { let data = this.state.obj for (let i in data) { if (!data[i] && data[i] !== 0) { Taro.showToast({ title: "请完善信息", icon: "none", }); return } else if (i == "mobile") { if (!(/^1[3-9]\d{9}$/.test(data[i]))) { Taro.showToast({ title: "请输入正确地手机号", icon: "none", }); return } } } data.major = 1 addOneContact(data).then((v) => { if (v.error.length === 0) { Taro.showToast({ title: "添加成功", }); this.setState({ isAdd: false }) this.queryByUidAll() } else { Taro.showToast({ title: v.error[0].message, icon: "none", }); } }).catch(() => { }) } // 项目列表 getBusinessProjectByName(val) { getBusinessProjectByName({ businessName: val || "", }) .then((v) => { if (v.error.length === 0) { let theArr = []; if (v.data.length > 0) { for (let i = 0; i < v.data.length; i++) { let thisdata = v.data[i]; theArr.push({ value: thisdata.bname, label: thisdata.bname, }); }; } this.setState({ options: theArr }) } else { Taro.showToast({ title: v.error[0].message, icon: "none" }); } }) .catch((err) => { Taro.showToast({ title: "系统错误,请稍后再试", icon: "none" }); }); } onSearchChange(value) { this.setState({ value, }); } getUserList() { findCustomerContacts({ uid: this.$instance.router.params.id, }) .then((v) => { if (v.error.length === 0) { this.setState({ userList: v.data || [] }) } else { Taro.showToast({ title: v.error[0].message, icon: "none" }); } }) .catch((err) => { Taro.showToast({ title: "系统错误,请稍后再试", icon: "none" }); }); } updateMainContact(id) { updateMainContact({ uid: this.$instance.router.params.id, ocbId: id, }).then((v) => { if (v.error.length === 0) { Taro.showToast({ title: "设置成功", }); this.getUserList() } else { Taro.showToast({ title: v.error[0].message, icon: "none", }); } }).catch(() => { }) } limitUser() { limitUser({ uid: this.$instance.router.params.id, // hours: 1, }).then((v) => { if (v.error.length === 0) { } else { Taro.showToast({ title: v.error[0].message, icon: "none", }); } }).catch(() => { }) } addItemDialog(type) { let title; switch (type) { case 'externalInvestName': // 对外投资控股的企业名称 title = '添加对外投资控股的企业名称'; break; default: break; } this.setState({ addItemShow: true, addItemType: type, addItemTitle: title }); } handleCloseAddItemDialog() { this.setState({ addItemShow: false, addItemType: '', addItemInputVal: '' }); } handleAddItemSave() { switch (this.state.addItemType) { case 'externalInvestName': const { dtails } = this.state; let externalInvestName = this.state.dtails.externalInvestName || ''; let externalInvestNameArr = externalInvestName.split('、').filter(item => !!item); externalInvestNameArr.push(this.state.addItemInputVal); dtails.externalInvestName = externalInvestNameArr.join('、'); this.setState({ dtails }, () => { this.handleCloseAddItemDialog(); }); break; default: break; } } openInteractHis(type) { console.log(this.state.dtails) let interactTitle; let interactList = this.state.dtails.interviewList; switch (type) { case 'earlyCommunication': interactTitle = '客户的难处历史记录'; break; case 'customerDemand': interactTitle = '客户的需求历史记录'; break; case 'interviewIdeas': interactTitle = '面谈思路历史记录'; break; case 'interviewPurpose': interactTitle = '面谈达成的目的历史记录'; break; case 'interviewRecommend': interactTitle = '经理/上级面谈建议历史记录'; break; case 'interviewFeedback': interactTitle = '面谈后反馈历史记录'; interactList = interactList.slice(1, interactList.length); break; case 'followUpPlan': interactTitle = '后续跟进计划历史记录'; interactList = interactList.slice(1, interactList.length); break; default: break; } this.setState({ interactShow: true, interactShowType: type, interactTitle, interactList }); } render() { const { dtails, upType, info, obj, userList } = this.state; return ( {Object.keys(dtails).length === 0 ? ( ) : ( {dtails.nickname}   {["未签单", "已签单"][dtails.signBills]} {dtails.myUser == 1 && } {/* 分享 */} { e.stopPropagation() this.setState({ isSuperior: true }) }} >上级指导 { this.state.isSuperior && { this.setState({ isSuperior: false }) }} /> } { e.stopPropagation() Taro.navigateTo({ url: "/pages/situation/index?id=" + this.$instance.router.params.id + "¬Required=" + this.$instance.router.params.notRequired, }); }} >公出记录 {dtails.orgCode} {dtails.createTime} { dtails.newChannel == 1 ? 已知渠道情况 { dtails.myUser == 1 && { e.stopPropagation() this.setState({ upType: 7, isOpened: true, info: { uid: this.$instance.router.params.id, channelType: dtails.channelType, enterpriseCount: dtails.enterpriseCount, channelIndicators: dtails.channelIndicators, }, channe: { id: dtails.channelType, title: getChannel(dtails.channelType) } }) }} >修改 } 渠道类别:{getChannel(dtails.channelType)} 渠道企业数:{dtails.enterpriseCount} 渠道考核指标:{dtails.channelIndicators} 联系人 (面谈人) { dtails.myUser == 1 && { e.stopPropagation() this.getUserList(); this.setState({ isAdd: true, obj: { uid: this.$instance.router.params.id, name: "", position: "", department: "", mobile: "", } }) }} >新增 } { !!dtails.contactList && dtails.contactList.map((v, k) => {v.name}  {v.position}  {v.department}  {v.mobile} ) } : 企业面谈思路表 企业所在地省市区: {/* { this.state.region.length ? this.state.region.join('-') : '请选择' } */} {this.setState({ addressPickerShow: true })}}> { dtails.locationProvince ? `${dtails.locationProvinceName}-${dtails.locationCityName}-${dtails.locationAreaName}` : '请选择' } {/* 企业面谈思路表 { dtails.myUser == 1 && { e.stopPropagation() this.setState({ upType: 0, isOpened: true, info: { uid: this.$instance.router.params.id, industry: dtails.industry, businessScope: dtails.businessScope, }, sector: { id: dtails.industry, title: dtails.industryName } }) }} >修改 } */} 企业所属行业: this.handleOpenMultiplePicker('industry')}> { this.state.dtails.industryName || '请选择' } 主营产品: { dtails.businessScope = value; this.setState({ dtails }) }} /> 母/子公司数: { dtails.companyCount = value; this.setState({ dtails }) }} /> 社保人数: { dtails.socialSecurityCount = value; this.setState({ dtails }) }} /> 对外投资控股的企业数: { dtails.externalInvestCount = value; this.setState({ dtails }) }} /> 对外投资控股的行业: this.handleOpenMultiplePicker('externalInvestIndustry')}> { this.state.dtails.externalInvestIndustryName || '请选择' } 对外投资控股的企业名称: this.addItemDialog('externalInvestName')}> { this.state.dtails.externalInvestName || '点击新增' } 主要面谈联系信息 {/* (面谈人) */} { dtails.myUser == 1 && { e.stopPropagation() this.getUserList(); this.setState({ isAdd: true, obj: { uid: this.$instance.router.params.id, name: "", position: "", department: "", mobile: "", } }) }} >新增 } { !!dtails.contactList && dtails.contactList.map((v, k) => {v.name}  {v.position}  {v.department}  {v.mobile} {this.state.isMask && } ) } 本次面谈项目 { dtails.myUser == 1 && { e.stopPropagation() this.getBusinessProjectByName("") this.setState({ upType: 5, isOpened: true, info: { uid: this.$instance.router.params.id, intendedProject: dtails.intendedProject, }, checkOptions: !!dtails.intendedProject ? dtails.intendedProject.split(",") : [] }) }} >新增 } {dtails.intendedProject || "无"} 面谈已知企业情况 1.知识产权情况 (专利信息、标准、专利、软著) { dtails.myUser == 1 && { e.stopPropagation() this.setState({ upType: 1, isOpened: true, info: { uid: this.$instance.router.params.id, id: dtails.id, inventionPatentCount: dtails.inventionPatentCount || 0, utilityModelCount: dtails.utilityModelCount || 0, appearancePatentCount: dtails.appearancePatentCount || 0, softwareWorksCount: dtails.softwareWorksCount || 0, otherCount: dtails.otherCount || 0, } }) }} >修改 } 专利 {dtails.patentCount || 0}    其中发明专利 {dtails.inventionPatentCount || 0}    实用新型 {dtails.utilityModelCount || 0}    外观设计 {dtails.appearancePatentCount || 0}    软著 {dtails.softwareWorksCount || 0}    标准 {dtails.standard == 1 ? '有' : '无'}    其他类型 {dtails.otherCount || 0}    2.财务数据 营收(万元): { dtails.financialRevenue = value; this.setState({ dtails }) }} /> 税收(万元): { dtails.financialTax = value; this.setState({ dtails }) }} /> 资产(万元): { dtails.financialProperty = value; this.setState({ dtails }) }} /> 研发费用(万元): { dtails.financialRd = value; this.setState({ dtails }) }} /> 3.前期沟通情况 客户的难处 (20字以上) { dtails.interviewList.length ? ( this.openInteractHis('earlyCommunication')}> ) : null } { dtails.earlyCommunication = value; this.setState({ dtails }); }} /> 客户的需求 (20字以上) { dtails.interviewList.length ? ( this.openInteractHis('customerDemand')}> ) : null } { dtails.customerDemand = value; this.setState({ dtails }); }} /> 面谈思路 (20字以上) { dtails.interviewList.length ? ( this.openInteractHis('interviewIdeas')}> ) : null } { dtails.interviewIdeas = value; this.setState({ dtails }); }} /> 面谈达成的目的 (20字以上) { dtails.interviewList.length ? ( this.openInteractHis('interviewPurpose')}> ) : null } { dtails.interviewPurpose = value; this.setState({ dtails }); }} /> 经理/上级面谈建议 (由经理/上级口述,本人整理,20字以上) { dtails.interviewList.length ? ( this.openInteractHis('interviewRecommend')}> ) : null } { dtails.interviewRecommend = value; this.setState({ dtails }); }} /> { dtails.interviewList && dtails.interviewList.length ? ( <> 面谈后的反馈 (20字以上) this.openInteractHis('interviewFeedback')}> { dtails.interviewFeedback = value; this.setState({ dtails }); }} /> 后续跟进计划 (20字以上) this.openInteractHis('followUpPlan')}> { dtails.followUpPlan = value; this.setState({ dtails }); }} /> ) : null } 保存 } {/* { dtails.newChannel == 1 ? 面谈前渠道情况 面谈项目 { dtails.myUser == 1 && { e.stopPropagation() this.getBusinessProjectByName("") this.setState({ upType: 5, isOpened: true, info: { uid: this.$instance.router.params.id, intendedProject: dtails.intendedProject, }, checkOptions: !!dtails.intendedProject ? dtails.intendedProject.split(",") : [] }) }} >修改 } {dtails.intendedProject || "无"} 面谈思路及目的 { dtails.myUser == 1 && { e.stopPropagation() this.setState({ upType: 4, isOpened: true, info: { uid: this.$instance.router.params.id, id: dtails.id, interviewIdeas: dtails.interviewIdeas, } }) }} >修改 } {dtails.interviewIdeas || "无"} 我方主要面谈人及分工 { dtails.myUser == 1 && { e.stopPropagation() this.setState({ upType: 6, isOpened: true, info: { uid: this.$instance.router.params.id, id: dtails.id, interviewDistribution: dtails.interviewDistribution, } }) }} >修改 } {dtails.interviewDistribution || "无"} : 面谈企业情况 知识产权情况 (专利信息、标准、专利、软著) { dtails.myUser == 1 && { e.stopPropagation() this.setState({ upType: 1, isOpened: true, info: { uid: this.$instance.router.params.id, id: dtails.id, inventionPatentCount: dtails.inventionPatentCount || 0, utilityModelCount: dtails.utilityModelCount || 0, appearancePatentCount: dtails.appearancePatentCount || 0, softwareWorksCount: dtails.softwareWorksCount || 0, otherCount: dtails.otherCount || 0, } }) }} >修改 } 专利 {dtails.patentCount || 0}    其中发明专利 {dtails.inventionPatentCount || 0}    实用新型 {dtails.utilityModelCount || 0}    外观设计 {dtails.appearancePatentCount || 0}    软著 {dtails.softwareWorksCount || 0}    标准 {'有'}    其他类型 {dtails.otherCount || 0}    财务数据 (包括营收、税收、资产、研发费用等) { dtails.myUser == 1 && { e.stopPropagation() this.setState({ upType: 2, isOpened: true, info: { uid: this.$instance.router.params.id, id: dtails.id, financialData: dtails.financialData, } }) }} >修改 } {dtails.financialData || "无"} 前期沟通 (客户的难处、需求) { dtails.myUser == 1 && { e.stopPropagation() this.setState({ upType: 3, isOpened: true, info: { uid: this.$instance.router.params.id, id: dtails.id, earlyCommunication: dtails.earlyCommunication, } }) }} >修改 } {dtails.earlyCommunication || "无"} 面谈思路及目的 { dtails.myUser == 1 && { e.stopPropagation() this.setState({ upType: 4, isOpened: true, info: { uid: this.$instance.router.params.id, id: dtails.id, interviewIdeas: dtails.interviewIdeas, } }) }} >修改 } {dtails.interviewIdeas || "无"} } */} )} { this.setState({ isOpened: false }) }} > 信息修改 { upType == 0 && 企业行业 { this.setState({ sector: industry[e.detail.value], info: Object.assign(info, { industry: industry[e.detail.value].id, }) }) }}> {!this.state.sector.title ? "请选择" : this.state.sector.title} 企业主营产品/服务 { this.setState({ info: Object.assign(info, { businessScope: e.detail.value, }) }) }} /> } { upType == 1 && { this.setState({ info: Object.assign(info, { inventionPatentCount: e, }) }) }} /> { this.setState({ info: Object.assign(info, { utilityModelCount: e, }) }) }} /> { this.setState({ info: Object.assign(info, { appearancePatentCount: e, }) }) }} /> { this.setState({ info: Object.assign(info, { softwareWorksCount: e, }) }) }} /> 标准 { dtails.standard = Number(e.target.value); this.setState({ dtails }); }}> { this.setState({ info: Object.assign(dtails, { otherCount: e, }) }) }} /> } { upType == 2 && 财务数据 { this.setState({ info: Object.assign(info, { financialData: e, }), }) }} maxLength={200} placeholder='请填写财务数据~' /> } { upType == 3 && 前期沟通 { this.setState({ info: Object.assign(info, { earlyCommunication: e, }), }) }} maxLength={200} placeholder='请填写前期沟通~' /> } { upType == 4 && 面谈思路及目的 { this.setState({ info: Object.assign(info, { interviewIdeas: e, }), }) }} maxLength={200} placeholder='请填写面谈思路及目的~' /> } { upType == 5 && { this.getBusinessProjectByName(this.state.value); }} onClear={() => { this.setState({ value: "", }, () => { this.getBusinessProjectByName(this.state.value) }); }} /> { this.state.checkOptions.length > 0 && 已选择: { this.state.checkOptions.map((v, i) => { let list = this.state.checkOptions for (var j = 0; j < list.length; j++) { if (list[j] == v) { list.splice(j, 1) this.setState({ checkOptions: list, info: Object.assign(info, { intendedProject: list.toString(), }), }) } } }} >{v}  ) } } { this.setState({ checkOptions: e, info: Object.assign(info, { intendedProject: e.toString(), }), }) }} /> } { upType == 6 && 我方主要面谈人及分工 { this.setState({ info: Object.assign(info, { interviewDistribution: e, }), }) }} maxLength={200} placeholder='请填写我方主要面谈人及分工~' /> } { upType == 7 && 渠道类别: { this.setState({ channe: channelTypeList[e.detail.value], info: Object.assign(info, { channelType: channelTypeList[e.detail.value].id, }) }) }}> {!this.state.channe.title ? "请选择" : this.state.channe.title} 覆盖企业数: { this.setState({ info: Object.assign(info, { enterpriseCount: e.detail.value, }) }) }} /> 渠道考核指标 { this.setState({ info: Object.assign(info, { channelIndicators: e, }), }) }} maxLength={200} placeholder='请填写渠道考核指标~' /> } { this.setState({ isAdd: false }) }} > 联系人 { userList.map((item) => {item.name || " "} {item.position || " "} {item.department || " "} {item.mobile || " "} { item.major != 1 && this.updateMainContact(item.id) }} > {item.major == 1 ? "已选" : "选择"} ) } { this.setState({ obj: Object.assign(obj, { name: e, }) }) }} /> { this.setState({ obj: Object.assign(obj, { position: e, }) }) }} /> { this.setState({ obj: Object.assign(obj, { department: e, }) }) }} /> { this.setState({ obj: Object.assign(obj, { mobile: e, }) }) }} /> 新增对外投资控股的企业 this.setState({ addItemInputVal: value })} /> {/* 多选框 */} {this.setState({multiplePickerShow: false})}} onConfirm={this.handleMultipleConfirm} > {/* 沟通情况历史记录 */} { this.setState({ interactShow: false }) }} /> ); } } export default CustomerProfile;