diff --git a/src/config/route.js b/src/config/route.js index 51b0c02..759f0d1 100644 --- a/src/config/route.js +++ b/src/config/route.js @@ -12,7 +12,7 @@ const routes = [ meta: { code:"", icon: "sc-icon-Home", - title: "搜索", + title: "系统搜索", }, }, diff --git a/src/style/search.scss b/src/style/search.scss index e834162..40c67c0 100644 --- a/src/style/search.scss +++ b/src/style/search.scss @@ -61,3 +61,77 @@ .searchInput.focused .el-input-group__prepend{ border-color: var(--el-color-primary); } +.collapseHeaderBack{ + width:100%; + background: #F5F7FA; +} +.collapseHeaderNav{ + width: calc(100% - 21px); + display: flex;align-items: center; + height: 40px; + .item{ + color: #606266; + margin: 0 8px; + } + .seq{flex-basis: 50px;} +} +.collapseHeader{ + width: 100%; + display: contents;align-items: center; + .item{ + display: block; + margin: 0 8px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + text-align: left; + color: #333; + font-weight: initial; + } + .seq{flex-basis: 50px;overflow: hidden;} +} +.collapseMain .el-collapse-item__content{ + padding: 0; +} +.collapseMain .collapseBody{ + background: #F9FBFD; + padding: 8px 8px 18px 8px; + .title{ + font-weight: 600; + } + .stepView{ + border-bottom: 1px solid #EAF0F5; + padding: 15px 20%; + } + .orderInfo{ + padding: 10px 0; + font-size: 12px; + .el-row{ + margin-bottom: 6px; + .name{ + width: 65px; + display: inline-block; + text-align: right; + margin-right: 12px; + } + } + } + .componentBox{ + .el-table{ + background: none; + } + .el-table__inner-wrapper:before{ + height: 0; + } + .el-table .el-table__body-wrapper{ + background: none; + } + .el-scrollbar__wrap--hidden-default{ + background: none; + } + .el-table__empty-block{ + width: 100% !important; + background: var(--el-color-white); + } + } +} diff --git a/src/views/home/search/index.vue b/src/views/home/search/index.vue index 02793c8..ad2b376 100644 --- a/src/views/home/search/index.vue +++ b/src/views/home/search/index.vue @@ -25,11 +25,94 @@ - - - - - + + +
+
+
序号
+
{{item.label}}
+
+
+ + + +
@@ -40,40 +123,111 @@ export default { data(){ return{ size:'small', - keyword:"", + loading:false, + keyword:"Z240919004", params:{ repair_order_no:{ operator:"like", - value:"" + value:"%Z240919004%" }, component_serial_no:{ operator:"like", - value:"" + value:"%Z240919004%" }, }, - column:[ - {width:"",prop:"",label:""} + activeNames:[], + orderColumn:[ + {label:"工单号",prop:"repair_order_no",width:160}, + {label:"客户名称",prop:"customer_name",width:140}, + {label:"故障描述",prop:"fault_description",width:200}, + {label:"生产日期",prop:"created_at",width:120}, + {label:"返厂日期",prop:"warranty_end_date",width:120}, + {label:"维修等级",prop:"maintenance_grade",width:120}, + {label:"维修分类",prop:"fault_classification",width:120}, + {label:"故障类型",prop:"fault_type",width:100}, + {label:"维保等级",prop:"maintenance_plan",width:100}, + {label:"是否开机",prop:"requires_shutdown",width:90}, + {label:"状态",prop:"business_status",width:100}, ], - rows:[] + planColumn:[ + {label:"工单号",prop:"repair_order_no",width:160}, + {label:"外发日期",prop:"repair_order_no",width:160}, + {label:"维保商场",prop:"repair_order_no",width:160}, + {label:"计划时间",prop:"repair_order_no",width:160}, + {label:"完成时间",prop:"repair_order_no",width:160}, + {label:"故障类型",prop:"repair_order_no",width:160}, + {label:"状态",prop:"repair_order_no",width:160}, + ], + rows:[], + statusList:[], + component_info:[] } }, mounted() { - + this.getStatusList(); }, methods:{ async searchClick() { let params = this.setObj(); + this.loading = true; const res = await this.$API.orders.order.maintenance.search.post(params); + this.loading = false; if(res.code == 200){ + res.data.forEach(item=>{ + if(item.process_engine){ + let obj = this.processList(item.process_engine); + item.process_engine = obj.processedList; + item.process_num = obj.num; + } + if(item.component_info && item.component_info.length===0){ + item.component_info = [ + { + component_serial_no:item.component_serial_no, + component_manufacturer:item.component_manufacturer, + component_model:item.component_model, + component_pn:item.component_pn, + bd_backup_count:item.bd_backup_count + } + ] + } + }) + console.log(res.data,788) this.rows = res.data; } }, setObj(){ for(let i in this.params){ - this.params[i].value = this.keyword==""?"":'%'+this.keyword+'%' + this.params[i].value = this.keyword===""?"":'%'+this.keyword+'%' } return this.params }, + collapseChange(){ + + }, + async getStatusList() { + const res = await this.$API.orders.order.maintenance.status.post(); + if (res.code == 200) { + this.statusList = res.data; + } + }, + processList(list) { + let obj = { + num:0, + processedList:this.$TOOL.objCopy(list) + } + let foundNodeTrue = false; + for (let i = 0; i < obj.processedList.length; i++) { + if (obj.processedList[i].node === true) { + foundNodeTrue = true; + obj.processedList[i].status = 'finish'; + obj.num = i; + } else if (!foundNodeTrue) { + obj.processedList[i].status = 'success'; + } + if (foundNodeTrue && obj.processedList[i].node !== true) break; + } + return obj; + } } } diff --git a/src/views/order/create-order.vue b/src/views/order/create-order.vue index 0188955..c1effb7 100644 --- a/src/views/order/create-order.vue +++ b/src/views/order/create-order.vue @@ -166,11 +166,11 @@ - - - - - + + + + +