tools.js 46 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074
  1. import { message, Select } from 'antd';
  2. import { Tag } from 'antd';
  3. import React from 'react';
  4. import $ from 'jquery/src/ajax';
  5. import {
  6. projectStatusList,
  7. patentTypeList,
  8. patentStateList,
  9. patentFieldList,
  10. technicalSourceList,
  11. catagoryList,
  12. intellectualGetList,
  13. conversionFormList,
  14. annualReportStateList,
  15. cognizanceStateList,
  16. technologyStateList,
  17. copyrightStateList,
  18. auditStatusList,
  19. scaleList,
  20. companyType,
  21. industryList,
  22. contractTypeList,
  23. contractStateList,
  24. demandTypeList,
  25. achievementCategoryList,
  26. techAuditStatusList,
  27. auditStatusLists,
  28. maturityList,
  29. transferModeList,
  30. innovationList,
  31. orderStatusList,
  32. activityForm,
  33. activityType,
  34. boutique,
  35. hot,
  36. statuslist,
  37. customerTyp,
  38. cityArr,
  39. customerStatus,
  40. intentionalService,
  41. newFollow,
  42. sex,
  43. tag,
  44. contactType,
  45. contact,
  46. Whether,
  47. Certification,
  48. currentMember,
  49. lvl,
  50. industry,
  51. socialAttribute,
  52. station,
  53. post,
  54. patternOrganization,
  55. conditionOrganization,
  56. categoryState,
  57. auditStatusL,
  58. gameState,
  59. messageType,
  60. designated,
  61. featured,
  62. actives,
  63. intentProgress,
  64. transactionProgress,
  65. contractProgress,
  66. projectProgress,
  67. orderType,
  68. orderStage,
  69. orderState,
  70. paymentState,
  71. orderChannel,
  72. approvedState,
  73. lock,
  74. paymentMethod,
  75. transactionChannel,
  76. projectState,
  77. transactionProject,
  78. client,
  79. stick,
  80. taskStatus,
  81. publishStatus,
  82. changeState,
  83. distributeState,
  84. customerSource,
  85. slcRedit,
  86. dataGrade,
  87. level,
  88. xiangmoState,
  89. newOrderStatus,
  90. refundStatus,
  91. approval,
  92. projectStatus,
  93. processStatus,
  94. liquidationStatus,
  95. newOrderType,
  96. jsyPaymentType,
  97. customerType,
  98. orderTypes,
  99. bonusState,
  100. jiedian,
  101. cuikuan,
  102. province,
  103. invoiceStatus,
  104. approvalA,
  105. processStatusNew,
  106. contractChangeStatus,
  107. typeList,
  108. channelAllocationStatus,
  109. transferType
  110. } from "./dataDic.js";
  111. import { provinceList } from './NewDicProvinceList.js';
  112. import ShowModal from './showModal.jsx';
  113. module.exports = {
  114. splitUrl: function (string, i, url) {
  115. let theList = [];
  116. let theArr = [];
  117. if (string && string.length) {
  118. theArr = string.split(i);
  119. theArr.map(function (item, i) {
  120. let name = item.substring(item.lastIndexOf("_") + 1);
  121. theList.push({
  122. uid: -i - 1,
  123. name: name,
  124. url: url + item,
  125. response: {
  126. data: item,
  127. },
  128. });
  129. });
  130. }
  131. return theList;
  132. },
  133. getBase64: function (img, callback) {
  134. const reader = new FileReader();
  135. reader.addEventListener("load", () => callback(reader.result));
  136. reader.readAsDataURL(img);
  137. },
  138. beforeUpload: function (file) {
  139. const isLt2M = file.size / 1024 / 1024 < 2;
  140. if (!isLt2M) {
  141. message.error("图片小大必须小于2MB!");
  142. }
  143. return isLt2M;
  144. },
  145. beforeUploadFile: function () {
  146. // debugger
  147. // const isJPG = file.type === 'image/jpeg/document';
  148. // if (!isJPG) {
  149. // message.error('You can only upload JPG file!');
  150. // }
  151. // const isLt2M = file.size / 1024 / 1024 < 2;
  152. // if (!isLt2M) {
  153. // message.error('Image must smaller than 2MB!');
  154. // }
  155. // return isJPG && isLt2M;
  156. },
  157. getTime: function (e, t) {
  158. if (e && !t) {
  159. var d = new Date(e);
  160. d =
  161. d.getFullYear() +
  162. "-" +
  163. (d.getMonth() + 1 < 10 ? "0" + (d.getMonth() + 1) : d.getMonth() + 1) +
  164. "-" +
  165. (d.getDate() < 10 ? "0" + d.getDate() : d.getDate()) +
  166. " ";
  167. // + (d.getHours() < 10 ? "0" + d.getHours() : d.getHours()) + ":" +
  168. // (d.getMinutes() < 10 ? "0" + d.getMinutes() : d.getMinutes()) + ":" +
  169. // (d.getSeconds() < 10 ? "0" + d.getSeconds() : d.getSeconds());
  170. return d;
  171. } else if (e && t) {
  172. var d1 = new Date(e);
  173. var d2 = new Date(e);
  174. d2 = d2.setMonth(d1.getMonth() + t);
  175. d2 = new Date(d2);
  176. d2 =
  177. d2.getFullYear() +
  178. "-" +
  179. (d2.getMonth() + 1 < 10
  180. ? "0" + (d2.getMonth() + 1)
  181. : d2.getMonth() + 1) +
  182. "-" +
  183. (d2.getDate() < 10 ? "0" + d2.getDate() : d2.getDate()) +
  184. " ";
  185. return d2;
  186. } else {
  187. return "";
  188. }
  189. },
  190. getPatentType: function (e) {
  191. if (e) {
  192. let theType = "";
  193. patentTypeList.map(function (item) {
  194. if (item.value == e) {
  195. theType = item.key;
  196. }
  197. });
  198. return theType;
  199. }
  200. },
  201. getPatentTypeva: function (e) {
  202. if (e) {
  203. let theType = "";
  204. patentTypeList.map(function (item) {
  205. if (item.key == e) {
  206. theType = item.value;
  207. }
  208. });
  209. return theType;
  210. }
  211. },
  212. getPatentState: function (e) {
  213. if (e) {
  214. let theState = "";
  215. patentStateList.map(function (item) {
  216. if (item.value == e) {
  217. theState = item.key;
  218. }
  219. });
  220. return theState;
  221. }
  222. },
  223. getPatentField: function (e) {
  224. if (e) {
  225. let theState = "";
  226. patentFieldList.map(function (item) {
  227. if (item.value == e) {
  228. theState = item.key;
  229. }
  230. });
  231. return theState;
  232. }
  233. },
  234. getTechnicalSource: function (e) {
  235. if (e) {
  236. let theSource = "";
  237. technicalSourceList.map(function (item) {
  238. if (item.value == e) {
  239. theSource = item.key;
  240. }
  241. });
  242. return theSource;
  243. }
  244. },
  245. getCatagory: function (e) {
  246. if (e) {
  247. let theType = "";
  248. catagoryList.map(function (item) {
  249. if (item.value == e) {
  250. theType = item.key;
  251. }
  252. });
  253. return theType;
  254. }
  255. },
  256. getIntellectualObtainWay: function (e) {
  257. if (e) {
  258. let theType = "";
  259. intellectualGetList.map(function (item) {
  260. if (item.value == e) {
  261. theType = item.key;
  262. }
  263. });
  264. return theType;
  265. }
  266. },
  267. getConversionForm: function (e) {
  268. if (e) {
  269. let theType = "";
  270. conversionFormList.map(function (item) {
  271. if (item.value == e) {
  272. theType = item.key;
  273. }
  274. });
  275. return theType;
  276. }
  277. },
  278. getAnnualReportState: function (e) {
  279. if (e) {
  280. let theType = "";
  281. annualReportStateList.map(function (item) {
  282. if (item.value == e) {
  283. theType = item.key;
  284. }
  285. });
  286. return theType;
  287. }
  288. },
  289. getCognizanceState: function (e) {
  290. if (e) {
  291. let theType = "";
  292. cognizanceStateList.map(function (item) {
  293. if (item.value == e) {
  294. theType = item.key;
  295. }
  296. });
  297. return theType;
  298. }
  299. },
  300. getTechnologyState: function (e) {
  301. if (e) {
  302. let theType = "";
  303. technologyStateList.map(function (item) {
  304. if (item.value == e) {
  305. theType = item.key;
  306. }
  307. });
  308. return theType;
  309. }
  310. },
  311. //显示用户认证状态
  312. getAuditState: function (e) {
  313. if (e) {
  314. let theType = "";
  315. auditStatusList.map(function (item) {
  316. if (item.value == e) {
  317. theType = item.key;
  318. }
  319. });
  320. return theType;
  321. }
  322. },
  323. getCopyrightState: function (e) {
  324. if (e) {
  325. let theType = "";
  326. copyrightStateList.map(function (item) {
  327. if (item.value == e) {
  328. theType = item.key;
  329. }
  330. });
  331. return theType;
  332. }
  333. },
  334. downloadFile: function (path, fileName) {
  335. window.open(
  336. globalConfig.context +
  337. "/open/downloadFile?path=" +
  338. path +
  339. "&fileName=" +
  340. fileName
  341. );
  342. },
  343. techDownloadFile: function (url, id) {
  344. window.open(globalConfig.context + url + "?id=" + id);
  345. },
  346. copyrightDownloadFile: function (id, sign, url) {
  347. window.open(globalConfig.context + url + "?id=" + id + "&sign=" + sign);
  348. },
  349. newDownloadFile: function (id, sign, url, type) {
  350. if (!type) {
  351. window.open(globalConfig.context + url + "?id=" + id + "&sign=" + sign);
  352. }
  353. if (type) {
  354. window.open(
  355. globalConfig.context +
  356. url +
  357. "?id=" +
  358. id +
  359. "&sign=" +
  360. sign +
  361. "&type=" +
  362. type
  363. );
  364. }
  365. },
  366. companySearch(input, option) {
  367. return option.props.children.indexOf(input) >= 0;
  368. },
  369. getVacations(ccccc) {
  370. let now = new Date();
  371. let theYear = now.getFullYear();
  372. $.ajax({
  373. type: "get",
  374. dataType: "json",
  375. crossDomain: false,
  376. url: globalConfig.context + "/open/html/json/vacations" + theYear,
  377. success: (data) => {
  378. if (data) {
  379. ccccc(data);
  380. }
  381. },
  382. });
  383. },
  384. getInUrgentTime(date, inUrgent, vocations) {
  385. if (vocations && vocations.length) {
  386. let now = new Date(date);
  387. for (var i = 1; i <= inUrgent; ) {
  388. now.setDate(now.getDate() + 1);
  389. let thebool = true;
  390. vocations.map((item) => {
  391. if (item == getKey(now)) {
  392. thebool = false;
  393. }
  394. });
  395. if (thebool) {
  396. i++;
  397. }
  398. }
  399. return now;
  400. }
  401. function getKey(date) {
  402. var year = date.getFullYear(),
  403. month = date.getMonth() + 1,
  404. day = date.getDate();
  405. year = "" + year;
  406. month = (month > 9 ? "" : "0") + month;
  407. day = (day > 9 ? "" : "0") + day;
  408. return year + month + day;
  409. }
  410. },
  411. //各种通过接口获取下拉列表
  412. setPatentStateOption(permission) {
  413. let theArr = [];
  414. patentStateList.map(function (item) {
  415. for (let i = 0; i < permission.length; i++) {
  416. if (item.value == permission[i]) {
  417. theArr.push(item);
  418. }
  419. }
  420. });
  421. return theArr;
  422. },
  423. setUserContactsList() {
  424. let theOption = [];
  425. $.ajax({
  426. method: "get",
  427. dataType: "json",
  428. crossDomain: false,
  429. url: globalConfig.context + "/api/user/getContacts",
  430. success: function (data) {
  431. if (!data.data) {
  432. if (data.error && data.error.length) {
  433. message.warning(data.error[0].message);
  434. }
  435. return;
  436. }
  437. for (let item in data.data) {
  438. let theData = data.data[item];
  439. theOption.push(
  440. <Select.Option value={item} key={theData}>
  441. {theData}
  442. </Select.Option>
  443. );
  444. }
  445. },
  446. });
  447. return theOption;
  448. },
  449. setAdminContactsList(uid) {
  450. let theOption = [];
  451. $.ajax({
  452. method: "get",
  453. dataType: "json",
  454. crossDomain: false,
  455. url: globalConfig.context + "/api/admin/getContacts",
  456. data: { uid: uid },
  457. success: function (data) {
  458. if (!data.data) {
  459. if (data.error && data.error.length) {
  460. message.warning(data.error[0].message);
  461. }
  462. return;
  463. }
  464. for (let item in data.data) {
  465. let theData = data.data[item];
  466. theOption.push(
  467. <Select.Option value={item} key={theData}>
  468. {theData}
  469. </Select.Option>
  470. );
  471. }
  472. },
  473. });
  474. return theOption;
  475. },
  476. //高企培育资料完成情况(比重)
  477. getProportion(uid, callback) {
  478. $.ajax({
  479. method: "get",
  480. dataType: "json",
  481. crossDomain: false,
  482. url: globalConfig.context + "/api/admin/proportion",
  483. data: { uid: uid },
  484. success: function (data) {
  485. if (!data.data) {
  486. if (data.error && data.error.length) {
  487. message.warning(data.error[0].message);
  488. }
  489. data.data = {};
  490. callback(data.data);
  491. }
  492. callback(data.data);
  493. },
  494. });
  495. },
  496. //保存高企培育资料完成情况
  497. saveProportion(id, uid, sign, status) {
  498. $.ajax({
  499. method: "post",
  500. dataType: "json",
  501. crossDomain: false,
  502. url: globalConfig.context + "/api/admin/confirmProportion",
  503. data: {
  504. id: id,
  505. uid: uid,
  506. sign: sign,
  507. status: status,
  508. },
  509. success: function (data) {
  510. if (!data.data) {
  511. if (data.error && data.error.length) {
  512. message.warning(data.error[0].message);
  513. }
  514. return;
  515. }
  516. },
  517. });
  518. },
  519. //获取window.location.search传的值
  520. getSearchUrl(e) {
  521. let searchURL = e;
  522. let theObj = {};
  523. searchURL = searchURL.substring(1, searchURL.length);
  524. theObj[searchURL.split("&")[0].split("=")[0]] = searchURL
  525. .split("&")[0]
  526. .split("=")[1];
  527. if (searchURL.split("&")[1]) {
  528. theObj[searchURL.split("&")[1].split("=")[0]] = searchURL
  529. .split("&")[1]
  530. .split("=")[1];
  531. if (searchURL.split("&")[2]) {
  532. theObj[searchURL.split("&")[2].split("=")[0]] = searchURL
  533. .split("&")[2]
  534. .split("=")[1];
  535. }
  536. }
  537. return theObj;
  538. },
  539. //预览接口
  540. getPreview(id, url, sign, callback) {
  541. $.ajax({
  542. method: "get",
  543. dataType: "json",
  544. crossDomain: false,
  545. url: globalConfig.context + "/api/admin/preview/" + url,
  546. data: {
  547. id: id,
  548. sign: sign,
  549. },
  550. success: function (data) {
  551. if (!data.data) {
  552. if (data.error && data.error.length) {
  553. message.warning(data.error[0].message);
  554. }
  555. }
  556. callback(
  557. "https://view.officeapps.live.com/op/view.aspx?src=" +
  558. encodeURIComponent(
  559. location.origin +
  560. globalConfig.context +
  561. "/open/preview?" +
  562. data.data
  563. )
  564. );
  565. console.log(
  566. "https://view.officeapps.live.com/op/view.aspx?src=" +
  567. (location.origin +
  568. globalConfig.context +
  569. "/open/preview?" +
  570. data.data)
  571. );
  572. console.log(
  573. "https://view.officeapps.live.com/op/view.aspx?src=" +
  574. encodeURIComponent(
  575. location.origin +
  576. globalConfig.context +
  577. "/open/preview?" +
  578. data.data
  579. )
  580. );
  581. },
  582. });
  583. },
  584. //预览接口
  585. getPreviews(id, url, sign, callback) {
  586. $.ajax({
  587. method: "get",
  588. dataType: "json",
  589. crossDomain: false,
  590. url: globalConfig.context + "/api/admin/customer/" + url,
  591. data: {
  592. id: id,
  593. sign: sign,
  594. },
  595. success: function (data) {
  596. if (!data.data) {
  597. if (data.error && data.error.length) {
  598. message.warning(data.error[0].message);
  599. }
  600. }
  601. callback(
  602. "https://view.officeapps.live.com/op/view.aspx?src=" +
  603. encodeURIComponent(
  604. location.origin +
  605. globalConfig.context +
  606. "/open/preview?" +
  607. data.data
  608. )
  609. );
  610. console.log(
  611. "https://view.officeapps.live.com/op/view.aspx?src=" +
  612. (location.origin +
  613. globalConfig.context +
  614. "/open/preview?" +
  615. data.data)
  616. );
  617. console.log(
  618. "https://view.officeapps.live.com/op/view.aspx?src=" +
  619. encodeURIComponent(
  620. location.origin +
  621. globalConfig.context +
  622. "/open/preview?" +
  623. data.data
  624. )
  625. );
  626. },
  627. });
  628. },
  629. //获取企业规模
  630. getScaleState(e) {
  631. if (e) {
  632. let theType = "";
  633. scaleList.map(function (item) {
  634. if (item.value == e) {
  635. theType = item.key;
  636. }
  637. });
  638. return theType;
  639. }
  640. },
  641. //获取企业类型
  642. getCompanyType(type1, type2) {
  643. let companyTypeList = [];
  644. for (let i = 0; i < companyType.length; i++) {
  645. companyTypeList.push({
  646. value: companyType[i].value,
  647. label: companyType[i].label,
  648. });
  649. if (companyType[i].children) {
  650. for (let j = 0; j < companyType[i].children.length; j++) {
  651. companyTypeList.push({
  652. value: companyType[i].children[j].value,
  653. label: companyType[i].children[j].label,
  654. });
  655. }
  656. }
  657. }
  658. companyTypeList.sort(function (a, b) {
  659. return a.value - b.value;
  660. });
  661. let typeKey = "";
  662. companyTypeList.map(function (item) {
  663. if (type1 == item.value) {
  664. typeKey = item.label;
  665. }
  666. if (type2 == item.value) {
  667. typeKey = typeKey + "/" + item.label;
  668. }
  669. });
  670. return typeKey;
  671. },
  672. //获取企业行业
  673. getIndustryType(e) {
  674. if (e) {
  675. let theType = "";
  676. industryList.map(function (item) {
  677. if (item.value == e) {
  678. theType = item.key;
  679. }
  680. });
  681. return theType;
  682. }
  683. },
  684. //获取合同状态
  685. getContractType: function (e) {
  686. if (e) {
  687. let theType = "";
  688. contractTypeList.map(function (item) {
  689. if (item.value == e) {
  690. theType = item.key;
  691. }
  692. });
  693. return theType;
  694. }
  695. },
  696. //获取合同类型
  697. getContractState: function (e) {
  698. if (e) {
  699. let theType = "";
  700. contractStateList.map(function (item) {
  701. if (item.value == e) {
  702. theType = item.key;
  703. }
  704. });
  705. return theType;
  706. }
  707. },
  708. //获取需求类型
  709. getDemandType: function (e) {
  710. if (e) {
  711. let theType = "";
  712. demandTypeList.map(function (item) {
  713. if (item.value == e) {
  714. theType = item.key;
  715. }
  716. });
  717. return theType;
  718. }
  719. },
  720. //获取成果类型
  721. getAchievementCategory: function (e) {
  722. if (e) {
  723. let theType = "";
  724. achievementCategoryList.map(function (item) {
  725. if (item.value == e) {
  726. theType = item.key;
  727. }
  728. });
  729. return theType;
  730. }
  731. },
  732. //获取需求和成果审核状态
  733. getTechAuditStatus: function (e) {
  734. if (e) {
  735. let theType = "";
  736. techAuditStatusList.map(function (item) {
  737. if (item.value == e) {
  738. theType = item.key;
  739. }
  740. });
  741. return theType;
  742. }
  743. },
  744. //获取政策审核状态
  745. getauditStatus: function (e) {
  746. if (e || e >= 0) {
  747. let tt = e.toString();
  748. let theType = "";
  749. auditStatusLists.map(function (item) {
  750. if (item.value == tt) {
  751. theType = item.key;
  752. }
  753. });
  754. return theType;
  755. }
  756. },
  757. //获取需求和成果审核状态
  758. getMaturity: function (e) {
  759. if (e) {
  760. let theType = "";
  761. maturityList.map(function (item) {
  762. if (item.value == e) {
  763. theType = item.key;
  764. }
  765. });
  766. return theType;
  767. }
  768. },
  769. //获取需求和成果审核状态
  770. getTransferMode: function (e) {
  771. if (e) {
  772. let theType = "";
  773. transferModeList.map(function (item) {
  774. if (item.value == e) {
  775. theType = item.key;
  776. }
  777. });
  778. return theType;
  779. }
  780. },
  781. //获取创新度状态
  782. getInnovation: function (e) {
  783. if (e) {
  784. let theType = "";
  785. innovationList.map(function (item) {
  786. if (item.value == e) {
  787. theType = item.key;
  788. }
  789. });
  790. return theType;
  791. }
  792. },
  793. //获取创新度状态
  794. getOrderStatus: function (e) {
  795. if (e) {
  796. let theType = "";
  797. orderStatusList.map(function (item) {
  798. if (item.value == e) {
  799. theType = item.key;
  800. }
  801. });
  802. return theType;
  803. }
  804. },
  805. //科技管理
  806. //活动圈后台管理
  807. getActivityType: function (e) {
  808. if (e) {
  809. let theType = "";
  810. activityType.map(function (item) {
  811. if (item.value == e) {
  812. theType = item.key;
  813. }
  814. });
  815. return theType;
  816. }
  817. },
  818. getActivityForm: function (e) {
  819. if (e) {
  820. let theType = "";
  821. activityForm.map(function (item) {
  822. if (item.value == e) {
  823. theType = item.key;
  824. }
  825. });
  826. return theType;
  827. }
  828. },
  829. //是否展示在首页
  830. gethot: function (e) {
  831. if (e) {
  832. let theType = "";
  833. hot.map(function (item) {
  834. if (item.value == e) {
  835. theType = item.key;
  836. }
  837. });
  838. return theType;
  839. }
  840. },
  841. //是否精品
  842. getboutique: function (e) {
  843. if (e) {
  844. let theType = "";
  845. boutique.map(function (item) {
  846. if (item.value == e) {
  847. theType = item.key;
  848. }
  849. });
  850. return theType;
  851. }
  852. },
  853. //客户类型
  854. getcustomerTyp: function (e) {
  855. if (e) {
  856. let theType = "";
  857. customerTyp.map(function (item) {
  858. if (item.value == e) {
  859. theType = item.key;
  860. }
  861. });
  862. return theType;
  863. }
  864. },
  865. //省份
  866. getcityArr: function (e) {
  867. if (e) {
  868. let theType = "";
  869. cityArr.map(function (item) {
  870. if (item.value == e) {
  871. theType = item.key;
  872. }
  873. });
  874. return theType;
  875. }
  876. },
  877. //与后端一致省份
  878. getNewDiccityArr: function (e) {
  879. if (e) {
  880. let theType = "";
  881. provinceList.map(function (item) {
  882. if (item.id === e) {
  883. theType = item.name;
  884. }
  885. });
  886. return theType;
  887. }
  888. },
  889. //客户状态
  890. getcustomerStatue: function (e) {
  891. if (e || e == 0) {
  892. let theType = "";
  893. customerStatus.map(function (item) {
  894. if (item.value == e) {
  895. theType = item.key;
  896. }
  897. });
  898. return theType;
  899. }
  900. },
  901. //账户状态
  902. getStatuslist: function (e) {
  903. if (e) {
  904. let theType = "";
  905. statuslist.map(function (item) {
  906. if (item.value == e) {
  907. theType = item.key;
  908. }
  909. });
  910. return theType;
  911. }
  912. },
  913. //意向服务
  914. getCompanyIntention: function (e) {
  915. if (e) {
  916. let theType = "";
  917. intentionalService.map(function (item) {
  918. if (item.value == e) {
  919. theType = item.key;
  920. }
  921. });
  922. return theType;
  923. }
  924. },
  925. //客户标签
  926. getTag: function (e) {
  927. if (e) {
  928. let theType = "";
  929. tag.map(function (item) {
  930. if (item.value == e) {
  931. theType = item.key;
  932. }
  933. });
  934. return theType;
  935. }
  936. },
  937. //最新跟进
  938. getfllowSituation: function (e) {
  939. if (e || e == 0) {
  940. let theType = "";
  941. newFollow.map(function (item) {
  942. if (item.value == e) {
  943. theType = item.key;
  944. }
  945. });
  946. return theType;
  947. }
  948. },
  949. //性别
  950. getsex: function (e) {
  951. if (e) {
  952. let theType = "";
  953. sex.map(function (item) {
  954. if (item.value == e) {
  955. theType = item.key;
  956. }
  957. });
  958. return theType;
  959. }
  960. },
  961. //联系方式
  962. getcontact: function (e) {
  963. if (e) {
  964. let theType = "";
  965. contact.map(function (item) {
  966. if (item.value == e) {
  967. theType = item.key;
  968. }
  969. });
  970. return theType;
  971. }
  972. },
  973. //是否文字与数字转换
  974. getWhether: function (e) {
  975. if (e) {
  976. let theType = "";
  977. Whether.map(function (item) {
  978. if (item.value == e) {
  979. theType = item.key;
  980. }
  981. });
  982. return theType;
  983. }
  984. },
  985. //是否实名认证
  986. getCertification: function (e) {
  987. if (e) {
  988. let theType = "";
  989. Certification.map(function (item) {
  990. if (item.value == e) {
  991. theType = item.key;
  992. }
  993. });
  994. return theType;
  995. }
  996. },
  997. //会员状态
  998. getCurrentMember: function (e) {
  999. if (e) {
  1000. let theType = "";
  1001. currentMember.map(function (item) {
  1002. if (item.value == e) {
  1003. theType = item.key;
  1004. }
  1005. });
  1006. return theType;
  1007. }
  1008. },
  1009. //会员等级
  1010. getLvl: function (e) {
  1011. if (e) {
  1012. let theType = "";
  1013. lvl.map(function (item) {
  1014. if (item.value == e) {
  1015. theType = item.key;
  1016. }
  1017. });
  1018. return theType;
  1019. }
  1020. },
  1021. //省份转换
  1022. getprovince: function (e) {
  1023. let nub = parseInt(e);
  1024. let theType = "";
  1025. if (nub <= 34) {
  1026. provinceList.map(function (item) {
  1027. if (item.id == nub) {
  1028. theType = item.name;
  1029. }
  1030. });
  1031. }
  1032. if (nub > 34 && nub < 380) {
  1033. provinceList.map(function (item) {
  1034. item.cityList.map(function (city) {
  1035. if (city.id == nub) {
  1036. theType = city.name;
  1037. }
  1038. });
  1039. });
  1040. }
  1041. if (nub >= 380) {
  1042. provinceList.map(function (item) {
  1043. item.cityList.map(function (city) {
  1044. city.areaList.map(function (areas) {
  1045. if (areas.id == nub) {
  1046. theType = areas.name;
  1047. }
  1048. });
  1049. });
  1050. });
  1051. }
  1052. return theType;
  1053. },
  1054. //我的业务跟进状态
  1055. getStatusFollow: function (e) {
  1056. let theType = "";
  1057. if (e) {
  1058. theType = "跟进中";
  1059. } else {
  1060. theType = "停止跟进";
  1061. }
  1062. return theType;
  1063. },
  1064. //我的业务跟进状态
  1065. getContactType: function (e) {
  1066. if (e) {
  1067. let theType = "";
  1068. contactType.map(function (item) {
  1069. if (item.value == e) {
  1070. theType = item.key;
  1071. }
  1072. });
  1073. return theType;
  1074. }
  1075. },
  1076. //社会属性
  1077. getSocialAttribute: function (e) {
  1078. if (!isNaN(parseInt(e))) {
  1079. let theType = "";
  1080. socialAttribute.map(function (item) {
  1081. if (item.value == e) {
  1082. theType = item.key;
  1083. }
  1084. });
  1085. return theType;
  1086. }else{
  1087. return '未知';
  1088. }
  1089. },
  1090. //获取渠道分配状态名
  1091. getChannelAllocationStatus: function (e,isTag) {
  1092. if (!isNaN(parseInt(e))) {
  1093. let theType = "";
  1094. let color = "";
  1095. channelAllocationStatus.map(function (item) {
  1096. if (item.value == e) {
  1097. theType = item.key;
  1098. color = item.color;
  1099. }
  1100. });
  1101. if(isTag){
  1102. return <Tag color={color}>{theType}</Tag>
  1103. }else{
  1104. return theType;
  1105. }
  1106. }else{
  1107. if(isTag){
  1108. return <Tag color='#000'>未知</Tag>
  1109. }else{
  1110. return '未知';
  1111. }
  1112. }
  1113. },
  1114. //获取分配状态名称
  1115. getTransferType:function (id){
  1116. if (!isNaN(parseInt(id))) {
  1117. let typeName = '';
  1118. transferType.map(function (item) {
  1119. if (item.value == id) {
  1120. typeName = item.label
  1121. }
  1122. });
  1123. return typeName;
  1124. }
  1125. },
  1126. //行业
  1127. getIndustry: function (e) {
  1128. if (e) {
  1129. let theType = "";
  1130. industry.map(function (item) {
  1131. if (item.value == e) {
  1132. theType = item.key;
  1133. }
  1134. });
  1135. return theType;
  1136. }
  1137. },
  1138. //岗位
  1139. getStation: function (e) {
  1140. if (e) {
  1141. let theType = "";
  1142. station.map(function (item) {
  1143. if (item.value == e) {
  1144. theType = item.key;
  1145. }
  1146. });
  1147. return theType;
  1148. }
  1149. },
  1150. //职务
  1151. getPost: function (e) {
  1152. if (e) {
  1153. let theType = "";
  1154. post.map(function (item) {
  1155. if (item.value == e) {
  1156. theType = item.key;
  1157. }
  1158. });
  1159. return theType;
  1160. }
  1161. },
  1162. //组织类型
  1163. getPattern: function (e) {
  1164. if (e) {
  1165. let theType = "";
  1166. patternOrganization.map(function (item) {
  1167. if (item.value == e) {
  1168. theType = item.key;
  1169. }
  1170. });
  1171. return theType;
  1172. }
  1173. },
  1174. //组织状态
  1175. getCondition: function (e) {
  1176. if (e) {
  1177. let theType = "";
  1178. conditionOrganization.map(function (item) {
  1179. if (item.value == e) {
  1180. theType = item.key;
  1181. }
  1182. });
  1183. return theType;
  1184. }
  1185. },
  1186. //品类状态
  1187. getCategoryState: function (e) {
  1188. if (e) {
  1189. let theType = "";
  1190. categoryState.map(function (item) {
  1191. if (item.value == e) {
  1192. theType = item.key;
  1193. }
  1194. });
  1195. return theType;
  1196. }
  1197. },
  1198. //实名认证
  1199. getAuditStatus: function (index) {
  1200. let e = index ? index.toString() : "";
  1201. if (e) {
  1202. let theType = "";
  1203. auditStatusL.map(function (item) {
  1204. if (item.value == e) {
  1205. theType = item.key;
  1206. }
  1207. });
  1208. return theType;
  1209. }
  1210. },
  1211. //品类状态
  1212. getGameState: function (index) {
  1213. let e = index ? index.toString() : "";
  1214. if (e) {
  1215. let theType = "";
  1216. gameState.map(function (item) {
  1217. if (item.value == e) {
  1218. theType = item.key;
  1219. }
  1220. });
  1221. return theType;
  1222. }
  1223. },
  1224. //消息类型
  1225. getMessageType: function (index) {
  1226. let e = index ? index.toString() : "";
  1227. if (e) {
  1228. let theType = "";
  1229. messageType.map(function (item) {
  1230. if (item.value == e) {
  1231. theType = item.key;
  1232. }
  1233. });
  1234. return theType;
  1235. }
  1236. },
  1237. //发送目标
  1238. getDesignated: function (index) {
  1239. let e = index ? index.toString() : "";
  1240. if (e) {
  1241. let theType = "";
  1242. designated.map(function (item) {
  1243. if (item.value == e) {
  1244. theType = item.key;
  1245. }
  1246. });
  1247. return theType;
  1248. }
  1249. },
  1250. //客户端
  1251. getClient: function (index) {
  1252. let e = index ? index.toString() : "";
  1253. if (e) {
  1254. let theType = "";
  1255. client.map(function (item) {
  1256. if (item.value == e) {
  1257. theType = item.key;
  1258. }
  1259. });
  1260. return theType;
  1261. }
  1262. },
  1263. //是否置顶
  1264. getStick: function (index) {
  1265. let e = index ? index.toString() : "";
  1266. if (e) {
  1267. let theType = "";
  1268. stick.map(function (item) {
  1269. if (item.value == e) {
  1270. theType = item.key;
  1271. }
  1272. });
  1273. return theType;
  1274. }
  1275. },
  1276. getFeatured: function (index) {
  1277. let e = index ? index.toString() : "";
  1278. if (e) {
  1279. let theType = "";
  1280. featured.map(function (item) {
  1281. if (item.value == e) {
  1282. theType = item.key;
  1283. }
  1284. });
  1285. return theType;
  1286. }
  1287. },
  1288. getActives: function (e) {
  1289. if (e) {
  1290. let theType = "";
  1291. actives.map(function (item) {
  1292. if (item.value == e) {
  1293. theType = item.key;
  1294. }
  1295. });
  1296. return theType;
  1297. }
  1298. },
  1299. //意向进度
  1300. getIntentProgress: function (e) {
  1301. if (e) {
  1302. let theType = "";
  1303. intentProgress.map(function (item) {
  1304. if (item.value == e) {
  1305. theType = item.key;
  1306. }
  1307. });
  1308. return theType;
  1309. }
  1310. },
  1311. //交易进度
  1312. getTransactionProgress: function (e) {
  1313. if (e) {
  1314. let theType = "";
  1315. transactionProgress.map(function (item) {
  1316. if (item.value == e) {
  1317. theType = item.key;
  1318. }
  1319. });
  1320. return theType;
  1321. }
  1322. },
  1323. //合同进度
  1324. getContractProgress: function (e) {
  1325. if (e) {
  1326. let theType = "";
  1327. contractProgress.map(function (item) {
  1328. if (item.value == e) {
  1329. theType = item.key;
  1330. }
  1331. });
  1332. return theType;
  1333. }
  1334. },
  1335. //项目进度
  1336. getProjectProgress: function (e) {
  1337. if (e) {
  1338. let theType = "";
  1339. projectProgress.map(function (item) {
  1340. if (item.value == e) {
  1341. theType = item.key;
  1342. }
  1343. });
  1344. return theType;
  1345. }
  1346. },
  1347. //订单类型
  1348. getOrderType: function (e) {
  1349. if (e || e == 0) {
  1350. let str = e.toString();
  1351. let theType = "";
  1352. orderType.map(function (item) {
  1353. if (item.value == str) {
  1354. theType = item.key;
  1355. }
  1356. });
  1357. return theType;
  1358. }
  1359. },
  1360. //订单阶段
  1361. getOrderStage: function (e) {
  1362. if (e || e == 0) {
  1363. let str = e.toString();
  1364. let theType = "";
  1365. orderStage.map(function (item) {
  1366. if (item.value == str) {
  1367. theType = item.key;
  1368. }
  1369. });
  1370. return theType;
  1371. }
  1372. },
  1373. //订单状态o
  1374. getOrderState: function (e) {
  1375. if (e || e == 0) {
  1376. let str = e.toString();
  1377. let theType = "";
  1378. orderState.map(function (item) {
  1379. if (item.value == str) {
  1380. theType = item.key;
  1381. }
  1382. });
  1383. return theType;
  1384. }
  1385. },
  1386. //付款状态
  1387. getPaymentState: function (e) {
  1388. if (e || e == 0) {
  1389. let str = e.toString();
  1390. let theType = "";
  1391. paymentState.map(function (item) {
  1392. if (item.value == str) {
  1393. theType = item.key;
  1394. }
  1395. });
  1396. return theType;
  1397. }
  1398. },
  1399. //订单渠道
  1400. getOrderChannel: function (e) {
  1401. if (e || e == 0) {
  1402. let str = e.toString();
  1403. let theType = "";
  1404. orderChannel.map(function (item) {
  1405. if (item.value == str) {
  1406. theType = item.key;
  1407. }
  1408. });
  1409. return theType;
  1410. }
  1411. },
  1412. //特批状态
  1413. getApprovedState: function (e) {
  1414. if (e || e == 0) {
  1415. let str = e.toString();
  1416. let theType = "";
  1417. approvedState.map(function (item) {
  1418. if (item.value == str) {
  1419. theType = item.key;
  1420. }
  1421. });
  1422. return theType;
  1423. }
  1424. },
  1425. //锁定或废除
  1426. getLock: function (e) {
  1427. if (e || e == 0) {
  1428. let str = e.toString();
  1429. let theType = "";
  1430. lock.map(function (item) {
  1431. if (item.value == str) {
  1432. theType = item.key;
  1433. }
  1434. });
  1435. return theType;
  1436. }
  1437. },
  1438. //支付方式
  1439. getPaymentMethod: function (e) {
  1440. if (e || e == 0) {
  1441. let str = e.toString();
  1442. let theType = "";
  1443. paymentMethod.map(function (item) {
  1444. if (item.value == str) {
  1445. theType = item.key;
  1446. }
  1447. });
  1448. return theType;
  1449. }
  1450. },
  1451. //交易渠道
  1452. getTransactionChannel: function (e) {
  1453. if (e || e == 0) {
  1454. let str = e.toString();
  1455. let theType = "";
  1456. transactionChannel.map(function (item) {
  1457. if (item.value == str) {
  1458. theType = item.key;
  1459. }
  1460. });
  1461. return theType;
  1462. }
  1463. },
  1464. //交易科目
  1465. getTransactionProject: function (e) {
  1466. if (e || e == 0) {
  1467. let str = e.toString();
  1468. let theType = "";
  1469. transactionProject.map(function (item) {
  1470. if (item.value == str) {
  1471. theType = item.key;
  1472. }
  1473. });
  1474. return theType;
  1475. }
  1476. },
  1477. //项目状态
  1478. getProjectState: function (e) {
  1479. if (e || e == 0) {
  1480. let str = e.toString();
  1481. let theType = "";
  1482. projectState.map(function (item) {
  1483. if (item.value == str) {
  1484. theType = item.key;
  1485. }
  1486. });
  1487. return theType;
  1488. }
  1489. },
  1490. //任务状态
  1491. getTaskStatus: function (e) {
  1492. if (e || e == 0) {
  1493. let str = e.toString();
  1494. let theType = "";
  1495. taskStatus.map(function (item) {
  1496. if (item.value == str) {
  1497. theType = item.key;
  1498. }
  1499. });
  1500. return theType;
  1501. }
  1502. },
  1503. //公示状态
  1504. getPublishStatus: function (e) {
  1505. if (e || e == 0) {
  1506. let str = e.toString();
  1507. let theType = "";
  1508. publishStatus.map(function (item) {
  1509. if (item.value == str) {
  1510. theType = item.key;
  1511. }
  1512. });
  1513. return theType;
  1514. }
  1515. },
  1516. //变更状态
  1517. getChangeState: function (e) {
  1518. if (e || e == 0) {
  1519. let str = e.toString();
  1520. let theType = "";
  1521. changeState.map(function (item) {
  1522. if (item.value == str) {
  1523. theType = item.key;
  1524. }
  1525. });
  1526. return theType;
  1527. }
  1528. },
  1529. //分派情况
  1530. getDistributeState: function (e) {
  1531. if (e || e == 0) {
  1532. let str = e.toString();
  1533. let theType = "";
  1534. distributeState.map(function (item) {
  1535. if (item.value == str) {
  1536. theType = item.key;
  1537. }
  1538. });
  1539. return theType;
  1540. }
  1541. },
  1542. //客户来源
  1543. getCustomerSource: function (e) {
  1544. if (e || e == 0) {
  1545. let str = e.toString();
  1546. let theType = "";
  1547. customerSource.map(function (item) {
  1548. if (item.value == str) {
  1549. theType = item.key;
  1550. }
  1551. });
  1552. return theType;
  1553. }
  1554. },
  1555. //客户来源
  1556. getSlcRedit: function (e) {
  1557. if (e || e == 0) {
  1558. let str = e.toString();
  1559. let theType = "";
  1560. slcRedit.map(function (item) {
  1561. if (item.value == str) {
  1562. theType = item.key;
  1563. }
  1564. });
  1565. return theType;
  1566. }
  1567. },
  1568. //客户来源
  1569. getDataGrade: function (e) {
  1570. if (e || e == 0) {
  1571. let str = e.toString();
  1572. let theType = "";
  1573. dataGrade.map(function (item) {
  1574. if (item.value == str) {
  1575. theType = item.key;
  1576. }
  1577. });
  1578. return theType;
  1579. }
  1580. },
  1581. //客户等级
  1582. getLevel: function (e) {
  1583. if (e || e == 0) {
  1584. let str = e.toString();
  1585. let theType = "";
  1586. level.map(function (item) {
  1587. if (item.value == str) {
  1588. theType = item.key;
  1589. }
  1590. });
  1591. return theType;
  1592. }
  1593. },
  1594. //项目状态
  1595. getXiangmoState: function (e) {
  1596. if (e || e == 0) {
  1597. let str = e.toString();
  1598. let theType = "";
  1599. xiangmoState.map(function (item) {
  1600. if (item.value == str) {
  1601. theType = item.key;
  1602. }
  1603. });
  1604. return theType;
  1605. }
  1606. },
  1607. //订单状态
  1608. getNewOrderStatus: function (e) {
  1609. if (e || e == 0) {
  1610. let str = e.toString();
  1611. let theType = "";
  1612. newOrderStatus.map(function (item) {
  1613. if (item.value == str) {
  1614. theType = item.key;
  1615. }
  1616. });
  1617. return theType;
  1618. }
  1619. },
  1620. //催款状态
  1621. getCuikuan: function (e) {
  1622. if (e || e == 0) {
  1623. let str = e.toString();
  1624. let theType = "";
  1625. cuikuan.map(function (item) {
  1626. if (item.value == str) {
  1627. theType = item.key;
  1628. }
  1629. });
  1630. return theType;
  1631. }
  1632. },
  1633. //分配状态
  1634. // getAllotStatus:function (e) {
  1635. // if (e||e==0) {
  1636. // let str=e.toString()
  1637. // let theType = '';
  1638. // processStatus.map(function (item) {
  1639. // if (item.value == str) {
  1640. // theType = item.key;
  1641. // };
  1642. // });
  1643. // return theType;
  1644. // }
  1645. // },
  1646. //退单状态
  1647. getRefundStatus: function (e) {
  1648. if (e || e == 0) {
  1649. let str = e.toString();
  1650. let theType = "";
  1651. refundStatus.map(function (item) {
  1652. if (item.value == str) {
  1653. theType = item.key;
  1654. }
  1655. });
  1656. return theType;
  1657. }
  1658. },
  1659. //退单状态
  1660. getTaskStatus: function (e) {
  1661. if (e || e == 0) {
  1662. let str = e.toString();
  1663. let theType = "";
  1664. taskStatus.map(function (item) {
  1665. if (item.value == str) {
  1666. theType = item.key;
  1667. }
  1668. });
  1669. return theType;
  1670. }
  1671. },
  1672. //特批状态
  1673. getApproval: function (e, flag) {
  1674. if (flag) {
  1675. if (e == 0) {
  1676. return "非特批";
  1677. } else if (e == 1) {
  1678. return "特批待审核";
  1679. } else if (e == 2) {
  1680. return "特批通过";
  1681. } else if (e == 3) {
  1682. return "特批驳回";
  1683. } else {
  1684. return "未知";
  1685. }
  1686. }
  1687. if (e || e == 0) {
  1688. let str = e.toString();
  1689. let theType = "";
  1690. approval.map(function (item) {
  1691. if (item.value == str) {
  1692. theType = item.key;
  1693. }
  1694. });
  1695. return theType;
  1696. }
  1697. },
  1698. //流程状态
  1699. getPeople: function (val) {
  1700. if (val == 0) {
  1701. return "已派营销员";
  1702. } else if (val == 1) {
  1703. return "已派营销管理员";
  1704. } else if (val == 2) {
  1705. return "已派咨询师";
  1706. } else if (val == 3) {
  1707. return "已派咨询师经理";
  1708. } else if (val == 4) {
  1709. return "已派咨询师管理员";
  1710. } else if (val == 5) {
  1711. return "已派财务专员";
  1712. } else if (val == 6) {
  1713. return "已派财务总监";
  1714. }
  1715. },
  1716. //第三方信息状态----是否有材料
  1717. getMaterialStatus: function (val) {
  1718. if (val == 0) {
  1719. return "无材料";
  1720. } else if (val == 1) {
  1721. return "有材料";
  1722. }
  1723. },
  1724. //第三方信息状态----加急
  1725. getUrgentStatus: function (val) {
  1726. if (val == 0) {
  1727. return "无加急";
  1728. } else if (val == 1) {
  1729. return "加急3-5个工作日";
  1730. } else if (val == 2) {
  1731. return "加急6-10个工作日";
  1732. } else if (val == 3) {
  1733. return "加急11-15个工作日";
  1734. } else if (val == 4) {
  1735. return "加急16-20个工作日";
  1736. } else if (val == 5) {
  1737. return "加急21-25个工作日";
  1738. } else if (val == 6) {
  1739. return "加急26-30个工作日";
  1740. }
  1741. },
  1742. //审核状态
  1743. getStatus: function (val) {
  1744. if (val == 0) {
  1745. return "未提交";
  1746. } else if (val == 1) {
  1747. return "处理中";
  1748. } else if (val == 2) {
  1749. return "通过";
  1750. } else if (val == 3) {
  1751. return "拒绝";
  1752. } else if (val == 4) {
  1753. return "撤销";
  1754. }
  1755. },
  1756. //项目状态
  1757. getProjectStatus: function (e) {
  1758. let arr = projectStatusList.filter(v=>{
  1759. return v.value === e
  1760. });
  1761. if(arr.length){
  1762. return arr[0].label
  1763. }
  1764. return '';
  1765. },
  1766. //流程状态
  1767. getProcessStatus: function (e) {
  1768. if (e || e == 0) {
  1769. let str = e.toString();
  1770. let theType = "";
  1771. processStatus.map(function (item) {
  1772. if (item.value == str) {
  1773. theType = item.key;
  1774. }
  1775. });
  1776. return theType;
  1777. }
  1778. },
  1779. //结算状态
  1780. getLiquidationStatus: function (e) {
  1781. if (e || e == 0) {
  1782. let str = e.toString();
  1783. let theType = "";
  1784. liquidationStatus.map(function (item) {
  1785. if (item.value == str) {
  1786. theType = item.key;
  1787. }
  1788. });
  1789. return theType;
  1790. }
  1791. }, //
  1792. //新项目类型
  1793. getNewOrderType: function (e) {
  1794. if (e || e == 0) {
  1795. let str = e.toString();
  1796. let theType = "";
  1797. newOrderType.map(function (item) {
  1798. if (item.value == str) {
  1799. theType = item.key;
  1800. }
  1801. });
  1802. return theType;
  1803. }
  1804. },
  1805. //技术员发款类型
  1806. getJsyPaymentType: function (e) {
  1807. if (e || e == 0) {
  1808. let str = e.toString();
  1809. let theType = "";
  1810. jsyPaymentType.map(function (item) {
  1811. if (item.value == str) {
  1812. theType = item.key;
  1813. }
  1814. });
  1815. return theType;
  1816. } //
  1817. },
  1818. //奖金发放状态
  1819. getBonusState: function (e) {
  1820. if (e || e == 0) {
  1821. let str = e.toString();
  1822. let theType = "";
  1823. bonusState.map(function (item) {
  1824. if (item.value == str) {
  1825. theType = item.key;
  1826. }
  1827. });
  1828. return theType;
  1829. }
  1830. },
  1831. //技术员发款类型
  1832. getCustomerType: function (e) {
  1833. if (e || e == 0) {
  1834. let str = e.toString();
  1835. let theType = "";
  1836. customerType.map(function (item) {
  1837. if (item.value == str) {
  1838. theType = item.key;
  1839. }
  1840. });
  1841. return theType;
  1842. }
  1843. },
  1844. //技术员发款类型
  1845. getOrderTypes: function (e) {
  1846. if (e || e == 0) {
  1847. let str = e.toString();
  1848. let theType = "";
  1849. orderTypes.map(function (item) {
  1850. if (item.value == str) {
  1851. theType = item.key;
  1852. }
  1853. });
  1854. return theType;
  1855. }
  1856. },
  1857. //技术员发款类型
  1858. getjiedian: function (e) {
  1859. if (e || e == 0) {
  1860. let str = e.toString();
  1861. let theType = "";
  1862. jiedian.map(function (item) {
  1863. if (item.value == str) {
  1864. theType = item.key;
  1865. }
  1866. });
  1867. return theType;
  1868. }
  1869. },
  1870. //省内外
  1871. getProvinceA: function (e) {
  1872. if (e || e == 0) {
  1873. let str = e.toString();
  1874. let theType = "";
  1875. province.map(function (item) {
  1876. if (item.value == str) {
  1877. theType = item.key;
  1878. }
  1879. });
  1880. return theType;
  1881. }
  1882. },
  1883. //开票状态
  1884. getInvoiceStatus: function (e, record) {
  1885. if (record && record.approval == 1) {
  1886. return "特批待审核";
  1887. } else {
  1888. if (e || e == 0) {
  1889. let str = e.toString();
  1890. let theType = "";
  1891. invoiceStatus.map(function (item) {
  1892. if (item.value == str) {
  1893. theType = item.key;
  1894. }
  1895. });
  1896. return theType;
  1897. }
  1898. }
  1899. },
  1900. getApprovalA: function (e) {
  1901. if (e || e == 0) {
  1902. let str = e.toString();
  1903. let theType = "";
  1904. approvalA.map(function (item) {
  1905. if (item.value == str) {
  1906. theType = item.key;
  1907. }
  1908. });
  1909. return theType;
  1910. }
  1911. },
  1912. getProcessStatusNew: function (pro, status) {
  1913. // if (e||e==0) {
  1914. // let str=e.toString()
  1915. // let theType = '';
  1916. // processStatusNew.map(function (item) {
  1917. // if (item.value == str) {
  1918. // theType = item.key;
  1919. // };
  1920. // });
  1921. // return theType;
  1922. // }
  1923. let str = "";
  1924. if (pro == 0) {
  1925. str = "营销员";
  1926. } else if (pro == 1) {
  1927. str = "营销管理员";
  1928. } else if (pro == 2) {
  1929. str = "咨询师";
  1930. } else if (pro == 3) {
  1931. str = "咨询师经理";
  1932. } else if (pro == 4) {
  1933. str = "咨询师总监";
  1934. } else if (pro == 5) {
  1935. str = "财务专员";
  1936. } else if (pro == 6) {
  1937. str = "财务总监";
  1938. } else if (pro == 7) {
  1939. str = "总裁";
  1940. } else if (pro == 8) {
  1941. str = "董事长";
  1942. }
  1943. let num = "";
  1944. if (status == 0) {
  1945. num = "发起";
  1946. } else if (status == 1) {
  1947. num = "审核中";
  1948. } else if (status == 2) {
  1949. num = "通过";
  1950. } else if (status == 3) {
  1951. num = "驳回";
  1952. return num + "到" + str;
  1953. } else if (status == 4) {
  1954. num = "完成";
  1955. } else if (status == 5) {
  1956. num = "取消变更";
  1957. }
  1958. if (pro == 7 && status == 2) {
  1959. return "订单变更退票中 (财务处理中)";
  1960. } else if (pro == 8 && status == 2) {
  1961. return "订单变更退票中 (财务处理中)";
  1962. } else if (pro >= 7 && status == 4) {
  1963. return "订单变更已完成";
  1964. } else {
  1965. return str + num;
  1966. }
  1967. },
  1968. getContractChangeStatus: function (e) {
  1969. if (e || e == 0) {
  1970. let str = e.toString();
  1971. let theType = "";
  1972. contractChangeStatus.map(function (item) {
  1973. if (item.value == str) {
  1974. theType = item.key;
  1975. }
  1976. });
  1977. return theType;
  1978. }
  1979. },
  1980. // 咨询师以及咨询师经理审核内容显示
  1981. shenghePeo(arr, status) {
  1982. if (status == 2) {
  1983. arr = arr || [];
  1984. let str = "咨询师(";
  1985. for (let a = 0; a < arr.length; a++) {
  1986. if (arr[a].status == 0) {
  1987. str += arr[a].name + ",";
  1988. }
  1989. }
  1990. str = str.substr(0, str.length - 1);
  1991. return str + ")审核中";
  1992. }
  1993. if (status == 3) {
  1994. arr = arr || [];
  1995. let str = "咨询师经理(";
  1996. for (let a = 0; a < arr.length; a++) {
  1997. if (arr[a].status == 0) {
  1998. str += arr[a].name + ",";
  1999. }
  2000. }
  2001. str = str.substr(0, str.length - 1);
  2002. return str + ")审核中";
  2003. }
  2004. },
  2005. moneyVerify(e) {
  2006. if (!/^\d{1,3}(,?\d{3})*(\.\d{1,6})?$/.test(e)) {
  2007. message.warning("输入金额不符合规范");
  2008. return true;
  2009. }
  2010. },
  2011. // 消息提醒函数接口
  2012. ShowModal(fn) {
  2013. let flag = true;
  2014. $.ajax({
  2015. method: "get",
  2016. dataType: "json",
  2017. crossDomain: false,
  2018. url: globalConfig.context + "/api/admin/notice/unreadCount",
  2019. data: {},
  2020. success: function (data) {
  2021. if (data.data != 0) {
  2022. console.log(data);
  2023. fn.setState({
  2024. showModal: true,
  2025. });
  2026. }
  2027. },
  2028. });
  2029. // return flag
  2030. },
  2031. getType(e) {
  2032. if (e || e == 0) {
  2033. let str = e.toString();
  2034. let theType = "";
  2035. typeList.map(function (item) {
  2036. if (item.value == str) {
  2037. theType = item.key;
  2038. }
  2039. });
  2040. return theType;
  2041. }
  2042. },
  2043. changeColor(e) {
  2044. return (
  2045. <span style={{ color: "red", fontWeight: 900, fontSize: 16 }}>{e}</span>
  2046. );
  2047. },
  2048. getProjectName(e) {
  2049. let arr = projectStatusList.filter(v=>{
  2050. return v.value === e
  2051. });
  2052. if(arr.length){
  2053. return arr[0].label
  2054. }
  2055. return '';
  2056. },
  2057. download(fileName,deleteLv= true) {
  2058. window.open(globalConfig.context +`${'/open/download?fileName='+fileName+'&delete='+deleteLv}`);
  2059. }
  2060. };