lijingjia 6 months ago
commit 8c9b303c3f

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

File diff suppressed because it is too large Load Diff

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

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

@ -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, '') // base64base64 // code = code.replace(/[\n\r]/g, '') // base64base64
// 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) {
// UnicodeUnit8Array // // UnicodeUnit8Array
uInt8Array[i] = raw.charCodeAt(i) // uInt8Array[i] = raw.charCodeAt(i)
} // }
// BlobUint8Arraypdf // // BlobUint8Arraypdf
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: {

Loading…
Cancel
Save