CardList copy.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <template>
  2. <view class="marginTop">
  3. <view
  4. v-for="(item, index) in list"
  5. class="kd-row"
  6. :key="item.id"
  7. @click="goDetail(item)"
  8. v-show="list.length !== 0"
  9. >
  10. <!-- 进度组件 -->
  11. <view class="kd-col">
  12. <text class="title">{{ item.bizNum }}</text>
  13. <text>{{ item.planName }}</text>
  14. </view>
  15. <view class="kd-col">
  16. <text>{{ item.createUserName }}</text>
  17. <text>{{ item.documentSource }}</text>
  18. </view>
  19. <view class="kd-col">
  20. <text
  21. class="status"
  22. :class="
  23. statusList[item.verifyStatus] && statusList[item.verifyStatus].class
  24. "
  25. >{{
  26. statusList[item.verifyStatus] && statusList[item.verifyStatus].label
  27. }}</text
  28. >
  29. <text class="text-danger" style="width: 400rpx"
  30. >出库时间 {{ item.verifyStatus == 2 ? item.verifyTime : '' }}</text
  31. >
  32. </view>
  33. </view>
  34. <view v-show="list.length === 0" class="no_data">
  35. <u-empty mode="data" textSize="22"></u-empty>
  36. </view>
  37. </view>
  38. </template>
  39. <script>
  40. export default {
  41. props: {
  42. list: {
  43. type: Array,
  44. default: () => []
  45. }
  46. },
  47. data () {
  48. return {
  49. statusList: {
  50. 1: { class: '', label: '待审核' },
  51. 0: { class: 'text-danger', label: '已驳回' },
  52. 2: { class: 'text-primary', label: '已完成' }
  53. }
  54. }
  55. },
  56. methods: {
  57. goDetail ({ id }) {
  58. uni.navigateTo({
  59. url: `/pages/warehouse/outHouse/details?&id=${id}`
  60. })
  61. }
  62. }
  63. }
  64. </script>
  65. <style lang="scss" scoped>
  66. .marginTop {
  67. border-top: 20rpx solid $page-bg;
  68. .kd-row {
  69. font-size: 28rpx;
  70. padding: 14rpx 12rpx 6rpx;
  71. border-bottom: 1rpx solid $page-bg;
  72. .kd-col {
  73. display: flex;
  74. justify-content: space-between;
  75. align-items: center;
  76. padding: 2rpx;
  77. color: #aaaaaa;
  78. .status {
  79. background-color: $page-bg;
  80. display: inline-block;
  81. padding: 4rpx 10rpx;
  82. border-radius: 18rpx;
  83. }
  84. }
  85. .title {
  86. font-weight: bold;
  87. color: #333333;
  88. }
  89. }
  90. .center {
  91. text-align: center;
  92. margin-bottom: 10rpx;
  93. color: #999;
  94. }
  95. .no_data {
  96. position: fixed;
  97. top: 50%;
  98. left: 50%;
  99. transform: translate(-50%, -50%);
  100. color: #999;
  101. font-size: 28rpx;
  102. }
  103. }
  104. </style>