|
|
@ -185,7 +185,7 @@
|
|
|
|
</a-popconfirm>
|
|
|
|
</a-popconfirm>
|
|
|
|
<a-button class="list-btn" type="primary" icon="check" @click="FnPrint">打印</a-button>
|
|
|
|
<a-button class="list-btn" type="primary" icon="check" @click="FnPrint">打印</a-button>
|
|
|
|
<a-button class="list-btn" type="primary" icon="check" @click="FnSendCar">派车</a-button>
|
|
|
|
<a-button class="list-btn" type="primary" icon="check" @click="FnSendCar">派车</a-button>
|
|
|
|
<a-button class="list-btn" type="primary" icon="check">取消派车</a-button>
|
|
|
|
<a-button class="list-btn" type="primary" icon="check" @click="CancelSendCar">取消派车</a-button>
|
|
|
|
<template v-if="taskType === 'BC'">
|
|
|
|
<template v-if="taskType === 'BC'">
|
|
|
|
<a-popconfirm
|
|
|
|
<a-popconfirm
|
|
|
|
title="确定批量下载当前选择项?"
|
|
|
|
title="确定批量下载当前选择项?"
|
|
|
@ -482,7 +482,9 @@ import {
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
TaskManageTruckGetInfoByTaskId,
|
|
|
|
TaskManageTruckGetInfoByTaskId,
|
|
|
|
TaskManageTruckPrintTemplateWithHistoryList,
|
|
|
|
TaskManageTruckPrintTemplateWithHistoryList,
|
|
|
|
TaskManageTruckPrint
|
|
|
|
TaskManageTruckPrint,
|
|
|
|
|
|
|
|
TaskManageTruckSendDispatchBatch,
|
|
|
|
|
|
|
|
TaskManageTruckCancelDispatchBatch
|
|
|
|
} from '@/api/modular/main/SendCar'
|
|
|
|
} from '@/api/modular/main/SendCar'
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: 'TaskmanageList',
|
|
|
|
name: 'TaskmanageList',
|
|
|
@ -685,31 +687,55 @@ export default {
|
|
|
|
this.$message.error('请选择数据')
|
|
|
|
this.$message.error('请选择数据')
|
|
|
|
return false
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
pkIdArr.forEach(item => {
|
|
|
|
let ApiArr = []
|
|
|
|
TaskManageTruckGetInfoByTaskId({ taskPkId: this.pkIdArr[0] })
|
|
|
|
pkIdArr.forEach((item, index) => {
|
|
|
|
|
|
|
|
TaskManageTruckGetInfoByTaskId({ taskPkId: item })
|
|
|
|
.then(res => {
|
|
|
|
.then(res => {
|
|
|
|
if (res.data.succ) {
|
|
|
|
if (res.data.succ) {
|
|
|
|
// TaskManageTruckPrint({
|
|
|
|
ApiArr.push(res.data.ext.pK_ID)
|
|
|
|
// taskPKId: res.data.ext.pK_ID,
|
|
|
|
if (index + 1 == pkIdArr.length) {
|
|
|
|
// templateId,
|
|
|
|
TaskManageTruckSendDispatchBatch(ApiArr).then(res => {
|
|
|
|
// cateCode: 'truckBill',
|
|
|
|
if (res.data.succ) {
|
|
|
|
// type: this.PrintType,
|
|
|
|
this.$message.success('派车成功')
|
|
|
|
// printType
|
|
|
|
} else {
|
|
|
|
// }).then(res => {
|
|
|
|
this.$message.error(`派车失败,${res.data.msg}`)
|
|
|
|
// if (!res.success) {
|
|
|
|
}
|
|
|
|
// this.$message.error(res.message)
|
|
|
|
})
|
|
|
|
// } else {
|
|
|
|
}
|
|
|
|
// // this.$message.success(res.data)
|
|
|
|
} else {
|
|
|
|
// if (this.PrintType == 1) {
|
|
|
|
this.$message.error(`${res.data.msg}`)
|
|
|
|
// window.open(` ${process.env.VUE_APP_API_BASE_URL}/BookingOrder/ViewPrintPdf/${res.data}`, '_blank')
|
|
|
|
}
|
|
|
|
// } else {
|
|
|
|
this.confirmLoading = false
|
|
|
|
// window.open(
|
|
|
|
})
|
|
|
|
// ` ${process.env.VUE_APP_API_BASE_URL}/BookingOrder/downloadPrint?filename=${res.data}`,
|
|
|
|
.catch(() => {
|
|
|
|
// '_blank'
|
|
|
|
this.confirmLoading = false
|
|
|
|
// )
|
|
|
|
})
|
|
|
|
// }
|
|
|
|
})
|
|
|
|
// }
|
|
|
|
},
|
|
|
|
// })
|
|
|
|
CancelSendCar() {
|
|
|
|
|
|
|
|
const select = this.$refs.xGrid.getCheckboxRecords()
|
|
|
|
|
|
|
|
const pkIdArr = select.map((item, index) => {
|
|
|
|
|
|
|
|
return item.pkId
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
if (pkIdArr.length === 0) {
|
|
|
|
|
|
|
|
this.$message.error('请选择数据')
|
|
|
|
|
|
|
|
return false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
let ApiArr = []
|
|
|
|
|
|
|
|
pkIdArr.forEach((item, index) => {
|
|
|
|
|
|
|
|
TaskManageTruckGetInfoByTaskId({ taskPkId: item })
|
|
|
|
|
|
|
|
.then(res => {
|
|
|
|
|
|
|
|
if (res.data.succ) {
|
|
|
|
|
|
|
|
ApiArr.push(res.data.ext.pK_ID)
|
|
|
|
|
|
|
|
if (index + 1 == pkIdArr.length) {
|
|
|
|
|
|
|
|
TaskManageTruckCancelDispatchBatch(ApiArr).then(res => {
|
|
|
|
|
|
|
|
if (res.data.succ) {
|
|
|
|
|
|
|
|
this.$message.success('派车成功')
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.$message.error(`派车失败,${res.data.msg}`)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.$message.error(`${res.data.msg}`)
|
|
|
|
this.$message.error(`${res.data.msg}`)
|
|
|
|
}
|
|
|
|
}
|
|
|
|