tools.js 45 KB

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