diff --git a/src/api/modular/main/SendCar.js b/src/api/modular/main/SendCar.js
index 61805b3..29864d5 100644
--- a/src/api/modular/main/SendCar.js
+++ b/src/api/modular/main/SendCar.js
@@ -126,6 +126,30 @@ export function BookingTruckPrint(parameter) {
params: parameter
})
}
+/**
+ * 获取订舱打印模板列表(带有当前用户打印历史排序)
+ *
+ * @author Myshipping
+ */
+export function TaskManageTruckPrintTemplateWithHistoryList(parameter) {
+ return axios({
+ url: '/TaskManageTruck/PrintTemplateWithHistoryList',
+ method: 'get',
+ params: parameter
+ })
+}
+/**
+ * 打印派车
+ *
+ * @author Myshipping
+ */
+export function TaskManageTruckPrint(parameter) {
+ return axios({
+ url: '/TaskManageTruck/Print',
+ method: 'get',
+ params: parameter
+ })
+}
/**
* 订舱主键获取相关派车列表
*
@@ -168,16 +192,6 @@ export function TaskManageTruckSave(parameter) {
data: parameter
})
}
-/**
- * 打印派车
- */
-export function TaskManageTruckPrint(parameter) {
- return axios({
- url: '/TaskManageTruck/Print',
- method: 'get',
- params: parameter
- })
-}
/**
* 取消派车
*/
diff --git a/src/views/main/SendCar/addForm.vue b/src/views/main/SendCar/addForm.vue
index b26463e..53a43d7 100644
--- a/src/views/main/SendCar/addForm.vue
+++ b/src/views/main/SendCar/addForm.vue
@@ -55,14 +55,14 @@
保存
-
+
提交派车
派车
-
发单
+
取消派车
@@ -551,7 +551,8 @@ import {
TaskManageTruckPrint,
TaskManageTruckCancelDispatch,
TaskManageTruckSendDispatchBatch,
- BookingTruckPrintTemplateWithHistoryList
+ BookingTruckPrintTemplateWithHistoryList,
+ TaskManageTruckPrintTemplateWithHistoryList
} from '@/api/modular/main/SendCar'
import { GetCtn } from '@/api/modular/main/BookingLedger'
import { GetSysUserPage } from '@/api/modular/main/BookingLedger'
@@ -720,22 +721,44 @@ export default {
printType
}
this.spinning = true
- BookingTruckPrintTemplateWithHistoryList(Data).then(res => {
- this.templateType = res.data
- this.spinning = false
- this.PrintModalVisible = true
- })
+ if (this.taskPKId) {
+ TaskManageTruckPrintTemplateWithHistoryList(Data).then(res => {
+ this.templateType = res.data
+ this.spinning = false
+ this.PrintModalVisible = true
+ })
+ } else {
+ BookingTruckPrintTemplateWithHistoryList(Data).then(res => {
+ this.templateType = res.data
+ this.spinning = false
+ this.PrintModalVisible = true
+ })
+ }
},
// 打印
FnCilckTemplateType(templateId) {
this.$message.success(`搜索文件中...`)
let printType = this.PrintType == 4 ? 20 : 10
if (this.taskPKId) {
- TaskManageTruckPrint({ pkId: this.WebData.pK_ID }).then(res => {
- if (res.data.succ) {
- this.$message.success('打印成功')
+ TaskManageTruckPrint({
+ taskPKId: this.WebData.pK_ID,
+ templateId,
+ cateCode: 'truckBill',
+ type: this.PrintType,
+ printType
+ }).then(res => {
+ if (!res.success) {
+ this.$message.error(res.message)
} 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 {
@@ -861,23 +884,6 @@ export default {
}
this.PrintType = '1'
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() {
BookingTruckCancel({ id: this.WebData.id }).then(res => {
@@ -1178,7 +1184,14 @@ export default {
},
// 补全数据Name
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) {
data.contaList.forEach(item => {
this.ctnList.forEach(item2 => {
@@ -1188,7 +1201,6 @@ export default {
})
})
}
- console.log('12')
if (data.truckId) {
this.truckIdData.forEach(item => {
if (data.truckId == item.id) {
diff --git a/src/views/main/Taskmanage/TaskmanageList/index.vue b/src/views/main/Taskmanage/TaskmanageList/index.vue
index 2340bdf..589d495 100644
--- a/src/views/main/Taskmanage/TaskmanageList/index.vue
+++ b/src/views/main/Taskmanage/TaskmanageList/index.vue
@@ -299,6 +299,7 @@
row-class-name="line-box"
@page-change="handlePageChange"
style="margin-top: 6px"
+ height="580px"
>
{{ selectStatus(row.status) }}