From 187fa28ea6089f75fcebea18b74990dab7acf625 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BE=99=E8=BF=90=E6=A8=A1?= <1724894114@qq.com>
Date: Tue, 22 Jul 2025 16:15:37 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=BB=B4=E4=BF=AE=E6=A8=A1?=
=?UTF-8?q?=E5=9D=97=E9=80=BB=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/order/order-info.vue | 31 ++++++++++++++++++++----
src/views/order/repairList/index.vue | 12 +++++++++
src/views/order/repairListDown/index.vue | 23 ++++++++++--------
3 files changed, 51 insertions(+), 15 deletions(-)
diff --git a/src/views/order/order-info.vue b/src/views/order/order-info.vue
index 7f255b8..a537f20 100644
--- a/src/views/order/order-info.vue
+++ b/src/views/order/order-info.vue
@@ -28,12 +28,17 @@
-
-
-
+
+
+
+
+
+
+
-
+
+
@@ -93,7 +98,23 @@ export default {
}
// res.data.business_status>4
if(res.data.repair_records && res.data.repair_records.length>0){
- this.repair_records = res.data.repair_records;
+ // 取数组 m_ascription 为 1, 2 的最后一条数据
+ res.data.repair_records.forEach(item=>{
+ item.fault_type = res.data.fault_type;
+ })
+ let m_ascription_one = res.data.repair_records.filter(item=>item.m_ascription === 1).pop();
+ let m_ascription_two = res.data.repair_records.filter(item=>item.m_ascription === 2).pop();
+
+ if(m_ascription_one){
+ m_ascription_one.part_sn_one = m_ascription_one.part_sn;
+ m_ascription_one.part_mpn_one = m_ascription_one.part_mpn;
+ }
+ if(m_ascription_two){
+ m_ascription_one.part_sn_two = m_ascription_two.part_sn;
+ m_ascription_one.part_mpn_two = m_ascription_two.part_mpn;
+ }
+
+ this.repair_records = [m_ascription_one].filter(item=>item);
}
}
this.loading = false;
diff --git a/src/views/order/repairList/index.vue b/src/views/order/repairList/index.vue
index 0778f8e..c8ae2ee 100644
--- a/src/views/order/repairList/index.vue
+++ b/src/views/order/repairList/index.vue
@@ -239,6 +239,14 @@ export default {
}
},
async getField(data,searchParams) {
+ this.params.repair_status = {
+ operator:"in",
+ value:[2,3]
+ };
+ searchParams.repair_status = {
+ operator:"in",
+ value:[2,3]
+ };
const res = await this.$API.orders.order.repair.field.post(searchParams);
if (res.code == 200) {
if (res.data && res.data.length > 0) {
@@ -342,6 +350,10 @@ export default {
this.selection = selection;
},
upSearch(){
+ this.params.repair_status = {
+ operator:"in",
+ value:[2,3]
+ };
this.$refs.table.upData(this.params);
},
reset(){
diff --git a/src/views/order/repairListDown/index.vue b/src/views/order/repairListDown/index.vue
index cba9846..513220a 100644
--- a/src/views/order/repairListDown/index.vue
+++ b/src/views/order/repairListDown/index.vue
@@ -1,13 +1,5 @@
-
-
-
-
-
-
-
-
@@ -32,7 +24,6 @@
-
-
工单详情
工单日志
@@ -222,6 +212,15 @@ export default {
}
},
async getField(data,searchParams) {
+ // 这里重新赋值给 params 和 searchParams
+ this.params.repair_status = {
+ operator:"in",
+ value:[4]
+ };
+ searchParams.repair_status = {
+ operator:"in",
+ value:[4]
+ };
const res = await this.$API.orders.order.repair.field.post(searchParams);
if (res.code == 200) {
if (res.data && res.data.length > 0) {
@@ -292,6 +291,10 @@ export default {
this.selection = selection;
},
upSearch(){
+ this.params.repair_status = {
+ operator:"in",
+ value:[4]
+ };
this.$refs.table.upData(this.params);
},
reset(){