myUser.jsx 90 KB

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