| | |
| | | |
| | | import { useVbenModal } from '@vben/common-ui'; |
| | | |
| | | import { Button, Input, InputNumber, message } from 'ant-design-vue'; |
| | | import { Button, InputNumber, message } from 'ant-design-vue'; |
| | | |
| | | import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table'; |
| | | import { scanStockTaking } from '#/api/mes/wm/stocktaking/task'; |
| | |
| | | deleteStockTakingResult, |
| | | getStockTakingResultPage, |
| | | } from '#/api/mes/wm/stocktaking/task/result'; |
| | | import TraceScanInput from '#/components/TraceScanInput.vue'; |
| | | import { $t } from '#/locales'; |
| | | |
| | | import { useResultGridColumns } from '../data'; |
| | |
| | | const scanning = ref(false); |
| | | |
| | | /** 扫码盘点 */ |
| | | async function handleScan() { |
| | | if (!scanCode.value) { |
| | | async function handleScan(raw?: string) { |
| | | const code = (raw ?? scanCode.value).trim(); |
| | | if (!code) { |
| | | message.warning('请输入追溯码/袋码/托盘码/批次号'); |
| | | return; |
| | | } |
| | | scanCode.value = code; |
| | | if (takingQuantity.value === undefined || takingQuantity.value === null) { |
| | | message.warning('请输入盘点数量'); |
| | | return; |
| | |
| | | class="mb-3 flex flex-wrap items-center gap-2 rounded-md border border-dashed border-yellow-300 bg-yellow-50 px-3 py-2" |
| | | > |
| | | <span class="font-medium text-yellow-700">PDA 扫码盘点:</span> |
| | | <Input |
| | | v-model:value="scanCode" |
| | | allow-clear |
| | | class="!w-56" |
| | | placeholder="追溯码/袋码/托盘码/批次号" |
| | | @press-enter="handleScan" |
| | | <TraceScanInput |
| | | class="!w-72" |
| | | :disabled="scanning" |
| | | placeholder="扫描追溯二维码或输入追溯码,回车识别" |
| | | @code="handleScan" |
| | | /> |
| | | <InputNumber |
| | | v-model:value="takingQuantity" |
| | |
| | | :precision="2" |
| | | class="!w-32" |
| | | placeholder="盘点数量" |
| | | @press-enter="handleScan" |
| | | @press-enter="() => handleScan()" |
| | | /> |
| | | <Button |
| | | type="primary" |
| | | :loading="scanning" |
| | | @click="handleScan" |
| | | @click="() => handleScan()" |
| | | > |
| | | 扫码盘点 |
| | | </Button> |