tools.js 44 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642
  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. level,
  80. xiangmoState,
  81. newOrderStatus,refundStatus,approval,projectStatus,processStatus,liquidationStatus,newOrderType,paymentType
  82. ,jsyPaymentType,
  83. customerType,
  84. orderTypes,
  85. bonusState,
  86. jiedian
  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. console.log('https://view.officeapps.live.com/op/view.aspx?src=' + (location.origin + globalConfig.context + "/open/preview?" + data.data));
  486. console.log('https://view.officeapps.live.com/op/view.aspx?src=' + encodeURIComponent(location.origin + globalConfig.context + "/open/preview?" + data.data));
  487. }
  488. });
  489. },
  490. //预览接口
  491. getPreviews(id,url,sign,callback){
  492. $.ajax({
  493. method: "get",
  494. dataType: "json",
  495. crossDomain: false,
  496. url: globalConfig.context + "/api/admin/customer/" + url,
  497. data:{
  498. "id": id,
  499. "sign": sign
  500. },
  501. success: function (data) {
  502. if (!data.data) {
  503. if ( data.error && data.error.length ) {
  504. message.warning(data.error[0].message);
  505. };
  506. };
  507. callback('https://view.officeapps.live.com/op/view.aspx?src=' + encodeURIComponent(location.origin + globalConfig.context + "/open/preview?" + data.data));
  508. console.log('https://view.officeapps.live.com/op/view.aspx?src=' + (location.origin + globalConfig.context + "/open/preview?" + data.data));
  509. console.log('https://view.officeapps.live.com/op/view.aspx?src=' + encodeURIComponent(location.origin + globalConfig.context + "/open/preview?" + data.data));
  510. }
  511. });
  512. },
  513. //获取企业规模
  514. getScaleState(e) {
  515. if (e) {
  516. let theType = '';
  517. scaleList.map(function (item) {
  518. if (item.value == e) {
  519. theType = item.key;
  520. };
  521. });
  522. return theType;
  523. }
  524. },
  525. //获取企业类型
  526. getCompanyType(type1, type2) {
  527. let companyTypeList = [];
  528. for (let i = 0; i < companyType.length; i++) {
  529. companyTypeList.push({
  530. value: companyType[i].value,
  531. label: companyType[i].label
  532. });
  533. if (companyType[i].children) {
  534. for (let j = 0; j < companyType[i].children.length; j++) {
  535. companyTypeList.push({
  536. value: companyType[i].children[j].value,
  537. label: companyType[i].children[j].label
  538. });
  539. };
  540. }
  541. };
  542. companyTypeList.sort(function (a, b) {
  543. return a.value - b.value
  544. });
  545. let typeKey = "";
  546. companyTypeList.map(function (item) {
  547. if (type1 == item.value) {
  548. typeKey = item.label;
  549. };
  550. if (type2 == item.value) {
  551. typeKey = typeKey + "/" + item.label;
  552. };
  553. });
  554. return typeKey;
  555. },
  556. //获取企业行业
  557. getIndustryType(e) {
  558. if (e) {
  559. let theType = '';
  560. industryList.map(function (item) {
  561. if (item.value == e) {
  562. theType = item.key;
  563. };
  564. });
  565. return theType;
  566. }
  567. },
  568. //获取合同状态
  569. getContractType: function (e) {
  570. if (e) {
  571. let theType = '';
  572. contractTypeList.map(function (item) {
  573. if (item.value == e) {
  574. theType = item.key;
  575. };
  576. });
  577. return theType;
  578. }
  579. },
  580. //获取合同类型
  581. getContractState: function (e) {
  582. if (e) {
  583. let theType = '';
  584. contractStateList.map(function (item) {
  585. if (item.value == e) {
  586. theType = item.key;
  587. };
  588. });
  589. return theType;
  590. }
  591. },
  592. //获取需求类型
  593. getDemandType: function (e) {
  594. if (e) {
  595. let theType = '';
  596. demandTypeList.map(function (item) {
  597. if (item.value == e) {
  598. theType = item.key;
  599. };
  600. });
  601. return theType;
  602. }
  603. },
  604. //获取成果类型
  605. getAchievementCategory: function (e) {
  606. if (e) {
  607. let theType = '';
  608. achievementCategoryList.map(function (item) {
  609. if (item.value == e) {
  610. theType = item.key;
  611. };
  612. });
  613. return theType;
  614. }
  615. },
  616. //获取需求和成果审核状态
  617. getTechAuditStatus: function (e) {
  618. if (e) {
  619. let theType = '';
  620. techAuditStatusList.map(function (item) {
  621. if (item.value == e) {
  622. theType = item.key;
  623. };
  624. });
  625. return theType;
  626. }
  627. },
  628. //获取政策审核状态
  629. getauditStatus: function (e) {
  630. if (e||e>=0) {
  631. let tt=e.toString()
  632. let theType = '';
  633. auditStatusLists.map(function (item) {
  634. if (item.value == tt) {
  635. theType = item.key;
  636. };
  637. });
  638. return theType;
  639. }
  640. },
  641. //获取需求和成果审核状态
  642. getMaturity: function (e) {
  643. if (e) {
  644. let theType = '';
  645. maturityList.map(function (item) {
  646. if (item.value == e) {
  647. theType = item.key;
  648. };
  649. });
  650. return theType;
  651. }
  652. },
  653. //获取需求和成果审核状态
  654. getTransferMode: function (e) {
  655. if (e) {
  656. let theType = '';
  657. transferModeList.map(function (item) {
  658. if (item.value == e) {
  659. theType = item.key;
  660. };
  661. });
  662. return theType;
  663. }
  664. },
  665. //获取创新度状态
  666. getInnovation: function (e) {
  667. if (e) {
  668. let theType = '';
  669. innovationList.map(function (item) {
  670. if (item.value == e) {
  671. theType = item.key;
  672. };
  673. });
  674. return theType;
  675. }
  676. },
  677. //获取创新度状态
  678. getOrderStatus: function (e) {
  679. if (e) {
  680. let theType = '';
  681. orderStatusList.map(function (item) {
  682. if (item.value == e) {
  683. theType = item.key;
  684. };
  685. });
  686. return theType;
  687. }
  688. },
  689. //科技管理
  690. //活动圈后台管理
  691. getActivityType: function (e) {
  692. if (e) {
  693. let theType = '';
  694. activityType.map(function (item) {
  695. if (item.value == e) {
  696. theType = item.key;
  697. };
  698. });
  699. return theType;
  700. }
  701. },
  702. getActivityForm: function (e) {
  703. if (e) {
  704. let theType = '';
  705. activityForm.map(function (item) {
  706. if (item.value == e) {
  707. theType = item.key;
  708. };
  709. });
  710. return theType;
  711. }
  712. },
  713. //是否展示在首页
  714. gethot: function (e) {
  715. if (e) {
  716. let theType = '';
  717. hot.map(function (item) {
  718. if (item.value == e) {
  719. theType = item.key;
  720. };
  721. });
  722. return theType;
  723. }
  724. },
  725. //是否精品
  726. getboutique: function (e) {
  727. if (e) {
  728. let theType = '';
  729. boutique.map(function (item) {
  730. if (item.value == e) {
  731. theType = item.key;
  732. };
  733. });
  734. return theType;
  735. }
  736. },
  737. //客户类型
  738. getcustomerTyp: function (e) {
  739. if (e) {
  740. let theType = '';
  741. customerTyp.map(function (item) {
  742. if (item.value == e) {
  743. theType = item.key;
  744. };
  745. });
  746. return theType;
  747. }
  748. },
  749. //省份
  750. getcityArr: function (e) {
  751. if (e) {
  752. let theType = '';
  753. cityArr.map(function (item) {
  754. if (item.value == e) {
  755. theType = item.key;
  756. }
  757. });
  758. return theType;
  759. }
  760. },
  761. //客户状态
  762. getcustomerStatue: function (e) {
  763. if (e||e==0) {
  764. let theType = '';
  765. customerStatus.map(function (item) {
  766. if (item.value == e) {
  767. theType = item.key;
  768. };
  769. });
  770. return theType;
  771. }
  772. },
  773. //账户状态
  774. getStatuslist: function (e) {
  775. if (e) {
  776. let theType = '';
  777. statuslist.map(function (item) {
  778. if (item.value == e) {
  779. theType = item.key;
  780. };
  781. });
  782. return theType;
  783. }
  784. },
  785. //意向服务
  786. getCompanyIntention: function (e) {
  787. if (e) {
  788. let theType = '';
  789. intentionalService.map(function (item) {
  790. if (item.value == e) {
  791. theType = item.key;
  792. };
  793. });
  794. return theType;
  795. }
  796. },
  797. //客户标签
  798. getTag: function (e) {
  799. if (e) {
  800. let theType = '';
  801. tag.map(function (item) {
  802. if (item.value == e) {
  803. theType = item.key;
  804. };
  805. });
  806. return theType;
  807. }
  808. },
  809. //最新跟进
  810. getfllowSituation: function (e) {
  811. if (e||e==0) {
  812. let theType = '';
  813. newFollow.map(function (item) {
  814. if (item.value == e) {
  815. theType = item.key;
  816. };
  817. });
  818. return theType;
  819. }
  820. },
  821. //性别
  822. getsex: function (e) {
  823. if (e) {
  824. let theType = '';
  825. sex.map(function (item) {
  826. if (item.value == e) {
  827. theType = item.key;
  828. };
  829. });
  830. return theType;
  831. }
  832. },
  833. //联系方式
  834. getcontact: function (e) {
  835. if (e) {
  836. let theType = '';
  837. contact.map(function (item) {
  838. if (item.value == e) {
  839. theType = item.key;
  840. };
  841. });
  842. return theType;
  843. }
  844. },
  845. //是否文字与数字转换
  846. getWhether: function (e) {
  847. if (e) {
  848. let theType = '';
  849. Whether.map(function (item) {
  850. if (item.value == e) {
  851. theType = item.key;
  852. };
  853. });
  854. return theType;
  855. }
  856. },
  857. //是否实名认证
  858. getCertification: function (e) {
  859. if (e) {
  860. let theType = '';
  861. Certification.map(function (item) {
  862. if (item.value == e) {
  863. theType = item.key;
  864. };
  865. });
  866. return theType;
  867. }
  868. },
  869. //会员状态
  870. getCurrentMember: function (e) {
  871. if (e) {
  872. let theType = '';
  873. currentMember.map(function (item) {
  874. if (item.value == e) {
  875. theType = item.key;
  876. };
  877. });
  878. return theType;
  879. }
  880. },
  881. //会员等级
  882. getLvl: function (e) {
  883. if (e) {
  884. let theType = '';
  885. lvl.map(function (item) {
  886. if (item.value == e) {
  887. theType = item.key;
  888. };
  889. });
  890. return theType;
  891. }
  892. },
  893. //省份转换
  894. getprovince:function(e){
  895. let nub=parseInt(e);
  896. let theType = '';
  897. if (nub<=34) {
  898. provinceList.map(function (item) {
  899. if (item.id == nub) {
  900. theType = item.name;
  901. };
  902. });
  903. }
  904. if(nub>34&&nub<380){
  905. provinceList.map(function (item) {
  906. item.cityList.map(function (city) {
  907. if (city.id == nub) {
  908. theType = city.name;
  909. };
  910. });
  911. });
  912. }
  913. if(nub>=380){
  914. provinceList.map(function (item) {
  915. item.cityList.map(function (city) {
  916. city.areaList.map(function (areas) {
  917. if (areas.id == nub) {
  918. theType = areas.name;
  919. };
  920. });
  921. });
  922. })
  923. }
  924. return theType;
  925. },
  926. //我的业务跟进状态
  927. getStatusFollow:function(e){
  928. let theType = '';
  929. if(e){
  930. theType ='跟进中' ;
  931. }else{
  932. theType ='停止跟进';
  933. }
  934. return theType;
  935. },
  936. //我的业务跟进状态
  937. getContactType:function(e){
  938. if (e) {
  939. let theType = '';
  940. contactType.map(function (item) {
  941. if (item.value == e) {
  942. theType = item.key;
  943. };
  944. });
  945. return theType;
  946. }
  947. },
  948. //社会属性
  949. getSocialAttribute:function(e){
  950. if (e) {
  951. let theType = '';
  952. socialAttribute.map(function (item) {
  953. if (item.value == e) {
  954. theType = item.key;
  955. };
  956. });
  957. return theType;
  958. }
  959. },
  960. //行业
  961. getIndustry:function(e){
  962. if (e) {
  963. let theType = '';
  964. industry.map(function (item) {
  965. if (item.value == e) {
  966. theType = item.key;
  967. };
  968. });
  969. return theType;
  970. }
  971. },
  972. //岗位
  973. getStation:function(e){
  974. if (e) {
  975. let theType = '';
  976. station.map(function (item) {
  977. if (item.value == e) {
  978. theType = item.key;
  979. };
  980. });
  981. return theType;
  982. }
  983. },
  984. //职务
  985. getPost:function(e){
  986. if (e) {
  987. let theType = '';
  988. post.map(function (item) {
  989. if (item.value == e) {
  990. theType = item.key;
  991. };
  992. });
  993. return theType;
  994. }
  995. },
  996. //组织类型
  997. getPattern:function(e){
  998. if (e) {
  999. let theType = '';
  1000. patternOrganization.map(function (item) {
  1001. if (item.value == e) {
  1002. theType = item.key;
  1003. };
  1004. });
  1005. return theType;
  1006. }
  1007. },
  1008. //组织状态
  1009. getCondition:function(e){
  1010. if (e) {
  1011. let theType = '';
  1012. conditionOrganization.map(function (item) {
  1013. if (item.value == e) {
  1014. theType = item.key;
  1015. };
  1016. });
  1017. return theType;
  1018. }
  1019. },
  1020. //品类状态
  1021. getCategoryState:function(e){
  1022. if (e) {
  1023. let theType = '';
  1024. categoryState.map(function (item) {
  1025. if (item.value == e) {
  1026. theType = item.key;
  1027. };
  1028. });
  1029. return theType;
  1030. }
  1031. },
  1032. //实名认证
  1033. getAuditStatus:function(index){
  1034. let e=index?index.toString():'';
  1035. if (e) {
  1036. let theType = '';
  1037. auditStatusL.map(function (item) {
  1038. if (item.value == e) {
  1039. theType = item.key;
  1040. };
  1041. });
  1042. return theType;
  1043. }
  1044. },
  1045. //品类状态
  1046. getGameState:function(index){
  1047. let e=index?index.toString():'';
  1048. if (e) {
  1049. let theType = '';
  1050. gameState.map(function (item) {
  1051. if (item.value == e) {
  1052. theType = item.key;
  1053. };
  1054. });
  1055. return theType;
  1056. }
  1057. },
  1058. //消息类型
  1059. getMessageType:function(index){
  1060. let e=index?index.toString():'';
  1061. if (e) {
  1062. let theType = '';
  1063. messageType.map(function (item) {
  1064. if (item.value == e) {
  1065. theType = item.key;
  1066. };
  1067. });
  1068. return theType;
  1069. }
  1070. },
  1071. //发送目标
  1072. getDesignated:function(index){
  1073. let e=index?index.toString():'';
  1074. if (e) {
  1075. let theType = '';
  1076. designated.map(function (item) {
  1077. if (item.value == e) {
  1078. theType = item.key;
  1079. };
  1080. });
  1081. return theType;
  1082. }
  1083. },
  1084. //客户端
  1085. getClient:function(index){
  1086. let e=index?index.toString():'';
  1087. if (e) {
  1088. let theType = '';
  1089. client.map(function (item) {
  1090. if (item.value == e) {
  1091. theType = item.key;
  1092. };
  1093. });
  1094. return theType;
  1095. }
  1096. },
  1097. //是否置顶
  1098. getStick:function(index){
  1099. let e=index?index.toString():'';
  1100. if (e) {
  1101. let theType = '';
  1102. stick.map(function (item) {
  1103. if (item.value == e) {
  1104. theType = item.key;
  1105. };
  1106. });
  1107. return theType;
  1108. }
  1109. },
  1110. getFeatured:function(index){
  1111. let e=index?index.toString():'';
  1112. if (e) {
  1113. let theType = '';
  1114. featured.map(function (item) {
  1115. if (item.value == e) {
  1116. theType = item.key;
  1117. };
  1118. });
  1119. return theType;
  1120. }
  1121. },
  1122. getActives:function(e){
  1123. if (e) {
  1124. let theType = '';
  1125. actives.map(function (item) {
  1126. if (item.value == e) {
  1127. theType = item.key;
  1128. };
  1129. });
  1130. return theType;
  1131. }
  1132. },
  1133. //意向进度
  1134. getIntentProgress:function(e){
  1135. if (e) {
  1136. let theType = '';
  1137. intentProgress.map(function (item) {
  1138. if (item.value == e) {
  1139. theType = item.key;
  1140. };
  1141. });
  1142. return theType;
  1143. }
  1144. },
  1145. //交易进度
  1146. getTransactionProgress:function(e){
  1147. if (e) {
  1148. let theType = '';
  1149. transactionProgress.map(function (item) {
  1150. if (item.value == e) {
  1151. theType = item.key;
  1152. };
  1153. });
  1154. return theType;
  1155. }
  1156. },
  1157. //合同进度
  1158. getContractProgress:function(e){
  1159. if (e) {
  1160. let theType = '';
  1161. contractProgress.map(function (item) {
  1162. if (item.value == e) {
  1163. theType = item.key;
  1164. };
  1165. });
  1166. return theType;
  1167. }
  1168. },
  1169. //项目进度
  1170. getProjectProgress:function(e){
  1171. if (e) {
  1172. let theType = '';
  1173. projectProgress.map(function (item) {
  1174. if (item.value == e) {
  1175. theType = item.key;
  1176. };
  1177. });
  1178. return theType;
  1179. }
  1180. },
  1181. //订单类型
  1182. getOrderType:function(e){
  1183. if (e||e==0) {
  1184. let str=e.toString()
  1185. let theType = '';
  1186. orderType.map(function (item) {
  1187. if (item.value == str) {
  1188. theType = item.key;
  1189. };
  1190. });
  1191. return theType;
  1192. }
  1193. },
  1194. //订单阶段
  1195. getOrderStage:function(e){
  1196. if (e||e==0) {
  1197. let str=e.toString()
  1198. let theType = '';
  1199. orderStage.map(function (item) {
  1200. if (item.value == str) {
  1201. theType = item.key;
  1202. };
  1203. });
  1204. return theType;
  1205. }
  1206. },
  1207. //订单状态o
  1208. getOrderState:function(e){
  1209. if (e||e==0) {
  1210. let str=e.toString()
  1211. let theType = '';
  1212. orderState.map(function (item) {
  1213. if (item.value == str) {
  1214. theType = item.key;
  1215. };
  1216. });
  1217. return theType;
  1218. }
  1219. },
  1220. //付款状态
  1221. getPaymentState:function(e){
  1222. if (e||e==0) {
  1223. let str=e.toString()
  1224. let theType = '';
  1225. paymentState.map(function (item) {
  1226. if (item.value == str) {
  1227. theType = item.key;
  1228. };
  1229. });
  1230. return theType;
  1231. }
  1232. },
  1233. //订单渠道
  1234. getOrderChannel:function(e){
  1235. if (e||e==0) {
  1236. let str=e.toString()
  1237. let theType = '';
  1238. orderChannel.map(function (item) {
  1239. if (item.value == str) {
  1240. theType = item.key;
  1241. };
  1242. });
  1243. return theType;
  1244. }
  1245. },
  1246. //特批状态
  1247. getApprovedState:function(e){
  1248. if (e||e==0) {
  1249. let str=e.toString()
  1250. let theType = '';
  1251. approvedState.map(function (item) {
  1252. if (item.value == str) {
  1253. theType = item.key;
  1254. };
  1255. });
  1256. return theType;
  1257. }
  1258. },
  1259. //锁定或废除
  1260. getLock:function(e){
  1261. if (e||e==0) {
  1262. let str=e.toString()
  1263. let theType = '';
  1264. lock.map(function (item) {
  1265. if (item.value == str) {
  1266. theType = item.key;
  1267. };
  1268. });
  1269. return theType;
  1270. }
  1271. },
  1272. //支付方式
  1273. getPaymentMethod:function(e){
  1274. if (e||e==0) {
  1275. let str=e.toString()
  1276. let theType = '';
  1277. paymentMethod.map(function (item) {
  1278. if (item.value == str) {
  1279. theType = item.key;
  1280. };
  1281. });
  1282. return theType;
  1283. }
  1284. },
  1285. //交易渠道
  1286. getTransactionChannel:function(e){
  1287. if (e||e==0) {
  1288. let str=e.toString()
  1289. let theType = '';
  1290. transactionChannel.map(function (item) {
  1291. if (item.value == str) {
  1292. theType = item.key;
  1293. };
  1294. });
  1295. return theType;
  1296. }
  1297. },
  1298. //交易科目
  1299. getTransactionProject:function(e){
  1300. if (e||e==0) {
  1301. let str=e.toString()
  1302. let theType = '';
  1303. transactionProject.map(function (item) {
  1304. if (item.value == str) {
  1305. theType = item.key;
  1306. };
  1307. });
  1308. return theType;
  1309. }
  1310. },
  1311. //项目状态
  1312. getProjectState:function(e){
  1313. if (e||e==0) {
  1314. let str=e.toString()
  1315. let theType = '';
  1316. projectState.map(function (item) {
  1317. if (item.value == str) {
  1318. theType = item.key;
  1319. };
  1320. });
  1321. return theType;
  1322. }
  1323. },
  1324. //任务状态
  1325. getTaskStatus:function(e){
  1326. if (e||e==0) {
  1327. let str=e.toString()
  1328. let theType = '';
  1329. taskStatus.map(function (item) {
  1330. if (item.value == str) {
  1331. theType = item.key;
  1332. };
  1333. });
  1334. return theType;
  1335. }
  1336. },
  1337. //公示状态
  1338. getPublishStatus:function(e){
  1339. if (e||e==0) {
  1340. let str=e.toString()
  1341. let theType = '';
  1342. publishStatus.map(function (item) {
  1343. if (item.value == str) {
  1344. theType = item.key;
  1345. };
  1346. });
  1347. return theType;
  1348. }
  1349. },
  1350. //变更状态
  1351. getChangeState:function(e){
  1352. if (e||e==0) {
  1353. let str=e.toString()
  1354. let theType = '';
  1355. changeState.map(function (item) {
  1356. if (item.value == str) {
  1357. theType = item.key;
  1358. };
  1359. });
  1360. return theType;
  1361. }
  1362. },
  1363. //分派情况
  1364. getDistributeState:function(e){
  1365. if (e||e==0) {
  1366. let str=e.toString()
  1367. let theType = '';
  1368. distributeState.map(function (item) {
  1369. if (item.value == str) {
  1370. theType = item.key;
  1371. };
  1372. });
  1373. return theType;
  1374. }
  1375. },
  1376. //客户来源
  1377. getCustomerSource:function(e){
  1378. if (e||e==0) {
  1379. let str=e.toString()
  1380. let theType = '';
  1381. customerSource.map(function (item) {
  1382. if (item.value == str) {
  1383. theType = item.key;
  1384. };
  1385. });
  1386. return theType;
  1387. }
  1388. },
  1389. //客户来源
  1390. getSlcRedit:function(e){
  1391. if (e||e==0) {
  1392. let str=e.toString()
  1393. let theType = '';
  1394. slcRedit.map(function (item) {
  1395. if (item.value == str) {
  1396. theType = item.key;
  1397. };
  1398. });
  1399. return theType;
  1400. }
  1401. },
  1402. //客户来源
  1403. getDataGrade:function(e){
  1404. if (e||e==0) {
  1405. let str=e.toString()
  1406. let theType = '';
  1407. dataGrade.map(function (item) {
  1408. if (item.value == str) {
  1409. theType = item.key;
  1410. };
  1411. });
  1412. return theType;
  1413. }
  1414. },
  1415. //客户等级
  1416. getLevel:function(e){
  1417. if (e||e==0) {
  1418. let str=e.toString()
  1419. let theType = '';
  1420. level.map(function (item) {
  1421. if (item.value == str) {
  1422. theType = item.key;
  1423. };
  1424. });
  1425. return theType;
  1426. }
  1427. },
  1428. //项目状态
  1429. getXiangmoState:function(e){
  1430. if (e||e==0) {
  1431. let str=e.toString()
  1432. let theType = '';
  1433. xiangmoState.map(function (item) {
  1434. if (item.value == str) {
  1435. theType = item.key;
  1436. };
  1437. });
  1438. return theType;
  1439. }
  1440. },
  1441. //订单状态
  1442. getNewOrderStatus:function(e){
  1443. if (e||e==0) {
  1444. let str=e.toString()
  1445. let theType = '';
  1446. newOrderStatus.map(function (item) {
  1447. if (item.value == str) {
  1448. theType = item.key;
  1449. };
  1450. });
  1451. return theType;
  1452. }
  1453. },
  1454. //退单状态
  1455. getRefundStatus:function(e){
  1456. if (e||e==0) {
  1457. let str=e.toString()
  1458. let theType = '';
  1459. refundStatus.map(function (item) {
  1460. if (item.value == str) {
  1461. theType = item.key;
  1462. };
  1463. });
  1464. return theType;
  1465. }
  1466. },
  1467. //退单状态
  1468. getTaskStatus:function(e){
  1469. if (e||e==0) {
  1470. let str=e.toString()
  1471. let theType = '';
  1472. taskStatus.map(function (item) {
  1473. if (item.value == str) {
  1474. theType = item.key;
  1475. };
  1476. });
  1477. return theType;
  1478. }
  1479. },
  1480. //特批状态
  1481. getApproval:function(e){
  1482. if (e||e==0) {
  1483. let str=e.toString()
  1484. let theType = '';
  1485. approval.map(function (item) {
  1486. if (item.value == str) {
  1487. theType = item.key;
  1488. };
  1489. });
  1490. return theType;
  1491. }
  1492. },
  1493. //项目状态
  1494. getProjectStatus:function(e){
  1495. if (e||e==0) {
  1496. let str=e.toString()
  1497. let theType = '';
  1498. projectStatus.map(function (item) {
  1499. if (item.value == str) {
  1500. theType = item.key;
  1501. };
  1502. });
  1503. return theType;
  1504. }
  1505. },
  1506. //流程状态
  1507. getProcessStatus:function(e){
  1508. if (e||e==0) {
  1509. let str=e.toString()
  1510. let theType = '';
  1511. processStatus.map(function (item) {
  1512. if (item.value == str) {
  1513. theType = item.key;
  1514. };
  1515. });
  1516. return theType;
  1517. }
  1518. },
  1519. //结算状态
  1520. getLiquidationStatus:function(e){
  1521. if (e||e==0) {
  1522. let str=e.toString()
  1523. let theType = '';
  1524. liquidationStatus.map(function (item) {
  1525. if (item.value == str) {
  1526. theType = item.key;
  1527. };
  1528. });
  1529. return theType;
  1530. }
  1531. },//
  1532. //新项目类型
  1533. getNewOrderType:function(e){
  1534. if (e||e==0) {
  1535. let str=e.toString()
  1536. let theType = '';
  1537. newOrderType.map(function (item) {
  1538. if (item.value == str) {
  1539. theType = item.key;
  1540. };
  1541. });
  1542. return theType;
  1543. }
  1544. },
  1545. //营销员发款类型
  1546. getPaymentType:function(e){
  1547. if (e||e==0) {
  1548. let str=e.toString()
  1549. let theType = '';
  1550. paymentType.map(function (item) {
  1551. if (item.value == str) {
  1552. theType = item.key;
  1553. };
  1554. });
  1555. return theType;
  1556. }
  1557. },
  1558. //技术员发款类型
  1559. getJsyPaymentType:function(e){
  1560. if (e||e==0) {
  1561. let str=e.toString()
  1562. let theType = '';
  1563. jsyPaymentType.map(function (item) {
  1564. if (item.value == str) {
  1565. theType = item.key;
  1566. };
  1567. });
  1568. return theType;
  1569. }//
  1570. },
  1571. //奖金发放状态
  1572. getBonusState:function(e){
  1573. if (e||e==0) {
  1574. let str=e.toString()
  1575. let theType = '';
  1576. bonusState.map(function (item) {
  1577. if (item.value == str) {
  1578. theType = item.key;
  1579. };
  1580. });
  1581. return theType;
  1582. }
  1583. },
  1584. //技术员发款类型
  1585. getCustomerType:function(e){
  1586. if (e||e==0) {
  1587. let str=e.toString()
  1588. let theType = '';
  1589. customerType.map(function (item) {
  1590. if (item.value == str) {
  1591. theType = item.key;
  1592. };
  1593. });
  1594. return theType;
  1595. }
  1596. },
  1597. //技术员发款类型
  1598. getOrderTypes:function(e){
  1599. if (e||e==0) {
  1600. let str=e.toString()
  1601. let theType = '';
  1602. orderTypes.map(function (item) {
  1603. if (item.value == str) {
  1604. theType = item.key;
  1605. };
  1606. });
  1607. return theType;
  1608. }
  1609. },
  1610. //技术员发款类型
  1611. getjiedian:function(e){
  1612. if (e||e==0) {
  1613. let str=e.toString()
  1614. let theType = '';
  1615. jiedian.map(function (item) {
  1616. if (item.value == str) {
  1617. theType = item.key;
  1618. };
  1619. });
  1620. return theType;
  1621. }
  1622. },
  1623. }