order-alert.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  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">目前机构余额剩余¥{{payModelData.ableUserMoney.toFixed(2)}}是否抵扣订单?</view>
  26. <view class="alert-btn" @click="hideConfirm">取消,不抵扣</view>
  27. <view class="alert-btn" @click="paymentConfirm(3,dataInfo)">抵扣</view>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. export default{
  35. name:'sharealert',
  36. props:{
  37. modelType:{
  38. type:Number,
  39. default:3
  40. },
  41. payModelData:{
  42. type:Object
  43. }
  44. },
  45. data() {
  46. return{
  47. dataInfo:{}
  48. }
  49. },
  50. created() {
  51. this.infoData(this.payModelData)
  52. },
  53. methods:{
  54. infoData(el){
  55. this.dataInfo = el
  56. },
  57. hideConfirm(){
  58. this.$parent.isPayModel = false
  59. },
  60. cancelConfirm(data){
  61. this.$emit('cancelConfirm',data)
  62. },
  63. paymentConfirm(type,data){
  64. this.$parent.isPayModel = false
  65. let _data = {type:type,order:data}
  66. this.$emit('paymentConfirm',_data)
  67. },
  68. btnConfirm(data){//点击事件
  69. this.$emit('btnConfirm',data)
  70. }
  71. }
  72. }
  73. </script>
  74. <style lang="scss">
  75. /*弹窗*/
  76. .model-warp.none{
  77. display: none;
  78. }
  79. .model-warp.show{
  80. display: block;
  81. }
  82. .model-warp{
  83. width: 100%;
  84. height: 100%;
  85. background: rgba(0,0,0,0.3);
  86. position: fixed;
  87. top: 0;
  88. left: 0;
  89. z-index: 10000;
  90. transition: all 0.4s;
  91. &.none{
  92. display: none;
  93. }
  94. &.show{
  95. display: block;
  96. }
  97. .content{
  98. width: 540rpx;
  99. min-height: 310rpx;
  100. box-sizing: border-box;
  101. position: absolute;
  102. left: 50%;
  103. top: 50%;
  104. transform: translate(-50%,-50%);
  105. border-radius: 14rpx;
  106. background-color: #FFFFFF;
  107. padding-top: 180rpx;
  108. .content-title{
  109. position: absolute;
  110. left: 0;
  111. top: -53rpx;
  112. width: 100%;
  113. height: 232rpx;
  114. background: url(https://static.caimei365.com/app/img/icon/icon-orderAlert@2x.png) no-repeat;
  115. background-size: contain;
  116. }
  117. .text-content{
  118. width: 100%;
  119. min-height: 208rpx;
  120. box-sizing: border-box;
  121. padding:24rpx;
  122. float: left;
  123. background-color: #FFFFFF;
  124. border-radius:0 0 14rpx 14rpx;
  125. .text{
  126. letter-spacing: 2rpx;
  127. line-height: 50rpx;
  128. font-size: $font-size-26;
  129. color: $text-color;
  130. text-align: justify;
  131. margin-bottom: 30rpx;
  132. }
  133. }
  134. .alert-btn{
  135. width: 492rpx;
  136. height: 88rpx;
  137. background: $btn-confirm;
  138. line-height: 88rpx;
  139. text-align: center;
  140. border-radius: 44rpx;
  141. color: #FFFFFF;
  142. margin-top: 20rpx;
  143. }
  144. }
  145. }
  146. </style>