searchArray.js 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910
  1. // 搜索用的下拉数据列表
  2. import {
  3. payOrderType,
  4. auditType,
  5. auditPaymentType,
  6. orderServerType,
  7. orderAuditType,
  8. rewardModeType,
  9. classTime,
  10. musicClassType,
  11. ProbationPeriodStatus,
  12. downListType,
  13. musicGroupType,
  14. conclusion,
  15. vipResetType,
  16. courseViewType,
  17. clientType,
  18. couponType,
  19. backType,
  20. memberEnum,
  21. coupontypeDetail,
  22. issue,
  23. feedbackType,
  24. feedbackTypeDesc,
  25. campState,
  26. catgGoupType,
  27. catRole,
  28. catType,
  29. quiteReason
  30. } from "../constant";
  31. // 课程类型
  32. let tenantConfig = sessionStorage.getItem("tenantConfig");
  33. tenantConfig = tenantConfig ? JSON.parse(tenantConfig) : {};
  34. let tenantId = tenantConfig.tenantId;
  35. let courseType = null;
  36. let musicCourseType = null;
  37. if (tenantId == 1) {
  38. musicCourseType = [
  39. {
  40. label: "声部课",
  41. value: "SINGLE"
  42. },
  43. {
  44. label: "合奏课",
  45. value: "MIX"
  46. },
  47. {
  48. label: "基础技能课",
  49. value: "HIGH"
  50. },
  51. {
  52. label: "线上基础技能课",
  53. value: "HIGH_ONLINE"
  54. },
  55. {
  56. label: "乐团网管课",
  57. value: "MUSIC_NETWORK"
  58. },
  59. {
  60. label: "集训声部课",
  61. value: "TRAINING_SINGLE"
  62. },
  63. {
  64. label: "集训合奏课",
  65. value: "TRAINING_MIX"
  66. },
  67. {
  68. label: "课堂课",
  69. value: "CLASSROOM"
  70. },
  71. {
  72. label: "综合课",
  73. value: "COMPREHENSIVE"
  74. }
  75. ];
  76. courseType = [
  77. {
  78. label: "声部课",
  79. value: "SINGLE"
  80. },
  81. {
  82. label: "合奏课",
  83. value: "MIX"
  84. },
  85. {
  86. label: "基础技能课",
  87. value: "HIGH"
  88. },
  89. {
  90. label: "线上基础技能课",
  91. value: "HIGH_ONLINE"
  92. },
  93. {
  94. label: "vip课",
  95. value: "VIP"
  96. },
  97. {
  98. label: "试听课",
  99. value: "DEMO"
  100. },
  101. {
  102. label: "综合课",
  103. value: "COMPREHENSIVE"
  104. },
  105. {
  106. label: "网管课",
  107. value: "PRACTICE"
  108. },
  109. {
  110. label: "乐团网管课",
  111. value: "MUSIC_NETWORK"
  112. },
  113. {
  114. label: "启蒙课",
  115. value: "ENLIGHTENMENT"
  116. },
  117. {
  118. label: "集训声部课",
  119. value: "TRAINING_SINGLE"
  120. },
  121. {
  122. label: "集训合奏课",
  123. value: "TRAINING_MIX"
  124. },
  125. {
  126. label: "课堂课",
  127. value: "CLASSROOM"
  128. },
  129. {
  130. label: "对外课",
  131. value: "COMM"
  132. }
  133. ];
  134. } else {
  135. musicCourseType = [
  136. {
  137. label: "声部课",
  138. value: "SINGLE"
  139. },
  140. {
  141. label: "合奏课",
  142. value: "MIX"
  143. },
  144. {
  145. label: "基础技能课",
  146. value: "HIGH"
  147. },
  148. {
  149. label: "集训声部课",
  150. value: "TRAINING_SINGLE"
  151. },
  152. {
  153. label: "集训合奏课",
  154. value: "TRAINING_MIX"
  155. },
  156. {
  157. label: "课堂课",
  158. value: "CLASSROOM"
  159. },
  160. {
  161. label: "综合课",
  162. value: "COMPREHENSIVE"
  163. }
  164. ];
  165. courseType = [
  166. {
  167. label: "声部课",
  168. value: "SINGLE"
  169. },
  170. {
  171. label: "合奏课",
  172. value: "MIX"
  173. },
  174. {
  175. label: "vip课",
  176. value: "VIP"
  177. },
  178. {
  179. label: "试听课",
  180. value: "DEMO"
  181. },
  182. {
  183. label: "综合课",
  184. value: "COMPREHENSIVE"
  185. },
  186. {
  187. label: "网管课",
  188. value: "PRACTICE"
  189. },
  190. {
  191. label: "启蒙课",
  192. value: "ENLIGHTENMENT"
  193. },
  194. {
  195. label: "集训声部课",
  196. value: "TRAINING_SINGLE"
  197. },
  198. {
  199. label: "集训合奏课",
  200. value: "TRAINING_MIX"
  201. },
  202. {
  203. label: "课堂课",
  204. value: "CLASSROOM"
  205. },
  206. {
  207. label: "对外课",
  208. value: "COMM"
  209. }
  210. ];
  211. }
  212. export { courseType, musicCourseType };
  213. export const courseListType = [
  214. {
  215. label: "乐团课",
  216. value: "MUSIC"
  217. },
  218. {
  219. label: "VIP课",
  220. value: "VIP"
  221. },
  222. {
  223. label: "网管课",
  224. value: "PRACTICE"
  225. }
  226. ];
  227. // 考勤状态
  228. export const attendance = [
  229. {
  230. label: "正常签到",
  231. value: 1
  232. },
  233. {
  234. label: "异常签到",
  235. value: 0
  236. }
  237. ];
  238. // 工作类型
  239. export const jobNature = [
  240. {
  241. label: "兼职",
  242. value: "PART_TIME"
  243. },
  244. {
  245. label: "全职",
  246. value: "FULL_TIME"
  247. },
  248. {
  249. label: "劳务",
  250. value: "LABOUR"
  251. }
  252. // { label: '临时工', value: 'TEMPORARY' }
  253. ];
  254. // 老师状态
  255. export const teacherStatus = [
  256. {
  257. label: "正常",
  258. value: "0"
  259. },
  260. {
  261. label: "冻结",
  262. value: "1"
  263. },
  264. {
  265. label: "锁定",
  266. value: "9"
  267. }
  268. ];
  269. export const stuAttendance = [
  270. {
  271. value: "NORMAL",
  272. label: "正常"
  273. },
  274. {
  275. value: "TRUANT",
  276. label: "旷课"
  277. },
  278. {
  279. value: "LEAVE",
  280. label: "请假"
  281. }
  282. ];
  283. // 考勤状态
  284. export const attendanceStatus = [
  285. ...stuAttendance,
  286. {
  287. value: "QUIT_SCHOOL",
  288. label: "休学"
  289. },
  290. {
  291. value: "DROP_OUT",
  292. label: "退学"
  293. },
  294. {
  295. value: "LATE",
  296. label: "迟到"
  297. }
  298. // { value: "DROP_OUT", label: "休学" }
  299. ];
  300. // 交易状态
  301. export const orderStatus = [
  302. {
  303. value: "APPLY",
  304. label: "报名"
  305. },
  306. {
  307. value: "RENEW",
  308. label: "续费"
  309. },
  310. {
  311. value: "MEMBER",
  312. label: "会员购买"
  313. },
  314. {
  315. value: "SMALL_CLASS_TO_BUY",
  316. label: "VIP购买"
  317. },
  318. {
  319. value: "SPORADIC",
  320. label: "零星收费"
  321. },
  322. {
  323. value: "LUCK",
  324. label: "福袋活动"
  325. },
  326. {
  327. value: "DEGREE_REGISTRATION",
  328. label: "考级报名"
  329. },
  330. {
  331. value: "DOUBLE_ELEVEN2020",
  332. label: "2020双十一活动"
  333. },
  334. {
  335. value: "DOUBLE_ELEVEN2021",
  336. label: "2021双十一活动"
  337. },
  338. {
  339. value: "DEGREE",
  340. label: "儿童节活动"
  341. },
  342. {
  343. value: "PRACTICE_GROUP_BUY",
  344. label: "网管课"
  345. },
  346. {
  347. value: "PRACTICE_GROUP_RENEW",
  348. label: "网管课续费"
  349. },
  350. {
  351. value: "REPAIR",
  352. label: "乐器维修"
  353. },
  354. {
  355. value: "OUTORDER",
  356. label: "外部收入"
  357. },
  358. {
  359. value: "GOODS_SELL",
  360. label: "商品销售"
  361. },
  362. {
  363. value: "MALL_BUY",
  364. label: "商城销售"
  365. },
  366. {
  367. value: "SUBJECT_CHANGE",
  368. label: "声部更换"
  369. },
  370. {
  371. value: "MAINTENANCE",
  372. label: "乐器保养"
  373. },
  374. {
  375. value: "ADD_STUDENT",
  376. label: "乐团报名"
  377. },
  378. {
  379. value: "REPLACEMENT",
  380. label: "乐器置换"
  381. },
  382. {
  383. value: "SCHOOL",
  384. label: "学校订单"
  385. },
  386. {
  387. value: "PERSONAL",
  388. label: "个人订单"
  389. },
  390. {
  391. value: "OTHER",
  392. label: "其他"
  393. },
  394. {
  395. value: "ACTIVITY",
  396. label: "活动购买"
  397. },
  398. {
  399. value: "LIVE_BUY",
  400. label: "直播购物"
  401. }
  402. ];
  403. // 交易状态
  404. export const dealStatus = [
  405. {
  406. value: "ING",
  407. label: "交易中"
  408. },
  409. {
  410. value: "SUCCESS",
  411. label: "成功交易"
  412. },
  413. {
  414. value: "FAILED",
  415. label: "交易失败"
  416. },
  417. {
  418. value: "CLOSE",
  419. label: "交易关闭"
  420. }
  421. ];
  422. export const vipGroupStatus = [
  423. {
  424. value: "0",
  425. text: "未开始"
  426. },
  427. {
  428. value: "1",
  429. text: "报名中"
  430. },
  431. {
  432. value: "5",
  433. text: "报名结束"
  434. },
  435. {
  436. value: "2",
  437. text: "进行中"
  438. },
  439. {
  440. value: "4",
  441. text: "已结束"
  442. },
  443. {
  444. value: "3",
  445. text: "取消"
  446. },
  447. {
  448. value: "6",
  449. text: "暂停"
  450. }
  451. ];
  452. // 课程状态
  453. export const courseStatus = [
  454. {
  455. value: "NOT_START",
  456. label: "未开始"
  457. },
  458. {
  459. value: "UNDERWAY",
  460. label: "进行中"
  461. },
  462. {
  463. value: "OVER",
  464. label: "已结束"
  465. }
  466. ];
  467. export const courseGroupStatus = [
  468. {
  469. value: "NORMAL",
  470. label: "正常"
  471. },
  472. {
  473. value: "LOCK",
  474. label: "锁定"
  475. },
  476. {
  477. value: "FINISH",
  478. label: "结束"
  479. },
  480. {
  481. value: "CANCEL",
  482. label: "取消"
  483. }
  484. ];
  485. export const commGroupStatus = [
  486. {
  487. value: "NORMAL",
  488. label: "进行中"
  489. },
  490. {
  491. value: "FINISH",
  492. label: "结束"
  493. },
  494. {
  495. value: "CANCEL",
  496. label: "关闭"
  497. },
  498. {
  499. value: "LOCK",
  500. label: "锁定"
  501. }
  502. ];
  503. // 老师时间充值状态
  504. export const teacherTimeStatus = [
  505. {
  506. value: "RECHARGE",
  507. label: "充值"
  508. },
  509. {
  510. value: "CONSUME",
  511. label: "建课"
  512. },
  513. {
  514. value: "RETURN",
  515. label: "退课"
  516. },
  517. {
  518. value: "MANUAL_ADD",
  519. label: "系统充值"
  520. },
  521. {
  522. value: "MANUAL_SUB",
  523. label: "系统扣除"
  524. }
  525. ];
  526. export const practiceGroupType = [
  527. {
  528. value: "FREE",
  529. label: "免费"
  530. },
  531. {
  532. value: "CHARGE",
  533. label: "收费"
  534. },
  535. {
  536. value: "TRIAL",
  537. label: "试听课"
  538. },
  539. {
  540. value: "CARE_PACKAGE",
  541. label: "关心包"
  542. },
  543. {
  544. value: "COME_ON_PACKAGE",
  545. label: "加油包"
  546. }
  547. ];
  548. export const visitChiose = [
  549. {
  550. value: "课程推荐",
  551. label: "课程推荐",
  552. children: [
  553. {
  554. value: "新课推荐",
  555. label: "新课推荐"
  556. },
  557. {
  558. value: "续费提醒",
  559. label: "续费提醒"
  560. }
  561. ]
  562. },
  563. {
  564. value: "常规回访",
  565. label: "常规回访",
  566. children: [
  567. {
  568. value: "课后及训练回访",
  569. label: "课后及训练回访"
  570. },
  571. {
  572. value: "练习及乐团表现",
  573. label: "练习及乐团表现"
  574. }
  575. ]
  576. },
  577. {
  578. value: "其它",
  579. label: "其它",
  580. children: [
  581. {
  582. value: "其它",
  583. label: "其它"
  584. }
  585. ]
  586. }
  587. ];
  588. export const visitChiose1 = [
  589. {
  590. value: "课程推荐",
  591. label: "课程推荐",
  592. children: [
  593. {
  594. value: "新课推荐",
  595. label: "新课推荐"
  596. },
  597. {
  598. value: "续费提醒",
  599. label: "续费提醒"
  600. }
  601. ]
  602. },
  603. {
  604. value: "常规回访",
  605. label: "常规回访",
  606. children: [
  607. {
  608. value: "课后及训练回访",
  609. label: "课后及训练回访"
  610. },
  611. {
  612. value: "练习及乐团表现",
  613. label: "练习及乐团表现"
  614. },
  615. {
  616. label: "考勤申诉",
  617. value: "考勤申诉"
  618. },
  619. {
  620. value: "异常请假回访",
  621. label: "异常请假回访"
  622. }
  623. ]
  624. },
  625. {
  626. value: "小课回访",
  627. label: "小课回访",
  628. children: [
  629. {
  630. value: "VIP课回访",
  631. label: "VIP课回访"
  632. },
  633. {
  634. value: "乐理课回访",
  635. label: "乐理课回访"
  636. },
  637. {
  638. value: "网管课回访",
  639. label: "网管课回访"
  640. }
  641. ]
  642. },
  643. {
  644. value: "云教练",
  645. label: "云教练",
  646. children: [
  647. {
  648. value: "体验回访",
  649. label: "体验回访"
  650. }
  651. ]
  652. },
  653. {
  654. value: "其它",
  655. label: "其它",
  656. children: [
  657. {
  658. value: "其它",
  659. label: "其它"
  660. },
  661. {
  662. value: "会员续费",
  663. label: "会员续费"
  664. }
  665. ]
  666. }
  667. ];
  668. // 交易状态
  669. export const paymentChannelStatus = [
  670. {
  671. value: "YQPAY",
  672. label: "双乾"
  673. },
  674. {
  675. value: "BALANCE",
  676. label: "余额"
  677. },
  678. {
  679. value: "ADAPAY",
  680. label: "汇付"
  681. }
  682. ];
  683. // 销售类型
  684. export const saleStatus = [
  685. {
  686. value: "INSTRUMENT",
  687. label: "乐器销售"
  688. },
  689. {
  690. value: "ACCESSORIES",
  691. label: "配件销售"
  692. },
  693. {
  694. value: "SCHOOL_BUY",
  695. label: "学校采购"
  696. },
  697. {
  698. value: "OTHER",
  699. label: "其它"
  700. }
  701. ];
  702. // 商品类型
  703. export const goodsType = [
  704. {
  705. value: "INSTRUMENT",
  706. label: "乐器"
  707. },
  708. {
  709. value: "ACCESSORIES",
  710. label: "辅件"
  711. },
  712. {
  713. value: "TEACHING",
  714. label: "教材"
  715. },
  716. {
  717. value: "STAFF",
  718. label: "教谱"
  719. },
  720. {
  721. value: "OTHER",
  722. label: "其它"
  723. }
  724. ];
  725. export const classStatus = [
  726. {
  727. value: "1",
  728. label: "一年级"
  729. },
  730. {
  731. value: "2",
  732. label: "二年级"
  733. },
  734. {
  735. value: "3",
  736. label: "三年级"
  737. },
  738. {
  739. value: "4",
  740. label: "四年级"
  741. },
  742. {
  743. value: "5",
  744. label: "五年级"
  745. },
  746. {
  747. value: "6",
  748. label: "六年级"
  749. },
  750. {
  751. value: "7",
  752. label: "初一"
  753. },
  754. {
  755. value: "8",
  756. label: "初二"
  757. },
  758. {
  759. value: "9",
  760. label: "初三"
  761. },
  762. {
  763. value: "10",
  764. label: "高一"
  765. },
  766. {
  767. value: "11",
  768. label: "高二"
  769. },
  770. {
  771. value: "12",
  772. label: "高三"
  773. }
  774. ];
  775. // 库存类型
  776. export const stockType = [
  777. {
  778. value: "INTERNAL",
  779. label: "内部"
  780. },
  781. {
  782. value: "EXTERNAL",
  783. label: "外部"
  784. },
  785. {
  786. value: "ALL",
  787. label: "全部"
  788. }
  789. ];
  790. // export const musicGroupStatus = [
  791. // { value: 'DRAFT', text: '编辑中' },
  792. // { value: 'AUDIT', text: '审核中' },
  793. // { value: 'PRE_APPLY', text: '预报名中' },
  794. // { value: 'PRE_BUILD_FEE', text: '创建缴费中' },
  795. // { value: 'APPLY', text: '报名中' },
  796. // { value: 'PAY', text: '缴费中' },
  797. // { value: 'PREPARE', text: '筹备中' },
  798. // { value: 'PROGRESS', text: '进行中' },
  799. // { value: 'FEE_AUDIT', text: '费用审核中' },
  800. // { value: 'AUDIT_FAILED', text: '审核失败' },
  801. // { value: 'PAUSE', text: '暂停' },
  802. // { value: 'CANCELED', text: '取消' },
  803. // { value: 'CLOSE', text: '已关闭' },
  804. // ]
  805. export const vipResetTypeList = [
  806. {
  807. label: "不限制",
  808. value: "1"
  809. },
  810. {
  811. label: "线上不可调为线下",
  812. value: "0"
  813. },
  814. {
  815. label: "线下不可调为线上",
  816. value: "2"
  817. },
  818. {
  819. label: "线上线下不可互调",
  820. value: "3"
  821. }
  822. ];
  823. export const musicGroupStatus = getValueForKey(musicGroupType);
  824. export const classTimeList = getValueForKey(classTime);
  825. export const courseViewTypeList = getValueForKey(courseViewType);
  826. export const payOrderTypeList = getValueForKey(payOrderType);
  827. export const auditTypeList = getValueForKey(auditType);
  828. export const auditPaymentTypeList = getValueForKey(auditPaymentType);
  829. export const orderServerList = getValueForKey(orderServerType);
  830. export const orderAuditTypeList = getValueForKey(orderAuditType);
  831. export const rewardModeTypeList = getValueForKey(rewardModeType);
  832. export const musicClassTypeList = getValueForKey(musicClassType);
  833. export const ProbationPeriodList = getValueForKey(ProbationPeriodStatus);
  834. export const downTypeList = getValueForKey(downListType);
  835. export const conclusionList = getValueForKey(conclusion);
  836. export const clientList = getValueForKey(clientType);
  837. export const couponTypeList = getValueForKey(couponType);
  838. export const backTypeList = getValueForKey(backType);
  839. export const memberEnumList = getValueForKey(memberEnum);
  840. export const coupontypeDetailList = getValueForKey(coupontypeDetail);
  841. export const issueList = getValueForKey(issue);
  842. export const feedbackTypeList = getValueForKey(feedbackType);
  843. export const feedbackTypeDescList = getValueForKey(feedbackTypeDesc);
  844. export const campStateList = getValueForKey(campState);
  845. export const catgGoupTypeList = getValueForKey(catgGoupType);
  846. export const catRoleList = getValueForKey(catRole);
  847. export const catTypeList = getValueForKey(catType);
  848. export const quiteReasonList = getValueForKey(quiteReason);
  849. //downListType
  850. function getValueForKey(obj) {
  851. let arr = [];
  852. for (let k in obj) {
  853. arr.push({
  854. label: obj[k],
  855. value: k
  856. });
  857. }
  858. return arr;
  859. }
  860. export const array2object = (array, [lk, vk] = ["value", "label"]) => {
  861. const object = {};
  862. if (array && array.length) {
  863. for (const item of array) {
  864. object[item[lk]] = item[vk];
  865. }
  866. }
  867. return object;
  868. };
  869. // export {
  870. // courseType,
  871. // attendance,
  872. // jobNature,
  873. // teacherStatus,
  874. // attendanceStatus,
  875. // orderStatus,
  876. // dealStatus,
  877. // musicGroupStatus,
  878. // vipGroupStatus,
  879. // courseStatus,
  880. // teacherTimeStatus,
  881. // courseGroupStatus,
  882. // commGroupStatus,
  883. // courseListType,
  884. // practiceGroupType,
  885. // visitChiose,
  886. // paymentChannelStatus,
  887. // saleStatus,
  888. // goodsType,
  889. // classStatus,
  890. // stockType,
  891. // classTimeList
  892. // }