feat(order): 重构订单页面- 新增 config.js 文件,定义订单搜索和表格配置

- 添加自定义搜索表单和内容组件
- 优化订单列表页面布局和功能
- 实现订单状态标签和操作按钮的自定义渲染
This commit is contained in:
2025-04-28 11:19:47 +08:00
parent 0e5f07eaf7
commit 5dcda80717
4 changed files with 637 additions and 64 deletions

80
src/config.js Normal file
View File

@@ -0,0 +1,80 @@
export const ORDER_SEARCH_CONFIG = [
{
type: 'input',
prop:'orderId',
label: '订单号',
placeholder: '请输入',
},
{
type: 'daterange',
prop: 'times',
label: '申请时间',
valueFormat: 'YYYY-MM-DD',
placeholder: '请选择申请时间',
startPlaceholder: '开始日期',
endPlaceholder: '结束日期',
rangeSeparator: '-'
},
]
// 经费申请列表
export const ORDER_TABLE_CONFIG = {
index: true,
schemes: [
{
attrs: {
label: '订单号',
prop: 'order_no',
align: 'center'
}
},
{
attrs: {
label: '商品名称',
prop: 'name',
align: 'center'
}
},
{
attrs: {
label: '价格',
align: 'center',
prop: 'price'
}
},
{
attrs: {
label: '类型',
align: 'center',
prop: 'order_type'
}
},
{
attrs: {
label: '状态',
prop: 'status',
align: 'center'
},
slot: 'status'
},{
attrs: {
label: '创建时间',
prop: 'CreatedAt',
align: 'center'
},
},{
attrs: {
label: '更新时间',
prop: 'UpdatedAt',
align: 'center'
},
},
{
attrs: {
label: '操作',
prop: 'operate',
align: 'center'
},
slot: 'operate'
}
]
}