diff --git a/src/api/wallet/wallet-recharge-apply.ts b/src/api/wallet/wallet-recharge-apply.ts index 28d3a6c..56da1bb 100644 --- a/src/api/wallet/wallet-recharge-apply.ts +++ b/src/api/wallet/wallet-recharge-apply.ts @@ -78,3 +78,12 @@ export function putObj(obj?: Object) { data: obj, }) } + +// 校验申请的充值/扣款数据当前是否合法 +export function validateError(params: any) { + return request({ + url: "/wallet/wallet-recharge-apply/validate-error", + method: "get", + params: params, + }) +} diff --git a/src/components/processDrawer/index.vue b/src/components/processDrawer/index.vue index bcc4033..1a5cc7d 100644 --- a/src/components/processDrawer/index.vue +++ b/src/components/processDrawer/index.vue @@ -1,30 +1,31 @@ @@ -203,6 +240,11 @@ const activeName = ref() const tabItems = ref([{}]) const processDrawerRef = ref() +const errorState = reactive({ + errorList: [], + loading: false, +}) + const state: BasicTableProps = reactive({ queryForm: {}, pageList: walletRechargeApplyApi.pageJoin, @@ -309,8 +351,23 @@ const handleDelete = async (ids: string[]) => { * 点击开始处理 * @param row */ -const deal = (row: any) => { +const deal = async (row: any) => { if (!row.processId) return useMessage().info("流程id不存在") + try { + errorState.loading = true + // 查询是否有错误 + const { data }: any = await walletRechargeApplyApi.validateError({ applyId: row.id }) + if (data && data.length) { + errorState.errorList = data + } else { + errorState.errorList = [] + } + } catch (error) { + console.log("查询是否有错误error:", error); + errorState.errorList = [] + } finally { + errorState.loading = false + } processDrawerRef.value.openProcessDrawer(row) } @@ -321,6 +378,26 @@ const taskSubmitEvent = () => {