|
|
@ -232,30 +232,20 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
printRwd() { |
|
|
|
if (this.multipleSelection.length > 1) { |
|
|
|
if (this.multipleSelection.length && this.multipleSelection.length > 1) { |
|
|
|
this.$message({ message: '只能打印一份任务单', type: 'error' }) |
|
|
|
return |
|
|
|
} |
|
|
|
this.apibjd({ |
|
|
|
url: '/renwu/printRwd', |
|
|
|
|
|
|
|
this.preview({ |
|
|
|
url: '/print/generatePdfRwd', |
|
|
|
method: 'get', |
|
|
|
params: { |
|
|
|
rwdIds: this.multipleSelection[0].id |
|
|
|
rwdId: this.multipleSelection[0].id |
|
|
|
} |
|
|
|
}).then(data => { |
|
|
|
this.preview({ |
|
|
|
url: '/print/generatePdfListing', |
|
|
|
method: 'post', |
|
|
|
data: { |
|
|
|
info: data.info, |
|
|
|
paramList: data.paramList, |
|
|
|
viewType: 'RWD' |
|
|
|
} |
|
|
|
}).then(data => { |
|
|
|
data = data.replace(/\\/g, '/') |
|
|
|
// router.push({ path: '/preview/1/1/urlPath?src=' + store.getters.prodName + '/static/web/viewer.html?file=' + encodeURIComponent(data) + '&v=' + Math.random() }) |
|
|
|
window.open(data) |
|
|
|
}) |
|
|
|
data = data.replace(/\\/g, '/') |
|
|
|
window.open(data) |
|
|
|
}) |
|
|
|
}, |
|
|
|
batchPrintRwd() { |
|
|
@ -263,40 +253,17 @@ export default { |
|
|
|
this.$message({ message: '请选择至少一条数据进行打印!', type: 'error' }) |
|
|
|
return false |
|
|
|
} |
|
|
|
this.apibjd({ |
|
|
|
url: '/renwu/printRwdBatch', |
|
|
|
method: 'get', |
|
|
|
this.preview({ |
|
|
|
url: '/print/createXmlOther', |
|
|
|
method: 'post', |
|
|
|
params: { |
|
|
|
rwdId: this.$refs.list.selection.map(rwd => { |
|
|
|
return rwd.id |
|
|
|
}).join(',') |
|
|
|
ids: this.$refs.list.selection.map(rwd => { |
|
|
|
return rwd.bjdId |
|
|
|
}).join(','), |
|
|
|
type: 'RWD' |
|
|
|
} |
|
|
|
}).then(data => { |
|
|
|
this.preview({ |
|
|
|
url: '/print/generatePdfListingBatch', |
|
|
|
method: 'post', |
|
|
|
data: { |
|
|
|
list: data, |
|
|
|
viewType: 'RWD' |
|
|
|
} |
|
|
|
}).then(data => { |
|
|
|
if (data === 'success') { |
|
|
|
this.preview({ |
|
|
|
url: '/print/createXmlOther', |
|
|
|
method: 'post', |
|
|
|
params: { |
|
|
|
ids: this.$refs.list.selection.map(rwd => { |
|
|
|
return rwd.bjdId |
|
|
|
}).join(','), |
|
|
|
type: 'RWD' |
|
|
|
} |
|
|
|
}).then(data => { |
|
|
|
this.printbutton = 'ReportPrintApp://' + data |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$message({ message: '未能成功调用打印程序!', type: 'error' }) |
|
|
|
} |
|
|
|
}) |
|
|
|
this.printbutton = 'ReportPrintApp://' + data |
|
|
|
}) |
|
|
|
}, |
|
|
|
getTeamList(departmentId) { // 获取对应组 |
|
|
|