import { ProColumns } from '@ant-design/pro-components'; import { Tag, Button, Popconfirm, Space, Switch, Tooltip } from 'antd'; import Users from './user' import { InfoCircleOutlined } from '@ant-design/icons'; export const columns = ( edit: (b: boolean, v: any) => void, del: (id: any) => void, stateUpdata: (id: any, ck: boolean) => void, mimiAssign: (b: any) => void, ): ProColumns[] => { return [ { title: 'ID', dataIndex: 'id', key: 'id', align: 'center', width: 70, ellipsis: true, hideInSearch: true, }, { title: '小程序appId', dataIndex: 'wechatAppId', key: 'wechatAppId', align: 'center', width: 70, ellipsis: true, }, // { // title: '小程序秘钥', // dataIndex: 'appSecret', // key: 'appSecret', // align: 'center', // width: 80, // ellipsis: true, // hideInSearch: true, // }, { title: '小程序名称', dataIndex: 'appName', key: 'appName', width: 80, ellipsis: true, align: 'center', }, { title: '小程序页面模板', dataIndex: 'templateName', key: 'templateName', width: 80, ellipsis: true, align: 'center', }, { title: '小程序首页链接', dataIndex: 'homePage', key: 'homePage', width: 80, ellipsis: true, align: 'center', hideInSearch: true, }, { title: '小程序版本号', dataIndex: 'appVersion', key: 'appVersion', width: 80, ellipsis: true, align: 'center', hideInSearch: true, }, { title: 'ios支付版本号', width: 80, ellipsis: true, align: 'center', tooltip: "ios的特殊性,此版本号与IOS支付模块关联,小程序版本号<=此版本号IOS才会出现支付功能,(微信)小程序发布线上后必须设置", dataIndex: 'iosPayment', hideInSearch: true, render: (_, d) => { return d.iosPayment ? {d.iosPayment} : IOS无法支付 } }, { title: '备注', dataIndex: 'remark', key: 'remark', width: 80, align: 'center', ellipsis: true, hideInSearch: true, }, { title: '状态', dataIndex: 'enabled', key: 'enabled', width: 80, align: 'center', ellipsis: true, hideInSearch: true, render: (a: any, b: any) => { return ( { stateUpdata(b.id, ck); }} /> ); }, }, { title: '已指派(分销商)', dataIndex: 'distributorInfo', width: 80, align: 'center', ellipsis: true, hideInSearch: true, render: (a, b: any) => { return {b?.distributorInfo?.companyName}; }, }, { title: '商户', dataIndex: 'mchName', width: 80, align: 'center', ellipsis: true, hideInSearch: true, render: (a, b: any) => { return {b?.mchInfo?.mchName}; }, }, { title: '操作', dataIndex: 'cz', key: 'cz', width: 160, align: 'center', hideInSearch: true, render: (a: any, b: any) => { return ( 确定要删除{b.appName}小程序? } onConfirm={() => { del(b.id); }} > ); }, }, ]; };