remind.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <template>
  2. <view class="app-content">
  3. <view class="billing_box_bg">
  4. <view class="top-view"> </view>
  5. <view class="result-view">
  6. <view class="custom-info-icon">i</view>
  7. <view class="result-title">操作成功,还有下一步</view>
  8. <view class="pay-confirm-content">
  9. <view class="confirm-text">
  10. <view class="text-desc">请给客户充值或线下转账</view>
  11. <view class="text-amount">¥{{orderInfo.actPrice?parseFloat(orderInfo.actPrice):0}}</view>
  12. </view>
  13. <view>
  14. <button class="admin-button-com blue big" @click="recharge()" style="width:320upx;">充到客户余额</button>
  15. </view>
  16. <view style="margin-top:30upx;">
  17. <button class="admin-button-com big" @click="goBack" style="width:320upx;">线下转账给客户</button>
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. import { getDetB} from "@/api/order";
  26. import {toManRecharge} from "@/api/recharge"
  27. export default {
  28. name: "remind",
  29. data() {
  30. return {
  31. orderInfo:[]
  32. }
  33. },
  34. onLoad(){
  35. //返回上一页时刷新
  36. let pages = getCurrentPages();
  37. let prevPage = pages[ pages.length - 2 ];
  38. prevPage.$vm.pageAction = {refresh:1}
  39. },
  40. methods: {
  41. recharge(){
  42. if(this.$util.isEmpty(this.orderInfo)){
  43. this.$msg('没有找到订单信息')
  44. return false
  45. }
  46. this.$util.confirmModal({content:'确认充到客户余额里?'},() => {
  47. this.toRecharge()
  48. })
  49. },
  50. toRecharge(){
  51. let that = this
  52. uni.showLoading({mask:true})
  53. let orderId = this.orderInfo.id
  54. toManRecharge({amount:this.orderInfo.actPrice,payWay:0,customId:this.orderInfo.customId,shOrderId:orderId}).then(res=>{
  55. uni.hideLoading()
  56. if(res.code == 1){
  57. this.$msg('充值成功')
  58. setTimeout(() => {
  59. that.pageTo({url:`/admin/billing/resultCp?id=${this.option.orderId}&amount=${this.orderInfo.actPrice}`, type: 2})
  60. }, 1000)
  61. }
  62. })
  63. },
  64. init(){
  65. let orderId = this.option.orderId?this.option.orderId:0
  66. getDetB({id: orderId}).then(res => {
  67. this.orderInfo = res.data
  68. })
  69. },
  70. goBack(){
  71. uni.navigateBack()
  72. }
  73. },
  74. };
  75. </script>
  76. <style lang="scss" scoped>
  77. .billing_box_bg {
  78. position: relative;
  79. padding: 30upx 30upx;
  80. display: flex;
  81. flex-direction: column;
  82. background-color: #f5f5f5;
  83. .top-view {
  84. position: absolute;
  85. top: 0;
  86. left: 0;
  87. width: 100%;
  88. height: 299upx;
  89. background: #09C567;
  90. border-radius: 0upx 0upx 83upx 83upx;
  91. }
  92. .result-view {
  93. position: relative;
  94. display: flex;
  95. flex-direction: column;
  96. align-items: center;
  97. padding: 80upx 0upx 70upx 0upx;
  98. width: 100%;
  99. background: #ffffff;
  100. border-radius: 20upx;
  101. z-index: 1;
  102. .custom-info-icon {
  103. width: 130upx;
  104. height: 130upx;
  105. border-radius: 50%;
  106. background: #FF9800;
  107. color: #fff;
  108. display: flex;
  109. align-items: center;
  110. justify-content: center;
  111. font-size: 80upx;
  112. font-weight: bold;
  113. box-shadow: 0 4upx 12upx rgba(9, 197, 103, 0.3);
  114. }
  115. .result-title {
  116. margin: 50upx 0 30upx;
  117. font-size: 38upx;
  118. font-weight:bold;
  119. }
  120. }
  121. }
  122. // 支付确认弹框样式
  123. .pay-confirm-content {
  124. padding: 30upx 40upx;
  125. text-align: center;
  126. .confirm-text {
  127. margin-bottom: 60upx;
  128. .text-title {
  129. font-size: 42upx;
  130. font-weight: bold;
  131. color: #333;
  132. margin-bottom: 25upx;
  133. line-height: 1.4;
  134. }
  135. .text-desc {
  136. font-size: 38upx;
  137. color: #3f3e3e;
  138. line-height: 1.4;
  139. }
  140. .text-amount {
  141. margin-top: 30upx;
  142. font-size: 46upx;
  143. color: red;
  144. line-height: 1.4;
  145. font-weight: bold;
  146. }
  147. }
  148. .confirm-btn-wrap {
  149. .confirm-btn {
  150. width: 60%;
  151. height: 100upx;
  152. background: linear-gradient(135deg, #07c160 0%, #10ad6a 100%);
  153. color: #fff;
  154. border: none;
  155. border-radius: 50upx;
  156. font-size: 38upx;
  157. font-weight: bold;
  158. display: flex;
  159. align-items: center;
  160. justify-content: center;
  161. box-shadow: 0 4upx 12upx rgba(7, 193, 96, 0.3);
  162. transition: all 0.3s ease;
  163. margin: 0 auto 25upx;
  164. &:active {
  165. transform: scale(0.98);
  166. box-shadow: 0 2upx 8upx rgba(7, 193, 96, 0.4);
  167. }
  168. }
  169. .tech-support {
  170. font-size: 32upx;
  171. color: #999;
  172. text-align: center;
  173. line-height: 1.4;
  174. }
  175. }
  176. }
  177. </style>