From a1d7e81859f554f3a53680cc35f0f49bf1f77098 Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期四, 14 五月 2026 14:37:02 +0800
Subject: [PATCH] 导入项目
---
src/views/pay/notify/index.vue | 250 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 250 insertions(+), 0 deletions(-)
diff --git a/src/views/pay/notify/index.vue b/src/views/pay/notify/index.vue
new file mode 100644
index 0000000..e48345c
--- /dev/null
+++ b/src/views/pay/notify/index.vue
@@ -0,0 +1,250 @@
+<template>
+ <doc-alert title="鏀粯鍔熻兘寮�鍚�" url="https://doc.iocoder.cn/pay/build/" />
+
+ <!-- 鎼滅储宸ヤ綔鏍� -->
+ <ContentWrap>
+ <el-form
+ class="-mb-15px"
+ :model="queryParams"
+ ref="queryFormRef"
+ :inline="true"
+ label-width="100px"
+ >
+ <el-form-item label="搴旂敤缂栧彿" prop="appId">
+ <el-select
+ v-model="queryParams.appId"
+ placeholder="璇烽�夋嫨搴旂敤淇℃伅"
+ clearable
+ filterable
+ class="!w-240px"
+ >
+ <el-option v-for="item in appList" :key="item.id" :label="item.name" :value="item.id" />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="閫氱煡绫诲瀷" prop="type">
+ <el-select
+ v-model="queryParams.type"
+ placeholder="璇烽�夋嫨閫氱煡绫诲瀷"
+ clearable
+ class="!w-240px"
+ >
+ <el-option
+ v-for="dict in getIntDictOptions(DICT_TYPE.PAY_NOTIFY_TYPE)"
+ :key="dict.value"
+ :label="dict.label"
+ :value="dict.value"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="鍏宠仈缂栧彿" prop="dataId">
+ <el-input
+ v-model="queryParams.dataId"
+ placeholder="璇疯緭鍏ュ叧鑱旂紪鍙�"
+ clearable
+ @keyup.enter="handleQuery"
+ class="!w-240px"
+ />
+ </el-form-item>
+ <el-form-item label="閫氱煡鐘舵��" prop="status">
+ <el-select
+ v-model="queryParams.status"
+ placeholder="璇烽�夋嫨閫氱煡鐘舵��"
+ clearable
+ class="!w-240px"
+ >
+ <el-option
+ v-for="dict in getIntDictOptions(DICT_TYPE.PAY_NOTIFY_STATUS)"
+ :key="dict.value"
+ :label="dict.label"
+ :value="dict.value"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item label="鍟嗘埛璁㈠崟缂栧彿" prop="merchantOrderId">
+ <el-input
+ v-model="queryParams.merchantOrderId"
+ placeholder="璇疯緭鍏ュ晢鎴疯鍗曠紪鍙�"
+ clearable
+ @keyup.enter="handleQuery"
+ class="!w-240px"
+ />
+ </el-form-item>
+ <el-form-item label="鍟嗘埛閫�娆剧紪鍙�" prop="merchantRefundId">
+ <el-input
+ v-model="queryParams.merchantRefundId"
+ placeholder="璇疯緭鍏ュ晢鎴烽��娆剧紪鍙�"
+ clearable
+ @keyup.enter="handleQuery"
+ class="!w-240px"
+ />
+ </el-form-item>
+ <el-form-item label="鍟嗘埛杞处缂栧彿" prop="merchantTransferId">
+ <el-input
+ v-model="queryParams.merchantTransferId"
+ placeholder="璇疯緭鍏ュ晢鎴疯浆璐︾紪鍙�"
+ clearable
+ @keyup.enter="handleQuery"
+ class="!w-240px"
+ />
+ </el-form-item>
+ <el-form-item label="鍒涘缓鏃堕棿" prop="createTime">
+ <el-date-picker
+ v-model="queryParams.createTime"
+ style="width: 240px"
+ value-format="YYYY-MM-DD HH:mm:ss"
+ type="daterange"
+ range-separator="-"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡"
+ :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
+ class="!w-240px"
+ />
+ </el-form-item>
+ <el-form-item>
+ <el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 鎼滅储</el-button>
+ <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 閲嶇疆</el-button>
+ </el-form-item>
+ </el-form>
+ </ContentWrap>
+
+ <!-- 鍒楄〃 -->
+ <ContentWrap>
+ <el-table v-loading="loading" :data="list">
+ <el-table-column label="浠诲姟缂栧彿" align="center" prop="id" />
+ <el-table-column label="搴旂敤缂栧彿" align="center" prop="appName" />
+ <el-table-column label="鍟嗘埛鍗曚俊鎭�" align="center" prop="merchant">
+ <template #default="scope">
+ <div v-if="scope.row.merchantOrderId">
+ <div>鍟嗘埛璁㈠崟缂栧彿锛歿{ scope.row.merchantOrderId }}</div>
+ </div>
+ <div v-if="scope.row.merchantRefundId">
+ <div>鍟嗘埛閫�娆剧紪鍙凤細{{ scope.row.merchantRefundId }}</div>
+ </div>
+ <div v-if="scope.row.merchantTransferId">
+ <div>鍟嗘埛杞处缂栧彿锛歿{ scope.row.merchantTransferId }}</div>
+ </div>
+ </template>
+ </el-table-column>
+ <el-table-column label="閫氱煡绫诲瀷" align="center" prop="type">
+ <template #default="scope">
+ <dict-tag :type="DICT_TYPE.PAY_NOTIFY_TYPE" :value="scope.row.type" />
+ </template>
+ </el-table-column>
+ <el-table-column label="鍏宠仈缂栧彿" align="center" prop="dataId" />
+ <el-table-column label="閫氱煡鐘舵��" align="center" prop="status">
+ <template #default="scope">
+ <dict-tag :type="DICT_TYPE.PAY_NOTIFY_STATUS" :value="scope.row.status" />
+ </template>
+ </el-table-column>
+ <el-table-column
+ label="鏈�鍚庨�氱煡鏃堕棿"
+ align="center"
+ prop="lastExecuteTime"
+ width="180"
+ :formatter="dateFormatter"
+ />
+ <el-table-column
+ label="涓嬫閫氱煡鏃堕棿"
+ align="center"
+ prop="nextNotifyTime"
+ width="180"
+ :formatter="dateFormatter"
+ />
+ <el-table-column label="閫氱煡娆℃暟" align="center" prop="notifyTimes">
+ <template #default="scope">
+ <el-tag size="small" type="success">
+ {{ scope.row.notifyTimes }} / {{ scope.row.maxNotifyTimes }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
+ <template #default="scope">
+ <el-button
+ link
+ type="primary"
+ @click="openDetail(scope.row.id)"
+ v-hasPermi="['pay:notify:query']"
+ >
+ 鏌ョ湅璇︽儏
+ </el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ <!-- 鍒嗛〉缁勪欢 -->
+ <Pagination
+ :total="total"
+ v-model:page="queryParams.pageNo"
+ v-model:limit="queryParams.pageSize"
+ @pagination="getList"
+ />
+ </ContentWrap>
+
+ <!-- 琛ㄥ崟寮圭獥锛氶瑙� -->
+ <NotifyDetail ref="detailRef" />
+</template>
+
+<script lang="ts" setup>
+import * as PayNotifyApi from '@/api/pay/notify'
+import * as PayAppApi from '@/api/pay/app'
+import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
+import { dateFormatter } from '@/utils/formatTime'
+import NotifyDetail from './NotifyDetail.vue'
+
+defineOptions({ name: 'PayNotify' })
+
+const loading = ref(true) // 鍒楄〃鐨勫姞杞戒腑
+const total = ref(0) // 鍒楄〃鐨勬�婚〉鏁�
+const list = ref() // 鍒楄〃鐨勬暟鎹�
+const queryParams = ref({
+ pageNo: 1,
+ pageSize: 10,
+ appId: null,
+ type: null,
+ dataId: null,
+ status: null,
+ merchantOrderId: null,
+ merchantRefundId: null,
+ merchantTransferId: null,
+ createTime: []
+})
+const queryFormRef = ref() // 鎼滅储鐨勮〃鍗�
+const appList = ref([]) // 鏀粯搴旂敤鍒楄〃闆嗗悎
+
+/** 鎼滅储鎸夐挳鎿嶄綔 */
+const handleQuery = () => {
+ queryParams.value.pageNo = 1
+ getList()
+}
+
+/** 鏌ヨ鍒楄〃 */
+const getList = async () => {
+ loading.value = true
+ try {
+ const data = await PayNotifyApi.getNotifyTaskPage(queryParams.value)
+ list.value = data.list
+ total.value = data.total
+ loading.value = false
+ } finally {
+ loading.value = false
+ }
+}
+
+/** 閲嶇疆鎸夐挳鎿嶄綔 */
+const resetQuery = () => {
+ queryFormRef.value?.resetFields()
+ handleQuery()
+}
+
+/** 璇︽儏鎸夐挳鎿嶄綔 */
+const detailRef = ref()
+const openDetail = (id: number) => {
+ detailRef.value.open(id)
+}
+
+/** 鍒濆鍖� **/
+onMounted(async () => {
+ await getList()
+ // 鑾峰緱绛涢�夐」
+ appList.value = await PayAppApi.getAppList()
+})
+</script>
--
Gitblit v1.8.0