2025-06-26 18:04:51 +08:00
|
|
|
|
import type { FormSchemaGetter } from '#/adapter/form';
|
|
|
|
|
import type { VxeGridProps } from '#/adapter/vxe-table';
|
|
|
|
|
import {getDictOptions} from "#/utils/dict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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-06-30 14:45:06 +08:00
|
|
|
|
options:getDictOptions('wy_khlx')
|
2025-06-26 18:04:51 +08:00
|
|
|
|
},
|
|
|
|
|
fieldName: 'customerType',
|
|
|
|
|
label: '客户类型',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
component: 'Select',
|
|
|
|
|
componentProps: {
|
|
|
|
|
options:getDictOptions('wy_zlfs')
|
|
|
|
|
},
|
|
|
|
|
fieldName: 'rentalType',
|
|
|
|
|
label: '租赁方式',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
component: 'Select',
|
|
|
|
|
componentProps: {
|
|
|
|
|
options:getDictOptions('pro_charging_status')
|
|
|
|
|
},
|
|
|
|
|
fieldName: 'paymentStatus',
|
|
|
|
|
label: '支付状态',
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
export const columns: VxeGridProps['columns'] = [
|
|
|
|
|
{ type: 'checkbox', width: 60 },
|
|
|
|
|
{
|
|
|
|
|
title: '订单号',
|
|
|
|
|
field: 'orderNo',
|
2025-06-30 14:45:06 +08:00
|
|
|
|
width:100
|
2025-06-26 18:04:51 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '客户名称',
|
|
|
|
|
field: 'customerName',
|
2025-06-30 14:45:06 +08:00
|
|
|
|
width:100
|
2025-06-26 18:04:51 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '客户类型',
|
|
|
|
|
field: 'customerType',
|
2025-06-30 14:45:06 +08:00
|
|
|
|
slots: {default: 'customerType'},
|
|
|
|
|
width:100
|
2025-06-26 18:04:51 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '租赁周期',
|
|
|
|
|
field: 'rentalPeriod',
|
2025-06-30 14:45:06 +08:00
|
|
|
|
slots: {default: 'rentalPeriod'},
|
|
|
|
|
width:100
|
2025-06-26 18:04:51 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '租赁开始时间',
|
|
|
|
|
field: 'startTime',
|
2025-06-30 14:45:06 +08:00
|
|
|
|
width:120
|
2025-06-26 18:04:51 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '租赁结束时间',
|
|
|
|
|
field: 'endTime',
|
2025-06-30 14:45:06 +08:00
|
|
|
|
width:120
|
2025-06-26 18:04:51 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '应付总额',
|
|
|
|
|
field: 'totalAmount',
|
2025-06-30 14:45:06 +08:00
|
|
|
|
width:100
|
2025-06-26 18:04:51 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '租赁方式',
|
|
|
|
|
field: 'rentalType',
|
2025-06-30 14:45:06 +08:00
|
|
|
|
slots: {default: 'rentalType'},
|
|
|
|
|
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-06-30 14:45:06 +08:00
|
|
|
|
slots: {default: 'planId'},
|
|
|
|
|
width:100
|
2025-06-26 18:04:51 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '支付状态',
|
|
|
|
|
field: 'paymentStatus',
|
2025-06-30 14:45:06 +08:00
|
|
|
|
slots: {default: 'paymentStatus'},
|
|
|
|
|
width:100
|
2025-06-26 18:04:51 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '是否续租',
|
|
|
|
|
field: 'isRelet',
|
2025-06-30 14:45:06 +08:00
|
|
|
|
slots: {default: 'isRelet'},
|
|
|
|
|
width:100
|
2025-06-26 18:04:51 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '合同状态',
|
|
|
|
|
field: 'contractStatus',
|
2025-06-30 14:45:06 +08:00
|
|
|
|
slots: {default: 'contractStatus'},
|
|
|
|
|
width:100
|
2025-06-26 18:04:51 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '签署时间',
|
|
|
|
|
field: 'signTime',
|
2025-06-30 14:45:06 +08:00
|
|
|
|
width:100
|
2025-06-26 18:04:51 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: 'action',
|
|
|
|
|
fixed: 'right',
|
|
|
|
|
slots: { default: 'action' },
|
|
|
|
|
title: '操作',
|
2025-06-30 14:45:06 +08:00
|
|
|
|
minWidth: 180,
|
2025-06-26 18:04:51 +08:00
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
export const modalSchema: FormSchemaGetter = () => [
|
|
|
|
|
{
|
|
|
|
|
label: '主键',
|
|
|
|
|
fieldName: 'id',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
dependencies: {
|
|
|
|
|
show: () => false,
|
|
|
|
|
triggerFields: [''],
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '订单号',
|
|
|
|
|
fieldName: 'orderNo',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
rules: 'required',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '客户名称',
|
|
|
|
|
fieldName: 'customerName',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
rules: 'required',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '客户类型',
|
|
|
|
|
fieldName: 'customerType',
|
|
|
|
|
component: 'Select',
|
|
|
|
|
componentProps: {
|
2025-06-30 14:45:06 +08:00
|
|
|
|
options:getDictOptions('wy_khlx')
|
2025-06-26 18:04:51 +08:00
|
|
|
|
},
|
|
|
|
|
rules: 'selectRequired',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '租赁周期',
|
|
|
|
|
fieldName: 'rentalPeriod',
|
|
|
|
|
component: 'Select',
|
|
|
|
|
componentProps: {
|
2025-06-30 14:45:06 +08:00
|
|
|
|
options:getDictOptions('wy_time_unit')
|
2025-06-26 18:04:51 +08:00
|
|
|
|
},
|
|
|
|
|
rules: 'selectRequired',
|
|
|
|
|
},
|
|
|
|
|
{
|
2025-06-30 14:45:06 +08:00
|
|
|
|
label: '租赁时间',
|
|
|
|
|
fieldName: 'rentalTime',
|
|
|
|
|
component: 'RangePicker',
|
2025-06-26 18:04:51 +08:00
|
|
|
|
componentProps: {
|
|
|
|
|
showTime: true,
|
|
|
|
|
format: 'YYYY-MM-DD HH:mm:ss',
|
|
|
|
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
|
|
|
},
|
2025-06-30 14:45:06 +08:00
|
|
|
|
rules: 'selectRequired',
|
2025-06-26 18:04:51 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '应付总额',
|
|
|
|
|
fieldName: 'totalAmount',
|
|
|
|
|
component: 'Input',
|
|
|
|
|
rules: 'required',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '租赁方式',
|
|
|
|
|
fieldName: 'rentalType',
|
|
|
|
|
component: 'Select',
|
|
|
|
|
componentProps: {
|
2025-06-30 14:45:06 +08:00
|
|
|
|
options:getDictOptions('wy_sf')
|
2025-06-26 18:04:51 +08:00
|
|
|
|
},
|
|
|
|
|
rules: 'selectRequired',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '租赁方案id',
|
|
|
|
|
fieldName: 'planId',
|
|
|
|
|
component: 'Input',
|
2025-06-30 14:45:06 +08:00
|
|
|
|
dependencies: {
|
|
|
|
|
// 仅当 租赁方式 为 2(套餐) 时显示
|
|
|
|
|
show: (formValues) => formValues.rentalType === '2',
|
|
|
|
|
triggerFields: ['rentalType'],
|
|
|
|
|
},
|
|
|
|
|
rules: 'required',
|
2025-06-26 18:04:51 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '绿植产品id',
|
|
|
|
|
fieldName: 'productId',
|
|
|
|
|
component: 'Input',
|
2025-06-30 14:45:06 +08:00
|
|
|
|
dependencies: {
|
|
|
|
|
// 仅当 租赁方式 为 1(单点) 时显示
|
|
|
|
|
show: (formValues) => formValues.rentalType === '1',
|
|
|
|
|
triggerFields: ['rentalType'],
|
|
|
|
|
},
|
|
|
|
|
rules: 'required',
|
2025-06-26 18:04:51 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '租赁产品数量',
|
|
|
|
|
fieldName: 'productNum',
|
|
|
|
|
component: 'Input',
|
2025-06-30 14:45:06 +08:00
|
|
|
|
dependencies: {
|
|
|
|
|
// 仅当 租赁方式 为 1(单点) 时显示
|
|
|
|
|
show: (formValues) => formValues.rentalType === '1',
|
|
|
|
|
triggerFields: ['rentalType'],
|
|
|
|
|
},
|
|
|
|
|
rules: 'required',
|
2025-06-26 18:04:51 +08:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '支付状态',
|
|
|
|
|
fieldName: 'paymentStatus',
|
|
|
|
|
component: 'Select',
|
|
|
|
|
componentProps: {
|
|
|
|
|
},
|
|
|
|
|
rules: 'selectRequired',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '是否续租',
|
|
|
|
|
fieldName: 'isRelet',
|
|
|
|
|
component: 'RadioGroup',
|
|
|
|
|
componentProps: {
|
|
|
|
|
buttonStyle: 'solid',
|
|
|
|
|
optionType: 'button',
|
2025-06-30 14:45:06 +08:00
|
|
|
|
options: getDictOptions('wy_sf'),
|
2025-06-26 18:04:51 +08:00
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '合同状态',
|
|
|
|
|
fieldName: 'contractStatus',
|
|
|
|
|
component: 'Select',
|
|
|
|
|
componentProps: {
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '签署时间',
|
|
|
|
|
fieldName: 'signTime',
|
|
|
|
|
component: 'DatePicker',
|
|
|
|
|
componentProps: {
|
|
|
|
|
showTime: true,
|
|
|
|
|
format: 'YYYY-MM-DD HH:mm:ss',
|
|
|
|
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
];
|