import { dateUtil } from '/nerv-lib/util/date-util';

export const tableConfig = {
  title: '企业管理',
  api: '/carbon_emission/device/getDeviceList',

  params: {
    page: 0,
    pageSize: 10,
  },
  rowSelection: null,
  columns: [
    {
      title: '设备id',
      dataIndex: 'id',
    },
    {
      title: '设备编号',
      dataIndex: 'deviceCode',
    },
    {
      title: '设备名称',
      dataIndex: 'deviceName',
      textNumber: 8,
      textEllipsis: true,
    },
    {
      title: '设备类别',
      dataIndex: 'position',
    },
  ],
  columnActions: {
    title: '操作',
    actions: [
      {
        label: '删除',
        name: 'AppointMessageRefund',
        confirm: true,
      },
    ],
  },

  formConfig: {
    schemas: [
      {
        field: 'createTime',
        label: '支付时间',
        component: 'NsRangePicker',
        fieldMap: ['queryStartDate', 'queryEndDate'],
        componentProps: {
          valueFormat: 'YYYY-MM-DD',
        },
      },
      {
        field: 'payWay',
        label: '支付方式',
        component: 'NsSelect',
        componentProps: {
          placeholder: '请选择',
          options: [
            {
              label: '全部',
              value: '',
            },
            {
              label: '现金',
              value: 1,
            },
            {
              label: '支付宝',
              value: 2,
            },
            {
              label: '微信',
              value: 3,
            },
            // {
            //   label: '丰收互联',
            //   value: 4,
            // },
            // {
            //   label: '银联云闪付',
            //   value: 5,
            // },
            // {
            //   label: '余额',
            //   value: 6,
            // },
            {
              label: '优惠支付',
              value: 7,
            },
          ],
        },
      },
    ],
    params: {},
  },
  // pagination: { pageSizeOptions: false },
  rowKey: 'uuid',
};
