shish пре 1 година
родитељ
комит
2d6673eab0

+ 13 - 9
hdApp/src/admin/order/refund.vue

@@ -263,7 +263,7 @@ export default {
 			uni.navigateBack({delta: 1});
 		},
 		askRefund(){
-			if(this.orderInfo.payWay == 3 && Number(this.orderInfo.remainDebtPrice)>0 && Number(this.refundMoney)>Number(this.orderInfo.remainDebtPrice)){
+			if(this.orderInfo.payWay == 3 && Number(this.orderInfo.remainDebtPrice)>0 && Number(this.refundMoney) > Number(this.orderInfo.remainDebtPrice)){
 				//如果退款金额大于剩余欠款,则提醒走开付款单方式退款
 				this.$util.confirmModal({content:'售后金额超过剩余欠款,只能开付款单方式售后'},() => {
 					this.shAddPay = 1
@@ -372,17 +372,21 @@ export default {
 				uni.hideLoading()
 				if(res.code == 1){
 					if(res.data.forward && res.data.forward == 1){
-						let orderId = res.data.orderId?res.data.orderId:0
+						let orderId = res.data.orderId ? res.data.orderId : 0
 						this.$util.pageTo({url:'/admin/refund/shPayRemind?orderId='+orderId,type:2})
 					}else{
-						if(this.orderInfo.payWay == 2){
-							//余额支付
-							this.$util.pageTo({url:'/admin/refund/balanceCp?orderId='+this.orderInfo.id+'&amount='+this.refundMoney,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/refund/offlineRemind',type:2})
+						if(this.orderInfo.onlinePay == 2){
+							this.$util.pageTo({url:'/admin/refund/onlineResult',type:2})
 						}else{
-							this.$util.pageTo({url:'/common/success',query:{titleType:1},type:2})
+							if(this.orderInfo.payWay == 2){
+								//余额支付
+								this.$util.pageTo({url:'/admin/refund/balanceCp?orderId='+this.orderInfo.id+'&amount='+this.refundMoney,type:2})
+							}else if(this.orderInfo.payWay == 0 || this.orderInfo.payWay == 1 || this.orderInfo.payWay == 4 || this.orderInfo.payWay == 5){
+								//线下微信、支付宝、现金和银行卡付款的,也引导走充值
+								this.$util.pageTo({url:'/admin/refund/offlineRemind?orderId='+this.orderInfo.id+'&amount='+this.refundMoney+'&payWay='+this.orderInfo.payWay,type:2})
+							}else{
+								this.$util.pageTo({url:'/common/success',query:{titleType:1},type:2})
+							}
 						}
 					}
 				}

+ 4 - 3
hdApp/src/admin/refund/balanceCp.vue

@@ -4,7 +4,8 @@
       <view class="top-view"> </view>
       <view class="result-view">
         <view :class="['iconfont', 'iconchenggong']"></view>
-        <view class="result-title">充值成功</view>
+        <view class="result-title">售后成功</view>
+        <view style="font-size:36upx;margin-top:10upx;color:green;font-weight:bold;margin-bottom:20upx;">钱已退回到客户余额</view>
         <view class="textarea-container">
           <textarea 
             class="result-textarea" 
@@ -51,7 +52,7 @@ export default {
         if(res.code == 1){
          let rechargeAccountLink = res.data.rechargeAccountLink ? res.data.rechargeAccountLink:''
          let orderLink = res.data.orderLink?res.data.orderLink:''
-         this.copyText = "售后金额¥"+amount+"元,已退回到你的余额\n点击下面链接查看你的余额\n\n余额 "+rechargeAccountLink+"\n\n订单 "+orderLink+"\n\n链接30天后失效"
+         this.copyText = "售后金额¥"+amount+"元,已退回到你的余额点击下面链接查看你的余额\n\n余额 "+rechargeAccountLink+"\n\n订单 "+orderLink+"\n\n链接30天后失效"
         }
       })
     },
@@ -62,7 +63,7 @@ export default {
           uni.showToast({ title: '复制成功', icon: 'success', duration: 2000 })
           setTimeout(() => {
             uni.navigateBack()      
-          }, 800)
+          }, 600)
         },
         fail: () => {
           uni.showToast({ title: '复制失败', icon: 'none', duration: 2000 })

+ 6 - 4
hdApp/src/admin/refund/offlineCp.vue

@@ -26,7 +26,7 @@
 <script>
 import { getMallRechargeShortLink } from "@/api/recharge";
 export default {
-  name: "shPayCp",
+  name: "offlineCp",
   data() {
     return {
       orderInfo:[],
@@ -46,10 +46,12 @@ export default {
   methods: {
     init(){
       let amount = this.option.amount?parseFloat(this.option.amount):0
-      getMallRechargeShortLink().then(res=>{
+      let orderId = this.option.orderId?this.option.orderId:0
+      getMallRechargeShortLink({orderId:orderId}).then(res=>{
         if(res.code == 1){
-         let link = res.data.link ? res.data.link:''
-         this.copyText = "售后金额¥"+amount+"元,已充值到你的账户\n点击下面链接查看你的账户余额\n"+link+"\n链接30天后失效"
+         let rechargeAccountLink = res.data.rechargeAccountLink ? res.data.rechargeAccountLink:''
+         let orderLink = res.data.orderLink?res.data.orderLink:''
+         this.copyText = "售后金额¥"+amount+"元,已充值到你的账户,点击下面链接查看你的账户余额\n\n余额 "+rechargeAccountLink+"\n\n订单 "+orderLink+"\n\n链接30天后失效"
         }
       })
     },

+ 163 - 160
hdApp/src/admin/refund/offlineRemind.vue

@@ -1,184 +1,187 @@
 <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 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">请给客户充钱或线下{{payWay==0?'微信':payWay==1?'支付宝':payWay==4?'现金':'银行卡'}}转钱</view>
+            <view class="text-amount">¥{{amount}}</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>
-  </template>
-  <script>
-  import { getDetB} from "@/api/order";
-  import {toManRecharge} from "@/api/recharge"
-  export default {
-    name: "shPayRemind",
-    data() {
-      return {
-        orderInfo:[]
+  </view>
+</template>
+<script>
+import {toManRecharge} from "@/api/recharge"
+export default {
+  name: "offlineRemind",
+  data() {
+    return {
+      orderInfo:[],
+      amount:0,
+      orderId:0,
+      payWay:0
+    }
+  },
+  onLoad(){
+    //返回上一页时刷新
+    let pages = getCurrentPages();
+    let prevPage = pages[ pages.length - 2 ];
+    prevPage.$vm.pageAction = {refresh:1}
+
+    this.amount = this.option.amount?parseFloat(this.option.amount):0
+    this.orderId = this.option.orderId?this.option.orderId:0
+    this.payWay = this.option.payWay?this.option.payWay:0
+
+  },
+  methods: {
+    recharge(){
+      if(this.$util.isEmpty(this.orderInfo)){
+        this.$msg('没有找到订单信息')
+        return false
       }
+      this.$util.confirmModal({content:'确认充到客户余额里?'},() => {
+        this.toRecharge()
+      })
     },
-    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
+    toRecharge(){
+      let that = this
+      uni.showLoading({mask:true})
+    
+      toManRecharge({amount:this.amount,payWay:this.payWay,customId:this.orderInfo.customId,refundOrderId:this.orderId}).then(res=>{
+        uni.hideLoading()
+        if(res.code == 1){
+          this.$msg('充值成功')
+          setTimeout(() => {
+            that.pageTo({url:`/admin/refund/offlineCp?orderId=${this.option.orderId}&amount=${this.amount}`, type: 2})
+          }, 1000)
         }
-        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/refund/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 {
+    init(){
+    },
+    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;
-    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;
+    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;
-      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;
-      }
+      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;
+// 支付确认弹框样式
+.pay-confirm-content {
+  padding: 30upx 40upx;
+  text-align: center;
+  
+  .confirm-text {
+    margin-bottom: 60upx;
     
-    .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;
-      }
+    .text-title {
+      font-size: 42upx;
+      font-weight: bold;
+      color: #333;
+      margin-bottom: 25upx;
+      line-height: 1.4;
     }
     
-    .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);
-        }
-      }
+    .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;
       
-      .tech-support {
-        font-size: 32upx;
-        color: #999;
-        text-align: center;
-        line-height: 1.4;
+      &: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>
+}
+</style>

+ 6 - 36
hdApp/src/admin/refund/onlineResult.vue

@@ -4,19 +4,11 @@
       <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;color:#807d7d;">复制上面文字,发给客户</view>
+        <view class="result-title">售后成功</view>
+        <view style="font-size:38upx;margin-top:30upx;color:green;font-weight:bold;">钱已原路退回</view>
         <view class="pay-confirm-content">
           <view>
-              <button class="admin-button-com big" @click="copyBack" style="width:420upx;">复制并返回</button>
+              <button class="admin-button-com big default" @click="copyBack" style="width:420upx;">返回</button>
           </view>
         </view>
       </view>
@@ -26,11 +18,10 @@
 <script>
 import { getMallRechargeShortLink } from "@/api/recharge";
 export default {
-  name: "shPayCp",
+  name: "onlineResult",
   data() {
     return {
-      orderInfo:[],
-      copyText:""
+      orderInfo:[]
     }
   },
   onLoad(){
@@ -45,30 +36,9 @@ export default {
   },
   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)
-        }
-      });
+      uni.navigateBack()
     }
   },
 };

+ 1 - 1
hdApp/src/admin/refund/shPayCp.vue

@@ -60,7 +60,7 @@ export default {
           uni.showToast({ title: '复制成功', icon: 'success', duration: 2000 })
           setTimeout(() => {
             uni.navigateBack()      
-          }, 800)
+          }, 600)
         },
         fail: () => {
           uni.showToast({ title: '复制失败', icon: 'none', duration: 2000 })