tools.js 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629
  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
  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. getJsyPaymentType:function(e){
  1547. if (e||e==0) {
  1548. let str=e.toString()
  1549. let theType = '';
  1550. jsyPaymentType.map(function (item) {
  1551. if (item.value == str) {
  1552. theType = item.key;
  1553. };
  1554. });
  1555. return theType;
  1556. }//
  1557. },
  1558. //奖金发放状态
  1559. getBonusState:function(e){
  1560. if (e||e==0) {
  1561. let str=e.toString()
  1562. let theType = '';
  1563. bonusState.map(function (item) {
  1564. if (item.value == str) {
  1565. theType = item.key;
  1566. };
  1567. });
  1568. return theType;
  1569. }
  1570. },
  1571. //技术员发款类型
  1572. getCustomerType:function(e){
  1573. if (e||e==0) {
  1574. let str=e.toString()
  1575. let theType = '';
  1576. customerType.map(function (item) {
  1577. if (item.value == str) {
  1578. theType = item.key;
  1579. };
  1580. });
  1581. return theType;
  1582. }
  1583. },
  1584. //技术员发款类型
  1585. getOrderTypes:function(e){
  1586. if (e||e==0) {
  1587. let str=e.toString()
  1588. let theType = '';
  1589. orderTypes.map(function (item) {
  1590. if (item.value == str) {
  1591. theType = item.key;
  1592. };
  1593. });
  1594. return theType;
  1595. }
  1596. },
  1597. //技术员发款类型
  1598. getjiedian:function(e){
  1599. if (e||e==0) {
  1600. let str=e.toString()
  1601. let theType = '';
  1602. jiedian.map(function (item) {
  1603. if (item.value == str) {
  1604. theType = item.key;
  1605. };
  1606. });
  1607. return theType;
  1608. }
  1609. },
  1610. }