Commit 8ae09219 by qinjianhui

feat: 状态流转返回结果修改

parent ea738a7c
......@@ -1664,13 +1664,18 @@ const openResultInfoDialog = (
}[],
) => {
nextTick(() => {
resultInfo.value = data.map((item) => ({
const isSuccess = data.every((item) => item.status)
if (!isSuccess) {
resultInfo.value = data.filter((item) => !item.status).map((item) => ({
id: item.id,
status: item.status ?? false,
factoryOrderNumber: item.factoryOrderNumber ?? '',
message: item.message ?? '',
}))
resultRefs.value?.showDialog()
} else {
refreshCurrentView({ isRefreshTree: true })
}
})
}
const handleCancelOrder = () => {
......@@ -1744,8 +1749,18 @@ const handleLogisticsCommand = async (command: string) => {
const res = await api(ids)
if (res.code === 200) {
if (Array.isArray(res.data)) {
resultInfo.value = res.data as typeof resultInfo.value
const isSuccess = res.data.every((item) => item.status)
if (!isSuccess) {
resultInfo.value = res.data.filter((item) => !item.status).map((item) => ({
id: item.id,
status: item.status ?? false,
factoryOrderNumber: item.factoryOrderNumber ?? '',
message: item.message ?? '',
}))
resultRefs.value?.showDialog()
} else {
refreshCurrentView()
}
} else if (typeof res.data === 'string') {
window.open(filePath + res.data)
}
......
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