Commit 27425159 by wusiyi

fix: 快捷生产提示bug修复 #1002069

parent a3972075
...@@ -643,15 +643,15 @@ watch( ...@@ -643,15 +643,15 @@ watch(
if (newVal) { if (newVal) {
const history = localStorage.getItem(props.historyStorageKey) const history = localStorage.getItem(props.historyStorageKey)
historyData.value = history ? JSON.parse(history) : [] historyData.value = history ? JSON.parse(history) : []
// 防止消息提示数量不全
const len = historyData.value const historyList = [...historyData.value]
if ( if (
len.length > 0 && historyList.length > 0 &&
['fastProduction', 'fastReceipt', 'productionScan'].includes( ['fastProduction', 'fastReceipt', 'productionScan'].includes(
props.fastKey, props.fastKey,
) )
) { ) {
confirmQuery(len, 0) confirmQuery(historyList, 0)
} }
placeholderText.value = props.trackingPlaceholder placeholderText.value = props.trackingPlaceholder
...@@ -844,16 +844,15 @@ const setData = async ( ...@@ -844,16 +844,15 @@ const setData = async (
} }
playAudio('weight_success') playAudio('weight_success')
if (trigger === 'auto') { // if (trigger === 'auto') {
// new 快捷生产:扫码后直接将订单流转至生产中
localStorage.setItem(props.historyStorageKey, JSON.stringify([])) // } else {
} else { // detail.value = {
detail.value = { // id: -1,
id: -1, // podJomallOrderCnId: -1,
podJomallOrderCnId: -1, // imgList: [] as cardImages[],
imgList: [] as cardImages[], // }
} // }
}
TrackingNumber.value = '' TrackingNumber.value = ''
isDownloadImage.value = false isDownloadImage.value = false
trackingNumberRef.value && trackingNumberRef.value.focus() trackingNumberRef.value && trackingNumberRef.value.focus()
......
...@@ -1158,7 +1158,7 @@ ...@@ -1158,7 +1158,7 @@
pending-order-label="操作单号" pending-order-label="操作单号"
please-scan-tip="请扫码操作单号" please-scan-tip="请扫码操作单号"
search-input-audio-tip="请录入操作单号" search-input-audio-tip="请录入操作单号"
history-storage-key="historyFactoryOrderNewData" :history-storage-key="fastHistoryStorageKey"
tracking-placeholder="扫描枪输入操作单号" tracking-placeholder="扫描枪输入操作单号"
:query-api="getOperationByNo" :query-api="getOperationByNo"
:complete-api="completeOperationById" :complete-api="completeOperationById"
...@@ -2661,6 +2661,11 @@ const updateCustomsDialogVisible = ref(false) ...@@ -2661,6 +2661,11 @@ const updateCustomsDialogVisible = ref(false)
const weightDialogRef = ref() const weightDialogRef = ref()
const detailVisible = ref(false) const detailVisible = ref(false)
const fastKey = ref('') const fastKey = ref('')
const fastHistoryStorageKey = computed(() =>
fastKey.value === 'qualityScan'
? 'historyFactoryOrderNewQualityData'
: 'historyFactoryOrderNewData',
)
const detailData = ref<Record<string, unknown>>({}) const detailData = ref<Record<string, unknown>>({})
const { ensureSelection, executeBatchAction } = useOrderBatchActions({ const { ensureSelection, executeBatchAction } = useOrderBatchActions({
getIds: getSelectedIds, getIds: getSelectedIds,
......
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