CardList.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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.code }}</text>
  7. <text>名称:{{ item.name }}</text>
  8. </view>
  9. <view class="kd-col">
  10. <text>领料单号:{{ item.sourceNo }}</text>
  11. </view>
  12. <view class="kd-col">
  13. <text>出库单号:{{ item.outInNo }}</text>
  14. </view>
  15. <view class="kd-col">
  16. <text>拣货人:{{ item.createName }}</text>
  17. </view>
  18. <view class="kd-col">
  19. <text class="text-danger">创建时间 {{ item.createTime }}</text>
  20. <text class="status" :class="statusList[item.status && item.status] && statusList[item.status && item.status].class">{{ statusList[item.status] && statusList[item.status].label }}</text>
  21. </view>
  22. <view class="kd-col">
  23. <text>仓库:{{ item.warehouseName }}</text>
  24. </view>
  25. </view>
  26. <view v-show="list.length === 0" class="no_data">
  27. <u-empty mode="data" textSize="22"></u-empty>
  28. </view>
  29. </view>
  30. </template>
  31. <script>
  32. export default {
  33. props: {
  34. list: {
  35. type: Array,
  36. default: () => []
  37. }
  38. },
  39. data() {
  40. return {
  41. statusList: {
  42. 0: { class: 'text-danger', label: '拣货中' },
  43. 1: { class: 'normal', label: '拣货完成' },
  44. 2: { class: 'text-primary', label: '已出库' }
  45. }
  46. }
  47. },
  48. methods: {
  49. goDetail({ outInNo }) {
  50. uni.navigateTo({
  51. url: `/pages/warehouse/outHouse/details?&bizNo=${outInNo}`
  52. })
  53. }
  54. }
  55. }
  56. </script>
  57. <style lang="scss" scoped>
  58. .marginTop {
  59. border-top: 20rpx solid $page-bg;
  60. .kd-row {
  61. font-size: 28rpx;
  62. padding: 14rpx 12rpx 6rpx;
  63. border-bottom: 1rpx solid $page-bg;
  64. .kd-col {
  65. display: flex;
  66. justify-content: space-between;
  67. align-items: center;
  68. padding: 2rpx;
  69. color: #aaaaaa;
  70. .status {
  71. display: inline-block;
  72. padding: 4rpx 10rpx;
  73. border-radius: 18rpx;
  74. &.normal {
  75. background-color: $page-bg;
  76. }
  77. &.text-danger {
  78. background-color: rgba($color: $uni-color-order-error, $alpha: 0.1);
  79. }
  80. &.text-primary {
  81. background-color: rgba($color: $j-primary-green, $alpha: 0.1);
  82. }
  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>