Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
178 lines
3.2 KiB
TypeScript
178 lines
3.2 KiB
TypeScript
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 = () => [
|
|
{
|
|
component: 'Input',
|
|
fieldName: 'orderNo',
|
|
label: '订单号',
|
|
},
|
|
{
|
|
component: 'Input',
|
|
fieldName: 'customerName',
|
|
label: '客户名称',
|
|
},
|
|
{
|
|
component: 'Select',
|
|
componentProps: {
|
|
options: getDictOptions('wy_khlx')
|
|
},
|
|
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',
|
|
width: 100
|
|
},
|
|
{
|
|
title: '客户名称',
|
|
field: 'customerName',
|
|
width: 100
|
|
},
|
|
{
|
|
title: '客户类型',
|
|
field: 'customerType',
|
|
slots: {
|
|
default: ({ row }) => {
|
|
return renderDict(row.customerType, 'wy_khlx');
|
|
},
|
|
},
|
|
width: 100
|
|
},
|
|
{
|
|
title: '租赁周期',
|
|
field: 'rentalPeriod',
|
|
slots: {
|
|
default: ({ row }) => {
|
|
return renderDict(row.rentalPeriod, 'wy_time_unit');
|
|
},
|
|
},
|
|
width: 100
|
|
},
|
|
{
|
|
title: '租赁开始时间',
|
|
field: 'startTime',
|
|
width: 120
|
|
},
|
|
{
|
|
title: '租赁结束时间',
|
|
field: 'endTime',
|
|
width: 120
|
|
},
|
|
{
|
|
title: '应付总额',
|
|
field: 'totalAmount',
|
|
width: 100
|
|
},
|
|
{
|
|
title: '租赁方式',
|
|
field: 'rentalType',
|
|
slots: {
|
|
default: ({ row }) => {
|
|
return renderDict(row.rentalType, 'wy_zlfs');
|
|
},
|
|
},
|
|
width: 100
|
|
},
|
|
{
|
|
title: '租赁商品',
|
|
field: 'planId',
|
|
// slots: {default: 'planId'},
|
|
width: 100
|
|
},
|
|
{
|
|
title: '支付状态',
|
|
field: 'paymentStatus',
|
|
slots: {
|
|
default: ({ row }) => {
|
|
return renderDict(row.paymentStatus, 'pro_charging_status');
|
|
},
|
|
},
|
|
width: 100
|
|
},
|
|
{
|
|
title: '是否续租',
|
|
field: 'isRelet',
|
|
slots: {
|
|
default: ({ row }) => {
|
|
return renderDict(row.isRelet, 'wy_sf');
|
|
},
|
|
},
|
|
width: 100
|
|
},
|
|
{
|
|
title: '合同状态',
|
|
field: 'contractStatus',
|
|
slots: {
|
|
default: ({ row }) => {
|
|
return renderDict(row.contractStatus, 'wy_htzt');
|
|
},
|
|
},
|
|
width: 100
|
|
},
|
|
{
|
|
title: '签署时间',
|
|
field: 'signTime',
|
|
width: 100
|
|
},
|
|
{
|
|
field: 'action',
|
|
fixed: 'right',
|
|
slots: {default: 'action'},
|
|
title: '操作',
|
|
minWidth: 180,
|
|
},
|
|
];
|
|
|
|
export const planInfoColumns: VxeGridProps['columns'] = [
|
|
{
|
|
title: '序号',
|
|
field: 'id',
|
|
width: 100,
|
|
align: 'center'
|
|
},
|
|
{
|
|
title: '产品名称',
|
|
field: 'plantName',
|
|
minWidth: 100,
|
|
align: 'center'
|
|
},
|
|
{
|
|
title: '产品租金',
|
|
field: 'rent',
|
|
minWidth: 100,
|
|
align: 'center'
|
|
},
|
|
{
|
|
title: '产品数量',
|
|
field: 'inventory',
|
|
minWidth: 100,
|
|
align: 'center'
|
|
},
|
|
]
|