LocationOrderItem.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <template>
  2. <view class="order-item">
  3. <view class="order-header">
  4. <view class="order-info">
  5. <view class="info-row">
  6. <text class="label">订单编号:</text>
  7. <text class="value">{{ item.orderNo }}</text>
  8. </view>
  9. <view class="info-row">
  10. <text class="label">不良数量:</text>
  11. <text class="value">{{ item.badCount }}</text>
  12. </view>
  13. <view class="info-row">
  14. <text class="label">物流单号:</text>
  15. <text class="value">{{ item.logisticsNo }}</text>
  16. </view>
  17. <view class="info-row">
  18. <text class="label">验货完成日期:</text>
  19. <text class="value">{{ item.inspectionDate }}</text>
  20. </view>
  21. <view class="info-row">
  22. <text class="label">录入人:</text>
  23. <text class="value">{{ item.operator }}</text>
  24. </view>
  25. </view>
  26. <view class="check-icon" v-if="isCheck">
  27. <u-icon :name="item.checked ? 'checkmark-circle-fill' : 'checkmark-circle'"
  28. :color="item.checked ? '#19be6b' : '#c8c9cc'" size="28" @click="toggleSelect"></u-icon>
  29. </view>
  30. <navigator v-else :url="item.jumpUrl" hover-class="none" class="quick-jump">
  31. <u-icon name="arrow-rightward" color="#2979ff" size="20"></u-icon>
  32. </navigator>
  33. </view>
  34. </view>
  35. </template>
  36. <script setup>
  37. import { defineProps, defineEmits } from 'vue'
  38. const props = defineProps({
  39. item: {
  40. type: Object,
  41. required: true
  42. },
  43. isCheck: {
  44. type: Boolean,
  45. default: false
  46. }
  47. })
  48. const emit = defineEmits(['select'])
  49. const toggleSelect = () => {
  50. emit('select', props.item)
  51. }
  52. </script>
  53. <style lang="scss" scoped>
  54. .order-item {
  55. background-color: #ffffff;
  56. padding: 20rpx;
  57. border-bottom: 1px solid #eee;
  58. }
  59. .order-header {
  60. display: flex;
  61. justify-content: space-between;
  62. align-items: flex-start;
  63. }
  64. .order-info {
  65. flex: 1;
  66. }
  67. .info-row {
  68. display: flex;
  69. margin-bottom: 12rpx;
  70. font-size: 28rpx;
  71. line-height: 40rpx;
  72. &:last-child {
  73. margin-bottom: 0;
  74. }
  75. }
  76. .label {
  77. color: #666;
  78. margin-right: 16rpx;
  79. min-width: 160rpx;
  80. }
  81. .value {
  82. color: #333;
  83. flex: 1;
  84. }
  85. .check-icon {
  86. padding: 0 10rpx;
  87. }
  88. </style>