|
@@ -0,0 +1,156 @@
|
|
|
|
|
+<template>
|
|
|
|
|
+<view class="app-content scan-pay-detail">
|
|
|
|
|
+ <view class="card" v-if="!$util.isEmpty(info)">
|
|
|
|
|
+ <view class="row"><text class="label">单号</text><text class="val">{{ info.orderSn }}</text></view>
|
|
|
|
|
+ <view class="row"><text class="label">金额</text><text class="val price">¥{{ parseFloat(info.actPrice || 0) }}</text></view>
|
|
|
|
|
+ <view class="row" v-if="Number(info.tkPrice) > 0"><text class="label">已退</text><text class="val warn">¥{{ parseFloat(info.tkPrice) }}</text></view>
|
|
|
|
|
+ <view class="row"><text class="label">可退</text><text class="val">¥{{ parseFloat(canRefundPrice) }}</text></view>
|
|
|
|
|
+ <view class="row"><text class="label">客户</text><text class="val">{{ info.customName || '-' }}</text></view>
|
|
|
|
|
+ <view class="row"><text class="label">支付方式</text><text class="val">{{ payWayName }}</text></view>
|
|
|
|
|
+ <view class="row"><text class="label">时间</text><text class="val">{{ info.payTime || info.addTime || '-' }}</text></view>
|
|
|
|
|
+ <view class="row"><text class="label">状态</text><text class="val">{{ statusText }}</text></view>
|
|
|
|
|
+ <view class="tip online-tip" v-if="canOnlineRefund">此单线上付款,退款后钱会原路自动退回给客户</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ <view class="section-title">退款记录</view>
|
|
|
|
|
+ <block v-if="!$util.isEmpty(refundList)">
|
|
|
|
|
+ <view class="refund-item" v-for="(item, index) in refundList" :key="index">
|
|
|
|
|
+ <view class="refund-row">时间:{{ item.addTime ? item.addTime.substr(5, 11) : '' }}</view>
|
|
|
|
|
+ <view class="refund-row">单号:{{ item.orderSn }}</view>
|
|
|
|
|
+ <view class="refund-row">操作:{{ item.shopAdminName || '-' }}</view>
|
|
|
|
|
+ <view class="refund-row" v-if="item.remark">备注:{{ item.remark }}</view>
|
|
|
|
|
+ <view class="refund-price">¥{{ parseFloat(item.refundPrice) }}</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </block>
|
|
|
|
|
+ <block v-else>
|
|
|
|
|
+ <AppWrapperEmpty title="暂无退款记录" :is-empty="true" />
|
|
|
|
|
+ </block>
|
|
|
|
|
+
|
|
|
|
|
+ <view class="footer" v-if="showRefundBtn">
|
|
|
|
|
+ <button class="admin-button-com bule middle" @click="goRefund">发起退款</button>
|
|
|
|
|
+ </view>
|
|
|
|
|
+</view>
|
|
|
|
|
+</template>
|
|
|
|
|
+<script>
|
|
|
|
|
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
|
|
+import { getScanPayDetail } from "@/api/order";
|
|
|
|
|
+export default {
|
|
|
|
|
+ name: "scanPayDetail",
|
|
|
|
|
+ components: { AppWrapperEmpty },
|
|
|
|
|
+ data() {
|
|
|
|
|
+ return {
|
|
|
|
|
+ id: 0,
|
|
|
|
|
+ info: {},
|
|
|
|
|
+ refundList: [],
|
|
|
|
|
+ canRefundPrice: 0,
|
|
|
|
|
+ payWayName: ''
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ statusText() {
|
|
|
|
|
+ const s = this.info.status;
|
|
|
|
|
+ if (s == 1) return '待付款';
|
|
|
|
|
+ if (s == 2) return '已付款';
|
|
|
|
|
+ return '已取消';
|
|
|
|
|
+ },
|
|
|
|
|
+ canOnlineRefund() {
|
|
|
|
|
+ const pw = Number(this.info.payWay);
|
|
|
|
|
+ return pw === 0 || pw === 1;
|
|
|
|
|
+ },
|
|
|
|
|
+ showRefundBtn() {
|
|
|
|
|
+ return this.info.status == 2 && Number(this.canRefundPrice) > 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ onLoad(option) {
|
|
|
|
|
+ this.id = option.id || 0;
|
|
|
|
|
+ },
|
|
|
|
|
+ onShow() {
|
|
|
|
|
+ this.loadDetail();
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ loadDetail() {
|
|
|
|
|
+ if (!this.id) return;
|
|
|
|
|
+ getScanPayDetail({ id: this.id }).then(res => {
|
|
|
|
|
+ if (res.code != 1 || this.$util.isEmpty(res.data)) return;
|
|
|
|
|
+ const data = res.data;
|
|
|
|
|
+ this.info = data.info || {};
|
|
|
|
|
+ this.refundList = data.refundList || [];
|
|
|
|
|
+ this.canRefundPrice = data.canRefundPrice || 0;
|
|
|
|
|
+ this.payWayName = data.payWayName || '';
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ goRefund() {
|
|
|
|
|
+ this.$util.pageTo({ url: '/admin/order/scanPayRefund', query: { id: this.id } });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+</script>
|
|
|
|
|
+<style lang="scss" scoped>
|
|
|
|
|
+.scan-pay-detail {
|
|
|
|
|
+ padding-bottom: 120upx;
|
|
|
|
|
+ background: #f9fbfc;
|
|
|
|
|
+ min-height: 100%;
|
|
|
|
|
+}
|
|
|
|
|
+.card {
|
|
|
|
|
+ margin: 20upx;
|
|
|
|
|
+ padding: 30upx;
|
|
|
|
|
+ background: #fff;
|
|
|
|
|
+ border-radius: 12upx;
|
|
|
|
|
+}
|
|
|
|
|
+.row {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ padding: 16upx 0;
|
|
|
|
|
+ font-size: 28upx;
|
|
|
|
|
+ .label { color: #666; }
|
|
|
|
|
+ .val { color: #333; }
|
|
|
|
|
+ .price { color: #3385ff; font-weight: 600; }
|
|
|
|
|
+ .warn { color: #ff6b00; }
|
|
|
|
|
+}
|
|
|
|
|
+.tip {
|
|
|
|
|
+ margin-top: 20upx;
|
|
|
|
|
+ padding: 16upx;
|
|
|
|
|
+ font-size: 24upx;
|
|
|
|
|
+ border-radius: 8upx;
|
|
|
|
|
+}
|
|
|
|
|
+.online-tip {
|
|
|
|
|
+ background: #fff7e6;
|
|
|
|
|
+ color: #ad760d;
|
|
|
|
|
+}
|
|
|
|
|
+.section-title {
|
|
|
|
|
+ margin: 30upx 20upx 10upx;
|
|
|
|
|
+ font-size: 30upx;
|
|
|
|
|
+ font-weight: 600;
|
|
|
|
|
+ color: #333;
|
|
|
|
|
+}
|
|
|
|
|
+.refund-item {
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ margin: 0 20upx 16upx;
|
|
|
|
|
+ padding: 24upx 30upx;
|
|
|
|
|
+ background: #fff;
|
|
|
|
|
+ border-radius: 12upx;
|
|
|
|
|
+}
|
|
|
|
|
+.refund-row {
|
|
|
|
|
+ font-size: 26upx;
|
|
|
|
|
+ color: #666;
|
|
|
|
|
+ line-height: 1.8;
|
|
|
|
|
+}
|
|
|
|
|
+.refund-price {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ right: 30upx;
|
|
|
|
|
+ top: 24upx;
|
|
|
|
|
+ font-size: 32upx;
|
|
|
|
|
+ color: #3385ff;
|
|
|
|
|
+ font-weight: 600;
|
|
|
|
|
+}
|
|
|
|
|
+.footer {
|
|
|
|
|
+ position: fixed;
|
|
|
|
|
+ left: 0;
|
|
|
|
|
+ right: 0;
|
|
|
|
|
+ bottom: 0;
|
|
|
|
|
+ padding: 20upx 30upx 40upx;
|
|
|
|
|
+ background: #fff;
|
|
|
|
|
+ box-shadow: 0 -2upx 10upx rgba(0,0,0,0.05);
|
|
|
|
|
+}
|
|
|
|
|
+</style>
|