220 lines
4.3 KiB
TypeScript
220 lines
4.3 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';
|
|
import {orderChargeList} from "#/api/property/chargeManagement";
|
|
|
|
export const querySchema: FormSchemaGetter = () => [
|
|
{
|
|
component: 'Select',
|
|
fieldName: 'orderId',
|
|
label: '订单号',
|
|
},
|
|
{
|
|
component: 'Select',
|
|
componentProps: {
|
|
options: getDictOptions('pro_invoice_status'),
|
|
},
|
|
fieldName: 'invoiceStatus',
|
|
label: '开票状态',
|
|
},
|
|
{
|
|
component: 'Input',
|
|
fieldName: 'userName',
|
|
label: '租赁人',
|
|
},
|
|
// {
|
|
// component: 'RangePicker',
|
|
// componentProps: {
|
|
// showTime: {
|
|
// format: 'HH:mm:ss'
|
|
// },
|
|
// format: 'YYYY-MM-DD HH:mm:ss',
|
|
// valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
// placeholder: ['开始时间', '结束时间']
|
|
// },
|
|
// fieldName: 'chargeDate',
|
|
// label: '收费日期',
|
|
// },
|
|
{
|
|
component: 'Select',
|
|
componentProps: {
|
|
options: getDictOptions('pro_payment_method'),
|
|
},
|
|
fieldName: 'paymentMethod',
|
|
label: '支付方式',
|
|
},
|
|
{
|
|
component: 'Select',
|
|
componentProps: {
|
|
options: getDictOptions('pro_charging_status'),
|
|
},
|
|
fieldName: 'chargeStatus',
|
|
label: '收费状态',
|
|
},
|
|
];
|
|
|
|
export const columns: VxeGridProps['columns'] = [
|
|
{ type: 'checkbox', width: 60 },
|
|
{
|
|
title: '序号',
|
|
field: 'id',
|
|
slots: {
|
|
default: ({ rowIndex }) => {
|
|
return (rowIndex + 1).toString();
|
|
},
|
|
},
|
|
},
|
|
{
|
|
title: '订单号',
|
|
field: 'orderId',
|
|
},
|
|
{
|
|
title: '租赁合同编号',
|
|
field: 'userId',
|
|
},
|
|
{
|
|
title: '租赁人',
|
|
field: 'userName',
|
|
},
|
|
{
|
|
title: '租金',
|
|
field: 'rent',
|
|
},
|
|
{
|
|
title: '押金',
|
|
field: 'deposit',
|
|
},
|
|
{
|
|
title: '违约金',
|
|
field: 'penalty',
|
|
},
|
|
{
|
|
title: '总金额',
|
|
field: 'totalAmount',
|
|
},
|
|
{
|
|
title: '收费日期',
|
|
field: 'chargeDate',
|
|
},
|
|
{
|
|
title: '支付方式',
|
|
field: 'paymentMethod',
|
|
slots: {
|
|
default: ({ row }) => {
|
|
return renderDict(row.paymentMethod, 'pro_payment_method');
|
|
},
|
|
},
|
|
},
|
|
{
|
|
title: '开票状态',
|
|
field: 'invoiceStatus',
|
|
slots: {
|
|
default: ({ row }) => {
|
|
return renderDict(row.invoiceStatus, 'pro_invoice_status');
|
|
},
|
|
},
|
|
},
|
|
{
|
|
title: '发票类型',
|
|
field: 'invoiceType',
|
|
},
|
|
{
|
|
title: '收费状态',
|
|
field: 'chargeStatus',
|
|
slots: {
|
|
default: ({ row }) => {
|
|
return renderDict(row.chargeStatus, 'pro_charging_status');
|
|
},
|
|
},
|
|
},
|
|
{
|
|
title: '创建时间',
|
|
field: 'createTime',
|
|
},
|
|
{
|
|
field: 'action',
|
|
fixed: 'right',
|
|
slots: { default: 'action' },
|
|
title: '操作',
|
|
width: 180,
|
|
},
|
|
];
|
|
|
|
export const modalSchema: FormSchemaGetter = () => [
|
|
{
|
|
label: '主键',
|
|
fieldName: 'id',
|
|
component: 'Input',
|
|
dependencies: {
|
|
show: () => false,
|
|
triggerFields: [''],
|
|
},
|
|
},
|
|
// {
|
|
// label: '订单号',
|
|
// fieldName: 'orderId',
|
|
// component: 'Input',
|
|
// rules: 'required',
|
|
// },
|
|
{
|
|
label: '订单号',
|
|
fieldName: 'orderId',
|
|
component: 'ApiSelect',
|
|
componentProps: {
|
|
api: orderChargeList,
|
|
resultField: 'rows',
|
|
valueField: 'orderId',
|
|
},
|
|
rules: 'required',
|
|
},
|
|
{
|
|
label: '租赁人',
|
|
fieldName: 'userName',
|
|
component: 'Input',
|
|
rules: 'required',
|
|
},
|
|
{
|
|
label: '租金',
|
|
fieldName: 'rent',
|
|
component: 'Input',
|
|
rules: 'required',
|
|
},
|
|
{
|
|
label: '押金',
|
|
fieldName: 'deposit',
|
|
component: 'Input',
|
|
rules: 'required',
|
|
},
|
|
{
|
|
label: '违约金',
|
|
fieldName: 'penalty',
|
|
component: 'Input',
|
|
rules: 'required',
|
|
},
|
|
{
|
|
label: '开票状态',
|
|
fieldName: 'invoiceStatus',
|
|
component: 'Select',
|
|
componentProps: {
|
|
options: getDictOptions('pro_invoice_status'),
|
|
},
|
|
rules: 'selectRequired',
|
|
},
|
|
{
|
|
label: '发票类型',
|
|
fieldName: 'invoiceType',
|
|
component: 'Input',
|
|
rules: 'required',
|
|
},
|
|
{
|
|
label: '收费状态',
|
|
fieldName: 'chargeStatus',
|
|
component: 'Select',
|
|
componentProps: {
|
|
options: getDictOptions('pro_charging_status'),
|
|
},
|
|
rules: 'selectRequired',
|
|
},
|
|
];
|