diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/convert/order/TradeOrderConvert.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/convert/order/TradeOrderConvert.java index 1dce4a387..21534f47a 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/convert/order/TradeOrderConvert.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/convert/order/TradeOrderConvert.java @@ -238,7 +238,7 @@ public interface TradeOrderConvert { AppTradeOrderDetailRespVO orderVO = convert3(order, orderItems); orderVO.setPayExpireTime(addTime(tradeOrderProperties.getExpireTime())); if (StrUtil.isNotEmpty(order.getPayChannelCode())) { - orderVO.setPayChannelName(DictFrameworkUtils.getDictDataLabel(DictTypeConstants.CHANNEL_CODE_TYPE, order.getPayChannelCode())); + orderVO.setPayChannelName(DictFrameworkUtils.getDictDataLabel(DictTypeConstants.CHANNEL_CODE, order.getPayChannelCode())); } // 处理商品属性 Map propertyValueDetailMap = convertMap(propertyValueDetails, ProductPropertyValueDetailRespDTO::getValueId); diff --git a/yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/DictTypeConstants.java b/yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/DictTypeConstants.java index 717ce09eb..cfe92bbac 100644 --- a/yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/DictTypeConstants.java +++ b/yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/DictTypeConstants.java @@ -7,7 +7,7 @@ package cn.iocoder.yudao.module.pay.enums; */ public interface DictTypeConstants { - String CHANNEL_CODE_TYPE = "pay_channel_code_type"; // 支付-渠道名 + String CHANNEL_CODE = "pay_channel_code"; // 支付-渠道名 String ORDER_STATUS = "pay_order_status"; // 支付-订单-订单状态 String ORDER_NOTIFY_STATUS = "pay_order_notify_status"; // 支付-订单-订单回调商户状态 diff --git a/yudao-ui-admin/src/utils/dict.js b/yudao-ui-admin/src/utils/dict.js index 8e154114d..3f6cfbbd4 100644 --- a/yudao-ui-admin/src/utils/dict.js +++ b/yudao-ui-admin/src/utils/dict.js @@ -54,7 +54,7 @@ export const DICT_TYPE = { 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_TYPE: 'pay_channel_code_type', // 支付渠道编码类型 + PAY_CHANNEL_CODE: 'pay_channel_code', // 支付渠道编码类型 PAY_ORDER_NOTIFY_STATUS: 'pay_order_notify_status', // 商户支付订单回调状态 PAY_ORDER_STATUS: 'pay_order_status', // 商户支付订单状态 PAY_ORDER_REFUND_STATUS: 'pay_order_refund_status', // 商户支付订单退款状态 diff --git a/yudao-ui-admin/src/views/mall/trade/order/detail.vue b/yudao-ui-admin/src/views/mall/trade/order/detail.vue index 15bc705a9..8b10788b4 100644 --- a/yudao-ui-admin/src/views/mall/trade/order/detail.vue +++ b/yudao-ui-admin/src/views/mall/trade/order/detail.vue @@ -17,7 +17,7 @@ {{ order.remark }} {{ order.payOrderId }} - + {{ order.user.nickname }} diff --git a/yudao-ui-admin/src/views/mall/trade/order/index.vue b/yudao-ui-admin/src/views/mall/trade/order/index.vue index d439ecd00..be5e17432 100644 --- a/yudao-ui-admin/src/views/mall/trade/order/index.vue +++ b/yudao-ui-admin/src/views/mall/trade/order/index.vue @@ -42,7 +42,7 @@ - @@ -86,7 +86,7 @@ 支付方式: - + 未支付 diff --git a/yudao-ui-admin/src/views/pay/cashier/index.vue b/yudao-ui-admin/src/views/pay/cashier/index.vue index a607d8907..3f2048473 100644 --- a/yudao-ui-admin/src/views/pay/cashier/index.vue +++ b/yudao-ui-admin/src/views/pay/cashier/index.vue @@ -18,15 +18,15 @@
-
- +
+
{{ channel.name }}
-
+
{{ channel.name }}
@@ -34,7 +34,8 @@
-
+
{{ channel.name }}
@@ -101,20 +102,43 @@ export default { returnUrl: undefined, // 支付完的回调地址 loading: false, // 支付信息的 loading payOrder: {}, // 支付信息 - aliPayChannels: [], // 阿里支付的渠道 - wxPayChannels: [], // 微信支付的渠道 - otherPayChannels: [], // 其它的支付渠道 - icons: { - alipay_qr: require("@/assets/images/pay/icon/alipay_qr.svg"), - alipay_app: require("@/assets/images/pay/icon/alipay_app.svg"), - alipay_wap: require("@/assets/images/pay/icon/alipay_wap.svg"), - alipay_pc: require("@/assets/images/pay/icon/alipay_pc.svg"), - alipay_bar: require("@/assets/images/pay/icon/alipay_bar.svg"), - wx_app: require("@/assets/images/pay/icon/wx_app.svg"), - wx_lite: require("@/assets/images/pay/icon/wx_lite.svg"), - wx_pub: require("@/assets/images/pay/icon/wx_pub.svg"), - mock: require("@/assets/images/pay/icon/mock.svg"), - }, + channels: [{ + name: '支付宝 PC 网站支付', + icon: require("@/assets/images/pay/icon/alipay_pc.svg"), + code: "alipay_pc" + }, { + name: '支付宝 Wap 网站支付', + icon: require("@/assets/images/pay/icon/alipay_wap.svg"), + code: "alipay_wap" + }, { + name: '支付宝 App 网站支付', + icon: require("@/assets/images/pay/icon/alipay_app.svg"), + code: "alipay_app" + }, { + name: '支付宝扫码支付', + icon: require("@/assets/images/pay/icon/alipay_app.svg"), + code: "alipay_qr" + }, { + name: '支付宝条码支付', + icon: require("@/assets/images/pay/icon/alipay_bar.svg"), + code: "alipay_bar" + }, { + name: '微信公众号支付', + icon: require("@/assets/images/pay/icon/wx_pub.svg"), + code: "wx_pub" + }, { + name: '微信小程序支付', + icon: require("@/assets/images/pay/icon/wx_lite.svg"), + code: "wx_lite" + }, { + name: '微信 App 支付', + icon: require("@/assets/images/pay/icon/wx_lite.svg"), + code: "wx_app" + }, { + name: '模拟支付', + icon: require("@/assets/images/pay/icon/mock.svg"), + code: "mock" + }], submitLoading: false, // 提交支付的 loading interval: undefined, // 定时任务,轮询是否完成支付 qrCode: { // 展示形式:二维码 @@ -144,26 +168,8 @@ export default { this.returnUrl = decodeURIComponent(this.$route.query.returnUrl) } this.getDetail(); - this.initPayChannels(); }, methods: { - /** 初始化支付渠道 */ - initPayChannels() { - // 微信支付 - for (const dict of getDictDatas(DICT_TYPE.PAY_CHANNEL_CODE_TYPE)) { - const payChannel = { - name: dict.label, - code: dict.value - } - if (dict.value.indexOf('wx_') === 0) { - this.wxPayChannels.push(payChannel); - } else if (dict.value.indexOf('alipay_') === 0) { - this.aliPayChannels.push(payChannel); - } else { - this.otherPayChannels.push(payChannel); - } - } - }, /** 获得支付信息 */ getDetail() { // 1.1 未传递订单编号 @@ -180,6 +186,7 @@ export default { return; } // 1.3 订单已支付 + // TODO 芋艿:已支付 if (response.data.status !== PayOrderStatusEnum.WAITING.status) { this.$message.error('支付订单不处于待支付状态,请检查!'); this.goBackToList(); diff --git a/yudao-ui-admin/src/views/pay/order/index.vue b/yudao-ui-admin/src/views/pay/order/index.vue index f87873db1..6f3fe5006 100755 --- a/yudao-ui-admin/src/views/pay/order/index.vue +++ b/yudao-ui-admin/src/views/pay/order/index.vue @@ -285,7 +285,7 @@ export default { // 支付应用列表集合 appList: null, // 支付渠道编码字典数据集合 - payChannelCodeDictDatum: getDictDatas(DICT_TYPE.PAY_CHANNEL_CODE_TYPE), + payChannelCodeDictDatum: getDictDatas(DICT_TYPE.PAY_CHANNEL_CODE), // 订单回调商户状态字典数据集合 payOrderNotifyDictDatum: getDictDatas(DICT_TYPE.PAY_ORDER_NOTIFY_STATUS), // 订单状态字典数据集合 diff --git a/yudao-ui-admin/src/views/pay/refund/index.vue b/yudao-ui-admin/src/views/pay/refund/index.vue index 0618cc1c6..d699c5add 100755 --- a/yudao-ui-admin/src/views/pay/refund/index.vue +++ b/yudao-ui-admin/src/views/pay/refund/index.vue @@ -298,7 +298,7 @@ export default { // 支付应用列表集合 appList: null, // 支付渠道编码字典数据集合 - payChannelCodeDictDatum: getDictDatas(DICT_TYPE.PAY_CHANNEL_CODE_TYPE), + payChannelCodeDictDatum: getDictDatas(DICT_TYPE.PAY_CHANNEL_CODE), // 订单退款状态字典数据集合 payRefundOrderDictDatum: getDictDatas(DICT_TYPE.PAY_REFUND_ORDER_STATUS), // 退款订单类别字典数据集合