index.jsx 82 KB

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