detailReceivablesItem.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <template>
  2. <view class="list-item" @click="handleToDetail">
  3. <view class="list-item-main">
  4. <text class="left">
  5. {{ itemData.number }}
  6. </text>
  7. <text
  8. class="right status"
  9. :style="{color: statusObj.color }">
  10. {{ statusObj.label }}
  11. </text>
  12. </view>
  13. <view class="list-item-desc">
  14. <text class="left">
  15. {{ itemData.customerName }}
  16. </text>
  17. </view>
  18. <view class="list-item-desc">
  19. <text class="left money">
  20. ¥{{ itemData.money }}
  21. </text>
  22. </view>
  23. </view>
  24. </template>
  25. <script>
  26. import {mapGetters} from 'vuex'
  27. export default {
  28. name: 'DetailReceivablesItem',
  29. props: {
  30. itemData: {
  31. type: Object,
  32. required: true
  33. }
  34. },
  35. computed: {
  36. ...mapGetters({
  37. calcStatus: 'base/calcStatus'
  38. }),
  39. statusObj() {
  40. return this.calcStatus(this.itemData.checkStatus) || {}
  41. }
  42. },
  43. methods: {
  44. handleToDetail() {
  45. this.$Router.navigateTo({
  46. url: '/pages_crm/receivables/detail',
  47. query: {
  48. id: this.itemData.receivablesId
  49. }
  50. })
  51. }
  52. }
  53. }
  54. </script>
  55. <style scoped lang="scss">
  56. @import "detailItem";
  57. .status {
  58. font-size: 26rpx !important;
  59. font-weight: 500;
  60. line-height: normal;
  61. padding: 5rpx 18rpx;
  62. border-radius: 4rpx;
  63. @include center;
  64. }
  65. .customer-name {
  66. color: $gray;
  67. @include ellipsis;
  68. }
  69. .money {
  70. font-size: 28rpx;
  71. color: #FF7812;
  72. font-weight: bold;
  73. }
  74. </style>