diff --git a/src/api/device/equTeam.js b/src/api/device/equTeam.js index dab0dfa7..3f7c0b90 100644 --- a/src/api/device/equTeam.js +++ b/src/api/device/equTeam.js @@ -50,3 +50,21 @@ export function getMaintenanceTeamList() { method: 'get' }); } + +// 查询班组列表 +export function listTeamMembers(query) { + return request({ + url: '/device/equTeam/listTeamMembers', + method: 'get', + params: query + }); +} + +// 查询班组列表 +export function getRightList(query) { + return request({ + url: '/device/equTeam/getRightList', + method: 'get', + params: query + }); +} diff --git a/src/api/wms/equipment.js b/src/api/wms/equipment.js index a7fb092d..b2751ea2 100644 --- a/src/api/wms/equipment.js +++ b/src/api/wms/equipment.js @@ -58,3 +58,28 @@ export function getEquipmentTypeList() { method: 'get' }); } + +// 查询设备备件 +export function getSparePartsList() { + return request({ + url: '/wms/equipment/getSparePartsList', + method: 'get' + }); +} + +// 查询设备备件右侧列表 +export function getRightSparePartsList() { + return request({ + url: '/wms/equipment/getRightSparePartsList', + method: 'get' + }); +} + +// 绑定 +export function bindSpareParts(data) { + return request({ + url: '/wms/equipment/bindSpareParts', + method: 'post', + data: data + }); +} diff --git a/src/views/device/deviceOrder/index.vue b/src/views/device/deviceOrder/index.vue index 3c024a37..a70a2619 100644 --- a/src/views/device/deviceOrder/index.vue +++ b/src/views/device/deviceOrder/index.vue @@ -286,6 +286,7 @@ + - + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 报修信息审核 - - - - - 计划性维修 - 不维修 - 委外维修 - 立即维修 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -705,10 +431,10 @@ - + @@ -737,161 +463,542 @@ - + + + + + + + + + 计划性维修 + 不维修 + 委外维修 + 立即维修 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - 报修信息审核 - - - - - 计划性维修 - 不维修 - 委外维修 - 立即维修 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + 报修信息审核 + + + + + 计划性维修 + 不维修 + 委外维修 + 立即维修 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + - + @@ -1015,6 +1132,82 @@ 取 消 + + + + + + + + {{ + form.equipmentCode + }} + {{ + form.orderBreakdownTime + }} + {{ + form.orderSource + }} + {{ + form.orderTime + }} + {{ + form.orderRepairmanName + }} + {{ + form.orderConnection + }} + {{ + form.orderDesc + }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1030,11 +1223,11 @@ import { } from "@/api/device/faultReport"; import ItemSelect from "./selectSingleEquipment.vue"; import ItemSelectPerson from "./selectSinglePerson.vue"; -import { Message } from 'element-ui' +import { Message } from "element-ui"; export default { name: "FaultReport", - components: { ItemSelect,ItemSelectPerson }, + components: { ItemSelect, ItemSelectPerson }, dicts: ["device_order_source"], data() { return { @@ -1056,14 +1249,20 @@ export default { total: 0, // 故障报修表格数据 faultReportList: [], + //检查项表格数据 + checkList: [], + //url表 + urlLists:[], // 弹出层标题 title: "", // 是否显示弹出层 open: false, + //报修显示弹出层 + openView: false, // 是否显示弹出层 openCheck: false, //查看审核故障报修页面 - viewCheck:false, + viewCheck: false, // 查询参数 queryParams: { pageNum: 1, @@ -1075,7 +1274,8 @@ export default { orderSource: null, orderTime: null, orderHandle: null, - orderRepairman: null, + orderRepairmanCode: null, + orderRepairmanName: null, orderConnection: null, orderStatus: null, orderRelevance: null, @@ -1163,8 +1363,8 @@ export default { orderTime: [ { required: true, message: "报修时间不能为空", trigger: "blur" }, ], - orderRepairman: [ - { required: true, message: "报修人不能为空", trigger: "blur" }, + orderRepairmanCode: [ + { required: true, message: "报修人编号不能为空", trigger: "blur" }, ], orderDesc: [ { required: true, message: "故障描述不能为空", trigger: "blur" }, @@ -1193,7 +1393,9 @@ export default { }, //人员选择 onItemSelectedPerson(obj) { - this.form.orderRepairman = obj; + console.log("接收参数", obj); + this.form.orderRepairmanCode = obj[0].userName; + this.form.orderRepairmanName = obj[0].nickName; }, //设备选择 onItemSelectedEquipment(obj) { @@ -1288,17 +1490,76 @@ export default { this.title = "修改故障报修"; }); }, + /** 查看按钮操作 */ + handleView(row) { + this.reset(); + const orderId = row.orderId || this.ids; + getFaultReport(orderId).then((response) => { + this.form = response.data; + if (response.data.files != null) { + var newFiles = []; + response.data.files.forEach((item) => { + var newFile = {}; + newFile.name = item.fileName; + newFile.url = item.fileAddress; + newFiles.push(newFile); + }); + this.form.fileList = newFiles; + var urlLists = []; + this.form.fileList.forEach((item) => { + urlLists.push(item.url); + }); + this.urlLists = urlLists ; + console.log("2222222222",this.urlLists) + } + this.checkList = response.data.checkList; + //检查项遍历 + var standards = []; + this.checkList.forEach((item1) => { + //检查项名字 + item1.standardList.forEach((item) => { + var standard = {}; + standard.itemName = item1.itemName; + standard.standardName = item.standardName; + standard.detailUpLimit = item.detailUpLimit; + standard.detailDownLimit = item.detailDownLimit; + standard.detailUnit = item.detailUnit; + standard.detailReach = item.detailReach; + standard.actualValue = item.actualValue; + standard.standardType = item.standardType; + standards.push(standard); + }); + }); + this.checkList = standards; + console.log("1111111111", this.checkList); + this.openView = true; + this.title = "查看故障报修"; + }); + }, /** 审核按钮操作 */ handleCheck(row) { this.reset(); const orderId = row.orderId || this.ids; getFaultReport(orderId).then((response) => { - if(response.data.orderStatus == "审核通过" || response.data.orderStatus == "驳回"){ + if (response.data.files != null) { + var newFiles = []; + response.data.files.forEach((item) => { + var newFile = {}; + newFile.name = item.fileName; + newFile.url = item.fileAddress; + newFiles.push(newFile); + }); + this.form.fileList = newFiles; + } + if ( + response.data.orderStatus == "审核通过" || + response.data.orderStatus == "驳回" + ) { Message.warning("该报修记录已审核!"); this.form = response.data; this.viewCheck = true; this.title = "查看审核故障报修"; - }else{ + } else { this.form = response.data; this.openCheck = true; this.title = "审核故障报修"; @@ -1307,6 +1568,9 @@ export default { }, /** 提交按钮 */ submitForm() { + if (Array.isArray(this.form.fileList)) { + this.form.fileList = this.listToString(this.form.fileList); + } this.$refs["form"].validate((valid) => { if (valid) { if (this.form.orderId != null) { @@ -1353,6 +1617,15 @@ export default { }) .catch(() => {}); }, + // 对象转成指定字符串分隔 + listToString(list, separator) { + let strs = ""; + separator = separator || ","; + for (let i in list) { + strs += list[i].url + separator; + } + return strs != "" ? strs.substr(0, strs.length - 1) : ""; + }, /** 导出按钮操作 */ handleExport() { this.download( diff --git a/src/views/device/faultReport/selectSinglePerson.vue b/src/views/device/faultReport/selectSinglePerson.vue index 05f59b17..dcd38098 100644 --- a/src/views/device/faultReport/selectSinglePerson.vue +++ b/src/views/device/faultReport/selectSinglePerson.vue @@ -5,7 +5,7 @@ :modal= false width="800px" center - :before-close="cancelEquipmentForm" + :before-close="cancel" > @@ -34,7 +34,7 @@ 重置 - + @@ -53,8 +53,8 @@ @@ -112,7 +112,7 @@ export default { this.resetForm("form"); }, - handleEquipmentSelectionChange (val) { + handleSelectionChange (val) { this.itemList = val; }, @@ -133,14 +133,6 @@ export default { ); }, - // 节点单击事件 - handleNodeClick(data) { - console.log('id',data.id); - this.queryParams.equipmentTypeCode = data.equipmentTypeCode; - console.log(this.equipmentTypeCode); - this.handleQuery(); - }, - /** 搜索按钮操作 */ handleQuery() { this.queryParams.pageNum = 1; @@ -155,27 +147,20 @@ export default { }, // 多选框选中数据 - handleEquipmentSelectionChange(selection) { - this.ids = selection.map(item => item.nickName); + handleSelectionChange(selection) { + this.ids = selection.map(item => item.userId); + this.userCodes = selection.map(item => item.userName); this.single = selection.length!==1; this.multiple = !selection.length; - console.log("多选框",this.ids); }, - submitPersonForm() { - const data = this.ids; - const nickName = data.toString(); - if(data.length >1){ + submitForm() { + if(this.$refs.multipleTable.selection.length > 1){ Message.warning("只能选择一个报修人,请勿选择多个!"); }else{ - if(this.queryParams.itemCodeGet == ""){ - this.queryParams.itemCodeGet = nickName; - } - this.selectedRows = this.queryParams.itemCodeGet; - this.$emit('onSelected', this.selectedRows); - this.getList(); + this.$emit('onSelected', this.$refs.multipleTable.selection); this.showFlag = false; - this.queryParams.itemCodeGet = ""; + this.getList(); } } } diff --git a/src/views/device/inspectionWork/index.vue b/src/views/device/inspectionWork/index.vue index a3ea39b9..bd1d8874 100644 --- a/src/views/device/inspectionWork/index.vue +++ b/src/views/device/inspectionWork/index.vue @@ -280,6 +280,7 @@ + +