Compare commits
2 Commits
2bb661e32b
...
2684133491
Author | SHA1 | Date | |
---|---|---|---|
2684133491 | |||
e10f22a4d0 |
@@ -1,11 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
节假日
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
|
|
||||||
</style>
|
|
@@ -1,11 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
打卡记录
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
|
|
||||||
</style>
|
|
@@ -1,11 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
每日统计
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
|
|
||||||
</style>
|
|
@@ -1,11 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
假期类型
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
|
|
||||||
</style>
|
|
@@ -93,80 +93,17 @@ export const modalSchema: FormSchemaGetter = () => [
|
|||||||
triggerFields: [''],
|
triggerFields: [''],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: '房屋收费id',
|
|
||||||
fieldName: 'houseChargeId',
|
|
||||||
component: 'Input',
|
|
||||||
rules: 'required',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '费用项目id',
|
|
||||||
fieldName: 'itemId',
|
|
||||||
component: 'Input',
|
|
||||||
rules: 'required',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
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: 'receivedAmount',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '应收金额',
|
|
||||||
fieldName: 'receivableAmount',
|
|
||||||
component: 'Input',
|
|
||||||
rules: 'required',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '缴费时间',
|
|
||||||
fieldName: 'payTime',
|
|
||||||
component: 'DatePicker',
|
|
||||||
componentProps: {
|
|
||||||
showTime: true,
|
|
||||||
format: 'YYYY-MM-DD HH:mm:ss',
|
|
||||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
||||||
},
|
|
||||||
rules: 'required',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: '审核状态',
|
label: '审核状态',
|
||||||
fieldName: 'state',
|
fieldName: 'state',
|
||||||
component: 'Select',
|
component: 'RadioGroup',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
// 可选从DictEnum中获取 DictEnum.COST_REVIEW_STATUS 便于维护
|
options: [
|
||||||
options: getDictOptions('cost_review_status'),
|
{ label: '已审核', value: '1' },
|
||||||
|
{ label: '已驳回', value: '2' },
|
||||||
|
],
|
||||||
|
// options: getDictOptions('cost_review_status'),
|
||||||
},
|
},
|
||||||
rules: 'selectRequired',
|
rules: 'required',
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '备注',
|
|
||||||
fieldName: 'remark',
|
|
||||||
component: 'Textarea',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '搜索值',
|
|
||||||
fieldName: 'searchValue',
|
|
||||||
component: 'Input',
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
@@ -1,16 +1,15 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui';
|
import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui';
|
||||||
import { getVxePopupContainer } from '@vben/utils';
|
import { Space } from 'ant-design-vue';
|
||||||
import { Popconfirm, Space } from 'ant-design-vue';
|
|
||||||
import {
|
import {
|
||||||
useVbenVxeGrid,
|
useVbenVxeGrid,
|
||||||
type VxeGridProps
|
type VxeGridProps
|
||||||
} from '#/adapter/vxe-table';
|
} from '#/adapter/vxe-table';
|
||||||
import {
|
import {
|
||||||
paymentReviewList,
|
paymentReviewList,
|
||||||
paymentReviewRemove,
|
|
||||||
} from '#/api/property/costManagement/paymentReview';
|
} from '#/api/property/costManagement/paymentReview';
|
||||||
import type { PaymentReviewForm } from '#/api/property/costManagement/paymentReview/model';
|
import type { PaymentReviewForm } from '#/api/property/costManagement/paymentReview/model';
|
||||||
|
import paymentReviewModal from './paymentReview-modal.vue';
|
||||||
import paymentReviewDetail from './paymentReview-detail.vue';
|
import paymentReviewDetail from './paymentReview-detail.vue';
|
||||||
import { columns, querySchema } from './data';
|
import { columns, querySchema } from './data';
|
||||||
|
|
||||||
@@ -34,8 +33,6 @@ const gridOptions: VxeGridProps = {
|
|||||||
// 点击行选中
|
// 点击行选中
|
||||||
// trigger: 'row',
|
// trigger: 'row',
|
||||||
},
|
},
|
||||||
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
|
|
||||||
// columns: columns(),
|
|
||||||
columns,
|
columns,
|
||||||
height: 'auto',
|
height: 'auto',
|
||||||
keepSource: true,
|
keepSource: true,
|
||||||
@@ -54,7 +51,6 @@ const gridOptions: VxeGridProps = {
|
|||||||
rowConfig: {
|
rowConfig: {
|
||||||
keyField: 'id',
|
keyField: 'id',
|
||||||
},
|
},
|
||||||
// 表格全局唯一表示 保存列配置需要用到
|
|
||||||
id: 'property-paymentReview-index'
|
id: 'property-paymentReview-index'
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -63,6 +59,10 @@ const [BasicTable, tableApi] = useVbenVxeGrid({
|
|||||||
gridOptions,
|
gridOptions,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const [PaymentReviewModal, modalApi] = useVbenModal({
|
||||||
|
connectedComponent: paymentReviewModal,
|
||||||
|
});
|
||||||
|
|
||||||
const [paymentReviewDetailModal, paymentReviewDetailApi] = useVbenModal({
|
const [paymentReviewDetailModal, paymentReviewDetailApi] = useVbenModal({
|
||||||
connectedComponent: paymentReviewDetail,
|
connectedComponent: paymentReviewDetail,
|
||||||
});
|
});
|
||||||
@@ -72,9 +72,9 @@ async function handleInfo(row: Required<PaymentReviewForm>) {
|
|||||||
paymentReviewDetailApi.open();
|
paymentReviewDetailApi.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleDelete(row: Required<PaymentReviewForm>) {
|
async function handleEdit(row: Required<PaymentReviewForm>) {
|
||||||
await paymentReviewRemove(row.id);
|
modalApi.setData({ id: row.id });
|
||||||
await tableApi.query();
|
modalApi.open();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -84,22 +84,16 @@ async function handleDelete(row: Required<PaymentReviewForm>) {
|
|||||||
<template #action="{ row }">
|
<template #action="{ row }">
|
||||||
<Space>
|
<Space>
|
||||||
<ghost-button
|
<ghost-button
|
||||||
@click.stop="handleInfo(row)"
|
@click.stop="handleInfo(row)"
|
||||||
>
|
>
|
||||||
{{ $t('pages.common.info') }}
|
{{ $t('pages.common.info') }}
|
||||||
</ghost-button>
|
</ghost-button>
|
||||||
<Popconfirm
|
<ghost-button
|
||||||
:get-popup-container="getVxePopupContainer"
|
:disabled="row.state!=='0'"
|
||||||
placement="left"
|
@click.stop="handleEdit(row)"
|
||||||
title="确认审核?"
|
|
||||||
@confirm="handleDelete(row)"
|
|
||||||
>
|
>
|
||||||
<ghost-button
|
{{ '审核' }}
|
||||||
@click.stop=""
|
</ghost-button>
|
||||||
>
|
|
||||||
{{ '审核' }}
|
|
||||||
</ghost-button>
|
|
||||||
</Popconfirm>
|
|
||||||
</Space>
|
</Space>
|
||||||
</template>
|
</template>
|
||||||
</BasicTable>
|
</BasicTable>
|
||||||
|
@@ -36,7 +36,7 @@ async function handleOpenChange(open: boolean) {
|
|||||||
<BasicModal :footer="false" :fullscreen-button="false" title="缴费审核详情" class="w-[70%]">
|
<BasicModal :footer="false" :fullscreen-button="false" title="缴费审核详情" class="w-[70%]">
|
||||||
<Descriptions v-if="paymentReviewDetail" size="small" :column="2" bordered
|
<Descriptions v-if="paymentReviewDetail" size="small" :column="2" bordered
|
||||||
:labelStyle="{width:'120px'}">
|
:labelStyle="{width:'120px'}">
|
||||||
<DescriptionsItem label="房屋收费">
|
<DescriptionsItem label="房屋">
|
||||||
{{ paymentReviewDetail.roomNumber }}
|
{{ paymentReviewDetail.roomNumber }}
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
<DescriptionsItem label="费用项目">
|
<DescriptionsItem label="费用项目">
|
||||||
|
@@ -0,0 +1,106 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { computed, ref } from 'vue';
|
||||||
|
|
||||||
|
import { useVbenModal } from '@vben/common-ui';
|
||||||
|
import { $t } from '@vben/locales';
|
||||||
|
import { cloneDeep } from '@vben/utils';
|
||||||
|
|
||||||
|
import { useVbenForm } from '#/adapter/form';
|
||||||
|
import { paymentReviewAdd, paymentReviewInfo, paymentReviewUpdate } from '#/api/property/costManagement/paymentReview';
|
||||||
|
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
|
||||||
|
|
||||||
|
import { modalSchema } from './data';
|
||||||
|
import type {PaymentReviewVO} from "#/api/property/costManagement/paymentReview/model";
|
||||||
|
|
||||||
|
const emit = defineEmits<{ reload: [] }>();
|
||||||
|
|
||||||
|
const isUpdate = ref(false);
|
||||||
|
const title = computed(() => {
|
||||||
|
return isUpdate.value ? $t('pages.common.edit') : $t('pages.common.add');
|
||||||
|
});
|
||||||
|
|
||||||
|
const [BasicForm, formApi] = useVbenForm({
|
||||||
|
commonConfig: {
|
||||||
|
// 默认占满两列
|
||||||
|
formItemClass: 'col-span-2',
|
||||||
|
// 默认label宽度 px
|
||||||
|
labelWidth: 80,
|
||||||
|
// 通用配置项 会影响到所有表单项
|
||||||
|
componentProps: {
|
||||||
|
class: 'w-full',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
schema: modalSchema(),
|
||||||
|
showDefaultActions: false,
|
||||||
|
wrapperClass: 'grid-cols-2',
|
||||||
|
});
|
||||||
|
|
||||||
|
const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff(
|
||||||
|
{
|
||||||
|
initializedGetter: defaultFormValueGetter(formApi),
|
||||||
|
currentGetter: defaultFormValueGetter(formApi),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
const record = ref<PaymentReviewVO>({
|
||||||
|
state:'1'
|
||||||
|
})
|
||||||
|
|
||||||
|
const [BasicModal, modalApi] = useVbenModal({
|
||||||
|
// 在这里更改宽度
|
||||||
|
class: 'w-[550px]',
|
||||||
|
fullscreenButton: false,
|
||||||
|
onBeforeClose,
|
||||||
|
onClosed: handleClosed,
|
||||||
|
onConfirm: handleConfirm,
|
||||||
|
onOpenChange: async (isOpen) => {
|
||||||
|
if (!isOpen) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
modalApi.modalLoading(true);
|
||||||
|
const { id } = modalApi.getData() as { id?: number | string };
|
||||||
|
isUpdate.value = !!id;
|
||||||
|
if (isUpdate.value && id) {
|
||||||
|
record.value = await paymentReviewInfo(id);
|
||||||
|
record.value.state = '1'
|
||||||
|
await formApi.setValues(record.value);
|
||||||
|
}
|
||||||
|
await markInitialized();
|
||||||
|
|
||||||
|
modalApi.modalLoading(false);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
async function handleConfirm() {
|
||||||
|
try {
|
||||||
|
modalApi.lock(true);
|
||||||
|
const { valid } = await formApi.validate();
|
||||||
|
if (!valid) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// getValues获取为一个readonly的对象 需要修改必须先深拷贝一次
|
||||||
|
const data = cloneDeep(await formApi.getValues());
|
||||||
|
record.value.state=data.state
|
||||||
|
await (isUpdate.value ? paymentReviewUpdate(record.value) : paymentReviewAdd(data));
|
||||||
|
resetInitialized();
|
||||||
|
emit('reload');
|
||||||
|
modalApi.close();
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
} finally {
|
||||||
|
modalApi.lock(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function handleClosed() {
|
||||||
|
await formApi.resetForm();
|
||||||
|
resetInitialized();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<BasicModal :title="title">
|
||||||
|
<BasicForm />
|
||||||
|
</BasicModal>
|
||||||
|
</template>
|
||||||
|
|
Reference in New Issue
Block a user