From 850597c9a932a29035bbd7eb5a0ae54fb96e62f5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BE=99=E8=BF=90=E6=A8=A1?= <1724894114@qq.com>
Date: Wed, 21 Aug 2024 16:03:12 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=B7=A5=E5=8D=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/model/orders.js | 21 ++++
src/style/order.scss | 37 ++++++-
src/views/order/create-order.vue | 148 ++++++++++++++--------------
src/views/order/order-info.vue | 70 ++++++-------
src/views/order/orderList/index.vue | 36 ++++---
5 files changed, 191 insertions(+), 121 deletions(-)
diff --git a/src/api/model/orders.js b/src/api/model/orders.js
index 0e273aa..d28ac73 100644
--- a/src/api/model/orders.js
+++ b/src/api/model/orders.js
@@ -120,6 +120,27 @@ export default {
return await http.post(this.url,params);
}
},
+ info:{
+ url: `${config.API_URL}/maintenance.order.detail`,
+ name: "维保工单详情",
+ post: async function (params) {
+ return await http.post(this.url,params);
+ }
+ },
+ delete:{
+ url: `${config.API_URL}/maintenance.order.delete`,
+ name: "删除维保工单",
+ post: async function (params) {
+ return await http.post(this.url,params);
+ }
+ },
+ field:{
+ url: `${config.API_URL}/maintenance.order.field.list`,
+ name: "维保工单检索",
+ post: async function (params) {
+ return await http.post(this.url,params);
+ }
+ }
},
sock: {
diff --git a/src/style/order.scss b/src/style/order.scss
index 4645d69..0277f75 100644
--- a/src/style/order.scss
+++ b/src/style/order.scss
@@ -1,14 +1,45 @@
.orderMain{
+ background: none;
+ padding: 0;
.cardBox{
- margin-bottom: 10px;
.headerView{
- display: flex;justify-content: space-between;
+ border-bottom: 1px solid #e8e8e8;
+ display: flex;justify-content: space-between;align-items: center;
+ padding: 0 0 15px 0;
}
.title{
- margin-bottom: 10px;
+ font-weight: 500;
+ font-size: 13px;
}
.cardBody{
+ padding: 15px 0 0 0;
display: flex;flex-direction: column;
+ .el-row{
+ padding: 12px 0;
+ .el-col{
+ .label{
+ width: 100px;
+ display: inline-block;
+ text-align: right;
+ color: #303133;
+ }
+ .text{
+ color: #222;
+ }
+ }
+ }
+ }
+ }
+ .footerCard{
+ min-height: 800px;
+ margin-top: 10px;
+ .cardItem{
+ margin-bottom: 15px;
+ border-bottom: 1px solid #e8e8e8;
+ padding: 0 0 10px 0;
+ }
+ .cardItem:last-child{
+ border-bottom: 0;
}
}
}
diff --git a/src/views/order/create-order.vue b/src/views/order/create-order.vue
index a3a3c0f..b947831 100644
--- a/src/views/order/create-order.vue
+++ b/src/views/order/create-order.vue
@@ -7,19 +7,19 @@
工作时间
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
+
+
@@ -29,11 +29,11 @@
维保单号
-
-
-
-
-
+
+
+
+
+
@@ -47,41 +47,41 @@
-
-
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
@@ -95,15 +95,15 @@
-
-
+
+
-
-
+
+
@@ -111,75 +111,77 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- 保 存
+ 保 存
@@ -209,11 +211,11 @@ export default {
component_manufacturer: "234", // 部件厂商
component_model: "234", // 部件型号
component_pn: "234", // 部件零件PN号
- sla_expiration: "234", // SLA到期时间
+ sla_expiration: "2024-08-21", // SLA到期时间
bd_backup_count: "234", // 剩余BD数
- pe_confirmation_time: "234", // PE确认时间
+ pe_confirmation_time: "2024-08-21", // PE确认时间
warranty_end_date: "234", // 保修期结束
- maintenance_plan: "234" // 维保等级:1-铜牌;常量维护项
+ maintenance_plan: '' // 维保等级:1-铜牌;常量维护项
}
}
},
@@ -221,7 +223,9 @@ export default {
},
methods:{
+ save(){
+ }
}
}
diff --git a/src/views/order/order-info.vue b/src/views/order/order-info.vue
index 0e7f98c..a0915ce 100644
--- a/src/views/order/order-info.vue
+++ b/src/views/order/order-info.vue
@@ -7,22 +7,22 @@
工单时间
当前状态:
- 待审核
+ {{info.business_status}}
创建时间:
- 2024-03-27
+ {{info.created_at}}
PE确认时间:
- 2024-03-27
+ {{info.pe_confirmation_time}}
过保时间:
- 2024-03-27
+ {{info.warranty_end_date}}
@@ -31,10 +31,8 @@
@@ -42,13 +40,9 @@
维保单号
-
- 维修单ID:
- 2024-03-27
-
维修单号:
- 2024-03-27
+ {{info.repair_order_no}}
@@ -59,25 +53,25 @@
维修等级:
- 2024-03-27
+ {{info.maintenance_plan}}
故障类型:
- 2024-03-27
+ {{info.fault_type}}
故障内容:
- 2024-03-27
+ {{info.fault_description}}
维保等级:
- 2024-03-27
+ {{info.maintenance_plan}}
是否关机:
- 2024-03-27
+ {{info.requires_shutdown}}
@@ -88,63 +82,63 @@
机房城市:
- 2024-03-27
+ {{info.city}}
园区:
- 2024-03-27
+ {{info.park_name}}
机房:
- 2024-03-27
+ {{info.data_center_name}}
机架位:
- 2024-03-27
+ {{info.rack_position}}
整机SN:
- 2024-03-27
+ {{info.device_sn}}
整机厂商:
- 2024-03-27
+ {{info.device_manufacturer}}
整机型号:
- 2024-03-27
+ {{info.device_model}}
部件SN/Sp:
- 2024-03-27
+ {{info.component_serial_no}}
部件厂商:
- 2024-03-27
+ {{info.component_manufacturer}}
部件型号:
- 2024-03-27
+ {{info.component_model}}
部件PN/Sp:
- 2024-03-27
+ {{info.component_pn}}
SLA截止时间:
- 2024-03-27
+ {{info.sla_expiration}}
剩余BD数:
- 2024-03-27
+ {{info.bd_backup_count}}
@@ -160,14 +154,22 @@ export default {
name: "order-info",
data(){
return{
-
+ params:{
+ order_id:Number(this.$route.query.id)
+ },
+ info:{}
}
},
mounted() {
-
+ this.getData();
},
methods:{
-
+ async getData() {
+ const res = await this.$API.orders.order.maintenance.info.post(this.params);
+ if(res.code == 200){
+ this.info = res.data;
+ }
+ }
}
}
diff --git a/src/views/order/orderList/index.vue b/src/views/order/orderList/index.vue
index 0fee3dc..84f93ee 100644
--- a/src/views/order/orderList/index.vue
+++ b/src/views/order/orderList/index.vue
@@ -88,16 +88,28 @@ export default {
exportShow:false,
searchShow:false,
searchList:[
- {name:'生产日期',type:'date',code:'activation_date',show:true},
- {name:'反厂日期',type:'date',code:'activation_date',show:true},
- {name:'处理时间',type:'date',code:'activation_date',show:true},
- {name:'客户名称',type:'multiple',code:'id', data:[], placeholder:"请选择公司名称",show:false},
- {name:'状态',type:'select',code:'active_status', data:[], placeholder:"请选择状态",show:false},
- {name:'工单号',type:'text',code:['mobile'],placeholder:"请输入手机号",isOpen:true,show:false},
- {name:'邮件地址',type:'text',code:['email'],placeholder:"请输入邮箱地址",isOpen:true,show:false},
- {name:'公司地址',type:'text',code:['address'],placeholder:"请输入公司地址",isOpen:true,show:false},
- {name:'负责人',type:'text',code:['owner'],placeholder:"请输入负责人",isOpen:true,show:false},
- {name:'关键字',type:'text',code:['domain','name'],keyword:true,show:true},
+ {name:'PE确认时间',type:'date',code:'pe_confirmation_time',show:true},
+ {name:'保修到期',type:'date',code:'warranty_end_date',show:true},
+ {name:'SLA到期时间',type:'date',code:'sla_expiration',show:true},
+ {name:'维修单号',type:'text',code:['repair_order_no'],placeholder:"请输入维修单号",isOpen:true,show:false},
+ {name:'维修等级',type:'select',code:'maintenance_level', data:[], placeholder:"请选择维修等级",show:false},
+ {name:'园区名称',type:'select',code:['park_name'],data:[],placeholder:"请输入园区名称",isOpen:true,show:false},
+ {name:'整机型号',type:'text',code:['device_model'],placeholder:"请输入整机型号",isOpen:true,show:false},
+ {name:'故障类型',type:'multiple',code:'fault_type', data:[], placeholder:"请选择公司名称",show:false},
+ {name:'部件型号',type:'text',code:['component_model'],placeholder:"请输入部件型号",isOpen:true,show:false},
+ {name:'部件序列号',type:'text',code:['component_serial_no'],placeholder:"请输入部件序列号",isOpen:true,show:false},
+ {name:'整机厂商',type:'text',code:['device_manufacturer'],placeholder:"请输入整机厂商",isOpen:true,show:false},
+ {name:'是否需要关机',type:'select',code:['requires_shutdown'],placeholder:"请选择是否关机",isOpen:true,show:false},
+ {name:'机房城市',type:'select',code:['city'],data:[],placeholder:"请输入机房城市",isOpen:true,show:false},
+ {name:'机房/IDC名称',type:'select',code:['data_center_name'],data:[],placeholder:"请输入机房/IDC名称",isOpen:true,show:false},
+ {name:'机架位置',type:'text',code:['rack_position'],placeholder:"请输入机架位置",isOpen:true,show:false},
+ {name:'整机SN',type:'select',code:['device_sn'],data:[],placeholder:"请输入整机SN",isOpen:true,show:false},
+ {name:'部件厂商',type:'text',code:['component_manufacturer'],placeholder:"请输入部件厂商",isOpen:true,show:false},
+ {name:'部件零件PN号',type:'text',code:['component_pn'],placeholder:"请输入部件零件PN号",isOpen:true,show:false},
+ {name:'剩余BD数',type:'text',code:['bd_backup_count'],placeholder:"请输入剩余BD数",isOpen:true,show:false},
+ {name:'维保等级',type:'select',code:['maintenance_plan'],data:[],placeholder:"请输入维保等级",isOpen:true,show:false},
+ {name:'业务状态',type:'select',code:['business_status'],data:[],placeholder:"请选择业务状态",isOpen:true,show:false},
+ {name:'关键字',type:'text',code:['fault_description'],keyword:true,show:true},
],
params: {},
}
@@ -197,8 +209,8 @@ export default {
this.$confirm(`确定删除 ${row.name} 吗?`, '提示', {
type: 'warning'
}).then(async () => {
- const reqData = {id: row.id};
- const res = await this.$API.system.company.delete.post(reqData);
+ const reqData = {order_ids: [row.id]};
+ const res = await this.$API.orders.order.maintenance.delete.post(reqData);
if(res.code == 200){
this.$refs.table.refresh()
this.$message.success("删除成功")