diff --git a/src/pages-erp/purchase-in/scan-in/index.vue b/src/pages-erp/purchase-in/scan-in/index.vue index 459a7c8..04e0827 100644 --- a/src/pages-erp/purchase-in/scan-in/index.vue +++ b/src/pages-erp/purchase-in/scan-in/index.vue @@ -22,29 +22,23 @@ - + 1 扫库位 - + 2 扫产品 - - - 3 - 确认 - 请扫描库位条码 - 请扫描产品条码 - 扫码完成,请确认入库 + 产品已入库,请继续扫码 @@ -85,11 +79,11 @@ - + - - - - - - - - @@ -218,7 +192,7 @@ export interface ScanRecord { operatorName?: string } -type Step = 'idle' | 'location_scanned' | 'product_scanned' +type Step = 'idle' | 'scanned' /** 页面参数:id=入库单ID, no=入库单号 */ const props = defineProps<{ @@ -327,11 +301,11 @@ function handleLocationBlur() { } } -/** 产品输入框失焦处理 - 如果当前步骤是 location_scanned,自动重新聚焦 */ +/** 产品输入框失焦处理 - 如果当前步骤是 scanned,自动重新聚焦 */ function handleProductBlur() { - if (step.value === 'location_scanned' && !scanLoading.value) { + if (step.value === 'scanned' && !scanLoading.value) { setTimeout(() => { - if (step.value === 'location_scanned') { + if (step.value === 'scanned') { focusProductInput() } }, 100) @@ -376,7 +350,7 @@ async function handleLocationScan() { } locationCode.value = code - step.value = 'location_scanned' + step.value = 'scanned' productBarCode.value = '' productPreview.value = null batchNo.value = '' @@ -431,8 +405,10 @@ async function handleProductScan() { } productBarCode.value = code - step.value = 'product_scanned' + step.value = 'scanned' clearFeedback() + // 自动确认入库 + nextTick(() => handleConfirm()) } finally { scanLoading.value = false } @@ -878,23 +854,6 @@ function clearFeedback() { } } -// 确认按钮 -.scan-confirm-btn { - height: 96rpx; - line-height: 96rpx; - border-radius: 16rpx; - background: #1677ff; - color: #fff; - font-size: 32rpx; - font-weight: 700; - margin-top: 8rpx; - - &[disabled] { - background: #d9d9d9; - color: #fff; - } -} - // 底部栏 .scan-footer { position: sticky; diff --git a/src/pages-erp/sale-out/detail/index.vue b/src/pages-erp/sale-out/detail/index.vue index 3999026..82ac2e4 100644 --- a/src/pages-erp/sale-out/detail/index.vue +++ b/src/pages-erp/sale-out/detail/index.vue @@ -1,57 +1,554 @@ diff --git a/src/pages-erp/sale-out/form/index.vue b/src/pages-erp/sale-out/form/index.vue index f89a604..2863e55 100644 --- a/src/pages-erp/sale-out/form/index.vue +++ b/src/pages-erp/sale-out/form/index.vue @@ -1,25 +1,706 @@ -