diff --git a/package.json b/package.json index bcf5a141..abc1018a 100644 --- a/package.json +++ b/package.json @@ -57,6 +57,7 @@ "nprogress": "^0.2.0", "pinia": "^2.1.6", "qrcode": "^1.5.3", + "qrcode.vue": "^3.4.0", "qs": "^6.11.2", "steady-xml": "^0.1.0", "url": "^0.11.1", diff --git a/src/api/pay/app/index.ts b/src/api/pay/app/index.ts index c19eb99b..4bb06b36 100644 --- a/src/api/pay/app/index.ts +++ b/src/api/pay/app/index.ts @@ -22,16 +22,6 @@ export interface AppPageReqVO extends PageParam { createTime?: Date[] } -export interface AppExportReqVO { - name?: string - status?: number - remark?: string - payNotifyUrl?: string - refundNotifyUrl?: string - merchantName?: string - createTime?: Date[] -} - export interface AppUpdateStatusReqVO { id: number status: number @@ -67,12 +57,9 @@ export const deleteApp = (id: number) => { return request.delete({ url: '/pay/app/delete?id=' + id }) } -// 导出支付应用 -export const exportApp = (params: AppExportReqVO) => { - return request.download({ url: '/pay/app/export-excel', params }) -} - -// 根据商ID称搜索应用列表 -export const getAppListByMerchantId = (merchantId: number) => { - return request.get({ url: '/pay/app/list-merchant-id', params: { merchantId: merchantId } }) +// 获得支付应用列表 +export const getAppList = () => { + return request.get({ + url: '/pay/app/list' + }) } diff --git a/src/api/pay/demo/index.ts b/src/api/pay/demo/index.ts new file mode 100644 index 00000000..3824a8b2 --- /dev/null +++ b/src/api/pay/demo/index.ts @@ -0,0 +1,36 @@ +import request from '@/config/axios' + +export interface DemoOrderVO { + spuId: number + createTime: Date +} + +// 创建示例订单 +export function createDemoOrder(data: DemoOrderVO) { + return request.post({ + url: '/pay/demo-order/create', + data: data + }) +} + +// 获得示例订单 +export function getDemoOrder(id: number) { + return request.get({ + url: '/pay/demo-order/get?id=' + id + }) +} + +// 获得示例订单分页 +export function getDemoOrderPage(query: PageParam) { + return request.get({ + url: '/pay/demo-order/page', + params: query + }) +} + +// 退款示例订单 +export function refundDemoOrder(id) { + return request.put({ + url: '/pay/demo-order/refund?id=' + id + }) +} diff --git a/src/api/pay/merchant/index.ts b/src/api/pay/merchant/index.ts deleted file mode 100644 index bb630c36..00000000 --- a/src/api/pay/merchant/index.ts +++ /dev/null @@ -1,78 +0,0 @@ -import request from '@/config/axios' - -export interface MerchantVO { - id: number - no: string - name: string - shortName: string - status: number - remark: string - createTime: Date -} - -export interface MerchantPageReqVO extends PageParam { - no?: string - name?: string - shortName?: string - status?: number - remark?: string - createTime?: Date[] -} - -export interface MerchantExportReqVO { - no?: string - name?: string - shortName?: string - status?: number - remark?: string - createTime?: Date[] -} - -// 查询列表支付商户 -export const getMerchantPage = (params: MerchantPageReqVO) => { - return request.get({ url: '/pay/merchant/page', params }) -} - -// 查询详情支付商户 -export const getMerchant = (id: number) => { - return request.get({ url: '/pay/merchant/get?id=' + id }) -} - -// 根据商户名称搜索商户列表 -export const getMerchantListByName = (name?: string) => { - return request.get({ - url: '/pay/merchant/list-by-name', - params: { - name: name - } - }) -} - -// 新增支付商户 -export const createMerchant = (data: MerchantVO) => { - return request.post({ url: '/pay/merchant/create', data }) -} - -// 修改支付商户 -export const updateMerchant = (data: MerchantVO) => { - return request.put({ url: '/pay/merchant/update', data }) -} - -// 删除支付商户 -export const deleteMerchant = (id: number) => { - return request.delete({ url: '/pay/merchant/delete?id=' + id }) -} - -// 导出支付商户 -export const exportMerchant = (params: MerchantExportReqVO) => { - return request.download({ url: '/pay/merchant/export-excel', params }) -} - -// 支付商户状态修改 -export const updateMerchantStatus = (id: number, status: number) => { - const data = { - id, - status - } - return request.put({ url: '/pay/merchant/update-status', data: data }) -} diff --git a/src/api/pay/notify/index.ts b/src/api/pay/notify/index.ts new file mode 100644 index 00000000..dc8bd887 --- /dev/null +++ b/src/api/pay/notify/index.ts @@ -0,0 +1,16 @@ +import request from '@/config/axios' + +// 获得支付通知明细 +export const getNotifyTaskDetail = (id) => { + return request.get({ + url: '/pay/notify/get-detail?id=' + id + }) +} + +// 获得支付通知分页 +export const getNotifyTaskPage = (query) => { + return request.get({ + url: '/pay/notify/page', + params: query + }) +} diff --git a/src/api/pay/order/index.ts b/src/api/pay/order/index.ts index 6621381a..71960a8a 100644 --- a/src/api/pay/order/index.ts +++ b/src/api/pay/order/index.ts @@ -93,19 +93,9 @@ export const getOrderDetail = async (id: number) => { return await request.get({ url: '/pay/order/get-detail?id=' + id }) } -// 新增支付订单 -export const createOrder = async (data: OrderVO) => { - return await request.post({ url: '/pay/order/create', data }) -} - -// 修改支付订单 -export const updateOrder = async (data: OrderVO) => { - return await request.put({ url: '/pay/order/update', data }) -} - -// 删除支付订单 -export const deleteOrder = async (id: number) => { - return await request.delete({ url: '/pay/order/delete?id=' + id }) +// 提交支付订单 +export const submitOrder = async (data: any) => { + return await request.post({ url: '/pay/order/submit', data }) } // 导出支付订单 diff --git a/src/assets/svgs/pay/icon/alipay_app.svg b/src/assets/svgs/pay/icon/alipay_app.svg new file mode 100644 index 00000000..ebf11883 --- /dev/null +++ b/src/assets/svgs/pay/icon/alipay_app.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/pay/icon/alipay_bar.svg b/src/assets/svgs/pay/icon/alipay_bar.svg new file mode 100644 index 00000000..eb1e1e84 --- /dev/null +++ b/src/assets/svgs/pay/icon/alipay_bar.svg @@ -0,0 +1,2 @@ + diff --git a/src/assets/svgs/pay/icon/alipay_pc.svg b/src/assets/svgs/pay/icon/alipay_pc.svg new file mode 100644 index 00000000..2a752770 --- /dev/null +++ b/src/assets/svgs/pay/icon/alipay_pc.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/pay/icon/alipay_qr.svg b/src/assets/svgs/pay/icon/alipay_qr.svg new file mode 100644 index 00000000..48337508 --- /dev/null +++ b/src/assets/svgs/pay/icon/alipay_qr.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/src/assets/svgs/pay/icon/alipay_wap.svg b/src/assets/svgs/pay/icon/alipay_wap.svg new file mode 100644 index 00000000..87075dbb --- /dev/null +++ b/src/assets/svgs/pay/icon/alipay_wap.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/pay/icon/mock.svg b/src/assets/svgs/pay/icon/mock.svg new file mode 100644 index 00000000..27b09ead --- /dev/null +++ b/src/assets/svgs/pay/icon/mock.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/pay/icon/wx_app.svg b/src/assets/svgs/pay/icon/wx_app.svg new file mode 100644 index 00000000..ad40b2a2 --- /dev/null +++ b/src/assets/svgs/pay/icon/wx_app.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/src/assets/svgs/pay/icon/wx_bar.svg b/src/assets/svgs/pay/icon/wx_bar.svg new file mode 100644 index 00000000..11292e6e --- /dev/null +++ b/src/assets/svgs/pay/icon/wx_bar.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/pay/icon/wx_lite.svg b/src/assets/svgs/pay/icon/wx_lite.svg new file mode 100644 index 00000000..0c925cf3 --- /dev/null +++ b/src/assets/svgs/pay/icon/wx_lite.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/pay/icon/wx_native.svg b/src/assets/svgs/pay/icon/wx_native.svg new file mode 100644 index 00000000..bf3ba2b6 --- /dev/null +++ b/src/assets/svgs/pay/icon/wx_native.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/svgs/pay/icon/wx_pub.svg b/src/assets/svgs/pay/icon/wx_pub.svg new file mode 100644 index 00000000..3a6d15b7 --- /dev/null +++ b/src/assets/svgs/pay/icon/wx_pub.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/src/config/axios/index.ts b/src/config/axios/index.ts index e6c6af8d..79e558da 100644 --- a/src/config/axios/index.ts +++ b/src/config/axios/index.ts @@ -5,12 +5,13 @@ import { config } from './config' const { default_headers } = config const request = (option: any) => { - const { url, method, params, data, headersType, responseType } = option + const { url, method, params, data, headersType, responseType, ...config } = option return service({ url: url, method, params, data, + ...config, responseType: responseType, headers: { 'Content-Type': headersType || default_headers diff --git a/src/config/axios/service.ts b/src/config/axios/service.ts index 1a4741b6..3a4635f0 100644 --- a/src/config/axios/service.ts +++ b/src/config/axios/service.ts @@ -31,7 +31,7 @@ let requestList: any[] = [] // 是否正在刷新中 let isRefreshToken = false // 请求白名单,无须token的接口 -const whiteList: string[] = ['/login', '/refresh-token'] +const whiteList: string[] = ['/login', '/refresh-token', '/system/tenant/get-id-by-name'] // 创建axios实例 const service: AxiosInstance = axios.create({ @@ -47,8 +47,7 @@ service.interceptors.request.use( let isToken = (config!.headers || {}).isToken === false whiteList.some((v) => { if (config.url) { - config.url.indexOf(v) > -1 - return (isToken = false) + return (isToken = config.url.indexOf(v) > -1) } }) if (getAccessToken() && !isToken) { diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index 2a277a10..81f74d55 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -410,6 +410,24 @@ const remainingRouter: AppRouteRecordRaw[] = [ } } ] + }, + { + path: '/pay', + component: Layout, + name: 'pay', + meta: { hidden: true }, + children: [ + { + path: 'cashier', + name: 'PayCashier', + meta: { + title: '收银台', + noCache: true, + hidden: true + }, + component: () => import('@/views/pay/cashier/index.vue') + } + ] } ] diff --git a/src/utils/constants.ts b/src/utils/constants.ts index edde87d5..cd346a5c 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -99,6 +99,10 @@ export const PayChannelEnum = { code: 'wx_app', name: '微信 APP 支付' }, + WX_BAR: { + code: 'wx_bar', + name: '微信条码支付' + }, ALIPAY_PC: { code: 'alipay_pc', name: '支付宝 PC 网站支付' @@ -125,6 +129,36 @@ export const PayChannelEnum = { } } +/** + * 支付的展示模式每局 + */ +export const PayDisplayModeEnum = { + URL: { + mode: 'url' + }, + IFRAME: { + mode: 'iframe' + }, + FORM: { + mode: 'form' + }, + QR_CODE: { + mode: 'qr_code' + }, + APP: { + mode: 'app' + } +} + +/** + * 支付类型枚举 + */ +export const PayType = { + WECHAT: 'WECHAT', + ALIPAY: 'ALIPAY', + MOCK: 'MOCK' +} + /** * 支付订单状态枚举 */ @@ -143,80 +177,6 @@ export const PayOrderStatusEnum = { } } -/** - * 支付订单回调状态枚举 - */ -export const PayOrderNotifyStatusEnum = { - NO: { - status: 0, - name: '未通知' - }, - SUCCESS: { - status: 10, - name: '通知成功' - }, - FAILURE: { - status: 20, - name: '通知失败' - } -} - -/** - * 支付订单退款状态枚举 - */ -export const PayOrderRefundStatusEnum = { - NO: { - status: 0, - name: '未退款' - }, - SOME: { - status: 10, - name: '部分退款' - }, - ALL: { - status: 20, - name: '全部退款' - } -} - -/** - * 支付退款订单状态枚举 - */ -export const PayRefundStatusEnum = { - CREATE: { - status: 0, - name: '退款订单生成' - }, - SUCCESS: { - status: 1, - name: '退款成功' - }, - FAILURE: { - status: 2, - name: '退款失败' - }, - PROCESSING_NOTIFY: { - status: 3, - name: '退款中,渠道通知结果' - }, - PROCESSING_QUERY: { - status: 4, - name: '退款中,系统查询结果' - }, - UNKNOWN_RETRY: { - status: 5, - name: '状态未知,请重试' - }, - UNKNOWN_QUERY: { - status: 6, - name: '状态未知,系统查询结果' - }, - CLOSE: { - status: 99, - name: '退款关闭' - } -} - /** * 商品 SPU 状态 */ diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 67a92ba6..d11d1d33 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -130,17 +130,16 @@ export enum DICT_TYPE { BPM_OA_LEAVE_TYPE = 'bpm_oa_leave_type', // ========== PAY 模块 ========== - PAY_CHANNEL_WECHAT_VERSION = 'pay_channel_wechat_version', // 微信渠道版本 - PAY_CHANNEL_ALIPAY_SIGN_TYPE = 'pay_channel_alipay_sign_type', // 支付渠道支付宝算法类型 - PAY_CHANNEL_ALIPAY_MODE = 'pay_channel_alipay_mode', // 支付宝公钥类型 - PAY_CHANNEL_ALIPAY_SERVER_TYPE = 'pay_channel_alipay_server_type', // 支付宝网关地址 + PAY_CHANNEL_CODE = 'pay_channel_code', // 支付渠道编码类型 PAY_CHANNEL_CODE_TYPE = 'pay_channel_code_type', // 支付渠道编码类型 - PAY_ORDER_NOTIFY_STATUS = 'pay_order_notify_status', // 商户支付订单回调状态 PAY_ORDER_STATUS = 'pay_order_status', // 商户支付订单状态 PAY_ORDER_REFUND_STATUS = 'pay_order_refund_status', // 商户支付订单退款状态 PAY_REFUND_ORDER_STATUS = 'pay_refund_order_status', // 退款订单状态 PAY_REFUND_ORDER_TYPE = 'pay_refund_order_type', // 退款订单类别 + PAY_NOTIFY_STATUS = 'pay_notify_status', // 商户支付回调状态 + PAY_NOTIFY_TYPE = 'pay_notify_type', // 商户支付回调状态 + // ========== MP 模块 ========== MP_AUTO_REPLY_REQUEST_MATCH = 'mp_auto_reply_request_match', // 自动回复请求匹配类型 MP_MESSAGE_TYPE = 'mp_message_type', // 消息类型 diff --git a/src/views/Login/components/LoginForm.vue b/src/views/Login/components/LoginForm.vue index 82dbe3fc..190c5aa1 100644 --- a/src/views/Login/components/LoginForm.vue +++ b/src/views/Login/components/LoginForm.vue @@ -148,6 +148,8 @@ import { ElLoading } from 'element-plus' import LoginFormTitle from './LoginFormTitle.vue' import type { RouteLocationNormalizedLoaded } from 'vue-router' +import { CACHE_KEY, useCache } from '@/hooks/web/useCache' +const { wsCache } = useCache() import { useIcon } from '@/hooks/web/useIcon' import * as authUtil from '@/utils/auth' @@ -244,6 +246,7 @@ const handleLogin = async (params) => { if (!res) { return } + wsCache.delete(CACHE_KEY.USER) // 清除上次登录用户信息 ElLoading.service({ lock: true, text: '正在加载系统中...', diff --git a/src/views/infra/fileConfig/FileConfigForm.vue b/src/views/infra/fileConfig/FileConfigForm.vue index 6332f702..06b80e7d 100644 --- a/src/views/infra/fileConfig/FileConfigForm.vue +++ b/src/views/infra/fileConfig/FileConfigForm.vue @@ -67,7 +67,7 @@ 主动模式 - 主动模式 + 被动模式 diff --git a/src/views/pay/app/components/AppForm.vue b/src/views/pay/app/components/AppForm.vue index 4277fb62..b99766c1 100644 --- a/src/views/pay/app/components/AppForm.vue +++ b/src/views/pay/app/components/AppForm.vue @@ -21,8 +21,8 @@ - - + + @@ -66,7 +66,7 @@ const formData = ref({ const formRules = reactive({ name: [{ required: true, message: '应用名不能为空', trigger: 'blur' }], status: [{ required: true, message: '开启状态不能为空', trigger: 'blur' }], - payNotifyUrl: [{ required: true, message: '支付结果的回调地址不能为空', trigger: 'blur' }], + orderNotifyUrl: [{ required: true, message: '支付结果的回调地址不能为空', trigger: 'blur' }], refundNotifyUrl: [{ required: true, message: '退款结果的回调地址不能为空', trigger: 'blur' }] }) const formRef = ref() // 表单 Ref @@ -122,7 +122,7 @@ const resetForm = () => { name: undefined, status: CommonStatusEnum.ENABLE, remark: undefined, - payNotifyUrl: undefined, + orderNotifyUrl: undefined, refundNotifyUrl: undefined } formRef.value?.resetFields() diff --git a/src/views/pay/app/index.vue b/src/views/pay/app/index.vue index d3f993e9..e1c3ce31 100644 --- a/src/views/pay/app/index.vue +++ b/src/views/pay/app/index.vue @@ -1,4 +1,5 @@ + 新增 - - 导出 - @@ -392,20 +384,6 @@ const handleDelete = async (id: number) => { } catch {} } -/** 导出按钮操作 */ -const handleExport = async () => { - try { - // 导出的二次确认 - await message.exportConfirm() - // 发起导出 - exportLoading.value = true - const data = await AppApi.exportApp(queryParams) - download.excel(data, '支付应用信息.xls') - } finally { - exportLoading.value = false - } -} - /** * 根据渠道编码判断渠道列表中是否存在 * diff --git a/src/views/pay/cashier/index.vue b/src/views/pay/cashier/index.vue new file mode 100644 index 00000000..c55656bd --- /dev/null +++ b/src/views/pay/cashier/index.vue @@ -0,0 +1,482 @@ + + + + + {{ payOrder.id }} + {{ payOrder.subject }} + {{ payOrder.body }} + + ¥{{ (payOrder.price / 100.0).toFixed(2) }} + + + {{ formatDate(payOrder.createTime) }} + + + {{ formatDate(payOrder.expireTime) }} + + + + + + + + + + + + {{ channel.name }} + + + + + + + + {{ channel.name }} + + + + + + + + {{ channel.name }} + + + + + + + + + + + + + + + + + + + + + 或使用 + + (扫码枪/扫码盒) + + 扫码 + + + + + + + 确认支付 + + 取 消 + + + + + + + diff --git a/src/views/pay/demo/index.vue b/src/views/pay/demo/index.vue new file mode 100644 index 00000000..125ba8a0 --- /dev/null +++ b/src/views/pay/demo/index.vue @@ -0,0 +1,238 @@ + + + + + + + + + + 发起订单 + + + + + + + + + + + + ¥{{ (scope.row.price / 100.0).toFixed(2) }} + + + + + ¥{{ (scope.row.refundPrice / 100.0).toFixed(2) }} + + + + + + + + + + + + + {{ formatDate(scope.row.refundTime) }} + 退款中,等待退款结果 + + + + + + 前往支付 + + + 发起退款 + + + + + + + + + + + + + + + {{ item.name }} + + ¥{{ (item.price / 100.0).toFixed(2) }} + + + + + + + 确 定 + 取 消 + + + + diff --git a/src/views/pay/merchant/MerchantForm.vue b/src/views/pay/merchant/MerchantForm.vue deleted file mode 100644 index 731b86e9..00000000 --- a/src/views/pay/merchant/MerchantForm.vue +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - - - - - - - - - - - 确 定 - 取 消 - - - - diff --git a/src/views/pay/merchant/index.vue b/src/views/pay/merchant/index.vue deleted file mode 100644 index 669b43cf..00000000 --- a/src/views/pay/merchant/index.vue +++ /dev/null @@ -1,245 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - 搜索 - 重置 - - 新增 - - - 导出 - - - - - - - - - - - - - - - - - - - - - - - 修改 - - - 删除 - - - - - - - - - - - - diff --git a/src/views/pay/notify/NotifyDetail.vue b/src/views/pay/notify/NotifyDetail.vue new file mode 100644 index 00000000..82fd8060 --- /dev/null +++ b/src/views/pay/notify/NotifyDetail.vue @@ -0,0 +1,89 @@ + + + + + {{ detailData.merchantOrderId }} + + + + + + + {{ detailData.appId }} + {{ detailData.appName }} + + + {{ detailData.dataId }} + + + + + + {{ detailData.notifyTimes }} + + {{ detailData.maxNotifyTimes }} + + + + + {{ formatDate(detailData.lastExecuteTime) }} + + + {{ formatDate(detailData.nextNotifyTime) }} + + + + + {{ formatDate(detailData.createTime) }} + + + {{ formatDate(detailData.updateTime) }} + + + + + + + + + + + + + + + + + {{ formatDate(scope.row.createTime) }} + + + + + + + + + diff --git a/src/views/pay/notify/index.vue b/src/views/pay/notify/index.vue new file mode 100644 index 00000000..8e752a04 --- /dev/null +++ b/src/views/pay/notify/index.vue @@ -0,0 +1,224 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 搜索 + 重置 + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ scope.row.notifyTimes }} / {{ scope.row.maxNotifyTimes }} + + + + + + + 查看详情 + + + + + + + + + + + + + diff --git a/src/views/pay/order/OrderDetail.vue b/src/views/pay/order/OrderDetail.vue index 4716b258..3489d4a9 100644 --- a/src/views/pay/order/OrderDetail.vue +++ b/src/views/pay/order/OrderDetail.vue @@ -1,79 +1,84 @@ - - - {{ detailData.merchantName }} - {{ detailData.appName }} - {{ detailData.subject }} + + + + {{ detailData.merchantOrderId }} + + + {{ detailData.no }} + - - - - {{ detailData.merchantOrderId }} + + {{ detailData.appId }} + {{ detailData.appName }} + + + + - - {{ detailData.channelOrderNo }} - - - - {{ detailData.payOrderExtension.no }} - - - - ¥{{ parseFloat(detailData.amount / 100, 2).toFixed(2) }} + + ¥{{ (detailData.price / 100.0).toFixed(2) }} + + - - ¥{{ parseFloat(detailData.channelFeeAmount / 100, 2).toFixed(2) }} + + ¥{{ (detailData.channelFeePrice / 100.0).toFixed(2) }} - {{ parseFloat(detailData.channelFeeRate / 100, 2) }}% - - - - - - - - {{ detailData.notifyUrl }} - - {{ formatDate(detailData.createTime) }} + {{ (detailData.channelFeeRate / 100.0).toFixed(2) }}% + + {{ formatDate(detailData.successTime) }} {{ formatDate(detailData.expireTime) }} - - {{ formatDate(detailData.notifyTime) }} + + + + {{ formatDate(detailData.createTime) }} + + + {{ formatDate(detailData.updateTime) }} + - - {{ detailData.channelCodeName }} + + {{ detailData.subject }} + {{ detailData.body }} + + + + - {{ detailData.userIp }} - - - - {{ detailData.refundTimes }} - - - {{ parseFloat(detailData.refundAmount / 100, 2) }} + {{ detailData.userIp }} + + + + + {{ detailData.channelOrderNo }} + {{ detailData.channelUserId }} - - - - {{ detailData.body }} + + + + ¥{{ (detailData.refundPrice / 100.0).toFixed(2) }} + + {{ detailData.notifyUrl }} + + + + - - {{ detailData.payOrderExtension?.channelNotifyData }} - + {{ detailData.extension.channelNotifyData }} @@ -87,7 +92,9 @@ defineOptions({ name: 'PayOrderDetail' }) const dialogVisible = ref(false) // 弹窗的是否展示 const detailLoading = ref(false) // 表单的加载中 -const detailData = ref({}) +const detailData = ref({ + extension: {} +}) /** 打开弹窗 */ const open = async (id: number) => { @@ -96,6 +103,9 @@ const open = async (id: number) => { detailLoading.value = true try { detailData.value = await OrderApi.getOrderDetail(id) + if (!detailData.value.extension) { + detailData.value.extension = {} + } } finally { detailLoading.value = false } diff --git a/src/views/pay/order/index.vue b/src/views/pay/order/index.vue index 4759af38..e8508df2 100644 --- a/src/views/pay/order/index.vue +++ b/src/views/pay/order/index.vue @@ -1,4 +1,8 @@ + + + + - - - - - - + @@ -47,19 +36,28 @@ /> - + - + + + + - - - - - - - - - - + - - - - - - - - - - - - - - - - - 商户 - {{ scope.row.merchantOrderId }} - - - 支付 - {{ scope.row.channelOrderNo }} - - - - - - ¥{{ parseFloat(scope.row.amount / 100).toFixed(2) }} - - - - - ¥{{ parseFloat(scope.row.channelFeeAmount / 100).toFixed(2) }} - - - - - ¥{{ parseFloat(scope.row.refundAmount / 100).toFixed(2) }} - - - - - - - - - - - - + + + ¥{{ parseFloat(scope.row.price / 100).toFixed(2) }} + + + + ¥{{ parseFloat(scope.row.refundPrice / 100).toFixed(2) }} + + + + + ¥{{ parseFloat(scope.row.channelFeePrice / 100).toFixed(2) }} + + + + + + 商户 {{ scope.row.merchantOrderId }} + + + 支付 {{ scope.row.no }} + + + 渠道 {{ scope.row.channelOrderNo }} + + + + + + + + + + + + + + + import { DICT_TYPE, getIntDictOptions, getStrDictOptions } from '@/utils/dict' import { dateFormatter } from '@/utils/formatTime' -import * as MerchantApi from '@/api/pay/merchant' import * as OrderApi from '@/api/pay/order' import OrderDetail from './OrderDetail.vue' import download from '@/utils/download' @@ -246,34 +203,16 @@ const list = ref([]) // 列表的数据 const queryParams = reactive({ pageNo: 1, pageSize: 10, - merchantId: undefined, - appId: undefined, - channelId: undefined, - channelCode: undefined, - merchantOrderId: undefined, - subject: undefined, - body: undefined, - notifyUrl: undefined, - notifyStatus: undefined, - amount: undefined, - channelFeeRate: undefined, - channelFeeAmount: undefined, - status: undefined, - userIp: undefined, - successExtensionId: undefined, - refundStatus: undefined, - refundTimes: undefined, - refundAmount: undefined, - channelUserId: undefined, - channelOrderNo: undefined, - expireTime: [], - successTime: [], - notifyTime: [], + appId: null, + channelCode: null, + merchantOrderId: null, + channelOrderNo: null, + no: null, + status: null, createTime: [] }) const queryFormRef = ref() // 搜索的表单 const exportLoading = ref(false) // 导出等待 -const merchantList = ref([]) // 商户列表 const appList = ref([]) // 支付应用列表集合 /** 搜索按钮操作 */ @@ -324,16 +263,11 @@ const openDetail = (id: number) => { /** 初始化 **/ onMounted(async () => { await getList() - // 加载商户列表 - // merchantList.value = await MerchantApi.getMerchantListByName() - // 加载 App 列表 - // TODO 芋艿:候选少一个查询应用列表的接口 - // appList.value = await AppApi.getAppListByMerchantId() }) diff --git a/src/views/pay/refund/index.vue b/src/views/pay/refund/index.vue index 16da1700..58e67bad 100644 --- a/src/views/pay/refund/index.vue +++ b/src/views/pay/refund/index.vue @@ -1,4 +1,6 @@ + + import { DICT_TYPE, getIntDictOptions, getStrDictOptions } from '@/utils/dict' import { dateFormatter } from '@/utils/formatTime' -import * as MerchantApi from '@/api/pay/merchant' +// import * as MerchantApi from '@/api/pay/merchant' import * as RefundApi from '@/api/pay/refund' import RefundDetail from './RefundDetail.vue' import download from '@/utils/download' @@ -330,7 +332,7 @@ const openDetail = (id: number) => { onMounted(async () => { await getList() // 加载商户列表 - merchantList.value = await MerchantApi.getMerchantListByName() + // merchantList.value = await MerchantApi.getMerchantListByName() // TODO 芋艿:候选少一个查询应用列表的接口 // appList.value = await AppApi.getAppListByMerchantId() })
- 商户 - {{ scope.row.merchantOrderId }} -
- 支付 - {{ scope.row.channelOrderNo }} -
+ 商户 {{ scope.row.merchantOrderId }} +
+ 支付 {{ scope.row.no }} +
+ 渠道 {{ scope.row.channelOrderNo }} +