shish hace 6 meses
padre
commit
91f7ee5d60

+ 10 - 10
hdApp/src/admin/billing/affirm.vue

@@ -119,6 +119,7 @@
             <view class="tui-title">余额</view>
             <view class="tui-input" style="color:#3385FF;font-weight:bold;">
               ¥{{ parseFloat(customInfo.balance) }}
+              <text v-if="Number(customInfo.balance)>Number(modifyPrice)" style="margin-left:30upx;">余额充足,请用余额支付</text>
             </view>
           </tui-list-cell>
 
@@ -672,6 +673,7 @@ export default {
 
     //默认欠款是首选项
     this.form.hasPay = 0
+
     // 初始化支付方式索引
     this.payWayindex = 0
     // #ifdef APP-PLUS
@@ -1036,17 +1038,9 @@ export default {
     },
     confirmSubmit(){
       if(this.form.forward == 1){
-        this.showForward()  
+        this.showForward()
       }else{
-        if(Number(this.customInfo.balance)>Number(this.modifyPrice) && this.form.hasPay!=4){
-          //客户余额充值,只能使用余额支付
-          this.$util.confirmModal({content:'客户余额充足,请使用余额支付'},() => {
-            this.form.hasPay = 4
-            this.submitOrder()
-          })
-        }else{
-          this.submitOrder()
-        }
+        this.submitOrder()
       }
     },
     submitOrder() {
@@ -1265,6 +1259,12 @@ export default {
         that.form.customName = res.data.custom.name
         that.customInfo = res.data.custom
         that.$forceUpdate()
+
+        if(Number(that.customInfo.balance)>Number(that.modifyPrice) && that.form.hasPay!=4){
+          //客户余额充足,自动切换使用余额
+          that.form.hasPay = 4
+        }
+
       })
     },
     updateCustomAddress(){

+ 1 - 1
hdPad/src/pages/home/components/settlePop.vue

@@ -6,7 +6,7 @@
                 <view class="item-list_box">
                     <view :key="item.id" @tap="changeHasPay(item.id)" v-for="item in hasPayList" :class="[form.hasPay===item.id?'active':'']"> {{item.name}} </view>    
                 </view>
-                <view v-if="Number(balance)>Number(form.modifyPrice)" style="color:blue;font-size:13upx;font-weight:bold;margin-bottom:7upx;">客户余额 ¥{{balance?parseFloat(balance):0}},使用余额支付</view>
+                <view v-if="Number(balance)>Number(form.modifyPrice)" style="color:blue;font-size:13upx;font-weight:bold;margin-bottom:7upx;">客户余额充足 ¥{{balance?parseFloat(balance):0}},请用余额支付</view>
             </view>
 
             <view class="select-item_box" v-if="form.hasPay == 1" style="border:1upx solid #CCCCCC;margin-bottom:15upx;">

+ 122 - 111
mallApp/src/pages/member/rechargeResult.vue

@@ -1,11 +1,12 @@
 <template>
-    <view class="app-content">
-      <view class="billing_box_bg">
-        <view class="top-view"> </view>
-        <view class="result-view">
-          <view :class="['iconfont', 'iconchenggong']"></view>
-          <view class="result-title">充值成功</view>
-          <view class="pay-confirm-content">
+  <view class="app-content">
+    <view class="billing_box_bg">
+      <view class="top-view"> </view>
+      <view class="result-view">
+        <view :class="['iconfont', 'iconchenggong']"></view>
+        <view class="result-title">{{ actionType==0?'充值成功':'付款成功' }}</view>
+        <view class="pay-confirm-content">
+          <block v-if="actionType==0">
             <view class="confirm-text">
               <view class="text-title">充值金额已由门店收取</view>
               <view class="text-desc">保管余额是门店责任,本小程序仅是余额管理工具</view>
@@ -14,123 +15,133 @@
               <button class="confirm-btn" @click="goBack">我知道了</button>
               <button class="confirm-btn" @click="myHb">我的红包</button>
             </view>
-            <!-- #ifdef MP-WEIXIN -->
-            <view style="width:100%;height:10upx;background-color:white;margin-top:60upx;"></view>
-            <ad-custom unit-id="adunit-510957a20b72a06b"></ad-custom>
-            <!-- #endif -->
-          </view>
+          </block>
+          <!-- #ifdef MP-WEIXIN -->
+          <view style="width:100%;height:10upx;background-color:white;margin-top:60upx;"></view>
+          <ad-custom unit-id="adunit-510957a20b72a06b"></ad-custom>
+          <!-- #endif -->
         </view>
       </view>
     </view>
-  </template>
-  <script>
-  export default {
-    name: "rechargeResult",
-    data() {
-      return {
-      }
-    },
-    onLoad(){
-      //返回上一页时刷新
-      let pages = getCurrentPages();
-      let prevPage = pages[ pages.length - 2 ];
-      prevPage.$vm.pageAction = {refresh:1}
+  </view>
+</template>
+<script>
+import { getHdInfo } from '@/api/hd';
+export default {
+  name: "rechargeResult",
+  data() {
+    return {
+      actionType:0,//0充值 1结账
+      hdInfo:{}
+    }
+  },
+  onLoad(){
+    //返回上一页时刷新
+    let pages = getCurrentPages();
+    let prevPage = pages[ pages.length - 2 ];
+    prevPage.$vm.pageAction = {refresh:1}
+  },
+  methods: {
+    init(){
+      let hdId = this.option.hdId?this.option.hdId:0
+      getHdInfo({id:hdId}).then(res=>{
+        if(res.code == 1){
+          this.hdInfo = res.data.hd ? res.data.hd : {}
+          let balance = this.hdInfo.balance ? this.hdInfo.balance : 0
+          this.actionType = Number(balance)>0 ? 1 : 0
+        }
+      })
     },
-    methods: {
-      init(){
-      },
-      myHb(){
-        let account = this.option.account?this.option.account:0
-        let hdId = this.option.hdId?this.option.hdId:0
-        this.pageTo({url:"/pages/hb/list?hdId="+hdId+"&account="+account})
-      },
-      goBack(){
-        uni.navigateBack()
-      }
+    myHb(){
+      let account = this.option.account?this.option.account:0
+      let hdId = this.option.hdId?this.option.hdId:0
+      this.pageTo({url:"/pages/hb/list?hdId="+hdId+"&account="+account,type:2})
     },
-  };
-  </script>
-  <style lang="scss" scoped>
-  .billing_box_bg {
+    goBack(){
+      uni.navigateBack()
+    }
+  },
+};
+</script>
+<style lang="scss" scoped>
+.billing_box_bg {
+  position: relative;
+  padding: 30upx 30upx;
+  display: flex;
+  flex-direction: column;
+  background-color: #f5f5f5;
+  .top-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 299upx;
+    background: #3385ff;
+    border-radius: 0upx 0upx 83upx 83upx;
+  }
+  .result-view {
     position: relative;
-    padding: 30upx 30upx;
     display: flex;
     flex-direction: column;
-    background-color: #f5f5f5;
-    .top-view {
-      position: absolute;
-      top: 0;
-      left: 0;
-      width: 100%;
-      height: 299upx;
-      background: #3385ff;
-      border-radius: 0upx 0upx 83upx 83upx;
+    align-items: center;
+    padding: 80upx 0upx 70upx 0upx;
+    width: 100%;
+    background: #ffffff;
+    border-radius: 20upx;
+    z-index: 1;
+    .iconchenggong {
+      font-size: 130upx;
+      color: $mainColor1;
     }
-    .result-view {
-      position: relative;
-      display: flex;
-      flex-direction: column;
-      align-items: center;
-      padding: 80upx 0upx 70upx 0upx;
-      width: 100%;
-      background: #ffffff;
-      border-radius: 20upx;
-      z-index: 1;
-      .iconchenggong {
-        font-size: 130upx;
-        color: $mainColor1;
-      }
-      .result-title {
-        margin: 40upx 0 30upx;
-        font-size: 38upx;
-      }
+    .result-title {
+      margin: 40upx 0 30upx;
+      font-size: 38upx;
     }
   }
+}
 
-  // 支付确认弹框样式
-  .pay-confirm-content {
-    padding: 0upx 40upx 30upx 40upx;
-    text-align: center;
-    .confirm-text {
-      margin-bottom: 60upx;
-      
-      .text-title {
-        font-size: 42upx;
-        font-weight: bold;
-        color: #333;
-        margin-bottom: 25upx;
-        line-height: 1.4;
-      }
-      
-      .text-desc {
-        font-size: 38upx;
-        color: #3f3e3e;
-        line-height: 1.4;
-      }
+// 支付确认弹框样式
+.pay-confirm-content {
+  padding: 0upx 40upx 30upx 40upx;
+  text-align: center;
+  .confirm-text {
+    margin-bottom: 60upx;
+    
+    .text-title {
+      font-size: 42upx;
+      font-weight: bold;
+      color: #333;
+      margin-bottom: 25upx;
+      line-height: 1.4;
     }
     
-    .confirm-btn-wrap {
-      .confirm-btn {
-        width: 40%;
-        height: 90upx;
-        background: linear-gradient(135deg, #07c160 0%, #10ad6a 100%);
-        color: #fff;
-        border: none;
-        border-radius: 30upx;
-        font-size: 36upx;
-        font-weight: bold;
-        display: flex;
-        align-items: center;
-        justify-content: center;
-        transition: all 0.3s ease;
-        margin: 0 auto 35upx;
-      }
-      .tech-support {
-        font-size: 30upx;
-        color: #999;
-        text-align: center;
-        line-height: 1.4;
-      }
+    .text-desc {
+      font-size: 38upx;
+      color: #3f3e3e;
+      line-height: 1.4;
+    }
+  }
+  
+  .confirm-btn-wrap {
+    .confirm-btn {
+      width: 40%;
+      height: 90upx;
+      color: #666;
+      border: 1upx solid #e8e8e8;
+      border-radius: 30upx;
+      font-size: 34upx;
+      font-weight: bold;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      margin: 0 auto 40upx;
+    }
+    .tech-support {
+      font-size: 30upx;
+      color: #999;
+      text-align: center;
+      line-height: 1.4;
     }
   }
-  </style>
+}
+</style>