diff --git a/src/api/model/orders.js b/src/api/model/orders.js index f2ddcee..a872148 100644 --- a/src/api/model/orders.js +++ b/src/api/model/orders.js @@ -168,7 +168,21 @@ export default { post: async function (params) { return await http.post(this.url,params); } - } + }, + status:{ + url: `${config.API_URL}/maintenance.order.business.status.list`, + name: "维保工单业务状态", + post: async function (params) { + return await http.post(this.url,params); + } + }, + optionList:{ + url: `${config.API_URL}/maintenance.repair.options.const.list`, + name: "维保工单常量下拉", + post: async function (params) { + return await http.post(this.url,params); + } + }, }, sock: { list:{ diff --git a/src/api/model/setup.js b/src/api/model/setup.js index c0883fa..67247b8 100644 --- a/src/api/model/setup.js +++ b/src/api/model/setup.js @@ -50,4 +50,27 @@ export default { }, } }, + bom:{ + list:{ + url: `${config.API_URL}/bom.list`, + name: "bom列表", + get: async function (data = {}) { + return await http.post(this.url, data); + }, + }, + info:{ + url: `${config.API_URL}/bom.detail`, + name: "bom详情", + post: async function (data = {}) { + return await http.post(this.url, data); + }, + }, + refresh:{ + url: `${config.API_URL}/bom.refresh`, + name: "重新拉取bom", + post: async function (data = {}) { + return await http.post(this.url, data); + }, + } + } }; diff --git a/src/views/order/create-order.vue b/src/views/order/create-order.vue index 758223b..9f8c789 100644 --- a/src/views/order/create-order.vue +++ b/src/views/order/create-order.vue @@ -2,7 +2,7 @@ - +
工作时间
@@ -29,14 +29,9 @@
维保单号
- - - - - - - + + @@ -47,36 +42,35 @@
- - + + - - - + + + - + - - - - - - - + + + + + + + - - - + + @@ -88,33 +82,25 @@ -
-
-
-
维保工单信息
-
- - - + + - - - + + - - - + + @@ -126,9 +112,8 @@ - - - + + @@ -142,12 +127,16 @@ +
+
+
+
维保工单信息
+
- - - + + @@ -181,7 +170,7 @@
- 保 存 + 确认保存
@@ -196,26 +185,32 @@ export default { return{ size:"small", isSave:false, + setMap:{ + maintenance_level:[], + fault_type:[], + }, form:{ - maintenance_level: "234", // 维修等级 - fault_type: "234", // 故障类型 - fault_description: "234", // 故障描述 - requires_shutdown: "234", // 是否需要关机 - city: "234", // 机房城市 - park_name: "234", // 园区名称 - data_center_name: "234", // 机房/IDC名称 - rack_position: "234", // 机架位置 - device_sn: "234", // 整机SN - device_manufacturer: "234", // 整机厂商 - device_model: "234", // 整机型号 - component_serial_no: "234", // 部件序列号 - component_manufacturer: "234", // 部件厂商 - component_model: "234", // 部件型号 - component_pn: "234", // 部件零件PN号 - sla_expiration: "2024-08-21", // SLA到期时间 - bd_backup_count: "234", // 剩余BD数 - pe_confirmation_time: "2024-08-21", // PE确认时间 - warranty_end_date: "2024-08-21", // 保修期结束 + repair_order_no:"", + maintenance_grade:"", // 维修等级 + maintenance_level: "", // 维修等级 + fault_type: "", // 故障类型 + fault_description: "", // 故障描述 + requires_shutdown: "", // 是否需要关机 + city: "", // 机房城市 + park_name: "", // 园区名称 + data_center_name: "", // 机房/IDC名称 + rack_position: "", // 机架位置 + device_sn: "", // 整机SN + device_manufacturer: "", // 整机厂商 + device_model: "", // 整机型号 + component_serial_no: "", // 部件序列号 + component_manufacturer: "", // 部件厂商 + component_model: "", // 部件型号 + component_pn: "", // 部件零件PN号 + sla_expiration: "", // SLA到期时间 + bd_backup_count: "", // 剩余BD数 + pe_confirmation_time: "", // PE确认时间 + warranty_end_date: "", // 保修期结束 maintenance_plan: '' // 维保等级:1-铜牌;常量维护项 } } @@ -224,6 +219,12 @@ export default { }, methods:{ + async getSelect(name,num) { + const res = await this.$API.orders.order.maintenance.optionList.post({const_type:num}); + if(res.code == 200){ + this.setMap[name] = res.data; + } + }, save(){ this.$refs.form.validate(async (valid) => { if (valid) { @@ -260,7 +261,7 @@ export default { } .btnBox{ margin-top: 15px; - text-align: right; + text-align: left; padding: 0 10px; } diff --git a/src/views/order/orderList/detailView.vue b/src/views/order/orderList/detailView.vue index ac36938..e158a36 100644 --- a/src/views/order/orderList/detailView.vue +++ b/src/views/order/orderList/detailView.vue @@ -4,7 +4,11 @@
工单时间
当前状态: - {{info.business_status}} + + + {{item.label}} + +
@@ -53,15 +57,19 @@ {{info.maintenance_plan}} - 故障类型: - {{info.fault_type}} + 维修分类: + {{info.maintenance_level}} - + 故障内容: {{info.fault_description}} + + 故障类型: + {{info.fault_type}} + 维保等级: {{info.maintenance_plan}} @@ -71,11 +79,6 @@ {{info.requires_shutdown}} -
-
-
-
部件信息
-
机房城市: @@ -110,6 +113,11 @@ {{info.device_model}} +
+
+
+
部件信息
+
部件SN/Sp: @@ -159,14 +167,20 @@ export default { }, data(){ return{ - info:{} + info:{}, + statusList:[] } }, mounted() { - + this.getStatusList(); }, methods:{ - + async getStatusList() { + const res = await this.$API.orders.order.maintenance.status.post(); + if (res.code == 200) { + this.statusList = res.data; + } + }, } } diff --git a/src/views/order/orderList/index.vue b/src/views/order/orderList/index.vue index 74d605d..f12953a 100644 --- a/src/views/order/orderList/index.vue +++ b/src/views/order/orderList/index.vue @@ -11,8 +11,8 @@
下载导入模版
- 批量审核 提交维保 + 批量审核 下发维保
@@ -47,6 +47,11 @@ + @@ -127,8 +132,12 @@ export default { {name:'关键字',type:'text',code:['fault_description'],keyword:true,show:true}, ], params: {}, + statusList:[], } }, + mounted() { + this.getStatusList(); + }, methods: { searchShowClick(){ this.searchShow = !this.searchShow; @@ -339,6 +348,12 @@ export default { handleSaveSuccess(){ this.$refs.table.refresh(); }, + async getStatusList() { + const res = await this.$API.orders.order.maintenance.status.post(); + if (res.code == 200) { + this.statusList = res.data; + } + }, } } diff --git a/src/views/order/submit-order.vue b/src/views/order/submit-order.vue index f3ec980..ad96388 100644 --- a/src/views/order/submit-order.vue +++ b/src/views/order/submit-order.vue @@ -7,7 +7,11 @@
工单时间
当前状态: - {{info.business_status}} + + + {{item.label}} + +
@@ -56,15 +60,19 @@ {{info.maintenance_plan}} - 故障类型: - {{info.fault_type}} + 维修分类: + {{info.maintenance_level}} - + 故障内容: {{info.fault_description}} + + 故障类型: + {{info.fault_type}} + 维保等级: {{info.maintenance_plan}} @@ -74,59 +82,45 @@ {{info.requires_shutdown}} -
- -
-
部件信息
-
机房城市: - - - + {{info.city}} 园区: - - - + {{info.park_name}} 机房: - - - + {{info.data_center_name}} 机架位: - - - + {{info.rack_position}} 整机SN: - - - + {{info.device_sn}} 整机厂商: - - - + {{info.device_manufacturer}} 整机型号: - - - + {{info.device_model}} +
+
+
+
部件信息
+
部件SN/Sp: @@ -170,7 +164,7 @@
- 确认提交 + 确认提交
@@ -189,11 +183,13 @@ export default { params:{ order_id:Number(this.$route.query.id) }, - info:{} + info:{}, + statusList:[] } }, mounted() { this.getData(); + this.getStatusList(); }, methods:{ async getData() { @@ -236,12 +232,18 @@ export default { } this.saveLoading = false; }, + async getStatusList() { + const res = await this.$API.orders.order.maintenance.status.post(); + if (res.code == 200) { + this.statusList = res.data; + } + }, } } diff --git a/src/views/setting/advanced/index.vue b/src/views/setting/advanced/index.vue index 6ad1f9c..917ca57 100644 --- a/src/views/setting/advanced/index.vue +++ b/src/views/setting/advanced/index.vue @@ -60,11 +60,6 @@ export default { title: "费用配置", component: "password" }, - { - icon: "sc-icon-AgentMaintenance", - title: "维保代理商维护", - component: "pushSettings" - }, ] }, { @@ -76,7 +71,7 @@ export default { component: "mail" }, { - icon: "sc-icon-DataSource", + icon: "sc-icon-AgentMaintenance", title: "K3接口配置", component: "interface" } diff --git a/src/views/setting/advanced/setup/interface.vue b/src/views/setting/advanced/setup/interface.vue index bca2f7f..76f729d 100644 --- a/src/views/setting/advanced/setup/interface.vue +++ b/src/views/setting/advanced/setup/interface.vue @@ -68,7 +68,9 @@ export default { async getMail() { const res = await this.$API.setup.k3.get.post(); if(res.code == 200){ - this.inter = res.data; + if(res.data && res.data.account_id){ + this.inter = res.data; + } } }, async save() { diff --git a/src/views/setting/advanced/setup/mail.vue b/src/views/setting/advanced/setup/mail.vue index 7a8e839..14dcb0e 100644 --- a/src/views/setting/advanced/setup/mail.vue +++ b/src/views/setting/advanced/setup/mail.vue @@ -61,7 +61,9 @@ export default { async getMail() { const res = await this.$API.setup.mail.get.post(); if(res.code == 200){ - this.mail = res.data; + if(res.data && res.data.alias){ + this.mail = res.data; + } } }, async save() { diff --git a/src/views/setting/bom/index.vue b/src/views/setting/bom/index.vue index ef1806c..1600060 100644 --- a/src/views/setting/bom/index.vue +++ b/src/views/setting/bom/index.vue @@ -2,20 +2,7 @@
- 新增工单 - - - - -
-
- - 下载 - + 新增BOM
@@ -80,23 +67,36 @@ export default { show: false, }, list: { - apiObj: {}, + apiObj: this.$API.setup.bom.list, column: [], }, selection: [], exportShow:false, searchShow:false, searchList:[ - {name:'生产日期',type:'date',code:'activation_date'}, - {name:'反厂日期',type:'date',code:'activation_date'}, - {name:'处理时间',type:'date',code:'activation_date'}, - {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:'创建时间',type:'date',code:'created_at',show: true}, + {name:'更新时间',type:'date',code:'updated_at',show: true}, + {name:'BOM版本',type:'text',code:'bom_version',placeholder:"请输入BOM版本",show:true}, + {name:'BOM简称',type:'text',code:'bom_abbreviation',placeholder:"请输入BOM简称",show:false}, + {name:'BOM分类',type:'text',code:['bom_classification'],placeholder:"请输入BOM分类",isOpen:true,show:false}, + {name:'BOM用途',type:'text',code:['bom_purpose'],placeholder:"请输入BOM用途",isOpen:true,show:false}, + {name:'父项物料编码',type:'text',code:['parent_material_code'],placeholder:"请输入父项物料编码",isOpen:true,show:false}, + {name:'父项物料名称',type:'text',code:['parent_material_name'],placeholder:"请输入父项物料名称",isOpen:true,show:false}, + {name:'父项物料单位',type:'text',code:['parent_material_unit'],placeholder:"请输入父项物料单位",isOpen:true,show:false}, + {name:'子项物料编码',type:'text',code:['child_material_code'],placeholder:"请输入子项物料编码",isOpen:true,show:false}, + {name:'子项物料名称',type:'text',code:['child_material_name'],placeholder:"请输入子项物料名称",isOpen:true,show:false}, + {name:'子项物料单位',type:'text',code:['child_material_unit'],placeholder:"请输入子项物料单位",isOpen:true,show:false}, + {name:'次项',type:'text',code:['item_sequence'],placeholder:"请输入次项",isOpen:true,show:false}, + {name:'子项类型',type:'text',code:['child_material_type'],placeholder:"请输入子项类型",isOpen:true,show:false}, + {name:'用量分母',type:'text',code:['usage_numerator'],placeholder:"请输入用量分母",isOpen:true,show:false}, + {name:'用量分子',type:'text',code:['usage_denominator'],placeholder:"请输入用量分子",isOpen:true,show:false}, + {name:'创建组织编码',type:'text',code:['create_org_code'],placeholder:"请输入创建组织编码",isOpen:true,show:false}, + {name:'创建组织名称',type:'text',code:['create_org_name'],placeholder:"请输入创建组织名称",isOpen:true,show:false}, + {name:'使用组织编码',type:'text',code:['use_org_code'],placeholder:"请输入使用组织编码",isOpen:true,show:false}, + {name:'使用组织名称',type:'text',code:['use_org_name'],placeholder:"请输入使用组织名称",isOpen:true,show:false}, + {name:'单据状态',type:'text',code:['document_status'],placeholder:"请输入单据状态",isOpen:true,show:false}, + {name:'禁用状态',type:'text',code:['disable_status'],placeholder:"请输入禁用状态",isOpen:true,show:false}, + {name:'关键字',type:'text',code:['bom_abbreviation'],keyword:true,show:true}, ], params: {}, }