tools.js 36 KB

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