|
|
@ -193,13 +193,14 @@ |
|
|
fixed="right" |
|
|
fixed="right" |
|
|
header-align="center" |
|
|
header-align="center" |
|
|
align="center" |
|
|
align="center" |
|
|
width="340" |
|
|
|
|
|
|
|
|
width="400" |
|
|
label="操作"> |
|
|
label="操作"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<a type="text" size="small" v-if="(searchData.userId==='admin'||searchData.userId==='E0002')&&scope.row.status!='已完结'" @click="updateModel(scope.row)">修改</a> |
|
|
<a type="text" size="small" v-if="(searchData.userId==='admin'||searchData.userId==='E0002')&&scope.row.status!='已完结'" @click="updateModel(scope.row)">修改</a> |
|
|
<a type="text" size="small" @click="getFileModel(scope.row)">整改文件</a> |
|
|
<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" @click="printResponsibilityBook(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> |
|
|
<a type="text" size="small" v-if="scope.row.status!='已完结'" @click="getDetailModel3(scope.row)">长久处理方式</a> |
|
|
<a type="text" size="small" v-if="scope.row.status!='已完结'" @click="getDetailModel3(scope.row)">长久处理方式</a> |
|
|
<a type="text" size="small" v-if="scope.row.status!='已录入'&&scope.row.status!='已完结'&&isAuth('sys:abnormal:close')" @click="closeFeedBack(scope.row)">结束</a> |
|
|
<a type="text" size="small" v-if="scope.row.status!='已录入'&&scope.row.status!='已完结'&&isAuth('sys:abnormal:close')" @click="closeFeedBack(scope.row)">结束</a> |
|
|
@ -312,6 +313,16 @@ |
|
|
<span style="font-size: 12px">异常原因:</span> |
|
|
<span style="font-size: 12px">异常原因:</span> |
|
|
<el-input v-model="abnormalFeedBackData.abnormalDesc" disabled style="width: 180px"></el-input> |
|
|
<el-input v-model="abnormalFeedBackData.abnormalDesc" disabled style="width: 180px"></el-input> |
|
|
</el-form> |
|
|
</el-form> |
|
|
|
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: 0px;"> |
|
|
|
|
|
<el-form-item> |
|
|
|
|
|
<span slot="label" @click="openResponsibleChooseList('main')"><a herf="#">主要责任人:</a></span> |
|
|
|
|
|
<el-input v-model="abnormalFeedBackData.mainResponsibleDesc" readonly @click.native="openResponsibleChooseList('main')" style="width: 180px"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item> |
|
|
|
|
|
<span slot="label" @click="openResponsibleChooseList('secondary')"><a herf="#">次要责任人:</a></span> |
|
|
|
|
|
<el-input v-model="abnormalFeedBackData.secondaryResponsibleDesc" readonly @click.native="openResponsibleChooseList('secondary')" style="width: 180px"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</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;"> |
|
|
<el-form-item label="异常情况描述"> |
|
|
<el-form-item label="异常情况描述"> |
|
|
<el-input v-model="abnormalFeedBackData.abnormalRemark" type="textarea" :disabled="disableFlag1" :rows="3" resize='none' style="width: 562px"></el-input> |
|
|
<el-input v-model="abnormalFeedBackData.abnormalRemark" type="textarea" :disabled="disableFlag1" :rows="3" resize='none' style="width: 562px"></el-input> |
|
|
@ -499,6 +510,7 @@ |
|
|
<el-button type="primary" @click="upLoadModalFlag = false">取消</el-button> |
|
|
<el-button type="primary" @click="upLoadModalFlag = false">取消</el-button> |
|
|
</el-footer> |
|
|
</el-footer> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
@ -512,6 +524,7 @@ |
|
|
saveAbnormalDetail, |
|
|
saveAbnormalDetail, |
|
|
openFeedBack, |
|
|
openFeedBack, |
|
|
closeFeedBack, |
|
|
closeFeedBack, |
|
|
|
|
|
printResponsibilityBook as printResponsibilityBookApi, |
|
|
} from "@/api/abnormal.js" |
|
|
} from "@/api/abnormal.js" |
|
|
import { |
|
|
import { |
|
|
getSOScheduleRoutingDataForShiyanshi, |
|
|
getSOScheduleRoutingDataForShiyanshi, |
|
|
@ -522,8 +535,12 @@ |
|
|
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' |
|
|
import {ossListForOther} from '@/api/ftp/oss.js' |
|
|
|
|
|
import Chooselist from '@/views/modules/common/Chooselist' |
|
|
export default { |
|
|
export default { |
|
|
name: 'AbnormalFeedBack', |
|
|
name: 'AbnormalFeedBack', |
|
|
|
|
|
components: { |
|
|
|
|
|
Chooselist, |
|
|
|
|
|
}, |
|
|
data () { |
|
|
data () { |
|
|
return { |
|
|
return { |
|
|
upLoadModalFlag:false, |
|
|
upLoadModalFlag:false, |
|
|
@ -638,6 +655,8 @@ |
|
|
disableFlag1:false, |
|
|
disableFlag1:false, |
|
|
disableFlag2:false, |
|
|
disableFlag2:false, |
|
|
disableFlag3:false, |
|
|
disableFlag3:false, |
|
|
|
|
|
tagNo: '', |
|
|
|
|
|
chooseOperatorType: '', |
|
|
abnormalList:[], |
|
|
abnormalList:[], |
|
|
abnormalFeedBackData:{ |
|
|
abnormalFeedBackData:{ |
|
|
|
|
|
|
|
|
@ -722,6 +741,37 @@ |
|
|
this.abnormalList = data.rows; |
|
|
this.abnormalList = data.rows; |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
// 责任人快捷查询(符号26)- rqrq |
|
|
|
|
|
getBaseList (val, type) { |
|
|
|
|
|
this.tagNo = val |
|
|
|
|
|
this.chooseOperatorType = type |
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
let strVal = '' |
|
|
|
|
|
if (val === 26) { |
|
|
|
|
|
strVal = type === 'main' ? this.abnormalFeedBackData.mainResponsibleDesc : this.abnormalFeedBackData.secondaryResponsibleDesc |
|
|
|
|
|
} |
|
|
|
|
|
this.$refs.baseList.init(val, strVal) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
/* 快捷查询回调(通过 type 区分主/次责任人)- rqrq */ |
|
|
|
|
|
getBaseData (val) { |
|
|
|
|
|
if (this.tagNo === 26) { |
|
|
|
|
|
if (this.chooseOperatorType === 'main') { |
|
|
|
|
|
this.abnormalFeedBackData.mainResponsible = val.OperatorID |
|
|
|
|
|
this.abnormalFeedBackData.mainResponsibleDesc = val.OperatorName |
|
|
|
|
|
} else if (this.chooseOperatorType === 'secondary') { |
|
|
|
|
|
this.abnormalFeedBackData.secondaryResponsible = val.OperatorID |
|
|
|
|
|
this.abnormalFeedBackData.secondaryResponsibleDesc = val.OperatorName |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
openResponsibleChooseList (type) { |
|
|
|
|
|
// 仅在紧急/长久处理编辑模式允许选择责任人 - rqrq |
|
|
|
|
|
if (!this.disableFlag4) { |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
this.getBaseList(26, type) |
|
|
|
|
|
}, |
|
|
search(){ |
|
|
search(){ |
|
|
getAbnormalFeedBackList(this.searchData).then(({data}) => { |
|
|
getAbnormalFeedBackList(this.searchData).then(({data}) => { |
|
|
this.tableData = data.rows; |
|
|
this.tableData = data.rows; |
|
|
@ -872,6 +922,12 @@ |
|
|
if(this.abnormalFeedBackData.status=='已录入'){ |
|
|
if(this.abnormalFeedBackData.status=='已录入'){ |
|
|
this.abnormalFeedBackData.status='已填写紧急处理' |
|
|
this.abnormalFeedBackData.status='已填写紧急处理' |
|
|
} |
|
|
} |
|
|
|
|
|
// 打开弹窗时若未指定主要责任人,默认取主记录操作员 - rqrq |
|
|
|
|
|
if((this.abnormalFeedBackData.mainResponsible==null||this.abnormalFeedBackData.mainResponsible==='') && |
|
|
|
|
|
this.abnormalFeedBackData.operatorId!=null&&this.abnormalFeedBackData.operatorId!==''){ |
|
|
|
|
|
this.abnormalFeedBackData.mainResponsible=this.abnormalFeedBackData.operatorId |
|
|
|
|
|
this.abnormalFeedBackData.mainResponsibleDesc=this.abnormalFeedBackData.operatorDesc |
|
|
|
|
|
} |
|
|
this.disableFlag1=true; |
|
|
this.disableFlag1=true; |
|
|
this.disableFlag2=false; |
|
|
this.disableFlag2=false; |
|
|
this.disableFlag3=true; |
|
|
this.disableFlag3=true; |
|
|
@ -883,6 +939,12 @@ |
|
|
if(this.abnormalFeedBackData.status=='已录入'||this.abnormalFeedBackData.status=='已填写紧急处理'){ |
|
|
if(this.abnormalFeedBackData.status=='已录入'||this.abnormalFeedBackData.status=='已填写紧急处理'){ |
|
|
this.abnormalFeedBackData.status='已填写长久处理' |
|
|
this.abnormalFeedBackData.status='已填写长久处理' |
|
|
} |
|
|
} |
|
|
|
|
|
// 打开弹窗时若未指定主要责任人,默认取主记录操作员 - rqrq |
|
|
|
|
|
if((this.abnormalFeedBackData.mainResponsible==null||this.abnormalFeedBackData.mainResponsible==='') && |
|
|
|
|
|
this.abnormalFeedBackData.operatorId!=null&&this.abnormalFeedBackData.operatorId!==''){ |
|
|
|
|
|
this.abnormalFeedBackData.mainResponsible=this.abnormalFeedBackData.operatorId |
|
|
|
|
|
this.abnormalFeedBackData.mainResponsibleDesc=this.abnormalFeedBackData.operatorDesc |
|
|
|
|
|
} |
|
|
this.disableFlag1=true; |
|
|
this.disableFlag1=true; |
|
|
this.disableFlag2=true; |
|
|
this.disableFlag2=true; |
|
|
this.disableFlag3=false; |
|
|
this.disableFlag3=false; |
|
|
@ -1028,6 +1090,30 @@ |
|
|
printABLabel(data.rows); |
|
|
printABLabel(data.rows); |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
printResponsibilityBook(row){ |
|
|
|
|
|
if(row.treatment==null||row.treatment.trim()==''){ |
|
|
|
|
|
this.$alert("请先填写长久处理方式,才能打印责任书", '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
|
|
|
printResponsibilityBookApi({id:row.id}).then(({data}) => { |
|
|
|
|
|
const blob = new Blob([data], {type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'}) |
|
|
|
|
|
const fileName = "生产异常_批量报废责任认定书_" + (row.seqNo||row.id) + ".docx" |
|
|
|
|
|
const linkNode = document.createElement('a') |
|
|
|
|
|
linkNode.download = fileName |
|
|
|
|
|
linkNode.style.display = 'none' |
|
|
|
|
|
linkNode.href = URL.createObjectURL(blob) |
|
|
|
|
|
document.body.appendChild(linkNode) |
|
|
|
|
|
linkNode.click() |
|
|
|
|
|
URL.revokeObjectURL(linkNode.href) |
|
|
|
|
|
document.body.removeChild(linkNode) |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
this.$alert("打印责任书失败,请稍后重试", '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
downloadFile(row){ |
|
|
downloadFile(row){ |
|
|
|
|
|
|
|
|
downLoadProjectFile(row) |
|
|
downLoadProjectFile(row) |
|
|
|