data.ts 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753
  1. import { FormSchema } from '/@/components/Form/index';
  2. import { BasicColumn, FormProps } from '/@/components/Table';
  3. import { Time } from '/@/components/Time';
  4. import { h } from 'vue';
  5. import { incrementUseTypeList } from '/@/api/account';
  6. import { useI18n } from '/@/hooks/web/useI18n';
  7. const { t } = useI18n();
  8. export interface ListItem {
  9. key: string;
  10. title: string;
  11. description: string;
  12. extra?: string;
  13. avatar?: string;
  14. color?: string;
  15. }
  16. // tab的list
  17. export const settingList = [
  18. {
  19. key: '1',
  20. name: '用户概览',
  21. component: 'Overview',
  22. },
  23. {
  24. key: '2',
  25. name: '订单列表',
  26. component: 'OrderList',
  27. },
  28. {
  29. key: '3',
  30. name: '产品数据',
  31. component: 'Product',
  32. },
  33. ];
  34. // 基础设置 form
  35. export const baseSetschemas: FormSchema[] = [
  36. {
  37. field: 'email',
  38. component: 'Input',
  39. label: '邮箱',
  40. colProps: { span: 18 },
  41. },
  42. {
  43. field: 'name',
  44. component: 'Input',
  45. label: '昵称',
  46. colProps: { span: 18 },
  47. },
  48. {
  49. field: 'introduction',
  50. component: 'InputTextArea',
  51. label: '个人简介',
  52. colProps: { span: 18 },
  53. },
  54. {
  55. field: 'phone',
  56. component: 'Input',
  57. label: '联系电话',
  58. colProps: { span: 18 },
  59. },
  60. {
  61. field: 'address',
  62. component: 'Input',
  63. label: '所在地区',
  64. colProps: { span: 18 },
  65. },
  66. ];
  67. // 安全设置 list
  68. export const secureSettingList: ListItem[] = [
  69. {
  70. key: '1',
  71. title: '账户密码',
  72. description: '当前密码强度::强',
  73. extra: '修改',
  74. },
  75. {
  76. key: '2',
  77. title: '密保手机',
  78. description: '已绑定手机::138****8293',
  79. extra: '修改',
  80. },
  81. {
  82. key: '3',
  83. title: '密保问题',
  84. description: '未设置密保问题,密保问题可有效保护账户安全',
  85. extra: '修改',
  86. },
  87. {
  88. key: '4',
  89. title: '备用邮箱',
  90. description: '已绑定邮箱::ant***sign.com',
  91. extra: '修改',
  92. },
  93. {
  94. key: '5',
  95. title: 'MFA 设备',
  96. description: '未绑定 MFA 设备,绑定后,可以进行二次确认',
  97. extra: '修改',
  98. },
  99. ];
  100. // 账号绑定 list
  101. export const accountBindList: ListItem[] = [
  102. {
  103. key: '1',
  104. title: '绑定淘宝',
  105. description: '当前未绑定淘宝账号',
  106. extra: '绑定',
  107. avatar: 'ri:taobao-fill',
  108. color: '#ff4000',
  109. },
  110. {
  111. key: '2',
  112. title: '绑定支付宝',
  113. description: '当前未绑定支付宝账号',
  114. extra: '绑定',
  115. avatar: 'fa-brands:alipay',
  116. color: '#2eabff',
  117. },
  118. {
  119. key: '3',
  120. title: '绑定钉钉',
  121. description: '当前未绑定钉钉账号',
  122. extra: '绑定',
  123. avatar: 'ri:dingding-fill',
  124. color: '#2eabff',
  125. },
  126. ];
  127. // 新消息通知 list
  128. export const msgNotifyList: ListItem[] = [
  129. {
  130. key: '1',
  131. title: '账户密码',
  132. description: '其他用户的消息将以站内信的形式通知',
  133. },
  134. {
  135. key: '2',
  136. title: '系统消息',
  137. description: '系统消息将以站内信的形式通知',
  138. },
  139. {
  140. key: '3',
  141. title: '待办任务',
  142. description: '待办任务将以站内信的形式通知',
  143. },
  144. ];
  145. //权益订单
  146. export const equityColumns: BasicColumn[] = [
  147. {
  148. title: '下单时间',
  149. dataIndex: 'createTime',
  150. width: 150,
  151. customRender: ({ record }) => {
  152. return (
  153. record.createTime &&
  154. h(Time, {
  155. value: record.createTime,
  156. mode: 'datetime',
  157. })
  158. );
  159. },
  160. },
  161. {
  162. title: '订单号',
  163. dataIndex: 'orderSn',
  164. ellipsis: false,
  165. width: 180,
  166. },
  167. {
  168. title: '用户账号',
  169. dataIndex: 'userName',
  170. width: 100,
  171. },
  172. {
  173. title: '合同所属公司',
  174. dataIndex: 'companyName',
  175. ellipsis: true,
  176. width: 230,
  177. },
  178. {
  179. title: '业务部门',
  180. dataIndex: 'businessDept',
  181. ellipsis: true,
  182. width: 120,
  183. },
  184. {
  185. title: '业务员',
  186. dataIndex: 'businessName',
  187. ellipsis: true,
  188. width: 120,
  189. },
  190. {
  191. title: '客户付款时间',
  192. dataIndex: 'customerPayTime',
  193. ellipsis: true,
  194. width: 160,
  195. },
  196. {
  197. title: '客户名称',
  198. dataIndex: 'customerName',
  199. width: 100,
  200. },
  201. {
  202. title: '客户类别',
  203. dataIndex: 'customerTypeStr',
  204. width: 100,
  205. customRender: ({ record }) => {
  206. return record.customerType == 1 ? '经销' : '直销';
  207. },
  208. },
  209. {
  210. title: '终端客户',
  211. dataIndex: 'endCustomer',
  212. width: 100,
  213. },
  214. {
  215. title: '经销商名称',
  216. dataIndex: 'agentName',
  217. width: 100,
  218. },
  219. {
  220. title: '使用类型',
  221. dataIndex: 'useTypeStr',
  222. width: 100,
  223. },
  224. {
  225. title: '权益类型',
  226. dataIndex: 'memberLevels',
  227. width: 100,
  228. },
  229. {
  230. title: '订单金额',
  231. dataIndex: 'amount',
  232. width: 80,
  233. },
  234. {
  235. title: '币种',
  236. dataIndex: 'currencySymbol',
  237. width: 80,
  238. },
  239. {
  240. title: '数量',
  241. dataIndex: 'count',
  242. width: 80,
  243. },
  244. {
  245. title: '支付方式',
  246. dataIndex: 'payMethod',
  247. // slots: { customRender: 'orderType' },
  248. width: 80,
  249. },
  250. {
  251. title: '交易号',
  252. dataIndex: 'number',
  253. width: 180,
  254. },
  255. {
  256. title: '付款状态',
  257. dataIndex: 'payStatus',
  258. // slots: { customRender: 'orderStatus' },
  259. customRender: ({ record }) => {
  260. return record.payStatus ? record.payStatus : '-';
  261. },
  262. width: 80,
  263. },
  264. {
  265. title: '充值方式',
  266. dataIndex: 'payMethod',
  267. width: 100,
  268. },
  269. {
  270. title: '会员服务期限',
  271. dataIndex: 'incrementTime',
  272. width: 100,
  273. },
  274. {
  275. title: 'SN码',
  276. dataIndex: 'snCode',
  277. width: 100,
  278. },
  279. {
  280. title: '项目号',
  281. dataIndex: 'projectNum',
  282. width: 100,
  283. },
  284. {
  285. title: '备注',
  286. dataIndex: 'remark',
  287. width: 100,
  288. },
  289. ];
  290. export const equitySearchForm: Partial<FormProps> = {
  291. labelWidth: 100,
  292. autoSubmitOnEnter: true,
  293. autoAdvancedLine: 1,
  294. actionColOptions: {
  295. span: 24,
  296. },
  297. schemas: [
  298. {
  299. field: 'ctivated',
  300. label: '下单时间',
  301. component: 'RangePicker',
  302. componentProps: {
  303. maxLength: 100,
  304. format: 'YYYY-MM-DD',
  305. valueFormat: 'YYYY-MM-DD',
  306. },
  307. colProps: {
  308. xl: 8,
  309. xxl: 8,
  310. },
  311. },
  312. {
  313. field: 'orderSn',
  314. label: '订单号',
  315. component: 'Input',
  316. componentProps: {
  317. maxLength: 100,
  318. },
  319. colProps: {
  320. xl: 8,
  321. xxl: 8,
  322. },
  323. },
  324. {
  325. field: 'userName',
  326. label: '用户账号',
  327. component: 'Input',
  328. componentProps: {
  329. maxLength: 100,
  330. },
  331. colProps: {
  332. xl: 8,
  333. xxl: 8,
  334. },
  335. },
  336. {
  337. field: 'tradeNum',
  338. label: '交易号',
  339. component: 'Input',
  340. componentProps: {
  341. maxLength: 100,
  342. },
  343. colProps: {
  344. span: 8,
  345. },
  346. },
  347. {
  348. field: 'customerType',
  349. component: 'Select',
  350. label: '客户类别',
  351. colProps: {
  352. span: 8,
  353. },
  354. componentProps: {
  355. options: [
  356. {
  357. label: '直销',
  358. value: 0,
  359. key: '0',
  360. },
  361. {
  362. label: '经销',
  363. value: 1,
  364. key: '1',
  365. },
  366. ],
  367. },
  368. },
  369. {
  370. field: 'useType',
  371. component: 'ApiSelect',
  372. label: '使用类型',
  373. componentProps: {
  374. // filterOption: onFilterOption,
  375. // showSearch: true,
  376. api: incrementUseTypeList,
  377. labelField: 'name',
  378. valueField: 'id',
  379. immediate: true,
  380. },
  381. colProps: {
  382. span: 8,
  383. },
  384. },
  385. {
  386. field: 'payMethod',
  387. component: 'Select',
  388. label: '充值方式',
  389. colProps: {
  390. span: 8,
  391. },
  392. componentProps: {
  393. options: [
  394. {
  395. label: '线上',
  396. value: 0,
  397. key: '0',
  398. },
  399. {
  400. label: '线下',
  401. value: 1,
  402. key: '1',
  403. },
  404. ],
  405. },
  406. },
  407. {
  408. field: 'companyName',
  409. component: 'Select',
  410. label: '合同所属公司',
  411. colProps: {
  412. span: 8,
  413. },
  414. itemProps: {
  415. autoLink: false,
  416. },
  417. componentProps: {
  418. options: [
  419. {
  420. label: '珠海市四维时代网络科技有限公司',
  421. value: '珠海市四维时代网络科技有限公司',
  422. key: '珠海市四维时代网络科技有限公司',
  423. },
  424. {
  425. label: '广东四维看看智能设备有限公司',
  426. value: '广东四维看看智能设备有限公司',
  427. key: '广东四维看看智能设备有限公司',
  428. },
  429. {
  430. label: '四维看看(香港)有限公司',
  431. value: '四维看看(香港)有限公司',
  432. key: '四维看看(香港)有限公司',
  433. },
  434. {
  435. label: '四维看看(北京)数据科技有限公司',
  436. value: '四维看看(北京)数据科技有限公司',
  437. key: '四维看看(北京)数据科技有限公司',
  438. },
  439. ],
  440. },
  441. },
  442. {
  443. field: 'businessDept',
  444. component: 'Select',
  445. label: '业务部门',
  446. colProps: {
  447. span: 8,
  448. },
  449. itemProps: {
  450. autoLink: false,
  451. },
  452. componentProps: {
  453. options: [
  454. {
  455. label: '数字营销事业部',
  456. value: '数字营销事业部',
  457. key: '数字营销事业部',
  458. },
  459. {
  460. label: '政企事业部',
  461. value: '政企事业部',
  462. key: '政企事业部',
  463. },
  464. {
  465. label: '海外事业部',
  466. value: '海外事业部',
  467. key: '海外事业部',
  468. },
  469. {
  470. label: '市场部',
  471. value: '市场部',
  472. key: '市场部',
  473. },
  474. {
  475. label: '总经办',
  476. value: '总经办',
  477. key: '总经办',
  478. },
  479. ],
  480. },
  481. },
  482. {
  483. field: 'amount',
  484. component: 'Input',
  485. label: '订单金额',
  486. colProps: { span: 7 },
  487. componentProps: {
  488. type: 'number',
  489. },
  490. },
  491. ],
  492. };
  493. export const orderSearchForm: Partial<FormProps> = {
  494. labelWidth: 100,
  495. autoSubmitOnEnter: true,
  496. autoAdvancedLine: 1,
  497. actionColOptions: {
  498. span: 24,
  499. },
  500. schemas: [
  501. {
  502. field: 'orderSn',
  503. label: '订单号',
  504. component: 'Input',
  505. componentProps: {
  506. maxLength: 100,
  507. },
  508. colProps: {
  509. xl: 8,
  510. xxl: 8,
  511. },
  512. },
  513. // {
  514. // field: 'userName',
  515. // label: '用户账号',
  516. // component: 'Input',
  517. // componentProps: {
  518. // maxLength: 100,
  519. // },
  520. // colProps: {
  521. // xl: 7,
  522. // xxl: 7,
  523. // },
  524. // },
  525. {
  526. field: 'tradeNum',
  527. label: '交易号',
  528. component: 'Input',
  529. componentProps: {
  530. maxLength: 100,
  531. },
  532. colProps: {
  533. xl: 8,
  534. xxl: 8,
  535. },
  536. },
  537. {
  538. field: 'ctivated',
  539. label: '下单时间',
  540. component: 'RangePicker',
  541. componentProps: {
  542. maxLength: 100,
  543. format: 'YYYY-MM-DD',
  544. valueFormat: 'YYYY-MM-DD',
  545. },
  546. colProps: {
  547. xl: 8,
  548. xxl: 8,
  549. },
  550. },
  551. ],
  552. };
  553. //下载订单
  554. export const dowmColumns: BasicColumn[] = [
  555. {
  556. title: '下单时间',
  557. dataIndex: 'createTime',
  558. width: 150,
  559. customRender: ({ record }) => {
  560. return (
  561. record.createTime &&
  562. h(Time, {
  563. value: record.createTime,
  564. mode: 'datetime',
  565. })
  566. );
  567. },
  568. },
  569. {
  570. title: '订单号',
  571. dataIndex: 'orderSn',
  572. ellipsis: false,
  573. width: 180,
  574. },
  575. {
  576. title: '用户账号',
  577. dataIndex: 'userName',
  578. width: 120,
  579. },
  580. {
  581. title: '合同所属公司',
  582. dataIndex: 'companyName',
  583. ellipsis: true,
  584. width: 230,
  585. },
  586. {
  587. title: '业务部门',
  588. dataIndex: 'businessDept',
  589. ellipsis: true,
  590. width: 120,
  591. },
  592. {
  593. title: '业务员',
  594. dataIndex: 'businessName',
  595. ellipsis: true,
  596. width: 120,
  597. },
  598. {
  599. title: '客户付款时间',
  600. dataIndex: 'customerPayTime',
  601. ellipsis: true,
  602. width: 160,
  603. },
  604. {
  605. title: 'SN码',
  606. dataIndex: 'snCode',
  607. width: 120,
  608. },
  609. {
  610. title: '场景',
  611. dataIndex: 'sceneNum',
  612. width: 100,
  613. },
  614. {
  615. title: '客户名称',
  616. dataIndex: 'customerName',
  617. width: 100,
  618. },
  619. {
  620. title: '客户类别',
  621. dataIndex: 'customerTypeStr',
  622. width: 100,
  623. },
  624. {
  625. title: '终端客户',
  626. dataIndex: 'endCustomer',
  627. width: 100,
  628. },
  629. {
  630. title: '经销商名称',
  631. dataIndex: 'agentName',
  632. width: 100,
  633. },
  634. {
  635. title: '使用类型',
  636. dataIndex: 'useTypeStr',
  637. width: 100,
  638. },
  639. {
  640. title: '下载类型',
  641. dataIndex: 'downTypeStr',
  642. width: 100,
  643. customRender: ({ record }) => {
  644. return record.payMethod == '线下' ? '-' : record.downTypeStr;
  645. },
  646. },
  647. {
  648. title: '订单金额(元)',
  649. dataIndex: 'amount',
  650. width: 80,
  651. },
  652. {
  653. title: '币种',
  654. dataIndex: 'currencySymbol',
  655. width: 80,
  656. },
  657. {
  658. title: '数量',
  659. dataIndex: 'count',
  660. width: 100,
  661. },
  662. {
  663. title: '支付方式',
  664. dataIndex: 'payMethod',
  665. // slots: { customRender: 'orderType' },
  666. width: 80,
  667. },
  668. {
  669. title: '交易号',
  670. dataIndex: 'number',
  671. width: 180,
  672. },
  673. {
  674. title: '付款状态',
  675. dataIndex: 'payStatus',
  676. width: 80,
  677. customRender: ({ record }) => {
  678. return record.payStatus ? record.payStatus : '-';
  679. },
  680. },
  681. {
  682. title: '充值方式',
  683. dataIndex: 'payMethod',
  684. width: 180,
  685. },
  686. {
  687. title: '项目号',
  688. dataIndex: 'projectNum',
  689. width: 100,
  690. },
  691. {
  692. title: '备注',
  693. dataIndex: 'remark',
  694. width: 100,
  695. },
  696. ];
  697. //相机订单
  698. export const cameraColumns: BasicColumn[] = [
  699. {
  700. title: '下单时间',
  701. dataIndex: 'orderTime',
  702. width: 150,
  703. customRender: ({ record }) => {
  704. return (
  705. record.orderTime &&
  706. h(Time, {
  707. value: record.orderTime,
  708. mode: 'datetime',
  709. })
  710. );
  711. },
  712. },
  713. {
  714. title: '订单号',
  715. dataIndex: 'orderSn',
  716. ellipsis: false,
  717. width: 180,
  718. },
  719. {
  720. title: '用户账号',
  721. dataIndex: 'userName',
  722. ellipsis: false,
  723. width: 120,
  724. },
  725. {
  726. title: '订单金额(元)',
  727. dataIndex: 'goodsAmount',
  728. ellipsis: false,
  729. width: 120,
  730. },
  731. {
  732. title: '支付方式',
  733. dataIndex: 'paymentTypeName',
  734. width: 80,
  735. },
  736. {
  737. title: '交易号',
  738. dataIndex: 'tradeNum',
  739. width: 220,
  740. },
  741. {
  742. title: '订单状态',
  743. dataIndex: 'paymentStatus',
  744. // slots: { customRender: 'orderStatus' },
  745. width: 80,
  746. },
  747. ];