| | |
| | | <div v-if="this.previewpdf" class="pdfimgmin"> |
| | | <!-- <img :src="pdfimg" /> --> |
| | | <el-image |
| | | style="width: 100px; height: 100px" |
| | | style="width: 95%; height: 90%" |
| | | :src="pdfimg" |
| | | :preview-src-list="pdfimgsrcList" |
| | | > |
| | | <!-- <div slot="error" class="image-slot"> |
| | | <i class="el-icon-picture-outline"></i> |
| | | </div> --> |
| | | </el-image> |
| | | </div> |
| | | <div v-else class="pdfimgmins">{{ hintitle }}</div> |
| | |
| | | loading: true, |
| | | // 导出遮罩层 |
| | | exportLoading: false, |
| | | // 网络请求头 |
| | | Networkheader: null, |
| | | |
| | | // 当前单据ID |
| | | curId: 0, |
| | |
| | | }, |
| | | |
| | | created() { |
| | | this.Getnetworkheader(); |
| | | |
| | | //获取记录列表 |
| | | // this.getList(); |
| | | |
| | |
| | | |
| | | methods: { |
| | | handleUploadError() {}, |
| | | |
| | | // 获取请求头 |
| | | Getnetworkheader() { |
| | | console.log(window.location.href); |
| | | let string = window.location.href; |
| | | if (string.includes("9091")) { |
| | | const index = string.indexOf("9091"); |
| | | this.Networkheader = string.slice(0, index + 4); // 截取9091及其前部字符 |
| | | console.log(this.Networkheader); |
| | | } else { |
| | | const index = string.indexOf("8032"); |
| | | this.Networkheader = string.slice(0, index + 4); // 截取8032及其前部字符 |
| | | console.log(this.Networkheader); |
| | | } |
| | | }, |
| | | remove(file, fileList) { |
| | | const rbDetails = [...this.rbDetails]; |
| | | this.fileListto.splice(this.fileListto.indexOf(file), 1); |
| | |
| | | //文件上传成功回调 |
| | | uploadSccess(response, file, fileList) { |
| | | this.rbDetails; |
| | | |
| | | //获取票据信息位置 |
| | | if (response.code == 200) { |
| | | this.form.filename = file.raw.name; |
| | | |
| | | this.$modal.msgSuccess(response.msg); |
| | | this.fileListto.push({ name: file.name, url: response.url }); |
| | | this.fileListto.push({ |
| | | name: file.name, |
| | | url: response.fileName |
| | | }); |
| | | // this.fileListto.push({ |
| | | // name: file.name, |
| | | // url: response.url |
| | | // }); |
| | | this.rbDetails[this.atpresent].annexfilesList = this.fileListto; |
| | | } else { |
| | | console.log(response.msg); |
| | |
| | | Filepopup(index, rows, row) { |
| | | this.atpresent = index; |
| | | this.pdfVisible = true; |
| | | console.log(this.rbDetails[index]); |
| | | if (this.rbDetails[index].annexfilesList) { |
| | | this.fileListto = this.rbDetails[index].annexfilesList; |
| | | console.log(this.fileListto); |
| | | this.pdfimg = this.Networkheader + "/prod-api" + this.fileListto[0].url; |
| | | console.log(this.pdfimg); |
| | | this.pdfimgsrcList = []; |
| | | this.pdfimgsrcList.push(this.pdfimg); |
| | | } else { |
| | | this.fileListto = []; |
| | | this.pdfimg = ""; |
| | |
| | | } else if (name[1] == "jpg" || "png") { |
| | | this.previewpdf = true; |
| | | if (item.url) { |
| | | this.pdfimg = item.url; |
| | | this.pdfimgsrcList=[] |
| | | this.pdfimgsrcList.push(item.url); |
| | | this.pdfimg = this.Networkheader + "/prod-api" + item.url; |
| | | this.pdfimgsrcList = []; |
| | | this.pdfimgsrcList.push(this.pdfimg); |
| | | console.log(this.pdfimg); |
| | | } else { |
| | | this.pdfimg = item.response.url; |
| | | this.pdfimg = this.Networkheader + "/prod-api" + item.response.url; |
| | | } |
| | | } else { |
| | | this.hintitle = "当前文件暂不支持预览"; |
| | |
| | | this.loading = true; |
| | | listReimbursement(this.queryParams).then(response => { |
| | | this.reimbursementList = response.rows; |
| | | console.log(this.reimbursementList); |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | |
| | | //获取报销明细信息 |
| | | getReimbursementdetaillist(curId).then(res => { |
| | | this.rbDetails = res.data; |
| | | console.log(this.rbDetails); |
| | | if (this.rbDetails.length == 0) { |
| | | this.addDetailRow(0); |
| | | } |