card.vue 2.2 KB

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