paymentRecord.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <template name="record">
  2. <view class="record-template">
  3. <!-- 支付记录 -->
  4. <view class="record-content">
  5. <view class="record-title">
  6. <view class="record-title-l">支付记录</view>
  7. <view class="record-title-r" v-if="!isEmpty">
  8. 已支付:<text class="red">¥{{ receiptAmount != null ? receiptAmount.toFixed(2): '0.00'}}</text>
  9. </view>
  10. </view>
  11. <view class="record-empty" v-if="isEmpty">
  12. <text>无</text>
  13. </view>
  14. <view class="record-list" v-else>
  15. <view class="record-item" v-for="(item,index) in discernReceiptList" :key="index">
  16. <view class="item-time">{{item.receiptDate}}</view>
  17. <view class="item-nums">¥{{item.associateAmount.toFixed(2)}}</view>
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. export default{
  25. name:"record",
  26. props:{
  27. discernReceiptList:{
  28. type:Array
  29. },
  30. receiptAmount:{
  31. type:Number
  32. }
  33. },
  34. data() {
  35. return{
  36. isEmpty:false,
  37. paymentData:'',
  38. typeText:'',
  39. isOpen:false,
  40. }
  41. },
  42. created(){
  43. this.initData(this.discernReceiptList)
  44. },
  45. computed: {
  46. },
  47. methods:{
  48. initData(res) {
  49. if(res!=''){
  50. this.isEmpty = false
  51. this.paymentData = res;
  52. }else{
  53. this.isEmpty = true
  54. }
  55. },
  56. }
  57. }
  58. </script>
  59. <style lang="scss">
  60. .record-template{
  61. width: 100%;
  62. height: auto;
  63. background: #FFFFFF;
  64. float: left;
  65. margin-top: 24rpx;
  66. .record-content{
  67. width: 702rpx;
  68. padding: 20rpx 24rpx;
  69. height: auto;
  70. .record-title{
  71. width: 100%;
  72. font-size: $font-size-28;
  73. color: $text-color;
  74. text-align: left;
  75. line-height: 40rpx;
  76. margin-bottom: 12rpx;
  77. float: left;
  78. .record-title-l{
  79. font-weight: bold;
  80. float: left;
  81. }
  82. .record-title-r{
  83. float: right;
  84. .red{
  85. color: #FF2A2A;
  86. font-weight: bold;
  87. }
  88. }
  89. }
  90. .record-empty{
  91. font-size: $font-size-28;
  92. color: $text-color;
  93. text-align: left;
  94. line-height: 40rpx;
  95. }
  96. .record-list{
  97. width: 100%;
  98. height: auto;
  99. float: left;
  100. margin-top: 12rpx;
  101. .record-item{
  102. height: 40rpx;
  103. width: 100%;
  104. padding: 12rpx 0;
  105. font-size: $font-size-28;
  106. line-height: 40rpx;
  107. float: left;
  108. .item-time{
  109. float: left;
  110. color: #999999;
  111. }
  112. .item-nums{
  113. font-weight: bold;
  114. float: right;
  115. color: $text-color;
  116. }
  117. }
  118. }
  119. }
  120. }
  121. </style>