paymentRecord.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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. // console.log(this.receiptAmount)
  44. this.initData(this.discernReceiptList)
  45. },
  46. computed: {
  47. },
  48. methods:{
  49. initData(res) {
  50. if(res!=''){
  51. this.isEmpty = false
  52. this.paymentData = res;
  53. }else{
  54. this.isEmpty = true
  55. }
  56. },
  57. }
  58. }
  59. </script>
  60. <style lang="scss">
  61. .record-template{
  62. width: 100%;
  63. height: auto;
  64. background: #FFFFFF;
  65. float: left;
  66. margin-top: 24rpx;
  67. .record-content{
  68. width: 702rpx;
  69. padding: 20rpx 24rpx;
  70. height: auto;
  71. .record-title{
  72. width: 100%;
  73. font-size: $font-size-28;
  74. color: $text-color;
  75. text-align: left;
  76. line-height: 40rpx;
  77. margin-bottom: 12rpx;
  78. float: left;
  79. .record-title-l{
  80. font-weight: bold;
  81. float: left;
  82. }
  83. .record-title-r{
  84. float: right;
  85. .red{
  86. color: #FF2A2A;
  87. font-weight: bold;
  88. }
  89. }
  90. }
  91. .record-empty{
  92. font-size: $font-size-28;
  93. color: $text-color;
  94. text-align: left;
  95. line-height: 40rpx;
  96. }
  97. .record-list{
  98. width: 100%;
  99. height: auto;
  100. float: left;
  101. margin-top: 12rpx;
  102. .record-item{
  103. height: 40rpx;
  104. width: 100%;
  105. padding: 12rpx 0;
  106. font-size: $font-size-28;
  107. line-height: 40rpx;
  108. float: left;
  109. .item-time{
  110. float: left;
  111. color: #999999;
  112. }
  113. .item-nums{
  114. font-weight: bold;
  115. float: right;
  116. color: $text-color;
  117. }
  118. }
  119. }
  120. }
  121. }
  122. </style>