更新任务问题

szh-new
sunzehua 4 months ago
parent 86d4e4fd59
commit 49017ea2ac

@ -777,3 +777,11 @@ export function TaskAllocationGetList(parameter) {
method: 'get',
})
}
export function GetCompareResult(parameter) {
return request<DataResult>({
url: '/taskApi/TaskManageBC/GetCompareResult',
params:parameter,
method: 'get',
})
}

@ -77,6 +77,7 @@ function init() {
if (res.data.size > 150) {
pdfUrl.value = window.URL.createObjectURL(new Blob([res.data], { type: 'application/pdf;charset=utf-8' }))
}
emit('handleSuccess', pdfUrl.value)
}
pdfLoad.value = false
})

@ -1,5 +1,5 @@
<template>
<a-form :label-col="labelCol" :wrapper-col="wrapperCol" :model="form" style="font-size: 12px !important ;" >
<a-form :label-col="labelCol" :wrapper-col="wrapperCol" :model="form" style="font-size: 12px !important ;">
<div class="box">
<div class="LeftHead">
<p class="title">
@ -13,7 +13,8 @@
<a-form-item label="">
<div>提单号</div>
<span class="text"> {{ form.mblNo }}</span>
<i class="icon-fuzhi4 iconfont" @click="copyText(form.mblNo)" style="cursor: pointer;font-size: 13px;margin-left: 10px"></i>
<i class="icon-fuzhi4 iconfont" @click="copyText(form.mblNo)"
style="cursor: pointer;font-size: 13px;margin-left: 10px"></i>
</a-form-item>
</a-col>
<a-col :span="8">
@ -142,41 +143,41 @@
<div v-if="form.carriageType == 'TRANSFER_SHIP'">
<a-row>
<a-col :span="24">
<p class="title">二程</p>
</a-col>
<a-col :span="8">
<a-form-item label="">
<div>船名/航次</div>
<span class="text">{{ form.secondVessel }}/{{ form.secondVoyno }}</span>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="">
<div>ETD</div>
<span class="text"> {{ form.secondETD ? form.secondETD.substring(0, 11) : '-'
}}</span>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="">
<div>装货港</div>
<span class="text"> {{ form.transferPort1 }}</span>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="">
<div>ETA</div>
<span class="text"> {{ form.secondETA ? form.secondETA.substring(0, 11) : '-'
}}</span>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="">
<div>卸货港</div>
<span class="text"> {{ form.portDischarge }}</span>
</a-form-item>
</a-col>
<a-col :span="24">
<p class="title">二程</p>
</a-col>
<a-col :span="8">
<a-form-item label="">
<div>船名/航次</div>
<span class="text">{{ form.secondVessel }}/{{ form.secondVoyno }}</span>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="">
<div>ETD</div>
<span class="text"> {{ form.secondETD ? form.secondETD.substring(0, 11) : '-'
}}</span>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="">
<div>装货港</div>
<span class="text"> {{ form.transferPort1 }}</span>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="">
<div>ETA</div>
<span class="text"> {{ form.secondETA ? form.secondETA.substring(0, 11) : '-'
}}</span>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="">
<div>卸货港</div>
<span class="text"> {{ form.portDischarge }}</span>
</a-form-item>
</a-col>
</a-row>
</div>
</a-row>
@ -228,7 +229,25 @@
<i :class="item.icon" class="iconfont"></i>{{ item.name }}
</p>
</div>
<a-row v-if="compareResultList.length > 0">
<div
style="height: 30px;border: 1px solid red;padding: 2px 10px;color: black;font-size: 13px;width: 45%;margin-left: 7px;margin-bottom: 10px;">
<a-icon type="info-circle" theme="filled" style="font-size: 15px;color: red;margin-right: 20px;" />
<span @click="compareResultFlag = true"
style="cursor: pointer;text-decoration: underline;">订舱变更比对BC存在差异</span>
差异总数:{{ compareResultList.length }}
</div>
</a-row>
</div>
<a-modal @cancel="compareResultFlag = false" title="订舱变更比对BC差异" :visible="compareResultFlag" :footer="null">
<div style="margin: 20px 0;padding-bottom: 20px;">
<div v-for="(item, index) in compareResultList" :key="index">
<span> {{ item.fieldName }}{{ item.reqVal }}</span>
<span style="margin: 0 10px;">变更为</span>
<span v-html="item.mergeHtml"></span>
</div>
</div>
</a-modal>
</a-form>
</template>
<script lang="ts" setup>
@ -238,12 +257,17 @@ const labelCol = { span: 0 }
import { useMessage } from '../../../hooks/web/useMessage'
const { createMessage } = useMessage()
import { useRouter, useRoute } from 'vue-router'
import { GetInfoByTaskId, GetCompareResult } from '../api'
const route = useRoute()
const taskPKId = ref(route.query.taskPKId)
const props = defineProps({
title: {
type: String
}
});
const form = ref({}) as any
const compareResultList = ref([]) as any
const compareResultFlag = ref(false)
function reload() {
}
@ -272,10 +296,30 @@ function Rcolor(hexColor) {
const blue = parseInt(hex.substring(4, 6), 16) - 50
return `rgb(${red}, ${green}, ${blue})`
}
defineExpose({ init })
function init(data){
form.value = data
function getInfo(type) {
const ApiData = {
taskId: taskPKId.value
}
GetInfoByTaskId(ApiData).then(res => {
if (res.data.succ) {
form.value = res.data.ext
} else {
createMessage.error(res.data.msg)
}
})
if (type == 'Amendment') {
GetCompareResult({ taskId: taskPKId.value }).then(res => {
if (res.succeeded) {
compareResultList.value = res.data
} else {
createMessage.error(res.message)
}
})
}
}
defineExpose({ getInfo })
</script>
<style lang="less" scoped>
.LeftHead {

@ -5,7 +5,7 @@
<taskData ref="taskDataRef" title='Booking Amendment'></taskData>
</a-col>
<a-col>
<pdf ref="pdfData"></pdf>
<pdf v-show="pdfUrl" @handleSuccess="handleSuccess" style="margin-bottom: 20px;" :id="taskPKId" ref="pdfData"></pdf>
<taskButton :buttonList="['取消', '完成', '转移']" @loadingStart="loadingStart" @loadingStop="loadingStop" :id="taskPKId" ref="taskButtonRef">
</taskButton>
</a-col>
@ -17,88 +17,28 @@ import { ref, onMounted } from 'vue'
import { useRouter, useRoute } from 'vue-router'
import pdf from '../components/pdf.vue'
import taskData from '../components/taskData.vue'
import { GetInfoByTaskId,DownloadFileByBC } from '../api'
import taskButton from '../components/taskButton.vue'
import { useMessage } from '../../../hooks/web/useMessage'
const { createMessage } = useMessage()
const route = useRoute()
const router = useRouter();
const form = ref({
"pkId": "08dcab8e-3757-49bb-8082-1bb3de042459",
"taskId": "08dcab8e-374d-4a44-8093-6dc531177f01",
"busiType": "BookingConfirmation",
"bookingParty": "QINGDAO CHENGSI FREIGHT FORWARDER CO",
"mblNo": "242636125",
"vessel": "GSL MELITA",
"voyNo": "431S",
"placeReceipt": "Qingdao,Shandong,China",
"portload": "QINGDAO QIANWAN CONTAINER CO LTD",
"vgmCutoffTime": "2024-08-01 17:00:00",
"eta": "2024-09-03 00:00:00",
"etd": "2024-08-03 00:00:00",
"portDischarge": "Brisbane Patrick Terminal",
"placeDelivery": "Brisbane,Queensland,Australia",
"contractNo": "299026908",
"fstCustomerSerUserName": "Eight chengsi",
"cyCutoffTime": "2024-08-01 22:00:00",
"ctnList": [
{
"ctnALL": "40HC",
"ctnnum": 1
}
],
"fileList": [
{
"filePath": "BookingAttach\\bcfiles\\08dcab8e-374d-4a44-8093-6dc531177f01\\20240724111048159\\DB_aabhcbhjagaf0x023A.pdf",
"fileType": ".pdf",
"fileName": "DB_aabhcbhjagaf0x023A.pdf",
"fileCategory": "BC",
"fileCategoryName": "Booking Confirmation"
},
{
"filePath": "BookingAttach\\bcnoticefiles\\08dcab8e-374d-4a44-8093-6dc531177f01\\20240724111048174\\DB_aabhcbhjagaf0x023A_MODIFY.pdf",
"fileType": ".pdf",
"fileName": "DB_aabhcbhjagaf0x023A_MODIFY.pdf",
"fileCategory": "BC_NOTICE",
"fileCategoryName": "Booking Confirmation Notice"
}
],
"bookingSlotId": 571905822330949,
"carrierId": "MSK",
"carriageType": "DIRECT_SHIP",
"carriageTypeName": "直达",
"bookingSlotType": "CONTRACT_ORDER",
"bookingSlotTypeName": "合约订舱",
"ctnStat": "40HC*1",
"weekAt": "31",
"detensionFreeDays": 0,
"siCutDate": "2024-07-31 18:00:00",
"bookingConfirmDate": "2024-07-24 11:10:00",
"keywords": [
{
"name": "承运方式:直达",
"background": "#FFFF80",
"icon": "icon-yunshu1"
},
{
"name": "订舱方式:合约订舱",
"background": "#81D3F8",
"icon": "icon-touzijilu"
}
],
"taskStatus": "Create"
}) as any
const pdfUrl = ref('123')
const pdfUrl = ref('')
const taskDataRef = ref()
const pdfData = ref()
onMounted(() => {
taskDataRef.value.init(form.value)
taskDataRef.value.getInfo('Amendment')
pdfData.value.init()
})
const taskPKId = ref(route.query.taskPKId)
const spinning = ref(false)
function handleSuccess(url) {
pdfUrl.value = url
}
const pdfData = ref()
onMounted(() => {
pdfData.value.init()
})
function loadingStart() {
spinning.value = true

@ -5,7 +5,7 @@
<taskData ref="taskDataRef" title='Booking Confirmation'></taskData>
</a-col>
<a-col :span="pdfUrl ? 13 : 0">
<pdf style="margin-bottom: 20px;" :id="taskPKId" ref="pdfData"></pdf>
<pdf @handleSuccess="handleSuccess" style="margin-bottom: 20px;" :id="taskPKId" ref="pdfData"></pdf>
<taskButton :buttonList="['取消', '完成', '转移', '生成', '邮件']" @loadingStart="loadingStart"
@loadingStop="loadingStop" :id="taskPKId" ref="taskButtonRef"></taskButton>
</a-col>
@ -23,30 +23,20 @@ import { useMessage } from '../../../hooks/web/useMessage'
const { createMessage } = useMessage()
const route = useRoute()
const router = useRouter();
const pdfUrl = ref('123')
const pdfUrl = ref('')
const taskDataRef = ref()
onMounted(() => {
getInfo()
})
const taskPKId = ref(route.query.taskPKId)
const spinning = ref(false)
function handleSuccess(url) {
pdfUrl.value = url
}
const pdfData = ref()
function getInfo() {
const ApiData = {
taskId: taskPKId.value
}
GetInfoByTaskId(ApiData).then(res => {
if (res.data.succ) {
taskDataRef.value.init(res.data.ext)
} else {
createMessage.error(res.data.msg)
}
// this.ChangeFileRadio()
})
onMounted(() => {
taskDataRef.value.getInfo()
pdfData.value.init()
}
})
function loadingStart() {
spinning.value = true

@ -5,7 +5,7 @@
<taskData ref="taskDataRef" title='Booking Cancellation' ></taskData>
</a-col>
<a-col>
<pdf ref="pdfData"></pdf>
<pdf @handleSuccess="handleSuccess" style="margin-bottom: 20px;" :id="taskPKId" ref="pdfData"></pdf>
<taskButton :buttonList="['取消', '完成', '转移']" @loadingStart="loadingStart" @loadingStop="loadingStop" :id="taskPKId" ref="taskButtonRef"></taskButton>
</a-col>
</a-row>
@ -16,86 +16,25 @@ import { ref, onMounted } from 'vue'
import { useRouter,useRoute } from 'vue-router'
import pdf from '../components/pdf.vue'
import taskData from '../components/taskData.vue'
import { useMessage } from '../../../hooks/web/useMessage'
const { createMessage } = useMessage()
import taskButton from '../components/taskButton.vue'
import { GetInfoByTaskId,DownloadFileByBC } from '../api'
const route = useRoute()
const router = useRouter();
const form = ref({
"pkId": "08dcab8e-3757-49bb-8082-1bb3de042459",
"taskId": "08dcab8e-374d-4a44-8093-6dc531177f01",
"busiType": "BookingConfirmation",
"bookingParty": "QINGDAO CHENGSI FREIGHT FORWARDER CO",
"mblNo": "242636125",
"vessel": "GSL MELITA",
"voyNo": "431S",
"placeReceipt": "Qingdao,Shandong,China",
"portload": "QINGDAO QIANWAN CONTAINER CO LTD",
"vgmCutoffTime": "2024-08-01 17:00:00",
"eta": "2024-09-03 00:00:00",
"etd": "2024-08-03 00:00:00",
"portDischarge": "Brisbane Patrick Terminal",
"placeDelivery": "Brisbane,Queensland,Australia",
"contractNo": "299026908",
"fstCustomerSerUserName": "Eight chengsi",
"cyCutoffTime": "2024-08-01 22:00:00",
"ctnList": [
{
"ctnALL": "40HC",
"ctnnum": 1
}
],
"fileList": [
{
"filePath": "BookingAttach\\bcfiles\\08dcab8e-374d-4a44-8093-6dc531177f01\\20240724111048159\\DB_aabhcbhjagaf0x023A.pdf",
"fileType": ".pdf",
"fileName": "DB_aabhcbhjagaf0x023A.pdf",
"fileCategory": "BC",
"fileCategoryName": "Booking Confirmation"
},
{
"filePath": "BookingAttach\\bcnoticefiles\\08dcab8e-374d-4a44-8093-6dc531177f01\\20240724111048174\\DB_aabhcbhjagaf0x023A_MODIFY.pdf",
"fileType": ".pdf",
"fileName": "DB_aabhcbhjagaf0x023A_MODIFY.pdf",
"fileCategory": "BC_NOTICE",
"fileCategoryName": "Booking Confirmation Notice"
}
],
"bookingSlotId": 571905822330949,
"carrierId": "MSK",
"carriageType": "DIRECT_SHIP",
"carriageTypeName": "直达",
"bookingSlotType": "CONTRACT_ORDER",
"bookingSlotTypeName": "合约订舱",
"ctnStat": "40HC*1",
"weekAt": "31",
"detensionFreeDays": 0,
"siCutDate": "2024-07-31 18:00:00",
"bookingConfirmDate": "2024-07-24 11:10:00",
"keywords": [
{
"name": "承运方式:直达",
"background": "#FFFF80",
"icon": "icon-yunshu1"
},
{
"name": "订舱方式:合约订舱",
"background": "#81D3F8",
"icon": "icon-touzijilu"
}
],
"taskStatus": "Create"
}) as any
const pdfUrl = ref('123')
const pdfUrl = ref('')
const taskDataRef = ref()
onMounted(() => {
taskDataRef.value.init(form.value)
})
const taskPKId = ref(route.query.taskPKId)
const spinning = ref(false)
function handleSuccess(url) {
pdfUrl.value = url
}
const pdfData = ref()
onMounted(() => {
taskDataRef.value.getInfo()
pdfData.value.init()
})

Loading…
Cancel
Save