65 lines
1.7 KiB
TypeScript
65 lines
1.7 KiB
TypeScript
import type { VxeGridProps } from '#/adapter/vxe-table';
|
|
|
|
import { getLedgerLogList } from '../api';
|
|
|
|
interface RowType {
|
|
id: string;
|
|
name: string;
|
|
logo: string;
|
|
introduce: string;
|
|
created_at: string;
|
|
}
|
|
|
|
export const gridOptions: VxeGridProps<RowType> = {
|
|
checkboxConfig: {
|
|
highlight: true,
|
|
labelField: '',
|
|
},
|
|
columns: [
|
|
{ field: 'id', align: 'left', title: 'ID', width: 100 },
|
|
{ field: 'order.order_no', align: 'left', title: '订单编号' },
|
|
{ field: 'store', title: '关联账户', slots: { default: 'store' } },
|
|
{ field: 'user_type_txt', title: '账户类型' },
|
|
{ field: 'fee_type_txt', title: '费用类型' },
|
|
{ field: 'type_txt', title: '类型' },
|
|
{ field: 'content', title: '操作内容' },
|
|
{ field: 'amount', title: '金额' },
|
|
{ field: 'created_at', title: '操作时间' },
|
|
// { type: 'html', title: '操作', slots: { default: 'action' } },
|
|
],
|
|
keepSource: true,
|
|
pagerConfig: {},
|
|
proxyConfig: {
|
|
ajax: {
|
|
// 请求后端接口方法
|
|
query: async ({ page }, formValues) => {
|
|
return await getLedgerLogList({
|
|
page: page.currentPage,
|
|
pageSize: page.pageSize,
|
|
...formValues,
|
|
});
|
|
},
|
|
},
|
|
},
|
|
height: 'auto',
|
|
border: false,
|
|
toolbarConfig: {
|
|
// 是否显示搜索表单控制按钮
|
|
// @ts-ignore 正式环境时有完整的类型声明
|
|
search: true,
|
|
refresh: true, // 刷新
|
|
print: false, // 打印
|
|
export: false, // 导出
|
|
// custom: true, // 自定义列
|
|
zoom: true, // 最大化最小化
|
|
slots: {
|
|
buttons: 'toolbar-buttons',
|
|
},
|
|
custom: {
|
|
// 自定义列-图标
|
|
icon: 'vxe-icon-menu',
|
|
},
|
|
},
|
|
showOverflow: false,
|
|
};
|