index.jsx 83 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178
  1. import React, { Component } from "react";
  2. import { View, Button, Text, Picker, RadioGroup, Label, Radio } from "@tarojs/components";
  3. import Taro, { getCurrentInstance } from "@tarojs/taro";
  4. import { getProvince } from '../../utils/tools/index'
  5. import {
  6. AtSearchBar,
  7. AtTextarea,
  8. AtModal,
  9. AtModalHeader,
  10. AtModalContent,
  11. AtModalAction,
  12. AtInput,
  13. AtIcon,
  14. AtButton,
  15. AtInputNumber
  16. } from "taro-ui";
  17. import Skeleton from "taro-skeleton";
  18. import {
  19. queryByUidAll,
  20. getInterviewByPrdid,
  21. updateUser,
  22. addOneContact,
  23. findCustomerContacts,
  24. updateMainContact,
  25. limitUser,
  26. getBusinessProjectByName,
  27. addProject,
  28. queryProjectList,
  29. delProject
  30. } from "../../utils/servers/servers";
  31. import "./index.less";
  32. import "taro-ui/dist/style/components/icon.scss";
  33. import "taro-ui/dist/style/components/textarea.scss";
  34. import "taro-ui/dist/style/components/modal.scss";
  35. import "taro-ui/dist/style/components/timeline.scss";
  36. import "taro-ui/dist/style/components/calendar.scss";
  37. import "taro-ui/dist/style/components/input.scss";
  38. import "taro-ui/dist/style/components/search-bar.scss";
  39. import MessageNoticebar from "../../components/common/messageNoticebar";
  40. import { industry, channelTypeList, yearList, addressList } from '../../utils/tools/config';
  41. import { getChannel } from "../../utils/tools";
  42. import Superior from "../../components/common/superior";
  43. import CheckboxPicker from "../../components/common/CheckboxPicker";
  44. import AddressPicker from "../../components/common/addressPicker"
  45. import CustomerProjectSelect from '../../components/common/CustomerProjectSelect';
  46. import InterviewHisList from "../../components/common/InterviewHisList";
  47. class CustomerProfile extends Component {
  48. $instance = getCurrentInstance();
  49. constructor(props) {
  50. super(props);
  51. this.state = {
  52. upType: -1,
  53. isOpened: false,
  54. dtails: {},
  55. projectingList: [],
  56. projectedList: [],
  57. projectList: [],
  58. info: {},
  59. sector: {},
  60. isAdd: false,
  61. obj: {},
  62. userList: [],
  63. allProjectList: [],
  64. options: [],
  65. checkProject: [],
  66. checkOptions: [],
  67. isSuperior: false,
  68. channe: {},
  69. isMask: false,
  70. addressPickerShow: false,
  71. region: [],
  72. customItem: [],
  73. multiplePickerShow: false,
  74. multiplePickerTitle: '',
  75. multiplePickerType: '',
  76. multiplePickerOptions: [],
  77. multiplePickerCheckedList: [],
  78. addItemShow: false,
  79. addItemType: '',
  80. addItemTitle: '',
  81. addItemInputVal: '',
  82. interactShow: false,
  83. interactShowType: '',
  84. interactTitle: '',
  85. interactList: [],
  86. checkCompShow: false,
  87. checkCompList: [],
  88. currAddress: [],
  89. };
  90. this.queryByUidAll = this.queryByUidAll.bind(this);
  91. this.update = this.update.bind(this);
  92. this.add = this.add.bind(this);
  93. this.getUserList = this.getUserList.bind(this);
  94. this.getBusinessProjectByName = this.getBusinessProjectByName.bind(this);
  95. this.onSearchChange = this.onSearchChange.bind(this);
  96. this.handleOpenMultiplePicker = this.handleOpenMultiplePicker.bind(this);
  97. this.handleMultipleConfirm = this.handleMultipleConfirm.bind(this);
  98. this.handleAddItemSave = this.handleAddItemSave.bind(this);
  99. this.handleCloseAddItemDialog = this.handleCloseAddItemDialog.bind(this);
  100. }
  101. componentDidMount() {
  102. this.setState({
  103. isMask: false
  104. })
  105. this.queryByUidAll();
  106. this.getProjectList();
  107. }
  108. componentDidUpdate(prevProps) {
  109. const { interviewIdx, customerList } = this.props;
  110. if (interviewIdx != prevProps.interviewIdx && interviewIdx >= 0 && interviewIdx < customerList.length) {
  111. this.queryByUidAll();
  112. this.getProjectList();
  113. }
  114. }
  115. addCommas(num) {
  116. let newNum = num.toString().replace(/,/g, '');
  117. if (num.toString().length > 1) {
  118. newNum = newNum.toString().replace(/^0+/, '');
  119. }
  120. return newNum.replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,');
  121. }
  122. openAddressPicker() {
  123. const { dtails } = this.state;
  124. let currAddress = [];
  125. if (dtails.locationProvince && dtails.locationCity && dtails.locationArea) {
  126. let provIdx = 0, cityIdx = 0, areaIdx = 0;
  127. addressList.map((provItem, idx1) => {
  128. if (provItem.id == dtails.locationProvince) {
  129. provIdx = idx1;
  130. provItem.cityList.map((cityItem, idx2) => {
  131. if (cityItem.id == dtails.locationCity) {
  132. cityIdx = idx2;
  133. cityItem.areaList.map((areaItem, idx3) => {
  134. if (areaItem.id == dtails.locationArea) {
  135. areaIdx = idx3;
  136. }
  137. })
  138. }
  139. })
  140. }
  141. })
  142. currAddress = [provIdx, cityIdx, areaIdx];
  143. }
  144. this.setState({ addressPickerShow: true, currAddress })
  145. }
  146. handlePrevClick() {
  147. this.props.onPrevClick();
  148. }
  149. handleNextClick() {
  150. this.onSaveAllData((resData) => {
  151. this.props.onNextClick(resData);
  152. })
  153. }
  154. toggleAddressPicker(e) {
  155. if (!e.province) {
  156. this.setState({ addressPickerShow: false });
  157. return;
  158. }
  159. const addressIds = getProvince(e.province, e.city, e.area);
  160. const { dtails } = this.state;
  161. dtails.locationProvince = addressIds[0];
  162. dtails.locationProvinceName = e.province;
  163. dtails.locationCity = addressIds[1];
  164. dtails.locationCityName = e.city;
  165. dtails.locationArea = addressIds[2];
  166. dtails.locationAreaName = e.area;
  167. this.setState({ dtails, addressPickerShow: false });
  168. }
  169. handleSelComp() {
  170. const { dtails } = this.state;
  171. let externalInvestList = [];
  172. if (dtails.externalInvestName) {
  173. let externalInvestNameList = dtails.externalInvestName ? dtails.externalInvestName.split(',') : [];
  174. let externalInvestIdList = dtails.externalInvestId ? dtails.externalInvestId.split(',') : [];
  175. externalInvestList = externalInvestNameList.map((name, idx) => {
  176. return { id: externalInvestIdList[idx] || 0, name }
  177. });
  178. }
  179. this.setState({ checkCompShow: true, checkCompList: externalInvestList });
  180. }
  181. handleCheckCompConfirm(data) {
  182. let externalInvestId = data.map(item => item.id).join(',');
  183. let externalInvestName = data.map(item => item.name).join(',');
  184. this.setState({ dtails: { ...this.state.dtails, externalInvestId, externalInvestName } });
  185. }
  186. handleOpenMultiplePicker(type) {
  187. let multiplePickerOptions = [];
  188. let multiplePickerTitle = '';
  189. let multiplePickerCheckedList = [];
  190. const { dtails, info } = this.state;
  191. switch (type) {
  192. case 'industry':
  193. // 企业所属行业
  194. multiplePickerOptions = industry;
  195. multiplePickerCheckedList = !!dtails.industry ? dtails.industry.toString().split(',') : [];
  196. multiplePickerTitle = '请选择企业所属行业';
  197. break;
  198. case 'externalInvestIndustry':
  199. // 对外投资控股的行业
  200. multiplePickerOptions = industry;
  201. multiplePickerCheckedList = !!dtails.externalInvestIndustry ? dtails.externalInvestIndustry.toString().split(',') : [];
  202. multiplePickerTitle = '请选择对外投资控股的行业';
  203. break;
  204. case 'examineStatusOther':
  205. // 复审年份
  206. multiplePickerOptions = yearList;
  207. multiplePickerCheckedList = info.examineStatusOther ? info.examineStatusOther.split(',') : [];
  208. multiplePickerTitle = '请选择年份';
  209. break;
  210. case 'buyStatusOther':
  211. // 复购/复审年份
  212. multiplePickerOptions = yearList;
  213. multiplePickerCheckedList = info.buyStatusOther ? info.buyStatusOther.split(',') : [];
  214. multiplePickerTitle = '请选择年份';
  215. break;
  216. default:
  217. break;
  218. }
  219. this.setState({
  220. multiplePickerShow: true,
  221. multiplePickerType: type,
  222. multiplePickerTitle,
  223. multiplePickerOptions,
  224. multiplePickerCheckedList: multiplePickerCheckedList.map(item => Number(item))
  225. })
  226. }
  227. handleMultipleConfirm(selectedIds, selectedLabels) {
  228. const { multiplePickerType, dtails, info } = this.state;
  229. switch (multiplePickerType) {
  230. case "industry":
  231. // 企业所属行业
  232. dtails.industry = selectedIds.join(',');
  233. dtails.industryName = selectedLabels.join(',');
  234. this.setState({ dtails })
  235. break;
  236. case "externalInvestIndustry":
  237. // 对外投资控股的行业
  238. dtails.externalInvestIndustry = selectedIds.join(',');
  239. dtails.externalInvestIndustryName = selectedLabels.join(',');
  240. this.setState({ dtails })
  241. break;
  242. case 'examineStatusOther':
  243. info.examineStatusOther = selectedIds.join(',');
  244. this.setState({ info });
  245. break;
  246. case 'buyStatusOther':
  247. info.buyStatusOther = selectedIds.join(',');
  248. this.setState({ info });
  249. break;
  250. default:
  251. break;
  252. }
  253. }
  254. bindRegionChange(e) {
  255. this.setState({
  256. region: e.detail.value
  257. })
  258. }
  259. isLogin() {
  260. return !!Taro.getStorageSync('userInfor');
  261. }
  262. onShareAppMessage() {
  263. this.limitUser();
  264. return {
  265. title: "客户档案",
  266. path: "/pages/customerProfile/index?id=" + this.$instance.router.params.id,
  267. };
  268. }
  269. getInterviewData() {
  270. getInterviewByPrdid({ prdid: this.$instance.router.params.prdid }).then(res => {
  271. if (res.error.length === 0) {
  272. let defaultDetailData = this.state.dtails || {};
  273. this.setState({
  274. dtails: {
  275. ...defaultDetailData,
  276. earlyCommunication: res.data.data.earlyCommunication,
  277. customerDemand: res.data.data.customerDemand,
  278. interviewIdeas: res.data.data.interviewIdeas,
  279. interviewPurpose: res.data.data.interviewPurpose,
  280. interviewRecommend: res.data.data.interviewRecommend,
  281. interviewFeedback: res.data.data.interviewFeedback,
  282. followUpPlan: res.data.data.followUpPlan,
  283. interviewList: res.data.list.filter(item => !!item.prdid),
  284. }
  285. });
  286. } else {
  287. Taro.showToast({ title: "沟通情况数据获取异常", icon: "none" });
  288. }
  289. })
  290. }
  291. // 客户档案详情
  292. queryByUidAll() {
  293. const id = this.$instance.router.params.id;
  294. queryByUidAll(
  295. true,
  296. { id }
  297. )
  298. .then((v) => {
  299. if (v.error.length === 0) {
  300. let dtailsData = {
  301. ...v.data,
  302. companyCount: this.addCommas(v.data.companyCount || 0),
  303. socialSecurityCount: this.addCommas(v.data.socialSecurityCount || 0),
  304. externalInvestCount: this.addCommas(v.data.externalInvestCount || 0),
  305. financialRevenue: this.addCommas(v.data.financialRevenue || 0),
  306. financialTax: this.addCommas(v.data.financialTax || 0),
  307. financialProperty: this.addCommas(v.data.financialProperty || 0),
  308. financialRd: this.addCommas(v.data.financialRd || 0),
  309. enterpriseCount: this.addCommas(v.data.enterpriseCount || 0),
  310. earlyCommunication: '',
  311. customerDemand: '',
  312. interviewIdeas: '',
  313. interviewPurpose: '',
  314. interviewRecommend: '',
  315. interviewFeedback: '',
  316. followUpPlan: '',
  317. interviewList: [],
  318. }
  319. let patentCount = this.countZlNum(dtailsData);
  320. this.setState({
  321. dtails: { ...dtailsData, patentCount }
  322. }, () => {
  323. this.getInterviewData();
  324. });
  325. } else {
  326. setTimeout(() => {
  327. Taro.navigateBack({
  328. delta: 1
  329. })
  330. }, 1800);
  331. Taro.showToast({
  332. title: v.error[0].message,
  333. icon: "none",
  334. duration: 1800,
  335. });
  336. }
  337. })
  338. .catch((err) => {
  339. Taro.showToast({ title: "系统错误,请稍后再试", icon: "none" });
  340. });
  341. }
  342. validParams(params) {
  343. const { dtails } = this.state;
  344. let flag = true;
  345. let message = '';
  346. if (dtails.newChannel == 1) {
  347. // 渠道客户
  348. if (!params.channelType) {
  349. flag = false;
  350. message = '请选择渠道性质';
  351. } else if (!params.enterpriseCount) {
  352. flag = false;
  353. message = '请输入渠道所覆盖企业数';
  354. } else if (!params.channelIndicators) {
  355. flag = false;
  356. message = '请输入渠道考核指标';
  357. } else if (!params.interviewIdeas || (params.interviewIdeas && params.interviewIdeas.length < 20)) {
  358. message = '请输入面谈思路,并且在20字以上';
  359. flag = false;
  360. } else if (!params.interviewPurpose || (params.interviewPurpose && params.interviewPurpose.length < 20)) {
  361. message = '请输入面谈达成的目的,并且在20字以上';
  362. flag = false;
  363. } else {
  364. if (this.state.dtails.interviewList.length) {
  365. if (!params.interviewFeedback || (params.interviewFeedback && params.interviewFeedback.length < 20)) {
  366. message = '请输入面谈后的反馈,并且在20字以上';
  367. flag = false;
  368. } else if (!params.followUpPlan || (params.followUpPlan && params.followUpPlan.length < 20)) {
  369. message = '请输入后续跟进计划,并且在20字以上';
  370. flag = false;
  371. }
  372. }
  373. }
  374. } else {
  375. if (!params.locationProvince) {
  376. message = '请选择企业所在地省市区';
  377. flag = false;
  378. } else if (!params.industry) {
  379. message = '请选择企业所属行业';
  380. flag = false;
  381. } else if (!params.businessScope) {
  382. message = '主营产品不能为空';
  383. flag = false;
  384. } else if (params.companyCount === '' || params.companyCount === undefined || params.companyCount === null) {
  385. message = '请输入母/子公司数';
  386. flag = false;
  387. } else if (params.socialSecurityCount === '' || params.socialSecurityCount === undefined || params.socialSecurityCount === null) {
  388. message = '请输入社保人数,并且不能为0';
  389. flag = false;
  390. } else if (!Number(params.financialRevenue)) {
  391. message = '请输入营收数据,并且不能为0';
  392. flag = false;
  393. } else if (!Number(params.financialTax)) {
  394. message = '请输入税收数据,并且不能为0';
  395. flag = false;
  396. } else if (!Number(params.financialProperty)) {
  397. message = '请输入资产数据,并且不能为0';
  398. flag = false;
  399. } else if (!Number(params.financialRd)) {
  400. message = '请输入研发费用,并且不能为0';
  401. flag = false;
  402. } else if (!params.earlyCommunication || (params.earlyCommunication && params.earlyCommunication.length < 20)) {
  403. message = '请输入客户的难处,并且在20字以上';
  404. flag = false;
  405. } else if (!params.customerDemand || (params.customerDemand && params.customerDemand.length < 20)) {
  406. message = '请输入客户的需求,并且在20字以上';
  407. flag = false;
  408. } else if (!params.interviewIdeas || (params.interviewIdeas && params.interviewIdeas.length < 20)) {
  409. message = '请输入面谈思路,并且在20字以上';
  410. flag = false;
  411. } else if (!params.interviewPurpose || (params.interviewPurpose && params.interviewPurpose.length < 20)) {
  412. message = '请输入面谈达成的目的,并且在20字以上';
  413. flag = false;
  414. } else if (!params.interviewRecommend || (params.interviewRecommend && params.interviewRecommend.length < 20)) {
  415. message = '请输入经理/上级面谈建议,并且在20字以上';
  416. flag = false;
  417. } else {
  418. if (this.state.dtails.interviewList.length) {
  419. if (!params.interviewFeedback || (params.interviewFeedback && params.interviewFeedback.length < 20)) {
  420. message = '请输入面谈后的反馈,并且在20字以上';
  421. flag = false;
  422. } else if (!params.followUpPlan || (params.followUpPlan && params.followUpPlan.length < 20)) {
  423. message = '请输入后续跟进计划,并且在20字以上';
  424. flag = false;
  425. }
  426. }
  427. }
  428. }
  429. return { flag, message };
  430. }
  431. onSaveAllData(callback) {
  432. const { dtails } = this.state;
  433. let params = {
  434. id: dtails.id,
  435. uid: dtails.uid,
  436. locationProvince: dtails.locationProvince,
  437. locationProvinceName: dtails.locationProvinceName,
  438. locationCity: dtails.locationCity,
  439. locationCityName: dtails.locationCityName,
  440. locationArea: dtails.locationArea,
  441. locationAreaName: dtails.locationAreaName,
  442. type: 1, // 1、更新档案和面谈,0、只更新档案
  443. };
  444. // 是否在面谈中,表示本次面谈未结束
  445. let curruaiIdList = this.props.uaiIdList.filter(item => item.uid == dtails.uid);
  446. if (curruaiIdList.length) {
  447. // 面谈编号
  448. params.uaiId = curruaiIdList[0].uaiId;
  449. }
  450. if (dtails.newChannel == 1) {
  451. // 渠道客户
  452. params = {
  453. ...params,
  454. channelType: dtails.channelType,
  455. enterpriseCount: dtails.enterpriseCount.replace(/,/g, ''),
  456. channelIndicators: dtails.channelIndicators,
  457. interviewIdeas: dtails.interviewIdeas,
  458. interviewPurpose: dtails.interviewPurpose,
  459. interviewFeedback: dtails.interviewFeedback,
  460. followUpPlan: dtails.followUpPlan,
  461. };
  462. } else {
  463. params = {
  464. ...params,
  465. industry: dtails.industry,
  466. industryName: dtails.industryName,
  467. earlyCommunication: dtails.earlyCommunication,
  468. customerDemand: dtails.customerDemand,
  469. interviewIdeas: dtails.interviewIdeas,
  470. interviewPurpose: dtails.interviewPurpose,
  471. interviewRecommend: dtails.interviewRecommend,
  472. interviewFeedback: dtails.interviewFeedback,
  473. followUpPlan: dtails.followUpPlan,
  474. patentCount: dtails.patentCount,
  475. inventionPatentCount: dtails.inventionPatentCount,
  476. utilityModelCount: dtails.utilityModelCount,
  477. appearancePatentCount: dtails.appearancePatentCount,
  478. softwareWorksCount: dtails.softwareWorksCount,
  479. otherCount: dtails.otherCount,
  480. financialData: dtails.financialData,
  481. companyCount: dtails.companyCount.replace(/,/g, ''),
  482. socialSecurityCount: dtails.socialSecurityCount.replace(/,/g, ''),
  483. externalInvestCount: dtails.externalInvestCount.replace(/,/g, ''),
  484. externalInvestIndustry: dtails.externalInvestIndustry,
  485. externalInvestIndustryName: dtails.externalInvestIndustryName,
  486. externalInvestId: dtails.externalInvestId,
  487. externalInvestName: dtails.externalInvestName,
  488. financialRevenue: dtails.financialRevenue.replace(/,/g, ''),
  489. financialTax: dtails.financialTax.replace(/,/g, ''),
  490. financialProperty: dtails.financialProperty.replace(/,/g, ''),
  491. financialRd: dtails.financialRd.replace(/,/g, ''),
  492. standard: dtails.standard,
  493. businessScope: dtails.businessScope,
  494. };
  495. }
  496. for (let key in params) {
  497. if (params[key] === undefined || params[key] === 'undefined' || params[key] === null || params[key] === 'null') {
  498. delete params[key];
  499. }
  500. }
  501. const { flag, message } = this.validParams(params);
  502. if (!flag) {
  503. Taro.showToast({
  504. title: message,
  505. icon: "none",
  506. });
  507. return;
  508. }
  509. updateUser(params).then((v) => {
  510. if (v.error.length === 0) {
  511. Taro.showToast({
  512. title: "修改成功",
  513. });
  514. callback && callback(v.data);
  515. } else {
  516. Taro.showToast({
  517. title: v.error[0].message,
  518. icon: "none",
  519. });
  520. }
  521. })
  522. }
  523. // 计算专利总数
  524. countZlNum({ inventionPatentCount, utilityModelCount, appearancePatentCount, softwareWorksCount, otherCount }) {
  525. let count = 0;
  526. if (inventionPatentCount && !isNaN(inventionPatentCount)) {
  527. count += Number(inventionPatentCount);
  528. }
  529. if (utilityModelCount && !isNaN(utilityModelCount)) {
  530. count += Number(utilityModelCount);
  531. }
  532. if (appearancePatentCount && !isNaN(appearancePatentCount)) {
  533. count += Number(appearancePatentCount);
  534. }
  535. if (softwareWorksCount && !isNaN(softwareWorksCount)) {
  536. count += Number(softwareWorksCount);
  537. }
  538. if (otherCount && !isNaN(otherCount)) {
  539. count += Number(otherCount);
  540. }
  541. return count;
  542. }
  543. // 修改客户档案
  544. update() {
  545. // const { upType, info } = this.state
  546. // console.log(info)
  547. // let tipList = [
  548. // { key: "inventionPatentCount", value: "请填写发明专利数" },
  549. // { key: "utilityModelCount", value: "请填写实用新型数" },
  550. // { key: "appearancePatentCount", value: "请填写外观专利数" },
  551. // { key: "softwareWorksCount", value: "请填写软著数" },
  552. // { key: "otherCount", value: "请填写其他数量" },
  553. // { key: "financialData", value: "请填写财务数据" },
  554. // { key: "earlyCommunication", value: "请填写前期沟通" },
  555. // { key: "interviewIdeas", value: "请填写面谈思路及目的" },
  556. // { key: "interviewDistribution", value: "请填写主要面谈人及分工" },
  557. // { key: "enterpriseCount", value: "请填写覆盖企业数" },
  558. // { key: "channelIndicators", value: "请填写渠道考核指标" },
  559. // ]
  560. // if (!info.id) {
  561. // delete info.id
  562. // }
  563. // for (let i in info) {
  564. // if (!info[i] && info[i] !== 0) {
  565. // for (var j = 0; j < tipList.length; j++) {
  566. // if (tipList[j].key == i) {
  567. // Taro.showToast({
  568. // title: tipList[j].value,
  569. // icon: "none",
  570. // });
  571. // }
  572. // }
  573. // return
  574. // } else if (info[i] == 0) {
  575. // if (i == "channelType") {
  576. // Taro.showToast({
  577. // title: "请选择渠道类型",
  578. // icon: "none",
  579. // });
  580. // return
  581. // }
  582. // }
  583. // if ((i == "financialData" || i == "earlyCommunication" || i == "interviewIdeas" || i == "interviewDistribution")
  584. // && info[i].length < 20) {
  585. // Taro.showToast({
  586. // title: "至少20字以上",
  587. // icon: "none",
  588. // });
  589. // return
  590. // }
  591. // }
  592. // updateUserDate(upType, info).then((v) => {
  593. // if (v.error.length === 0) {
  594. // Taro.showToast({
  595. // title: "修改成功",
  596. // });
  597. // this.setState({
  598. // isOpened: false
  599. // })
  600. // this.queryByUidAll()
  601. // } else {
  602. // Taro.showToast({
  603. // title: v.error[0].message,
  604. // icon: "none",
  605. // });
  606. // }
  607. // }).catch(() => {
  608. // })
  609. if (this.state.upType == 5) {
  610. this.postAddProject();
  611. } else {
  612. if (this.state.upType == 1) {
  613. // 计算专利
  614. let patentCount = this.countZlNum(this.state.info);
  615. this.setState({ isOpened: false, dtails: { ...this.state.dtails, ...this.state.info, patentCount } })
  616. } else {
  617. this.setState({ isOpened: false, dtails: { ...this.state.dtails, ...this.state.info } })
  618. }
  619. }
  620. }
  621. postAddProject() {
  622. const { checkProject, dtails, info, projectList } = this.state;
  623. const params = { uid: dtails.uid };
  624. if (!checkProject.length) {
  625. Taro.showToast({
  626. title: "请选择要添加的项目",
  627. icon: "none",
  628. });
  629. return;
  630. } else {
  631. let isAdded = projectList.some(item => item.pid == checkProject[0].id)
  632. if (isAdded) {
  633. Taro.showToast({
  634. title: checkProject[0].bname + '已存在,请勿重复添加!',
  635. icon: "none",
  636. });
  637. return false;
  638. }
  639. params.pid = checkProject[0].id;
  640. if (checkProject[0].cSort == 9) {
  641. if (!info.examineStatus) {
  642. Taro.showToast({
  643. title: "请选择审核状态",
  644. icon: "none",
  645. });
  646. return;
  647. } else if (info.examineStatus == 2 && !info.examineStatusOther) {
  648. Taro.showToast({
  649. title: "请选择复审年份",
  650. icon: "none",
  651. });
  652. return;
  653. } else if (info.examineStatus == 2 && info.examineStatusOther.split(',').length > 1) {
  654. Taro.showToast({
  655. title: "复审年份只能选择一个",
  656. icon: "none",
  657. });
  658. return;
  659. } else {
  660. params.examineStatus = info.examineStatus;
  661. params.examineStatusOther = info.examineStatus == 2 ? info.examineStatusOther : '';
  662. }
  663. } else if (checkProject[0].cSort == 6) {
  664. if (!info.buyStatus) {
  665. Taro.showToast({
  666. title: "请选择复购状态",
  667. icon: "none",
  668. });
  669. return;
  670. } else if (info.buyStatus == 2 && !info.buyStatusOther) {
  671. Taro.showToast({
  672. title: "请选择复购/复审年份",
  673. icon: "none",
  674. });
  675. return;
  676. } else {
  677. params.buyStatus = info.buyStatus;
  678. params.buyStatusOther = info.buyStatus == 2 ? info.buyStatusOther : '';
  679. }
  680. }
  681. }
  682. addProject(params).then(res => {
  683. if (res.error.length == 0) {
  684. Taro.showToast({
  685. title: "项目新增成功!",
  686. });
  687. this.setState({ isOpened: false, checkProject: [] })
  688. this.getProjectList();
  689. } else {
  690. Taro.showToast({
  691. title: res.error[0].message,
  692. icon: "none"
  693. });
  694. }
  695. })
  696. }
  697. /**
  698. * 获取项目列表
  699. */
  700. getProjectList() {
  701. let uid = this.$instance.router.params.id;
  702. const params = { uid, pageNo: 1, pageSize: 9999 }
  703. queryProjectList(params).then(res => {
  704. let urlPrdid = this.$instance.router.params.prdid;
  705. if (!res.error.length) {
  706. let projectList = res.data.list.filter(item => item.status === 0);
  707. this.setState({
  708. projectList,
  709. projectingList: projectList.filter(item => item.prdid == urlPrdid),
  710. projectedList: projectList.filter(item => item.prdid != urlPrdid)
  711. });
  712. }
  713. })
  714. }
  715. handleDelProject(data) {
  716. delProject(data.id, data).then(res => {
  717. if (!res.error.length) {
  718. Taro.showToast({
  719. title: "删除成功!",
  720. });
  721. this.getProjectList();
  722. } else {
  723. Taro.showToast({
  724. title: v.error[0].message,
  725. icon: "none"
  726. });
  727. }
  728. })
  729. }
  730. // 新建联系人
  731. add() {
  732. let data = this.state.obj
  733. for (let i in data) {
  734. if (!data[i] && data[i] !== 0) {
  735. Taro.showToast({
  736. title: "请完善信息",
  737. icon: "none",
  738. });
  739. return
  740. } else if ('name,position,department'.indexOf(i) > -1) {
  741. if (!data[i].match(/^[\D].*[\u4e00-\u9fff]+$/)) {
  742. let keyObjName = {
  743. name: "姓名",
  744. position: "职位",
  745. department: "部门"
  746. };
  747. Taro.showToast({
  748. title: `请输入正确的${keyObjName[i]},不能以数字开头,且至少包含一个汉字`,
  749. icon: "none",
  750. });
  751. return
  752. }
  753. } else if (i == "mobile") {
  754. if (!(/^1[3-9]\d{9}$/.test(data[i]))) {
  755. Taro.showToast({
  756. title: "请输入正确地手机号",
  757. icon: "none",
  758. });
  759. return
  760. }
  761. }
  762. }
  763. data.major = 1
  764. addOneContact(data).then((v) => {
  765. if (v.error.length === 0) {
  766. Taro.showToast({
  767. title: "添加成功",
  768. });
  769. this.setState({
  770. isAdd: false
  771. })
  772. this.queryByUidAll()
  773. } else {
  774. Taro.showToast({
  775. title: v.error[0].message,
  776. icon: "none",
  777. });
  778. }
  779. }).catch(() => {
  780. })
  781. }
  782. // 项目列表
  783. getBusinessProjectByName(val) {
  784. getBusinessProjectByName({
  785. businessName: val || "",
  786. })
  787. .then((v) => {
  788. if (v.error.length === 0) {
  789. let theArr = [];
  790. if (v.data.length > 0) {
  791. for (let i = 0; i < v.data.length; i++) {
  792. let thisdata = v.data[i];
  793. theArr.push({
  794. value: thisdata.id,
  795. label: thisdata.bname,
  796. });
  797. };
  798. }
  799. this.setState({
  800. allProjectList: v.data,
  801. options: theArr
  802. })
  803. } else {
  804. Taro.showToast({ title: v.error[0].message, icon: "none" });
  805. }
  806. })
  807. .catch((err) => {
  808. Taro.showToast({ title: "系统错误,请稍后再试", icon: "none" });
  809. });
  810. }
  811. onSearchChange(value) {
  812. this.setState({
  813. value,
  814. });
  815. }
  816. getUserList() {
  817. findCustomerContacts({
  818. uid: this.$instance.router.params.id,
  819. })
  820. .then((v) => {
  821. if (v.error.length === 0) {
  822. this.setState({
  823. userList: v.data || []
  824. })
  825. } else {
  826. Taro.showToast({ title: v.error[0].message, icon: "none" });
  827. }
  828. })
  829. .catch((err) => {
  830. Taro.showToast({ title: "系统错误,请稍后再试", icon: "none" });
  831. });
  832. }
  833. updateMainContact(id) {
  834. updateMainContact({
  835. uid: this.$instance.router.params.id,
  836. ocbId: id,
  837. }).then((v) => {
  838. if (v.error.length === 0) {
  839. Taro.showToast({
  840. title: "设置成功",
  841. });
  842. this.getUserList()
  843. } else {
  844. Taro.showToast({
  845. title: v.error[0].message,
  846. icon: "none",
  847. });
  848. }
  849. }).catch(() => {
  850. })
  851. }
  852. limitUser() {
  853. limitUser({
  854. uid: this.$instance.router.params.id,
  855. // hours: 1,
  856. }).then((v) => {
  857. if (v.error.length === 0) {
  858. } else {
  859. Taro.showToast({
  860. title: v.error[0].message,
  861. icon: "none",
  862. });
  863. }
  864. }).catch(() => {
  865. })
  866. }
  867. addItemDialog(type) {
  868. let title;
  869. switch (type) {
  870. case 'externalInvestName':
  871. // 对外投资控股的企业名称
  872. title = '添加对外投资控股的企业名称';
  873. break;
  874. default:
  875. break;
  876. }
  877. this.setState({ addItemShow: true, addItemType: type, addItemTitle: title });
  878. }
  879. handleCloseAddItemDialog() {
  880. this.setState({ addItemShow: false, addItemType: '', addItemInputVal: '' });
  881. }
  882. handleAddItemSave() {
  883. switch (this.state.addItemType) {
  884. case 'externalInvestName':
  885. const { dtails } = this.state;
  886. let externalInvestName = this.state.dtails.externalInvestName || '';
  887. let externalInvestNameArr = externalInvestName.split(',').filter(item => !!item);
  888. externalInvestNameArr.push(this.state.addItemInputVal);
  889. dtails.externalInvestName = externalInvestNameArr.join(',');
  890. this.setState({ dtails }, () => {
  891. this.handleCloseAddItemDialog();
  892. });
  893. break;
  894. default:
  895. break;
  896. }
  897. }
  898. openInteractHis(type) {
  899. let interactTitle;
  900. let interactList = this.state.dtails.interviewList;
  901. switch (type) {
  902. case 'earlyCommunication':
  903. interactTitle = '客户的难处历史记录';
  904. break;
  905. case 'customerDemand':
  906. interactTitle = '客户的需求历史记录';
  907. break;
  908. case 'interviewIdeas':
  909. interactTitle = '面谈思路历史记录';
  910. break;
  911. case 'interviewPurpose':
  912. interactTitle = '面谈达成的目的历史记录';
  913. break;
  914. case 'interviewRecommend':
  915. interactTitle = '经理/上级面谈建议历史记录';
  916. break;
  917. case 'interviewFeedback':
  918. interactTitle = '面谈后反馈历史记录';
  919. interactList = interactList.slice(1, interactList.length);
  920. break;
  921. case 'followUpPlan':
  922. interactTitle = '后续跟进计划历史记录';
  923. interactList = interactList.slice(1, interactList.length);
  924. break;
  925. default:
  926. break;
  927. }
  928. this.setState({
  929. interactShow: true,
  930. interactShowType: type,
  931. interactTitle,
  932. interactList
  933. });
  934. }
  935. renderProjectItemName(data) {
  936. let name = data.name;
  937. if (!!data.buyStatus) {
  938. // 会员项目
  939. if (data.buyStatus === 1) {
  940. name = name + `(新购)`;
  941. } else if (data.buyStatus === 2) {
  942. name = name + `(复购${data.buyStatusOther})`;
  943. }
  944. } else if (!!data.examineStatus) {
  945. // 高新项目
  946. if (data.examineStatus === 1) {
  947. name = name + `(初次审核)`;
  948. } else if (data.examineStatus === 2) {
  949. name = name + `(${data.examineStatusOther}年复审)`;
  950. }
  951. }
  952. return name;
  953. }
  954. render() {
  955. const { dtails, upType, info, obj, userList } = this.state;
  956. const publicType = this.$instance.router.params.publicType;
  957. return (
  958. <View className="customerProfile">
  959. <MessageNoticebar />
  960. <View
  961. className="titleContent"
  962. >
  963. {Object.keys(dtails).length === 0 ? (
  964. <Skeleton
  965. title
  966. row={3}
  967. animateName="elastic"
  968. avatarShape="square"
  969. loading
  970. />
  971. ) : (
  972. <View className="content">
  973. <View className="name">
  974. <Text style={{ width: "80%" }}>
  975. <Text className="bod">{dtails.nickname}&nbsp;&nbsp;</Text>
  976. <Text style={{ fontSize: "12px", color: ["red", "green"][dtails.signBills] }}>{["未签单", "已签单"][dtails.signBills]}</Text>
  977. </Text>
  978. {publicType === '0' && <Button className="share" plain type='primary' open-type="share">分享</Button>}
  979. {/* <View className="share">分享</View> */}
  980. </View>
  981. { publicType === '0' && (
  982. <>
  983. <View className="button">
  984. <View className="but"
  985. onClick={e => {
  986. e.stopPropagation()
  987. this.setState({
  988. isSuperior: true
  989. })
  990. }}
  991. >上级指导</View>
  992. {
  993. this.state.isSuperior &&
  994. <Superior
  995. id={dtails.uid}
  996. userNames={dtails.nickname}
  997. isOpinion={this.state.isSuperior}
  998. isFill={dtails.myUser == 0}
  999. onClose={() => {
  1000. this.setState({
  1001. isSuperior: false
  1002. })
  1003. }}
  1004. />
  1005. }
  1006. <View className="but"
  1007. onClick={e => {
  1008. e.stopPropagation()
  1009. Taro.navigateTo({
  1010. url: "/pages/situation/index?id=" + this.$instance.router.params.id + "&notRequired=" + this.$instance.router.params.notRequired,
  1011. });
  1012. }}
  1013. >公出记录</View>
  1014. </View>
  1015. <View className="row">
  1016. <View className="code">{dtails.orgCode}</View>
  1017. <View className="time">{dtails.createTime}</View>
  1018. </View>
  1019. </>
  1020. )}
  1021. {
  1022. dtails.newChannel == 1
  1023. ?
  1024. <View className="valueContent">
  1025. <View className="title" style={{ margin: "14rpx 0 18rpx;" }}>渠道面谈思路表</View>
  1026. {publicType === '0' && (
  1027. <>
  1028. <View className="item">
  1029. <View className="item-title">企业所在地省市区:</View>
  1030. <View className="item-value">
  1031. <View>
  1032. {dtails.locationProvince ? `${dtails.locationProvinceName}-${dtails.locationCityName}-${dtails.locationAreaName}` : ''}
  1033. </View>
  1034. </View>
  1035. </View>
  1036. <View className="item">
  1037. <View className="item-title">渠道类别:</View>
  1038. <View className="item-value">
  1039. {!getChannel(dtails.channelType) ? "" : getChannel(dtails.channelType)}
  1040. </View>
  1041. </View>
  1042. <View className="item">
  1043. <View className="item-title">渠道企业数:</View>
  1044. <View className="item-value">
  1045. <AtInput
  1046. min={0}
  1047. value={dtails.enterpriseCount}
  1048. name='companyCount'
  1049. type='number'
  1050. placeholder='请输入数量'
  1051. size='mini'
  1052. onChange={value => {
  1053. dtails.enterpriseCount = this.addCommas(value);
  1054. this.setState({ dtails })
  1055. }}
  1056. cursor={-1}
  1057. disabled
  1058. />
  1059. </View>
  1060. </View>
  1061. <View className="item">
  1062. <View className="item-title">渠道考核指标:</View>
  1063. <View className="item-value">
  1064. <AtTextarea
  1065. value={dtails.channelIndicators || ''}
  1066. onChange={e => {
  1067. this.setState({
  1068. dtails: Object.assign(dtails, {
  1069. channelIndicators: e,
  1070. }),
  1071. })
  1072. }}
  1073. maxLength={200}
  1074. placeholder='请填写渠道考核指标~'
  1075. disabled
  1076. />
  1077. </View>
  1078. </View>
  1079. <View style={{ fontWeight: 600, color: "red" }}>
  1080. <Text>首次面谈时间:</Text>
  1081. <Text>{dtails.firstInterviewDate || '暂无面谈记录'}</Text>
  1082. </View>
  1083. <View className="item">
  1084. <View className="item-title">
  1085. 主要面谈联系信息:
  1086. </View>
  1087. <View className="item-value">
  1088. {
  1089. !!dtails.contactList && dtails.contactList.map((v, k) =>
  1090. <View className="val" key={k}>{v.name}&nbsp;&nbsp;{v.position}&nbsp;&nbsp;{v.department}&nbsp;&nbsp;{v.mobile}</View>
  1091. )
  1092. }
  1093. </View>
  1094. </View>
  1095. <View className="item">
  1096. <View className="item-title">
  1097. 本次面谈项目:
  1098. </View>
  1099. <View className="item-value">
  1100. {
  1101. this.state.projectingList.map((item) => {
  1102. return <View>{this.renderProjectItemName(item)}</View>
  1103. })
  1104. }
  1105. </View>
  1106. </View>
  1107. <View className="item">
  1108. <View className="item-value">
  1109. <View style={{ color: "red", marginTop: '24rpx', fontWeight: 600 }}>
  1110. <Text>已面谈项目:</Text>
  1111. {
  1112. this.state.projectedList.map((item, idx) => {
  1113. if (idx == this.state.projectedList.length - 1) {
  1114. return <Text>{this.renderProjectItemName(item)}</Text>
  1115. }
  1116. return <Text>{this.renderProjectItemName(item)}、</Text>
  1117. })
  1118. }
  1119. </View>
  1120. </View>
  1121. </View>
  1122. </>
  1123. )}
  1124. <View className="item">
  1125. <View className="item-title">
  1126. <View>
  1127. 面谈思路:
  1128. <Text className="titleTips">(20字以上)</Text>
  1129. </View>
  1130. <View>
  1131. {dtails.interviewList.length ? (
  1132. <AtIcon value='clock' size='20' color='#1E90FF' onClick={() => this.openInteractHis('interviewIdeas')}></AtIcon>
  1133. ) : null}
  1134. </View>
  1135. </View>
  1136. <View className="item-value">
  1137. <AtTextarea
  1138. value={dtails.interviewIdeas || ''}
  1139. maxLength={200}
  1140. placeholder='~'
  1141. height={70}
  1142. onChange={value => {
  1143. dtails.interviewIdeas = value;
  1144. this.setState({ dtails });
  1145. }}
  1146. disabled
  1147. />
  1148. </View>
  1149. </View>
  1150. <View className="item">
  1151. <View className="item-title">
  1152. <View>
  1153. 面谈达成的目的:
  1154. <Text className="titleTips">(20字以上)</Text>
  1155. </View>
  1156. <View>
  1157. {dtails.interviewList.length ? (
  1158. <AtIcon value='clock' size='20' color='#1E90FF' onClick={() => this.openInteractHis('interviewPurpose')}></AtIcon>
  1159. ) : null}
  1160. </View>
  1161. </View>
  1162. <View className="item-value">
  1163. <AtTextarea
  1164. value={dtails.interviewPurpose || ''}
  1165. maxLength={200}
  1166. placeholder='~'
  1167. height={70}
  1168. onChange={value => {
  1169. dtails.interviewPurpose = value;
  1170. this.setState({ dtails });
  1171. }}
  1172. disabled
  1173. />
  1174. </View>
  1175. </View>
  1176. {dtails.interviewList && dtails.interviewList.length ? (
  1177. <>
  1178. <View className="item">
  1179. <View className="item-title">
  1180. <View>
  1181. 面谈后的反馈:
  1182. <Text className="titleTips">(20字以上)</Text>
  1183. </View>
  1184. <View>
  1185. {dtails.interviewList.length ? (
  1186. <AtIcon value='clock' size='20' color='#1E90FF' onClick={() => this.openInteractHis('interviewFeedback')}></AtIcon>
  1187. ) : null}
  1188. </View>
  1189. </View>
  1190. <View className="item-value">
  1191. <AtTextarea
  1192. value={dtails.interviewFeedback || ''}
  1193. maxLength={200}
  1194. placeholder='~'
  1195. height={70}
  1196. onChange={value => {
  1197. dtails.interviewFeedback = value;
  1198. this.setState({ dtails });
  1199. }}
  1200. disabled
  1201. />
  1202. </View>
  1203. </View>
  1204. <View className="item">
  1205. <View className="item-title">
  1206. <View>
  1207. 后续跟进计划:
  1208. <Text className="titleTips">(20字以上)</Text>
  1209. </View>
  1210. <View>
  1211. {dtails.interviewList.length ? (
  1212. <AtIcon value='clock' size='20' color='#1E90FF' onClick={() => this.openInteractHis('followUpPlan')}></AtIcon>
  1213. ) : null}
  1214. </View>
  1215. </View>
  1216. <View className="item-value">
  1217. <AtTextarea
  1218. value={dtails.followUpPlan || ''}
  1219. maxLength={200}
  1220. placeholder='~'
  1221. height={70}
  1222. onChange={value => {
  1223. dtails.followUpPlan = value;
  1224. this.setState({ dtails });
  1225. }}
  1226. disabled
  1227. />
  1228. </View>
  1229. </View>
  1230. </>
  1231. ) : null}
  1232. </View>
  1233. :
  1234. <View className="valueContent">
  1235. <View className="title" style={{ margin: "14rpx 0 18rpx;" }}>企业面谈思路表</View>
  1236. {publicType === '0' && (
  1237. <>
  1238. <View className="item">
  1239. <view className="item-title">企业所在地省市区:</view>
  1240. <view className="item-value">
  1241. <View>
  1242. {dtails.locationProvince ? `${dtails.locationProvinceName}-${dtails.locationCityName}-${dtails.locationAreaName}` : ''}
  1243. </View>
  1244. </view>
  1245. </View>
  1246. <View className="item">
  1247. <view className="item-title">企业所属行业:</view>
  1248. <view className="item-value">
  1249. <View>
  1250. {this.state.dtails.industryName || ''}
  1251. </View>
  1252. </view>
  1253. </View>
  1254. <View className="item">
  1255. <view className="item-title">主营产品:</view>
  1256. <view className="item-value">
  1257. <AtInput
  1258. value={dtails.businessScope}
  1259. name='businessScope'
  1260. placeholder='请用,符号隔开关键字'
  1261. size='mini'
  1262. onChange={value => {
  1263. dtails.businessScope = value;
  1264. this.setState({ dtails })
  1265. }}
  1266. cursor={-1}
  1267. disabled
  1268. />
  1269. </view>
  1270. </View>
  1271. <View className="item flex">
  1272. <view className="item-title">母/子公司数:</view>
  1273. <view className="item-value">
  1274. <View style={{ width: '260rpx' }}>
  1275. <AtInput
  1276. min={0}
  1277. value={dtails.companyCount}
  1278. name='companyCount'
  1279. type='number'
  1280. placeholder='请输入数量'
  1281. size='mini'
  1282. onChange={value => {
  1283. dtails.companyCount = this.addCommas(value);
  1284. this.setState({ dtails })
  1285. }}
  1286. cursor={-1}
  1287. disabled
  1288. />
  1289. </View>
  1290. </view>
  1291. </View>
  1292. <View className="item flex">
  1293. <view className="item-title">社保人数:</view>
  1294. <view className="item-value">
  1295. <View style={{ width: '260rpx' }}>
  1296. <AtInput
  1297. min={0}
  1298. value={dtails.socialSecurityCount}
  1299. name='socialSecurityCount'
  1300. type='number'
  1301. placeholder='请输入数量'
  1302. size='mini'
  1303. onChange={value => {
  1304. dtails.socialSecurityCount = this.addCommas(value);
  1305. this.setState({ dtails })
  1306. }}
  1307. cursor={-1}
  1308. disabled
  1309. />
  1310. </View>
  1311. </view>
  1312. </View>
  1313. <View className="item flex">
  1314. <view className="item-title">对外投资控股的企业数:</view>
  1315. <view className="item-value">
  1316. <View style={{ width: '260rpx' }}>
  1317. <AtInput
  1318. min={0}
  1319. value={dtails.externalInvestCount}
  1320. name='externalInvestCount'
  1321. type='number'
  1322. placeholder='请输入数量'
  1323. size='mini'
  1324. onChange={value => {
  1325. dtails.externalInvestCount = this.addCommas(value);
  1326. this.setState({ dtails })
  1327. }}
  1328. cursor={-1}
  1329. disabled
  1330. />
  1331. </View>
  1332. </view>
  1333. </View>
  1334. <View className="item">
  1335. <view className="item-title">对外投资控股的行业:</view>
  1336. <view className="item-value">
  1337. <View>
  1338. {dtails.externalInvestIndustryName || ''}
  1339. </View>
  1340. </view>
  1341. </View>
  1342. <View className="item">
  1343. <view className="item-title">对外投资控股的企业名称:</view>
  1344. <view className="item-value">
  1345. <View>
  1346. {dtails.externalInvestName || ''}
  1347. </View>
  1348. </view>
  1349. </View>
  1350. <View style={{ fontWeight: 600, color: "red" }}>
  1351. <Text>首次面谈时间:</Text>
  1352. <Text>{dtails.firstInterviewDate || '暂无面谈记录'}</Text>
  1353. </View>
  1354. <View className="item">
  1355. <view className="item-title">
  1356. 主要面谈联系信息:
  1357. </view>
  1358. <view className="item-value">
  1359. {
  1360. !!dtails.contactList && dtails.contactList.map((v, k) =>
  1361. <View className="val" key={k}>
  1362. {v.name}&nbsp;&nbsp;{v.position}&nbsp;&nbsp;{v.department}&nbsp;&nbsp;{v.mobile}
  1363. {this.state.isMask && <View className="mask"></View>}
  1364. </View>
  1365. )
  1366. }
  1367. </view>
  1368. </View>
  1369. <View className="item">
  1370. <View className="item-title">
  1371. 本次面谈项目:
  1372. </View>
  1373. <View className="item-value">
  1374. {
  1375. this.state.projectingList.map((item) => {
  1376. return <View>{this.renderProjectItemName(item)}</View>
  1377. })
  1378. }
  1379. </View>
  1380. </View>
  1381. <View className="item">
  1382. <View className="item-value">
  1383. <View style={{ color: "red", marginTop: '24rpx', fontWeight: 600 }}>
  1384. <Text>已面谈项目:</Text>
  1385. {
  1386. this.state.projectedList.map((item, idx) => {
  1387. if (idx == this.state.projectedList.length - 1) {
  1388. return <Text>{this.renderProjectItemName(item)}</Text>
  1389. }
  1390. return <Text>{this.renderProjectItemName(item)}、</Text>
  1391. })
  1392. }
  1393. </View>
  1394. </View>
  1395. </View>
  1396. </>
  1397. )}
  1398. <View style={{ marginTop: '60rpx' }}>
  1399. {publicType === '0' && (
  1400. <>
  1401. <View className="title">面谈已知企业情况</View>
  1402. <View className="tit" style={{ margin: '32rpx 0 20rpx;' }}>
  1403. <Text>
  1404. 1.知识产权情况
  1405. <Text className="txt">(专利信息、标准、专利、软著)</Text>
  1406. </Text>
  1407. </View>
  1408. <View className="val">
  1409. 专利&nbsp;<Text className="num">{dtails.patentCount || 0}</Text>&nbsp;&nbsp;&nbsp;
  1410. 其中发明专利&nbsp;<Text className="num">{dtails.inventionPatentCount}</Text>&nbsp;&nbsp;&nbsp;
  1411. 实用新型&nbsp;<Text className="num">{dtails.utilityModelCount}</Text>&nbsp;&nbsp;&nbsp;
  1412. 外观设计&nbsp;<Text className="num">{dtails.appearancePatentCount}</Text>&nbsp;&nbsp;&nbsp;
  1413. 软著&nbsp;<Text className="num">{dtails.softwareWorksCount}</Text>&nbsp;&nbsp;&nbsp;
  1414. 标准&nbsp;<Text className="num">{String(dtails.standard) === '1' ? '有' : String(dtails.standard) === '0' ? '无' : ''}</Text>&nbsp;&nbsp;&nbsp;
  1415. 其他类型&nbsp;<Text className="num">{dtails.otherCount}</Text>&nbsp;&nbsp;&nbsp;
  1416. </View>
  1417. <View className="tit" style={{ margin: '32rpx 0 20rpx;' }}>2.财务数据</View>
  1418. <View className="item flex">
  1419. <View className="item-title">营收(万元):</View>
  1420. <View className="item-value">
  1421. <View style={{ width: '260rpx' }}>
  1422. <AtInput
  1423. min={0}
  1424. value={dtails.financialRevenue}
  1425. name='financialRevenue'
  1426. type='number'
  1427. placeholder='请输入数量'
  1428. size='mini'
  1429. onChange={value => {
  1430. dtails.financialRevenue = this.addCommas(value);
  1431. this.setState({ dtails })
  1432. }}
  1433. cursor={-1}
  1434. disabled
  1435. />
  1436. </View>
  1437. </View>
  1438. </View>
  1439. <View className="item flex">
  1440. <View className="item-title">税收(万元):</View>
  1441. <View className="item-value">
  1442. <View style={{ width: '260rpx' }}>
  1443. <AtInput
  1444. min={0}
  1445. value={dtails.financialTax}
  1446. name='financialTax'
  1447. type='number'
  1448. placeholder='请输入数量'
  1449. size='mini'
  1450. onChange={value => {
  1451. dtails.financialTax = this.addCommas(value);
  1452. this.setState({ dtails })
  1453. }}
  1454. cursor={-1}
  1455. disabled
  1456. />
  1457. </View>
  1458. </View>
  1459. </View>
  1460. <View className="item flex">
  1461. <View className="item-title">资产(万元):</View>
  1462. <View className="item-value">
  1463. <View style={{ width: '260rpx' }}>
  1464. <AtInput
  1465. min={0}
  1466. value={dtails.financialProperty}
  1467. name='financialProperty'
  1468. type='number'
  1469. placeholder='请输入数量'
  1470. size='mini'
  1471. onChange={value => {
  1472. dtails.financialProperty = this.addCommas(value);
  1473. this.setState({ dtails })
  1474. }}
  1475. cursor={-1}
  1476. disabled
  1477. />
  1478. </View>
  1479. </View>
  1480. </View>
  1481. <View className="item flex">
  1482. <View className="item-title">研发费用(万元):</View>
  1483. <View className="item-value">
  1484. <View style={{ width: '260rpx' }}>
  1485. <AtInput
  1486. min={0}
  1487. value={dtails.financialRd}
  1488. name='financialRd'
  1489. type='number'
  1490. placeholder='请输入数量'
  1491. size='mini'
  1492. onChange={value => {
  1493. dtails.financialRd = this.addCommas(value);
  1494. this.setState({ dtails })
  1495. }}
  1496. cursor={-1}
  1497. disabled
  1498. />
  1499. </View>
  1500. </View>
  1501. </View>
  1502. <View className="tit" style={{ margin: '32rpx 0 20rpx;' }}>3.前期沟通情况</View>
  1503. </>
  1504. )}
  1505. <View className="item">
  1506. <View className="item-title">
  1507. <View>
  1508. 客户的难处:
  1509. <Text className="titleTips">(20字以上)</Text>
  1510. </View>
  1511. <View>
  1512. {dtails.interviewList.length ? (
  1513. <AtIcon value='clock' size='20' color='#1E90FF' onClick={() => this.openInteractHis('earlyCommunication')}></AtIcon>
  1514. ) : null}
  1515. </View>
  1516. </View>
  1517. <View className="item-value">
  1518. <AtTextarea
  1519. value={dtails.earlyCommunication || ''}
  1520. maxLength={200}
  1521. placeholder='~'
  1522. height={70}
  1523. onChange={value => {
  1524. dtails.earlyCommunication = value;
  1525. this.setState({ dtails });
  1526. }}
  1527. disabled
  1528. />
  1529. </View>
  1530. </View>
  1531. <View className="item">
  1532. <View className="item-title">
  1533. <View>
  1534. 客户的需求:
  1535. <Text className="titleTips">(20字以上)</Text>
  1536. </View>
  1537. <View>
  1538. {dtails.interviewList.length ? (
  1539. <AtIcon value='clock' size='20' color='#1E90FF' onClick={() => this.openInteractHis('customerDemand')}></AtIcon>
  1540. ) : null}
  1541. </View>
  1542. </View>
  1543. <View className="item-value">
  1544. <AtTextarea
  1545. value={dtails.customerDemand || ''}
  1546. maxLength={200}
  1547. placeholder='~'
  1548. height={70}
  1549. onChange={value => {
  1550. dtails.customerDemand = value;
  1551. this.setState({ dtails });
  1552. }}
  1553. disabled
  1554. />
  1555. </View>
  1556. </View>
  1557. <View className="item">
  1558. <View className="item-title">
  1559. <View>
  1560. 面谈思路:
  1561. <Text className="titleTips">(20字以上)</Text>
  1562. </View>
  1563. <View>
  1564. {dtails.interviewList.length ? (
  1565. <AtIcon value='clock' size='20' color='#1E90FF' onClick={() => this.openInteractHis('interviewIdeas')}></AtIcon>
  1566. ) : null}
  1567. </View>
  1568. </View>
  1569. <View className="item-value">
  1570. <AtTextarea
  1571. value={dtails.interviewIdeas || ''}
  1572. maxLength={200}
  1573. placeholder='~'
  1574. height={70}
  1575. onChange={value => {
  1576. dtails.interviewIdeas = value;
  1577. this.setState({ dtails });
  1578. }}
  1579. disabled
  1580. />
  1581. </View>
  1582. </View>
  1583. <View className="item">
  1584. <View className="item-title">
  1585. <View>
  1586. 面谈达成的目的:
  1587. <Text className="titleTips">(20字以上)</Text>
  1588. </View>
  1589. <View>
  1590. {dtails.interviewList.length ? (
  1591. <AtIcon value='clock' size='20' color='#1E90FF' onClick={() => this.openInteractHis('interviewPurpose')}></AtIcon>
  1592. ) : null}
  1593. </View>
  1594. </View>
  1595. <View className="item-value">
  1596. <AtTextarea
  1597. value={dtails.interviewPurpose || ''}
  1598. maxLength={200}
  1599. placeholder='~'
  1600. height={70}
  1601. onChange={value => {
  1602. dtails.interviewPurpose = value;
  1603. this.setState({ dtails });
  1604. }}
  1605. disabled
  1606. />
  1607. </View>
  1608. </View>
  1609. <View className="item">
  1610. <View className="item-title">
  1611. <View>
  1612. 经理/上级面谈建议:
  1613. <Text className="titleTips">(由经理/上级口述,本人整理,20字以上)</Text>
  1614. </View>
  1615. <View>
  1616. {dtails.interviewList.length ? (
  1617. <AtIcon value='clock' size='20' color='#1E90FF' onClick={() => this.openInteractHis('interviewRecommend')}></AtIcon>
  1618. ) : null}
  1619. </View>
  1620. </View>
  1621. <View className="item-value">
  1622. <AtTextarea
  1623. value={dtails.interviewRecommend || ''}
  1624. maxLength={500}
  1625. placeholder='~'
  1626. height={70}
  1627. onChange={value => {
  1628. dtails.interviewRecommend = value;
  1629. this.setState({ dtails });
  1630. }}
  1631. disabled
  1632. />
  1633. </View>
  1634. </View>
  1635. {dtails.interviewList && dtails.interviewList.length ? (
  1636. <>
  1637. <View className="item">
  1638. <View className="item-title">
  1639. <View>
  1640. 面谈后的反馈:
  1641. <Text className="titleTips">(20字以上)</Text>
  1642. </View>
  1643. <View>
  1644. {dtails.interviewList.length ? (
  1645. <AtIcon value='clock' size='20' color='#1E90FF' onClick={() => this.openInteractHis('interviewFeedback')}></AtIcon>
  1646. ) : null}
  1647. </View>
  1648. </View>
  1649. <View className="item-value">
  1650. <AtTextarea
  1651. value={dtails.interviewFeedback || ''}
  1652. maxLength={200}
  1653. placeholder='~'
  1654. height={70}
  1655. onChange={value => {
  1656. dtails.interviewFeedback = value;
  1657. this.setState({ dtails });
  1658. }}
  1659. disabled
  1660. />
  1661. </View>
  1662. </View>
  1663. <View className="item">
  1664. <View className="item-title">
  1665. <View>
  1666. 后续跟进计划:
  1667. <Text className="titleTips">(20字以上)</Text>
  1668. </View>
  1669. <View>
  1670. {dtails.interviewList.length ? (
  1671. <AtIcon value='clock' size='20' color='#1E90FF' onClick={() => this.openInteractHis('followUpPlan')}></AtIcon>
  1672. ) : null}
  1673. </View>
  1674. </View>
  1675. <View className="item-value">
  1676. <AtTextarea
  1677. value={dtails.followUpPlan || ''}
  1678. maxLength={200}
  1679. placeholder='~'
  1680. height={70}
  1681. onChange={value => {
  1682. dtails.followUpPlan = value;
  1683. this.setState({ dtails });
  1684. }}
  1685. disabled
  1686. />
  1687. </View>
  1688. </View>
  1689. </>
  1690. ) : null}
  1691. {/* <View style={{ display: 'flex', marginTop: '24rpx' }}>
  1692. <AtButton type="secondary" circle onClick={this.handlePrevClick.bind(this)}>上一页</AtButton>
  1693. <AtButton type="primary" circle onClick={this.handleNextClick.bind(this)}>下一页</AtButton>
  1694. </View> */}
  1695. </View>
  1696. </View>
  1697. }
  1698. </View>
  1699. )}
  1700. </View>
  1701. <AtModal
  1702. isOpened={this.state.isOpened}
  1703. onClose={() => {
  1704. this.setState({
  1705. isOpened: false,
  1706. checkProject: [],
  1707. checkOptions: []
  1708. })
  1709. }}
  1710. >
  1711. <AtModalHeader>信息修改</AtModalHeader>
  1712. <AtModalContent>
  1713. {
  1714. upType == 1 &&
  1715. <View>
  1716. <AtInput
  1717. name='inventionPatentCount'
  1718. title='发明专利'
  1719. type='number'
  1720. value={info.inventionPatentCount}
  1721. onChange={e => {
  1722. this.setState({
  1723. info: Object.assign(info, {
  1724. inventionPatentCount: e,
  1725. })
  1726. })
  1727. }}
  1728. cursor={-1}
  1729. />
  1730. <AtInput
  1731. name='utilityModelCount'
  1732. title='实用新型'
  1733. type='number'
  1734. value={info.utilityModelCount}
  1735. onChange={e => {
  1736. this.setState({
  1737. info: Object.assign(info, {
  1738. utilityModelCount: e,
  1739. })
  1740. })
  1741. }}
  1742. cursor={-1}
  1743. />
  1744. <AtInput
  1745. name='appearancePatentCount'
  1746. title='外观专利'
  1747. type='number'
  1748. value={info.appearancePatentCount}
  1749. onChange={e => {
  1750. this.setState({
  1751. info: Object.assign(info, {
  1752. appearancePatentCount: e,
  1753. })
  1754. })
  1755. }}
  1756. cursor={-1}
  1757. />
  1758. <AtInput
  1759. name='softwareWorksCount'
  1760. title='软著'
  1761. type='number'
  1762. value={info.softwareWorksCount}
  1763. onChange={e => {
  1764. this.setState({
  1765. info: Object.assign(info, {
  1766. softwareWorksCount: e,
  1767. })
  1768. })
  1769. }}
  1770. cursor={-1}
  1771. />
  1772. <View style={{ display: 'flex', margin: '12rpx 0' }}>
  1773. <Text style={{ fontSize: '32rpx', marginRight: '16rpx', width: '172rpx' }}>标准</Text>
  1774. <RadioGroup title="标准" onChange={e => {
  1775. info.standard = Number(e.target.value);
  1776. this.setState({ info });
  1777. }}>
  1778. <Label className='radio-list__label'>
  1779. <Radio className='radio-list__radio' value={1} checked={info.standard == 1}>有</Radio>
  1780. </Label>
  1781. <Label className='radio-list__label'>
  1782. <Radio className='radio-list__radio' value={0} checked={!dtails.info}>无</Radio>
  1783. </Label>
  1784. </RadioGroup>
  1785. </View>
  1786. <AtInput
  1787. name='otherCount'
  1788. title='其他'
  1789. type='number'
  1790. value={info.otherCount}
  1791. onChange={e => {
  1792. this.setState({
  1793. info: Object.assign(info, {
  1794. otherCount: e,
  1795. })
  1796. })
  1797. }}
  1798. cursor={-1}
  1799. />
  1800. </View>
  1801. }
  1802. {
  1803. upType == 5 &&
  1804. <View>
  1805. <AtSearchBar
  1806. placeholder="请输入项目名称"
  1807. showActionButton
  1808. value={this.state.value}
  1809. onChange={this.onSearchChange}
  1810. onActionClick={() => {
  1811. this.getBusinessProjectByName(this.state.value);
  1812. }}
  1813. onClear={() => {
  1814. this.setState({
  1815. value: "",
  1816. }, () => { this.getBusinessProjectByName(this.state.value) });
  1817. }}
  1818. cursor={-1}
  1819. />
  1820. {/* 高新项目 */}
  1821. {this.state.checkProject.length && this.state.checkProject[0].cSort == 9 ? <View style={{ backgroundColor: '#eee', padding: '20rpx 24rpx', margin: '24rpx' }}>
  1822. <RadioGroup onChange={e => {
  1823. const { info } = this.state;
  1824. info.examineStatus = e.target.value;
  1825. this.setState({ info });
  1826. }}>
  1827. <Label className='radio-list__label'>
  1828. <Radio className='radio-list__radio' checked={info.examineStatus == 1} value={1}>初次审核</Radio>
  1829. </Label>
  1830. <Label className='radio-list__label'>
  1831. <Radio className='radio-list__radio' checked={info.examineStatus == 2} value={2}>复审</Radio>
  1832. </Label>
  1833. </RadioGroup>
  1834. {this.state.info.examineStatus == 2 && <View>
  1835. <Text>复审年份:</Text>
  1836. <Text style={{ textDecoration: 'underline' }} onClick={() => this.handleOpenMultiplePicker('examineStatusOther')}>{info.examineStatusOther || '请选择'}</Text>
  1837. </View>}
  1838. </View> : null}
  1839. {/* 会员项目 */}
  1840. {this.state.checkProject.length && this.state.checkProject[0].cSort == 6 ? <View style={{ backgroundColor: '#eee', padding: '20rpx 24rpx', margin: '24rpx' }}>
  1841. <RadioGroup onChange={e => {
  1842. const { info } = this.state;
  1843. info.buyStatus = e.target.value;
  1844. this.setState({ info });
  1845. }}>
  1846. <Label className='radio-list__label'>
  1847. <Radio className='radio-list__radio' checked={info.buyStatus == 1} value={1}>新购</Radio>
  1848. </Label>
  1849. <Label className='radio-list__label'>
  1850. <Radio className='radio-list__radio' checked={info.buyStatus == 2} value={2}>复购/复审</Radio>
  1851. </Label>
  1852. </RadioGroup>
  1853. {this.state.info.buyStatus == 2 && <View>
  1854. <Text>复购/复审年份:</Text>
  1855. <Text style={{ textDecoration: 'underline' }} onClick={() => this.handleOpenMultiplePicker('buyStatusOther')}>{info.buyStatusOther || '请选择'}</Text>
  1856. </View>}
  1857. </View> : null}
  1858. {this.state.isOpened && <View style={{ height: '550rpx', overflow: 'auto' }}>
  1859. <RadioGroup onChange={e => {
  1860. let currProject = this.state.allProjectList.find(item => item.id == e.target.value);
  1861. this.setState({
  1862. checkOptions: [e.target.value],
  1863. checkProject: [currProject]
  1864. });
  1865. }}>
  1866. {this.state.options.map((item, i) => {
  1867. return (
  1868. <View>
  1869. <Label className='radio-list__label' for={i} key={i}>
  1870. <Radio className='radio-list__radio' value={item.value} checked={this.state.checkOptions.indexOf(item.value) > -1}>{item.label}</Radio>
  1871. </Label>
  1872. </View>
  1873. )
  1874. })}
  1875. </RadioGroup>
  1876. </View>}
  1877. </View>
  1878. }
  1879. </AtModalContent>
  1880. <AtModalAction>
  1881. <Button type='secondary' onClick={() => {
  1882. this.setState({
  1883. isOpened: false,
  1884. checkOptions: [],
  1885. checkProject: []
  1886. })
  1887. }}>取消</Button>
  1888. <Button type='primary' onClick={this.update}>确定修改</Button>
  1889. </AtModalAction>
  1890. </AtModal>
  1891. <AtModal
  1892. isOpened={this.state.isAdd}
  1893. onClose={() => {
  1894. this.setState({
  1895. isAdd: false
  1896. })
  1897. }}
  1898. >
  1899. <AtModalHeader>联系人</AtModalHeader>
  1900. <AtModalContent>
  1901. {
  1902. userList.map((item) =>
  1903. <View key={item.id} className="additem">
  1904. <Text className="txt">{item.name || " "}</Text>
  1905. <Text className="txt">{item.position || " "}</Text>
  1906. <Text className="txt">{item.department || " "}</Text>
  1907. <Text className="mobile">{item.mobile || " "}</Text>
  1908. <View
  1909. className={item.major == 1 ? "bts" : "bt"}
  1910. onClick={() => {
  1911. item.major != 1 && this.updateMainContact(item.id)
  1912. }}
  1913. >
  1914. {item.major == 1 ? "已选" : "选择"}
  1915. </View>
  1916. </View>
  1917. )
  1918. }
  1919. <AtInput
  1920. required
  1921. name='name'
  1922. title='姓名'
  1923. type='text'
  1924. placeholder='请填写姓名'
  1925. value={obj.name}
  1926. onChange={e => {
  1927. this.setState({
  1928. obj: Object.assign(obj, {
  1929. name: e,
  1930. })
  1931. })
  1932. }}
  1933. cursor={-1}
  1934. />
  1935. <AtInput
  1936. required
  1937. name='position'
  1938. title='职位'
  1939. type='text'
  1940. placeholder='请填写职位'
  1941. value={obj.position}
  1942. onChange={e => {
  1943. this.setState({
  1944. obj: Object.assign(obj, {
  1945. position: e,
  1946. })
  1947. })
  1948. }}
  1949. cursor={-1}
  1950. />
  1951. <AtInput
  1952. required
  1953. name='department'
  1954. title='部门'
  1955. type='text'
  1956. placeholder='请填写部门'
  1957. value={obj.department}
  1958. onChange={e => {
  1959. console.log(e)
  1960. this.setState({
  1961. obj: Object.assign(obj, {
  1962. department: e,
  1963. })
  1964. })
  1965. }}
  1966. cursor={-1}
  1967. />
  1968. <AtInput
  1969. required
  1970. name='mobile'
  1971. title='手机'
  1972. type='phone'
  1973. placeholder='请填写手机号'
  1974. value={obj.mobile}
  1975. onChange={e => {
  1976. this.setState({
  1977. obj: Object.assign(obj, {
  1978. mobile: e,
  1979. })
  1980. })
  1981. }}
  1982. cursor={-1}
  1983. />
  1984. </AtModalContent>
  1985. <AtModalAction>
  1986. <Button type='secondary'
  1987. onClick={() => {
  1988. this.setState({
  1989. isAdd: false,
  1990. }, () => {
  1991. this.queryByUidAll()
  1992. })
  1993. }}>取消</Button>
  1994. <Button type='primary' onClick={this.add}>保存</Button>
  1995. </AtModalAction>
  1996. </AtModal>
  1997. {/* 新增项目 */}
  1998. <AtModal
  1999. isOpened={this.state.addItemShow}
  2000. onClose={this.handleCloseAddItemDialog}
  2001. >
  2002. <AtModalHeader>新增对外投资控股的企业</AtModalHeader>
  2003. <AtModalContent>
  2004. <AtInput
  2005. required
  2006. name='companyName'
  2007. title='企业名称'
  2008. placeholder='请输入企业名称'
  2009. value={this.state.addItemInputVal}
  2010. onChange={value => this.setState({ addItemInputVal: value })}
  2011. cursor={-1}
  2012. />
  2013. </AtModalContent>
  2014. <AtModalAction>
  2015. <Button type='secondary' onClick={this.handleCloseAddItemDialog}>取消</Button>
  2016. <Button type='primary' onClick={this.handleAddItemSave}>保存</Button>
  2017. </AtModalAction>
  2018. </AtModal>
  2019. {/* 多选框 */}
  2020. <CheckboxPicker
  2021. isOpened={this.state.multiplePickerShow}
  2022. title={this.state.multiplePickerTitle}
  2023. options={this.state.multiplePickerOptions}
  2024. checkedList={this.state.multiplePickerCheckedList}
  2025. onClose={() => { this.setState({ multiplePickerShow: false, multiplePickerCheckedList: [] }) }}
  2026. onConfirm={this.handleMultipleConfirm}
  2027. ></CheckboxPicker>
  2028. {/* 沟通情况历史记录 */}
  2029. <InterviewHisList
  2030. isOpened={this.state.interactShow}
  2031. list={this.state.interactList}
  2032. type={this.state.interactShowType}
  2033. title={this.state.interactTitle}
  2034. onClose={() => {
  2035. this.setState({ interactShow: false })
  2036. }}
  2037. />
  2038. {/* 省市区选择器 */}
  2039. <AddressPicker
  2040. value={this.state.currAddress}
  2041. pickerShow={this.state.addressPickerShow}
  2042. onHandleToggleShow={this.toggleAddressPicker.bind(this)}
  2043. />
  2044. <CustomerProjectSelect
  2045. isOpened={this.state.checkCompShow}
  2046. title="选择对外关联的控股企业"
  2047. checkedList={this.state.checkCompList}
  2048. onClose={() => { this.setState({ checkCompShow: false, checkCompList: [] }) }}
  2049. onConfirm={this.handleCheckCompConfirm.bind(this)}
  2050. />
  2051. </View>
  2052. );
  2053. }
  2054. }
  2055. export default CustomerProfile;