index.jsx 80 KB

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