Commit 5c68d5c2 by linjinhong

修改打印面单按钮功能

parent 7d9480ac
...@@ -950,6 +950,7 @@ import useLodop, { LODOPObject } from '@/utils/hooks/useLodop' ...@@ -950,6 +950,7 @@ import useLodop, { LODOPObject } from '@/utils/hooks/useLodop'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import rightMenu from '../pod/rightMenu.vue' import rightMenu from '../pod/rightMenu.vue'
import ResultInfo from './components/ResultInfo.vue' import ResultInfo from './components/ResultInfo.vue'
import { isArray, isString } from '@/utils/validate'
declare global { declare global {
interface Window { interface Window {
ActiveXObject: { ActiveXObject: {
...@@ -1557,14 +1558,18 @@ const getOrderByIdApi = async (type: string) => { ...@@ -1557,14 +1558,18 @@ const getOrderByIdApi = async (type: string) => {
type: 'warning', type: 'warning',
}) })
const ids = selection.value.map((el) => el.id) const ids = selection.value.map((el) => el.id)
// console.log(Fn)
if (Fn) { if (Fn) {
const res = await Fn(ids) const res = await Fn(ids)
console.log(res)
if (res.code === 200) { if (res.code === 200) {
resultInfo.value = res.data if (isArray(res.data)) {
resultRefs.value?.showDialog(type) resultInfo.value = res.data
} else if (res.code === 205) { resultRefs.value?.showDialog(type)
window.open(filePath + res.message) } else if (isString(res.data)) {
window.open(filePath + res.data)
}
} else { } else {
ElMessage.error(res.message) ElMessage.error(res.message)
} }
......
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