-
+
添加保洁订单详情
{{ $t('pages.common.add') }}
-
-
-
- {{ index + 1 }}
-
-
-
+
+
+
+ {{ index + 1 }}
+
+
+
+
-
-
-费用合计:{{ totalSumPeices }}元
-
+
+
费用合计:{{ totalSumPeices }}元
+
@@ -325,24 +374,29 @@ async function handleClosed() {
.mt-4 {
margin-top: 1rem;
}
+
.mb-2 {
margin-bottom: 0.5rem;
}
+
.flex {
display: flex;
}
+
.items-center {
align-items: center;
}
+
.justify-between {
justify-content: space-between;
}
+
.text-lg {
font-size: 1.125rem;
line-height: 1.75rem;
}
+
.font-medium {
font-weight: 500;
}
-
diff --git a/apps/web-antd/src/views/property/clean/cleanOrders/data.ts b/apps/web-antd/src/views/property/clean/cleanOrders/data.ts
index 1f6a0e2f..05e00daa 100644
--- a/apps/web-antd/src/views/property/clean/cleanOrders/data.ts
+++ b/apps/web-antd/src/views/property/clean/cleanOrders/data.ts
@@ -1,10 +1,10 @@
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';
+
+import { resident_unitList } from '#/api/property/resident/unit';
+import { useCleanStore } from '#/store';
+
+const cleanStore = useCleanStore();
export const querySchema: FormSchemaGetter = () => [
{
@@ -12,6 +12,36 @@ export const querySchema: FormSchemaGetter = () => [
fieldName: 'location',
label: '服务地址',
},
+ // {
+ // label: '服务地址(房间号)',
+ // fieldName: 'location',
+ // component: 'ApiSelect',
+ // componentProps: {
+ // api: resident_unitList,
+ // resultField: 'rows',
+ // labelField: 'name',
+ // valueField: 'id',
+ // placeholder: '请选择服务地址',
+ // onChange: (val: string | number) => {
+ // cleanStore.setLocation(val);
+ // },
+ // },
+ // rules: 'required',
+ // },
+ // {
+ // label: '申请人hhh',
+ // fieldName: 'persion',
+ // component: 'ApiSelect',
+ // componentProps: {
+ // api: cleanList,
+ // resultField: 'rows',
+ // labelField: 'name',
+ // valueField: 'id',
+ // placeholder: '请选择申请人',
+ // disabled: computed(() => !cleanStore.isPersionEnabled),
+ // },
+ // rules: 'required',
+ // },
{
component: 'Input',
fieldName: 'persion',
@@ -21,7 +51,7 @@ export const querySchema: FormSchemaGetter = () => [
component: 'Select',
fieldName: 'payState',
label: '支付状态',
- componentProps: {
+ componentProps: {
options: [
{
label: '待支付',
@@ -42,8 +72,8 @@ export const columns: VxeGridProps['columns'] = [
{
title: '序号',
field: 'id',
- width:'60',
- slots: {
+ width: '60',
+ slots: {
default: ({ rowIndex }) => {
return (rowIndex + 1).toString();
},
@@ -52,58 +82,55 @@ export const columns: VxeGridProps['columns'] = [
{
title: '服务地址',
field: 'location',
- width: 'auto',
+ width: '180',
},
+ // {
+ // title: '服务面积(㎡)',
+ // field: 'area',
+ // width: 'auto',
+ // },
+ // {
+ // title: '劳务名称',
+ // field: 'name',
+ // width: 'auto',
+ // },
+ // {
+ // title: '申报单价含税(元)',
+ // field: 'prices',
+ // width: 'auto',
+ // },
{
- title: '服务面积(㎡)',
- field: 'area',
- width: 'auto',
- },
- {
- title: '劳务名称',
- field: 'name',
- width: 'auto',
- },
- {
- title: '申报单价含税(元)',
- field: 'prices',
- width: 'auto',
- },
- {
- title: '合计费用',
+ title: '合计费用(元)',
field: 'sumPeices',
- width: 'auto',
+ width: '120',
},
{
title: '支付状态',
field: 'payState',
- width: 'auto',
- slots: {
- default: ({ row }) => row.stater === 1 ? '已支付' : '待支付',
+ width: '120',
+ slots: {
+ default: ({ row }) => (row.stater === 1 ? '已支付' : '待支付'),
},
},
{
title: '服务开始时间',
field: 'starTime',
width: 'auto',
-
-
},
{
title: '服务结束时间',
field: 'endTime',
width: 'auto',
-
},
- {
+ {
title: '申请单位',
field: 'unit',
- width: 'auto',
+ width: '150',
},
{
title: '申请人',
field: 'persion',
- width: 'auto',
+ width: '150',
},
{
title: '联系电话',
@@ -135,16 +162,22 @@ export const modalSchema: FormSchemaGetter = () => [
{
label: '服务地址(房间号)',
fieldName: 'location',
- component: 'Input',
- rules: 'required',
- },
- {
- label: '服务面积(㎡)',
- fieldName: 'area',
- component: 'Input',
+ componentProps: {
+ placeholder: '请选择房间',
+ },
+ slots: {
+ default: 'location',
+ },
+ formItemClass: 'col-span-2',
rules: 'required',
},
// {
+ // label: '服务面积(㎡)',
+ // fieldName: 'area',
+ // component: 'Input',
+ // rules: 'required',
+ // },
+ // {
// label: '劳务名称',
// fieldName: 'name',
// component: 'ApiSelect',
@@ -196,25 +229,25 @@ export const modalSchema: FormSchemaGetter = () => [
// disabled: true,
// },
// },
- {
+ {
label: '开始时间',
fieldName: 'starTime',
component: 'DatePicker',
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
- placeholder: '请选择开始时间'
+ placeholder: '请选择开始时间',
},
rules: 'required',
},
- {
+ {
label: '结束时间',
fieldName: 'endTime',
component: 'DatePicker',
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
- placeholder: '请选择结束时间'
+ placeholder: '请选择结束时间',
},
rules: 'required',
},
@@ -243,7 +276,7 @@ export const modalSchema: FormSchemaGetter = () => [
},
rules: 'required',
},
- {
+ {
label: '支付状态',
fieldName: 'payState',
component: 'Select',
diff --git a/apps/web-antd/src/views/property/clean/cleanOrders/index.vue b/apps/web-antd/src/views/property/clean/cleanOrders/index.vue
index 0f42038d..5230b20f 100644
--- a/apps/web-antd/src/views/property/clean/cleanOrders/index.vue
+++ b/apps/web-antd/src/views/property/clean/cleanOrders/index.vue
@@ -1,31 +1,20 @@
@@ -143,9 +142,10 @@ function handleDownloadExcel() {
+ type="primary"
+ v-access:code="['property:clean:remove']"
+ @click="handleMultiDelete"
+ >
{{ $t('pages.common.delete') }}
+ 查看
();
const isUpdate = ref(false);
+const isReadonly = ref(false);
const title = computed(() => {
+ if (isReadonly.value) return '详情';
return isUpdate.value ? $t('pages.common.edit') : $t('pages.common.add');
});
@@ -27,7 +29,10 @@ const [BasicForm, formApi] = useVbenForm({
// 通用配置项 会影响到所有表单项
componentProps: {
class: 'w-full',
- }
+ get disabled() {
+ return isReadonly.value;
+ },
+ },
},
schema: modalSchema(),
showDefaultActions: false,
@@ -53,21 +58,32 @@ const [BasicModal, modalApi] = useVbenModal({
return null;
}
modalApi.modalLoading(true);
-
- const { id } = modalApi.getData() as { id?: number | string };
- isUpdate.value = !!id;
-
- if (isUpdate.value && id) {
- const record = await cleanInfo(id);
- await formApi.setValues(record);
+ try {
+ const { id, readonly } = modalApi.getData() as {
+ id?: number | string;
+ readonly?: boolean;
+ };
+ isUpdate.value = !!id;
+ isReadonly.value = !!readonly;
+ if (isUpdate.value && id) {
+ const record = await cleanInfo(id);
+ await formApi.setValues(record);
+ }
+ await markInitialized();
+ } catch (error) {
+ // 可以根据需要弹出错误提示
+ console.error(error);
+ } finally {
+ modalApi.modalLoading(false);
}
- await markInitialized();
-
- modalApi.modalLoading(false);
},
});
async function handleConfirm() {
+ if (isReadonly.value) {
+ modalApi.close();
+ return;
+ }
try {
modalApi.lock(true);
const { valid } = await formApi.validate();
@@ -98,4 +114,15 @@ async function handleClosed() {
+
diff --git a/apps/web-antd/src/views/property/clean/cleanSettings/data.ts b/apps/web-antd/src/views/property/clean/cleanSettings/data.ts
index 8e60ec42..110c5ba6 100644
--- a/apps/web-antd/src/views/property/clean/cleanSettings/data.ts
+++ b/apps/web-antd/src/views/property/clean/cleanSettings/data.ts
@@ -1,14 +1,12 @@
import type { FormSchemaGetter } from '#/adapter/form';
import type { VxeGridProps } from '#/adapter/vxe-table';
-
export const querySchema: FormSchemaGetter = () => [
{
component: 'Input',
fieldName: 'name',
label: '劳务名称',
},
-
{
component: 'Input',
fieldName: 'method',
@@ -18,7 +16,7 @@ export const querySchema: FormSchemaGetter = () => [
component: 'Select',
fieldName: 'stater',
label: '状态',
- componentProps: {
+ componentProps: {
options: [
{ label: '下架', value: 0 },
{ label: '上架', value: 1 },
@@ -34,7 +32,8 @@ export const columns: VxeGridProps['columns'] = [
{
title: '序号',
field: 'id',
- slots: {
+ width: '60',
+ slots: {
default: ({ rowIndex }) => {
return (rowIndex + 1).toString();
},
@@ -43,17 +42,17 @@ export const columns: VxeGridProps['columns'] = [
{
title: '劳务名称',
field: 'name',
- width:'120'
+ width: '120',
},
{
title: '计量单位',
field: 'measure',
- width:'120'
+ width: '120',
},
{
title: '计算方式',
field: 'method',
- width:'120'
+ width: '120',
},
{
title: '申报单价含税(元)',
@@ -63,30 +62,30 @@ export const columns: VxeGridProps['columns'] = [
{
title: '保洁频率',
field: 'frequency',
- width:'120'
+ width: '120',
},
// {
// title: '保洁内容',
// field: 'standard',
// },
- {
+ {
title: '保洁标准',
field: 'standard',
- width:'200'
+ width: '200',
},
{
title: '备注',
field: 'remark',
- width:'200'
+ width: '200',
},
{
title: '状态',
field: 'stater',
- width:'120',
+ width: '120',
slots: {
- default: ({ row }) => row.stater === 1 ? '上架' : '下架',
+ default: ({ row }) => (row.stater === 1 ? '上架' : '下架'),
},
- },
+ },
// {
// title: '创建时间',
// field: 'stater',
@@ -147,7 +146,7 @@ export const modalSchema: FormSchemaGetter = () => [
// component: 'Input',
// rules: 'required',
// },
- {
+ {
label: '保洁标准',
fieldName: 'standard',
component: 'Input',
@@ -175,7 +174,7 @@ export const modalSchema: FormSchemaGetter = () => [
// },
// rules: 'required',
// },
- {
+ {
label: '状态',
fieldName: 'stater',
component: 'Select',
diff --git a/apps/web-antd/src/views/property/clean/cleanSettings/index.vue b/apps/web-antd/src/views/property/clean/cleanSettings/index.vue
index dcdcc307..db05aad5 100644
--- a/apps/web-antd/src/views/property/clean/cleanSettings/index.vue
+++ b/apps/web-antd/src/views/property/clean/cleanSettings/index.vue
@@ -1,26 +1,16 @@
@@ -137,9 +138,10 @@ function handleDownloadExcel() {
+ type="primary"
+ v-access:code="['property:clean:remove']"
+ @click="handleMultiDelete"
+ >
{{ $t('pages.common.delete') }}
+ 查看
+import type { EchartsUIType } from '@vben/plugins/echarts';
+
+import { onMounted, ref } from 'vue';
+
+import { EchartsUI, useEcharts } from '@vben/plugins/echarts';
+
import { Button } from 'ant-design-vue';
-import { ref, onMounted } from 'vue';
-import { EchartsUI, useEcharts, type EchartsUIType } from '@vben/plugins/echarts';
const orderLineRef = ref();
const leasePieRef = ref();
@@ -12,10 +16,17 @@ const maintenanceQualityScoresPeiRef = ref();
const { renderEcharts } = useEcharts(orderLineRef);
const { renderEcharts: renderLeasePie } = useEcharts(leasePieRef);
-const {renderEcharts: renderCustomerTypesBar} = useEcharts(customerTypesBarRef);
-const {renderEcharts: renderCustomerRenewalLine} = useEcharts(customerRenewalLineRef);
-const {renderEcharts: renderConservationTasksBar} = useEcharts(conservationTasksBarRef);
-const {renderEcharts: renderMaintenanceQualityScoresPei} = useEcharts(maintenanceQualityScoresPeiRef);
+const { renderEcharts: renderCustomerTypesBar } =
+ useEcharts(customerTypesBarRef);
+const { renderEcharts: renderCustomerRenewalLine } = useEcharts(
+ customerRenewalLineRef,
+);
+const { renderEcharts: renderConservationTasksBar } = useEcharts(
+ conservationTasksBarRef,
+);
+const { renderEcharts: renderMaintenanceQualityScoresPei } = useEcharts(
+ maintenanceQualityScoresPeiRef,
+);
onMounted(() => {
renderEcharts({
@@ -85,7 +96,7 @@ onMounted(() => {
],
});
renderCustomerRenewalLine({
- title: { text: '客户续租率趋势' },
+ title: { text: '客户续租率趋势' },
tooltip: { trigger: 'axis' },
xAxis: {
type: 'category',
@@ -103,191 +114,234 @@ onMounted(() => {
],
});
renderConservationTasksBar({
- title: { text: '养护任务完成情况' },
- tooltip: {
- trigger: 'axis',
- axisPointer: { type: 'shadow' }
- },
- legend: {
- data: ['计划任务数', '已完成数', '完成率']
- },
- xAxis: [
- {
- type: 'category',
- data: ['朝阳区', '海淀区', '西城区', '东城区']
- }
- ],
- yAxis: [
- {
- type: 'value',
- name: '任务数',
- min: 0,
- max: 200,
- position: 'left'
+ title: { text: '养护任务完成情况' },
+ tooltip: {
+ trigger: 'axis',
+ axisPointer: { type: 'shadow' },
},
- {
- type: 'value',
- name: '完成率',
- min: 0,
- max: 100,
- position: 'right',
- axisLabel: {
- formatter: '{value}%'
- }
- }
- ],
- series: [
- {
- name: '计划任务数',
- type: 'bar',
- data: [156, 140, 130, 120]
+ legend: {
+ data: ['计划任务数', '已完成数', '完成率'],
},
- {
- name: '已完成数',
- type: 'bar',
- data: [152, 135, 125, 110]
- },
- {
- name: '完成率',
- type: 'line',
- yAxisIndex: 1,
- data: [97.4, 96.4, 96.2, 91.7]
- }
- ]
+ xAxis: [
+ {
+ type: 'category',
+ data: ['朝阳区', '海淀区', '西城区', '东城区'],
+ },
+ ],
+ yAxis: [
+ {
+ type: 'value',
+ name: '任务数',
+ min: 0,
+ max: 200,
+ position: 'left',
+ },
+ {
+ type: 'value',
+ name: '完成率',
+ min: 0,
+ max: 100,
+ position: 'right',
+ axisLabel: {
+ formatter: '{value}%',
+ },
+ },
+ ],
+ series: [
+ {
+ name: '计划任务数',
+ type: 'bar',
+ data: [156, 140, 130, 120],
+ },
+ {
+ name: '已完成数',
+ type: 'bar',
+ data: [152, 135, 125, 110],
+ },
+ {
+ name: '完成率',
+ type: 'line',
+ yAxisIndex: 1,
+ data: [97.4, 96.4, 96.2, 91.7],
+ },
+ ],
});
renderMaintenanceQualityScoresPei({
- title: { text: '养护质量评分分布', left: 'center' },
- tooltip: {
- trigger: 'item',
- formatter: '{b} : {d}%'
- },
- legend: {
- orient: 'horizontal',
- left: 'center',
- bottom: 10,
- data: ['一星', '两星', '三星', '四星', '五星']
- },
- series: [
- {
- name: '评分',
- type: 'pie',
- radius: '60%',
- center: ['50%', '50%'],
- data: [
- { value: 12.43, name: '一星' },
- { value: 12.26, name: '两星' },
- { value: 16.87, name: '三星' },
- { value: 25.75, name: '四星' },
- { value: 32.68, name: '五星' }
- ],
- label: {
- formatter: '{b} {d}%',
- show: true
- }
- }
- ]
-});
+ title: { text: '养护质量评分分布', left: 'center' },
+ tooltip: {
+ trigger: 'item',
+ formatter: '{b} : {d}%',
+ },
+ legend: {
+ orient: 'horizontal',
+ left: 'center',
+ bottom: 10,
+ data: ['一星', '两星', '三星', '四星', '五星'],
+ },
+ series: [
+ {
+ name: '评分',
+ type: 'pie',
+ radius: '60%',
+ center: ['50%', '50%'],
+ data: [
+ { value: 12.43, name: '一星' },
+ { value: 12.26, name: '两星' },
+ { value: 16.87, name: '三星' },
+ { value: 25.75, name: '四星' },
+ { value: 32.68, name: '五星' },
+ ],
+ label: {
+ formatter: '{b} {d}%',
+ show: true,
+ },
+ },
+ ],
+ });
});
-
\ No newline at end of file
+