diff --git a/src/views/device/deviceOrder/index.vue b/src/views/device/deviceOrder/index.vue index a70a261..d40f1b2 100644 --- a/src/views/device/deviceOrder/index.vue +++ b/src/views/device/deviceOrder/index.vue @@ -26,12 +26,14 @@ /> - + + + + + + + + + + + - - - - - - - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + 搜索 重置 @@ -252,62 +324,72 @@ - - - - - - - - - + + + + + + + + + + + + + - + - + - + - + - - - + + + - - - - - - - - - - + + + + + + + + + + - + @@ -359,73 +439,54 @@ - - - - - {{ this.form.equ.equipmentName }} - - - -
- - - - - {{ detail.itemName }} - - - -
-
- - - - - {{ standard.standardName }} - - - - - 未达标 - 达标 - - - -
-
- - - - - {{ standard.standardName }} - - - - - {{ standard.detailUpLimit }} - - - - - {{ standard.detailDownLimit }} - - - - - {{ standard.detailUnit }} - - - - - - - - -
-
- -
+ + + + + + + + + + + + + + + + + +
@@ -461,6 +522,87 @@ 取 消 + + + + + + + {{ workVO.order.planCode }} + {{ workVO.order.planName }} + {{ workVO.order.planLoop }}{{ workVO.order.planLoopType }} + + {{ workVO.order.orderCode }} + {{ workVO.order.planWorkshop }} + {{ workVO.order.planLoopStart }} + {{ workVO.order.planLoopEnd }} + {{ workVO.order.orderStart }} + {{ workVO.order.orderEnd }} + {{ workVO.order.planPerson }} + {{ workVO.order.repairCode }} + + + + + {{ workVO.equ.equipmentCode }} + {{ workVO.equ.equipmentName }} + {{ workVO.equ.equipmentLocation }} + {{ workVO.equ.equipmentTypeCode }} + {{ workVO.equ.equipmentTypeName }} + {{ workVO.equ.workshopCode }} + {{ workVO.equ.workshopName }} + + + +
+ {{ detail.itemName }} + + + + + + + + + + + + + + + + +
+
+
+ + 取 消 + 确 定 + +
@@ -472,12 +614,72 @@ import { addDeviceOrder, updateDeviceOrder } from "@/api/device/deviceOrder"; +import {getWorkCenter} from "@/api/device/plan"; +import {getInspectionWork} from "@/api/device/inspectionWork"; export default { name: "DeviceOrder", - dicts: ['device_order_status', 'device_loop_type'], + dicts: ['device_order_status', 'device_loop_type','device_reach_standard'], data() { return { + // 初始化VO + workVO: { + order: { + planCode: null, + planName: null, + planLoop: null, + planLoopType: null, + orderCode: null, + planWorkShop: null, + planLoopStart: null, + planLoopEnd: null, + orderStart: null, + orderEnd: null, + planPerson: null, + }, equ: { + equipmentCode: null, + equipmentName: null, + equipmentLocation: null, + equipmentTypeCode: null, + equipmentTypeName: null, + workshopCode: null, + workshopName: null, + }, detailList: [] + }, + // 工单详情弹窗 + workDetail: false, + // 日期范围选择快捷 + pickerOptions: { + shortcuts: [{ + text: '最近一周', + onClick(picker) { + const end = new Date(); + const start = new Date(); + start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); + picker.$emit('pick', [start, end]); + } + }, { + text: '最近一个月', + onClick(picker) { + const end = new Date(); + const start = new Date(); + start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); + picker.$emit('pick', [start, end]); + } + }, { + text: '最近三个月', + onClick(picker) { + const end = new Date(); + const start = new Date(); + start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); + picker.$emit('pick', [start, end]); + } + }] + }, + // 工作中心 + workCenterList:[], + // 记录 + recordList: [], // 遮罩层 loading: true, // 选中数组 @@ -526,7 +728,11 @@ export default { createBy: null, createTime: null, updateBy: null, - updateTime: null + updateTime: null, + loopStartArray: [], + orderStartArray: [], + orderEndArray: [], + loopEndArray: [], }, // 表单参数 form: { @@ -537,9 +743,26 @@ export default { }; }, created() { + this.setWorkCenter(); this.getList(); }, methods: { + // 展示 + showWork(row) { + this.reset(); + const orderId = row.orderId || this.ids + getInspectionWork(orderId).then(response => { + this.workVO = response.data; + this.workDetail = true; + }); + + }, + // 获取工作中心 + setWorkCenter() { + getWorkCenter().then(response => { + this.workCenterList = response.data; + }) + }, /** 查询计划工单列表 */ getList() { this.loading = true; @@ -586,6 +809,10 @@ export default { updateBy: null, updateTime: null, equ: {equipmentName: null}, + loopStartArray: [], + orderStartArray: [], + orderEndArray: [], + loopEndArray: [] }; this.resetForm("form"); }, @@ -596,6 +823,10 @@ export default { }, /** 重置按钮操作 */ resetQuery() { + this.queryParams.loopStartArray = []; + this.queryParams.orderStartArray = []; + this.queryParams.orderEndArray = []; + this.queryParams.loopEndArray = []; this.resetForm("queryForm"); this.handleQuery(); }, @@ -614,11 +845,16 @@ export default { /** 修改按钮操作 */ handleUpdate(row) { this.reset(); + this.recordList = []; const orderCode = row.orderCode || this.ids getDeviceOrder(orderCode).then(response => { this.form = response.data; - console.log("这里是回显信息") - console.log(response.data) + for (let i = 0; i < this.form.detailList.length; i++) { + for (let j = 0; j < this.form.detailList[i].standardList.length; j++) { + this.form.detailList[i].standardList[j].itemName = this.form.detailList[i].itemName; + this.recordList.push(this.form.detailList[i].standardList[j]); + } + } this.open = true; this.title = "填写记录"; }); @@ -628,7 +864,6 @@ export default { this.$refs["form"].validate(valid => { if (valid) { if (this.form.orderId != null) { - console.log(this.form) updateDeviceOrder(this.form).then(response => { this.$modal.msgSuccess("提交成功"); this.open = false; diff --git a/src/views/device/faultReport/index.vue b/src/views/device/faultReport/index.vue index 43b8f25..819466e 100644 --- a/src/views/device/faultReport/index.vue +++ b/src/views/device/faultReport/index.vue @@ -54,9 +54,9 @@ >
- + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + {{ + form.equipmentCode + }} + {{ + form.orderBreakdownTime + }} + {{ + form.orderSource + }} + {{ + form.orderTime + }} + {{ + form.orderRepairmanName + }} + {{ + form.orderConnection + }} + {{ + form.orderDesc + }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -474,7 +387,7 @@ 计划性维修 不维修 委外维修 - 立即维修 @@ -484,10 +397,21 @@ - + @change="$forceUpdate()" + clearable + filterable + style="width: 200px" + > + + @@ -552,10 +476,21 @@ - + @change="$forceUpdate()" + clearable + filterable + style="width: 200px" + > + + @@ -564,7 +499,7 @@ clearable v-model="form.workPlanTime" type="datetime" - placeholder="" + disabled > @@ -670,330 +605,170 @@ append-to-body > - - - - - - - - - - - - - - - - - - - - - - + + + + {{ + form.equipmentCode + }} + {{ + form.equipmentName + }} + {{ + form.equipmentTypeName + }} + {{ + form.equipmentSpec + }} + {{ + form.department + }} + {{ + form.equipmentLocation + }} + {{ + form.orderBreakdownTime + }} + {{ + form.orderSource + }} + {{ + form.orderTime + }} + {{ + form.orderRepairmanName + }} + {{ + form.orderConnection + }} + {{ + form.orderDesc + }} + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + {{ + form.repairDestination + }} + {{ + form.workTeam + }} + {{ + form.workPlanTime + }} + {{ + form.workDownMachine ? "是" : "否" + }} + {{ + form.workPlanDownTime + }} + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 报修信息审核 - - - - - 计划性维修 - 不维修 - 委外维修 - 立即维修 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + {{ + form.repairDestination + }} + {{ + form.workTeam + }} + {{ + form.workPlanTime + }} + {{ + form.workDownMachine ? "是" : "否" + }} + {{ + form.workPlanDownTime + }} + + + + {{ + form.repairDestination + }} + + + + {{ + form.repairDestination + }} + {{ + form.workOutsourcingUnit + }} + {{ + form.outSourcePerson + }} + {{ + form.workConnection + }} + + + {{ + form.outSourceReason + }} + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1224,13 +1001,16 @@ import { import ItemSelect from "./selectSingleEquipment.vue"; import ItemSelectPerson from "./selectSinglePerson.vue"; import { Message } from "element-ui"; +import { getMaintenanceTeamList } from "@/api/device/equTeam"; export default { name: "FaultReport", components: { ItemSelect, ItemSelectPerson }, - dicts: ["device_order_source"], + dicts: ["device_order_source", "device_reach_standard"], data() { return { + //选择设备维修班组 + teamOption: [], //图片存储 fileList: [], //设备选择 @@ -1252,7 +1032,7 @@ export default { //检查项表格数据 checkList: [], //url表 - urlLists:[], + urlLists: [], // 弹出层标题 title: "", // 是否显示弹出层 @@ -1363,9 +1143,6 @@ export default { orderTime: [ { required: true, message: "报修时间不能为空", trigger: "blur" }, ], - orderRepairmanCode: [ - { required: true, message: "报修人编号不能为空", trigger: "blur" }, - ], orderDesc: [ { required: true, message: "故障描述不能为空", trigger: "blur" }, ], @@ -1379,9 +1156,37 @@ export default { this.getList(); }, methods: { + // 生成表头序号 + indexMethod(index) { + return index + 1; + }, timeBackFilling() { - this.form.workPlanTime = new Date(); - log("时间时间", new Date()); + var getTime = new Date().getTime(); //获取到当前时间戳 + var time = new Date(getTime); //创建一个日期对象 + function nowDate(time) { + var year = time.getFullYear(); // 年 + var month = (time.getMonth() + 1).toString().padStart(2, "0"); // 月 + var date = time.getDate().toString().padStart(2, "0"); // 日 + var hour = time.getHours().toString().padStart(2, "0"); // 时 + var minute = time.getMinutes().toString().padStart(2, "0"); // 分 + var second = time.getSeconds().toString().padStart(2, "0"); // 秒 + return ( + year + + "-" + + month + + "-" + + date + + " " + + hour + + ":" + + minute + + ":" + + second + ); + } + console.log(time); + console.log(nowDate(time)); + this.form.workPlanTime = nowDate(time); }, //设备选择 handleSelectEquipment() { @@ -1393,7 +1198,6 @@ export default { }, //人员选择 onItemSelectedPerson(obj) { - console.log("接收参数", obj); this.form.orderRepairmanCode = obj[0].userName; this.form.orderRepairmanName = obj[0].nickName; }, @@ -1415,6 +1219,10 @@ export default { this.open = false; this.reset(); }, + // 取消按钮 + cancelView() { + this.openView = false; + }, // 审核返回按钮 cancelCheckForm() { this.viewCheck = false; @@ -1454,6 +1262,8 @@ export default { }, /** 重置按钮操作 */ resetQuery() { + this.queryParams.orderBreakdownTimeArray = null; + this.queryParams.orderTimeArray = null; this.resetForm("queryForm"); this.handleQuery(); }, @@ -1507,10 +1317,10 @@ export default { this.form.fileList = newFiles; var urlLists = []; this.form.fileList.forEach((item) => { - urlLists.push(item.url); + urlLists.push(item.url); }); - this.urlLists = urlLists ; - console.log("2222222222",this.urlLists) + this.urlLists = urlLists; + console.log("2222222222", this.urlLists); } this.checkList = response.data.checkList; //检查项遍历 @@ -1520,6 +1330,7 @@ export default { item1.standardList.forEach((item) => { var standard = {}; standard.itemName = item1.itemName; + standard.itemMethod = item1.itemMethod; standard.standardName = item.standardName; standard.detailUpLimit = item.detailUpLimit; standard.detailDownLimit = item.detailDownLimit; @@ -1540,6 +1351,10 @@ export default { handleCheck(row) { this.reset(); const orderId = row.orderId || this.ids; + getMaintenanceTeamList(this.queryParams).then((response) => { + console.log(response.rows); + this.teamOption = response.rows; + }); getFaultReport(orderId).then((response) => { if (response.data.files != null) { var newFiles = []; diff --git a/src/views/device/faultReport/selectSingleEquipment.vue b/src/views/device/faultReport/selectSingleEquipment.vue index c8ca697..a8bdb2a 100644 --- a/src/views/device/faultReport/selectSingleEquipment.vue +++ b/src/views/device/faultReport/selectSingleEquipment.vue @@ -1,8 +1,9 @@ diff --git a/src/views/device/faultReport/selectSinglePerson.vue b/src/views/device/faultReport/selectSinglePerson.vue index dcd3809..99c4737 100644 --- a/src/views/device/faultReport/selectSinglePerson.vue +++ b/src/views/device/faultReport/selectSinglePerson.vue @@ -1,8 +1,9 @@ diff --git a/src/views/device/inspectionPlan/index.vue b/src/views/device/inspectionPlan/index.vue index 7f9cfe2..09302fe 100644 --- a/src/views/device/inspectionPlan/index.vue +++ b/src/views/device/inspectionPlan/index.vue @@ -782,8 +782,6 @@ export default { }, // 改变巡检周期事件 changeArray(e) { - console.log(e) - console.log(this.form.planTimeArray) if (this.form.planLoop == null) { this.$message({ message: '请输入循环周期!', @@ -912,13 +910,6 @@ export default { // 点击编辑设备-巡检项目 editorTheItem(e) { - console.log('e') - console.log(e) - console.log("form") - console.log(this.form.equipmentItem) - console.log("长度") - console.log(this.form.equipmentItem.length) - // 清除缓存 this.itemDetailList = []; @@ -927,19 +918,12 @@ export default { for (let i = 0; i < this.form.equipmentItem.length; i++) { if (e.equipmentCode == this.form.equipmentItem[i].equipmentCode) { - console.log("一次") - console.log(e.equipmentCode == this.form.equipmentItem[i].equipmentCode) - console.log(e.equipmentCode) - console.log(this.form.equipmentItem[i].equipmentCode) for (let j = 0; j < this.form.equipmentItem[i].equPlanDetailList.length; j++) { // 检查项名称 var itemName = this.form.equipmentItem[i].equPlanDetailList[j].itemName; - console.log("长度") - console.log(this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList.length) - for (let k = 0; k < this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList.length; k++){ if (this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].showFlag == true) { @@ -949,7 +933,6 @@ export default { }else { this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].standardTypeName = "定量"; } - console.log(qw++) this.itemDetailList.push(this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k]); } diff --git a/src/views/device/inspectionWork/index.vue b/src/views/device/inspectionWork/index.vue index bd1d887..4fc82c6 100644 --- a/src/views/device/inspectionWork/index.vue +++ b/src/views/device/inspectionWork/index.vue @@ -17,21 +17,23 @@ @keyup.enter.native="handleQuery" /> - + - - + + + + + + + + + - + @@ -161,7 +173,7 @@ @keyup.enter.native="handleQuery" /> - + - + - + - + + + + + + + + + + + + + + + + + 搜索 重置 @@ -249,59 +313,72 @@ - - - - - - - - - - - + + + + + + + + + + + + + + + + - + - + - + - - - + + + - - - - - - - - - - + + + + + + + + + + - +