Browse Source

优化任务单预览接口

master
李磊 3 years ago
parent
commit
52a11cdfb0
  1. 3
      src/components/drawerDialog/index.vue
  2. 63
      src/views/allot/rwd_list.vue
  3. 28
      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: [],

63
src/views/allot/rwd_list.vue

@ -232,30 +232,20 @@ 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 => { }).then(data => {
this.preview({ data = data.replace(/\\/g, '/')
url: '/print/generatePdfListing', window.open(data)
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)
})
}) })
}, },
batchPrintRwd() { batchPrintRwd() {
@ -263,40 +253,17 @@ export default {
this.$message({ message: '请选择至少一条数据进行打印!', type: 'error' }) this.$message({ message: '请选择至少一条数据进行打印!', type: 'error' })
return false return false
} }
this.apibjd({ this.preview({
url: '/renwu/printRwdBatch', url: '/print/createXmlOther',
method: 'get', method: 'post',
params: { params: {
rwdId: this.$refs.list.selection.map(rwd => { ids: this.$refs.list.selection.map(rwd => {
return rwd.id return rwd.bjdId
}).join(',') }).join(','),
type: 'RWD'
} }
}).then(data => { }).then(data => {
this.preview({ this.printbutton = 'ReportPrintApp://' + data
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' })
}
})
}) })
}, },
getTeamList(departmentId) { // getTeamList(departmentId) { //

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

@ -1106,20 +1106,20 @@ 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) => {
item.data.forEach(k => { item.data.forEach(k => {
delete k.id delete k.id
})
arr.push(item.data)
}) })
arr.push(item.data) const arr1 = JSON.parse(JSON.stringify(this.$refs.table1.tableData))
}) arr1.map(item => {
const arr1 = JSON.parse(JSON.stringify(this.$refs.table1.tableData)) delete item.name
arr1.map(item => { })
delete item.name arr.push(arr1)
})
arr.push(arr1)
} }
this.bgfyData.forEach((row) => { this.bgfyData.forEach((row) => {
tableData.push({ tableData.push({
@ -1175,8 +1175,8 @@ export default {
}, },
save(operation, type, jyxm, fb) { save(operation, type, jyxm, fb) {
if(this.fromType!=='5')this.ysjl.imagePath = this.$refs.table1.imgPath if (this.fromType !== '5') this.ysjl.imagePath = this.$refs.table1.imgPath
// //
if (this.isRepeat) { if (this.isRepeat) {
this.$message({ this.$message({

Loading…
Cancel
Save