cm-record-popup.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  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="staticUrl + '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. staticUrl:this.global.staticUrl,
  55. isIphoneX: this.$store.state.isIphoneX,
  56. dataList: []
  57. }
  58. },
  59. filters: {
  60. NumFormat(value) {
  61. //处理金额
  62. if (value) {
  63. return Number(value).toFixed(2)
  64. } else {
  65. return '0.00'
  66. }
  67. },
  68. },
  69. created() {
  70. this.dataList = this.list
  71. },
  72. methods: {
  73. hidePopup() {
  74. this.$parent.popupShow = false
  75. },
  76. payTypeText(record) {
  77. //处理支付记录文字
  78. const map = {
  79. 12: '企业网银',
  80. 13: '微信支付',
  81. 14: '支付宝',
  82. 15: '微信支付',
  83. 16: '余额抵扣',
  84. }
  85. if(record.payType === 28 || record.payType === 29 ){
  86. return record.quickPayStr
  87. }else{
  88. return map[record.payType]
  89. }
  90. }
  91. }
  92. }
  93. </script>
  94. <style lang="scss">
  95. .record-template {
  96. width: 100%;
  97. height: auto;
  98. background: #ffffff;
  99. float: left;
  100. margin-top: 24rpx;
  101. }
  102. .tui-popup-box {
  103. position: relative;
  104. box-sizing: border-box;
  105. min-height: 220rpx;
  106. padding: 24rpx 32rpx 0 32rpx;
  107. .title {
  108. font-size: $font-size-32;
  109. color: $text-color;
  110. line-height: 68rpx;
  111. text-align: center;
  112. float: left;
  113. width: 100%;
  114. height: 68rpx;
  115. box-sizing: border-box;
  116. padding: 0 24rpx;
  117. position: relative;
  118. font-weight: bold;
  119. .title-close {
  120. width: 68rpx;
  121. height: 68rpx;
  122. text-align: center;
  123. line-height: 68rpx;
  124. position: absolute;
  125. right: 0;
  126. top: 0;
  127. .iconfont {
  128. color: #b2b2b2;
  129. font-size: 40rpx;
  130. }
  131. }
  132. }
  133. .tui-popup-main {
  134. width: 100%;
  135. float: left;
  136. padding-top: 10rpx;
  137. .tui-popup-scroll {
  138. width: 100%;
  139. height: 600rpx;
  140. .list-main-none{
  141. width: 100%;
  142. height: 100%;
  143. display: flex;
  144. align-items: center;
  145. justify-content: center;
  146. flex-direction: column;
  147. .none-image {
  148. width: 220rpx;
  149. height: 220rpx;
  150. margin-bottom: 20rpx;
  151. }
  152. .none-text {
  153. font-size: $font-size-28;
  154. color: #999999;
  155. line-height: 44rpx;
  156. }
  157. }
  158. .list-main {
  159. height: auto;
  160. display: flex;
  161. flex-direction: column;
  162. .list-item {
  163. width: 100%;
  164. height: auto;
  165. box-sizing: border-box;
  166. padding: 24rpx 0;
  167. border-bottom: 1px solid #e1e1e1;
  168. &:last-child {
  169. border-bottom: none;
  170. }
  171. .list-item-cell {
  172. width: 100%;
  173. height: 44rpx;
  174. display: flex;
  175. flex: 1;
  176. line-height: 44rpx;
  177. font-size: $font-size-26;
  178. color: $text-color;
  179. .text {
  180. flex: 1;
  181. &.row-1 {
  182. flex: 3;
  183. }
  184. &.row-2 {
  185. flex: 7;
  186. }
  187. &.row-3 {
  188. color: #999999;
  189. }
  190. }
  191. }
  192. }
  193. }
  194. }
  195. }
  196. }
  197. </style>