linwenxin před 7 měsíci
rodič
revize
5ca6d6307e
1 změnil soubory, kde provedl 9 přidání a 59 odebrání
  1. 9 59
      src/packageMaterial/pages/newSale/pay.vue

+ 9 - 59
src/packageMaterial/pages/newSale/pay.vue

@@ -30,35 +30,12 @@
           <view class="row"><text>备注:</text>{{ detail.remark }}</view>
           <view class="row"><text>操作人:</text>{{ detail.workerName }}</view>
         </view>
-        <!-- <view class="pay-container card mt30">
-          <view class="top">请选择客户支付方式</view>
-          <view class="item" @tap="payType = 1">
-            <view class="left">
-              <text class="iconfont icon-weixinzhifu" style="color: #43c93e"></text>
-              <text class="text">微信支付</text>
-            </view>
-            <view class="right">
-              <text class="iconfont" :class="payType === 1 ? 'icon-danxuan2 active' : 'icon-danxuan'"></text>
-            </view>
-          </view>
-          <view class="item" @tap="payType = 2">
-            <view class="left">
-              <text class="iconfont icon-xianxiazhifu" style="color: #0379ff"></text>
-              <text class="text">线下支付</text>
-            </view>
-            <view class="right">
-              <text class="iconfont" :class="payType === 2 ? 'icon-danxuan2 active' : 'icon-danxuan'"></text>
-            </view>
-          </view>
-        </view> -->
       </view>
 
       <template slot="footer">
         <view class="footer-btn-group">
           <u-button text="取消订单" @click="cancelOrder"></u-button>
           <u-button text="扫码支付" type="primary" @click="scanCode"></u-button>
-          <!-- <u-button text="扫码支付" type="primary" @click="scanCode" v-if="payType === 1"></u-button> -->
-          <!-- <u-button text="确定支付" type="primary" @click="confirmPay" v-else></u-button> -->
         </view>
       </template>
     </zj-page-layout>
@@ -80,7 +57,6 @@ export default {
       canScanCode: 0,
       timeout: null,
       timeoutNum: 0,
-
       payType: 1
     }
   },
@@ -89,7 +65,6 @@ export default {
     this.orderId = handleOrderId
     this.wbId = wbId
     this.getDetail()
-
     this.crossPage.$on('reScanCode', () => {
       this.scanCode()
     })
@@ -101,15 +76,9 @@ export default {
 
   methods: {
     getDetail() {
-      let url = '',
-        params = {}
-      if (this.wbId) {
-        url = '/engin/material/detail'
-        params.id = this.orderId
-      } else {
-        url = '/pay/getOrder'
-        params.orderId = this.orderId
-      }
+      let url = '/pay/getOrder'
+      let params = {}
+      params.orderId = this.orderId
       this.$api
         .post(url, params)
         .then(res => {
@@ -157,12 +126,7 @@ export default {
 
     // 下单
     submitData(code) {
-      let url = ''
-      if (this.wbId) {
-        url = '/engin/material/paid'
-      } else {
-        url = '/pay/paid'
-      }
+      let url = '/pay/paid'
 
       this.$api
         .post(url, {
@@ -177,9 +141,7 @@ export default {
             clearTimeout(this.timeout)
 
             this.$navToPage({
-              url: `/packageMaterial/pages/newSale/result?handleOrderId=${this.orderId}&result=1&wbId=${
-                this.wbId || ''
-              }`
+              url: `/packageMaterial/pages/newSale/result?handleOrderId=${this.orderId}&result=1`
             })
           }
           // 返回false,轮询3次
@@ -193,9 +155,7 @@ export default {
               this.timeoutNum = 0
               clearTimeout(this.timeout)
               this.$navToPage({
-                url: `/packageMaterial/pages/newSale/result?handleOrderId=${this.orderId}&result=0&wbId=${
-                  this.wbId || ''
-                }`
+                url: `/packageMaterial/pages/newSale/result?handleOrderId=${this.orderId}&result=0`
               })
             }
           }
@@ -218,13 +178,7 @@ export default {
     },
 
     confirmPay() {
-      let url = ''
-      if (this.wbId) {
-        url = '/engin/material/paid'
-      } else {
-        url = '/pay/paid'
-      }
-
+      let url = '/pay/paid'
       this.$api
         .post(url, {
           authCode: '',
@@ -234,15 +188,11 @@ export default {
         .then(res => {
           if (res.data) {
             this.$navToPage({
-              url: `/packageMaterial/pages/newSale/result?handleOrderId=${this.orderId}&result=1&wbId=${
-                this.wbId || ''
-              }`
+              url: `/packageMaterial/pages/newSale/result?handleOrderId=${this.orderId}&result=1`
             })
           } else {
             this.$navToPage({
-              url: `/packageMaterial/pages/newSale/result?handleOrderId=${this.orderId}&result=0&wbId=${
-                this.wbId || ''
-              }`
+              url: `/packageMaterial/pages/newSale/result?handleOrderId=${this.orderId}&result=0`
             })
           }
         })