10.24禅道任务

feature-JimuReport-1106-yjl
lijingjia 1 month ago
parent e41975c24f
commit 8c80e86f0d

@ -70,6 +70,7 @@
GetOpenJsonPrintInfo, GetOpenJsonPrintInfo,
GetOpenSqlPrintInfo, GetOpenSqlPrintInfo,
} from '/@/views/operation/seaexport/api/BookingLedger.js' } from '/@/views/operation/seaexport/api/BookingLedger.js'
import { GetList, GetPrintInfo } from '../CostEntry/api'
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
const { createMessage } = useMessage() const { createMessage } = useMessage()
const props = defineProps({ const props = defineProps({
@ -124,7 +125,10 @@
// (list) // (list)
const ids = ref() const ids = ref()
const printModalRef = ref('') const printModalRef = ref('')
//
const printData = ref([])
const init = (v) => { const init = (v) => {
printData.value = v
visible.value = true visible.value = true
if (v) { if (v) {
// ids // ids
@ -145,17 +149,17 @@
ConditionalList: [ ConditionalList: [
{ {
Key: 1, Key: 1,
Value: { FieldName: 'carrierId', FieldValue: props.cid, ConditionalType: 0 }, Value: { FieldName: 'carrierId', FieldValue: props.cid, ConditionalType: 0 }
}, },
{ {
Key: 1, Key: 1,
Value: { FieldName: 'carrierId', FieldValue: 0, ConditionalType: 11 }, Value: { FieldName: 'carrierId', FieldValue: 0, ConditionalType: 11 }
}, }
], ]
}, }
}, }
], ]
}, }
] ]
// if (temCodes.length) { // if (temCodes.length) {
// const ConditionalList = { // const ConditionalList = {
@ -211,6 +215,50 @@
// //
const toPrint = (item, type) => { const toPrint = (item, type) => {
//
if (item.templateCode == 'BOOKING' && !printData.value) {
const postData = {
pageCondition: {
pageIndex: 1,
pageSize: 1000,
sortConditions: [],
},
queryCondition: JSON.stringify([
{ FieldName: 'BusinessId', FieldValue: props.bookingData.id, ConditionalType: 1 },
]),
}
GetList(postData).then((res) => {
const ids = res.data.map(item => {
return item.id
})
GetPrintInfo({ businessType: 1, ids, id: props.bookingData.id }).then(res => {
const postData = {
jsonDataStr: JSON.stringify(res.data.details) || '',
printType: type,
templateId: item.id
}
loading.value = true
GetOpenJsonPrintInfo(postData)
.then((res) => {
loading.value = false
if (res.succeeded) {
let fileURL = `http://118.190.144.189:3008/printtempfile/${res.data}`
if (type == 1) {
printModalRef.value.init(fileURL, res.data)
// window.open(fileURL)
} else {
window.open(`//118.190.144.189:3008/printtempfile/${res.data}`, '_blank')
}
} else {
createMessage.error(res.message)
}
})
.catch(() => {
loading.value = false
})
})
})
} else {
if (item.isUseDataSource) { if (item.isUseDataSource) {
const userStore = useUserStore() const userStore = useUserStore()
const postData = { const postData = {
@ -270,6 +318,7 @@
}) })
} }
} }
}
defineExpose({ defineExpose({
init, init,

@ -7,7 +7,7 @@ const res: API.DataResult = await GetLanesSelectList()
if (res.succeeded) { if (res.succeeded) {
LanesSelectList = [] LanesSelectList = []
res.data.forEach((e) => { res.data.forEach((e) => {
LanesSelectList.push({ label: e.laneName, value: e.id, code: e.ediCode }) LanesSelectList.push({ label: e.laneName, value: e.id, code: e.ediCode || e.laneCode })
}) })
} }
let CountrySelectList = [] let CountrySelectList = []
@ -290,6 +290,7 @@ export const formSchema: FormSchema[] = [
}, },
onChange: (v, obj) => { onChange: (v, obj) => {
if (v && obj) { if (v && obj) {
console.log(obj)
formModel.lane = obj.label formModel.lane = obj.label
formModel.laneCode = obj.code formModel.laneCode = obj.code
} }

@ -245,13 +245,14 @@ export const basicInfoFormSchema: FormSchema[] = [
api: GetBookingContractNoList, api: GetBookingContractNoList,
params: { carrierId: formModel.carrierId }, params: { carrierId: formModel.carrierId },
labelField: 'contractName', labelField: 'contractName',
valueField: 'id', valueField: 'contractNo',
showName: 'contractNo', showName: 'contractNo',
resultField: 'data', resultField: 'data',
immediate: false, immediate: false,
mode: 'SECRET_COMBOBOX_MODE_DO_NOT_USE', mode: 'SECRET_COMBOBOX_MODE_DO_NOT_USE',
onChange: (e, obj) => { onChange: (e, obj) => {
if (e && obj) { if (e && obj) {
console.log(obj)
cno.value = obj.contractNote cno.value = obj.contractNote
} }
}, },
@ -3106,7 +3107,7 @@ export const personFormSchema: FormSchema[] = [
}, },
{ {
label: '职位', label: '职位',
field: 'duty', field: 'job',
component: 'Input', component: 'Input',
colProps: { span: 12 } colProps: { span: 12 }
}, },
@ -3205,7 +3206,7 @@ export const personColumns: BasicColumn[] = [
width: 140, width: 140,
}, },
{ {
dataIndex: 'duty', dataIndex: 'job',
title: '职位', title: '职位',
sorter: true, sorter: true,
width: 80, width: 80,

Loading…
Cancel
Save