From 072089e1819b712503331624e3beb01192268c5b Mon Sep 17 00:00:00 2001 From: zhaoxiaoqiang <287285524@qq.com> Date: Thu, 16 Sep 2021 16:42:15 +0800 Subject: [PATCH] 宁夏添加授权测试 --- src/views/product/wxScore-detail.vue | 41 ++++++++++++++++++++++++++++------------- 1 files changed, 28 insertions(+), 13 deletions(-) diff --git a/src/views/product/wxScore-detail.vue b/src/views/product/wxScore-detail.vue index c8ce34a..67b49c0 100644 --- a/src/views/product/wxScore-detail.vue +++ b/src/views/product/wxScore-detail.vue @@ -27,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> @@ -41,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() { @@ -54,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({ @@ -73,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 -- Gitblit v1.8.0