|
@@ -0,0 +1,822 @@
|
|
|
+import React, { Component } from "react";
|
|
|
+import { View, Input, Button, Text, Picker } from "@tarojs/components";
|
|
|
+import Taro, { getCurrentInstance } from "@tarojs/taro";
|
|
|
+import {
|
|
|
+ AtCheckbox,
|
|
|
+ AtTextarea,
|
|
|
+ AtModal,
|
|
|
+ AtModalHeader,
|
|
|
+ AtModalContent,
|
|
|
+ AtModalAction,
|
|
|
+ AtInput,
|
|
|
+} from "taro-ui";
|
|
|
+import Skeleton from "taro-skeleton";
|
|
|
+import {
|
|
|
+ queryByUidAll,
|
|
|
+ updateUserDate,
|
|
|
+ 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 MessageNoticebar from "../../components/common/messageNoticebar";
|
|
|
+import { industry } from '../../utils/tools/config';
|
|
|
+import Superior from "../../components/common/superior";
|
|
|
+
|
|
|
+
|
|
|
+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,
|
|
|
+ };
|
|
|
+ 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);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ componentDidMount() {
|
|
|
+ this.queryByUidAll();
|
|
|
+ }
|
|
|
+
|
|
|
+ componentDidShow() {
|
|
|
+
|
|
|
+ }
|
|
|
+ // 客户档案详情
|
|
|
+ queryByUidAll() {
|
|
|
+ queryByUidAll({
|
|
|
+ id: this.$instance.router.params.id,
|
|
|
+ })
|
|
|
+ .then((v) => {
|
|
|
+ if (v.error.length === 0) {
|
|
|
+ this.setState({
|
|
|
+ dtails: v.data
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ Taro.showToast({ title: v.error[0].message, icon: "none" });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ Taro.showToast({ title: "系统错误,请稍后再试", icon: "none" });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ // 修改客户档案
|
|
|
+ update() {
|
|
|
+ const { upType, info } = this.state
|
|
|
+ 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: "请填写面谈思路及目的" },
|
|
|
+ ]
|
|
|
+ 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
|
|
|
+ }
|
|
|
+ }
|
|
|
+ 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(() => {
|
|
|
+
|
|
|
+ })
|
|
|
+ }
|
|
|
+ // 新建联系人
|
|
|
+ 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[34578]\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() {
|
|
|
+ getBusinessProjectByName({
|
|
|
+ businessName: "",
|
|
|
+ })
|
|
|
+ .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" });
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ 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(() => {
|
|
|
+
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ onShareAppMessage() {
|
|
|
+ this.limitUser();
|
|
|
+ return {
|
|
|
+ title: "客户档案",
|
|
|
+ path: "pages/customerProfile/index?id=" + this.$instance.router.params.id + "&signBills=" + this.$instance.router.params.signBills,
|
|
|
+ };
|
|
|
+ }
|
|
|
+
|
|
|
+ render() {
|
|
|
+ const { dtails, upType, info, obj, userList } = this.state;
|
|
|
+ return (
|
|
|
+ <View className="customerProfile">
|
|
|
+ <MessageNoticebar />
|
|
|
+ <View
|
|
|
+ className="titleContent"
|
|
|
+ style={{
|
|
|
+ padding: Object.keys(dtails).length === 0 ? "0 20px" : "0px 0px",
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {Object.keys(dtails).length === 0 ? (
|
|
|
+ <Skeleton
|
|
|
+ title
|
|
|
+ row={3}
|
|
|
+ animateName="elastic"
|
|
|
+ avatarShape="square"
|
|
|
+ loading
|
|
|
+ />
|
|
|
+ ) : (
|
|
|
+ <View className="content">
|
|
|
+ <View className="name">
|
|
|
+ <Text style={{ width: "80%" }}>
|
|
|
+ <Text className="bod">{dtails.nickname} </Text>
|
|
|
+ <Text style={{ fontSize: "12px", color: ["red", "green"][this.$instance.router.params.signBills] }}>{["未签单", "已签单"][this.$instance.router.params.signBills]}</Text>
|
|
|
+ </Text>
|
|
|
+ {dtails.myUser == 1 && <Button className="share" plain type='primary' open-type="share">分享</Button>}
|
|
|
+ {/* <View className="share">分享</View> */}
|
|
|
+ </View>
|
|
|
+ <View className="button">
|
|
|
+ <View className="but"
|
|
|
+ onClick={e => {
|
|
|
+ e.stopPropagation()
|
|
|
+ this.setState({
|
|
|
+ isSuperior: true
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ >上级指导</View>
|
|
|
+ {
|
|
|
+ this.state.isSuperior &&
|
|
|
+ <Superior
|
|
|
+ id={dtails.uid}
|
|
|
+ userNames={dtails.nickname}
|
|
|
+ isOpinion={this.state.isSuperior}
|
|
|
+ isFill={dtails.myUser == 0}
|
|
|
+ onClose={() => {
|
|
|
+ this.setState({
|
|
|
+ isSuperior: false
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ }
|
|
|
+ <View className="but"
|
|
|
+ onClick={e => {
|
|
|
+ e.stopPropagation()
|
|
|
+ Taro.navigateTo({
|
|
|
+ url: "/pages/situation/index?id=" + this.$instance.router.params.id + "&signBills=" + this.$instance.router.params.signBills + "&nickname=" + dtails.nickname,
|
|
|
+ });
|
|
|
+ }}
|
|
|
+ >公出记录</View>
|
|
|
+ </View>
|
|
|
+ <View className="row">
|
|
|
+ <View className="code">{dtails.orgCode}</View>
|
|
|
+ <View className="time">{dtails.createTime}</View>
|
|
|
+ </View>
|
|
|
+
|
|
|
+ <View className="first">
|
|
|
+ <View className="tit">
|
|
|
+ 企业所属行业及主要产品
|
|
|
+ {
|
|
|
+ dtails.myUser == 1 &&
|
|
|
+ <View className="up"
|
|
|
+ onClick={e => {
|
|
|
+ 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
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ >修改</View>
|
|
|
+ }
|
|
|
+ </View>
|
|
|
+ <View className="val">行业:{dtails.industryName}</View>
|
|
|
+ <View className="val">主营产品/服务:{dtails.businessScope}</View>
|
|
|
+ <View className="tit">
|
|
|
+ 意向合作项目
|
|
|
+ {
|
|
|
+ dtails.myUser == 1 &&
|
|
|
+ <View className="up"
|
|
|
+ onClick={e => {
|
|
|
+ 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(",") : []
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ >修改</View>
|
|
|
+ }
|
|
|
+ </View>
|
|
|
+ <View className="val">{dtails.intendedProject || "无"}</View>
|
|
|
+ <View className="tit">
|
|
|
+ <Text>
|
|
|
+ 联系人
|
|
|
+ <Text className="txt">(面谈人)</Text>
|
|
|
+ </Text>
|
|
|
+ {
|
|
|
+ dtails.myUser == 1 &&
|
|
|
+ <View className="up"
|
|
|
+ onClick={e => {
|
|
|
+ e.stopPropagation()
|
|
|
+ this.getUserList();
|
|
|
+ this.setState({
|
|
|
+ isAdd: true,
|
|
|
+ obj: {
|
|
|
+ uid: this.$instance.router.params.id,
|
|
|
+ name: "",
|
|
|
+ position: "",
|
|
|
+ department: "",
|
|
|
+ mobile: "",
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ >新增</View>
|
|
|
+ }
|
|
|
+ </View>
|
|
|
+ {
|
|
|
+ !!dtails.contactList && dtails.contactList.map((v, k) =>
|
|
|
+ <View className="val" key={k}>{v.name} {v.position} {v.department} {v.mobile}</View>
|
|
|
+ )
|
|
|
+ }
|
|
|
+ </View>
|
|
|
+
|
|
|
+ <View className="two">
|
|
|
+ <View className="title">面谈企业情况</View>
|
|
|
+ <View className="tit">
|
|
|
+ <Text>
|
|
|
+ 知识产权情况
|
|
|
+ <Text className="txt">(专利信息、标准、专利、软著)</Text>
|
|
|
+ </Text>
|
|
|
+ {
|
|
|
+ dtails.myUser == 1 &&
|
|
|
+ <View className="up"
|
|
|
+ onClick={e => {
|
|
|
+ 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,
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ >修改</View>
|
|
|
+ }
|
|
|
+ </View>
|
|
|
+ <View className="val">
|
|
|
+ 专利 <Text className="num">{dtails.patentCount || 0}</Text>
|
|
|
+ 其中发明专利 <Text className="num">{dtails.inventionPatentCount || 0}</Text>
|
|
|
+ 实用新型 <Text className="num">{dtails.utilityModelCount || 0}</Text>
|
|
|
+ 外观设计 <Text className="num">{dtails.appearancePatentCount || 0}</Text>
|
|
|
+ 软著 <Text className="num">{dtails.softwareWorksCount || 0}</Text>
|
|
|
+ 其他类型 <Text className="num">{dtails.otherCount || 0}</Text>
|
|
|
+ </View>
|
|
|
+ <View className="tit">
|
|
|
+ <Text>
|
|
|
+ 财务数据
|
|
|
+ <Text className="txt">(包括营收、税收、资产、研发费用等)</Text>
|
|
|
+ </Text>
|
|
|
+ {
|
|
|
+ dtails.myUser == 1 &&
|
|
|
+ <View className="up"
|
|
|
+ onClick={e => {
|
|
|
+ e.stopPropagation()
|
|
|
+ this.setState({
|
|
|
+ upType: 2,
|
|
|
+ isOpened: true,
|
|
|
+ info: {
|
|
|
+ uid: this.$instance.router.params.id,
|
|
|
+ id: dtails.id,
|
|
|
+ financialData: dtails.financialData,
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ >修改</View>
|
|
|
+ }
|
|
|
+ </View>
|
|
|
+ <View className="val">{dtails.financialData || "无"}</View>
|
|
|
+ <View className="tit">
|
|
|
+ <Text>
|
|
|
+ 前期沟通
|
|
|
+ <Text className="txt">(客户的难处、需求)</Text>
|
|
|
+ </Text>
|
|
|
+ {
|
|
|
+ dtails.myUser == 1 &&
|
|
|
+ <View className="up"
|
|
|
+ onClick={e => {
|
|
|
+ e.stopPropagation()
|
|
|
+ this.setState({
|
|
|
+ upType: 3,
|
|
|
+ isOpened: true,
|
|
|
+ info: {
|
|
|
+ uid: this.$instance.router.params.id,
|
|
|
+ id: dtails.id,
|
|
|
+ earlyCommunication: dtails.earlyCommunication,
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ >修改</View>
|
|
|
+ }
|
|
|
+ </View>
|
|
|
+ <View className="val">{dtails.earlyCommunication || "无"}</View>
|
|
|
+ <View className="tit">
|
|
|
+ <Text>
|
|
|
+ 面谈思路及目的
|
|
|
+ </Text>
|
|
|
+ {
|
|
|
+ dtails.myUser == 1 &&
|
|
|
+ <View className="up"
|
|
|
+ onClick={e => {
|
|
|
+ e.stopPropagation()
|
|
|
+ this.setState({
|
|
|
+ upType: 4,
|
|
|
+ isOpened: true,
|
|
|
+ info: {
|
|
|
+ uid: this.$instance.router.params.id,
|
|
|
+ id: dtails.id,
|
|
|
+ interviewIdeas: dtails.interviewIdeas,
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ >修改</View>
|
|
|
+ }
|
|
|
+ </View>
|
|
|
+ <View className="val">{dtails.interviewIdeas || "无"}</View>
|
|
|
+ </View>
|
|
|
+ </View>
|
|
|
+ )}
|
|
|
+ </View>
|
|
|
+
|
|
|
+ <AtModal
|
|
|
+ isOpened={this.state.isOpened}
|
|
|
+ >
|
|
|
+ <AtModalHeader>信息修改</AtModalHeader>
|
|
|
+ <AtModalContent>
|
|
|
+ {
|
|
|
+ upType == 0 &&
|
|
|
+ <View>
|
|
|
+ <View className='selectTitle'>企业行业</View>
|
|
|
+ <Picker
|
|
|
+ value={this.state.sector.id}
|
|
|
+ range={industry} rangeKey='title' mode='selector'
|
|
|
+ onChange={(e) => {
|
|
|
+ this.setState({
|
|
|
+ sector: industry[e.detail.value],
|
|
|
+ info: Object.assign(info, {
|
|
|
+ industry: industry[e.detail.value].id,
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }}>
|
|
|
+ <View style={{ marginBottom: "10px", color: !this.state.sector.title && "#CCCCCC" }}>
|
|
|
+ {!this.state.sector.title ? "请选择" : this.state.sector.title}
|
|
|
+ </View>
|
|
|
+ </Picker>
|
|
|
+ <View className='selectTitle'>企业主营产品/服务</View>
|
|
|
+ <Input
|
|
|
+ // name='value'
|
|
|
+ // title='企业主营产品/服务'
|
|
|
+ type='text'
|
|
|
+ placeholder='请用,符号隔开关键字'
|
|
|
+ value={info.businessScope}
|
|
|
+ onInput={e => {
|
|
|
+ this.setState({
|
|
|
+ info: Object.assign(info, {
|
|
|
+ businessScope: e.detail.value,
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ </View>
|
|
|
+ }
|
|
|
+ {
|
|
|
+ upType == 1 &&
|
|
|
+ <View>
|
|
|
+ <AtInput
|
|
|
+ name='inventionPatentCount'
|
|
|
+ title='发明专利'
|
|
|
+ type='number'
|
|
|
+ value={info.inventionPatentCount}
|
|
|
+ onChange={e => {
|
|
|
+ this.setState({
|
|
|
+ info: Object.assign(info, {
|
|
|
+ inventionPatentCount: e,
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ <AtInput
|
|
|
+ name='utilityModelCount'
|
|
|
+ title='实用新型'
|
|
|
+ type='number'
|
|
|
+ value={info.utilityModelCount}
|
|
|
+ onChange={e => {
|
|
|
+ this.setState({
|
|
|
+ info: Object.assign(info, {
|
|
|
+ utilityModelCount: e,
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ <AtInput
|
|
|
+ name='appearancePatentCount'
|
|
|
+ title='外观专利'
|
|
|
+ type='number'
|
|
|
+ value={info.appearancePatentCount}
|
|
|
+ onChange={e => {
|
|
|
+ this.setState({
|
|
|
+ info: Object.assign(info, {
|
|
|
+ appearancePatentCount: e,
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ <AtInput
|
|
|
+ name='softwareWorksCount'
|
|
|
+ title='软著'
|
|
|
+ type='number'
|
|
|
+ value={info.softwareWorksCount}
|
|
|
+ onChange={e => {
|
|
|
+ this.setState({
|
|
|
+ info: Object.assign(info, {
|
|
|
+ softwareWorksCount: e,
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ <AtInput
|
|
|
+ name='otherCount'
|
|
|
+ title='其他'
|
|
|
+ type='number'
|
|
|
+ value={info.otherCount}
|
|
|
+ onChange={e => {
|
|
|
+ this.setState({
|
|
|
+ info: Object.assign(info, {
|
|
|
+ otherCount: e,
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ </View>
|
|
|
+ }
|
|
|
+ {
|
|
|
+ upType == 2 &&
|
|
|
+ <View>
|
|
|
+ <View className='selectTitle'>财务数据</View>
|
|
|
+ <AtTextarea
|
|
|
+ value={info.financialData || ""}
|
|
|
+ onChange={e => {
|
|
|
+ this.setState({
|
|
|
+ info: Object.assign(info, {
|
|
|
+ financialData: e,
|
|
|
+ }),
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ maxLength={200}
|
|
|
+ placeholder='请填写~'
|
|
|
+ />
|
|
|
+ </View>
|
|
|
+ }
|
|
|
+ {
|
|
|
+ upType == 3 &&
|
|
|
+ <View>
|
|
|
+ <View className='selectTitle'>前期沟通</View>
|
|
|
+ <AtTextarea
|
|
|
+ value={info.earlyCommunication || ""}
|
|
|
+ onChange={e => {
|
|
|
+ this.setState({
|
|
|
+ info: Object.assign(info, {
|
|
|
+ earlyCommunication: e,
|
|
|
+ }),
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ maxLength={200}
|
|
|
+ placeholder='请填写~'
|
|
|
+ />
|
|
|
+ </View>
|
|
|
+ }
|
|
|
+ {
|
|
|
+ upType == 4 &&
|
|
|
+ <View>
|
|
|
+ <View className='selectTitle'>面谈思路及目的</View>
|
|
|
+ <AtTextarea
|
|
|
+ value={info.interviewIdeas || ""}
|
|
|
+ onChange={e => {
|
|
|
+ this.setState({
|
|
|
+ info: Object.assign(info, {
|
|
|
+ interviewIdeas: e,
|
|
|
+ }),
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ maxLength={200}
|
|
|
+ placeholder='请填写~'
|
|
|
+ />
|
|
|
+ </View>
|
|
|
+ }
|
|
|
+ {
|
|
|
+ upType == 5 &&
|
|
|
+ <View>
|
|
|
+ <AtCheckbox
|
|
|
+ options={this.state.options}
|
|
|
+ selectedList={this.state.checkOptions}
|
|
|
+ onChange={e => {
|
|
|
+ this.setState({
|
|
|
+ checkOptions: e,
|
|
|
+ info: Object.assign(info, {
|
|
|
+ intendedProject: e.toString(),
|
|
|
+ }),
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ </View>
|
|
|
+ }
|
|
|
+ </AtModalContent>
|
|
|
+ <AtModalAction>
|
|
|
+ <Button type='secondary' onClick={() => { this.setState({ isOpened: false }) }}>取消</Button>
|
|
|
+ <Button type='primary' onClick={this.update}>确定修改</Button>
|
|
|
+ </AtModalAction>
|
|
|
+ </AtModal>
|
|
|
+
|
|
|
+ <AtModal
|
|
|
+ isOpened={this.state.isAdd}
|
|
|
+ >
|
|
|
+ <AtModalHeader>联系人</AtModalHeader>
|
|
|
+ <AtModalContent>
|
|
|
+ {
|
|
|
+ userList.map((item) =>
|
|
|
+ <View key={item.id} className="additem">
|
|
|
+ <Text className="txt">{item.name || "无"}</Text>
|
|
|
+ <Text className="txt">{item.position || "无"}</Text>
|
|
|
+ <Text className="txt">{item.department || "无"}</Text>
|
|
|
+ <Text className="mobile">{item.mobile || "无"}</Text>
|
|
|
+ <View
|
|
|
+ className={item.major == 1 ? "bts" : "bt"}
|
|
|
+ onClick={() => {
|
|
|
+ item.major != 1 && this.updateMainContact(item.id)
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ {item.major == 1 ? "已选" : "选择"}
|
|
|
+ </View>
|
|
|
+ </View>
|
|
|
+ )
|
|
|
+ }
|
|
|
+ <AtInput
|
|
|
+ required
|
|
|
+ name='name'
|
|
|
+ title='姓名'
|
|
|
+ type='text'
|
|
|
+ placeholder='请填写姓名'
|
|
|
+ value={obj.name}
|
|
|
+ onChange={e => {
|
|
|
+ this.setState({
|
|
|
+ obj: Object.assign(obj, {
|
|
|
+ name: e,
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ <AtInput
|
|
|
+ required
|
|
|
+ name='position'
|
|
|
+ title='职位'
|
|
|
+ type='text'
|
|
|
+ placeholder='请填写职位'
|
|
|
+ value={obj.position}
|
|
|
+ onChange={e => {
|
|
|
+ this.setState({
|
|
|
+ obj: Object.assign(obj, {
|
|
|
+ position: e,
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ <AtInput
|
|
|
+ required
|
|
|
+ name='department'
|
|
|
+ title='部门'
|
|
|
+ type='text'
|
|
|
+ placeholder='请填写部门'
|
|
|
+ value={obj.department}
|
|
|
+ onChange={e => {
|
|
|
+ this.setState({
|
|
|
+ obj: Object.assign(obj, {
|
|
|
+ department: e,
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ <AtInput
|
|
|
+ required
|
|
|
+ name='mobile'
|
|
|
+ title='手机'
|
|
|
+ type='phone'
|
|
|
+ placeholder='请填写手机号'
|
|
|
+ value={obj.mobile}
|
|
|
+ onChange={e => {
|
|
|
+ this.setState({
|
|
|
+ obj: Object.assign(obj, {
|
|
|
+ mobile: e,
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }}
|
|
|
+ />
|
|
|
+ </AtModalContent>
|
|
|
+ <AtModalAction>
|
|
|
+ <Button type='secondary'
|
|
|
+ onClick={() => {
|
|
|
+ this.setState({
|
|
|
+ isAdd: false
|
|
|
+ }, () => {
|
|
|
+ this.queryByUidAll()
|
|
|
+ })
|
|
|
+ }}>取消</Button>
|
|
|
+ <Button type='primary' onClick={this.add}>保存</Button>
|
|
|
+ </AtModalAction>
|
|
|
+ </AtModal>
|
|
|
+
|
|
|
+ </View>
|
|
|
+ );
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+export default CustomerProfile;
|