|
|
@ -725,7 +725,7 @@
|
|
|
|
<!-- 打印弹窗 start -->
|
|
|
|
<!-- 打印弹窗 start -->
|
|
|
|
<a-modal
|
|
|
|
<a-modal
|
|
|
|
:zIndex="1005"
|
|
|
|
:zIndex="1005"
|
|
|
|
width="50vw"
|
|
|
|
width="35vw"
|
|
|
|
:maskClosable="false"
|
|
|
|
:maskClosable="false"
|
|
|
|
v-model:visible="PrintModalVisible"
|
|
|
|
v-model:visible="PrintModalVisible"
|
|
|
|
title="打印"
|
|
|
|
title="打印"
|
|
|
@ -738,19 +738,28 @@
|
|
|
|
<TableAction
|
|
|
|
<TableAction
|
|
|
|
:actions="[
|
|
|
|
:actions="[
|
|
|
|
{
|
|
|
|
{
|
|
|
|
icon: 'clarity:note-edit-line',
|
|
|
|
icon: 'ant-design:file-pdf-outlined',
|
|
|
|
tooltip: 'pdf',
|
|
|
|
tooltip: 'pdf',
|
|
|
|
onClick: FnCilckTemplateType.bind(null, record),
|
|
|
|
onClick: FnCilckTemplateType.bind(null, {
|
|
|
|
|
|
|
|
templateId: record.id,
|
|
|
|
|
|
|
|
printType: 1,
|
|
|
|
|
|
|
|
}),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
icon: 'clarity:note-edit-line',
|
|
|
|
icon: 'ant-design:file-excel-outlined',
|
|
|
|
tooltip: 'xlsx',
|
|
|
|
tooltip: 'excel',
|
|
|
|
onClick: FnCilckTemplateType.bind(null, record),
|
|
|
|
onClick: FnCilckTemplateType.bind(null, {
|
|
|
|
|
|
|
|
templateId: record.id,
|
|
|
|
|
|
|
|
printType: 2,
|
|
|
|
|
|
|
|
}),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
icon: 'clarity:note-edit-line',
|
|
|
|
icon: 'ant-design:file-word-outlined',
|
|
|
|
tooltip: 'docx',
|
|
|
|
tooltip: 'word',
|
|
|
|
onClick: FnCilckTemplateType.bind(null, record),
|
|
|
|
onClick: FnCilckTemplateType.bind(null, {
|
|
|
|
|
|
|
|
templateId: record.id,
|
|
|
|
|
|
|
|
printType: 3,
|
|
|
|
|
|
|
|
}),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
]"
|
|
|
|
]"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
@ -978,7 +987,6 @@
|
|
|
|
handleSearchInfoFn: () => {
|
|
|
|
handleSearchInfoFn: () => {
|
|
|
|
let Arr: any = []
|
|
|
|
let Arr: any = []
|
|
|
|
var data = getForm().getFieldsValue()
|
|
|
|
var data = getForm().getFieldsValue()
|
|
|
|
console.log(data)
|
|
|
|
|
|
|
|
if (data.templateName == '') {
|
|
|
|
if (data.templateName == '') {
|
|
|
|
GetPrintData()
|
|
|
|
GetPrintData()
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -989,13 +997,13 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
console.log(Arr)
|
|
|
|
|
|
|
|
dataSource.value = Arr
|
|
|
|
dataSource.value = Arr
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
maxHeight: 400,
|
|
|
|
columns,
|
|
|
|
columns,
|
|
|
|
formConfig: {
|
|
|
|
formConfig: {
|
|
|
|
labelWidth: 120,
|
|
|
|
labelWidth: 100,
|
|
|
|
schemas: searchFormSchema,
|
|
|
|
schemas: searchFormSchema,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 空值分页
|
|
|
|
// 空值分页
|
|
|
@ -1030,12 +1038,11 @@
|
|
|
|
dataSource.value = [...res.data]
|
|
|
|
dataSource.value = [...res.data]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 打印方法
|
|
|
|
// 打印方法
|
|
|
|
function FnCilckTemplateType(templateId) {
|
|
|
|
function FnCilckTemplateType({ templateId, printType }) {
|
|
|
|
console.log(templateId)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
notification.success({ message: '搜索文件中...', duration: 3 })
|
|
|
|
notification.success({ message: '搜索文件中...', duration: 3 })
|
|
|
|
GetOpenJsonPrintInfo({
|
|
|
|
GetOpenJsonPrintInfo({
|
|
|
|
templateId,
|
|
|
|
templateId,
|
|
|
|
|
|
|
|
printType,
|
|
|
|
jsonDataStr:
|
|
|
|
jsonDataStr:
|
|
|
|
'{"GID":"52fc4ecf-5c88-49a8-aa1f-08da84ccc2d3","BILLTYPE":false,"TRUCKNO":"鲁A789","BoxWeigth":10540,"BoxCode":"A124","BoxCode2":null,"ISTwoBox":false,"CORPID":null,"CreateDate":"2023-12-22T09:55:43.0332931+08:00","CreateID":null,"Creator":null,"TURNOVERDATE":"2023-12-22T09:55:43.0333166+08:00","Modifier":null,"ModifyDate":null,"ModifyID":null,"REMARK":null}',
|
|
|
|
'{"GID":"52fc4ecf-5c88-49a8-aa1f-08da84ccc2d3","BILLTYPE":false,"TRUCKNO":"鲁A789","BoxWeigth":10540,"BoxCode":"A124","BoxCode2":null,"ISTwoBox":false,"CORPID":null,"CreateDate":"2023-12-22T09:55:43.0332931+08:00","CreateID":null,"Creator":null,"TURNOVERDATE":"2023-12-22T09:55:43.0333166+08:00","Modifier":null,"ModifyDate":null,"ModifyID":null,"REMARK":null}',
|
|
|
|
})
|
|
|
|
})
|
|
|
@ -1043,40 +1050,43 @@
|
|
|
|
if (!res.succeeded) {
|
|
|
|
if (!res.succeeded) {
|
|
|
|
notification.error({ message: res.message, duration: 3 })
|
|
|
|
notification.error({ message: res.message, duration: 3 })
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
// 1.pdf; 2.xlsx; 3.doc
|
|
|
|
// // 1.pdf; 2.excel; 3.word
|
|
|
|
let base64ToBlob = (code) => {
|
|
|
|
// let base64ToBlob = (code) => {
|
|
|
|
code = code.replace(/[\n\r]/g, '') // 检查base64字符串是否符合base64编码
|
|
|
|
// code = code.replace(/[\n\r]/g, '') // 检查base64字符串是否符合base64编码
|
|
|
|
// atob() 方法用于解码使用 base-64 编码的字符串。
|
|
|
|
// // atob() 方法用于解码使用 base-64 编码的字符串。
|
|
|
|
const raw = window.atob(code)
|
|
|
|
// const raw = window.atob(code)
|
|
|
|
const rawLength = raw.length
|
|
|
|
// const rawLength = raw.length
|
|
|
|
const uInt8Array = new Uint8Array(rawLength)
|
|
|
|
// const uInt8Array = new Uint8Array(rawLength)
|
|
|
|
for (let i = 0; i < rawLength; ++i) {
|
|
|
|
// for (let i = 0; i < rawLength; ++i) {
|
|
|
|
// 将解码后的逐个字符转换成Unicode序号,放入Unit8Array数组
|
|
|
|
// // 将解码后的逐个字符转换成Unicode序号,放入Unit8Array数组
|
|
|
|
uInt8Array[i] = raw.charCodeAt(i)
|
|
|
|
// uInt8Array[i] = raw.charCodeAt(i)
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
// 通过Blob将Uint8Array数组转换成pdf类型的文件对象
|
|
|
|
// // 通过Blob将Uint8Array数组转换成pdf类型的文件对象
|
|
|
|
let type = ''
|
|
|
|
// let type = ''
|
|
|
|
switch (res.data.printType) {
|
|
|
|
// switch (res.data.printType) {
|
|
|
|
case '2':
|
|
|
|
// case '2':
|
|
|
|
type = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
|
|
|
// type = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
|
|
|
break
|
|
|
|
// break
|
|
|
|
case '3':
|
|
|
|
// case '3':
|
|
|
|
type = 'application/msword'
|
|
|
|
// type = 'application/msword'
|
|
|
|
break
|
|
|
|
// break
|
|
|
|
default:
|
|
|
|
// default:
|
|
|
|
type = 'application/pdf'
|
|
|
|
// type = 'application/pdf'
|
|
|
|
break
|
|
|
|
// break
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
return new Blob([uInt8Array], { type })
|
|
|
|
// return new Blob([uInt8Array], { type })
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
const blob = base64ToBlob(res.data.printData)
|
|
|
|
// const blob = base64ToBlob(res.data.printData)
|
|
|
|
if (window.navigator && window.navigator.msSaveOrOpenBlob) {
|
|
|
|
// ''
|
|
|
|
window.navigator.msSaveOrOpenBlob(blob)
|
|
|
|
// if (window.navigator && window.navigator.msSaveOrOpenBlob) {
|
|
|
|
} else {
|
|
|
|
// window.navigator.msSaveOrOpenBlob(blob)
|
|
|
|
const fileURL = URL.createObjectURL(blob)
|
|
|
|
// } else {
|
|
|
|
window.open(fileURL) //打开ppf文件
|
|
|
|
// const fileURL = URL.createObjectURL(blob)
|
|
|
|
}
|
|
|
|
// window.open(fileURL) //打开ppf文件
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
let fileURL = `http://60.209.125.238:3009/PrintTempFile/${res.data}`
|
|
|
|
|
|
|
|
window.open(fileURL)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.catch((err) => {
|
|
|
|
.catch((err) => {
|
|
|
@ -1144,13 +1154,11 @@
|
|
|
|
// getYardlist()
|
|
|
|
// getYardlist()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (type === 'initCabin') {
|
|
|
|
if (type === 'initCabin') {
|
|
|
|
console.log('放舱')
|
|
|
|
|
|
|
|
getLetterYard()
|
|
|
|
getLetterYard()
|
|
|
|
// BookingOrderPrintTemplateWithHistoryList({
|
|
|
|
// BookingOrderPrintTemplateWithHistoryList({
|
|
|
|
// cateCode: 'fangcang',
|
|
|
|
// cateCode: 'fangcang',
|
|
|
|
// printType: 10,
|
|
|
|
// printType: 10,
|
|
|
|
// }).then((res) => {
|
|
|
|
// }).then((res) => {
|
|
|
|
// console.log(res.data)
|
|
|
|
|
|
|
|
// initCabinSendData.value = res.data
|
|
|
|
// initCabinSendData.value = res.data
|
|
|
|
// })
|
|
|
|
// })
|
|
|
|
} else if (type === 'ladingBill') {
|
|
|
|
} else if (type === 'ladingBill') {
|
|
|
@ -1288,8 +1296,6 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 订阅运踪
|
|
|
|
// 订阅运踪
|
|
|
|
function traceSend() {
|
|
|
|
function traceSend() {
|
|
|
|
console.log(props.details.yard, props.details.yardId, traceValue.value.includes('1'))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!traceValue.value) {
|
|
|
|
if (!traceValue.value) {
|
|
|
|
notification.error({ message: '请选择订阅内容', duration: 3 })
|
|
|
|
notification.error({ message: '请选择订阅内容', duration: 3 })
|
|
|
|
return false
|
|
|
|
return false
|
|
|
@ -1543,7 +1549,6 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function FnGoSendCar() {
|
|
|
|
function FnGoSendCar() {
|
|
|
|
BookingTruckGetTruckListByBooking({ bookingId: id.value }).then((res) => {
|
|
|
|
BookingTruckGetTruckListByBooking({ bookingId: id.value }).then((res) => {
|
|
|
|
console.log(res)
|
|
|
|
|
|
|
|
router.push({
|
|
|
|
router.push({
|
|
|
|
name: 'SendCarAdd',
|
|
|
|
name: 'SendCarAdd',
|
|
|
|
query: {
|
|
|
|
query: {
|
|
|
@ -1554,7 +1559,6 @@
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function FnGoExpress() {
|
|
|
|
function FnGoExpress() {
|
|
|
|
console.log(id.value)
|
|
|
|
|
|
|
|
router.push({
|
|
|
|
router.push({
|
|
|
|
name: 'ExpressModuleDetails',
|
|
|
|
name: 'ExpressModuleDetails',
|
|
|
|
query: {
|
|
|
|
query: {
|
|
|
|