order-alert.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <template name="sharealert">
  2. <view class="alert spec" >
  3. <view class="model-warp" @click.stop="hideConfirm">
  4. <view class="content" v-if="modelType == 1">
  5. <view class="content-title"></view>
  6. <view class="text-content clearfix">
  7. <view class="text">
  8. <text>您有采美余额¥{{payModelData.ableUserMoney}}暂未使用,是否需要抵扣订单?</text>
  9. <text>抵扣后您只需再支付¥{{payModelData.pendingPayments}}</text></view>
  10. <view class="alert-btn" @click="cancelConfirm(dataInfo)">不抵扣,继续付款</view>
  11. <view class="alert-btn" @click="paymentConfirm(1,dataInfo)">抵扣,继续付款</view>
  12. </view>
  13. </view>
  14. <view class="content" v-if="modelType == 2">
  15. <view class="content-title"></view>
  16. <view class="text-content clearfix">
  17. <view class="text">您有采美余额¥{{payModelData.ableUserMoney}}暂未使用,是否需要抵扣订单?抵扣后订单支付完成</view>
  18. <view class="alert-btn" @click="cancelConfirm(dataInfo)">不抵扣,继续付款</view>
  19. <view class="alert-btn" @click="paymentConfirm(2,dataInfo)">抵扣</view>
  20. </view>
  21. </view>
  22. <view class="content" v-if="modelType == 3">
  23. <view class="content-title"></view>
  24. <view class="text-content clearfix">
  25. <view class="text">目前机构余额剩余¥{{}}是否抵扣订单?</view>
  26. <view class="alert-btn" @click="cancelConfirm">不抵扣,继续付款</view>
  27. <view class="alert-btn" @click="btnConfirm">抵扣</view>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. import { queryOrderShareCode } from "@/api/order.js"
  35. export default{
  36. name:'sharealert',
  37. props:{
  38. modelType:{
  39. type:Number,
  40. default:3
  41. },
  42. orderID:{
  43. type:Number
  44. },
  45. payModelData:{
  46. type:Object
  47. }
  48. },
  49. data() {
  50. return{
  51. dataInfo:{}
  52. }
  53. },
  54. created() {
  55. this.infoData(this.payModelData)
  56. },
  57. methods:{
  58. infoData(el){
  59. this.dataInfo = el
  60. },
  61. hideConfirm(){
  62. this.$parent.isPayModel = false
  63. },
  64. cancelConfirm(data){
  65. this.$emit('cancelConfirm',data)
  66. },
  67. paymentConfirm(type,data){
  68. this.$parent.isPayModel = false
  69. let _data = {type:type,order:data}
  70. this.$emit('paymentConfirm',_data)
  71. },
  72. btnConfirm(data){//点击事件
  73. this.$emit('btnConfirm',data)
  74. }
  75. }
  76. }
  77. </script>
  78. <style lang="scss">
  79. /*弹窗*/
  80. .model-warp.none{
  81. display: none;
  82. }
  83. .model-warp.show{
  84. display: block;
  85. }
  86. .model-warp{
  87. width: 100%;
  88. height: 100%;
  89. background: rgba(0,0,0,0.3);
  90. position: fixed;
  91. top: 0;
  92. left: 0;
  93. z-index: 10000;
  94. transition: all 0.4s;
  95. &.none{
  96. display: none;
  97. }
  98. &.show{
  99. display: block;
  100. }
  101. .content{
  102. width: 540rpx;
  103. min-height: 310rpx;
  104. box-sizing: border-box;
  105. position: absolute;
  106. left: 50%;
  107. top: 50%;
  108. transform: translate(-50%,-50%);
  109. border-radius: 14rpx;
  110. background-color: #FFFFFF;
  111. padding-top: 180rpx;
  112. .content-title{
  113. position: absolute;
  114. left: 0;
  115. top: -53rpx;
  116. width: 100%;
  117. height: 232rpx;
  118. background: url(https://admin-b.caimei365.com/userfiles/1/images/photo/2020/08/alert%402x.png) no-repeat;
  119. background-size: contain;
  120. }
  121. .text-content{
  122. width: 100%;
  123. min-height: 208rpx;
  124. box-sizing: border-box;
  125. padding:24rpx;
  126. float: left;
  127. background-color: #FFFFFF;
  128. border-radius:0 0 14rpx 14rpx;
  129. .text{
  130. letter-spacing: 2rpx;
  131. line-height: 50rpx;
  132. font-size: $font-size-26;
  133. color: $text-color;
  134. text-align: justify;
  135. margin-bottom: 30rpx;
  136. }
  137. }
  138. .alert-btn{
  139. width: 492rpx;
  140. height: 88rpx;
  141. background: $btn-confirm;
  142. line-height: 88rpx;
  143. text-align: center;
  144. border-radius: 14rpx;
  145. color: #FFFFFF;
  146. margin-top: 20rpx;
  147. }
  148. }
  149. }
  150. </style>