order-query.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <template>
  2. <view class="container">
  3. <view class="header">
  4. <view class="flex-d">
  5. <text>订单编号: {{ orderNumber }}</text>
  6. <text class="mt-16">库位: {{ location }}</text>
  7. </view>
  8. <view class="status">
  9. <text>已出库</text>
  10. </view>
  11. </view>
  12. <view style="background-color: #ffffff" class="pad-5 mt-20">
  13. <u-tabs :list="list1" v-model="activeTab" :itemStyle="{height:'44px',width:'48%'}"
  14. @change="handleTabChange"></u-tabs>
  15. </view>
  16. <view v-if="activeTab === 0" class="product-details">
  17. <bad-out-card v-for="(item, index) in products" :key="index" :item="item" />
  18. </view>
  19. <view v-else class="operation-logs mt-20">
  20. <view v-for="(log, index) in operationLogs" :key="index" class="log-item">
  21. <text>{{ log.date }}</text>
  22. <text>{{ log.user }}</text>
  23. <text>{{ log.action }}</text>
  24. </view>
  25. </view>
  26. <!-- 底部扫码输入框 -->
  27. <view class="fixed-bottom pad-20" style="background: #ffffff;">
  28. <u-search placeholder="请输入快递单号/订单编号" v-model="searchValue" @confirm="onSearch" :show-action="false"
  29. custom-style="margin-right:10px"></u-search>
  30. <u-icon name="scan" size="28" color="#19be6b" @click="openScan"></u-icon>
  31. </view>
  32. </view>
  33. </template>
  34. <script setup>
  35. import {
  36. reactive,
  37. ref
  38. } from 'vue'
  39. import BadOutCard from './components/BadOutCard.vue'
  40. const list1 = reactive([{
  41. name: '商品明细'
  42. }, {
  43. name: "操作记录"
  44. }])
  45. const orderNumber = '4654114'
  46. const location = 'K01-01-1A'
  47. const activeTab = ref(0)
  48. const searchValue = ref('')
  49. const products = ref([{
  50. image: 'https://img20.360buyimg.com/da/jfs/t1/141592/25/8861/261559/5f68d8c1E33ed78ab/698ad655bfcfbaed.png',
  51. title: '公文写作教程',
  52. isbn: '978704051555',
  53. price: 49.5,
  54. discount: 0.85,
  55. quantity: 5,
  56. set: '不是',
  57. estimate: 4.11,
  58. review: 0,
  59. good: 0,
  60. average: 0,
  61. bad: 1,
  62. reason: '明显泛黄水印/发霉/明显异味'
  63. },
  64. {
  65. image: 'https://img20.360buyimg.com/da/jfs/t1/141592/25/8861/261559/5f68d8c1E33ed78ab/698ad655bfcfbaed.png',
  66. title: '公文写作教程',
  67. isbn: '978704051555',
  68. price: 49.5,
  69. discount: 0.85,
  70. quantity: 5,
  71. set: '不是',
  72. estimate: 4.11,
  73. review: 0,
  74. good: 0,
  75. average: 0,
  76. bad: 1,
  77. reason: '明显泛黄水印/发霉/明显异味'
  78. }
  79. ])
  80. const operationLogs = ref([
  81. // Example log data
  82. {
  83. date: '2024-01-12 14:18:01',
  84. user: '张张张',
  85. action: '提交出库'
  86. },
  87. {
  88. date: '2024-01-12 14:18:01',
  89. user: '张张张',
  90. action: '提交入库'
  91. }
  92. ])
  93. function handleTabChange(tab) {
  94. activeTab.value = tab.index
  95. }
  96. const onSearch = () => {
  97. // Implement search logic here
  98. }
  99. function openScan() {
  100. }
  101. </script>
  102. <style lang="scss" scoped>
  103. .header {
  104. display: flex;
  105. justify-content: space-between;
  106. padding: 20rpx 30rpx;
  107. background-color: #ffffff;
  108. }
  109. .status {
  110. color: green;
  111. }
  112. .log-item {
  113. display: flex;
  114. justify-content: space-between;
  115. padding: 20rpx 30rpx;
  116. border-bottom: 1px solid #e0e0e0;
  117. }
  118. </style>