1、租赁订单管理
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run

This commit is contained in:
2025-07-01 17:57:12 +08:00
parent 33f2197ea8
commit cfa85a864c
4 changed files with 396 additions and 300 deletions

View File

@@ -1,6 +1,7 @@
import type { FormSchemaGetter } from '#/adapter/form';
import type { VxeGridProps } from '#/adapter/vxe-table';
import type {FormSchemaGetter} from '#/adapter/form';
import type {VxeGridProps} from '#/adapter/vxe-table';
import {getDictOptions} from "#/utils/dict";
import {renderDict} from "#/utils/render";
export const querySchema: FormSchemaGetter = () => [
@@ -17,7 +18,7 @@ export const querySchema: FormSchemaGetter = () => [
{
component: 'Select',
componentProps: {
options:getDictOptions('wy_khlx')
options: getDictOptions('wy_khlx')
},
fieldName: 'customerType',
label: '客户类型',
@@ -25,7 +26,7 @@ export const querySchema: FormSchemaGetter = () => [
{
component: 'Select',
componentProps: {
options:getDictOptions('wy_zlfs')
options: getDictOptions('wy_zlfs')
},
fieldName: 'rentalType',
label: '租赁方式',
@@ -33,7 +34,7 @@ export const querySchema: FormSchemaGetter = () => [
{
component: 'Select',
componentProps: {
options:getDictOptions('pro_charging_status')
options: getDictOptions('pro_charging_status')
},
fieldName: 'paymentStatus',
label: '支付状态',
@@ -42,83 +43,107 @@ export const querySchema: FormSchemaGetter = () => [
];
export const columns: VxeGridProps['columns'] = [
{ type: 'checkbox', width: 60 },
{type: 'checkbox', width: 60},
{
title: '订单号',
field: 'orderNo',
width:100
width: 100
},
{
title: '客户名称',
field: 'customerName',
width:100
width: 100
},
{
title: '客户类型',
field: 'customerType',
slots: {default: 'customerType'},
width:100
slots: {
default: ({ row }) => {
return renderDict(row.customerType, 'wy_khlx');
},
},
width: 100
},
{
title: '租赁周期',
field: 'rentalPeriod',
slots: {default: 'rentalPeriod'},
width:100
slots: {
default: ({ row }) => {
return renderDict(row.rentalPeriod, 'wy_sjdw');
},
},
width: 100
},
{
title: '租赁开始时间',
field: 'startTime',
width:120
width: 120
},
{
title: '租赁结束时间',
field: 'endTime',
width:120
width: 120
},
{
title: '应付总额',
field: 'totalAmount',
width:100
width: 100
},
{
title: '租赁方式',
field: 'rentalType',
slots: {default: 'rentalType'},
width:100
slots: {
default: ({ row }) => {
return renderDict(row.rentalType, 'wy_zlfs');
},
},
width: 100
},
{
title: '租赁商品',
field: 'planId',
slots: {default: 'planId'},
width:100
// slots: {default: 'planId'},
width: 100
},
{
title: '支付状态',
field: 'paymentStatus',
slots: {default: 'paymentStatus'},
width:100
slots: {
default: ({ row }) => {
return renderDict(row.paymentStatus, 'pro_charging_status');
},
},
width: 100
},
{
title: '是否续租',
field: 'isRelet',
slots: {default: 'isRelet'},
width:100
slots: {
default: ({ row }) => {
return renderDict(row.isRelet, 'wy_sf');
},
},
width: 100
},
{
title: '合同状态',
field: 'contractStatus',
slots: {default: 'contractStatus'},
width:100
slots: {
default: ({ row }) => {
return renderDict(row.contractStatus, 'wy_htzt');
},
},
width: 100
},
{
title: '签署时间',
field: 'signTime',
width:100
width: 100
},
{
field: 'action',
fixed: 'right',
slots: { default: 'action' },
slots: {default: 'action'},
title: '操作',
minWidth: 180,
},
@@ -134,12 +159,6 @@ export const modalSchema: FormSchemaGetter = () => [
triggerFields: [''],
},
},
// {
// label: '订单号',
// fieldName: 'orderNo',
// component: 'Input',
// rules: 'required',
// },
{
label: '客户名称',
fieldName: 'customerName',
@@ -151,7 +170,7 @@ export const modalSchema: FormSchemaGetter = () => [
fieldName: 'customerType',
component: 'Select',
componentProps: {
options:getDictOptions('wy_khlx')
options: getDictOptions('wy_khlx')
},
rules: 'selectRequired',
},
@@ -160,7 +179,7 @@ export const modalSchema: FormSchemaGetter = () => [
fieldName: 'rentalPeriod',
component: 'Select',
componentProps: {
options:getDictOptions('wy_time_unit')
options: getDictOptions('wy_time_unit')
},
rules: 'selectRequired',
},
@@ -180,33 +199,45 @@ export const modalSchema: FormSchemaGetter = () => [
fieldName: 'rentalType',
component: 'Select',
componentProps: {
options:getDictOptions('wy_zlfs')
options: getDictOptions('wy_zlfs')
},
rules: 'selectRequired',
formItemClass:'col-span-2'
formItemClass: 'col-span-2'
},
{
label: '租赁方案id',
label: '租赁方案',
fieldName: 'planId',
component: 'Input',
component: 'Select',
dependencies: {
// 仅当 租赁方式 为 2套餐 时显示
show: (formValues) => formValues.rentalType === '2',
triggerFields: ['rentalType'],
},
rules: 'required',
formItemClass:'col-span-2'
rules: 'selectRequired',
formItemClass: 'col-span-2'
},
{
label: '绿植产品id',
fieldName: 'productId',
label: '方案详情',
fieldName: 'planInfo',
component: 'Input',
dependencies: {
// 仅当 租赁方式 为 2套餐 时显示
show: (formValues) => formValues.rentalType === '2' && formValues.planId != null,
triggerFields: ['rentalType'],
},
formItemClass: 'col-span-2'
},
{
label: '绿植产品',
fieldName: 'productId',
component: 'Select',
dependencies: {
// 仅当 租赁方式 为 1单点 时显示
show: (formValues) => formValues.rentalType === '1',
triggerFields: ['rentalType'],
},
rules: 'required',
rules: 'selectRequired',
formItemClass: 'col-span-2'
},
{
label: '租赁数量',
@@ -215,29 +246,31 @@ export const modalSchema: FormSchemaGetter = () => [
componentProps: {
min: 1,
precision: 0,
step: 1
step: 1,
placeholder:'租赁数量不可超出绿植产品库存数量'
},
dependencies: {
// 仅当 租赁方式 为 1单点 时显示
show: (formValues) => formValues.rentalType === '1',
triggerFields: ['rentalType'],
triggerFields: ['rentalType', 'productId'],
},
rules: 'required',
},
{
label: '应付总额',
fieldName: 'totalAmount',
component: 'Input',
rules: 'required',
},
{
label: '支付状态',
fieldName: 'paymentStatus',
component: 'Select',
componentProps: {
},
rules: 'selectRequired',
},
// {
// label: '应付总额',
// fieldName: 'totalAmount',
// component: 'Input',
// rules: 'required',
// },
// {
// label: '支付状态',
// fieldName: 'paymentStatus',
// component: 'Select',
// componentProps: {
// options: getDictOptions('pro_charging_status'),
// },
// rules: 'selectRequired',
// },
// {
// label: '是否续租',
// fieldName: 'isRelet',
@@ -255,6 +288,17 @@ export const modalSchema: FormSchemaGetter = () => [
componentProps: {
options: getDictOptions('wy_htzt'),
},
rules: 'selectRequired'
},
{
label: '合同编号',
fieldName: 'contractCode',
component: 'Input',
dependencies: {
show: (formValues) => formValues.contractStatus != null && formValues.contractStatus != 1,
triggerFields: ['contractStatus'],
},
rules: 'required'
},
{
label: '签署时间',
@@ -262,8 +306,13 @@ export const modalSchema: FormSchemaGetter = () => [
component: 'DatePicker',
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
format: 'YYYY-MM-DD',
valueFormat: 'YYYY-MM-DD',
},
dependencies: {
show: (formValues) => formValues.contractStatus != null && formValues.contractStatus != 1,
triggerFields: ['contractStatus'],
},
rules: 'required'
},
];