更新任务

szh-new
sunzehua 4 months ago
parent 635337ada2
commit 632715e3c1

@ -328,9 +328,17 @@ export function GetInfoByTaskId(parameter) {
}) })
} }
export function SetTaskOwner(parameter, query) {
return request<DataResult>({
url: '/taskApi/TaskManage/SetTaskOwner?' + query,
method: 'post',
data: parameter
})
}
export function DownloadFileByBC(parameter) { export function DownloadFileByBC(parameter) {
return request<DataResult>({ return request<DataResult>({
url: '/taskApi/TaskManageBC/DownloadFile', url: '/taskApi/TaskManage/DownloadFile',
method: 'get', method: 'get',
params: parameter, params: parameter,
responseType: 'blob' responseType: 'blob'

@ -265,7 +265,6 @@ function init() {
sourceData.value = item.data sourceData.value = item.data
} }
}) })
console.log(typeData.value)
}) })
} }
init() init()

@ -16,7 +16,15 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, defineExpose } from 'vue' import { ref, defineExpose } from 'vue'
import { DownloadFileByBC } from '../api'
import { useMessage } from '/@/hooks/web/useMessage'
const { createMessage } = useMessage()
const emit = defineEmits(['handleSuccess', 'handleSuccessCopy']) const emit = defineEmits(['handleSuccess', 'handleSuccessCopy'])
const props = defineProps({
id: {
type: String || Number
},
});
const fileCategory = ref('BC') const fileCategory = ref('BC')
const pdfName = ref('1131231312231asdasdad.pdf') const pdfName = ref('1131231312231asdasdad.pdf')
const pdfUrl = ref('') const pdfUrl = ref('')
@ -27,8 +35,32 @@ function handleDownPdf() {
} }
function init() { function init() {
console.log(123) const data = {
// pdfUrl.value = '../DB_aabhcbhjagaf0x023A_MODIFY.pdf' taskId:props.id,
fileCategory:'BC_NOTICE'
}
DownloadFileByBC(data).then(res => {
if (res.type === 'application/json') {
const reader = new FileReader()
reader.readAsText(res, 'utf-8')
reader.onload = () => {
const _res = JSON.parse(reader.result)
createMessage.error(_res.message)
}
} else {
this.pdfRes = res
var contentDisposition = res.headers['content-disposition']
var patt = new RegExp('filename=([^;]+\\.[^\\.;]+);*')
var result = patt.exec(contentDisposition)
var filename = result[1]
var reg = /^["](.*)["]$/g
pdfName.value = decodeURI(filename.replace(reg, '$1'))
if (res.data.size > 150) {
pdfUrl.value = window.URL.createObjectURL(new Blob([res.data], { type: 'application/pdf;charset=utf-8' }))
}
}
})
} }
defineExpose({ init }) defineExpose({ init })
</script> </script>
@ -39,6 +71,7 @@ defineExpose({ init })
background: rgba(245, 249, 252, 1); background: rgba(245, 249, 252, 1);
padding-left: 40px; padding-left: 40px;
} }
/deep/ .ant-tabs-nav { /deep/ .ant-tabs-nav {
margin-bottom: 0px !important; margin-bottom: 0px !important;
} }

@ -23,18 +23,21 @@
</a-col> </a-col>
</a-row> </a-row>
<a-modal @cancel="UserVisible = false" :visible="UserVisible" title="转移任务" @ok="UserhandleOk"> <a-modal @cancel="UserVisible = false" :visible="UserVisible" title="转移任务" @ok="UserhandleOk">
<a-spin :spinning="userLoad">
<div style="margin: 15px 0;">接收人</div> <div style="margin: 15px 0;">接收人</div>
<a-select show-search style="width: 200px;" :filter-option="filterOption" v-model:value="UserId"> <a-select mode="multiple" show-search style="width: 100%;margin-bottom: 30px"
:filter-option="filterOption" v-model:value="UserId">
<a-select-option v-for="item in UserList" :key="item.value" :value="item.value"> <a-select-option v-for="item in UserList" :key="item.value" :value="item.value">
{{ item.label }} {{ item.label }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-spin>
</a-modal> </a-modal>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { number } from 'echarts'; import { number } from 'echarts';
import { ref, onMounted, defineProps } from 'vue' import { ref, onMounted, defineProps } from 'vue'
import { GetUserListAll, TransferTask, CompleteTask, CancelTaskBC } from '../api' import { GetUserListAll, SetTaskOwner, CompleteTask, CancelTaskBC } from '../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({
@ -45,6 +48,7 @@ const props = defineProps({
type: Array type: Array
} }
}); });
const userLoad = ref(false)
const UserVisible = ref(false); const UserVisible = ref(false);
const UserList = ref([]) as any const UserList = ref([]) as any
const UserId = ref('') //id const UserId = ref('') //id
@ -56,17 +60,15 @@ function OpenUser() {
}) })
} }
function UserhandleOk() { function UserhandleOk() {
const ApiData = { userLoad.value = true
taskPKId: props.id, SetTaskOwner(UserList.value, props.id).then(res => {
userId: UserId.value if (res.succeeded) {
} createMessage.success(res.message)
TransferTask(ApiData).then(res => {
if (res.data.succ) {
UserVisible.value = false UserVisible.value = false
createMessage.success(res.data.msg)
} else { } else {
createMessage.error(res.data.msg) createMessage.error(res.message)
} }
userLoad.value = false
}) })
} }

@ -53,7 +53,8 @@
<a-popconfirm title="确定完成当前选择项?" ok-text="" cancel-text="" @confirm="submitFun"> <a-popconfirm title="确定完成当前选择项?" ok-text="" cancel-text="" @confirm="submitFun">
<a-button type="link"><i class="icon-yiwancheng2 iconfont"></i>完成</a-button> <a-button type="link"><i class="icon-yiwancheng2 iconfont"></i>完成</a-button>
</a-popconfirm> </a-popconfirm>
<a-button type="link" @click="FnPrint"><i class="icon-weibiaoti-- iconfont"></i>打印</a-button> <a-button type="link" @click="openUser"><i class="icon-zhuanfa iconfont"></i>任务转交</a-button>
<!-- <a-button type="link" @click="FnPrint"><i class="icon-weibiaoti-- iconfont"></i>打印</a-button> -->
<!-- <a-button type="link" @click="FnSendCar"><i class="icon-chezaikucun iconfont"></i>派车</a-button> <!-- <a-button type="link" @click="FnSendCar"><i class="icon-chezaikucun iconfont"></i>派车</a-button>
<a-button type="link" @click="CancelSendCar"><i <a-button type="link" @click="CancelSendCar"><i
class="icon-weiwancheng iconfont"></i>取消派车</a-button> --> class="icon-weiwancheng iconfont"></i>取消派车</a-button> -->
@ -238,6 +239,17 @@
</div> </div>
<div v-else>{{ bcFile.msg }}</div> <div v-else>{{ bcFile.msg }}</div>
</a-modal> </a-modal>
<a-modal @cancel="UserVisible = false" :visible="UserVisible" title="转移任务" @ok="UserhandleOk">
<a-spin :spinning="userLoad">
<div style="margin: 15px 0;">接收人</div>
<a-select mode="multiple" show-search style="width: 100%;margin-bottom: 30px"
:filter-option="filterOption" v-model:value="UserId">
<a-select-option v-for="item in UserList" :key="item.value" :value="item.value">
{{ item.label }}
</a-select-option>
</a-select>
</a-spin>
</a-modal>
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
@ -261,11 +273,13 @@ import {
CompleteTask, CompleteTask,
DownloadTaskAttach, DownloadTaskAttach,
SendTelexEmail, SendTelexEmail,
SetTaskOwner,
LaraPaperCalc, LaraPaperCalc,
PrintBatch, PrintBatch,
DownloadAttach, DownloadAttach,
DownloadOriginalTask, DownloadOriginalTask,
ManualReCompareBC ManualReCompareBC,
GetUserListAll
} from './api' } from './api'
import { useGo } from '/@/hooks/web/usePage' import { useGo } from '/@/hooks/web/usePage'
const go = useGo() const go = useGo()
@ -274,6 +288,8 @@ onMounted(() => {
}) })
const levelreLoading = ref(false) const levelreLoading = ref(false)
const levelLoading = ref(false) const levelLoading = ref(false)
const levelTop = ref([]) as any //tab const levelTop = ref([]) as any //tab
@ -317,6 +333,7 @@ function getCurrentTotalStat() {
} }
activeTreeKey.value = [] activeTreeKey.value = []
taskType.value = '' taskType.value = ''
console.log(1111)
reload() reload()
}) })
.catch(err => { .catch(err => {
@ -332,6 +349,71 @@ function selectNextLevel(list, key) {
}) })
return arr return arr
} }
//
const UserVisible = ref(false)
const UserList = ref([]) as any
const UserId = ref([])
const userLoad = ref(false)
function UserhandleOk() {
if (UserId.value.length === 0) {
createMessage.error('请选择转移人')
return false
}
const arr = [] as any
UserList.value.forEach(item => {
UserId.value.forEach(ite => {
if (item.value == ite) {
arr.push({
recvUserId: item.value,
recvUserName: item.label
})
}
})
})
const select = getSelectRows()
let queryStr = ''
select.forEach((item, index) => {
if (index === 0) {
queryStr += 'taskIds=' + item.id
} else {
queryStr += '&taskIds=' + item.id
}
})
userLoad.value = true
SetTaskOwner(arr, queryStr).then(res => {
if (res.succeeded) {
createMessage.success(res.message)
UserVisible.value = false
} else {
createMessage.error(res.message)
}
userLoad.value = false
})
}
function openUser() {
const select = getSelectRows()
const pkIdArr = select.map((item, index) => {
return item.id
})
if (pkIdArr.length === 0) {
createMessage.error('请选择数据')
return false
}
GetUserListAll().then(res => {
UserList.value = res.data
})
UserId.value = []
UserVisible.value = true
}
function filterOption(input, option) {
return (
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
);
}
// //
function changeTopLevel() { function changeTopLevel() {
levelNext.value = selectNextLevel(levelNextAll.value, activeTopKey.value) levelNext.value = selectNextLevel(levelNextAll.value, activeTopKey.value)
@ -418,14 +500,15 @@ const [registerTable, { reload, setLoading, getForm, getSelectRows, setProps }]
if (activeNextKey.value) { if (activeNextKey.value) {
p['status'] = activeNextKey.value p['status'] = activeNextKey.value
} }
if (taskType.value) {
p['tasK_TYPE'] = taskType.value
}
const data = { const data = {
...formatParams(p) ...formatParams(p)
} }
data.otherQueryCondition = {}
if (activeTopKey.value) { if (activeTopKey.value) {
data.taskCategory = activeTopKey.value data.otherQueryCondition.taskCategory = activeTopKey.value
}
if (taskType.value) {
data.otherQueryCondition.taskType = taskType.value
} }
return data return data
}, },

@ -5,7 +5,7 @@
<taskData ref="taskDataRef" title='Booking Confirmation'></taskData> <taskData ref="taskDataRef" title='Booking Confirmation'></taskData>
</a-col> </a-col>
<a-col> <a-col>
<pdf ref="pdfData"></pdf> <pdf :id="taskPKId" ref="pdfData"></pdf>
<taskButton :buttonList="['取消', '完成', '转移', '生成', '邮件']" @loadingStart="loadingStart" <taskButton :buttonList="['取消', '完成', '转移', '生成', '邮件']" @loadingStart="loadingStart"
@loadingStop="loadingStop" :id="taskPKId" ref="taskButtonRef"></taskButton> @loadingStop="loadingStop" :id="taskPKId" ref="taskButtonRef"></taskButton>
</a-col> </a-col>
@ -18,80 +18,14 @@ import { useRouter, useRoute } from 'vue-router'
import pdf from '../components/pdf.vue' import pdf from '../components/pdf.vue'
import taskData from '../components/taskData.vue' import taskData from '../components/taskData.vue'
import taskButton from '../components/taskButton.vue' import taskButton from '../components/taskButton.vue'
import { GetInfoByTaskId } from '../api' import { GetInfoByTaskId,DownloadFileByBC } from '../api'
import { useMessage } from '../../../hooks/web/useMessage' import { useMessage } from '../../../hooks/web/useMessage'
const { createMessage } = useMessage() const { createMessage } = useMessage()
const route = useRoute() const route = useRoute()
const router = useRouter(); 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('123')
const taskDataRef = ref() const taskDataRef = ref()
onMounted(() => { onMounted(() => {
pdfData.value.init()
getInfo() getInfo()
}) })
const taskPKId = ref(route.query.taskPKId) const taskPKId = ref(route.query.taskPKId)
@ -111,6 +45,7 @@ function getInfo() {
} }
// this.ChangeFileRadio() // this.ChangeFileRadio()
}) })
pdfData.value.init()
} }
function loadingStart() { function loadingStart() {

Loading…
Cancel
Save