feat:实现保洁管理业务逻辑

This commit is contained in:
fyy
2025-06-23 16:50:37 +08:00
parent 8c5d26c12e
commit d4c26d13ea
8 changed files with 737 additions and 227 deletions

View File

@@ -1,42 +1,38 @@
import type { FormSchemaGetter } from '#/adapter/form';
import type { VxeGridProps } from '#/adapter/vxe-table';
import { cleanList } from '#/api/property/clean';
import type { PageResult } from '#/api/common';
import type { CleanVO } from '#/api/property/clean/model';
import { resident_unitList } from '#/api/property/resident/unit';
import dayjs from 'dayjs';
export const querySchema: FormSchemaGetter = () => [
{
component: 'Input',
fieldName: 'name',
label: '劳务名称',
},
{
component: 'Textarea',
fieldName: 'measure',
label: '计量单位',
fieldName: 'location',
label: '服务地址',
},
{
component: 'Input',
fieldName: 'method',
label: '计算方式',
fieldName: 'persion',
label: '申请人',
},
{
component: 'Input',
fieldName: 'peices',
label: '单价',
},
{
component: 'Input',
fieldName: 'frequency',
label: '保洁频率',
},
{
component: 'Input',
fieldName: 'standard',
label: '保洁标准',
},
{
component: 'Input',
fieldName: 'stater',
label: '状态',
component: 'Select',
fieldName: 'payState',
label: '支付状态',
componentProps: {
options: [
{
label: '待支付',
value: 0,
},
{
label: '已支付',
value: 1,
},
],
},
},
];
@@ -45,41 +41,65 @@ export const querySchema: FormSchemaGetter = () => [
export const columns: VxeGridProps['columns'] = [
{ type: 'checkbox', width: 60 },
{
title: '主键id',
title: '序号',
field: 'id',
slots: {
default: ({ rowIndex }) => {
return (rowIndex + 1).toString();
},
},
},
{
title: '服务地址',
field: 'location',
},
{
title: '服务面积(㎡)',
field: 'area',
},
{
title: '劳务名称',
field: 'name',
},
{
title: '计量单位',
field: 'measure',
title: '申报单价含税(元)',
field: 'prices',
},
{
title: '计算方式',
field: 'method',
title: '合计费用',
field: 'sumPeices',
},
{
title: '单价',
field: 'peices',
title: '支付状态',
field: 'payState',
slots: {
default: ({ row }) => row.stater === 1 ? '已支付' : '待支付',
},
},
{
title: '保洁频率',
field: 'frequency',
title: '服务开始时间',
field: 'starTime',
},
{
title: '保洁标准',
field: 'standard',
title: '服务结束时间',
field: 'endTime',
},
{
title: '申请单位',
field: 'unit',
},
{
title: '备注',
field: 'remark',
title: '申请人',
field: 'persion',
},
{
title: '状态',
field: 'stater',
title: '联系电话',
field: 'phone',
},
// {
// title: '提交时间',
// field: 'stater',
// },
{
field: 'action',
fixed: 'right',
@@ -99,52 +119,133 @@ export const modalSchema: FormSchemaGetter = () => [
triggerFields: [''],
},
},
{
label: '服务地址(房间号)',
fieldName: 'location',
component: 'Input',
rules: 'required',
},
{
label: '服务面积(㎡)',
fieldName: 'area',
component: 'Input',
rules: 'required',
},
{
label: '劳务名称',
fieldName: 'name',
component: 'ApiSelect',
componentProps: {
api: cleanList,
resultField: 'rows',
labelField: 'name',
valueField: 'id',
},
rules: 'required',
},
{
label: '服务单价',
fieldName: 'prices',
component: 'Input',
rules: 'required',
componentProps: {
placeholder: '',
disabled: true,
},
},
// {
// label: '保洁频率',
// fieldName: 'frequency',
// component: 'Input',
// rules: 'required',
// componentProps: {
// placeholder: '',
// disabled: true,
// },
// },
// {
// label: '保洁内容',
// fieldName: 'standard',
// component: 'Input',
// rules: 'required',
// componentProps: {
// placeholder: '',
// disabled: true,
// },
// },
// {
// label: '保洁标准',
// fieldName: 'peices',
// component: 'Input',
// rules: 'required',
// componentProps: {
// placeholder: '',
// disabled: true,
// },
// },
{
label: '开始时间',
fieldName: 'starTime',
component: 'DatePicker',
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
placeholder: '请选择开始时间'
},
rules: 'required',
},
{
label: '结束时间',
fieldName: 'endTime',
component: 'DatePicker',
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
placeholder: '请选择结束时间'
},
rules: 'required',
},
{
label: '申请人',
fieldName: 'persion',
component: 'Input',
rules: 'required',
},
{
label: '计量单位',
fieldName: 'measure',
component: 'Textarea',
rules: 'required',
},
{
label: '计算方式',
fieldName: 'method',
label: '联系电话',
fieldName: 'phone',
component: 'Input',
rules: 'required',
},
{
label: '单价',
fieldName: 'peices',
component: 'Input',
label: '申请单位',
fieldName: 'unit',
component: 'ApiSelect',
componentProps: {
api: resident_unitList,
resultField: 'rows',
labelField: 'name',
valueField: 'id',
placeholder: '请选择单位',
},
rules: 'required',
},
{
label: '保洁频率',
fieldName: 'frequency',
component: 'Input',
rules: 'required',
},
{
label: '保洁标准',
fieldName: 'standard',
component: 'Input',
rules: 'required',
},
{
label: '备注',
fieldName: 'remark',
component: 'Input',
rules: 'required',
},
{
label: '状态',
fieldName: 'stater',
component: 'Input',
{
label: '支付状态',
fieldName: 'payState',
component: 'Select',
componentProps: {
options: [
{
label: '待支付',
value: 0,
},
{
label: '已支付',
value: 1,
},
],
},
rules: 'required',
},
];