Browse Source

查询支付

shish 3 years ago
parent
commit
83e2d68afd
1 changed files with 19 additions and 1 deletions
  1. 19 1
      hdPad/src/pages/home/components/orderInfo.vue

+ 19 - 1
hdPad/src/pages/home/components/orderInfo.vue

@@ -70,6 +70,8 @@
 
     <view class="button-area">
       <view :class="[orderInfo.status==1 || orderInfo.status==5 ? '' : 'active']" @click="printFn(orderInfo)">打印</view>
+      <view :class="[orderInfo.status==1 ? 'active' : '']" @click="selectFn(orderInfo,0)">查微信</view>
+      <view :class="[orderInfo.status==1 ? 'active' : '']" @click="selectFn(orderInfo,1)">查支付宝</view>
       <view :class="[orderInfo.status==1 ? 'active' : '']" @click="cancelFn(orderInfo)">取消</view>
     </view>
 
@@ -99,6 +101,7 @@ import { getDetail,onlinePrintOrder } from '@/api/order'
 import wastageSelectNum from './wastageSelectNum.vue'
 import { mapGetters } from "vuex";
 import productMins from "@/mixins/product";
+import { codePayCheck} from "@/api/order/index";
 export default {
 	name: "workInfo",
 	components: {wastageSelectNum},
@@ -211,7 +214,22 @@ export default {
       })
     },
     cancelFn(){
-
+    },
+    selectFn(order,payWay){
+      let that = this
+      uni.showLoading({mask:true})
+      codePayCheck({id:order.id,payWay:payWay,recheck:1}).then(res=>{
+          if(res.code == 1){
+              if(res.data.returnStatus == 'SUCCESS'){
+                  that.$msg('订单已付款')
+                  setTimeout(function(){
+                      that.getOrderDetail(order.id)
+                  },1500)
+              }else{
+                that.$msg('订单未付款!!')
+              }
+          }
+      })
     }
   }
 }