tools.js 37 KB

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