Browse Source

1.核心备品备件可以增删改,并可以对新老序列号进行编辑

2.点击到达时,软标不需要限制
3.执行保存时,实际人员软标不需要限制
java8
赵宏斌 6 months ago
parent
commit
f2909ec9ca
  1. 79
      src/views/modules/reportWorkOrder/reportDefectOrder.vue
  2. 79
      src/views/modules/reportWorkOrder/reportDefectOrder2.vue

79
src/views/modules/reportWorkOrder/reportDefectOrder.vue

@ -442,6 +442,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"
@ -463,6 +464,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>
@ -597,8 +604,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)" :disabled="!updateCoreComponentsFlag" style="width: 120px"></el-input>
</el-form-item>
<el-form-item label="备件名称">
<el-input v-model="coreComponentData.partDescription" disabled style="width: 280px"></el-input>
@ -717,6 +724,7 @@
saveTrans, //
saveCoreComponent,
getSparPartImages, //
deleteCoreComponents,//
} from "@/api/eam/eam.js"
import {
downLoadObjectFile,
@ -766,6 +774,7 @@
},
corePartSpareList: [],
corePartSpareListAll: [],
updateCoreComponentsFlag: false,
coreComponentData: {
site: '',
orderNo: '',
@ -2252,6 +2261,7 @@
this.reachData = row
this.chooseReachModelFlag = true
this.planPeople = row.planOperatorName
this.buNo = row.buNo
},
//
@ -2260,7 +2270,7 @@
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
@ -2294,6 +2304,66 @@
}
})
},
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)
})
})
},
//
reportModal (row) {
@ -2335,6 +2405,7 @@
shutdownWarranty: row.repairReportingType === '设备故障' ? '是' : '否',
isReturn: row.isReturn
}
this.buNo = row.buNo
this.activeTable = 'inspection_form'
this.detailModelFlag = true
},
@ -2364,7 +2435,7 @@
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

79
src/views/modules/reportWorkOrder/reportDefectOrder2.vue

@ -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 () {

Loading…
Cancel
Save