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