tools.js 45 KB

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