|
|
@ -181,6 +181,7 @@ |
|
|
width="300" |
|
|
width="300" |
|
|
label="操作"> |
|
|
label="操作"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<a type="text" size="small" @click="getFileModel(scope.row)">附件</a> |
|
|
<a type="text" size="small" @click="getDetailModel(scope.row)">查看</a> |
|
|
<a type="text" size="small" @click="getDetailModel(scope.row)">查看</a> |
|
|
<a type="text" size="small" @click="doPrint(scope.row)">打印</a> |
|
|
<a type="text" size="small" @click="doPrint(scope.row)">打印</a> |
|
|
<a type="text" size="small" v-if="scope.row.status!='已完结'" @click="getDetailModel2(scope.row)">紧急处理方式</a> |
|
|
<a type="text" size="small" v-if="scope.row.status!='已完结'" @click="getDetailModel2(scope.row)">紧急处理方式</a> |
|
|
@ -273,7 +274,6 @@ |
|
|
<span style="font-size: 12px">时间   </span> <el-input v-model="abnormalFeedBackData.timeTemporary" :disabled="disableFlag2" style="width: 70px"></el-input> |
|
|
<span style="font-size: 12px">时间   </span> <el-input v-model="abnormalFeedBackData.timeTemporary" :disabled="disableFlag2" style="width: 70px"></el-input> |
|
|
<span style="font-size: 12px">投料量</span> <el-input v-model="abnormalFeedBackData.feedingTemporary" :disabled="disableFlag2" style="width: 70px"></el-input> |
|
|
<span style="font-size: 12px">投料量</span> <el-input v-model="abnormalFeedBackData.feedingTemporary" :disabled="disableFlag2" style="width: 70px"></el-input> |
|
|
<span style="font-size: 12px">机台   </span> <el-input v-model="abnormalFeedBackData.resourceTemporary" :disabled="disableFlag2" style="width: 70px"></el-input> |
|
|
<span style="font-size: 12px">机台   </span> <el-input v-model="abnormalFeedBackData.resourceTemporary" :disabled="disableFlag2" style="width: 70px"></el-input> |
|
|
|
|
|
|
|
|
</el-form> |
|
|
</el-form> |
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: 0px;"> |
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: 0px;"> |
|
|
<span style="font-size: 12px"> 功率   </span> <el-input v-model="abnormalFeedBackData.efficiencyTemporary" :disabled="disableFlag2" style="width: 70px"></el-input> |
|
|
<span style="font-size: 12px"> 功率   </span> <el-input v-model="abnormalFeedBackData.efficiencyTemporary" :disabled="disableFlag2" style="width: 70px"></el-input> |
|
|
@ -313,10 +313,66 @@ |
|
|
<el-footer style="height:30px;margin-top: 10px;text-align:center"> |
|
|
<el-footer style="height:30px;margin-top: 10px;text-align:center"> |
|
|
<el-button type="primary" @click="saveAbnormalDetail()" v-if="disableFlag4">保存</el-button> |
|
|
<el-button type="primary" @click="saveAbnormalDetail()" v-if="disableFlag4">保存</el-button> |
|
|
<el-button type="primary" @click="modalFlag = false">取消</el-button> |
|
|
<el-button type="primary" @click="modalFlag = false">取消</el-button> |
|
|
|
|
|
|
|
|
</el-footer> |
|
|
</el-footer> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
<el-dialog title="附件" :close-on-click-modal="false" v-drag :visible.sync="fileModalFlag" width="650px" > |
|
|
|
|
|
<el-form label-position="top" style="margin-top: 1px; margin-left: 0px;"> |
|
|
|
|
|
<el-form :inline="true" label-position="top" style="margin-top: 0px"> |
|
|
|
|
|
<el-button type="primary" @click="addUploadFileModal">上传文件</el-button> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<el-table |
|
|
|
|
|
:data="fileData" |
|
|
|
|
|
height="240" |
|
|
|
|
|
border |
|
|
|
|
|
v-loading="false" |
|
|
|
|
|
style="width: 100%; "> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
v-for="(item,index) in columnFileContentArray" :key="index" |
|
|
|
|
|
:sortable="item.columnSortable" |
|
|
|
|
|
:prop="item.columnProp" |
|
|
|
|
|
:header-align="item.headerAlign" |
|
|
|
|
|
:show-overflow-tooltip="item.showOverflowTooltip" |
|
|
|
|
|
:align="item.align" |
|
|
|
|
|
:fixed="item.fixed==''?false:item.fixed" |
|
|
|
|
|
:min-width="item.columnWidth" |
|
|
|
|
|
:label="item.columnLabel"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span> |
|
|
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" |
|
|
|
|
|
style="width: 100px; height: 80px"/></span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
fixed="right" |
|
|
|
|
|
header-align="center" |
|
|
|
|
|
align="center" |
|
|
|
|
|
width="100" |
|
|
|
|
|
label="操作"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<!-- <a :href="'http://192.168.1.130:80/file/'+scope.row.url" :download="scope.row.fileName">下载</a>--> |
|
|
|
|
|
<a @click="downloadFile(scope.row)" >下载</a> |
|
|
|
|
|
<a type="text" size="small" @click="deleteHandle(scope.row.id)">删除</a> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
<el-dialog title="上传附件" :close-on-click-modal="false" v-drag :visible.sync="upLoadModalFlag" width="400px" > |
|
|
|
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: 0px;"> |
|
|
|
|
|
<el-upload drag :file-list="fileList" |
|
|
|
|
|
action="javascript:void(0);" ref="uploadFile" |
|
|
|
|
|
:on-change="onChange" |
|
|
|
|
|
multiple :auto-upload="false" |
|
|
|
|
|
style="text-align: left;"> |
|
|
|
|
|
<i class="el-icon-upload"></i> |
|
|
|
|
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div> |
|
|
|
|
|
</el-upload> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<el-footer style="height:30px;margin-top: 10px;text-align:center"> |
|
|
|
|
|
<el-button type="primary" @click="upLoadFiles()" >保存</el-button> |
|
|
|
|
|
<el-button type="primary" @click="upLoadModalFlag = false">取消</el-button> |
|
|
|
|
|
</el-footer> |
|
|
|
|
|
</el-dialog> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
@ -329,21 +385,25 @@ |
|
|
saveAbnormalDetail, |
|
|
saveAbnormalDetail, |
|
|
openFeedBack, |
|
|
openFeedBack, |
|
|
closeFeedBack, |
|
|
closeFeedBack, |
|
|
|
|
|
|
|
|
} from "@/api/abnormal.js" |
|
|
} from "@/api/abnormal.js" |
|
|
import { |
|
|
import { |
|
|
getSOScheduleRoutingDataForShiyanshi, |
|
|
getSOScheduleRoutingDataForShiyanshi, |
|
|
|
|
|
|
|
|
|
|
|
downLoadProjectFile, |
|
|
|
|
|
upLoadAbnormalFiles, |
|
|
} from '@/api/production/inspect.js' |
|
|
} from '@/api/production/inspect.js' |
|
|
import { |
|
|
import { |
|
|
printABLabel, |
|
|
printABLabel, |
|
|
} from "@/views/modules/print/print_Abnormal_label.js" |
|
|
} from "@/views/modules/print/print_Abnormal_label.js" |
|
|
|
|
|
import {ossListForOther} from '@/api/ftp/oss.js' |
|
|
export default { |
|
|
export default { |
|
|
name: 'AbnormalFeedBack', |
|
|
name: 'AbnormalFeedBack', |
|
|
data () { |
|
|
data () { |
|
|
return { |
|
|
return { |
|
|
|
|
|
upLoadModalFlag:false, |
|
|
|
|
|
fileModalFlag:false, |
|
|
folder: 'abnormal', |
|
|
folder: 'abnormal', |
|
|
fileList: [], |
|
|
fileList: [], |
|
|
|
|
|
fileData: [], |
|
|
searchData:{ |
|
|
searchData:{ |
|
|
userId:this.$store.state.user.name, |
|
|
userId:this.$store.state.user.name, |
|
|
startDate:'', |
|
|
startDate:'', |
|
|
@ -354,6 +414,11 @@ |
|
|
operatorDesc:'', |
|
|
operatorDesc:'', |
|
|
partDesc:'', |
|
|
partDesc:'', |
|
|
}, |
|
|
}, |
|
|
|
|
|
upLoadData: { |
|
|
|
|
|
id:0, |
|
|
|
|
|
site:'', |
|
|
|
|
|
}, |
|
|
|
|
|
fileContentList: [], |
|
|
// 导出 start |
|
|
// 导出 start |
|
|
exportData: [], |
|
|
exportData: [], |
|
|
exportDataStandard: { |
|
|
exportDataStandard: { |
|
|
@ -405,6 +470,11 @@ |
|
|
dataListLoading:false, |
|
|
dataListLoading:false, |
|
|
// 导出 end |
|
|
// 导出 end |
|
|
height:200, |
|
|
height:200, |
|
|
|
|
|
fileSearchData:{ |
|
|
|
|
|
fileTypeCode:'Abnormal', |
|
|
|
|
|
orderRef1:'', |
|
|
|
|
|
orderRef2:'' |
|
|
|
|
|
}, |
|
|
tableData:[], |
|
|
tableData:[], |
|
|
addData:{ |
|
|
addData:{ |
|
|
site:'', |
|
|
site:'', |
|
|
@ -429,6 +499,33 @@ |
|
|
abnormalFeedBackData:{ |
|
|
abnormalFeedBackData:{ |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
columnFileContentArray: [ |
|
|
|
|
|
{ |
|
|
|
|
|
columnProp: 'fileName', |
|
|
|
|
|
headeralign: 'left', |
|
|
|
|
|
align: 'left', |
|
|
|
|
|
columnLabel: '文件名称', |
|
|
|
|
|
columnHidden: false, |
|
|
|
|
|
columnImage: false, |
|
|
|
|
|
columnSortable: false, |
|
|
|
|
|
sortLv: 0, |
|
|
|
|
|
status: true, |
|
|
|
|
|
fixed: false |
|
|
|
|
|
|
|
|
|
|
|
}, { |
|
|
|
|
|
columnProp: 'createDate', |
|
|
|
|
|
headeralign: 'left', |
|
|
|
|
|
align: 'left', |
|
|
|
|
|
columnLabel: '上传时间', |
|
|
|
|
|
columnHidden: false, |
|
|
|
|
|
columnImage: false, |
|
|
|
|
|
columnSortable: true, |
|
|
|
|
|
sortLv: 0, |
|
|
|
|
|
status: true, |
|
|
|
|
|
fixed: false |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
], |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
|
@ -460,6 +557,7 @@ |
|
|
this.addData.abnormalRemark='', |
|
|
this.addData.abnormalRemark='', |
|
|
this.addData.abnormalCode='', |
|
|
this.addData.abnormalCode='', |
|
|
this.getAllAbnormalItem(); |
|
|
this.getAllAbnormalItem(); |
|
|
|
|
|
this.fileList = []; |
|
|
this.addModalFlag=true; |
|
|
this.addModalFlag=true; |
|
|
}, |
|
|
}, |
|
|
seqNoCheck(){ |
|
|
seqNoCheck(){ |
|
|
@ -689,7 +787,115 @@ |
|
|
data.rows[0].abnormalRemark=row.abnormalRemark |
|
|
data.rows[0].abnormalRemark=row.abnormalRemark |
|
|
printABLabel(data.rows); |
|
|
printABLabel(data.rows); |
|
|
}) |
|
|
}) |
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
downloadFile(row){ |
|
|
|
|
|
|
|
|
|
|
|
downLoadProjectFile(row) |
|
|
|
|
|
.then(({data}) => { |
|
|
|
|
|
// 不限制文件下载类型 |
|
|
|
|
|
const blob = new Blob([data], {type: 'application/octet-stream;charset=utf-8'}) |
|
|
|
|
|
// 下载文件名称 |
|
|
|
|
|
const fileName = row.fileName |
|
|
|
|
|
// a标签下载 |
|
|
|
|
|
const linkNode = document.createElement('a') |
|
|
|
|
|
linkNode.download = fileName // a标签的download属性规定下载文件的名称 |
|
|
|
|
|
linkNode.style.display = 'none' |
|
|
|
|
|
linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL |
|
|
|
|
|
console.log(linkNode) |
|
|
|
|
|
// if(val == 'Y'){ |
|
|
|
|
|
// this.pdfVisible = true |
|
|
|
|
|
// this.pdfUrl = linkNode.href |
|
|
|
|
|
// }else { |
|
|
|
|
|
document.body.appendChild(linkNode) |
|
|
|
|
|
linkNode.click() // 模拟在按钮上的一次鼠标单击 |
|
|
|
|
|
URL.revokeObjectURL(linkNode.href) // 释放URL 对象 |
|
|
|
|
|
document.body.removeChild(linkNode) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
getFileModel(row){ |
|
|
|
|
|
this.fileSearchData={ |
|
|
|
|
|
fileTypeCode:'Abnormal', |
|
|
|
|
|
orderRef1:row.site, |
|
|
|
|
|
orderRef2:row.id, |
|
|
|
|
|
} |
|
|
|
|
|
this.getFileList() |
|
|
|
|
|
this.fileModalFlag=true; |
|
|
|
|
|
}, |
|
|
|
|
|
getFileList(){ |
|
|
|
|
|
ossListForOther(this.fileSearchData).then(({data}) => { |
|
|
|
|
|
if (data && data.code == 0) { |
|
|
|
|
|
this.fileData = data.data |
|
|
|
|
|
} else { |
|
|
|
|
|
this.fileData = [] |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
deleteHandle(id) { |
|
|
|
|
|
let ids = [id] |
|
|
|
|
|
this.$confirm(`确定进行[删除]操作?`, '提示', { |
|
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
|
type: 'warning' |
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
this.$http({ |
|
|
|
|
|
url: this.$http.adornUrl('/sys/oss/delete'), |
|
|
|
|
|
method: 'post', |
|
|
|
|
|
data: this.$http.adornData(ids, false) |
|
|
|
|
|
}).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.$message.success('操作成功') |
|
|
|
|
|
this.getFileList() |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message.error(data.msg) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
addUploadFileModal(){ |
|
|
|
|
|
this.upLoadData.site=this.fileSearchData.orderRef1 |
|
|
|
|
|
this.upLoadData.id=this.fileSearchData.orderRef2 |
|
|
|
|
|
this.fileList=[] |
|
|
|
|
|
this.upLoadModalFlag=true; |
|
|
|
|
|
}, |
|
|
|
|
|
upLoadFiles(){ |
|
|
|
|
|
if(null == this.fileList || 0 === this.fileList.length){ |
|
|
|
|
|
this.$alert('未选择附件上传!', '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const formData = new FormData(); |
|
|
|
|
|
//片接文件 |
|
|
|
|
|
for (let i = 0; i < this.fileList.length; i++) { |
|
|
|
|
|
formData.append("file",this.fileList[i].raw) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
formData.append("site", this.upLoadData.site); |
|
|
|
|
|
formData.append("folder", this.folder); |
|
|
|
|
|
formData.append("projectId", this.upLoadData.id); |
|
|
|
|
|
|
|
|
|
|
|
upLoadAbnormalFiles(formData).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.$refs.uploadFile.clearFiles(); |
|
|
|
|
|
this.fileList = []; |
|
|
|
|
|
this.upLoadModalFlag=false |
|
|
|
|
|
this.getFileList() |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: '操作成功', |
|
|
|
|
|
type: 'success', |
|
|
|
|
|
duration: 1500, |
|
|
|
|
|
onClose: () => { |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
|
this.getAllAbnormalItem(); |
|
|
this.getAllAbnormalItem(); |
|
|
|