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

优化

parent a3904d69
......@@ -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) {
return request({
......
......@@ -545,6 +545,7 @@ import {
gettaskWorkunitList,
getdefaultWorkCenterList,
rollBACKschedule,
printDataBySpil,
printData} from '@/api/mes/pro/scheduleList'
import {putProtaskSplit} from '@/api/mes/pro/protask'
import taskList from './taskList.vue'
......@@ -789,17 +790,29 @@ export default {
},
handlePrint(){
const ids = this.selections.map(v => v.taskId)
printData(ids).then(res => {
if (res.data) {
postBatchPrintPdf(
res.data.reportName,
res.data.valueList
).then(()=> {
})
}
})
if(!this.single && this.selections[0].sourceTaskWorkunitId) {
printDataBySpil(this.selections[0].taskWorkunitId).then(res => {
if (res.data) {
postBatchPrintPdf(
res.data.reportName,
res.data.valueList
).then(()=> {
})
}
})
} else {
printData(ids).then(res => {
if (res.data) {
postBatchPrintPdf(
res.data.reportName,
res.data.valueList
).then(()=> {
})
}
})
}
},
// 表单重置
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