|
|
@ -55,14 +55,14 @@
|
|
|
|
<div v-if="type == 'Add' || 'Edit'" class="nav" @click="handleSubmit">
|
|
|
|
<div v-if="type == 'Add' || 'Edit'" class="nav" @click="handleSubmit">
|
|
|
|
<i class="iconfont icon-icon_baocun"></i>保存
|
|
|
|
<i class="iconfont icon-icon_baocun"></i>保存
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div v-if="taskPKId" class="nav" @click="handleSubmit">
|
|
|
|
<!-- <div v-if="taskPKId" class="nav" @click="handleSubmit">
|
|
|
|
<i class="iconfont icon-icon_baocun"></i>分拆派车
|
|
|
|
<i class="iconfont icon-icon_baocun"></i>分拆派车
|
|
|
|
</div>
|
|
|
|
</div> -->
|
|
|
|
<div v-if="type == 'Edit' && !taskPKId" class="nav" @click="FnSubmit">
|
|
|
|
<div v-if="type == 'Edit' && !taskPKId" class="nav" @click="FnSubmit">
|
|
|
|
<i class="iconfont icon-yunshu1"></i>提交派车
|
|
|
|
<i class="iconfont icon-yunshu1"></i>提交派车
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div v-if="taskPKId" class="nav" @click="FnSendCar"><i class="iconfont icon-icon_baocun"></i>派车</div>
|
|
|
|
<div v-if="taskPKId" class="nav" @click="FnSendCar"><i class="iconfont icon-icon_baocun"></i>派车</div>
|
|
|
|
<div v-if="taskPKId" class="nav" @click="handleSubmit"><i class="iconfont icon-icon_baocun"></i>发单</div>
|
|
|
|
<!-- <div v-if="taskPKId" class="nav" @click="handleSubmit"><i class="iconfont icon-icon_baocun"></i>发单</div> -->
|
|
|
|
<div v-if="taskPKId" class="nav" @click="CancelSendCar">
|
|
|
|
<div v-if="taskPKId" class="nav" @click="CancelSendCar">
|
|
|
|
<i class="iconfont icon-icon_baocun"></i>取消派车
|
|
|
|
<i class="iconfont icon-icon_baocun"></i>取消派车
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -551,7 +551,8 @@ import {
|
|
|
|
TaskManageTruckPrint,
|
|
|
|
TaskManageTruckPrint,
|
|
|
|
TaskManageTruckCancelDispatch,
|
|
|
|
TaskManageTruckCancelDispatch,
|
|
|
|
TaskManageTruckSendDispatchBatch,
|
|
|
|
TaskManageTruckSendDispatchBatch,
|
|
|
|
BookingTruckPrintTemplateWithHistoryList
|
|
|
|
BookingTruckPrintTemplateWithHistoryList,
|
|
|
|
|
|
|
|
TaskManageTruckPrintTemplateWithHistoryList
|
|
|
|
} from '@/api/modular/main/SendCar'
|
|
|
|
} from '@/api/modular/main/SendCar'
|
|
|
|
import { GetCtn } from '@/api/modular/main/BookingLedger'
|
|
|
|
import { GetCtn } from '@/api/modular/main/BookingLedger'
|
|
|
|
import { GetSysUserPage } from '@/api/modular/main/BookingLedger'
|
|
|
|
import { GetSysUserPage } from '@/api/modular/main/BookingLedger'
|
|
|
@ -720,22 +721,44 @@ export default {
|
|
|
|
printType
|
|
|
|
printType
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.spinning = true
|
|
|
|
this.spinning = true
|
|
|
|
BookingTruckPrintTemplateWithHistoryList(Data).then(res => {
|
|
|
|
if (this.taskPKId) {
|
|
|
|
this.templateType = res.data
|
|
|
|
TaskManageTruckPrintTemplateWithHistoryList(Data).then(res => {
|
|
|
|
this.spinning = false
|
|
|
|
this.templateType = res.data
|
|
|
|
this.PrintModalVisible = true
|
|
|
|
this.spinning = false
|
|
|
|
})
|
|
|
|
this.PrintModalVisible = true
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
BookingTruckPrintTemplateWithHistoryList(Data).then(res => {
|
|
|
|
|
|
|
|
this.templateType = res.data
|
|
|
|
|
|
|
|
this.spinning = false
|
|
|
|
|
|
|
|
this.PrintModalVisible = true
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 打印
|
|
|
|
// 打印
|
|
|
|
FnCilckTemplateType(templateId) {
|
|
|
|
FnCilckTemplateType(templateId) {
|
|
|
|
this.$message.success(`搜索文件中...`)
|
|
|
|
this.$message.success(`搜索文件中...`)
|
|
|
|
let printType = this.PrintType == 4 ? 20 : 10
|
|
|
|
let printType = this.PrintType == 4 ? 20 : 10
|
|
|
|
if (this.taskPKId) {
|
|
|
|
if (this.taskPKId) {
|
|
|
|
TaskManageTruckPrint({ pkId: this.WebData.pK_ID }).then(res => {
|
|
|
|
TaskManageTruckPrint({
|
|
|
|
if (res.data.succ) {
|
|
|
|
taskPKId: this.WebData.pK_ID,
|
|
|
|
this.$message.success('打印成功')
|
|
|
|
templateId,
|
|
|
|
|
|
|
|
cateCode: 'truckBill',
|
|
|
|
|
|
|
|
type: this.PrintType,
|
|
|
|
|
|
|
|
printType
|
|
|
|
|
|
|
|
}).then(res => {
|
|
|
|
|
|
|
|
if (!res.success) {
|
|
|
|
|
|
|
|
this.$message.error(res.message)
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.$message.error(`打印失败,${res.data.msg}`)
|
|
|
|
// this.$message.success(res.data)
|
|
|
|
|
|
|
|
if (this.PrintType == 1) {
|
|
|
|
|
|
|
|
window.open(` ${process.env.VUE_APP_API_BASE_URL}/BookingOrder/ViewPrintPdf/${res.data}`, '_blank')
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
window.open(
|
|
|
|
|
|
|
|
` ${process.env.VUE_APP_API_BASE_URL}/BookingOrder/downloadPrint?filename=${res.data}`,
|
|
|
|
|
|
|
|
'_blank'
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -861,23 +884,6 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.PrintType = '1'
|
|
|
|
this.PrintType = '1'
|
|
|
|
this.GetPrintData('truckBill', printType)
|
|
|
|
this.GetPrintData('truckBill', printType)
|
|
|
|
// if (this.taskPKId) {
|
|
|
|
|
|
|
|
// TaskManageTruckPrint({ pkId: this.WebData.pK_ID }).then(res => {
|
|
|
|
|
|
|
|
// if (res.data.succ) {
|
|
|
|
|
|
|
|
// this.$message.success('打印成功')
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// this.$message.error(`打印失败,${res.data.msg}`)
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// BookingTruckPrint({ id: this.WebData.id }).then(res => {
|
|
|
|
|
|
|
|
// if (res.data.succ) {
|
|
|
|
|
|
|
|
// this.$message.success('打印成功')
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// this.$message.error(`打印失败,${res.data.msg}`)
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
FnCancel() {
|
|
|
|
FnCancel() {
|
|
|
|
BookingTruckCancel({ id: this.WebData.id }).then(res => {
|
|
|
|
BookingTruckCancel({ id: this.WebData.id }).then(res => {
|
|
|
@ -1178,7 +1184,14 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 补全数据Name
|
|
|
|
// 补全数据Name
|
|
|
|
FnCompleteName(data) {
|
|
|
|
FnCompleteName(data) {
|
|
|
|
console.log('11')
|
|
|
|
if (data.dispatcherId) {
|
|
|
|
|
|
|
|
this.dispatcherIdData.forEach(item => {
|
|
|
|
|
|
|
|
console.log(item)
|
|
|
|
|
|
|
|
if (data.dispatcherId == item.sysEmpId) {
|
|
|
|
|
|
|
|
data['dispatcherName'] = item.sysEmpName
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
if (data.contaList) {
|
|
|
|
if (data.contaList) {
|
|
|
|
data.contaList.forEach(item => {
|
|
|
|
data.contaList.forEach(item => {
|
|
|
|
this.ctnList.forEach(item2 => {
|
|
|
|
this.ctnList.forEach(item2 => {
|
|
|
@ -1188,7 +1201,6 @@ export default {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
console.log('12')
|
|
|
|
|
|
|
|
if (data.truckId) {
|
|
|
|
if (data.truckId) {
|
|
|
|
this.truckIdData.forEach(item => {
|
|
|
|
this.truckIdData.forEach(item => {
|
|
|
|
if (data.truckId == item.id) {
|
|
|
|
if (data.truckId == item.id) {
|
|
|
|