tools.js 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401
  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. slcRedit,
  78. dataGrade
  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) {
  562. let theType = '';
  563. demandTypeList.map(function (item) {
  564. if (item.value == e) {
  565. theType = item.key;
  566. };
  567. });
  568. return theType;
  569. }
  570. },
  571. //获取成果类型
  572. getAchievementCategory: function (e) {
  573. if (e) {
  574. let theType = '';
  575. achievementCategoryList.map(function (item) {
  576. if (item.value == e) {
  577. theType = item.key;
  578. };
  579. });
  580. return theType;
  581. }
  582. },
  583. //获取需求和成果审核状态
  584. getTechAuditStatus: function (e) {
  585. if (e) {
  586. let theType = '';
  587. techAuditStatusList.map(function (item) {
  588. if (item.value == e) {
  589. theType = item.key;
  590. };
  591. });
  592. return theType;
  593. }
  594. },
  595. //获取政策审核状态
  596. getauditStatus: function (e) {
  597. if (e||e>=0) {
  598. let tt=e.toString()
  599. let theType = '';
  600. auditStatusLists.map(function (item) {
  601. if (item.value == tt) {
  602. theType = item.key;
  603. };
  604. });
  605. return theType;
  606. }
  607. },
  608. //获取需求和成果审核状态
  609. getMaturity: function (e) {
  610. if (e) {
  611. let theType = '';
  612. maturityList.map(function (item) {
  613. if (item.value == e) {
  614. theType = item.key;
  615. };
  616. });
  617. return theType;
  618. }
  619. },
  620. //获取需求和成果审核状态
  621. getTransferMode: function (e) {
  622. if (e) {
  623. let theType = '';
  624. transferModeList.map(function (item) {
  625. if (item.value == e) {
  626. theType = item.key;
  627. };
  628. });
  629. return theType;
  630. }
  631. },
  632. //获取创新度状态
  633. getInnovation: function (e) {
  634. if (e) {
  635. let theType = '';
  636. innovationList.map(function (item) {
  637. if (item.value == e) {
  638. theType = item.key;
  639. };
  640. });
  641. return theType;
  642. }
  643. },
  644. //获取创新度状态
  645. getOrderStatus: function (e) {
  646. if (e) {
  647. let theType = '';
  648. orderStatusList.map(function (item) {
  649. if (item.value == e) {
  650. theType = item.key;
  651. };
  652. });
  653. return theType;
  654. }
  655. },
  656. //科技管理
  657. //活动圈后台管理
  658. getActivityType: function (e) {
  659. if (e) {
  660. let theType = '';
  661. activityType.map(function (item) {
  662. if (item.value == e) {
  663. theType = item.key;
  664. };
  665. });
  666. return theType;
  667. }
  668. },
  669. getActivityForm: function (e) {
  670. if (e) {
  671. let theType = '';
  672. activityForm.map(function (item) {
  673. if (item.value == e) {
  674. theType = item.key;
  675. };
  676. });
  677. return theType;
  678. }
  679. },
  680. //是否展示在首页
  681. gethot: function (e) {
  682. if (e) {
  683. let theType = '';
  684. hot.map(function (item) {
  685. if (item.value == e) {
  686. theType = item.key;
  687. };
  688. });
  689. return theType;
  690. }
  691. },
  692. //是否精品
  693. getboutique: function (e) {
  694. if (e) {
  695. let theType = '';
  696. boutique.map(function (item) {
  697. if (item.value == e) {
  698. theType = item.key;
  699. };
  700. });
  701. return theType;
  702. }
  703. },
  704. //客户类型
  705. getcustomerTyp: function (e) {
  706. if (e) {
  707. let theType = '';
  708. customerTyp.map(function (item) {
  709. if (item.value == e) {
  710. theType = item.key;
  711. };
  712. });
  713. return theType;
  714. }
  715. },
  716. //省份
  717. getcityArr: function (e) {
  718. if (e) {
  719. let theType = '';
  720. cityArr.map(function (item) {
  721. if (item.value == e) {
  722. theType = item.key;
  723. }
  724. });
  725. return theType;
  726. }
  727. },
  728. //客户状态
  729. getcustomerStatue: function (e) {
  730. if (e||e==0) {
  731. let theType = '';
  732. customerStatus.map(function (item) {
  733. if (item.value == e) {
  734. theType = item.key;
  735. };
  736. });
  737. return theType;
  738. }
  739. },
  740. //账户状态
  741. getStatuslist: function (e) {
  742. if (e) {
  743. let theType = '';
  744. statuslist.map(function (item) {
  745. if (item.value == e) {
  746. theType = item.key;
  747. };
  748. });
  749. return theType;
  750. }
  751. },
  752. //意向服务
  753. getCompanyIntention: function (e) {
  754. if (e) {
  755. let theType = '';
  756. intentionalService.map(function (item) {
  757. if (item.value == e) {
  758. theType = item.key;
  759. };
  760. });
  761. return theType;
  762. }
  763. },
  764. //客户标签
  765. getTag: function (e) {
  766. if (e) {
  767. let theType = '';
  768. tag.map(function (item) {
  769. if (item.value == e) {
  770. theType = item.key;
  771. };
  772. });
  773. return theType;
  774. }
  775. },
  776. //最新跟进
  777. getfllowSituation: function (e) {
  778. if (e||e==0) {
  779. let theType = '';
  780. newFollow.map(function (item) {
  781. if (item.value == e) {
  782. theType = item.key;
  783. };
  784. });
  785. return theType;
  786. }
  787. },
  788. //性别
  789. getsex: function (e) {
  790. if (e) {
  791. let theType = '';
  792. sex.map(function (item) {
  793. if (item.value == e) {
  794. theType = item.key;
  795. };
  796. });
  797. return theType;
  798. }
  799. },
  800. //联系方式
  801. getcontact: function (e) {
  802. if (e) {
  803. let theType = '';
  804. contact.map(function (item) {
  805. if (item.value == e) {
  806. theType = item.key;
  807. };
  808. });
  809. return theType;
  810. }
  811. },
  812. //是否文字与数字转换
  813. getWhether: function (e) {
  814. if (e) {
  815. let theType = '';
  816. Whether.map(function (item) {
  817. if (item.value == e) {
  818. theType = item.key;
  819. };
  820. });
  821. return theType;
  822. }
  823. },
  824. //是否实名认证
  825. getCertification: function (e) {
  826. if (e) {
  827. let theType = '';
  828. Certification.map(function (item) {
  829. if (item.value == e) {
  830. theType = item.key;
  831. };
  832. });
  833. return theType;
  834. }
  835. },
  836. //会员状态
  837. getCurrentMember: function (e) {
  838. if (e) {
  839. let theType = '';
  840. currentMember.map(function (item) {
  841. if (item.value == e) {
  842. theType = item.key;
  843. };
  844. });
  845. return theType;
  846. }
  847. },
  848. //会员等级
  849. getLvl: function (e) {
  850. if (e) {
  851. let theType = '';
  852. lvl.map(function (item) {
  853. if (item.value == e) {
  854. theType = item.key;
  855. };
  856. });
  857. return theType;
  858. }
  859. },
  860. //省份转换
  861. getprovince:function(e){
  862. let nub=parseInt(e);
  863. let theType = '';
  864. if (nub<=34) {
  865. provinceList.map(function (item) {
  866. if (item.id == nub) {
  867. theType = item.name;
  868. };
  869. });
  870. }
  871. if(nub>34&&nub<380){
  872. provinceList.map(function (item) {
  873. item.cityList.map(function (city) {
  874. if (city.id == nub) {
  875. theType = city.name;
  876. };
  877. });
  878. });
  879. }
  880. if(nub>=380){
  881. provinceList.map(function (item) {
  882. item.cityList.map(function (city) {
  883. city.areaList.map(function (areas) {
  884. if (areas.id == nub) {
  885. theType = areas.name;
  886. };
  887. });
  888. });
  889. })
  890. }
  891. return theType;
  892. },
  893. //我的业务跟进状态
  894. getStatusFollow:function(e){
  895. let theType = '';
  896. if(e){
  897. theType ='跟进中' ;
  898. }else{
  899. theType ='停止跟进';
  900. }
  901. return theType;
  902. },
  903. //我的业务跟进状态
  904. getContactType:function(e){
  905. if (e) {
  906. let theType = '';
  907. contactType.map(function (item) {
  908. if (item.value == e) {
  909. theType = item.key;
  910. };
  911. });
  912. return theType;
  913. }
  914. },
  915. //社会属性
  916. getSocialAttribute:function(e){
  917. if (e) {
  918. let theType = '';
  919. socialAttribute.map(function (item) {
  920. if (item.value == e) {
  921. theType = item.key;
  922. };
  923. });
  924. return theType;
  925. }
  926. },
  927. //行业
  928. getIndustry:function(e){
  929. if (e) {
  930. let theType = '';
  931. industry.map(function (item) {
  932. if (item.value == e) {
  933. theType = item.key;
  934. };
  935. });
  936. return theType;
  937. }
  938. },
  939. //岗位
  940. getStation:function(e){
  941. if (e) {
  942. let theType = '';
  943. station.map(function (item) {
  944. if (item.value == e) {
  945. theType = item.key;
  946. };
  947. });
  948. return theType;
  949. }
  950. },
  951. //职务
  952. getPost:function(e){
  953. if (e) {
  954. let theType = '';
  955. post.map(function (item) {
  956. if (item.value == e) {
  957. theType = item.key;
  958. };
  959. });
  960. return theType;
  961. }
  962. },
  963. //组织类型
  964. getPattern:function(e){
  965. if (e) {
  966. let theType = '';
  967. patternOrganization.map(function (item) {
  968. if (item.value == e) {
  969. theType = item.key;
  970. };
  971. });
  972. return theType;
  973. }
  974. },
  975. //组织状态
  976. getCondition:function(e){
  977. if (e) {
  978. let theType = '';
  979. conditionOrganization.map(function (item) {
  980. if (item.value == e) {
  981. theType = item.key;
  982. };
  983. });
  984. return theType;
  985. }
  986. },
  987. //品类状态
  988. getCategoryState:function(e){
  989. if (e) {
  990. let theType = '';
  991. categoryState.map(function (item) {
  992. if (item.value == e) {
  993. theType = item.key;
  994. };
  995. });
  996. return theType;
  997. }
  998. },
  999. //实名认证
  1000. getAuditStatus:function(index){
  1001. let e=index?index.toString():'';
  1002. if (e) {
  1003. let theType = '';
  1004. auditStatusL.map(function (item) {
  1005. if (item.value == e) {
  1006. theType = item.key;
  1007. };
  1008. });
  1009. return theType;
  1010. }
  1011. },
  1012. //品类状态
  1013. getGameState:function(index){
  1014. let e=index?index.toString():'';
  1015. if (e) {
  1016. let theType = '';
  1017. gameState.map(function (item) {
  1018. if (item.value == e) {
  1019. theType = item.key;
  1020. };
  1021. });
  1022. return theType;
  1023. }
  1024. },
  1025. //消息类型
  1026. getMessageType:function(index){
  1027. let e=index?index.toString():'';
  1028. if (e) {
  1029. let theType = '';
  1030. messageType.map(function (item) {
  1031. if (item.value == e) {
  1032. theType = item.key;
  1033. };
  1034. });
  1035. return theType;
  1036. }
  1037. },
  1038. //发送目标
  1039. getDesignated:function(index){
  1040. let e=index?index.toString():'';
  1041. if (e) {
  1042. let theType = '';
  1043. designated.map(function (item) {
  1044. if (item.value == e) {
  1045. theType = item.key;
  1046. };
  1047. });
  1048. return theType;
  1049. }
  1050. },
  1051. //客户端
  1052. getClient:function(index){
  1053. let e=index?index.toString():'';
  1054. if (e) {
  1055. let theType = '';
  1056. client.map(function (item) {
  1057. if (item.value == e) {
  1058. theType = item.key;
  1059. };
  1060. });
  1061. return theType;
  1062. }
  1063. },
  1064. //是否置顶
  1065. getStick:function(index){
  1066. let e=index?index.toString():'';
  1067. if (e) {
  1068. let theType = '';
  1069. stick.map(function (item) {
  1070. if (item.value == e) {
  1071. theType = item.key;
  1072. };
  1073. });
  1074. return theType;
  1075. }
  1076. },
  1077. getFeatured:function(index){
  1078. let e=index?index.toString():'';
  1079. if (e) {
  1080. let theType = '';
  1081. featured.map(function (item) {
  1082. if (item.value == e) {
  1083. theType = item.key;
  1084. };
  1085. });
  1086. return theType;
  1087. }
  1088. },
  1089. getActives:function(e){
  1090. if (e) {
  1091. let theType = '';
  1092. actives.map(function (item) {
  1093. if (item.value == e) {
  1094. theType = item.key;
  1095. };
  1096. });
  1097. return theType;
  1098. }
  1099. },
  1100. //意向进度
  1101. getIntentProgress:function(e){
  1102. if (e) {
  1103. let theType = '';
  1104. intentProgress.map(function (item) {
  1105. if (item.value == e) {
  1106. theType = item.key;
  1107. };
  1108. });
  1109. return theType;
  1110. }
  1111. },
  1112. //交易进度
  1113. getTransactionProgress:function(e){
  1114. if (e) {
  1115. let theType = '';
  1116. transactionProgress.map(function (item) {
  1117. if (item.value == e) {
  1118. theType = item.key;
  1119. };
  1120. });
  1121. return theType;
  1122. }
  1123. },
  1124. //合同进度
  1125. getContractProgress:function(e){
  1126. if (e) {
  1127. let theType = '';
  1128. contractProgress.map(function (item) {
  1129. if (item.value == e) {
  1130. theType = item.key;
  1131. };
  1132. });
  1133. return theType;
  1134. }
  1135. },
  1136. //项目进度
  1137. getProjectProgress:function(e){
  1138. if (e) {
  1139. let theType = '';
  1140. projectProgress.map(function (item) {
  1141. if (item.value == e) {
  1142. theType = item.key;
  1143. };
  1144. });
  1145. return theType;
  1146. }
  1147. },
  1148. //订单类型
  1149. getOrderType:function(e){
  1150. if (e||e==0) {
  1151. let str=e.toString()
  1152. let theType = '';
  1153. orderType.map(function (item) {
  1154. if (item.value == str) {
  1155. theType = item.key;
  1156. };
  1157. });
  1158. return theType;
  1159. }
  1160. },
  1161. //订单阶段
  1162. getOrderStage:function(e){
  1163. if (e||e==0) {
  1164. let str=e.toString()
  1165. let theType = '';
  1166. orderStage.map(function (item) {
  1167. if (item.value == str) {
  1168. theType = item.key;
  1169. };
  1170. });
  1171. return theType;
  1172. }
  1173. },
  1174. //订单状态o
  1175. getOrderState:function(e){
  1176. if (e||e==0) {
  1177. let str=e.toString()
  1178. let theType = '';
  1179. orderState.map(function (item) {
  1180. if (item.value == str) {
  1181. theType = item.key;
  1182. };
  1183. });
  1184. return theType;
  1185. }
  1186. },
  1187. //付款状态
  1188. getPaymentState:function(e){
  1189. if (e||e==0) {
  1190. let str=e.toString()
  1191. let theType = '';
  1192. paymentState.map(function (item) {
  1193. if (item.value == str) {
  1194. theType = item.key;
  1195. };
  1196. });
  1197. return theType;
  1198. }
  1199. },
  1200. //订单渠道
  1201. getOrderChannel:function(e){
  1202. if (e||e==0) {
  1203. let str=e.toString()
  1204. let theType = '';
  1205. orderChannel.map(function (item) {
  1206. if (item.value == str) {
  1207. theType = item.key;
  1208. };
  1209. });
  1210. return theType;
  1211. }
  1212. },
  1213. //特批状态
  1214. getApprovedState:function(e){
  1215. if (e||e==0) {
  1216. let str=e.toString()
  1217. let theType = '';
  1218. approvedState.map(function (item) {
  1219. if (item.value == str) {
  1220. theType = item.key;
  1221. };
  1222. });
  1223. return theType;
  1224. }
  1225. },
  1226. //锁定或废除
  1227. getLock:function(e){
  1228. if (e||e==0) {
  1229. let str=e.toString()
  1230. let theType = '';
  1231. lock.map(function (item) {
  1232. if (item.value == str) {
  1233. theType = item.key;
  1234. };
  1235. });
  1236. return theType;
  1237. }
  1238. },
  1239. //支付方式
  1240. getPaymentMethod:function(e){
  1241. if (e||e==0) {
  1242. let str=e.toString()
  1243. let theType = '';
  1244. paymentMethod.map(function (item) {
  1245. if (item.value == str) {
  1246. theType = item.key;
  1247. };
  1248. });
  1249. return theType;
  1250. }
  1251. },
  1252. //交易渠道 transactionProject
  1253. getTransactionChannel:function(e){
  1254. if (e||e==0) {
  1255. let str=e.toString()
  1256. let theType = '';
  1257. transactionChannel.map(function (item) {
  1258. if (item.value == str) {
  1259. theType = item.key;
  1260. };
  1261. });
  1262. return theType;
  1263. }
  1264. },
  1265. //交易科目
  1266. getTransactionProject:function(e){
  1267. if (e||e==0) {
  1268. let str=e.toString()
  1269. let theType = '';
  1270. transactionProject.map(function (item) {
  1271. if (item.value == str) {
  1272. theType = item.key;
  1273. };
  1274. });
  1275. return theType;
  1276. }
  1277. },
  1278. //项目状态
  1279. getProjectState:function(e){
  1280. if (e||e==0) {
  1281. let str=e.toString()
  1282. let theType = '';
  1283. projectState.map(function (item) {
  1284. if (item.value == str) {
  1285. theType = item.key;
  1286. };
  1287. });
  1288. return theType;
  1289. }
  1290. },
  1291. //任务状态
  1292. getTaskStatus:function(e){
  1293. if (e||e==0) {
  1294. let str=e.toString()
  1295. let theType = '';
  1296. taskStatus.map(function (item) {
  1297. if (item.value == str) {
  1298. theType = item.key;
  1299. };
  1300. });
  1301. return theType;
  1302. }
  1303. },
  1304. //公示状态
  1305. getPublishStatus:function(e){
  1306. if (e||e==0) {
  1307. let str=e.toString()
  1308. let theType = '';
  1309. publishStatus.map(function (item) {
  1310. if (item.value == str) {
  1311. theType = item.key;
  1312. };
  1313. });
  1314. return theType;
  1315. }
  1316. },
  1317. //变更状态
  1318. getChangeState:function(e){
  1319. if (e||e==0) {
  1320. let str=e.toString()
  1321. let theType = '';
  1322. changeState.map(function (item) {
  1323. if (item.value == str) {
  1324. theType = item.key;
  1325. };
  1326. });
  1327. return theType;
  1328. }
  1329. },
  1330. //分派情况
  1331. getDistributeState:function(e){
  1332. if (e||e==0) {
  1333. let str=e.toString()
  1334. let theType = '';
  1335. distributeState.map(function (item) {
  1336. if (item.value == str) {
  1337. theType = item.key;
  1338. };
  1339. });
  1340. return theType;
  1341. }
  1342. },
  1343. //客户来源
  1344. getCustomerSource:function(e){
  1345. if (e||e==0) {
  1346. let str=e.toString()
  1347. let theType = '';
  1348. customerSource.map(function (item) {
  1349. if (item.value == str) {
  1350. theType = item.key;
  1351. };
  1352. });
  1353. return theType;
  1354. }
  1355. },
  1356. //客户来源
  1357. getSlcRedit:function(e){
  1358. if (e||e==0) {
  1359. let str=e.toString()
  1360. let theType = '';
  1361. slcRedit.map(function (item) {
  1362. if (item.value == str) {
  1363. theType = item.key;
  1364. };
  1365. });
  1366. return theType;
  1367. }
  1368. },
  1369. //客户来源
  1370. getDataGrade:function(e){
  1371. if (e||e==0) {
  1372. let str=e.toString()
  1373. let theType = '';
  1374. dataGrade.map(function (item) {
  1375. if (item.value == str) {
  1376. theType = item.key;
  1377. };
  1378. });
  1379. return theType;
  1380. }
  1381. }
  1382. }