|
|
@ -183,6 +183,7 @@ |
|
|
|
:rules="inspectNoticeDetailsRules" |
|
|
|
@uploadListView="uploadListView" |
|
|
|
@submitForm="formClick(arguments)" |
|
|
|
@changeUpload="uploadReportImg" |
|
|
|
> |
|
|
|
<template> |
|
|
|
<template> |
|
|
@ -527,6 +528,7 @@ export default { |
|
|
|
filesList:[], |
|
|
|
formFile: [], |
|
|
|
details: [], |
|
|
|
uploadFormFile:[], |
|
|
|
// inspectUserEmail: null, |
|
|
|
// supplierPackQty: 0, |
|
|
|
// tenantId: null, |
|
|
@ -551,8 +553,10 @@ export default { |
|
|
|
{ type: "input", label: "不合格数量", prop: "failedQty", disabled: true, colSpan: 8 }, |
|
|
|
{ type: "input", label: "合格数量", prop: "goodQty", disabled: true, colSpan: 8 }, |
|
|
|
{ type: "select", label: "ABC类", prop: "abcClass", options: "abcClass", clearable: true, filterable: true, disabled: true, allowCreate: true, colSpan: 8 }, |
|
|
|
// { type: "uploadList", label: "供应商自检报告", prop: "formFile", limit: 1, picExt: ".pdf", colSpan: 12 }, |
|
|
|
// { type: "uploadList", label: "供应商自检报告", prop: "formFile", limit: 1, picExt: ".jpg,.png", colSpan: 12 }, |
|
|
|
{ type: "button", label: "供应商自检报告", colSpan:2 ,buttonText:'获取报告',click:(()=>{this.getGrabimage()})}, |
|
|
|
{ type: "uploadList", label: "",hideFileList:true,hideViewBtn:true, prop: "uploadFormFile", colSpan:2 ,picExt: ".jpg,.png" }, |
|
|
|
// { type: "button", colSpan:2 ,buttonText:'上传报告',buttonType:'warning',click:(()=>{this.uploadImg()})}, |
|
|
|
{ type: "button", label: "", colSpan:3 ,buttonText:'清除报告',buttonType:'danger',click:(()=>{this.clearGrabimageHandle()})}, |
|
|
|
{ type: "viewImg", label: "预览报告",width:"40px",height:'40px', url:null ,srcList:[],colSpan: 24, |
|
|
|
deleteViewImgHandle:((item,img,img_key)=>{this.deleteViewImgHandle(item,img,img_key)}) |
|
|
@ -675,7 +679,7 @@ export default { |
|
|
|
var result = event.data; // 接收函数执行结果 |
|
|
|
_this.currentFileBase64 = 'data:image/png;base64,'+result |
|
|
|
_this.fileBase64List.push(_this.currentFileBase64) |
|
|
|
_this.inspectNoticeDetailsForm[12].srcList = _this.fileBase64List |
|
|
|
_this.inspectNoticeDetailsForm[_this.inspectNoticeDetailsForm.length - 1].srcList = _this.fileBase64List |
|
|
|
_this.Loading.appMainLoading = false |
|
|
|
clearTimeout(_this.gpy_setTimeout) |
|
|
|
this.isRemoveImageIframe = true |
|
|
@ -694,11 +698,23 @@ export default { |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.fileBase64List.splice(img_key, 1) |
|
|
|
this.inspectNoticeDetailsForm[12].srcList = this.fileBase64List |
|
|
|
this.inspectNoticeDetailsForm[this.inspectNoticeDetailsForm.length - 1].srcList = this.fileBase64List |
|
|
|
}).catch(() => { |
|
|
|
|
|
|
|
}); |
|
|
|
}, |
|
|
|
// 上传供应商照片 |
|
|
|
uploadReportImg(file,item){ |
|
|
|
let _base64img = [] |
|
|
|
let reader = new FileReader(); //实例化文件读取对象 |
|
|
|
reader.readAsDataURL(file); //将文件读取为 DataURL,也就是base64编码 |
|
|
|
reader.onload = (e)=> { //文件读取成功完成时触发 |
|
|
|
let dataURL = e.target.result; //获得文件读取成功后的DataURL,也就是base64编码 |
|
|
|
this.fileBase64List.push(dataURL) |
|
|
|
this.inspectNoticeDetailsForm[this.inspectNoticeDetailsForm.length - 1].srcList = this.fileBase64List |
|
|
|
} |
|
|
|
console.log(716,this.fileBase64List) |
|
|
|
}, |
|
|
|
// 获取高拍仪图片 |
|
|
|
getGrabimage(){ |
|
|
|
this.Loading.appMainLoading = true |
|
|
@ -729,8 +745,8 @@ export default { |
|
|
|
}, |
|
|
|
clearGrabimage(){ |
|
|
|
this.fileBase64List = [] |
|
|
|
this.inspectNoticeDetailsForm[12].url = this.fileBase64List[0] |
|
|
|
this.inspectNoticeDetailsForm[12].srcList = this.fileBase64List |
|
|
|
this.inspectNoticeDetailsForm[this.inspectNoticeDetailsForm.length - 1].url = this.fileBase64List[0] |
|
|
|
this.inspectNoticeDetailsForm[this.inspectNoticeDetailsForm.length - 1].srcList = this.fileBase64List |
|
|
|
}, |
|
|
|
// 节点根据是否批量判断显示 |
|
|
|
initDomIfBatch(){ |
|
|
@ -946,7 +962,8 @@ export default { |
|
|
|
sampleQty: 0, // 要求检验数量 |
|
|
|
filesList:[], |
|
|
|
formFile: [], |
|
|
|
details: [] |
|
|
|
details: [], |
|
|
|
uploadFormFile:[] |
|
|
|
// inspectUserEmail: null, |
|
|
|
// supplierPackQty: 0, |
|
|
|
// tenantId: null, |
|
|
@ -1204,7 +1221,12 @@ export default { |
|
|
|
// colSpan: 12 |
|
|
|
// }) |
|
|
|
// } |
|
|
|
|
|
|
|
// 完成质检 |
|
|
|
else if (val[0] == 1) { |
|
|
|
if(!this.fileBase64List || this.fileBase64List.length <= 0){ |
|
|
|
return this.$errorMsg("请提供供应商自检报告") |
|
|
|
} |
|
|
|
let that = this |
|
|
|
that.masterID = that.propsData.id |
|
|
|
// 取消质检报告上传必填项 |
|
|
@ -1501,11 +1523,11 @@ export default { |
|
|
|
}, |
|
|
|
//设置指定行、列、具体单元格颜色 |
|
|
|
cellClassName({row, column, rowIndex, columnIndex}){ |
|
|
|
if (row.detailInspectStatus == 1 && columnIndex === 6) { |
|
|
|
if (row.detailInspectStatus == 1 && columnIndex === 7) { |
|
|
|
return 'cell-class-mrhg' //默认合格 |
|
|
|
} else if (row.detailInspectStatus == 2 && columnIndex === 6) { |
|
|
|
} else if (row.detailInspectStatus == 2 && columnIndex === 7) { |
|
|
|
return 'cell-class-hg'//合格 |
|
|
|
} else if (row.detailInspectStatus == 3 && columnIndex === 6) { |
|
|
|
} else if (row.detailInspectStatus == 3 && columnIndex === 7) { |
|
|
|
return 'cell-class-nohg'//不合格 |
|
|
|
}else{ |
|
|
|
return '' |
|
|
|