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', label: '订单编号', }, { component: 'Input', fieldName: 'customerName', label: '客户名称', }, { component: 'Select', componentProps: { }, 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: 'id', }, { title: '订单号', field: 'orderNo', }, { title: '客户名称', field: 'customerName', }, { title: '客户类型', field: 'customerType', }, { title: '租赁周期', field: 'rentalPeriod', }, { title: '租赁开始时间', field: 'startTime', }, { title: '租赁结束时间', field: 'endTime', }, { title: '应付总额', field: 'totalAmount', }, { title: '租赁方式', field: 'rentalType', }, { title: '租赁方案id', field: 'planId', }, { title: '绿植产品id', field: 'productId', }, { title: '租赁产品数量', field: 'productNum', }, { title: '支付状态', field: 'paymentStatus', }, { title: '是否续租', field: 'isRelet', }, { title: '合同状态', field: 'contractStatus', }, { title: '签署时间', field: 'signTime', }, { 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: 'orderNo', component: 'Input', rules: 'required', }, { label: '客户名称', fieldName: 'customerName', component: 'Input', rules: 'required', }, { label: '客户类型', fieldName: 'customerType', component: 'Select', componentProps: { }, rules: 'selectRequired', }, { label: '租赁周期', fieldName: 'rentalPeriod', component: 'Select', componentProps: { }, rules: 'selectRequired', }, { label: '租赁开始时间', fieldName: 'startTime', component: 'DatePicker', componentProps: { showTime: true, format: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'YYYY-MM-DD HH:mm:ss', }, rules: 'required', }, { label: '租赁结束时间', fieldName: 'endTime', component: 'DatePicker', componentProps: { showTime: true, format: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'YYYY-MM-DD HH:mm:ss', }, rules: 'required', }, { label: '应付总额', fieldName: 'totalAmount', component: 'Input', rules: 'required', }, { label: '租赁方式', fieldName: 'rentalType', component: 'Select', componentProps: { }, rules: 'selectRequired', }, { label: '租赁方案id', fieldName: 'planId', component: 'Input', }, { label: '绿植产品id', fieldName: 'productId', component: 'Input', }, { label: '租赁产品数量', fieldName: 'productNum', component: 'Input', }, { label: '支付状态', fieldName: 'paymentStatus', component: 'Select', componentProps: { }, rules: 'selectRequired', }, { label: '是否续租', fieldName: 'isRelet', component: 'RadioGroup', componentProps: { buttonStyle: 'solid', optionType: 'button', }, }, { 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', }, }, ];