更新任务

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) {
return request<DataResult>({
url: '/taskApi/TaskManageBC/DownloadFile',
url: '/taskApi/TaskManage/DownloadFile',
method: 'get',
params: parameter,
responseType: 'blob'

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

@ -3,11 +3,11 @@
<div class="pdf-header">
<a-tabs style="width:150px" v-model:activeKey="fileCategory" @change="ChangeFileRadio">
<a-tab-pane key="BC" tab="BC文件"></a-tab-pane>
<a-tab-pane key="BC_NOTICE" tab="BC更改文件" ></a-tab-pane>
<a-tab-pane key="BC_NOTICE" tab="BC更改文件"></a-tab-pane>
</a-tabs>
<span style="margin:0 20px;font-size: 16px;font-weight: bold;color: black">{{ pdfName }}</span>
<a-button type="link" @click="handleDownPdf">
<i class="iconfont icon-xiazai1" ></i>
<i class="iconfont icon-xiazai1"></i>
下载pdf文件</a-button>
</div>
<iframe name="custom-iframe-name" width="100%" height="690" frameborder="0" scrolling="auto"
@ -16,7 +16,15 @@
</template>
<script lang="ts" setup>
import { ref, defineExpose } from 'vue'
import { DownloadFileByBC } from '../api'
import { useMessage } from '/@/hooks/web/useMessage'
const { createMessage } = useMessage()
const emit = defineEmits(['handleSuccess', 'handleSuccessCopy'])
const props = defineProps({
id: {
type: String || Number
},
});
const fileCategory = ref('BC')
const pdfName = ref('1131231312231asdasdad.pdf')
const pdfUrl = ref('')
@ -27,8 +35,32 @@ function handleDownPdf() {
}
function init() {
console.log(123)
// pdfUrl.value = '../DB_aabhcbhjagaf0x023A_MODIFY.pdf'
const data = {
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 })
</script>
@ -39,7 +71,8 @@ defineExpose({ init })
background: rgba(245, 249, 252, 1);
padding-left: 40px;
}
/deep/ .ant-tabs-nav{
/deep/ .ant-tabs-nav {
margin-bottom: 0px !important;
}
</style>

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

@ -35,7 +35,7 @@
<span class="box-number">{{ item.total }}</span>
<span class="box-text" style="font-size: 12px;font-weight: 400">{{
item.name
}}</span>
}}</span>
</div>
</div>
</a-tab-pane>
@ -53,7 +53,8 @@
<a-popconfirm title="确定完成当前选择项?" ok-text="" cancel-text="" @confirm="submitFun">
<a-button type="link"><i class="icon-yiwancheng2 iconfont"></i>完成</a-button>
</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="CancelSendCar"><i
class="icon-weiwancheng iconfont"></i>取消派车</a-button> -->
@ -238,6 +239,17 @@
</div>
<div v-else>{{ bcFile.msg }}</div>
</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>
</template>
<script lang="ts" setup>
@ -261,11 +273,13 @@ import {
CompleteTask,
DownloadTaskAttach,
SendTelexEmail,
SetTaskOwner,
LaraPaperCalc,
PrintBatch,
DownloadAttach,
DownloadOriginalTask,
ManualReCompareBC
ManualReCompareBC,
GetUserListAll
} from './api'
import { useGo } from '/@/hooks/web/usePage'
const go = useGo()
@ -274,6 +288,8 @@ onMounted(() => {
})
const levelreLoading = ref(false)
const levelLoading = ref(false)
const levelTop = ref([]) as any //tab
@ -317,6 +333,7 @@ function getCurrentTotalStat() {
}
activeTreeKey.value = []
taskType.value = ''
console.log(1111)
reload()
})
.catch(err => {
@ -332,6 +349,71 @@ function selectNextLevel(list, key) {
})
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() {
levelNext.value = selectNextLevel(levelNextAll.value, activeTopKey.value)
@ -418,14 +500,15 @@ const [registerTable, { reload, setLoading, getForm, getSelectRows, setProps }]
if (activeNextKey.value) {
p['status'] = activeNextKey.value
}
if (taskType.value) {
p['tasK_TYPE'] = taskType.value
}
const data = {
...formatParams(p)
}
data.otherQueryCondition = {}
if (activeTopKey.value) {
data.taskCategory = activeTopKey.value
data.otherQueryCondition.taskCategory = activeTopKey.value
}
if (taskType.value) {
data.otherQueryCondition.taskType = taskType.value
}
return data
},

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

Loading…
Cancel
Save