zhaoxiaoqiang
2021-11-07 c0457bf3334ca6d7b2db01fa1d6739b48ed3535c
src/views/product/wxScore-detail.vue
@@ -19,7 +19,6 @@
                <van-cell :value="form.contName" title='活动名称' readonly></van-cell>
                <van-cell :value="form.term" title='合约期' readonly></van-cell>
                <van-cell :value="form.guaranteedAmt" title='担保金额' readonly></van-cell>
                <van-cell :value="form.monGiftAmt" title='月赠费金额' readonly></van-cell>
            </div>
            <div class="cell-group" >
                <van-cell :value="form.userName" title='用户姓名' readonly></van-cell>
@@ -28,12 +27,12 @@
                <van-cell :value="form.mblNo" title='手机号码' readonly></van-cell>
                <van-cell :value="form.merName" title='商户名称' readonly></van-cell>
            </div>
            <!-- <div class="cell-group">
                <van-cell :value="form.rate + '%'" title='费率' readonly></van-cell>
            </div> -->
        </div>
        <footer class="footer flex-center-g">
            <van-button class="btn" :color="$store.state.backColor" v-if="form.orderStatus==1 && hnOrnxtype == 410000" @click="sendOrder">订单推送</van-button>
            <van-button class="btn" :color="$store.state.backColor" v-if="form.refundBtnStatus==1" @click="refund">返销</van-button>
            <van-button class="btn" :color="$store.state.backColor" v-if="form.status==0" @click="showCode">显示支付二维码</van-button>
        </footer>
@@ -42,12 +41,9 @@
</template>
<script>
    import {
        mapState
    } from 'vuex';
    import Vue from 'vue';
    import { Notify } from 'vant';
    import { mapState } from 'vuex';
    Vue.use(Notify);
    export default {
        data() {
@@ -55,17 +51,20 @@
                form: {},
            }
        },
        computed: {
        computed:{
           ...mapState(['hnOrnxtype']),
        },
        created() {
            this.$api.wxScoreDetail({
                id:this.$route.query.orderId
            }).then(res => {
                this.form = res.body || {};
            }, err => err);
            this.getDetail();
        },
        methods: {
            getDetail() {
                this.$api.wxScoreDetail({
                    id:this.$route.query.orderId
                }).then(res => {
                    this.form = res.body || {};
                }, err => err);
            },
            //退款
            refund() {
                this.$dialog.confirm({
@@ -74,7 +73,22 @@
                    this.$api.wxScoreRefund({
                        id:this.form.id
                    }).then(res => {
                        this.$tool.toast('返销中');
                        this.$tool.toast('返销完成');
                    }, err => err);
                }).catch(() => {
                });
            },
            //订单推送
            sendOrder() {
                this.$dialog.confirm({
                    message: '是否确认推送订单结果'
                }).then(() => {
                    this.$api.wxScoreSendOrder({
                        id:this.form.id
                    }).then(res => {
                        this.getDetail();
                        this.$tool.toast('推送完成');
                    }, err => err);
                }).catch(() => {
                    // on cancel