tools.js 34 KB

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