Commit 6d72add2 by wusiyi

fix: 取消缓存自动完成上一单状态

parent 4bfa131e
......@@ -556,22 +556,6 @@ const props = withDefaults(
)
const emit = defineEmits(['update:detailVisible', 'close', 'onSuccess'])
const AUTO_SURE_CACHE_KEYS: Record<string, string> = {
qualityScan: 'qualityScanAutoSure',
productionScan: 'productionScanAutoSure',
}
const getAutoSureCacheKey = () => AUTO_SURE_CACHE_KEYS[props.fastKey] || ''
// 获取自动完成上一单勾选缓存
const getCachedAutoSure = (fallback: boolean) => {
const key = getAutoSureCacheKey()
if (!key) return fallback
const cached = localStorage.getItem(key)
if (cached === null) return fallback
return cached === 'true'
}
// 缓存自动完成上一单勾选
watch(isAutoSure, (val) => {
const key = getAutoSureCacheKey()
......@@ -685,7 +669,7 @@ watch(
trackingNumberRef.value && trackingNumberRef.value.focus()
TrackingNumber.value = ''
isAutoSure.value = getCachedAutoSure(props.defaultAutoSure)
isAutoSure.value = true
sendNum.value = 0
if (props.fastKey === 'qualityScan') {
initPrintDevice()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment