index.jsx 84 KB

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