logTableConfig.tsx 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. import { Badge } from "antd";
  2. import { ColumnsType } from "antd/lib/table";
  3. import React from "react";
  4. const columnsLog = (): ColumnsType<any> => {
  5. const dataSource: ColumnsType<any> = [
  6. {
  7. title: 'ID',
  8. dataIndex: 'id',
  9. key: 'id',
  10. width: 50,
  11. align: 'center'
  12. },
  13. {
  14. title: '订单编号',
  15. dataIndex: 'orderNo',
  16. key: 'orderNo',
  17. width: 120,
  18. ellipsis: true
  19. },
  20. {
  21. title: '回传序号',
  22. dataIndex: 'backIndex',
  23. key: 'backIndex',
  24. width: 80,
  25. align: 'center'
  26. },
  27. {
  28. title: '拆分的回传金额',
  29. dataIndex: 'splitMoney',
  30. key: 'splitMoney',
  31. width: 100,
  32. align: 'center'
  33. },
  34. {
  35. title: '回传时间',
  36. dataIndex: 'backTime',
  37. key: 'backTime',
  38. width: 130,
  39. align: 'center',
  40. ellipsis: true
  41. },
  42. {
  43. title: '真实的回传时间',
  44. dataIndex: 'executeTime',
  45. key: 'executeTime',
  46. width: 130,
  47. align: 'center',
  48. ellipsis: true
  49. },
  50. {
  51. title: '回传状态',
  52. dataIndex: 'backStatus',
  53. key: 'backStatus',
  54. width: 90,
  55. align: 'center',
  56. render: (a: any) => {
  57. return a === -1 ? <Badge status="error" text="回传失败" /> : a === 0 ? <Badge status="warning" text="未回传" /> : a === 1 ? <Badge status="success" text="回传成功" /> : a === 2 ? <Badge status="default" text="部分成功" /> : '--'
  58. }
  59. },
  60. {
  61. title: '回传失败消息',
  62. dataIndex: 'backErrorMsg',
  63. key: 'backErrorMsg',
  64. ellipsis: true,
  65. width: 250
  66. },
  67. ];
  68. return dataSource
  69. }
  70. export default columnsLog