cm-record-popup.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. <template name="record">
  2. <view class="record-template">
  3. <!-- 支付记录 -->
  4. <tui-bottom-popup :radius="true" :show="show">
  5. <view class="tui-popup-box clearfix">
  6. <view class="title">
  7. 支付记录
  8. <view class="title-close">
  9. <text class="iconfont icon-iconfontguanbi" @click="hidePopup"></text>
  10. </view>
  11. </view>
  12. <view class="tui-popup-main coupon">
  13. <scroll-view class="tui-popup-scroll" scroll-y="true">
  14. <view class="list-main" v-if="dataList.length > 0">
  15. <view class="list-item" v-for="(record, index) in dataList" :key="index">
  16. <view class="list-item-cell">
  17. <text class="text row-1">¥{{ record.receiptAmount | NumFormat }}</text>
  18. <text class="text row-2">{{ payTypeText(record) }}</text>
  19. </view>
  20. <view class="list-item-cell">
  21. <text class="text row-3">{{ record.receiptDate }}</text>
  22. </view>
  23. </view>
  24. </view>
  25. <view class="list-main-none" v-else>
  26. <image
  27. class="none-image"
  28. src="https://static.caimei365.com/app/img/bg/icon_echart_none@2x.png"
  29. mode=""
  30. ></image>
  31. <view class="none-text">暂无支付记录</view>
  32. </view>
  33. </scroll-view>
  34. </view>
  35. </view>
  36. </tui-bottom-popup>
  37. </view>
  38. </template>
  39. <script>
  40. export default {
  41. name: 'record',
  42. props: {
  43. show: {
  44. type: Boolean,
  45. default: false
  46. },
  47. list: {
  48. type: Array,
  49. default: []
  50. }
  51. },
  52. data() {
  53. return {
  54. isIphoneX: this.$store.state.isIphoneX,
  55. dataList: []
  56. }
  57. },
  58. filters: {
  59. NumFormat(value) {
  60. //处理金额
  61. if (value) {
  62. return Number(value).toFixed(2)
  63. } else {
  64. return '0.00'
  65. }
  66. },
  67. },
  68. created() {
  69. this.dataList = this.list
  70. },
  71. methods: {
  72. hidePopup() {
  73. this.$parent.popupShow = false
  74. },
  75. payTypeText(record) {
  76. //处理支付记录文字
  77. const map = {
  78. 12: '企业网银',
  79. 13: '微信支付',
  80. 14: '支付宝',
  81. 15: '微信支付',
  82. 16: '余额抵扣',
  83. }
  84. if(record.payType === 28 || record.payType === 29 ){
  85. return record.quickPayStr
  86. }else{
  87. return map[record.payType]
  88. }
  89. }
  90. }
  91. }
  92. </script>
  93. <style lang="scss">
  94. .record-template {
  95. width: 100%;
  96. height: auto;
  97. background: #ffffff;
  98. float: left;
  99. margin-top: 24rpx;
  100. }
  101. .tui-popup-box {
  102. position: relative;
  103. box-sizing: border-box;
  104. min-height: 220rpx;
  105. padding: 24rpx 32rpx 0 32rpx;
  106. .title {
  107. font-size: $font-size-32;
  108. color: $text-color;
  109. line-height: 68rpx;
  110. text-align: center;
  111. float: left;
  112. width: 100%;
  113. height: 68rpx;
  114. box-sizing: border-box;
  115. padding: 0 24rpx;
  116. position: relative;
  117. font-weight: bold;
  118. .title-close {
  119. width: 68rpx;
  120. height: 68rpx;
  121. text-align: center;
  122. line-height: 68rpx;
  123. position: absolute;
  124. right: 0;
  125. top: 0;
  126. .iconfont {
  127. color: #b2b2b2;
  128. font-size: 40rpx;
  129. }
  130. }
  131. }
  132. .tui-popup-main {
  133. width: 100%;
  134. float: left;
  135. padding-top: 10rpx;
  136. .tui-popup-scroll {
  137. width: 100%;
  138. height: 600rpx;
  139. .list-main-none{
  140. width: 100%;
  141. height: 100%;
  142. display: flex;
  143. align-items: center;
  144. justify-content: center;
  145. flex-direction: column;
  146. .none-image {
  147. width: 220rpx;
  148. height: 220rpx;
  149. margin-bottom: 20rpx;
  150. }
  151. .none-text {
  152. font-size: $font-size-28;
  153. color: #999999;
  154. line-height: 44rpx;
  155. }
  156. }
  157. .list-main {
  158. height: auto;
  159. display: flex;
  160. flex-direction: column;
  161. .list-item {
  162. width: 100%;
  163. height: auto;
  164. box-sizing: border-box;
  165. padding: 24rpx 0;
  166. border-bottom: 1px solid #e1e1e1;
  167. &:last-child {
  168. border-bottom: none;
  169. }
  170. .list-item-cell {
  171. width: 100%;
  172. height: 44rpx;
  173. display: flex;
  174. flex: 1;
  175. line-height: 44rpx;
  176. font-size: $font-size-26;
  177. color: $text-color;
  178. .text {
  179. flex: 1;
  180. &.row-1 {
  181. flex: 3;
  182. }
  183. &.row-2 {
  184. flex: 7;
  185. }
  186. &.row-3 {
  187. color: #999999;
  188. }
  189. }
  190. }
  191. }
  192. }
  193. }
  194. }
  195. }
  196. </style>