ExceptionItem.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <template>
  2. <view class="exception-item">
  3. <!-- 订单信息 -->
  4. <view class="info-section">
  5. <view class="info-row">
  6. <text class="label">订单编号:</text>
  7. <text class="value">{{ order.orderNo }}</text>
  8. </view>
  9. <view class="info-row">
  10. <text class="label">快递单号:</text>
  11. <text class="value">{{ order.expressNo }}</text>
  12. </view>
  13. <view class="info-row">
  14. <text class="label">预估单价:</text>
  15. <text class="value">{{ order.estimatedPrice }}</text>
  16. </view>
  17. <view class="info-row">
  18. <text class="label">推送人:</text>
  19. <text class="value">{{ order.pusher }}</text>
  20. </view>
  21. <view class="info-row">
  22. <text class="label">推送时间:</text>
  23. <text class="value">{{ order.pushTime }}</text>
  24. </view>
  25. </view>
  26. <!-- 操作按钮 -->
  27. <view class="action-section">
  28. <u-button type="primary" text="查看物流" size="small" @click="handleCheckLogistics" />
  29. <approve-button @approve="() => emit('approve', order)" />
  30. <reject-button @reject="(reason) => emit('reject', { order, reason })" />
  31. </view>
  32. </view>
  33. </template>
  34. <script setup>
  35. import { ref } from 'vue';
  36. import ApproveButton from './ApproveButton.vue';
  37. import RejectButton from './RejectButton.vue';
  38. const props = defineProps({
  39. order: {
  40. type: Object,
  41. default: () => ({
  42. orderNo: '',
  43. expressNo: '',
  44. estimatedPrice: '',
  45. pusher: '',
  46. pushTime: ''
  47. })
  48. }
  49. });
  50. const emit = defineEmits(['approve', 'reject']);
  51. // 查看物流
  52. const handleCheckLogistics = () => {
  53. uni.navigateTo({
  54. url: `/pages/index/express/logistics-detail?expressNo=${props.order.expressNo}`
  55. });
  56. };
  57. </script>
  58. <style lang="scss" scoped>
  59. .exception-item {
  60. background-color: #fff;
  61. border-radius: 8px;
  62. padding: 16px;
  63. margin-bottom: 12px;
  64. }
  65. .info-section {
  66. margin-bottom: 16px;
  67. }
  68. .info-row {
  69. display: flex;
  70. margin-bottom: 8px;
  71. .label {
  72. color: #666;
  73. width: 80px;
  74. }
  75. .value {
  76. color: #333;
  77. flex: 1;
  78. }
  79. }
  80. .action-section {
  81. display: flex;
  82. justify-content: flex-end;
  83. gap: 12px;
  84. :deep(.u-button) {
  85. min-width: 80px;
  86. }
  87. }
  88. </style>