lijingjia 6 months ago
commit 8c9b303c3f

@ -1,25 +1,23 @@
<template>
<div class="top">
<div class="name"
><span
@click="handleOpen(2)"
style="cursor: pointer"
class="copy-btn iconfont icon-bianji"
></span
>{{ props.label }}</div
>
<div class="name">
<span @click="handleOpen(2)" style="cursor: pointer" class="copy-btn iconfont icon-bianji">
</span>
{{ props.label }}
</div>
<selectView
type="Id"
ref="consigneenameInput"
:defaultVal="Id"
searchApi="GetConsigneeClientList"
:showLabel="['title']"
:searchApi="RsearchApi()"
showCode="id"
:showLabel="['shortName']"
@change="getSelectViewRes"
style="flex: 1"
></selectView>
<a-button class="save-btn" type="link" size="small" icon="save" @click="saveModel('Content')"
>保存</a-button
>
<a-button class="save-btn" type="link" size="small" icon="save" @click="saveModel('Content')">
保存
</a-button>
<div class="right">
<span class="btn-circle" @click="spliceMore('Content')" :style="{ fontSize: '14px' }">*</span>
<span class="btn" @click="changeCode(35, 'Content')">35</span>
@ -61,6 +59,8 @@
() => props.details,
(nval, oval) => {
if (nval) {
console.log(nval[`${props.field}Id`], 'AAAAAAAAAAAAA')
Content.value = nval[`${props.field}Content`]
Id.value = nval[`${props.field}Id`]
}
@ -92,12 +92,27 @@
modelTitle.value = '通知人代码'
}
}
function RsearchApi() {
let RData = ''
switch (props.field) {
case 'shipper':
RData = 'GetShipperClientList'
break
case 'consignee':
RData = 'GetConsigneeClientList'
break
case 'notifyParty':
RData = 'GetNotifyPartyClientList'
break
default:
break
}
return RData
}
function getSelectViewRes({ type, res }) {
emit('Change', { type, res })
}
function getTextareaChange(e) {
console.log(e, 'getTextareaChange')
Content.value = e.value
getSelectViewRes({ type: 'Content', res: e.value })
}

File diff suppressed because it is too large Load Diff

@ -133,9 +133,8 @@
watch(
() => props.defaultVal,
(nval) => {
if (['sourceDetailId'].includes(props.type) && nval) {
console.log(nval, props.details, 123123132)
FnInit(['sourceDetailId'])
if (['Id'].includes(props.type) && nval) {
FnInit(['Id'])
}
if (inEdit.value) {
@ -175,8 +174,9 @@
open.value = false
}
}
if (inInit) {
if (inInit.value) {
FnInit([
'Id',
'sourceId',
'operatorId',
'saleId',
@ -238,18 +238,13 @@
}
}
function getSelectFirst(e, canClick = true) {
console.log(e, canClick, RefselectView.value, 'getSelectFirst')
// if (canClick) {
// RefselectView.value.$refs.vcSelect.$refs.arrow.click()
// } else {
// RefselectView.value.focus()
// }
RefselectView.value.focus()
console.log(open.value)
open.value = true
console.log(open.value)
if (
[
// ---------------basicInfo----------------
@ -320,13 +315,9 @@
'shippercountry',
].includes(props.type)
) {
console.log(props.type)
// if (props.type === 'blType') {
// selectList.value = emnuData(props.type)
// inLoading.value = false
// console.log(selectList.value)
// return false
// }
// if (props.type === 'yard') {
@ -698,12 +689,6 @@
return GetCustomerServiceList
case 'GetDeptList':
return GetDeptList
case 'GetShipperClientList':
return GetShipperClientList
case 'GetConsigneeClientList':
return GetConsigneeClientList
case 'GetNotifyPartyClientList':
return GetNotifyPartyClientList
case 'GetCarrierlist':
return GetCarrierlist
case 'GetAgentClientList':
@ -732,11 +717,15 @@
return GetPackageSelectList
case 'GetEnterpriseClientList':
return GetEnterpriseClientList
case 'GetShipperClientList':
return GetShipperClientList
case 'GetConsigneeClientList':
return GetConsigneeClientList
case 'GetNotifyPartyClientList':
return GetNotifyPartyClientList
}
}
function handleChange(op) {
console.log(op)
let Dop = op[0]
inEdit.value = true
setTimeout(() => {
@ -751,10 +740,10 @@
setTimeout(() => {
const num = Dop.key
value.value = selectList.value[num][props.showLabel[0]]
let res = { ...selectList.value[num] }
emit('change', {
type: props.type,
res: selectList.value[num],
res,
})
}, 100)
}

@ -812,6 +812,8 @@
})
ctnInfo.push(e)
})
console.log(RefmailingInfo.value.getFieldsValueL())
let _data = {
...initDetail,
...RefbasicInfo.value.getFieldsValue(),

@ -725,7 +725,7 @@
<!-- 打印弹窗 start -->
<a-modal
:zIndex="1005"
width="50vw"
width="35vw"
:maskClosable="false"
v-model:visible="PrintModalVisible"
title="打印"
@ -738,19 +738,28 @@
<TableAction
:actions="[
{
icon: 'clarity:note-edit-line',
icon: 'ant-design:file-pdf-outlined',
tooltip: 'pdf',
onClick: FnCilckTemplateType.bind(null, record),
onClick: FnCilckTemplateType.bind(null, {
templateId: record.id,
printType: 1,
}),
},
{
icon: 'clarity:note-edit-line',
tooltip: 'xlsx',
onClick: FnCilckTemplateType.bind(null, record),
icon: 'ant-design:file-excel-outlined',
tooltip: 'excel',
onClick: FnCilckTemplateType.bind(null, {
templateId: record.id,
printType: 2,
}),
},
{
icon: 'clarity:note-edit-line',
tooltip: 'docx',
onClick: FnCilckTemplateType.bind(null, record),
icon: 'ant-design:file-word-outlined',
tooltip: 'word',
onClick: FnCilckTemplateType.bind(null, {
templateId: record.id,
printType: 3,
}),
},
]"
/>
@ -978,7 +987,6 @@
handleSearchInfoFn: () => {
let Arr: any = []
var data = getForm().getFieldsValue()
console.log(data)
if (data.templateName == '') {
GetPrintData()
} else {
@ -989,13 +997,13 @@
}
})
})
console.log(Arr)
dataSource.value = Arr
}
},
maxHeight: 400,
columns,
formConfig: {
labelWidth: 120,
labelWidth: 100,
schemas: searchFormSchema,
},
//
@ -1030,12 +1038,11 @@
dataSource.value = [...res.data]
}
//
function FnCilckTemplateType(templateId) {
console.log(templateId)
function FnCilckTemplateType({ templateId, printType }) {
notification.success({ message: '搜索文件中...', duration: 3 })
GetOpenJsonPrintInfo({
templateId,
printType,
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}',
})
@ -1043,40 +1050,43 @@
if (!res.succeeded) {
notification.error({ message: res.message, duration: 3 })
} else {
// 1.pdf; 2.xlsx; 3.doc
let base64ToBlob = (code) => {
code = code.replace(/[\n\r]/g, '') // base64base64
// atob() 使 base-64
const raw = window.atob(code)
const rawLength = raw.length
const uInt8Array = new Uint8Array(rawLength)
for (let i = 0; i < rawLength; ++i) {
// UnicodeUnit8Array
uInt8Array[i] = raw.charCodeAt(i)
}
// BlobUint8Arraypdf
let type = ''
switch (res.data.printType) {
case '2':
type = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
break
case '3':
type = 'application/msword'
break
default:
type = 'application/pdf'
break
}
return new Blob([uInt8Array], { type })
}
// // 1.pdf; 2.excel; 3.word
// let base64ToBlob = (code) => {
// code = code.replace(/[\n\r]/g, '') // base64base64
// // atob() 使 base-64
// const raw = window.atob(code)
// const rawLength = raw.length
// const uInt8Array = new Uint8Array(rawLength)
// for (let i = 0; i < rawLength; ++i) {
// // UnicodeUnit8Array
// uInt8Array[i] = raw.charCodeAt(i)
// }
// // BlobUint8Arraypdf
// let type = ''
// switch (res.data.printType) {
// case '2':
// type = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
// break
// case '3':
// type = 'application/msword'
// break
// default:
// type = 'application/pdf'
// break
// }
// return new Blob([uInt8Array], { type })
// }
const blob = base64ToBlob(res.data.printData)
if (window.navigator && window.navigator.msSaveOrOpenBlob) {
window.navigator.msSaveOrOpenBlob(blob)
} else {
const fileURL = URL.createObjectURL(blob)
window.open(fileURL) //ppf
}
// const blob = base64ToBlob(res.data.printData)
// ''
// if (window.navigator && window.navigator.msSaveOrOpenBlob) {
// window.navigator.msSaveOrOpenBlob(blob)
// } else {
// 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) => {
@ -1144,13 +1154,11 @@
// getYardlist()
}
if (type === 'initCabin') {
console.log('放舱')
getLetterYard()
// BookingOrderPrintTemplateWithHistoryList({
// cateCode: 'fangcang',
// printType: 10,
// }).then((res) => {
// console.log(res.data)
// initCabinSendData.value = res.data
// })
} else if (type === 'ladingBill') {
@ -1288,8 +1296,6 @@
}
//
function traceSend() {
console.log(props.details.yard, props.details.yardId, traceValue.value.includes('1'))
if (!traceValue.value) {
notification.error({ message: '请选择订阅内容', duration: 3 })
return false
@ -1543,7 +1549,6 @@
}
function FnGoSendCar() {
BookingTruckGetTruckListByBooking({ bookingId: id.value }).then((res) => {
console.log(res)
router.push({
name: 'SendCarAdd',
query: {
@ -1554,7 +1559,6 @@
})
}
function FnGoExpress() {
console.log(id.value)
router.push({
name: 'ExpressModuleDetails',
query: {

Loading…
Cancel
Save