From f2909ec9ca101f1562bec9405294da6e3a95f497 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B5=B5=E5=AE=8F=E6=96=8C?= <2164406372@qq.com>
Date: Tue, 29 Jul 2025 10:10:29 +0800
Subject: [PATCH] =?UTF-8?q?1.=E6=A0=B8=E5=BF=83=E5=A4=87=E5=93=81=E5=A4=87?=
=?UTF-8?q?=E4=BB=B6=E5=8F=AF=E4=BB=A5=E5=A2=9E=E5=88=A0=E6=94=B9=EF=BC=8C?=
=?UTF-8?q?=E5=B9=B6=E5=8F=AF=E4=BB=A5=E5=AF=B9=E6=96=B0=E8=80=81=E5=BA=8F?=
=?UTF-8?q?=E5=88=97=E5=8F=B7=E8=BF=9B=E8=A1=8C=E7=BC=96=E8=BE=91=202.?=
=?UTF-8?q?=E7=82=B9=E5=87=BB=E5=88=B0=E8=BE=BE=E6=97=B6=EF=BC=8C=E8=BD=AF?=
=?UTF-8?q?=E6=A0=87=E4=B8=8D=E9=9C=80=E8=A6=81=E9=99=90=E5=88=B6=203.?=
=?UTF-8?q?=E6=89=A7=E8=A1=8C=E4=BF=9D=E5=AD=98=E6=97=B6=EF=BC=8C=E5=AE=9E?=
=?UTF-8?q?=E9=99=85=E4=BA=BA=E5=91=98=E8=BD=AF=E6=A0=87=E4=B8=8D=E9=9C=80?=
=?UTF-8?q?=E8=A6=81=E9=99=90=E5=88=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../reportWorkOrder/reportDefectOrder.vue | 79 ++++++++++++++++++-
.../reportWorkOrder/reportDefectOrder2.vue | 79 ++++++++++++++++++-
2 files changed, 150 insertions(+), 8 deletions(-)
diff --git a/src/views/modules/reportWorkOrder/reportDefectOrder.vue b/src/views/modules/reportWorkOrder/reportDefectOrder.vue
index 628e05e..68ef1f8 100644
--- a/src/views/modules/reportWorkOrder/reportDefectOrder.vue
+++ b/src/views/modules/reportWorkOrder/reportDefectOrder.vue
@@ -442,6 +442,7 @@
+ {{'新增'}}
@@ -597,8 +604,8 @@
- 备件编码
-
+ 备件编码
+
@@ -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
diff --git a/src/views/modules/reportWorkOrder/reportDefectOrder2.vue b/src/views/modules/reportWorkOrder/reportDefectOrder2.vue
index 0162127..63bdf74 100644
--- a/src/views/modules/reportWorkOrder/reportDefectOrder2.vue
+++ b/src/views/modules/reportWorkOrder/reportDefectOrder2.vue
@@ -434,6 +434,7 @@
+ {{'新增'}}
@@ -589,8 +596,8 @@
- 备件编码
-
+ 备件编码
+
@@ -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 () {