feat(button): 添加SubmitButton组件并支持ant-design主题
This commit is contained in:
@@ -6,7 +6,7 @@ import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||
|
||||
import { ref, watch } from 'vue';
|
||||
|
||||
import { Page } from '@vben/common-ui';
|
||||
import { Page, SubmitButton } from '@vben/common-ui';
|
||||
|
||||
import { Button, message, notification, Tag } from 'ant-design-vue';
|
||||
import dayjs from 'dayjs';
|
||||
@@ -128,6 +128,7 @@ const gridOptions: VxeTableGridOptions<PaymentRowType> = {
|
||||
limit: page.pageSize,
|
||||
year: date[0],
|
||||
month: date[1],
|
||||
type: formValues.type ?? '',
|
||||
...formValues,
|
||||
});
|
||||
},
|
||||
@@ -152,9 +153,7 @@ async function onStartSysCheck() {
|
||||
month: date[1],
|
||||
};
|
||||
// 调用自动核对接口
|
||||
const hide = message.loading('系统自动核对中...', 0);
|
||||
await reconciliateBillsApi.autoCheck(params);
|
||||
hide();
|
||||
gridApi?.query();
|
||||
notification.success({
|
||||
message: '完成',
|
||||
@@ -208,7 +207,7 @@ async function onManualCheck(data?: PaymentRowType) {
|
||||
<Grid>
|
||||
<template #toolbar-actions>
|
||||
<div class="flex gap-2">
|
||||
<Button type="primary" @click="onStartSysCheck()">启动系统自动对账</Button>
|
||||
<SubmitButton theme="ant-design" :submit="onStartSysCheck" text="启动系统自动对账" />
|
||||
<Button type="primary" @click="onManualCheck()">人工对账</Button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -3,9 +3,11 @@ import type { CreateOrderType, PaymentRowType } from '../types';
|
||||
|
||||
import { ref, watch } from 'vue';
|
||||
|
||||
import { SubmitButton } from '@vben/common-ui';
|
||||
|
||||
import { VbenIcon } from '@vben-core/shadcn-ui';
|
||||
|
||||
import { Button, Card, Input, message, Modal, notification } from 'ant-design-vue';
|
||||
import { Card, Input, message, Modal, notification } from 'ant-design-vue';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
import { reconciliateBillsApi } from '#/api/posting/reconciliate';
|
||||
@@ -319,6 +321,7 @@ async function onCompleteCheckCreated() {
|
||||
|
||||
const paymentIds = multipleCurrentData.value.map((item) => item.id);
|
||||
// 调用接口
|
||||
const hideLoading = message.loading('处理中...', 0);
|
||||
await (isBatchMode.value
|
||||
? reconciliateBillsApi.manualCheckCreatedBatch({
|
||||
paymentIds: paymentIds.join(','),
|
||||
@@ -326,6 +329,7 @@ async function onCompleteCheckCreated() {
|
||||
})
|
||||
: reconciliateBillsApi.manualCheckCreated(data));
|
||||
onCompleteCheck();
|
||||
hideLoading();
|
||||
// 清空已选列表
|
||||
selectedData.value = [];
|
||||
selectedRef.value?.clearData();
|
||||
@@ -408,7 +412,12 @@ async function onCompleteCheckCreated() {
|
||||
size="small"
|
||||
>
|
||||
<template #extra>
|
||||
<Button type="primary" size="small" @click="onCompleteCheckCreated()">确认对账</Button>
|
||||
<SubmitButton
|
||||
theme="ant-design"
|
||||
size="small"
|
||||
:submit="onCompleteCheckCreated"
|
||||
text="确认对账"
|
||||
/>
|
||||
</template>
|
||||
<Selected
|
||||
ref="selectedRef"
|
||||
|
||||
Reference in New Issue
Block a user