考勤
This commit is contained in:
@@ -1,16 +1,15 @@
|
||||
<script setup lang="ts">
|
||||
import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui';
|
||||
import { getVxePopupContainer } from '@vben/utils';
|
||||
import { Popconfirm, Space } from 'ant-design-vue';
|
||||
import { Space } from 'ant-design-vue';
|
||||
import {
|
||||
useVbenVxeGrid,
|
||||
type VxeGridProps
|
||||
} from '#/adapter/vxe-table';
|
||||
import {
|
||||
paymentReviewList,
|
||||
paymentReviewRemove,
|
||||
} from '#/api/property/costManagement/paymentReview';
|
||||
import type { PaymentReviewForm } from '#/api/property/costManagement/paymentReview/model';
|
||||
import paymentReviewModal from './paymentReview-modal.vue';
|
||||
import paymentReviewDetail from './paymentReview-detail.vue';
|
||||
import { columns, querySchema } from './data';
|
||||
|
||||
@@ -34,8 +33,6 @@ const gridOptions: VxeGridProps = {
|
||||
// 点击行选中
|
||||
// trigger: 'row',
|
||||
},
|
||||
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
|
||||
// columns: columns(),
|
||||
columns,
|
||||
height: 'auto',
|
||||
keepSource: true,
|
||||
@@ -54,7 +51,6 @@ const gridOptions: VxeGridProps = {
|
||||
rowConfig: {
|
||||
keyField: 'id',
|
||||
},
|
||||
// 表格全局唯一表示 保存列配置需要用到
|
||||
id: 'property-paymentReview-index'
|
||||
};
|
||||
|
||||
@@ -63,6 +59,10 @@ const [BasicTable, tableApi] = useVbenVxeGrid({
|
||||
gridOptions,
|
||||
});
|
||||
|
||||
const [PaymentReviewModal, modalApi] = useVbenModal({
|
||||
connectedComponent: paymentReviewModal,
|
||||
});
|
||||
|
||||
const [paymentReviewDetailModal, paymentReviewDetailApi] = useVbenModal({
|
||||
connectedComponent: paymentReviewDetail,
|
||||
});
|
||||
@@ -72,9 +72,9 @@ async function handleInfo(row: Required<PaymentReviewForm>) {
|
||||
paymentReviewDetailApi.open();
|
||||
}
|
||||
|
||||
async function handleDelete(row: Required<PaymentReviewForm>) {
|
||||
await paymentReviewRemove(row.id);
|
||||
await tableApi.query();
|
||||
async function handleEdit(row: Required<PaymentReviewForm>) {
|
||||
modalApi.setData({ id: row.id });
|
||||
modalApi.open();
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -84,22 +84,16 @@ async function handleDelete(row: Required<PaymentReviewForm>) {
|
||||
<template #action="{ row }">
|
||||
<Space>
|
||||
<ghost-button
|
||||
@click.stop="handleInfo(row)"
|
||||
@click.stop="handleInfo(row)"
|
||||
>
|
||||
{{ $t('pages.common.info') }}
|
||||
</ghost-button>
|
||||
<Popconfirm
|
||||
:get-popup-container="getVxePopupContainer"
|
||||
placement="left"
|
||||
title="确认审核?"
|
||||
@confirm="handleDelete(row)"
|
||||
<ghost-button
|
||||
:disabled="row.state!=='0'"
|
||||
@click.stop="handleEdit(row)"
|
||||
>
|
||||
<ghost-button
|
||||
@click.stop=""
|
||||
>
|
||||
{{ '审核' }}
|
||||
</ghost-button>
|
||||
</Popconfirm>
|
||||
{{ '审核' }}
|
||||
</ghost-button>
|
||||
</Space>
|
||||
</template>
|
||||
</BasicTable>
|
||||
|
Reference in New Issue
Block a user