zhaoxiaoqiang
2021-07-20 2891aa37d99bc458a2ce501cb4ea185b363744f4
src/views/product/wxScore-detail.vue
@@ -33,6 +33,7 @@
            </div> -->
        </div>
        <footer class="footer flex-center-g">
            <van-button class="btn" :color="$store.state.backColor" v-if="form.orderStatus==1" @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>
@@ -58,13 +59,16 @@
        },
        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({
@@ -73,7 +77,24 @@
                    this.$api.wxScoreRefund({
                        id:this.form.id
                    }).then(res => {
                        this.$tool.toast('返销中');
                        this.$tool.toast('返销完成');
                    }, err => err);
                }).catch(() => {
                    // on cancel
                });
                // this
            },
            //订单推送
            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