Browse Source

优化任务单预览接口

master
李磊 3 years ago
parent
commit
52a11cdfb0
  1. 3
      src/components/drawerDialog/index.vue
  2. 43
      src/views/allot/rwd_list.vue
  3. 2
      src/views/ysjl/3000/common/index.vue

3
src/components/drawerDialog/index.vue

@ -775,6 +775,9 @@ export default {
}, { }, {
value: 'HZD', value: 'HZD',
label: '回执单' label: '回执单'
}, {
value: 'RWD',
label: '任务单'
} }
], ],
jylbList: [], jylbList: [],

43
src/views/allot/rwd_list.vue

@ -232,55 +232,27 @@ export default {
} }
}, },
printRwd() { printRwd() {
if (this.multipleSelection.length > 1) { if (this.multipleSelection.length && this.multipleSelection.length > 1) {
this.$message({ message: '只能打印一份任务单', type: 'error' }) this.$message({ message: '只能打印一份任务单', type: 'error' })
return return
} }
this.apibjd({
url: '/renwu/printRwd', this.preview({
url: '/print/generatePdfRwd',
method: 'get', method: 'get',
params: { 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 => { }).then(data => {
data = data.replace(/\\/g, '/') 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) window.open(data)
}) })
})
}, },
batchPrintRwd() { batchPrintRwd() {
if (this.multipleSelection.length === 0) { if (this.multipleSelection.length === 0) {
this.$message({ message: '请选择至少一条数据进行打印!', type: 'error' }) this.$message({ message: '请选择至少一条数据进行打印!', type: 'error' })
return false return false
} }
this.apibjd({
url: '/renwu/printRwdBatch',
method: 'get',
params: {
rwdId: this.$refs.list.selection.map(rwd => {
return rwd.id
}).join(',')
}
}).then(data => {
this.preview({
url: '/print/generatePdfListingBatch',
method: 'post',
data: {
list: data,
viewType: 'RWD'
}
}).then(data => {
if (data === 'success') {
this.preview({ this.preview({
url: '/print/createXmlOther', url: '/print/createXmlOther',
method: 'post', method: 'post',
@ -293,11 +265,6 @@ export default {
}).then(data => { }).then(data => {
this.printbutton = 'ReportPrintApp://' + data this.printbutton = 'ReportPrintApp://' + data
}) })
} else {
this.$message({ message: '未能成功调用打印程序!', type: 'error' })
}
})
})
}, },
getTeamList(departmentId) { // getTeamList(departmentId) { //
this.apibjd({ this.apibjd({

2
src/views/ysjl/3000/common/index.vue

@ -1106,7 +1106,7 @@ export default {
saveYsjl(operation) { saveYsjl(operation) {
const tableData = [] const tableData = []
const arr = [] const arr = []
if(this.fromType=='5'){ if (this.fromType === '5') {
arr.push(this.$refs.table2.tableData) arr.push(this.$refs.table2.tableData)
} else { } else {
this.arrayGroup.map((item) => { this.arrayGroup.map((item) => {

Loading…
Cancel
Save