shish 4 years ago
parent
commit
28d70f5980

+ 2 - 1
ghsApp/src/admin/billing/affirm.vue

@@ -448,7 +448,7 @@ export default {
       })
     },
     gobackEvent () {
-      uni.navigateBack({ delta: 1 })
+      this.$util.pageTo({url: '/admin/billing/index',type:2,query: {customId: this.option.customId}})
     }
   }
 };
@@ -646,6 +646,7 @@ export default {
     }
   }
   .under-bar {
+    z-index:99999;
     display: flex;
     justify-content: space-between;
     align-items: center;

+ 1 - 2
ghsApp/src/admin/billing/index.vue

@@ -105,7 +105,6 @@ export default {
 
 	},
 	onUnload() {
-		this.reSetSelectInfo({selectJobType:this.selectJobType,selectJobId:this.selectJobId})
 	},
 	onLoad () {
 		if (!this.$util.isEmpty(this.option.customId)){
@@ -124,7 +123,7 @@ export default {
 			}
 			let customName = this.option.customName ? this.option.customName : '';
 			let orderId = this.option.orderId  ? this.option.orderId : 0
-			uni.navigateTo({url: "/admin/billing/affirm?customId="+this.option.customId+"&customName="+customName+"&orderId="+orderId})
+			this.$util.pageTo({ url: '/admin/billing/affirm',type:2,query: {customId:this.option.customId,customName:customName,orderId:orderId}})
 		}
 	}
 };

+ 47 - 10
ghsApp/src/admin/billing/toPay.vue

@@ -21,13 +21,18 @@
           </view>
         </view>
         <view v-else>
-          <view style="text-align:center;margin:20upx auto 10upx auto;">
-          <view class="balance" style="margin-bottom:30upx;">扫二维码付款</view>
+          <view style="text-align:center;margin:10upx auto 10upx auto;">
+          <view class="balance" style="margin-bottom:25upx;">扫二维码付款</view>
           <view style="margin-bottom:20upx;">
-              <button @click="changePayWay(0)" class="admin-button-com mini-btn" :class="payWay == 0 ? 'blue' : 'default'">微信</button>
-              <button @click="changePayWay(1)" style="margin-left:20upx;" class="admin-button-com mini-btn" :class="payWay == 1 ? 'blue' : 'default'">支付宝</button>
+              <button @click="changePayWay(0)" class="admin-button-com middle" :class="payWay == 0 ? 'blue' : 'default'">微信</button>
+              <button @click="changePayWay(1)" style="margin-left:40upx;" class="admin-button-com middle" :class="payWay == 1 ? 'blue' : 'default'">支付宝</button>
+              <button @click="changePayWay(2)" style="margin-left:40upx;" class="admin-button-com middle" :class="payWay == 2 ? 'blue' : 'default'">欠款</button>
           </view>
-          <image mode="widthFix" style="width:400upx;margin:0 auto;" :src="payQrCodeUrl"></image>
+          <image mode="widthFix" style="width:350upx;margin:0 auto;" :src="payQrCodeUrl"></image>
+          <view style="margin-top:35upx;">
+              <button style="width:25vh;" @click="goBack()" class="admin-button-com big default">返回首页</button>
+          </view>
+          <view style="color:#CCCCCC;margin-top:20upx;">15分钟后,订单自动变成欠款单 <text @click="cancelOrder()" style="color:#666666;margin-left:10upx;text-decoration:underline;">取消订单</text></view>
           </view>
         </view>
       </view>
@@ -35,7 +40,7 @@
   </view>
 </template>
 <script>
-import { codePayCheck,scanPay,scanPayCheck} from "@/api/order/index";
+import { codePayCheck,scanPay,scanPayCheck,cancel,debtPay} from "@/api/order/index";
 export default {
   name: "toPay",
   components: {
@@ -97,7 +102,22 @@ export default {
     },
     changePayWay(payWay){
       this.payWay = payWay
-      this.toScanPay()
+      let that = this
+      if(payWay == 2){
+        that.$util.confirmModal({content:'确认欠款?'},() => {
+            clearInterval(this.INT)
+            debtPay({id:this.orderId}).then(res=>{
+              if(res.code == 1){
+                that.$msg(res.msg)
+                setTimeout(function(){
+                  uni.navigateBack()
+                },1000)
+              }
+            })
+        })
+      }else{
+        this.toScanPay()
+      }
     },
     toScanPay(){
       let that = this
@@ -134,6 +154,23 @@ export default {
     },
     handPay(){
       this.requestCodePay('123')
+    },
+    goBack(){
+      uni.navigateBack()
+    },
+    cancelOrder(){
+      let that = this
+      that.$util.confirmModal({content:'确认取消?'},() => {
+          clearInterval(this.INT)
+          cancel({id:this.orderId}).then(res=>{
+            if(res.code == 1){
+              that.$msg(res.msg)
+              setTimeout(function(){
+                uni.navigateBack()
+              },1000)
+            }
+          })
+      })
     }
   },
 };
@@ -141,7 +178,7 @@ export default {
 <style lang="scss" scoped>
 .app-content {
   .callback-wrap {
-    padding-top: 50upx;
+    padding-top: 30upx;
     background-repeat: no-repeat;
     background-size: 100% auto;
     position: relative;
@@ -210,8 +247,8 @@ export default {
   margin: 20upx 0;
 }
 .balance{
-  margin-top:40upx;
-  font-size:36upx;
+  margin-top:30upx;
+  font-size:33upx;
   font-weight: bold;
 }
 </style>

+ 8 - 9
hdApp/src/pagesPurchase/wechatPay.vue

@@ -15,7 +15,7 @@
             <span class="app-size-36 app-bold">{{ realPrice || '0.00'}}</span>
           </div>
           <div class="order-num app-color-3">订单号: {{ orderSn || ''}}</div>
-          <div v-if="count > miniCount" class="order-num app-color-3" style="margin-top:18rpx;font-size:26rpx;"><span style="font-weight:bold;padding-right:8rpx;">{{count}}</span>秒后失效</div>
+          <div v-if="count > 0" class="order-num app-color-3" style="margin-top:18rpx;font-size:26rpx;"><span style="font-weight:bold;padding-right:8rpx;">{{count}}</span>秒后失效</div>
           <div v-else class="order-num app-color-3" style="margin-top:12rpx;font-size:26rpx;">订单已失效</div>
         </block>
         <block>
@@ -23,15 +23,15 @@
           <div class="call-one-btn">
 
             <view v-if="Number(balance) >= Number(realPrice)">
-              <button class="button-com pay-wx" :class="[count >miniCount ? 'green':'default']" :disabled="count >miniCount ? false : true" v-if="Number(balance) >0" @click="balancePay">余额支付</button>
-              <button class="button-com pay-wx" :class="[count >miniCount ? 'green':'default']" :disabled="count >miniCount ? false : true" @click="_wxPay">微信支付</button>
+              <button class="button-com pay-wx" :class="[count >0 ? 'green':'default']" :disabled="count >0 ? false : true" v-if="Number(balance) >0" @click="balancePay">余额支付</button>
+              <button class="button-com pay-wx" :class="[count >0 ? 'green':'default']" :disabled="count >0 ? false : true" @click="_wxPay">微信支付</button>
             </view>
             <view v-else>
-              <button class="button-com pay-wx" :class="[count >miniCount ? 'green':'default']" :disabled="count >miniCount ? false : true" @click="_wxPay">微信支付</button>
-              <button class="button-com pay-wx" :class="[count >miniCount ? 'green':'default']" :disabled="count >miniCount ? false : true" v-if="Number(balance) >0" @click="balancePay">余额支付</button>
+              <button class="button-com pay-wx" :class="[count >0 ? 'green':'default']" :disabled="count >0 ? false : true" @click="_wxPay">微信支付</button>
+              <button class="button-com pay-wx" :class="[count >0 ? 'green':'default']" :disabled="count >0 ? false : true" v-if="Number(balance) >0" @click="balancePay">余额支付</button>
             </view>
 
-            <button class="button-com pay-wx" :class="[count >miniCount ? 'green':'default']" :disabled="count >miniCount ? false : true" @click="debtPay" v-if="hasDebtPay === '1'">记欠款</button>
+            <button class="button-com pay-wx" :class="[count >0 ? 'green':'default']" :disabled="count >0 ? false : true" @click="debtPay" v-if="hasDebtPay === '1'">记欠款</button>
 
           </div>
 
@@ -72,10 +72,9 @@ export default {
       realPrice: '',
       _type: '1',
       pageId: '',
-      count:150,
+      count:120,
       hasDebtPay:0,
-      balance:0,
-      miniCount:120
+      balance:0
     };
   },
   onLoad (options) {