tools.js 28 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016
  1. import { message,Timeline,Select } from 'antd';
  2. import React from 'react';
  3. import ajax from 'jquery/src/ajax/xhr.js';
  4. import $ from 'jquery/src/ajax';
  5. import {
  6. patentTypeList,
  7. patentStateList,
  8. patentFieldList,
  9. technicalSourceList,
  10. catagoryList,
  11. intellectualGetList,
  12. conversionFormList,
  13. annualReportStateList,
  14. cognizanceStateList,
  15. technologyStateList,
  16. copyrightStateList,
  17. auditStatusList,
  18. scaleList,
  19. companyType,
  20. industryList,
  21. contractTypeList,
  22. contractStateList,
  23. demandTypeList,
  24. achievementCategoryList,
  25. techAuditStatusList,
  26. maturityList,
  27. transferModeList,
  28. innovationList,
  29. orderStatusList,
  30. activityForm,
  31. activityType,
  32. boutique,
  33. hot,
  34. statuslist,
  35. customerTyp,
  36. cityArr,
  37. customerStatus,
  38. intentionalService,
  39. newFollow,
  40. sex,
  41. tag,
  42. contactType,
  43. contact,
  44. intentionalServiceOn,
  45. newFollowOn,
  46. customerStatusOn,
  47. Whether,
  48. Certification,
  49. currentMember,
  50. lvl,
  51. industry,
  52. socialAttribute,
  53. station,
  54. post,
  55. patternOrganization,
  56. conditionOrganization,
  57. categoryState,
  58. auditStatusL,
  59. gameState
  60. } from './dataDic.js';
  61. import { provinceList} from './NewDicProvinceList.js';
  62. module.exports = {
  63. splitUrl: function (string, i, url) {
  64. let theList = [];
  65. let theArr = [];
  66. if (string && string.length) {
  67. theArr = string.split(i);
  68. theArr.map(function (item, i) {
  69. theList.push({
  70. uid: -i-1,
  71. url: url + item,
  72. response: {
  73. data: item
  74. }
  75. });
  76. });
  77. }
  78. return theList;
  79. },
  80. getBase64: function (img, callback) {
  81. const reader = new FileReader();
  82. reader.addEventListener('load', () => callback(reader.result));
  83. reader.readAsDataURL(img);
  84. },
  85. beforeUpload: function (file) {
  86. // debugger
  87. // const isJPG = file.type === 'image/jpeg/document';
  88. // if (!isJPG) {
  89. // message.error('You can only upload JPG file!');
  90. // }
  91. // const isLt2M = file.size / 1024 / 1024 < 2;
  92. // if (!isLt2M) {
  93. // message.error('Image must smaller than 2MB!');
  94. // }
  95. // return isJPG && isLt2M;
  96. },
  97. beforeUploadFile: function (file) {
  98. // debugger
  99. // const isJPG = file.type === 'image/jpeg/document';
  100. // if (!isJPG) {
  101. // message.error('You can only upload JPG file!');
  102. // }
  103. // const isLt2M = file.size / 1024 / 1024 < 2;
  104. // if (!isLt2M) {
  105. // message.error('Image must smaller than 2MB!');
  106. // }
  107. // return isJPG && isLt2M;
  108. },
  109. getTime: function (e, t) {
  110. if (e && !t) {
  111. var d = new Date(e);
  112. d = d.getFullYear() + "-" +
  113. ((d.getMonth() + 1) < 10 ? '0' + (d.getMonth() + 1) : (d.getMonth() + 1)) + "-" +
  114. (d.getDate() < 10 ? '0' + d.getDate() : d.getDate()) + " ";
  115. // + (d.getHours() < 10 ? "0" + d.getHours() : d.getHours()) + ":" +
  116. // (d.getMinutes() < 10 ? "0" + d.getMinutes() : d.getMinutes()) + ":" +
  117. // (d.getSeconds() < 10 ? "0" + d.getSeconds() : d.getSeconds());
  118. return d;
  119. } else if (e && t) {
  120. var d1 = new Date(e);
  121. var d2 = new Date(e);
  122. d2 = d2.setMonth(d1.getMonth() + t);
  123. d2 = new Date(d2)
  124. d2 = d2.getFullYear() + "-" +
  125. ((d2.getMonth() + 1) < 10 ? '0' + (d2.getMonth() + 1) : (d2.getMonth() + 1)) + "-" +
  126. (d2.getDate() < 10 ? '0' + d2.getDate() : d2.getDate()) + " ";
  127. return d2;
  128. } else {
  129. return '';
  130. }
  131. },
  132. getPatentType: function (e) {
  133. if (e) {
  134. let theType = '';
  135. patentTypeList.map(function (item) {
  136. if (item.value == e) {
  137. theType = item.key;
  138. };
  139. });
  140. return theType;
  141. }
  142. },
  143. getPatentState: function (e) {
  144. if (e) {
  145. let theState = '';
  146. patentStateList.map(function (item) {
  147. if (item.value == e) {
  148. theState = item.key;
  149. };
  150. });
  151. return theState;
  152. }
  153. },
  154. getPatentField: function (e) {
  155. if (e) {
  156. let theState = '';
  157. patentFieldList.map(function (item) {
  158. if (item.value == e) {
  159. theState = item.key;
  160. };
  161. });
  162. return theState;
  163. }
  164. },
  165. getTechnicalSource: function (e) {
  166. if (e) {
  167. let theSource = '';
  168. technicalSourceList.map(function (item) {
  169. if (item.value == e) {
  170. theSource = item.key;
  171. };
  172. });
  173. return theSource;
  174. }
  175. },
  176. getCatagory: function (e) {
  177. if (e) {
  178. let theType = '';
  179. catagoryList.map(function (item) {
  180. if (item.value == e) {
  181. theType = item.key;
  182. };
  183. });
  184. return theType;
  185. }
  186. },
  187. getIntellectualObtainWay: function (e) {
  188. if (e) {
  189. let theType = '';
  190. intellectualGetList.map(function (item) {
  191. if (item.value == e) {
  192. theType = item.key;
  193. };
  194. });
  195. return theType;
  196. }
  197. },
  198. getConversionForm: function (e) {
  199. if (e) {
  200. let theType = '';
  201. conversionFormList.map(function (item) {
  202. if (item.value == e) {
  203. theType = item.key;
  204. };
  205. });
  206. return theType;
  207. }
  208. },
  209. getAnnualReportState: function (e) {
  210. if (e) {
  211. let theType = '';
  212. annualReportStateList.map(function (item) {
  213. if (item.value == e) {
  214. theType = item.key;
  215. };
  216. });
  217. return theType;
  218. }
  219. },
  220. getCognizanceState: function (e) {
  221. if (e) {
  222. let theType = '';
  223. cognizanceStateList.map(function (item) {
  224. if (item.value == e) {
  225. theType = item.key;
  226. };
  227. });
  228. return theType;
  229. }
  230. },
  231. getTechnologyState: function (e) {
  232. if (e) {
  233. let theType = '';
  234. technologyStateList.map(function (item) {
  235. if (item.value == e) {
  236. theType = item.key;
  237. };
  238. });
  239. return theType;
  240. }
  241. },
  242. //显示用户认证状态
  243. getAuditState: function (e) {
  244. if (e) {
  245. let theType = '';
  246. auditStatusList.map(function (item) {
  247. if (item.value == e) {
  248. theType = item.key;
  249. };
  250. });
  251. return theType;
  252. }
  253. },
  254. getCopyrightState: function (e) {
  255. if (e) {
  256. let theType = '';
  257. copyrightStateList.map(function (item) {
  258. if (item.value == e) {
  259. theType = item.key;
  260. };
  261. });
  262. return theType;
  263. }
  264. },
  265. downloadFile: function (path, fileName) {
  266. window.open(globalConfig.context + '/open/downloadFile?path=' + path + '&fileName=' + fileName)
  267. },
  268. techDownloadFile: function (url, id) {
  269. window.open(globalConfig.context + url + '?id=' + id)
  270. },
  271. copyrightDownloadFile: function (id, sign, url) {
  272. window.open(globalConfig.context + url + '?id=' + id + '&sign=' + sign)
  273. },
  274. newDownloadFile: function (id, sign, url,type) {
  275. if (!type ) {
  276. window.open(globalConfig.context + url + '?id=' + id + '&sign=' + sign);
  277. };
  278. if ( type ) {
  279. window.open(globalConfig.context + url + '?id=' + id + '&sign=' + sign + '&type=' + type);
  280. };
  281. },
  282. companySearch(input, option) {
  283. return option.props.children.indexOf(input) >= 0
  284. },
  285. getVacations(ccccc){
  286. let now = new Date();
  287. let theYear = now.getFullYear();
  288. $.ajax({
  289. type: "get",
  290. dataType: "json",
  291. crossDomain: false,
  292. url: globalConfig.context + '/open/html/json/vacations' + theYear,
  293. success: (data)=>{
  294. if (data) {
  295. ccccc(data);
  296. };
  297. }
  298. });
  299. },
  300. getInUrgentTime(date, inUrgent,vocations) {
  301. if ( vocations && vocations.length ){
  302. let now = new Date(date),addNum = 0;
  303. for (var i = 1; i <= inUrgent;) {
  304. now.setDate(now.getDate() + 1);
  305. let thebool = true;
  306. vocations.map((item)=>{
  307. if ( item == getKey(now)) {
  308. thebool= false;
  309. }
  310. });
  311. if ( thebool ) {
  312. i++
  313. };
  314. };
  315. return now;
  316. };
  317. function getKey(date) {
  318. var year = date.getFullYear(),
  319. month = date.getMonth() + 1,
  320. day = date.getDate();
  321. year = "" + year;
  322. month = (month > 9 ? "" : "0") + month;
  323. day = (day > 9 ? "" : "0") + day;
  324. return year + month + day;
  325. }
  326. },
  327. //各种通过接口获取下拉列表
  328. setPatentStateOption(permission) {
  329. let theArr = [];
  330. patentStateList.map(function (item) {
  331. for (let i = 0; i < permission.length; i++) {
  332. if (item.value == permission[i]) {
  333. theArr.push(item);
  334. };
  335. };
  336. });
  337. return theArr;
  338. },
  339. setUserContactsList(){
  340. let theOption = [];
  341. $.ajax({
  342. method: "get",
  343. dataType: "json",
  344. crossDomain: false,
  345. url: globalConfig.context + '/api/user/getContacts',
  346. success: function (data) {
  347. if (!data.data) {
  348. if ( data.error && data.error.length ) {
  349. message.warning(data.error[0].message);
  350. };
  351. return;
  352. };
  353. for (let item in data.data) {
  354. let theData = data.data[item];
  355. theOption.push(
  356. <Select.Option value={item} key={theData}>{theData}</Select.Option>
  357. );
  358. };
  359. }
  360. });
  361. return theOption;
  362. },
  363. setAdminContactsList(uid){
  364. let theOption = [];
  365. $.ajax({
  366. method: "get",
  367. dataType: "json",
  368. crossDomain: false,
  369. url: globalConfig.context + '/api/admin/getContacts',
  370. data:{ "uid": uid },
  371. success: function (data) {
  372. if (!data.data) {
  373. if ( data.error && data.error.length ) {
  374. message.warning(data.error[0].message);
  375. };
  376. return;
  377. };
  378. for (let item in data.data) {
  379. let theData = data.data[item];
  380. theOption.push(
  381. <Select.Option value={item} key={theData}>{theData}</Select.Option>
  382. );
  383. };
  384. }
  385. });
  386. return theOption;
  387. },
  388. //高企培育资料完成情况(比重)
  389. getProportion(uid,callback){
  390. $.ajax({
  391. method: "get",
  392. dataType: "json",
  393. crossDomain: false,
  394. url: globalConfig.context + '/api/admin/proportion',
  395. data:{ "uid": uid },
  396. success: function (data) {
  397. if (!data.data) {
  398. if ( data.error && data.error.length ) {
  399. message.warning(data.error[0].message);
  400. };
  401. data.data = {}
  402. callback(data.data);
  403. };
  404. callback(data.data);
  405. }
  406. });
  407. },
  408. //保存高企培育资料完成情况
  409. saveProportion(id,uid,sign,status){
  410. $.ajax({
  411. method: "post",
  412. dataType: "json",
  413. crossDomain: false,
  414. url: globalConfig.context + '/api/admin/confirmProportion',
  415. data:{
  416. "id": id,
  417. "uid":uid,
  418. "sign":sign,
  419. "status":status
  420. },
  421. success: function (data) {
  422. if (!data.data) {
  423. if ( data.error && data.error.length ) {
  424. message.warning(data.error[0].message);
  425. };
  426. return;
  427. };
  428. }
  429. });
  430. },
  431. //获取window.location.search传的值
  432. getSearchUrl(e){
  433. let searchURL = e;
  434. let theObj = {};
  435. searchURL = searchURL.substring(1, searchURL.length);
  436. theObj[searchURL.split("&")[0].split("=")[0]] = searchURL.split("&")[0].split("=")[1];
  437. if ( searchURL.split("&")[1] ) {
  438. theObj[searchURL.split("&")[1].split("=")[0]] = searchURL.split("&")[1].split("=")[1];
  439. if ( searchURL.split("&")[2] ) {
  440. theObj[searchURL.split("&")[2].split("=")[0]] = searchURL.split("&")[2].split("=")[1];
  441. };
  442. };
  443. return theObj;
  444. },
  445. //预览接口
  446. getPreview(id,url,sign,callback){
  447. $.ajax({
  448. method: "get",
  449. dataType: "json",
  450. crossDomain: false,
  451. url: globalConfig.context + "/api/admin/preview/" + url,
  452. data:{
  453. "id": id,
  454. "sign": sign
  455. },
  456. success: function (data) {
  457. if (!data.data) {
  458. if ( data.error && data.error.length ) {
  459. message.warning(data.error[0].message);
  460. };
  461. };
  462. callback('https://view.officeapps.live.com/op/view.aspx?src=' + encodeURIComponent(location.origin + globalConfig.context + "/open/preview?" + data.data));
  463. }
  464. });
  465. },
  466. //获取企业规模
  467. getScaleState(e) {
  468. if (e) {
  469. let theType = '';
  470. scaleList.map(function (item) {
  471. if (item.value == e) {
  472. theType = item.key;
  473. };
  474. });
  475. return theType;
  476. }
  477. },
  478. //获取企业类型
  479. getCompanyType(type1, type2) {
  480. let companyTypeList = [];
  481. for (let i = 0; i < companyType.length; i++) {
  482. companyTypeList.push({
  483. value: companyType[i].value,
  484. label: companyType[i].label
  485. });
  486. if (companyType[i].children) {
  487. for (let j = 0; j < companyType[i].children.length; j++) {
  488. companyTypeList.push({
  489. value: companyType[i].children[j].value,
  490. label: companyType[i].children[j].label
  491. });
  492. };
  493. }
  494. };
  495. companyTypeList.sort(function (a, b) {
  496. return a.value - b.value
  497. });
  498. let typeKey = "";
  499. companyTypeList.map(function (item) {
  500. if (type1 == item.value) {
  501. typeKey = item.label;
  502. };
  503. if (type2 == item.value) {
  504. typeKey = typeKey + "/" + item.label;
  505. };
  506. });
  507. return typeKey;
  508. },
  509. //获取企业行业
  510. getIndustryType(e) {
  511. if (e) {
  512. let theType = '';
  513. industryList.map(function (item) {
  514. if (item.value == e) {
  515. theType = item.key;
  516. };
  517. });
  518. return theType;
  519. }
  520. },
  521. //获取合同状态
  522. getContractType: function (e) {
  523. if (e) {
  524. let theType = '';
  525. contractTypeList.map(function (item) {
  526. if (item.value == e) {
  527. theType = item.key;
  528. };
  529. });
  530. return theType;
  531. }
  532. },
  533. //获取合同类型
  534. getContractState: function (e) {
  535. if (e) {
  536. let theType = '';
  537. contractStateList.map(function (item) {
  538. if (item.value == e) {
  539. theType = item.key;
  540. };
  541. });
  542. return theType;
  543. }
  544. },
  545. //获取需求类型
  546. getDemandType: function (e) {
  547. if (e) {
  548. let theType = '';
  549. demandTypeList.map(function (item) {
  550. if (item.value == e) {
  551. theType = item.key;
  552. };
  553. });
  554. return theType;
  555. }
  556. },
  557. //获取成果类型
  558. getAchievementCategory: function (e) {
  559. if (e) {
  560. let theType = '';
  561. achievementCategoryList.map(function (item) {
  562. if (item.value == e) {
  563. theType = item.key;
  564. };
  565. });
  566. return theType;
  567. }
  568. },
  569. //获取需求和成果审核状态
  570. getTechAuditStatus: function (e) {
  571. if (e) {
  572. let theType = '';
  573. techAuditStatusList.map(function (item) {
  574. if (item.value == e) {
  575. theType = item.key;
  576. };
  577. });
  578. return theType;
  579. }
  580. },
  581. //获取需求和成果审核状态
  582. getMaturity: function (e) {
  583. if (e) {
  584. let theType = '';
  585. maturityList.map(function (item) {
  586. if (item.value == e) {
  587. theType = item.key;
  588. };
  589. });
  590. return theType;
  591. }
  592. },
  593. //获取需求和成果审核状态
  594. getTransferMode: function (e) {
  595. if (e) {
  596. let theType = '';
  597. transferModeList.map(function (item) {
  598. if (item.value == e) {
  599. theType = item.key;
  600. };
  601. });
  602. return theType;
  603. }
  604. },
  605. //获取创新度状态
  606. getInnovation: function (e) {
  607. if (e) {
  608. let theType = '';
  609. innovationList.map(function (item) {
  610. if (item.value == e) {
  611. theType = item.key;
  612. };
  613. });
  614. return theType;
  615. }
  616. },
  617. //获取创新度状态
  618. getOrderStatus: function (e) {
  619. if (e) {
  620. let theType = '';
  621. orderStatusList.map(function (item) {
  622. if (item.value == e) {
  623. theType = item.key;
  624. };
  625. });
  626. return theType;
  627. }
  628. },
  629. //科技管理
  630. //活动圈后台管理
  631. getActivityType: function (e) {
  632. if (e) {
  633. let theType = '';
  634. activityType.map(function (item) {
  635. if (item.value == e) {
  636. theType = item.key;
  637. };
  638. });
  639. return theType;
  640. }
  641. },
  642. getActivityForm: function (e) {
  643. if (e) {
  644. let theType = '';
  645. activityForm.map(function (item) {
  646. if (item.value == e) {
  647. theType = item.key;
  648. };
  649. });
  650. return theType;
  651. }
  652. },
  653. //是否展示在首页
  654. gethot: function (e) {
  655. if (e) {
  656. let theType = '';
  657. hot.map(function (item) {
  658. if (item.value == e) {
  659. theType = item.key;
  660. };
  661. });
  662. return theType;
  663. }
  664. },
  665. //是否精品
  666. getboutique: function (e) {
  667. if (e) {
  668. let theType = '';
  669. boutique.map(function (item) {
  670. if (item.value == e) {
  671. theType = item.key;
  672. };
  673. });
  674. return theType;
  675. }
  676. },
  677. //客户类型
  678. getcustomerTyp: function (e) {
  679. if (e) {
  680. let theType = '';
  681. customerTyp.map(function (item) {
  682. if (item.value == e) {
  683. theType = item.key;
  684. };
  685. });
  686. return theType;
  687. }
  688. },
  689. //省份
  690. getcityArr: function (e) {
  691. if (e) {
  692. let theType = '';
  693. cityArr.map(function (item) {
  694. if (item.value == e) {
  695. theType = item.key;
  696. }
  697. });
  698. return theType;
  699. }
  700. },
  701. //客户状态
  702. getcustomerStatue: function (e) {
  703. if (e) {
  704. let theType = '';
  705. customerStatus.map(function (item) {
  706. if (item.value == e) {
  707. theType = item.key;
  708. };
  709. });
  710. return theType;
  711. }
  712. },
  713. //账户状态
  714. getStatuslist: function (e) {
  715. if (e) {
  716. let theType = '';
  717. statuslist.map(function (item) {
  718. if (item.value == e) {
  719. theType = item.key;
  720. };
  721. });
  722. return theType;
  723. }
  724. },
  725. //意向服务
  726. getCompanyIntention: function (e) {
  727. if (e) {
  728. let theType = '';
  729. intentionalService.map(function (item) {
  730. if (item.value == e) {
  731. theType = item.key;
  732. };
  733. });
  734. return theType;
  735. }
  736. },
  737. //客户标签
  738. getTag: function (e) {
  739. if (e) {
  740. let theType = '';
  741. tag.map(function (item) {
  742. if (item.value == e) {
  743. theType = item.key;
  744. };
  745. });
  746. return theType;
  747. }
  748. },
  749. //最新跟进
  750. getfllowSituation: function (e) {
  751. if (e) {
  752. let theType = '';
  753. newFollow.map(function (item) {
  754. if (item.value == e) {
  755. theType = item.key;
  756. };
  757. });
  758. return theType;
  759. }
  760. },
  761. //性别
  762. getsex: function (e) {
  763. if (e) {
  764. let theType = '';
  765. sex.map(function (item) {
  766. if (item.value == e) {
  767. theType = item.key;
  768. };
  769. });
  770. return theType;
  771. }
  772. },
  773. //联系方式
  774. getcontact: function (e) {
  775. if (e) {
  776. let theType = '';
  777. contact.map(function (item) {
  778. if (item.value == e) {
  779. theType = item.key;
  780. };
  781. });
  782. return theType;
  783. }
  784. },
  785. //是否文字与数字转换
  786. getWhether: function (e) {
  787. if (e) {
  788. let theType = '';
  789. Whether.map(function (item) {
  790. if (item.value == e) {
  791. theType = item.key;
  792. };
  793. });
  794. return theType;
  795. }
  796. },
  797. //是否实名认证
  798. getCertification: function (e) {
  799. if (e) {
  800. let theType = '';
  801. Certification.map(function (item) {
  802. if (item.value == e) {
  803. theType = item.key;
  804. };
  805. });
  806. return theType;
  807. }
  808. },
  809. //会员状态
  810. getCurrentMember: function (e) {
  811. if (e) {
  812. let theType = '';
  813. currentMember.map(function (item) {
  814. if (item.value == e) {
  815. theType = item.key;
  816. };
  817. });
  818. return theType;
  819. }
  820. },
  821. //会员等级
  822. getLvl: function (e) {
  823. if (e) {
  824. let theType = '';
  825. lvl.map(function (item) {
  826. if (item.value == e) {
  827. theType = item.key;
  828. };
  829. });
  830. return theType;
  831. }
  832. },
  833. //省份转换
  834. getprovince:function(e){
  835. let nub=parseInt(e);
  836. let theType = '';
  837. if (nub<=34) {
  838. provinceList.map(function (item) {
  839. if (item.id == nub) {
  840. theType = item.name;
  841. };
  842. });
  843. }
  844. if(nub>34&&nub<=380){
  845. provinceList.map(function (item) {
  846. item.cityList.map(function (city) {
  847. if (city.id == nub) {
  848. theType = city.name;
  849. };
  850. });
  851. });
  852. }
  853. if(nub>380){
  854. provinceList.map(function (item) {
  855. item.cityList.map(function (city) {
  856. city.areaList.map(function (areas) {
  857. if (areas.id == nub) {
  858. theType = areas.name;
  859. };
  860. });
  861. });
  862. })
  863. }
  864. return theType;
  865. },
  866. //我的业务跟进状态
  867. getStatusFollow:function(e){
  868. let theType = '';
  869. if(e){
  870. theType ='跟进中' ;
  871. }else{
  872. theType ='停止跟进';
  873. }
  874. return theType;
  875. },
  876. //我的业务跟进状态
  877. getContactType:function(e){
  878. if (e) {
  879. let theType = '';
  880. contactType.map(function (item) {
  881. if (item.value == e) {
  882. theType = item.key;
  883. };
  884. });
  885. return theType;
  886. }
  887. },
  888. //社会属性
  889. getSocialAttribute:function(e){
  890. if (e) {
  891. let theType = '';
  892. socialAttribute.map(function (item) {
  893. if (item.value == e) {
  894. theType = item.key;
  895. };
  896. });
  897. return theType;
  898. }
  899. },
  900. //行业
  901. getIndustry:function(e){
  902. if (e) {
  903. let theType = '';
  904. industry.map(function (item) {
  905. if (item.value == e) {
  906. theType = item.key;
  907. };
  908. });
  909. return theType;
  910. }
  911. },
  912. //岗位
  913. getStation:function(e){
  914. if (e) {
  915. let theType = '';
  916. station.map(function (item) {
  917. if (item.value == e) {
  918. theType = item.key;
  919. };
  920. });
  921. return theType;
  922. }
  923. },
  924. //职务
  925. getPost:function(e){
  926. if (e) {
  927. let theType = '';
  928. post.map(function (item) {
  929. if (item.value == e) {
  930. theType = item.key;
  931. };
  932. });
  933. return theType;
  934. }
  935. },
  936. //组织类型
  937. getPattern:function(e){
  938. if (e) {
  939. let theType = '';
  940. patternOrganization.map(function (item) {
  941. if (item.value == e) {
  942. theType = item.key;
  943. };
  944. });
  945. return theType;
  946. }
  947. },
  948. //组织状态
  949. getCondition:function(e){
  950. if (e) {
  951. let theType = '';
  952. conditionOrganization.map(function (item) {
  953. if (item.value == e) {
  954. theType = item.key;
  955. };
  956. });
  957. return theType;
  958. }
  959. },
  960. //品类状态
  961. getCategoryState:function(e){
  962. if (e) {
  963. let theType = '';
  964. categoryState.map(function (item) {
  965. if (item.value == e) {
  966. theType = item.key;
  967. };
  968. });
  969. return theType;
  970. }
  971. },
  972. //实名认证
  973. getAuditStatus:function(index){
  974. let e=index?index.toString():'';
  975. if (e) {
  976. let theType = '';
  977. auditStatusL.map(function (item) {
  978. if (item.value == e) {
  979. theType = item.key;
  980. };
  981. });
  982. return theType;
  983. }
  984. },
  985. //品类状态
  986. getGameState:function(index){
  987. let e=index?index.toString():'';
  988. if (e) {
  989. let theType = '';
  990. gameState.map(function (item) {
  991. if (item.value == e) {
  992. theType = item.key;
  993. };
  994. });
  995. return theType;
  996. }
  997. }
  998. }