fix: todo

This commit is contained in:
xingyu4j
2025-09-05 14:11:35 +08:00
parent 2369f06654
commit f30a3451de
27 changed files with 170 additions and 137 deletions

View File

@@ -34,20 +34,18 @@ function handleCreate() {
appFormModalApi.setData(null).open();
}
function handleEdit(row: Required<PayAppApi.App>) {
function handleEdit(row: PayAppApi.App) {
appFormModalApi.setData({ id: row.id }).open();
}
async function handleDelete(row: Required<PayAppApi.App>) {
async function handleDelete(row: PayAppApi.App) {
const hideLoading = message.loading({
content: $t('ui.actionMessage.deleting', [row.name]),
key: 'action_key_msg',
});
try {
await deleteApp(row.id as number);
message.success({
content: $t('ui.actionMessage.deleteSuccess', [row.name]),
key: 'action_key_msg',
});
onRefresh();
} finally {
@@ -180,7 +178,6 @@ const [Grid, gridApi] = useVbenVxeGrid({
/>
</template>
<template #alipayAppConfig="{ row }">
<!-- TODO @xingyuchannelCodes 爆红 -->
<TableAction
:actions="[
{

View File

@@ -1,10 +1,10 @@
import type { VbenFormSchema } from '#/adapter/form';
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import { getAppList } from '#/api/pay/app';
import { DICT_TYPE } from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { getAppList } from '#/api/pay/app';
import { getRangePickerDefaultProps } from '#/utils';
/** 列表的搜索表单 */
@@ -33,12 +33,16 @@ export function useGridFormSchema(): VbenFormSchema[] {
componentProps: {
allowClear: true,
options: getDictOptions(DICT_TYPE.PAY_NOTIFY_TYPE, 'number'),
placeholder: '请选择通知类型',
},
},
{
fieldName: 'dataId',
label: '关联编号',
component: 'Input',
componentProps: {
placeholder: '请输入关联编号',
},
},
{
fieldName: 'status',
@@ -47,12 +51,16 @@ export function useGridFormSchema(): VbenFormSchema[] {
componentProps: {
allowClear: true,
options: getDictOptions(DICT_TYPE.PAY_NOTIFY_STATUS, 'number'),
placeholder: '请选择通知状态',
},
},
{
fieldName: 'merchantOrderId',
label: '商户订单编号',
component: 'Input',
componentProps: {
placeholder: '请输入商户订单编号',
},
},
{
fieldName: 'createTime',
@@ -61,12 +69,12 @@ export function useGridFormSchema(): VbenFormSchema[] {
componentProps: {
...getRangePickerDefaultProps(),
allowClear: true,
placeholder: ['开始日期', '结束日期'],
},
},
];
}
// TODO @xingyu缺少 placeholder
/** 列表的字段 */
export function useGridColumns(): VxeTableGridOptions['columns'] {
return [

View File

@@ -8,13 +8,15 @@ import { getDictOptions } from '@vben/hooks';
import { getRangePickerDefaultProps } from '#/utils';
/** 列表的搜索表单 */
// TODO @xingyu少了 placeholder
export function useGridFormSchema(): VbenFormSchema[] {
return [
{
fieldName: 'userId',
label: '用户编号',
component: 'Input',
componentProps: {
placeholder: '请输入用户编号',
},
},
{
fieldName: 'userType',
@@ -22,6 +24,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
component: 'Select',
componentProps: {
options: getDictOptions(DICT_TYPE.USER_TYPE, 'number'),
placeholder: '请选择用户类型',
},
},
{
@@ -31,6 +34,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
componentProps: {
allowClear: true,
...getRangePickerDefaultProps(),
placeholder: ['开始日期', '结束日期'],
},
},
];

View File

@@ -14,6 +14,9 @@ export function useFormSchema(): VbenFormSchema[] {
label: '套餐名',
component: 'Input',
rules: 'required',
componentProps: {
placeholder: '请输入套餐名称',
},
},
{
fieldName: 'payPrice',
@@ -24,6 +27,7 @@ export function useFormSchema(): VbenFormSchema[] {
min: 0,
precision: 2,
step: 0.01,
placeholder: '请输入支付金额',
},
},
{
@@ -35,6 +39,7 @@ export function useFormSchema(): VbenFormSchema[] {
min: 0,
precision: 2,
step: 0.01,
placeholder: '请输入赠送金额',
},
},
{
@@ -44,19 +49,22 @@ export function useFormSchema(): VbenFormSchema[] {
rules: 'required',
componentProps: {
options: getDictOptions(DICT_TYPE.COMMON_STATUS, 'number'),
placeholder: '请选择开启状态',
},
},
];
}
/** 列表的搜索表单 */
// TODO @xingyu少了 placeholder
export function useGridFormSchema(): VbenFormSchema[] {
return [
{
fieldName: 'name',
label: '套餐名称',
component: 'Input',
componentProps: {
placeholder: '请输入套餐名称',
},
},
{
fieldName: 'status',
@@ -65,6 +73,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
componentProps: {
allowClear: true,
options: getDictOptions(DICT_TYPE.COMMON_STATUS, 'number'),
placeholder: '请选择状态',
},
},
{
@@ -74,6 +83,7 @@ export function useGridFormSchema(): VbenFormSchema[] {
componentProps: {
allowClear: true,
...getRangePickerDefaultProps(),
placeholder: ['开始日期', '结束日期'],
},
},
];