Commit 3bb3ab07 by wusiyi

fix: 订单状态在“挂起、取消”的异常状态,没有在第一次查询操作单时提示抛错 #1001688

parent 4d3037f7
......@@ -350,6 +350,8 @@ export type FastProductionDetail = PodOrderRes & {
podOrderProductId?: number | null
statusName?: string | null
productMark?: string | null
pause?: 0 | 1
status?: string | null
}
const trackingNumberRef = ref()
const historyData = ref<HistoryDataItem[]>([])
......@@ -808,7 +810,18 @@ const trackCodeInput = async () => {
return ElMessage.error(props.notFoundMessage)
}
detail.value = normalizeDetail(res.data)
if (detail.value.pause || detail.value.status == 'CANCEL') {
detail.value = {
id: -1,
podJomallOrderCnId: -1,
imgList: [] as cardImages[],
}
const err = new Error(
`订单:${TrackingNumber.value}已挂起或者已取消,无法生产`,
) as Error & { data: string }
err.data = `订单:${TrackingNumber.value}已挂起或者已取消,无法生产`
throw err
}
// 扫码后限制
if (props.isLimitScan) {
if (
......
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