From 52a11cdfb0f84afeedd8ccb758b40c699593f3ee Mon Sep 17 00:00:00 2001 From: zichen1019 <1510748736@qq.com> Date: Sat, 14 Aug 2021 11:41:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=BB=E5=8A=A1=E5=8D=95?= =?UTF-8?q?=E9=A2=84=E8=A7=88=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/drawerDialog/index.vue | 3 ++ src/views/allot/rwd_list.vue | 63 +++++++-------------------- src/views/ysjl/3000/common/index.vue | 28 ++++++------ 3 files changed, 32 insertions(+), 62 deletions(-) diff --git a/src/components/drawerDialog/index.vue b/src/components/drawerDialog/index.vue index 83a2987..7014ec1 100644 --- a/src/components/drawerDialog/index.vue +++ b/src/components/drawerDialog/index.vue @@ -775,6 +775,9 @@ export default { }, { value: 'HZD', label: '回执单' + }, { + value: 'RWD', + label: '任务单' } ], jylbList: [], diff --git a/src/views/allot/rwd_list.vue b/src/views/allot/rwd_list.vue index 557773f..6f4c939 100644 --- a/src/views/allot/rwd_list.vue +++ b/src/views/allot/rwd_list.vue @@ -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) { // 获取对应组 diff --git a/src/views/ysjl/3000/common/index.vue b/src/views/ysjl/3000/common/index.vue index d555c7f..e00cd8f 100644 --- a/src/views/ysjl/3000/common/index.vue +++ b/src/views/ysjl/3000/common/index.vue @@ -1106,20 +1106,20 @@ export default { saveYsjl(operation) { const tableData = [] const arr = [] - if(this.fromType=='5'){ + if (this.fromType === '5') { arr.push(this.$refs.table2.tableData) - } else{ - this.arrayGroup.map((item) => { - item.data.forEach(k => { - delete k.id + } else { + this.arrayGroup.map((item) => { + item.data.forEach(k => { + delete k.id + }) + arr.push(item.data) }) - arr.push(item.data) - }) - const arr1 = JSON.parse(JSON.stringify(this.$refs.table1.tableData)) - arr1.map(item => { - delete item.name - }) - arr.push(arr1) + const arr1 = JSON.parse(JSON.stringify(this.$refs.table1.tableData)) + arr1.map(item => { + delete item.name + }) + arr.push(arr1) } this.bgfyData.forEach((row) => { tableData.push({ @@ -1175,8 +1175,8 @@ export default { }, 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) { this.$message({