Jelajahi Sumber

做到了改 shPayRemind

shish 1 tahun lalu
induk
melakukan
2a04f50d49

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

@@ -599,7 +599,7 @@ export default {
               this.$util.pageTo({ url: '/admin/billing/toPay',type:2,query: {orderId:id,orderSn:orderSn,actPrice:actPrice}})
             }else{
               if(this.form.forward == 1){
-                this.$util.pageTo({ url: '/admin/billing/remind?orderId='+id,type:2})
+                this.$util.pageTo({ url: '/admin/billing/shPayRemind?orderId='+id,type:2})
               }else{
                 this.$util.pageTo({ url: '/admin/billing/result?orderId='+id,type:2})
               }

+ 1 - 1
hdApp/src/admin/billing/remind.vue

@@ -56,7 +56,7 @@
           if(res.code == 1){
             this.$msg('充值成功')
             setTimeout(() => {
-              that.pageTo({url:`/admin/billing/resultCp?id=${this.option.orderId}&amount=${this.orderInfo.actPrice}`, type: 2})
+              that.pageTo({url:`/admin/billing/shPayCp?id=${this.option.orderId}&amount=${this.orderInfo.actPrice}`, type: 2})
             }, 1000)
           }
         })

+ 2 - 2
hdApp/src/admin/order/refund.vue

@@ -373,11 +373,11 @@ export default {
 				if(res.code == 1){
 					if(res.data.forward && res.data.forward == 1){
 						let orderId = res.data.orderId?res.data.orderId:0
-						this.$util.pageTo({url:'/admin/billing/remind?orderId='+orderId,type:2})
+						this.$util.pageTo({url:'/admin/billing/shPayRemind?orderId='+orderId,type:2})
 					}else{
 						if(this.orderInfo.onlinePay == 1 && (this.orderInfo.payWay == 0 || this.orderInfo.payWay == 1 || this.orderInfo.payWay == 4 || this.orderInfo.payWay == 5)){
 							//线下付款的,也引导走充值
-							this.$util.pageTo({url:'/admin/billing/remind?shPay=0&orderId='+orderId+'&payWay='+this.orderInfo.payWay,type:2})
+							//this.$util.pageTo({url:'/admin/billing/shPayRemind?shPay=0&orderId='+orderId+'&payWay='+this.orderInfo.payWay,type:2})
 						}else{
 							this.$util.pageTo({url:'/common/success',query:{titleType:1},type:2})
 						}

+ 141 - 0
hdApp/src/admin/refund/shPayCp.vue

@@ -0,0 +1,141 @@
+<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="textarea-container">
+          <textarea 
+            class="result-textarea" 
+            v-model="copyText" 
+            readonly 
+            placeholder=""
+          ></textarea>
+        </view>
+        <view style="font-size:34upx;">复制上面文字,发给客户</view>
+        <view class="pay-confirm-content">
+          <view>
+              <button class="admin-button-com big" @click="copyBack" style="width:420upx;">复制并返回</button>
+          </view>
+        </view>
+      </view>
+    </view>
+  </view>
+</template>
+<script>
+import { getMallRechargeShortLink } from "@/api/recharge";
+export default {
+  name: "resultCp",
+  data() {
+    return {
+      orderInfo:[],
+      copyText:""
+    }
+  },
+  onLoad(){
+
+    //返回上一页时刷新
+    let pages = getCurrentPages();
+    let prevPage = pages[ pages.length - 2 ];
+    if(prevPage.$vm){
+      prevPage.$vm.pageAction = {refresh:1}
+    }
+
+  },
+  methods: {
+    init(){
+      let amount = this.option.amount?parseFloat(this.option.amount):0
+      getMallRechargeShortLink().then(res=>{
+        if(res.code == 1){
+         let link = res.data.link ? res.data.link:''
+         this.copyText = "售后金额¥"+amount+"元,已充值到你的账户\n点击下面链接查看你的账户余额\n"+link+"\n链接30天后失效"
+        }
+      })
+    },
+    copyBack(){
+      uni.setClipboardData({
+        data: this.copyText,
+        success: () => {
+          uni.showToast({ title: '复制成功', icon: 'success', duration: 2000 })
+          setTimeout(() => {
+            uni.navigateBack()      
+          }, 800)
+        },
+        fail: () => {
+          uni.showToast({ title: '复制失败', icon: 'none', duration: 2000 })
+          setTimeout(() => {
+            uni.navigateBack()      
+          }, 1000)
+        }
+      });
+    }
+  },
+};
+</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;
+    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: 50upx 0 30upx;
+      font-size: 38upx;
+    }
+    
+    .textarea-container {
+      width: 100%;
+      padding: 0 40upx;
+      margin-bottom: 40upx;
+      
+      .result-textarea {
+        width: 100%;
+        min-height: 300upx;
+        padding: 30upx;
+        background: #f8f9fa;
+        border: 2upx solid #e9ecef;
+        border-radius: 16upx;
+        font-size: 32upx;
+        line-height: 1.6;
+        color: #333;
+        resize: none;
+        
+        &:focus {
+          border-color: $mainColor1;
+          background: #fff;
+        }
+      }
+    }
+  }
+}
+
+.pay-confirm-content {
+  padding: 40upx 40upx;
+  text-align: center;
+}
+</style>

+ 184 - 0
hdApp/src/admin/refund/shPayRemind.vue

@@ -0,0 +1,184 @@
+<template>
+    <view class="app-content">
+      <view class="billing_box_bg">
+        <view class="top-view"> </view>
+        <view class="result-view">
+          <view class="custom-info-icon">i</view>
+          <view class="result-title">操作成功,还有下一步</view>
+          <view class="pay-confirm-content">
+            <view class="confirm-text">
+              <view class="text-desc">请给客户充值或线下转账</view>
+              <view class="text-amount">¥{{orderInfo.actPrice?parseFloat(orderInfo.actPrice):0}}</view>
+            </view>
+            <view>
+                <button class="admin-button-com blue big" @click="recharge()" style="width:320upx;">充到客户余额</button>
+            </view>
+            <view style="margin-top:30upx;">
+                <button class="admin-button-com big" @click="goBack" style="width:320upx;">线下转账给客户</button>
+            </view>
+          </view>
+        </view>
+      </view>
+    </view>
+  </template>
+  <script>
+  import { getDetB} from "@/api/order";
+  import {toManRecharge} from "@/api/recharge"
+  export default {
+    name: "remind",
+    data() {
+      return {
+        orderInfo:[]
+      }
+    },
+    onLoad(){
+      //返回上一页时刷新
+      let pages = getCurrentPages();
+      let prevPage = pages[ pages.length - 2 ];
+      prevPage.$vm.pageAction = {refresh:1}
+    },
+    methods: {
+      recharge(){
+        if(this.$util.isEmpty(this.orderInfo)){
+          this.$msg('没有找到订单信息')
+          return false
+        }
+        this.$util.confirmModal({content:'确认充到客户余额里?'},() => {
+          this.toRecharge()
+			  })
+      },
+      toRecharge(){
+        let that = this
+        uni.showLoading({mask:true})
+        let orderId = this.orderInfo.id
+        toManRecharge({amount:this.orderInfo.actPrice,payWay:0,customId:this.orderInfo.customId,shOrderId:orderId}).then(res=>{
+          uni.hideLoading()
+          if(res.code == 1){
+            this.$msg('充值成功')
+            setTimeout(() => {
+              that.pageTo({url:`/admin/billing/shPayCp?id=${this.option.orderId}&amount=${this.orderInfo.actPrice}`, type: 2})
+            }, 1000)
+          }
+        })
+      },
+      init(){
+        let orderId = this.option.orderId?this.option.orderId:0
+        getDetB({id: orderId}).then(res => {
+          this.orderInfo = res.data
+        })
+      },
+      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: #09C567;
+      border-radius: 0upx 0upx 83upx 83upx;
+    }
+    .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;
+      .custom-info-icon {
+        width: 130upx;
+        height: 130upx;
+        border-radius: 50%;
+        background: #FF9800;
+        color: #fff;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        font-size: 80upx;
+        font-weight: bold;
+        box-shadow: 0 4upx 12upx rgba(9, 197, 103, 0.3);
+      }
+      .result-title {
+        margin: 50upx 0 30upx;
+        font-size: 38upx;
+        font-weight:bold;
+      }
+    }
+  }
+
+  // 支付确认弹框样式
+  .pay-confirm-content {
+    padding: 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;
+      }
+      .text-amount {
+        margin-top: 30upx;
+        font-size: 46upx;
+        color: red;
+        line-height: 1.4;
+        font-weight: bold;
+      }
+    }
+    
+    .confirm-btn-wrap {
+      .confirm-btn {
+        width: 60%;
+        height: 100upx;
+        background: linear-gradient(135deg, #07c160 0%, #10ad6a 100%);
+        color: #fff;
+        border: none;
+        border-radius: 50upx;
+        font-size: 38upx;
+        font-weight: bold;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        box-shadow: 0 4upx 12upx rgba(7, 193, 96, 0.3);
+        transition: all 0.3s ease;
+        margin: 0 auto 25upx;
+        
+        &:active {
+          transform: scale(0.98);
+          box-shadow: 0 2upx 8upx rgba(7, 193, 96, 0.4);
+        }
+      }
+      
+      .tech-support {
+        font-size: 32upx;
+        color: #999;
+        text-align: center;
+        line-height: 1.4;
+      }
+    }
+  }
+  </style>

+ 7 - 2
hdApp/src/pages.json

@@ -354,6 +354,13 @@
 				{ "path": "rechargeCode", "style": { "navigationBarTitleText": "充值码"}}
 			]
 		},
+		{
+			"root": "admin/refund",
+			"pages": [
+				{ "path": "shPayRemind", "style": { "navigationBarTitleText": "提示"}},
+				{ "path": "shPayCp", "style": { "navigationBarTitleText": "成功"}}
+			]
+		},
 		{
 			"root": "admin/billing",
 			"pages": [
@@ -362,8 +369,6 @@
 				{ "path": "customerPlace", "style": { "navigationBarTitleText": "开单" } },
 				{ "path": "priceChange", "style": { "navigationBarTitleText": "改价", "enablePullDownRefresh": true } },
 				{ "path": "result", "style": { "navigationBarTitleText": "开单状态" } },
-				{ "path": "resultCp", "style": { "navigationBarTitleText": "成功" } },
-				{ "path": "remind", "style": { "navigationBarTitleText": "提示" } },
 				{ "path": "affirm", "style": { "navigationBarTitleText": "确认订单信息" } },
 				{ "path": "toPay", "style": { "navigationBarTitleText": "等待付款" } },
 				{ "path": "affirmGoods", "style": { "navigationBarTitleText": "确认订单信息" } },