tools.js 35 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304
  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. auditStatusLists,
  27. maturityList,
  28. transferModeList,
  29. innovationList,
  30. orderStatusList,
  31. activityForm,
  32. activityType,
  33. boutique,
  34. hot,
  35. statuslist,
  36. customerTyp,
  37. cityArr,
  38. customerStatus,
  39. intentionalService,
  40. newFollow,
  41. sex,
  42. tag,
  43. contactType,
  44. contact,
  45. intentionalServiceOn,
  46. newFollowOn,
  47. customerStatusOn,
  48. Whether,
  49. Certification,
  50. currentMember,
  51. lvl,
  52. industry,
  53. socialAttribute,
  54. station,
  55. post,
  56. patternOrganization,
  57. conditionOrganization,
  58. categoryState,
  59. auditStatusL,
  60. gameState,
  61. messageType,
  62. designated,
  63. featured,
  64. actives,
  65. intentProgress,
  66. transactionProgress,
  67. contractProgress,
  68. projectProgress,
  69. orderType, orderStage, orderState,paymentState, orderChannel, approvedState, lock,paymentMethod,transactionChannel,projectState,transactionProject,
  70. client,
  71. stick
  72. } from './dataDic.js';
  73. import { provinceList} from './NewDicProvinceList.js';
  74. module.exports = {
  75. splitUrl: function (string, i, url) {
  76. let theList = [];
  77. let theArr = [];
  78. if (string && string.length) {
  79. theArr = string.split(i);
  80. theArr.map(function (item, i) {
  81. theList.push({
  82. uid: -i-1,
  83. url: url + item,
  84. response: {
  85. data: item
  86. }
  87. });
  88. });
  89. }
  90. return theList;
  91. },
  92. getBase64: function (img, callback) {
  93. const reader = new FileReader();
  94. reader.addEventListener('load', () => callback(reader.result));
  95. reader.readAsDataURL(img);
  96. },
  97. beforeUpload: function (file) {
  98. const isLt2M = file.size / 1024 / 1024 < 2;
  99. if (!isLt2M) {
  100. message.error('图片小大必须小于2MB!');
  101. }
  102. return isLt2M;
  103. },
  104. beforeUploadFile: function (file) {
  105. // debugger
  106. // const isJPG = file.type === 'image/jpeg/document';
  107. // if (!isJPG) {
  108. // message.error('You can only upload JPG file!');
  109. // }
  110. // const isLt2M = file.size / 1024 / 1024 < 2;
  111. // if (!isLt2M) {
  112. // message.error('Image must smaller than 2MB!');
  113. // }
  114. // return isJPG && isLt2M;
  115. },
  116. getTime: function (e, t) {
  117. if (e && !t) {
  118. var d = new Date(e);
  119. d = d.getFullYear() + "-" +
  120. ((d.getMonth() + 1) < 10 ? '0' + (d.getMonth() + 1) : (d.getMonth() + 1)) + "-" +
  121. (d.getDate() < 10 ? '0' + d.getDate() : d.getDate()) + " ";
  122. // + (d.getHours() < 10 ? "0" + d.getHours() : d.getHours()) + ":" +
  123. // (d.getMinutes() < 10 ? "0" + d.getMinutes() : d.getMinutes()) + ":" +
  124. // (d.getSeconds() < 10 ? "0" + d.getSeconds() : d.getSeconds());
  125. return d;
  126. } else if (e && t) {
  127. var d1 = new Date(e);
  128. var d2 = new Date(e);
  129. d2 = d2.setMonth(d1.getMonth() + t);
  130. d2 = new Date(d2)
  131. d2 = d2.getFullYear() + "-" +
  132. ((d2.getMonth() + 1) < 10 ? '0' + (d2.getMonth() + 1) : (d2.getMonth() + 1)) + "-" +
  133. (d2.getDate() < 10 ? '0' + d2.getDate() : d2.getDate()) + " ";
  134. return d2;
  135. } else {
  136. return '';
  137. }
  138. },
  139. getPatentType: function (e) {
  140. if (e) {
  141. let theType = '';
  142. patentTypeList.map(function (item) {
  143. if (item.value == e) {
  144. theType = item.key;
  145. };
  146. });
  147. return theType;
  148. }
  149. },
  150. getPatentState: function (e) {
  151. if (e) {
  152. let theState = '';
  153. patentStateList.map(function (item) {
  154. if (item.value == e) {
  155. theState = item.key;
  156. };
  157. });
  158. return theState;
  159. }
  160. },
  161. getPatentField: function (e) {
  162. if (e) {
  163. let theState = '';
  164. patentFieldList.map(function (item) {
  165. if (item.value == e) {
  166. theState = item.key;
  167. };
  168. });
  169. return theState;
  170. }
  171. },
  172. getTechnicalSource: function (e) {
  173. if (e) {
  174. let theSource = '';
  175. technicalSourceList.map(function (item) {
  176. if (item.value == e) {
  177. theSource = item.key;
  178. };
  179. });
  180. return theSource;
  181. }
  182. },
  183. getCatagory: function (e) {
  184. if (e) {
  185. let theType = '';
  186. catagoryList.map(function (item) {
  187. if (item.value == e) {
  188. theType = item.key;
  189. };
  190. });
  191. return theType;
  192. }
  193. },
  194. getIntellectualObtainWay: function (e) {
  195. if (e) {
  196. let theType = '';
  197. intellectualGetList.map(function (item) {
  198. if (item.value == e) {
  199. theType = item.key;
  200. };
  201. });
  202. return theType;
  203. }
  204. },
  205. getConversionForm: function (e) {
  206. if (e) {
  207. let theType = '';
  208. conversionFormList.map(function (item) {
  209. if (item.value == e) {
  210. theType = item.key;
  211. };
  212. });
  213. return theType;
  214. }
  215. },
  216. getAnnualReportState: function (e) {
  217. if (e) {
  218. let theType = '';
  219. annualReportStateList.map(function (item) {
  220. if (item.value == e) {
  221. theType = item.key;
  222. };
  223. });
  224. return theType;
  225. }
  226. },
  227. getCognizanceState: function (e) {
  228. if (e) {
  229. let theType = '';
  230. cognizanceStateList.map(function (item) {
  231. if (item.value == e) {
  232. theType = item.key;
  233. };
  234. });
  235. return theType;
  236. }
  237. },
  238. getTechnologyState: function (e) {
  239. if (e) {
  240. let theType = '';
  241. technologyStateList.map(function (item) {
  242. if (item.value == e) {
  243. theType = item.key;
  244. };
  245. });
  246. return theType;
  247. }
  248. },
  249. //显示用户认证状态
  250. getAuditState: function (e) {
  251. if (e) {
  252. let theType = '';
  253. auditStatusList.map(function (item) {
  254. if (item.value == e) {
  255. theType = item.key;
  256. };
  257. });
  258. return theType;
  259. }
  260. },
  261. getCopyrightState: function (e) {
  262. if (e) {
  263. let theType = '';
  264. copyrightStateList.map(function (item) {
  265. if (item.value == e) {
  266. theType = item.key;
  267. };
  268. });
  269. return theType;
  270. }
  271. },
  272. downloadFile: function (path, fileName) {
  273. window.open(globalConfig.context + '/open/downloadFile?path=' + path + '&fileName=' + fileName)
  274. },
  275. techDownloadFile: function (url, id) {
  276. window.open(globalConfig.context + url + '?id=' + id)
  277. },
  278. copyrightDownloadFile: function (id, sign, url) {
  279. window.open(globalConfig.context + url + '?id=' + id + '&sign=' + sign)
  280. },
  281. newDownloadFile: function (id, sign, url,type) {
  282. if (!type ) {
  283. window.open(globalConfig.context + url + '?id=' + id + '&sign=' + sign);
  284. };
  285. if ( type ) {
  286. window.open(globalConfig.context + url + '?id=' + id + '&sign=' + sign + '&type=' + type);
  287. };
  288. },
  289. companySearch(input, option) {
  290. return option.props.children.indexOf(input) >= 0
  291. },
  292. getVacations(ccccc){
  293. let now = new Date();
  294. let theYear = now.getFullYear();
  295. $.ajax({
  296. type: "get",
  297. dataType: "json",
  298. crossDomain: false,
  299. url: globalConfig.context + '/open/html/json/vacations' + theYear,
  300. success: (data)=>{
  301. if (data) {
  302. ccccc(data);
  303. };
  304. }
  305. });
  306. },
  307. getInUrgentTime(date, inUrgent,vocations) {
  308. if ( vocations && vocations.length ){
  309. let now = new Date(date),addNum = 0;
  310. for (var i = 1; i <= inUrgent;) {
  311. now.setDate(now.getDate() + 1);
  312. let thebool = true;
  313. vocations.map((item)=>{
  314. if ( item == getKey(now)) {
  315. thebool= false;
  316. }
  317. });
  318. if ( thebool ) {
  319. i++
  320. };
  321. };
  322. return now;
  323. };
  324. function getKey(date) {
  325. var year = date.getFullYear(),
  326. month = date.getMonth() + 1,
  327. day = date.getDate();
  328. year = "" + year;
  329. month = (month > 9 ? "" : "0") + month;
  330. day = (day > 9 ? "" : "0") + day;
  331. return year + month + day;
  332. }
  333. },
  334. //各种通过接口获取下拉列表
  335. setPatentStateOption(permission) {
  336. let theArr = [];
  337. patentStateList.map(function (item) {
  338. for (let i = 0; i < permission.length; i++) {
  339. if (item.value == permission[i]) {
  340. theArr.push(item);
  341. };
  342. };
  343. });
  344. return theArr;
  345. },
  346. setUserContactsList(){
  347. let theOption = [];
  348. $.ajax({
  349. method: "get",
  350. dataType: "json",
  351. crossDomain: false,
  352. url: globalConfig.context + '/api/user/getContacts',
  353. success: function (data) {
  354. if (!data.data) {
  355. if ( data.error && data.error.length ) {
  356. message.warning(data.error[0].message);
  357. };
  358. return;
  359. };
  360. for (let item in data.data) {
  361. let theData = data.data[item];
  362. theOption.push(
  363. <Select.Option value={item} key={theData}>{theData}</Select.Option>
  364. );
  365. };
  366. }
  367. });
  368. return theOption;
  369. },
  370. setAdminContactsList(uid){
  371. let theOption = [];
  372. $.ajax({
  373. method: "get",
  374. dataType: "json",
  375. crossDomain: false,
  376. url: globalConfig.context + '/api/admin/getContacts',
  377. data:{ "uid": uid },
  378. success: function (data) {
  379. if (!data.data) {
  380. if ( data.error && data.error.length ) {
  381. message.warning(data.error[0].message);
  382. };
  383. return;
  384. };
  385. for (let item in data.data) {
  386. let theData = data.data[item];
  387. theOption.push(
  388. <Select.Option value={item} key={theData}>{theData}</Select.Option>
  389. );
  390. };
  391. }
  392. });
  393. return theOption;
  394. },
  395. //高企培育资料完成情况(比重)
  396. getProportion(uid,callback){
  397. $.ajax({
  398. method: "get",
  399. dataType: "json",
  400. crossDomain: false,
  401. url: globalConfig.context + '/api/admin/proportion',
  402. data:{ "uid": uid },
  403. success: function (data) {
  404. if (!data.data) {
  405. if ( data.error && data.error.length ) {
  406. message.warning(data.error[0].message);
  407. };
  408. data.data = {}
  409. callback(data.data);
  410. };
  411. callback(data.data);
  412. }
  413. });
  414. },
  415. //保存高企培育资料完成情况
  416. saveProportion(id,uid,sign,status){
  417. $.ajax({
  418. method: "post",
  419. dataType: "json",
  420. crossDomain: false,
  421. url: globalConfig.context + '/api/admin/confirmProportion',
  422. data:{
  423. "id": id,
  424. "uid":uid,
  425. "sign":sign,
  426. "status":status
  427. },
  428. success: function (data) {
  429. if (!data.data) {
  430. if ( data.error && data.error.length ) {
  431. message.warning(data.error[0].message);
  432. };
  433. return;
  434. };
  435. }
  436. });
  437. },
  438. //获取window.location.search传的值
  439. getSearchUrl(e){
  440. let searchURL = e;
  441. let theObj = {};
  442. searchURL = searchURL.substring(1, searchURL.length);
  443. theObj[searchURL.split("&")[0].split("=")[0]] = searchURL.split("&")[0].split("=")[1];
  444. if ( searchURL.split("&")[1] ) {
  445. theObj[searchURL.split("&")[1].split("=")[0]] = searchURL.split("&")[1].split("=")[1];
  446. if ( searchURL.split("&")[2] ) {
  447. theObj[searchURL.split("&")[2].split("=")[0]] = searchURL.split("&")[2].split("=")[1];
  448. };
  449. };
  450. return theObj;
  451. },
  452. //预览接口
  453. getPreview(id,url,sign,callback){
  454. $.ajax({
  455. method: "get",
  456. dataType: "json",
  457. crossDomain: false,
  458. url: globalConfig.context + "/api/admin/preview/" + url,
  459. data:{
  460. "id": id,
  461. "sign": sign
  462. },
  463. success: function (data) {
  464. if (!data.data) {
  465. if ( data.error && data.error.length ) {
  466. message.warning(data.error[0].message);
  467. };
  468. };
  469. callback('https://view.officeapps.live.com/op/view.aspx?src=' + encodeURIComponent(location.origin + globalConfig.context + "/open/preview?" + data.data));
  470. }
  471. });
  472. },
  473. //获取企业规模
  474. getScaleState(e) {
  475. if (e) {
  476. let theType = '';
  477. scaleList.map(function (item) {
  478. if (item.value == e) {
  479. theType = item.key;
  480. };
  481. });
  482. return theType;
  483. }
  484. },
  485. //获取企业类型
  486. getCompanyType(type1, type2) {
  487. let companyTypeList = [];
  488. for (let i = 0; i < companyType.length; i++) {
  489. companyTypeList.push({
  490. value: companyType[i].value,
  491. label: companyType[i].label
  492. });
  493. if (companyType[i].children) {
  494. for (let j = 0; j < companyType[i].children.length; j++) {
  495. companyTypeList.push({
  496. value: companyType[i].children[j].value,
  497. label: companyType[i].children[j].label
  498. });
  499. };
  500. }
  501. };
  502. companyTypeList.sort(function (a, b) {
  503. return a.value - b.value
  504. });
  505. let typeKey = "";
  506. companyTypeList.map(function (item) {
  507. if (type1 == item.value) {
  508. typeKey = item.label;
  509. };
  510. if (type2 == item.value) {
  511. typeKey = typeKey + "/" + item.label;
  512. };
  513. });
  514. return typeKey;
  515. },
  516. //获取企业行业
  517. getIndustryType(e) {
  518. if (e) {
  519. let theType = '';
  520. industryList.map(function (item) {
  521. if (item.value == e) {
  522. theType = item.key;
  523. };
  524. });
  525. return theType;
  526. }
  527. },
  528. //获取合同状态
  529. getContractType: function (e) {
  530. if (e) {
  531. let theType = '';
  532. contractTypeList.map(function (item) {
  533. if (item.value == e) {
  534. theType = item.key;
  535. };
  536. });
  537. return theType;
  538. }
  539. },
  540. //获取合同类型
  541. getContractState: function (e) {
  542. if (e) {
  543. let theType = '';
  544. contractStateList.map(function (item) {
  545. if (item.value == e) {
  546. theType = item.key;
  547. };
  548. });
  549. return theType;
  550. }
  551. },
  552. //获取需求类型
  553. getDemandType: function (e) {
  554. if (e) {
  555. let theType = '';
  556. demandTypeList.map(function (item) {
  557. if (item.value == e) {
  558. theType = item.key;
  559. };
  560. });
  561. return theType;
  562. }
  563. },
  564. //获取成果类型
  565. getAchievementCategory: function (e) {
  566. if (e) {
  567. let theType = '';
  568. achievementCategoryList.map(function (item) {
  569. if (item.value == e) {
  570. theType = item.key;
  571. };
  572. });
  573. return theType;
  574. }
  575. },
  576. //获取需求和成果审核状态
  577. getTechAuditStatus: function (e) {
  578. if (e) {
  579. let theType = '';
  580. techAuditStatusList.map(function (item) {
  581. if (item.value == e) {
  582. theType = item.key;
  583. };
  584. });
  585. return theType;
  586. }
  587. },
  588. //获取政策审核状态
  589. getauditStatus: function (e) {
  590. if (e||e>=0) {
  591. let tt=e.toString()
  592. let theType = '';
  593. auditStatusLists.map(function (item) {
  594. if (item.value == tt) {
  595. theType = item.key;
  596. };
  597. });
  598. return theType;
  599. }
  600. },
  601. //获取需求和成果审核状态
  602. getMaturity: function (e) {
  603. if (e) {
  604. let theType = '';
  605. maturityList.map(function (item) {
  606. if (item.value == e) {
  607. theType = item.key;
  608. };
  609. });
  610. return theType;
  611. }
  612. },
  613. //获取需求和成果审核状态
  614. getTransferMode: function (e) {
  615. if (e) {
  616. let theType = '';
  617. transferModeList.map(function (item) {
  618. if (item.value == e) {
  619. theType = item.key;
  620. };
  621. });
  622. return theType;
  623. }
  624. },
  625. //获取创新度状态
  626. getInnovation: function (e) {
  627. if (e) {
  628. let theType = '';
  629. innovationList.map(function (item) {
  630. if (item.value == e) {
  631. theType = item.key;
  632. };
  633. });
  634. return theType;
  635. }
  636. },
  637. //获取创新度状态
  638. getOrderStatus: function (e) {
  639. if (e) {
  640. let theType = '';
  641. orderStatusList.map(function (item) {
  642. if (item.value == e) {
  643. theType = item.key;
  644. };
  645. });
  646. return theType;
  647. }
  648. },
  649. //科技管理
  650. //活动圈后台管理
  651. getActivityType: function (e) {
  652. if (e) {
  653. let theType = '';
  654. activityType.map(function (item) {
  655. if (item.value == e) {
  656. theType = item.key;
  657. };
  658. });
  659. return theType;
  660. }
  661. },
  662. getActivityForm: function (e) {
  663. if (e) {
  664. let theType = '';
  665. activityForm.map(function (item) {
  666. if (item.value == e) {
  667. theType = item.key;
  668. };
  669. });
  670. return theType;
  671. }
  672. },
  673. //是否展示在首页
  674. gethot: function (e) {
  675. if (e) {
  676. let theType = '';
  677. hot.map(function (item) {
  678. if (item.value == e) {
  679. theType = item.key;
  680. };
  681. });
  682. return theType;
  683. }
  684. },
  685. //是否精品
  686. getboutique: function (e) {
  687. if (e) {
  688. let theType = '';
  689. boutique.map(function (item) {
  690. if (item.value == e) {
  691. theType = item.key;
  692. };
  693. });
  694. return theType;
  695. }
  696. },
  697. //客户类型
  698. getcustomerTyp: function (e) {
  699. if (e) {
  700. let theType = '';
  701. customerTyp.map(function (item) {
  702. if (item.value == e) {
  703. theType = item.key;
  704. };
  705. });
  706. return theType;
  707. }
  708. },
  709. //省份
  710. getcityArr: function (e) {
  711. if (e) {
  712. let theType = '';
  713. cityArr.map(function (item) {
  714. if (item.value == e) {
  715. theType = item.key;
  716. }
  717. });
  718. return theType;
  719. }
  720. },
  721. //客户状态
  722. getcustomerStatue: function (e) {
  723. if (e) {
  724. let theType = '';
  725. customerStatus.map(function (item) {
  726. if (item.value == e) {
  727. theType = item.key;
  728. };
  729. });
  730. return theType;
  731. }
  732. },
  733. //账户状态
  734. getStatuslist: function (e) {
  735. if (e) {
  736. let theType = '';
  737. statuslist.map(function (item) {
  738. if (item.value == e) {
  739. theType = item.key;
  740. };
  741. });
  742. return theType;
  743. }
  744. },
  745. //意向服务
  746. getCompanyIntention: function (e) {
  747. if (e) {
  748. let theType = '';
  749. intentionalService.map(function (item) {
  750. if (item.value == e) {
  751. theType = item.key;
  752. };
  753. });
  754. return theType;
  755. }
  756. },
  757. //客户标签
  758. getTag: function (e) {
  759. if (e) {
  760. let theType = '';
  761. tag.map(function (item) {
  762. if (item.value == e) {
  763. theType = item.key;
  764. };
  765. });
  766. return theType;
  767. }
  768. },
  769. //最新跟进
  770. getfllowSituation: function (e) {
  771. if (e) {
  772. let theType = '';
  773. newFollow.map(function (item) {
  774. if (item.value == e) {
  775. theType = item.key;
  776. };
  777. });
  778. return theType;
  779. }
  780. },
  781. //性别
  782. getsex: function (e) {
  783. if (e) {
  784. let theType = '';
  785. sex.map(function (item) {
  786. if (item.value == e) {
  787. theType = item.key;
  788. };
  789. });
  790. return theType;
  791. }
  792. },
  793. //联系方式
  794. getcontact: function (e) {
  795. if (e) {
  796. let theType = '';
  797. contact.map(function (item) {
  798. if (item.value == e) {
  799. theType = item.key;
  800. };
  801. });
  802. return theType;
  803. }
  804. },
  805. //是否文字与数字转换
  806. getWhether: function (e) {
  807. if (e) {
  808. let theType = '';
  809. Whether.map(function (item) {
  810. if (item.value == e) {
  811. theType = item.key;
  812. };
  813. });
  814. return theType;
  815. }
  816. },
  817. //是否实名认证
  818. getCertification: function (e) {
  819. if (e) {
  820. let theType = '';
  821. Certification.map(function (item) {
  822. if (item.value == e) {
  823. theType = item.key;
  824. };
  825. });
  826. return theType;
  827. }
  828. },
  829. //会员状态
  830. getCurrentMember: function (e) {
  831. if (e) {
  832. let theType = '';
  833. currentMember.map(function (item) {
  834. if (item.value == e) {
  835. theType = item.key;
  836. };
  837. });
  838. return theType;
  839. }
  840. },
  841. //会员等级
  842. getLvl: function (e) {
  843. if (e) {
  844. let theType = '';
  845. lvl.map(function (item) {
  846. if (item.value == e) {
  847. theType = item.key;
  848. };
  849. });
  850. return theType;
  851. }
  852. },
  853. //省份转换
  854. getprovince:function(e){
  855. let nub=parseInt(e);
  856. let theType = '';
  857. if (nub<=34) {
  858. provinceList.map(function (item) {
  859. if (item.id == nub) {
  860. theType = item.name;
  861. };
  862. });
  863. }
  864. if(nub>34&&nub<380){
  865. provinceList.map(function (item) {
  866. item.cityList.map(function (city) {
  867. if (city.id == nub) {
  868. theType = city.name;
  869. };
  870. });
  871. });
  872. }
  873. if(nub>=380){
  874. provinceList.map(function (item) {
  875. item.cityList.map(function (city) {
  876. city.areaList.map(function (areas) {
  877. if (areas.id == nub) {
  878. theType = areas.name;
  879. };
  880. });
  881. });
  882. })
  883. }
  884. return theType;
  885. },
  886. //我的业务跟进状态
  887. getStatusFollow:function(e){
  888. let theType = '';
  889. if(e){
  890. theType ='跟进中' ;
  891. }else{
  892. theType ='停止跟进';
  893. }
  894. return theType;
  895. },
  896. //我的业务跟进状态
  897. getContactType:function(e){
  898. if (e) {
  899. let theType = '';
  900. contactType.map(function (item) {
  901. if (item.value == e) {
  902. theType = item.key;
  903. };
  904. });
  905. return theType;
  906. }
  907. },
  908. //社会属性
  909. getSocialAttribute:function(e){
  910. if (e) {
  911. let theType = '';
  912. socialAttribute.map(function (item) {
  913. if (item.value == e) {
  914. theType = item.key;
  915. };
  916. });
  917. return theType;
  918. }
  919. },
  920. //行业
  921. getIndustry:function(e){
  922. if (e) {
  923. let theType = '';
  924. industry.map(function (item) {
  925. if (item.value == e) {
  926. theType = item.key;
  927. };
  928. });
  929. return theType;
  930. }
  931. },
  932. //岗位
  933. getStation:function(e){
  934. if (e) {
  935. let theType = '';
  936. station.map(function (item) {
  937. if (item.value == e) {
  938. theType = item.key;
  939. };
  940. });
  941. return theType;
  942. }
  943. },
  944. //职务
  945. getPost:function(e){
  946. if (e) {
  947. let theType = '';
  948. post.map(function (item) {
  949. if (item.value == e) {
  950. theType = item.key;
  951. };
  952. });
  953. return theType;
  954. }
  955. },
  956. //组织类型
  957. getPattern:function(e){
  958. if (e) {
  959. let theType = '';
  960. patternOrganization.map(function (item) {
  961. if (item.value == e) {
  962. theType = item.key;
  963. };
  964. });
  965. return theType;
  966. }
  967. },
  968. //组织状态
  969. getCondition:function(e){
  970. if (e) {
  971. let theType = '';
  972. conditionOrganization.map(function (item) {
  973. if (item.value == e) {
  974. theType = item.key;
  975. };
  976. });
  977. return theType;
  978. }
  979. },
  980. //品类状态
  981. getCategoryState:function(e){
  982. if (e) {
  983. let theType = '';
  984. categoryState.map(function (item) {
  985. if (item.value == e) {
  986. theType = item.key;
  987. };
  988. });
  989. return theType;
  990. }
  991. },
  992. //实名认证
  993. getAuditStatus:function(index){
  994. let e=index?index.toString():'';
  995. if (e) {
  996. let theType = '';
  997. auditStatusL.map(function (item) {
  998. if (item.value == e) {
  999. theType = item.key;
  1000. };
  1001. });
  1002. return theType;
  1003. }
  1004. },
  1005. //品类状态
  1006. getGameState:function(index){
  1007. let e=index?index.toString():'';
  1008. if (e) {
  1009. let theType = '';
  1010. gameState.map(function (item) {
  1011. if (item.value == e) {
  1012. theType = item.key;
  1013. };
  1014. });
  1015. return theType;
  1016. }
  1017. },
  1018. //消息类型
  1019. getMessageType:function(index){
  1020. let e=index?index.toString():'';
  1021. if (e) {
  1022. let theType = '';
  1023. messageType.map(function (item) {
  1024. if (item.value == e) {
  1025. theType = item.key;
  1026. };
  1027. });
  1028. return theType;
  1029. }
  1030. },
  1031. //发送目标
  1032. getDesignated:function(index){
  1033. let e=index?index.toString():'';
  1034. if (e) {
  1035. let theType = '';
  1036. designated.map(function (item) {
  1037. if (item.value == e) {
  1038. theType = item.key;
  1039. };
  1040. });
  1041. return theType;
  1042. }
  1043. },
  1044. //客户端
  1045. getClient:function(index){
  1046. let e=index?index.toString():'';
  1047. if (e) {
  1048. let theType = '';
  1049. client.map(function (item) {
  1050. if (item.value == e) {
  1051. theType = item.key;
  1052. };
  1053. });
  1054. return theType;
  1055. }
  1056. },
  1057. //是否置顶
  1058. getStick:function(index){
  1059. let e=index?index.toString():'';
  1060. if (e) {
  1061. let theType = '';
  1062. stick.map(function (item) {
  1063. if (item.value == e) {
  1064. theType = item.key;
  1065. };
  1066. });
  1067. return theType;
  1068. }
  1069. },
  1070. getFeatured:function(index){
  1071. let e=index?index.toString():'';
  1072. if (e) {
  1073. let theType = '';
  1074. featured.map(function (item) {
  1075. if (item.value == e) {
  1076. theType = item.key;
  1077. };
  1078. });
  1079. return theType;
  1080. }
  1081. },
  1082. getActives:function(e){
  1083. if (e) {
  1084. let theType = '';
  1085. actives.map(function (item) {
  1086. if (item.value == e) {
  1087. theType = item.key;
  1088. };
  1089. });
  1090. return theType;
  1091. }
  1092. },
  1093. //意向进度
  1094. getIntentProgress:function(e){
  1095. if (e) {
  1096. let theType = '';
  1097. intentProgress.map(function (item) {
  1098. if (item.value == e) {
  1099. theType = item.key;
  1100. };
  1101. });
  1102. return theType;
  1103. }
  1104. },
  1105. //交易进度
  1106. getTransactionProgress:function(e){
  1107. if (e) {
  1108. let theType = '';
  1109. transactionProgress.map(function (item) {
  1110. if (item.value == e) {
  1111. theType = item.key;
  1112. };
  1113. });
  1114. return theType;
  1115. }
  1116. },
  1117. //合同进度
  1118. getContractProgress:function(e){
  1119. if (e) {
  1120. let theType = '';
  1121. contractProgress.map(function (item) {
  1122. if (item.value == e) {
  1123. theType = item.key;
  1124. };
  1125. });
  1126. return theType;
  1127. }
  1128. },
  1129. //项目进度
  1130. getProjectProgress:function(e){
  1131. if (e) {
  1132. let theType = '';
  1133. projectProgress.map(function (item) {
  1134. if (item.value == e) {
  1135. theType = item.key;
  1136. };
  1137. });
  1138. return theType;
  1139. }
  1140. },
  1141. //订单类型
  1142. getOrderType:function(e){
  1143. if (e||e==0) {
  1144. let str=e.toString()
  1145. let theType = '';
  1146. orderType.map(function (item) {
  1147. if (item.value == str) {
  1148. theType = item.key;
  1149. };
  1150. });
  1151. return theType;
  1152. }
  1153. },
  1154. //订单阶段
  1155. getOrderStage:function(e){
  1156. if (e||e==0) {
  1157. let str=e.toString()
  1158. let theType = '';
  1159. orderStage.map(function (item) {
  1160. if (item.value == str) {
  1161. theType = item.key;
  1162. };
  1163. });
  1164. return theType;
  1165. }
  1166. },
  1167. //订单状态o
  1168. getOrderState:function(e){
  1169. if (e||e==0) {
  1170. let str=e.toString()
  1171. let theType = '';
  1172. orderState.map(function (item) {
  1173. if (item.value == str) {
  1174. theType = item.key;
  1175. };
  1176. });
  1177. return theType;
  1178. }
  1179. },
  1180. //付款状态
  1181. getPaymentState:function(e){
  1182. if (e||e==0) {
  1183. let str=e.toString()
  1184. let theType = '';
  1185. paymentState.map(function (item) {
  1186. if (item.value == str) {
  1187. theType = item.key;
  1188. };
  1189. });
  1190. return theType;
  1191. }
  1192. },
  1193. //订单渠道
  1194. getOrderChannel:function(e){
  1195. if (e||e==0) {
  1196. let str=e.toString()
  1197. let theType = '';
  1198. orderChannel.map(function (item) {
  1199. if (item.value == str) {
  1200. theType = item.key;
  1201. };
  1202. });
  1203. return theType;
  1204. }
  1205. },
  1206. //特批状态
  1207. getApprovedState:function(e){
  1208. if (e||e==0) {
  1209. let str=e.toString()
  1210. let theType = '';
  1211. approvedState.map(function (item) {
  1212. if (item.value == str) {
  1213. theType = item.key;
  1214. };
  1215. });
  1216. return theType;
  1217. }
  1218. },
  1219. //锁定或废除
  1220. getLock:function(e){
  1221. if (e||e==0) {
  1222. let str=e.toString()
  1223. let theType = '';
  1224. lock.map(function (item) {
  1225. if (item.value == str) {
  1226. theType = item.key;
  1227. };
  1228. });
  1229. return theType;
  1230. }
  1231. },
  1232. //支付方式
  1233. getPaymentMethod:function(e){
  1234. if (e||e==0) {
  1235. let str=e.toString()
  1236. let theType = '';
  1237. paymentMethod.map(function (item) {
  1238. if (item.value == str) {
  1239. theType = item.key;
  1240. };
  1241. });
  1242. return theType;
  1243. }
  1244. },
  1245. //交易渠道 transactionProject
  1246. getTransactionChannel:function(e){
  1247. if (e||e==0) {
  1248. let str=e.toString()
  1249. let theType = '';
  1250. transactionChannel.map(function (item) {
  1251. if (item.value == str) {
  1252. theType = item.key;
  1253. };
  1254. });
  1255. return theType;
  1256. }
  1257. },
  1258. //交易科目
  1259. getTransactionProject:function(e){
  1260. if (e||e==0) {
  1261. let str=e.toString()
  1262. let theType = '';
  1263. transactionProject.map(function (item) {
  1264. if (item.value == str) {
  1265. theType = item.key;
  1266. };
  1267. });
  1268. return theType;
  1269. }
  1270. },
  1271. //项目状态
  1272. getProjectState:function(e){
  1273. if (e||e==0) {
  1274. let str=e.toString()
  1275. let theType = '';
  1276. projectState.map(function (item) {
  1277. if (item.value == str) {
  1278. theType = item.key;
  1279. };
  1280. });
  1281. return theType;
  1282. }
  1283. },
  1284. }