This commit is contained in:
@@ -0,0 +1,61 @@
|
|||||||
|
import type { GroupVO, GroupForm, GroupQuery } from './model';
|
||||||
|
|
||||||
|
import type { ID, IDS } from '#/api/common';
|
||||||
|
import type { PageResult } from '#/api/common';
|
||||||
|
|
||||||
|
import { commonExport } from '#/api/helper';
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询考勤组基本信息列表
|
||||||
|
* @param params
|
||||||
|
* @returns 考勤组基本信息列表
|
||||||
|
*/
|
||||||
|
export function groupList(params?: GroupQuery) {
|
||||||
|
return requestClient.get<PageResult<GroupVO>>('/Property/group/list', { params });
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出考勤组基本信息列表
|
||||||
|
* @param params
|
||||||
|
* @returns 考勤组基本信息列表
|
||||||
|
*/
|
||||||
|
export function groupExport(params?: GroupQuery) {
|
||||||
|
return commonExport('/Property/group/export', params ?? {});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询考勤组基本信息详情
|
||||||
|
* @param id id
|
||||||
|
* @returns 考勤组基本信息详情
|
||||||
|
*/
|
||||||
|
export function groupInfo(id: ID) {
|
||||||
|
return requestClient.get<GroupVO>(`/Property/group/${id}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增考勤组基本信息
|
||||||
|
* @param data
|
||||||
|
* @returns void
|
||||||
|
*/
|
||||||
|
export function groupAdd(data: GroupForm) {
|
||||||
|
return requestClient.postWithMsg<void>('/Property/group', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新考勤组基本信息
|
||||||
|
* @param data
|
||||||
|
* @returns void
|
||||||
|
*/
|
||||||
|
export function groupUpdate(data: GroupForm) {
|
||||||
|
return requestClient.putWithMsg<void>('/Property/group', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除考勤组基本信息
|
||||||
|
* @param id id
|
||||||
|
* @returns void
|
||||||
|
*/
|
||||||
|
export function groupRemove(id: ID | IDS) {
|
||||||
|
return requestClient.deleteWithMsg<void>(`/Property/group/${id}`);
|
||||||
|
}
|
69
apps/web-antd/src/api/property/attendanceManagement/attendanceGroupSettings/model.d.ts
vendored
Normal file
69
apps/web-antd/src/api/property/attendanceManagement/attendanceGroupSettings/model.d.ts
vendored
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
import type { PageQuery, BaseEntity } from '#/api/common';
|
||||||
|
|
||||||
|
export interface GroupVO {
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
id: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 考勤组名称
|
||||||
|
*/
|
||||||
|
groupName: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态(1:启用,0:禁用)
|
||||||
|
*/
|
||||||
|
status: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 考勤类型(0:固定班制,1:排班制)
|
||||||
|
*/
|
||||||
|
attendanceType: number;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface GroupForm extends BaseEntity {
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
id?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 考勤组名称
|
||||||
|
*/
|
||||||
|
groupName?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态(1:启用,0:禁用)
|
||||||
|
*/
|
||||||
|
status?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 考勤类型(0:固定班制,1:排班制)
|
||||||
|
*/
|
||||||
|
attendanceType?: number;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface GroupQuery extends PageQuery {
|
||||||
|
/**
|
||||||
|
* 考勤组名称
|
||||||
|
*/
|
||||||
|
groupName?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态(1:启用,0:禁用)
|
||||||
|
*/
|
||||||
|
status?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 考勤类型(0:固定班制,1:排班制)
|
||||||
|
*/
|
||||||
|
attendanceType?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日期范围参数
|
||||||
|
*/
|
||||||
|
params?: any;
|
||||||
|
}
|
@@ -42,6 +42,10 @@ export function houseChargeAdd(data: HouseChargeForm) {
|
|||||||
return requestClient.postWithMsg<void>('/property/houseCharge', data);
|
return requestClient.postWithMsg<void>('/property/houseCharge', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function houseChargeRefund(data: HouseChargeForm) {
|
||||||
|
return requestClient.postWithMsg<void>('/property/houseCharge/returnFee', data);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新房屋收费
|
* 更新房屋收费
|
||||||
* @param data
|
* @param data
|
||||||
|
@@ -0,0 +1,169 @@
|
|||||||
|
import type { FormSchemaGetter } from '#/adapter/form';
|
||||||
|
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||||||
|
import {getDictOptions} from "#/utils/dict";
|
||||||
|
import {renderDict} from "#/utils/render";
|
||||||
|
|
||||||
|
|
||||||
|
export const querySchema: FormSchemaGetter = () => [
|
||||||
|
{
|
||||||
|
component: 'Input',
|
||||||
|
fieldName: 'groupName',
|
||||||
|
label: '考勤组名称',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
component: 'Select',
|
||||||
|
componentProps: {
|
||||||
|
options:getDictOptions('wy_kqlx')
|
||||||
|
},
|
||||||
|
fieldName: 'attendanceType',
|
||||||
|
label: '考勤类型',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
|
||||||
|
// export const columns: () => VxeGridProps['columns'] = () => [
|
||||||
|
export const columns: VxeGridProps['columns'] = [
|
||||||
|
{ type: 'checkbox', width: 60 },
|
||||||
|
{
|
||||||
|
title: '考勤组名称',
|
||||||
|
field: 'groupName',
|
||||||
|
minWidth:180,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
title: '考勤类型',
|
||||||
|
field: 'attendanceType',
|
||||||
|
slots:{
|
||||||
|
default: ({row})=>{
|
||||||
|
return renderDict(row.attendanceType,'wy_kqlx')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
width:150
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '状态',
|
||||||
|
field: 'status',
|
||||||
|
slots:{
|
||||||
|
default: 'status'
|
||||||
|
},
|
||||||
|
width:180
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'action',
|
||||||
|
fixed: 'right',
|
||||||
|
slots: { default: 'action' },
|
||||||
|
title: '操作',
|
||||||
|
width: 180,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export const modalSchema: FormSchemaGetter = () => [
|
||||||
|
{
|
||||||
|
label: '主键id',
|
||||||
|
fieldName: 'id',
|
||||||
|
component: 'Input',
|
||||||
|
dependencies: {
|
||||||
|
show: () => false,
|
||||||
|
triggerFields: [''],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '考勤组名称',
|
||||||
|
fieldName: 'groupName',
|
||||||
|
component: 'Input',
|
||||||
|
rules: 'required',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '考勤类型',//(0:固定班制,1:排班制)
|
||||||
|
fieldName: 'attendanceType',
|
||||||
|
component: 'RadioGroup',
|
||||||
|
componentProps: {
|
||||||
|
buttonStyle: 'solid',
|
||||||
|
options: getDictOptions('wy_kqlx'),
|
||||||
|
},
|
||||||
|
rules: 'selectRequired',
|
||||||
|
defaultValue:'0'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '工作日设置',
|
||||||
|
fieldName: 'weekdaySetting',
|
||||||
|
component: 'Input',
|
||||||
|
dependencies: {
|
||||||
|
show: (formValue) => formValue.attendanceType=='0',
|
||||||
|
triggerFields: ['attendanceType'],
|
||||||
|
},
|
||||||
|
slots:{
|
||||||
|
default:'weekdaySetting'
|
||||||
|
},
|
||||||
|
rules:'required',
|
||||||
|
defaultValue:'1',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '',
|
||||||
|
fieldName: 'settingItem',
|
||||||
|
component: 'Input',
|
||||||
|
dependencies: {
|
||||||
|
show: (formValue) => formValue.attendanceType=='0',
|
||||||
|
triggerFields: ['attendanceType'],
|
||||||
|
},
|
||||||
|
slots:{
|
||||||
|
default:'settingItem'
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '考勤班次',
|
||||||
|
fieldName: 'attendanceShift',
|
||||||
|
component: 'Input',
|
||||||
|
dependencies: {
|
||||||
|
show: (formValue) => formValue.attendanceType=='1',
|
||||||
|
triggerFields: ['attendanceType'],
|
||||||
|
},
|
||||||
|
slots:{
|
||||||
|
default:'attendanceShift'
|
||||||
|
},
|
||||||
|
rules:'required',
|
||||||
|
defaultValue:'1',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '排班周期',
|
||||||
|
fieldName: 'schedulingCycle',
|
||||||
|
component: 'Input',
|
||||||
|
dependencies: {
|
||||||
|
show: (formValue) => formValue.attendanceType=='1',
|
||||||
|
triggerFields: ['attendanceType'],
|
||||||
|
},
|
||||||
|
slots:{
|
||||||
|
default:'schedulingCycle'
|
||||||
|
},
|
||||||
|
defaultValue:'1',
|
||||||
|
rules:'required'
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export const weekdayColumns: VxeGridProps['columns'] = [
|
||||||
|
{
|
||||||
|
title: '工作日',
|
||||||
|
name: 'label',
|
||||||
|
width:180,
|
||||||
|
align:'center',
|
||||||
|
dataIndex:'label'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '班次',
|
||||||
|
name: 'shift',
|
||||||
|
minWidth:180,
|
||||||
|
align:'center',
|
||||||
|
dataIndex:'shift'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
name: 'action',
|
||||||
|
dataIndex:'action',
|
||||||
|
width:180,
|
||||||
|
align:'center',
|
||||||
|
slots:{
|
||||||
|
default:'action'
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
]
|
@@ -0,0 +1,146 @@
|
|||||||
|
<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 {
|
||||||
|
groupAdd,
|
||||||
|
groupInfo,
|
||||||
|
groupUpdate
|
||||||
|
} from '#/api/property/attendanceManagement/attendanceGroupSettings';
|
||||||
|
import {defaultFormValueGetter, useBeforeCloseDiff} from '#/utils/popup';
|
||||||
|
|
||||||
|
import {modalSchema, weekdayColumns} from './data';
|
||||||
|
import {Tag, Button, Table} from 'ant-design-vue'
|
||||||
|
import {getDictOptions} from "#/utils/dict";
|
||||||
|
|
||||||
|
const emit = defineEmits<{ reload: [] }>();
|
||||||
|
|
||||||
|
const isUpdate = ref(false);
|
||||||
|
const weekdayData = ref<any[]>([])
|
||||||
|
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 [BasicModal, modalApi] = useVbenModal({
|
||||||
|
// 在这里更改宽度
|
||||||
|
class: 'w-[70%]',
|
||||||
|
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) {
|
||||||
|
const record = await groupInfo(id);
|
||||||
|
await formApi.setValues(record);
|
||||||
|
}else {
|
||||||
|
weekdayData.value=[]
|
||||||
|
getDictOptions('wy_kqgzr').forEach(item=>{
|
||||||
|
weekdayData.value.push({
|
||||||
|
dayOfWeek:item.value,
|
||||||
|
label:item.label,
|
||||||
|
shift:item.value=='6'||item.value=='7'?'休息':'常规班次:08:00:00~12:00:00 14:00:00~17:00:00'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
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());
|
||||||
|
await (isUpdate.value ? groupUpdate(data) : groupAdd(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>
|
||||||
|
<template #weekdaySetting>
|
||||||
|
<div style="font-size: 0.875rem;">
|
||||||
|
<span>快捷设置班次:</span>
|
||||||
|
<Tag color="processing">常规班次:08:00:00~12:00:00 14:00:00~17:00:00</Tag>
|
||||||
|
<Button type="link">更改班次</Button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template #settingItem>
|
||||||
|
<Table style="width: 100%" bordered :columns="weekdayColumns" :data-source="weekdayData"
|
||||||
|
size="small" :pagination="false">
|
||||||
|
<!-- <template #headerCell="{ column }">-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- <template #bodyCell="{ column, record }">-->
|
||||||
|
<!-- <template>-->
|
||||||
|
<!-- {{ record[column.field] }}-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- <template #action="{row}">-->
|
||||||
|
<!-- <Button type="link">更改班次</Button>-->
|
||||||
|
<!-- <Button type="link">休息</Button>-->
|
||||||
|
<!-- </template>-->
|
||||||
|
</Table>
|
||||||
|
</template>
|
||||||
|
<template #attendanceShift>
|
||||||
|
班次
|
||||||
|
</template>
|
||||||
|
<template #schedulingCycle>
|
||||||
|
周期
|
||||||
|
</template>
|
||||||
|
</BasicForm>
|
||||||
|
</BasicModal>
|
||||||
|
</template>
|
||||||
|
|
@@ -1,11 +1,181 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|
||||||
|
import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui';
|
||||||
|
import { getVxePopupContainer } from '@vben/utils';
|
||||||
|
|
||||||
|
import { Modal, Popconfirm, Space } from 'ant-design-vue';
|
||||||
|
|
||||||
|
import {
|
||||||
|
useVbenVxeGrid,
|
||||||
|
vxeCheckboxChecked,
|
||||||
|
type VxeGridProps
|
||||||
|
} from '#/adapter/vxe-table';
|
||||||
|
|
||||||
|
import {
|
||||||
|
groupExport,
|
||||||
|
groupList,
|
||||||
|
groupRemove, groupUpdate,
|
||||||
|
} from '#/api/property/attendanceManagement/attendanceGroupSettings';
|
||||||
|
import type { GroupForm } from '#/api/property/attendanceManagement/attendanceGroupSettings/model';
|
||||||
|
import { commonDownloadExcel } from '#/utils/file/download';
|
||||||
|
|
||||||
|
import groupModal from './group-modal.vue';
|
||||||
|
import { columns, querySchema } from './data';
|
||||||
|
import {TableSwitch} from "#/components/table";
|
||||||
|
import {useAccess} from "@vben/access";
|
||||||
|
|
||||||
|
const { hasAccessByCodes } = useAccess();
|
||||||
|
|
||||||
|
const formOptions: VbenFormProps = {
|
||||||
|
commonConfig: {
|
||||||
|
labelWidth: 80,
|
||||||
|
componentProps: {
|
||||||
|
allowClear: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
schema: querySchema(),
|
||||||
|
wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4',
|
||||||
|
};
|
||||||
|
|
||||||
|
const gridOptions: VxeGridProps = {
|
||||||
|
checkboxConfig: {
|
||||||
|
// 高亮
|
||||||
|
highlight: true,
|
||||||
|
// 翻页时保留选中状态
|
||||||
|
reserve: true,
|
||||||
|
// 点击行选中
|
||||||
|
// trigger: 'row',
|
||||||
|
},
|
||||||
|
columns,
|
||||||
|
height: 'auto',
|
||||||
|
keepSource: true,
|
||||||
|
pagerConfig: {},
|
||||||
|
proxyConfig: {
|
||||||
|
ajax: {
|
||||||
|
query: async ({ page }, formValues = {}) => {
|
||||||
|
return await groupList({
|
||||||
|
pageNum: page.currentPage,
|
||||||
|
pageSize: page.pageSize,
|
||||||
|
...formValues,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
rowConfig: {
|
||||||
|
keyField: 'id',
|
||||||
|
},
|
||||||
|
// 表格全局唯一表示 保存列配置需要用到
|
||||||
|
id: 'Property-group-index'
|
||||||
|
};
|
||||||
|
|
||||||
|
const [BasicTable, tableApi] = useVbenVxeGrid({
|
||||||
|
formOptions,
|
||||||
|
gridOptions,
|
||||||
|
});
|
||||||
|
|
||||||
|
const [GroupModal, modalApi] = useVbenModal({
|
||||||
|
connectedComponent: groupModal,
|
||||||
|
});
|
||||||
|
|
||||||
|
function handleAdd() {
|
||||||
|
modalApi.setData({});
|
||||||
|
modalApi.open();
|
||||||
|
}
|
||||||
|
|
||||||
|
async function handleEdit(row: Required<GroupForm>) {
|
||||||
|
modalApi.setData({ id: row.id });
|
||||||
|
modalApi.open();
|
||||||
|
}
|
||||||
|
|
||||||
|
async function handleDelete(row: Required<GroupForm>) {
|
||||||
|
await groupRemove(row.id);
|
||||||
|
await tableApi.query();
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleMultiDelete() {
|
||||||
|
const rows = tableApi.grid.getCheckboxRecords();
|
||||||
|
const ids = rows.map((row: Required<GroupForm>) => row.id);
|
||||||
|
Modal.confirm({
|
||||||
|
title: '提示',
|
||||||
|
okType: 'danger',
|
||||||
|
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||||
|
onOk: async () => {
|
||||||
|
await groupRemove(ids);
|
||||||
|
await tableApi.query();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleDownloadExcel() {
|
||||||
|
commonDownloadExcel(groupExport, '考勤组基本信息数据', tableApi.formApi.form.values, {
|
||||||
|
fieldMappingTime: formOptions.fieldMappingTime,
|
||||||
|
});
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
考勤组设置
|
<Page :auto-content-height="true">
|
||||||
|
<BasicTable table-title="考勤组列表">
|
||||||
|
<template #toolbar-tools>
|
||||||
|
<Space>
|
||||||
|
<a-button
|
||||||
|
v-access:code="['Property:group:export']"
|
||||||
|
@click="handleDownloadExcel"
|
||||||
|
>
|
||||||
|
{{ $t('pages.common.export') }}
|
||||||
|
</a-button>
|
||||||
|
<a-button
|
||||||
|
:disabled="!vxeCheckboxChecked(tableApi)"
|
||||||
|
danger
|
||||||
|
type="primary"
|
||||||
|
v-access:code="['Property:group:remove']"
|
||||||
|
@click="handleMultiDelete">
|
||||||
|
{{ $t('pages.common.delete') }}
|
||||||
|
</a-button>
|
||||||
|
<a-button
|
||||||
|
type="primary"
|
||||||
|
v-access:code="['Property:group:add']"
|
||||||
|
@click="handleAdd"
|
||||||
|
>
|
||||||
|
{{ $t('pages.common.add') }}
|
||||||
|
</a-button>
|
||||||
|
</Space>
|
||||||
|
</template>
|
||||||
|
<template #action="{ row }">
|
||||||
|
<Space>
|
||||||
|
<ghost-button
|
||||||
|
v-access:code="['Property:group:edit']"
|
||||||
|
@click.stop="handleEdit(row)"
|
||||||
|
>
|
||||||
|
{{ $t('pages.common.edit') }}
|
||||||
|
</ghost-button>
|
||||||
|
<Popconfirm
|
||||||
|
:get-popup-container="getVxePopupContainer"
|
||||||
|
placement="left"
|
||||||
|
title="确认删除?"
|
||||||
|
@confirm="handleDelete(row)"
|
||||||
|
>
|
||||||
|
<ghost-button
|
||||||
|
danger
|
||||||
|
v-access:code="['Property:group:remove']"
|
||||||
|
@click.stop=""
|
||||||
|
>
|
||||||
|
{{ $t('pages.common.delete') }}
|
||||||
|
</ghost-button>
|
||||||
|
</Popconfirm>
|
||||||
|
</Space>
|
||||||
|
</template>
|
||||||
|
<template #status="{row}">
|
||||||
|
<TableSwitch
|
||||||
|
:checkedValue="1"
|
||||||
|
:unCheckedValue="0"
|
||||||
|
v-model:value="row.status"
|
||||||
|
:api="() => groupUpdate(row)"
|
||||||
|
:disabled="!hasAccessByCodes(['property:depot:edit'])"
|
||||||
|
@reload="() => tableApi.query()"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</BasicTable>
|
||||||
|
<GroupModal @reload="tableApi.query()" />
|
||||||
|
</Page>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
@@ -211,6 +211,7 @@ export const modalSchemaRefund: FormSchemaGetter = () => [
|
|||||||
label: '退费原因',
|
label: '退费原因',
|
||||||
fieldName: 'reason',
|
fieldName: 'reason',
|
||||||
component: 'Textarea',
|
component: 'Textarea',
|
||||||
formItemClass: 'col-span-2'
|
formItemClass: 'col-span-2',
|
||||||
|
rules:'required'
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
@@ -7,7 +7,7 @@ import {cloneDeep} from '@vben/utils';
|
|||||||
import {useVbenForm} from '#/adapter/form';
|
import {useVbenForm} from '#/adapter/form';
|
||||||
import {
|
import {
|
||||||
houseChargeAdd,
|
houseChargeAdd,
|
||||||
houseChargeInfo,
|
houseChargeInfo, houseChargeRefund,
|
||||||
houseChargeUpdate
|
houseChargeUpdate
|
||||||
} from '#/api/property/costManagement/houseCharge';
|
} from '#/api/property/costManagement/houseCharge';
|
||||||
import {defaultFormValueGetter, useBeforeCloseDiff} from '#/utils/popup';
|
import {defaultFormValueGetter, useBeforeCloseDiff} from '#/utils/popup';
|
||||||
@@ -83,9 +83,9 @@ async function handleConfirm() {
|
|||||||
}
|
}
|
||||||
// getValues获取为一个readonly的对象 需要修改必须先深拷贝一次
|
// getValues获取为一个readonly的对象 需要修改必须先深拷贝一次
|
||||||
const data = cloneDeep(await formApi.getValues());
|
const data = cloneDeep(await formApi.getValues());
|
||||||
record.value.reason=data.reason
|
data.costItemsId = record.value.costItemsId
|
||||||
record.value.chargeStatus = '5'
|
data.personId = record.value.personId
|
||||||
await houseChargeUpdate(record.value) ;
|
await houseChargeRefund(data);
|
||||||
resetInitialized();
|
resetInitialized();
|
||||||
emit('reload');
|
emit('reload');
|
||||||
modalApi.close();
|
modalApi.close();
|
||||||
@@ -115,7 +115,7 @@ async function handleClosed() {
|
|||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
<DescriptionsItem label="费用类型">
|
<DescriptionsItem label="费用类型">
|
||||||
<component
|
<component
|
||||||
v-if="costItem"
|
v-if="costItem"
|
||||||
:is="renderDict(costItem?.costType,'pro_expense_type')"
|
:is="renderDict(costItem?.costType,'pro_expense_type')"
|
||||||
/>
|
/>
|
||||||
</DescriptionsItem>
|
</DescriptionsItem>
|
||||||
|
@@ -36,11 +36,11 @@ export const columns: VxeGridProps['columns'] = [
|
|||||||
field: 'payAcount',
|
field: 'payAcount',
|
||||||
width: 100,
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
title: '支付时间',
|
// title: '支付时间',
|
||||||
field: 'payTime',
|
// field: 'payTime',
|
||||||
width: 180,
|
// width: 180,
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
title: '退款原因',
|
title: '退款原因',
|
||||||
field: 'reason',
|
field: 'reason',
|
||||||
|
Reference in New Issue
Block a user