Commit 5c68d5c2 by linjinhong

修改打印面单按钮功能

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