tools.js 41 KB

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