Files
admin-vben5/apps/web-antd/src/views/property/greenPlantRentalManagement/orderManagement/data.ts

178 lines
3.2 KiB
TypeScript
Raw Normal View History

2025-07-01 17:57:12 +08:00
import type {FormSchemaGetter} from '#/adapter/form';
import type {VxeGridProps} from '#/adapter/vxe-table';
2025-06-26 18:04:51 +08:00
import {getDictOptions} from "#/utils/dict";
2025-07-01 17:57:12 +08:00
import {renderDict} from "#/utils/render";
2025-06-26 18:04:51 +08:00
export const querySchema: FormSchemaGetter = () => [
{
component: 'Input',
fieldName: 'orderNo',
2025-06-30 14:45:06 +08:00
label: '订单号',
2025-06-26 18:04:51 +08:00
},
{
component: 'Input',
fieldName: 'customerName',
label: '客户名称',
},
{
component: 'Select',
componentProps: {
2025-07-01 17:57:12 +08:00
options: getDictOptions('wy_khlx')
2025-06-26 18:04:51 +08:00
},
fieldName: 'customerType',
label: '客户类型',
},
{
component: 'Select',
componentProps: {
2025-07-01 17:57:12 +08:00
options: getDictOptions('wy_zlfs')
2025-06-26 18:04:51 +08:00
},
fieldName: 'rentalType',
label: '租赁方式',
},
{
component: 'Select',
componentProps: {
2025-07-01 17:57:12 +08:00
options: getDictOptions('pro_charging_status')
2025-06-26 18:04:51 +08:00
},
fieldName: 'paymentStatus',
label: '支付状态',
},
];
export const columns: VxeGridProps['columns'] = [
2025-07-01 17:57:12 +08:00
{type: 'checkbox', width: 60},
2025-06-26 18:04:51 +08:00
{
title: '订单号',
field: 'orderNo',
2025-07-01 17:57:12 +08:00
width: 100
2025-06-26 18:04:51 +08:00
},
{
title: '客户名称',
field: 'customerName',
2025-07-01 17:57:12 +08:00
width: 100
2025-06-26 18:04:51 +08:00
},
{
title: '客户类型',
field: 'customerType',
2025-07-01 17:57:12 +08:00
slots: {
default: ({ row }) => {
return renderDict(row.customerType, 'wy_khlx');
},
},
width: 100
2025-06-26 18:04:51 +08:00
},
{
title: '租赁周期',
field: 'rentalPeriod',
2025-07-01 17:57:12 +08:00
slots: {
default: ({ row }) => {
2025-07-02 18:00:26 +08:00
return renderDict(row.rentalPeriod, 'wy_time_unit');
2025-07-01 17:57:12 +08:00
},
},
width: 100
2025-06-26 18:04:51 +08:00
},
{
title: '租赁开始时间',
field: 'startTime',
2025-07-01 17:57:12 +08:00
width: 120
2025-06-26 18:04:51 +08:00
},
{
title: '租赁结束时间',
field: 'endTime',
2025-07-01 17:57:12 +08:00
width: 120
2025-06-26 18:04:51 +08:00
},
{
title: '应付总额',
field: 'totalAmount',
2025-07-01 17:57:12 +08:00
width: 100
2025-06-26 18:04:51 +08:00
},
{
title: '租赁方式',
field: 'rentalType',
2025-07-01 17:57:12 +08:00
slots: {
default: ({ row }) => {
return renderDict(row.rentalType, 'wy_zlfs');
},
},
width: 100
2025-06-26 18:04:51 +08:00
},
{
2025-06-30 14:45:06 +08:00
title: '租赁商品',
2025-06-26 18:04:51 +08:00
field: 'planId',
2025-07-01 17:57:12 +08:00
// slots: {default: 'planId'},
width: 100
2025-06-26 18:04:51 +08:00
},
{
title: '支付状态',
field: 'paymentStatus',
2025-07-01 17:57:12 +08:00
slots: {
default: ({ row }) => {
return renderDict(row.paymentStatus, 'pro_charging_status');
},
},
width: 100
2025-06-26 18:04:51 +08:00
},
{
title: '是否续租',
field: 'isRelet',
2025-07-01 17:57:12 +08:00
slots: {
default: ({ row }) => {
return renderDict(row.isRelet, 'wy_sf');
},
},
width: 100
2025-06-26 18:04:51 +08:00
},
{
title: '合同状态',
field: 'contractStatus',
2025-07-01 17:57:12 +08:00
slots: {
default: ({ row }) => {
return renderDict(row.contractStatus, 'wy_htzt');
},
},
width: 100
2025-06-26 18:04:51 +08:00
},
{
title: '签署时间',
field: 'signTime',
2025-07-01 17:57:12 +08:00
width: 100
2025-06-26 18:04:51 +08:00
},
{
field: 'action',
fixed: 'right',
2025-07-01 17:57:12 +08:00
slots: {default: 'action'},
2025-06-26 18:04:51 +08:00
title: '操作',
2025-06-30 14:45:06 +08:00
minWidth: 180,
2025-06-26 18:04:51 +08:00
},
];
2025-07-04 17:58:09 +08:00
export const planInfoColumns: VxeGridProps['columns'] = [
2025-06-26 18:04:51 +08:00
{
2025-07-04 17:58:09 +08:00
title: '序号',
field: 'id',
width: 100,
align: 'center'
2025-06-26 18:04:51 +08:00
},
{
2025-07-04 17:58:09 +08:00
title: '产品名称',
field: 'plantName',
minWidth: 100,
align: 'center'
2025-06-26 18:04:51 +08:00
},
{
2025-07-04 17:58:09 +08:00
title: '产品租金',
field: 'rent',
minWidth: 100,
align: 'center'
2025-07-01 17:57:12 +08:00
},
{
2025-07-04 17:58:09 +08:00
title: '产品数量',
field: 'inventory',
minWidth: 100,
align: 'center'
2025-06-26 18:04:51 +08:00
},
2025-07-04 17:58:09 +08:00
]