|
|
|
@ -246,11 +246,15 @@ |
|
|
|
<el-input v-model="saveData.defectID" style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="故障名称" style="margin-left: -10px"> |
|
|
|
<el-input v-model="saveData.defectDesc" disabled style="width: 200px"></el-input> |
|
|
|
<el-input v-model="saveData.defectDesc" disabled style="width: 180px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item prop="operatorName"> |
|
|
|
<span slot="label" @click="getOperatorList"><a href="#">实际维修人员</a></span> |
|
|
|
<el-input v-model="saveData.operatorName" style="width: 285px"></el-input> |
|
|
|
<span slot="label" @click="saveData.buNo !== '03-RFID' && getOperatorList()"><a href="#">实际维修人员</a></span> |
|
|
|
<el-input v-model="saveData.operatorName" style="width: 140px" :readonly="saveData.buNo === '03-RFID'"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item prop="assistUserName" v-if="saveData.buNo === '03-RFID'"> |
|
|
|
<span slot="label" @click="addAssistantModal"><a href="#">协助人</a></span> |
|
|
|
<el-input v-model="saveData.assistUserName" style="width: 140px" readonly placeholder="点击选择协助人"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="' '"> |
|
|
|
<el-button type="primary" @click="uploadFaultImageModal">故障图片</el-button> |
|
|
|
@ -614,7 +618,10 @@ |
|
|
|
|
|
|
|
<el-dialog title="到达" :close-on-click-modal="false" v-drag :visible.sync="chooseReachModelFlag" width="410px"> |
|
|
|
<el-form :inline="true" label-position="top"> |
|
|
|
<el-form-item > |
|
|
|
<el-form-item v-if="reachData.buNo === '03-RFID'" label="到达人员"> |
|
|
|
<el-input v-model="saveData.operatorName" style="width: 389px" readonly></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item v-else> |
|
|
|
<span slot="label" @click="getOperatorList()"><a>选择到达人员</a></span> |
|
|
|
<el-input v-model="saveData.operatorName" style="width: 389px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
@ -625,6 +632,67 @@ |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 协助人选择对话框 --> |
|
|
|
<el-dialog title="选择协助人" :close-on-click-modal="false" v-drag :visible.sync="assistantModelFlag" width="820px"> |
|
|
|
<div class="rq"> |
|
|
|
<el-form :inline="true" label-position="top" :model="operatorData"> |
|
|
|
<el-form-item :label="'所属角色'"> |
|
|
|
<el-select v-model="operatorData.roleId" placeholder="请选择" style="width: 120px"> |
|
|
|
<el-option |
|
|
|
v-for = "i in roleList" |
|
|
|
:key = "i.roleId" |
|
|
|
:label = "i.roleName" |
|
|
|
:value = "i.roleId"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'人员编码'"> |
|
|
|
<el-input v-model="operatorData.adminID" clearable style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'人员姓名'"> |
|
|
|
<el-input v-model="operatorData.adminName" clearable style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="' '"> |
|
|
|
<el-button type="primary" @click="getOperatorList2">查询</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-table |
|
|
|
:height="300" |
|
|
|
:data="operatorList" |
|
|
|
ref="operatorTable" |
|
|
|
@row-click="operatorClickRow" |
|
|
|
@selection-change="selectionChangeHandle2" |
|
|
|
border |
|
|
|
style="width: 100%;"> |
|
|
|
<el-table-column |
|
|
|
type="selection" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
width="50"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
v-for="(item,index) in operatorDetailList" :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> |
|
|
|
</div> |
|
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center"> |
|
|
|
<el-button type="primary" @click="confirmAssistant()">确认</el-button> |
|
|
|
<el-button type="primary" @click="assistantModelFlag = false">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<el-dialog title="核心备件" :close-on-click-modal="false" v-drag :visible.sync="coreComponentFlag" width="450px"> |
|
|
|
<el-form :inline="true" label-position="top"> |
|
|
|
<el-form-item label="备件编码"> |
|
|
|
@ -1163,6 +1231,8 @@ export default { |
|
|
|
defectDesc: '', |
|
|
|
operator: '', |
|
|
|
operatorName: '', |
|
|
|
assistUser: '', |
|
|
|
assistUserName: '', |
|
|
|
disposalMeasures: '', |
|
|
|
objectID: '', |
|
|
|
objectDesc: '', |
|
|
|
@ -1195,6 +1265,7 @@ export default { |
|
|
|
operatorModelFlag: false, |
|
|
|
operatorList: [], |
|
|
|
roleList: [], |
|
|
|
assistantModelFlag: false, |
|
|
|
dataListSelections2: [], |
|
|
|
operatorDetailList: [ |
|
|
|
{ |
|
|
|
@ -2176,7 +2247,9 @@ export default { |
|
|
|
// 查询人员 |
|
|
|
getOperatorList(this.operatorData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.operatorList = data.rows |
|
|
|
// 过滤掉实际操作人员 |
|
|
|
const actualOperators = (this.saveData.operator || '').split(';').filter(item => item.trim() !== '') |
|
|
|
this.operatorList = data.rows.filter(item => !actualOperators.includes(item.adminID)) |
|
|
|
} else { |
|
|
|
this.operatorList = [] |
|
|
|
} |
|
|
|
@ -2223,6 +2296,66 @@ export default { |
|
|
|
this.operatorModelFlag = false |
|
|
|
}, |
|
|
|
|
|
|
|
// 增加协助人弹窗 |
|
|
|
addAssistantModal () { |
|
|
|
this.operatorData.bu = this.saveData.site + '_' + this.saveData.buNo |
|
|
|
if (this.roleList.length > 0) { |
|
|
|
let filterList = this.roleList.filter(item => item.roleName === '机修') |
|
|
|
if (filterList.length > 0) { |
|
|
|
this.operatorData.roleId = filterList[0].roleId |
|
|
|
} else { |
|
|
|
this.operatorData.roleId = this.roleList[0].roleId |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.operatorData.roleId = '' |
|
|
|
} |
|
|
|
// 先清空缓存选中 |
|
|
|
this.$nextTick(() => this.$refs.operatorTable.clearSelection()) |
|
|
|
// 拿到选中的协助人编号 |
|
|
|
let tempDataList = (this.saveData.assistUser == null ? '' : this.saveData.assistUser).split(';') |
|
|
|
// 查询人员 |
|
|
|
getOperatorList(this.operatorData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
// 过滤掉实际操作人员 |
|
|
|
const actualOperators = (this.saveData.operator || '').split(';').filter(item => item.trim() !== '') |
|
|
|
this.operatorList = data.rows.filter(item => !actualOperators.includes(item.adminID)) |
|
|
|
|
|
|
|
this.operatorList.forEach(val => { |
|
|
|
// 回显选中的协助人 |
|
|
|
if (tempDataList.includes(val.adminID)) { |
|
|
|
this.$nextTick(() => this.$refs.operatorTable.toggleRowSelection(val, true)) |
|
|
|
} |
|
|
|
}) |
|
|
|
this.assistantModelFlag = true |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 确认选择协助人 |
|
|
|
confirmAssistant () { |
|
|
|
if (!this.dataListSelections2 || this.dataListSelections2.length === 0) { |
|
|
|
this.$message.warning('请选择协助人!') |
|
|
|
return |
|
|
|
} |
|
|
|
// 直接使用当前选中的数据替换原有数据 |
|
|
|
let assistUsers = [] |
|
|
|
let assistUserNames = [] |
|
|
|
|
|
|
|
for (let i = 0; i < this.dataListSelections2.length; i++) { |
|
|
|
assistUsers.push(this.dataListSelections2[i].adminID) |
|
|
|
assistUserNames.push(this.dataListSelections2[i].adminName) |
|
|
|
} |
|
|
|
|
|
|
|
// 更新保存数据 |
|
|
|
this.saveData.assistUser = assistUsers.join(';') |
|
|
|
this.saveData.assistUserName = assistUserNames.join(';') |
|
|
|
this.assistantModelFlag = false |
|
|
|
}, |
|
|
|
|
|
|
|
// 校验用户是否收藏 |
|
|
|
favoriteIsOk () { |
|
|
|
let userFavorite = { |
|
|
|
@ -2460,8 +2593,14 @@ export default { |
|
|
|
chooseReachOperator (row) { |
|
|
|
this.saveData.site = row.site |
|
|
|
this.saveData.buNo = row.buNo |
|
|
|
// 只有 03-RFID BU 才固定为计划执行人员 |
|
|
|
if (row.buNo === '03-RFID') { |
|
|
|
this.saveData.operator = row.planOperator || '' |
|
|
|
this.saveData.operatorName = row.planOperatorName || '' |
|
|
|
} else { |
|
|
|
this.saveData.operator = '' |
|
|
|
this.saveData.operatorName = '' |
|
|
|
} |
|
|
|
this.operatorData.bu = row.site + '_' + row.buNo |
|
|
|
this.reachData = row |
|
|
|
this.chooseReachModelFlag = true |
|
|
|
@ -2471,11 +2610,12 @@ export default { |
|
|
|
|
|
|
|
// 到达 |
|
|
|
reach () { |
|
|
|
if (this.saveData.operator === '' || this.saveData.operator == null) { // 2025-02-13 海波要求 |
|
|
|
this.$message.warning('请选择到达人员!') |
|
|
|
if (this.saveData.operator === '' || this.saveData.operator == null) { |
|
|
|
this.$message.warning('到达人员不能为空!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.buNo != '01-Label' && this.planPeople){ |
|
|
|
// 只有非 03-RFID BU 才需要验证是否包含计划人员 |
|
|
|
if (this.buNo != '01-Label' && this.buNo != '03-RFID' && this.planPeople){ |
|
|
|
if (!this.saveData.operatorName.includes(this.planPeople)){ |
|
|
|
this.$message.warning('到达人员中不包含计划人员!') |
|
|
|
return |
|
|
|
@ -2531,8 +2671,10 @@ export default { |
|
|
|
checkWorkPlanId: row.checkWorkPlanId, |
|
|
|
checkItemNo: row.checkItemNo, |
|
|
|
reachDate: row.reachDate, |
|
|
|
operator: row.result == null ? row.reachOperator : row.adminID, |
|
|
|
operatorName: row.result == null ? row.reachOperatorName : row.operator, |
|
|
|
operator: row.buNo === '03-RFID' ? (row.planOperator || row.reachOperator) : (row.result == null ? row.reachOperator : row.adminID), |
|
|
|
operatorName: row.buNo === '03-RFID' ? (row.planOperatorName || row.reachOperatorName) : (row.result == null ? row.reachOperatorName : row.operator), |
|
|
|
assistUser: row.assistUser || '', |
|
|
|
assistUserName: row.assistUserName || '', |
|
|
|
handlingMethod: row.handlingMethod, |
|
|
|
feedBackDesc: row.feedBackDesc, |
|
|
|
faultReason: row.faultReason, |
|
|
|
@ -2579,7 +2721,7 @@ export default { |
|
|
|
this.$message.warning('请填写处理方式,且大于十个字数!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.buNo != '01-Label' && this.saveData.planOperatorName){ |
|
|
|
if (this.buNo != '01-Label' && this.buNo != '03-RFID' && this.saveData.planOperatorName){ |
|
|
|
if (!this.saveData.operatorName.includes(this.saveData.planOperatorName)){ |
|
|
|
this.$message.warning('实际执行人员中不包含计划人员,请检查!') |
|
|
|
return |
|
|
|
|