|
|
|
@ -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); // 禁止页面滑动
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|