| | |
| | | data: query |
| | | }) |
| | | } |
| | | // 原材料下单出厂撤销 |
| | | // 原材料报检全部导出 |
| | | export function rawAllExport(query) { |
| | | return request({ |
| | | url: '/rawMaterialOrder/rawAllExport', |
| | | method: 'post', |
| | | data: query |
| | | data: query, |
| | | responseType: "blob" |
| | | }) |
| | | } |
| | | // 原材料下单出厂撤销 |
| | |
| | | }, |
| | | // 下载报告 |
| | | download(row) { |
| | | let url = (row.urlS===null||row.urlS==='')?row.url:row.urlS |
| | | const link = document.createElement('a'); |
| | | link.href = this.javaApi + url; |
| | | link.target = '_blank'; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | let url = this.javaApi+'/word/' + (row.urlS===null||row.urlS==='')?row.url:row.urlS |
| | | this.$download.saveAs(url, row.fileName); |
| | | }, |
| | | // 还原操作 |
| | | handleRestore(row) { |
| | |
| | | let url = ''; |
| | | if(res.data.type==1){ |
| | | url = this.javaApi+'/img/'+res.data.fileUrl |
| | | file.downloadIamge(url,row.fileName) |
| | | this.$download.saveAs(url, row.fileName); |
| | | }else{ |
| | | url = this.javaApi+'/word/'+res.data.fileUrl |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = row.fileName; |
| | | link.click(); |
| | | this.$download.saveAs(url, row.fileName); |
| | | } |
| | | } |
| | | }).catch(error => { |
| | |
| | | let entity = this.tabIndex === 3 ? { ...this.entity, isInspect: 2 } : { ...this.entity, state: 2, orderState: 4, } |
| | | delete entity.orderBy |
| | | this.outLoading = true |
| | | rawAllExport({ |
| | | entity: entity |
| | | }, { responseType: "blob" }).then(res => { |
| | | rawAllExport({entity: entity}).then(res => { |
| | | this.outLoading = false |
| | | this.$message.success('导出成功') |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = '原材料检测信息导出.xlsx'; |
| | | link.click(); |
| | | let url = this.javaApi + '/word/' + res.data |
| | | this.$download.saveAs(url, '原材料检测信息导出.xlsx'); |
| | | }) |
| | | }, |
| | | // 提交修改委托编号信息 |
| | |
| | | methods: { |
| | | // 进厂检验报告下载 |
| | | downLoad0 () { |
| | | let url = this.downLoadInfo.enterUrlS ? this.downLoadInfo.enterUrlS : this.downLoadInfo.enterUrl |
| | | let url = this.javaApi+'/word/' + this.downLoadInfo.enterUrlS ? this.downLoadInfo.enterUrlS : this.downLoadInfo.enterUrl |
| | | this.$download.saveAs(url, this.downLoadInfo.fileName); |
| | | }, |
| | | // 季度检验报告下载 |
| | | downLoad1 () { |
| | | let url = this.downLoadInfo.quarterUrlS ? this.downLoadInfo.quarterUrlS : this.downLoadInfo.quarterUrl |
| | | let url = this.javaApi+'/word/' + this.downLoadInfo.quarterUrlS ? this.downLoadInfo.quarterUrlS : this.downLoadInfo.quarterUrl |
| | | this.$download.saveAs(url, this.downLoadInfo.fileName); |
| | | } |
| | | }, |
| | |
| | | }, |
| | | // 下载报告 |
| | | download(row) { |
| | | let url = row.urlS?row.urlS:row.url; |
| | | let url = this.javaApi+'/word/' + row.urlS?row.urlS:row.url; |
| | | if(url){ |
| | | url = url.split('.')[0]+'.pdf' |
| | | this.$download.saveAs(url, this.downLoadInfo.fileName); |
| | | } |
| | | }, |
| | |
| | | } |
| | | }, |
| | | download(row) { |
| | | let url = row.urlS ? row.urlS : row.url; |
| | | let url = this.javaApi+'/word/' + row.urlS ? row.urlS : row.url; |
| | | this.$download.saveAs(url, row.fileName); |
| | | }, |
| | | // 还原操作 |