报告 支持pdf

master
wangwei 2 years ago
parent c4d96e8115
commit 3831410f89

@ -141,7 +141,7 @@
:limit="1"
:headers="headers"
:on-exceed="uploadHandleExceed"
accept=".jpg,.png"
accept=".jpg,.png,.pdf"
:on-change="uploadOnchange"
:on-success="uploadHandleSuccess"
:on-error="uploadHandleError"
@ -152,7 +152,7 @@
<el-button slot="trigger" size="small" type="primary" :disabled="formData.auditStatus == 1">
{{ choiceFile }}
</el-button>
<div>只能上传 jpg,png 文件且不超过 10 MB</div>
<div>只能上传 jpg,png,pdf 文件且不超过 10 MB</div>
</el-upload>
</el-form-item>
@ -193,7 +193,7 @@
:limit="1"
:headers="headers"
:on-exceed="uploadHandleExceed"
accept=".jpg,.png"
accept=".jpg,.png,.pdf"
:on-change="uploadOnchange1"
:on-success="uploadHandleSuccess1"
:on-error="uploadHandleError"
@ -204,7 +204,7 @@
<el-button slot="trigger" size="small" type="primary" :disabled="formData.auditStatus == 1">
{{ choiceFile1 }}
</el-button>
<div>只能上传 jpg,png 文件且不超过 10 MB</div>
<div>只能上传 jpg,png,pdf 文件且不超过 10 MB</div>
</el-upload>
</el-form-item>
@ -238,7 +238,7 @@
import draggable from "vuedraggable";
import store from "@/store";
import {updateBizById, updateById} from '@/api/inout/orderDetailBiz'
import {previewImage} from '@/api/purchase/supCompany'
import {previewImage,previewFile} from '@/api/purchase/supCompany'
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
@ -455,36 +455,78 @@ export default {
return isJPG || isPNG;
},
showImgViewer(row) {
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
this.certFileUrl =
this.BASE_URL +
"/udiwms/image/register/file/getImage?type=image2&name="+this.inputQuery.filePath;
this.imgList = [];
previewImage({imageUrl: this.inputQuery.filePath, certFileUrl: this.certFileUrl}).then(response => {
if (response.code === 20000) {
this.imgList = response.data;
}
console.log(this.imgList)
this.imgViewerVisible = true;
});
this.imgList.push(this.certFileUrl)
let index = this.inputQuery.filePath.lastIndexOf('.');
if(index===-1){
this.$message.error("文件名异常!")
return false
}
if(this.inputQuery.filePath.substr(index+1)==='pdf'){
let pdf = "application/pdf"
let binaryData = [];
previewFile(this.certFileUrl).then(res=>{
binaryData.push(res);
let URL = window.URL.createObjectURL(new Blob(binaryData, {type: pdf}));
window.open(URL);
})
// window.open(this.imgList[0])
return false
}
this.imgViewerVisible = true;
// previewImage({
// imageUrl: this.inputQuery.licenseUrl,
// certFileUrl: this.certFileUrl,
// }).then((response) => {
// if (response.code === 20000) {
// }
// console.log(this.imgList);
// });
const m = (e) => {
e.preventDefault()
e.preventDefault();
};
document.body.style.overflow = 'hidden';
document.body.style.overflow = "hidden";
document.addEventListener("touchmove", m, false); //
},
showImgViewerCold(row){
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
this.certFileUrl =
this.BASE_URL +
"/udiwms/image/register/file/getImage?type=image2&name="+this.inputQuery.coldFilePath;
this.imgList = [];
previewImage({imageUrl: this.inputQuery.coldFilePath, certFileUrl: this.certFileUrl}).then(response => {
if (response.code === 20000) {
this.imgList = response.data;
}
console.log(this.imgList)
this.imgViewerVisible = true;
});
this.imgList.push(this.certFileUrl)
let index = this.inputQuery.coldFilePath.lastIndexOf('.');
if(index===-1){
this.$message.error("文件名异常!")
return false
}
if(this.inputQuery.coldFilePath.substr(index+1)==='pdf'){
let pdf = "application/pdf"
let binaryData = [];
previewFile(this.certFileUrl).then(res=>{
binaryData.push(res);
let URL = window.URL.createObjectURL(new Blob(binaryData, {type: pdf}));
window.open(URL);
})
// window.open(this.imgList[0])
return false
}
this.imgViewerVisible = true;
// previewImage({
// imageUrl: this.inputQuery.licenseUrl,
// certFileUrl: this.certFileUrl,
// }).then((response) => {
// if (response.code === 20000) {
// }
// console.log(this.imgList);
// });
const m = (e) => {
e.preventDefault()
e.preventDefault();
};
document.body.style.overflow = 'hidden';
document.body.style.overflow = "hidden";
document.addEventListener("touchmove", m, false); //
},

@ -465,7 +465,7 @@ import DialogcChangeNewOrder from "@/views/inout/DialogcChangeNewOrder";
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
import DialogCheck from "@/views/inout/DialogCheck";
import {getBizDetailList} from "@/api/inout/orderDetailBiz";
import {previewImage} from "@/api/purchase/supCompany";
import {previewImage,previewFile} from "@/api/purchase/supCompany";
import {
inspectionStockQRCodeTextPDFFromTemplateStatementFile,
stockQRCodeTextPDFFromTemplateStatementFile
@ -654,39 +654,79 @@ export default {
this.getList();
},
showImgViewer(row) {
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
console.log(this.certFileUrl + "========");
this.certFileUrl =
this.BASE_URL +
"/udiwms/image/register/file/getImage?type=image2&name="+row.filePath;
this.imgList = [];
previewImage({imageUrl: row.filePath, certFileUrl: this.certFileUrl}).then(response => {
if (response.code === 20000) {
this.imgList = response.data;
}
console.log(this.imgList)
this.imgViewerVisible = true;
});
this.imgList.push(this.certFileUrl)
let index = row.filePath.lastIndexOf('.');
if(index===-1){
this.$message.error("文件名异常!")
return false
}
if(row.filePath.substr(index+1)==='pdf'){
let pdf = "application/pdf"
let binaryData = [];
previewFile(this.certFileUrl).then(res=>{
binaryData.push(res);
let URL = window.URL.createObjectURL(new Blob(binaryData, {type: pdf}));
window.open(URL);
})
// window.open(this.imgList[0])
return false
}
this.imgViewerVisible = true;
// previewImage({
// imageUrl: this.inputQuery.licenseUrl,
// certFileUrl: this.certFileUrl,
// }).then((response) => {
// if (response.code === 20000) {
// }
// console.log(this.imgList);
// });
const m = (e) => {
e.preventDefault()
e.preventDefault();
};
document.body.style.overflow = 'hidden';
document.body.style.overflow = "hidden";
document.addEventListener("touchmove", m, false); //
},
showImgViewerCold(row) {
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
console.log(this.certFileUrl + "========");
this.imgListCold = [];
previewImage({imageUrl: row.coldFilePath, certFileUrl: this.certFileUrl}).then(response => {
if (response.code === 20000) {
this.imgListCold = response.data;
}
console.log(this.imgListCold)
this.imgViewerVisibleCold = true;
});
this.certFileUrl =
this.BASE_URL +
"/udiwms/image/register/file/getImage?type=image2&name="+row.coldFilePath;
this.imgList = [];
this.imgList.push(this.certFileUrl)
let index = row.coldFilePath.lastIndexOf('.');
if(index===-1){
this.$message.error("文件名异常!")
return false
}
if(row.coldFilePath.substr(index+1)==='pdf'){
let pdf = "application/pdf"
let binaryData = [];
previewFile(this.certFileUrl).then(res=>{
binaryData.push(res);
let URL = window.URL.createObjectURL(new Blob(binaryData, {type: pdf}));
window.open(URL);
})
// window.open(this.imgList[0])
return false
}
this.imgViewerVisible = true;
// previewImage({
// imageUrl: this.inputQuery.licenseUrl,
// certFileUrl: this.certFileUrl,
// }).then((response) => {
// if (response.code === 20000) {
// }
// console.log(this.imgList);
// });
const m = (e) => {
e.preventDefault()
e.preventDefault();
};
document.body.style.overflow = 'hidden';
document.body.style.overflow = "hidden";
document.addEventListener("touchmove", m, false); //
},

@ -554,7 +554,7 @@ import {
} from "@/api/itextpdf/orderPrint"
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
import {previewImage} from '@/api/purchase/supCompany'
import {previewImage,previewFile} from '@/api/purchase/supCompany'
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
@ -753,37 +753,78 @@ export default {
this.showSearch = !this.showSearch;
},
showImgViewer(row) {
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
this.certFileUrl =
this.BASE_URL +
"/udiwms/image/register/file/getImage?type=image2&name="+row.filePath;
this.imgList = [];
previewImage({imageUrl: row.filePath, certFileUrl: this.certFileUrl}).then(response => {
if (response.code === 20000) {
this.imgList = response.data;
}
console.log(this.imgList)
this.imgViewerVisible = true;
});
this.imgList.push(this.certFileUrl)
let index = row.filePath.lastIndexOf('.');
if(index===-1){
this.$message.error("文件名异常!")
return false
}
if(row.filePath.substr(index+1)==='pdf'){
let pdf = "application/pdf"
let binaryData = [];
previewFile(this.certFileUrl).then(res=>{
binaryData.push(res);
let URL = window.URL.createObjectURL(new Blob(binaryData, {type: pdf}));
window.open(URL);
})
// window.open(this.imgList[0])
return false
}
this.imgViewerVisible = true;
// previewImage({
// imageUrl: this.inputQuery.licenseUrl,
// certFileUrl: this.certFileUrl,
// }).then((response) => {
// if (response.code === 20000) {
// }
// console.log(this.imgList);
// });
const m = (e) => {
e.preventDefault()
e.preventDefault();
};
document.body.style.overflow = 'hidden';
document.body.style.overflow = "hidden";
document.addEventListener("touchmove", m, false); //
},
showImgViewerCold(row) {
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
console.log(this.certFileUrl + "========");
this.imgListCold = [];
previewImage({imageUrl: row.coldFilePath, certFileUrl: this.certFileUrl}).then(response => {
if (response.code === 20000) {
this.imgListCold = response.data;
}
console.log(this.imgListCold)
this.imgViewerVisibleCold = true;
});
this.certFileUrl =
this.BASE_URL +
"/udiwms/image/register/file/getImage?type=image2&name="+row.coldFilePath;
this.imgList = [];
this.imgList.push(this.certFileUrl)
let index = row.coldFilePath.lastIndexOf('.');
if(index===-1){
this.$message.error("文件名异常!")
return false
}
if(row.coldFilePath.substr(index+1)==='pdf'){
let pdf = "application/pdf"
let binaryData = [];
previewFile(this.certFileUrl).then(res=>{
binaryData.push(res);
let URL = window.URL.createObjectURL(new Blob(binaryData, {type: pdf}));
window.open(URL);
})
// window.open(this.imgList[0])
return false
}
this.imgViewerVisible = true;
// previewImage({
// imageUrl: this.inputQuery.licenseUrl,
// certFileUrl: this.certFileUrl,
// }).then((response) => {
// if (response.code === 20000) {
// }
// console.log(this.imgList);
// });
const m = (e) => {
e.preventDefault()
e.preventDefault();
};
document.body.style.overflow = 'hidden';
document.body.style.overflow = "hidden";
document.addEventListener("touchmove", m, false); //
},

@ -424,7 +424,7 @@ import AcceptOrder from "@/views/inout/DialogThrReviewOrder";
import {getDeptListByUser} from "@/api/auth/authDept";
import DialogCheck from "@/views/inout/DialogCheck";
import {getBizDetailList} from '@/api/inout/orderDetailBiz'
import {previewImage} from '@/api/purchase/supCompany'
import {previewImage,previewFile} from '@/api/purchase/supCompany'
import ElImageViewer from "element-ui/packages/image/src/image-viewer";
@ -620,38 +620,78 @@ export default {
},
showImgViewer(row) {
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
console.log(this.certFileUrl + "========");
this.certFileUrl =
this.BASE_URL +
"/udiwms/image/register/file/getImage?type=image2&name="+row.filePath;
this.imgList = [];
previewImage({imageUrl: row.filePath, certFileUrl: this.certFileUrl}).then(response => {
if (response.code === 20000) {
this.imgList = response.data;
}
console.log(this.imgList)
this.imgViewerVisible = true;
});
this.imgList.push(this.certFileUrl)
let index = row.filePath.lastIndexOf('.');
if(index===-1){
this.$message.error("文件名异常!")
return false
}
if(row.filePath.substr(index+1)==='pdf'){
let pdf = "application/pdf"
let binaryData = [];
previewFile(this.certFileUrl).then(res=>{
binaryData.push(res);
let URL = window.URL.createObjectURL(new Blob(binaryData, {type: pdf}));
window.open(URL);
})
// window.open(this.imgList[0])
return false
}
this.imgViewerVisible = true;
// previewImage({
// imageUrl: this.inputQuery.licenseUrl,
// certFileUrl: this.certFileUrl,
// }).then((response) => {
// if (response.code === 20000) {
// }
// console.log(this.imgList);
// });
const m = (e) => {
e.preventDefault()
e.preventDefault();
};
document.body.style.overflow = 'hidden';
document.body.style.overflow = "hidden";
document.addEventListener("touchmove", m, false); //
},
showImgViewerCold(row) {
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
console.log(this.certFileUrl + "========");
this.imgListCold = [];
previewImage({imageUrl: row.coldFilePath, certFileUrl: this.certFileUrl}).then(response => {
if (response.code === 20000) {
this.imgListCold = response.data;
}
console.log(this.imgListCold)
this.imgViewerVisibleCold = true;
});
this.certFileUrl =
this.BASE_URL +
"/udiwms/image/register/file/getImage?type=image2&name="+row.coldFilePath;
this.imgList = [];
this.imgList.push(this.certFileUrl)
let index = row.coldFilePath.lastIndexOf('.');
if(index===-1){
this.$message.error("文件名异常!")
return false
}
if(row.coldFilePath.substr(index+1)==='pdf'){
let pdf = "application/pdf"
let binaryData = [];
previewFile(this.certFileUrl).then(res=>{
binaryData.push(res);
let URL = window.URL.createObjectURL(new Blob(binaryData, {type: pdf}));
window.open(URL);
})
// window.open(this.imgList[0])
return false
}
this.imgViewerVisible = true;
// previewImage({
// imageUrl: this.inputQuery.licenseUrl,
// certFileUrl: this.certFileUrl,
// }).then((response) => {
// if (response.code === 20000) {
// }
// console.log(this.imgList);
// });
const m = (e) => {
e.preventDefault()
e.preventDefault();
};
document.body.style.overflow = 'hidden';
document.body.style.overflow = "hidden";
document.addEventListener("touchmove", m, false); //
},

Loading…
Cancel
Save