tools.js 43 KB

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