|
|
|
@ -434,6 +434,7 @@ |
|
|
|
</div> |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane label="核心备品备件更换记录" name="core_component"> |
|
|
|
<el-button @click="insertCoreComponents()" type="primary" style="margin-left: 2px">{{'新增'}}</el-button> |
|
|
|
<div class="rq "> |
|
|
|
<el-table |
|
|
|
:height="280" |
|
|
|
@ -455,6 +456,12 @@ |
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<a @click="updateCoreComponents(scope.row)">编辑</a> |
|
|
|
<a @click="deleteCoreComponents(scope.row)">删除</a> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
</el-tab-pane> |
|
|
|
@ -589,8 +596,8 @@ |
|
|
|
<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="备件编码"> |
|
|
|
<span slot="label" @click="getBaseList(1059)"><a href="#">备件编码</a></span> |
|
|
|
<el-input v-model="coreComponentData.partNo" @blur="partNoBlur(1059)" style="width: 120px"></el-input> |
|
|
|
<span slot="label" @click="getBaseList(1059)" v-if="updateCoreComponentsFlag"><a href="#">备件编码</a></span> |
|
|
|
<el-input v-model="coreComponentData.partNo" @blur="partNoBlur(1059)" style="width: 120px" :disabled="!updateCoreComponentsFlag"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="备件名称"> |
|
|
|
<el-input v-model="coreComponentData.partDescription" disabled style="width: 280px"></el-input> |
|
|
|
@ -709,6 +716,7 @@ import { |
|
|
|
saveTrans, // 维修出库 |
|
|
|
saveCoreComponent, |
|
|
|
getSparPartImages, // 获取备件图片 |
|
|
|
deleteCoreComponents,//删除核心备件 |
|
|
|
} from "@/api/eam/eam.js" |
|
|
|
import { |
|
|
|
downLoadObjectFile, |
|
|
|
@ -746,6 +754,7 @@ export default { |
|
|
|
}, |
|
|
|
data () { |
|
|
|
return { |
|
|
|
updateCoreComponentsFlag: false, |
|
|
|
coreComponentFlag: false, |
|
|
|
uploadDialog: false, |
|
|
|
planPeople:'', |
|
|
|
@ -2240,6 +2249,7 @@ export default { |
|
|
|
this.reachData = row |
|
|
|
this.chooseReachModelFlag = true |
|
|
|
this.planPeople = row.planOperatorName |
|
|
|
this.buNo = row.buNo |
|
|
|
}, |
|
|
|
|
|
|
|
// 到达 |
|
|
|
@ -2248,7 +2258,7 @@ export default { |
|
|
|
this.$message.warning('请选择到达人员!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (!this.planPeople==''){ |
|
|
|
if (this.buNo != '01-Label' && this.planPeople){ |
|
|
|
if (!this.saveData.operatorName.includes(this.planPeople)){ |
|
|
|
this.$message.warning('到达人员中不包含计划人员!') |
|
|
|
return |
|
|
|
@ -2322,6 +2332,7 @@ export default { |
|
|
|
shutdownWarranty: row.repairReportingType === '设备故障' ? '是' : '否', |
|
|
|
isReturn: row.isReturn |
|
|
|
} |
|
|
|
this.buNo = row.buNo |
|
|
|
this.activeTable = 'inspection_form' |
|
|
|
this.detailModelFlag = true |
|
|
|
}, |
|
|
|
@ -2351,7 +2362,7 @@ export default { |
|
|
|
this.$message.warning('请填写处理方式,且大于十个字数!') |
|
|
|
return |
|
|
|
} |
|
|
|
if (!this.saveData.planOperatorName==''){ |
|
|
|
if (this.buNo != '01-Label' && this.saveData.planOperatorName){ |
|
|
|
if (!this.saveData.operatorName.includes(this.saveData.planOperatorName)){ |
|
|
|
this.$message.warning('实际执行人员中不包含计划人员,请检查!') |
|
|
|
return |
|
|
|
@ -2410,6 +2421,66 @@ export default { |
|
|
|
// 刷新列表数据 |
|
|
|
this.refreshCurrentTabTable() |
|
|
|
}, |
|
|
|
insertCoreComponents(){ |
|
|
|
this.coreComponentData = { |
|
|
|
site: this.saveData.site, |
|
|
|
buNo: this.saveData.buNo, |
|
|
|
orderNo: this.saveData.orderNo, |
|
|
|
objectID: this.saveData.objectID, |
|
|
|
createdBy: this.$store.state.user.name, |
|
|
|
partNo: '', |
|
|
|
partDescription: '', |
|
|
|
oldSerialNo: '', |
|
|
|
newSerialNo: '', |
|
|
|
} |
|
|
|
this.updateCoreComponentsFlag = true |
|
|
|
this.coreComponentFlag = true |
|
|
|
}, |
|
|
|
updateCoreComponents(row){ |
|
|
|
this.coreComponentData = { |
|
|
|
site: this.saveData.site, |
|
|
|
buNo: this.saveData.buNo, |
|
|
|
orderNo: this.saveData.orderNo, |
|
|
|
objectID: this.saveData.objectID, |
|
|
|
createdBy: this.$store.state.user.name, |
|
|
|
partNo: row.partNo, |
|
|
|
partDescription: row.partDescription, |
|
|
|
oldSerialNo: row.oldSerialNo, |
|
|
|
newSerialNo: row.newSerialNo, |
|
|
|
} |
|
|
|
this.updateCoreComponentsFlag = false |
|
|
|
this.coreComponentFlag = true |
|
|
|
}, |
|
|
|
deleteCoreComponents(row){ |
|
|
|
this.$confirm('确定删除该核心备件吗?',{ |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(()=>{ |
|
|
|
this.coreComponentData = { |
|
|
|
site: this.saveData.site, |
|
|
|
buNo: this.saveData.buNo, |
|
|
|
orderNo: this.saveData.orderNo, |
|
|
|
objectID: this.saveData.objectID, |
|
|
|
createdBy: this.$store.state.user.name, |
|
|
|
partNo: row.partNo, |
|
|
|
partDescription: row.partDescription, |
|
|
|
oldSerialNo: row.oldSerialNo, |
|
|
|
newSerialNo: row.newSerialNo, |
|
|
|
} |
|
|
|
deleteCoreComponents(this.coreComponentData).then(({data})=>{ |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.getCorePartSpareList() |
|
|
|
this.$message.success(data.msg) |
|
|
|
} else { |
|
|
|
this.$message.warning(data.msg) |
|
|
|
} |
|
|
|
}).catch((error)=>{ |
|
|
|
this.$message.error(error) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 刷新页签的table数据 |
|
|
|
refreshCurrentTabTable () { |
|
|
|
|