Commit d32f7ccb authored by 沈翠玲's avatar 沈翠玲

优化

parent a3904d69
...@@ -146,6 +146,15 @@ export function printData(query) { ...@@ -146,6 +146,15 @@ export function printData(query) {
}); });
} }
// 打印
export function printDataBySpil(query) {
return request({
url: "/mes/pro/taskWorkunit/printDataBySpil",
method: "post",
data: query
});
}
// 完工作业 // 完工作业
export function change(query) { export function change(query) {
return request({ return request({
......
...@@ -545,6 +545,7 @@ import { ...@@ -545,6 +545,7 @@ import {
gettaskWorkunitList, gettaskWorkunitList,
getdefaultWorkCenterList, getdefaultWorkCenterList,
rollBACKschedule, rollBACKschedule,
printDataBySpil,
printData} from '@/api/mes/pro/scheduleList' printData} from '@/api/mes/pro/scheduleList'
import {putProtaskSplit} from '@/api/mes/pro/protask' import {putProtaskSplit} from '@/api/mes/pro/protask'
import taskList from './taskList.vue' import taskList from './taskList.vue'
...@@ -789,17 +790,29 @@ export default { ...@@ -789,17 +790,29 @@ export default {
}, },
handlePrint(){ handlePrint(){
const ids = this.selections.map(v => v.taskId) const ids = this.selections.map(v => v.taskId)
printData(ids).then(res => { if(!this.single && this.selections[0].sourceTaskWorkunitId) {
if (res.data) { printDataBySpil(this.selections[0].taskWorkunitId).then(res => {
postBatchPrintPdf( if (res.data) {
res.data.reportName, postBatchPrintPdf(
res.data.valueList res.data.reportName,
).then(()=> { res.data.valueList
).then(()=> {
})
} })
}) }
})
} else {
printData(ids).then(res => {
if (res.data) {
postBatchPrintPdf(
res.data.reportName,
res.data.valueList
).then(()=> {
})
}
})
}
}, },
// 表单重置 // 表单重置
reset() { reset() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment