searchArray.js 15 KB

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