speedy-check.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <template>
  2. <view class="container">
  3. <u-navbar title="快速盘点" :border="false" fixed safe-area-inset-top>
  4. <template #left>
  5. <u-icon name="arrow-left" color="#333333" size="20" @click="goBack"></u-icon>
  6. </template>
  7. <template #right>
  8. <u-text type="primary" text="提交" @click="onSubmit"></u-text>
  9. </template>
  10. </u-navbar>
  11. <!-- 盘点信息选择区域 -->
  12. <view class="select-area" style="margin-top: 44px;">
  13. <u-cell-group>
  14. <u-cell title="盘点方式" :value="checkMethod" @click="showCheckMethodPicker = true" isLink />
  15. <u-cell title="目标库位" :value="location" @click="handleLocationSelect" isLink />
  16. </u-cell-group>
  17. </view>
  18. <!-- 盘点方式选择器 -->
  19. <u-picker :show="showCheckMethodPicker" :columns="[checkMethodOptions]" @confirm="onCheckMethodConfirm"
  20. @cancel="showCheckMethodPicker = false" />
  21. <!-- 订单列表 -->
  22. <view class="product-details">
  23. <LocationOrderItem v-for="(item, index) in products" :key="index" :item="item" />
  24. </view>
  25. <view class="add-btn" @click="handleAdd">
  26. <u-icon name="plus-circle" size="40" color="#19be6b" @click="openScan"></u-icon>
  27. </view>
  28. <!-- 底部扫码输入框 -->
  29. <view class="fixed-bottom pad-20" style="background: #ffffff;">
  30. <u-search placeholder="请输入快递单号/订单编号" v-model="searchValue" @confirm="onSearch" :show-action="false"
  31. custom-style="margin-right:10px"></u-search>
  32. <u-icon name="scan" size="28" color="#19be6b" @click="openScan"></u-icon>
  33. </view>
  34. </view>
  35. </template>
  36. <script setup>
  37. import {
  38. reactive,
  39. ref
  40. } from 'vue'
  41. import LocationOrderItem from './components/LocationOrderItem.vue'
  42. // 盘点方式相关
  43. const showCheckMethodPicker = ref(false)
  44. const checkMethod = ref('实际数量')
  45. const checkMethodOptions = ['实际数量', '增加数量', '减少数量']
  46. // 库位相关
  47. const location = ref('k01-01-4A')
  48. // 其他数据
  49. const searchValue = ref('')
  50. const products = ref([{
  51. orderNo: '4846464',
  52. logisticsNo: "DPK2023497491611",
  53. inspectionDate: "2024-11-14",
  54. badCount: 5,
  55. operator: '李程雪',
  56. },
  57. {
  58. orderNo: '4846464',
  59. logisticsNo: "DPK2023497491611",
  60. inspectionDate: "2024-11-14",
  61. badCount: 5,
  62. operator: '李程雪',
  63. }
  64. ])
  65. // 方法
  66. const onCheckMethodConfirm = (e) => {
  67. checkMethod.value = e.value[0]
  68. showCheckMethodPicker.value = false
  69. }
  70. const handleLocationSelect = () => {
  71. // 跳转到库位选择页面
  72. uni.navigateTo({
  73. url: '/pages/location-select/index'
  74. })
  75. }
  76. const onSearch = () => {
  77. // 实现搜索逻辑
  78. }
  79. const openScan = () => {
  80. // 实现扫描逻辑
  81. }
  82. function handleAdd(){
  83. uni.navigateTo({
  84. url:"/pages/index/wms/speedy-check-add"
  85. })
  86. }
  87. </script>
  88. <style lang="scss" scoped>
  89. .select-area {
  90. background-color: #fff;
  91. }
  92. .product-details {
  93. margin-bottom: 120rpx; // 为底部搜索框留出空间
  94. }
  95. .fixed-bottom {
  96. position: fixed;
  97. bottom: 0;
  98. left: 0;
  99. right: 0;
  100. display: flex;
  101. align-items: center;
  102. padding: 20rpx;
  103. background: #ffffff;
  104. box-shadow: 0 -2rpx 6rpx rgba(0, 0, 0, 0.1);
  105. }
  106. .add-btn{
  107. position: absolute;
  108. right: 0;
  109. bottom: 30%;
  110. z-index: 99;
  111. cursor: pointer;
  112. }
  113. </style>