From b8793f02488079a9041e3317161067a9992b6992 Mon Sep 17 00:00:00 2001 From: wws <18630710203@163.com> Date: Mon, 6 Nov 2023 16:00:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=9D=E5=85=BB=E5=B7=A5=E5=8D=95-=E6=A3=80?= =?UTF-8?q?=E9=AA=8C+=E5=A1=AB=E5=86=99=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/device/upkeepOrder.js | 9 ++ src/views/device/upkeepOrder/index.vue | 216 ++++++++++++++++++++++--- 2 files changed, 204 insertions(+), 21 deletions(-) diff --git a/src/api/device/upkeepOrder.js b/src/api/device/upkeepOrder.js index 61a3298..7c770f0 100644 --- a/src/api/device/upkeepOrder.js +++ b/src/api/device/upkeepOrder.js @@ -1,5 +1,14 @@ import request from '@/utils/request' +// 保养工单检验 +export function subInspect(data) { + return request({ + url: '/device/upkeepOrder/subInspect', + method: 'post', + data: data + }); +} + // 查询保养工单列表 export function listUpkeepOrder(query) { return request({ diff --git a/src/views/device/upkeepOrder/index.vue b/src/views/device/upkeepOrder/index.vue index a9e0242..1261024 100644 --- a/src/views/device/upkeepOrder/index.vue +++ b/src/views/device/upkeepOrder/index.vue @@ -217,7 +217,7 @@ plain icon="el-icon-edit" size="mini" - @click="handleUpdate" + @click="clickInspect" v-hasPermi="['device:upkeepOrder:edit']" >结果检验 @@ -253,7 +253,7 @@ - + @@ -281,6 +281,7 @@ + @@ -332,6 +333,20 @@ @pagination="getList" /> + + + 待检验 + 未通过 + 通过 + + 取 消 + 确 定 + + + - - - - - - - - - 停机保养 - 开机保养 - - - @@ -380,9 +382,17 @@ + + + + 停机保养 + 开机保养 + + + - + - + - 记录 + + + + + {{ this.form.equ.equipmentName }} + + + +
+ + + + + {{ detail.itemName }} + + + +
+
+ + + + + {{ standard.standardName }} + + + + + 达标 + 未达标 + + + +
+
+ + + + + {{ standard.standardName }} + + + + + {{ standard.detailUpLimit }} + + + + + {{ standard.detailDownLimit }} + + + + + {{ standard.detailUnit }} + + + + + + + + +
+
+ +
- 备件 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -755,7 +888,7 @@ import { getUpkeepOrder, delUpkeepOrder, addUpkeepOrder, - updateUpkeepOrder + updateUpkeepOrder, subInspect } from "@/api/device/upkeepOrder"; import {formatEquItem, querySpareList} from "@/api/device/upkeepPlan"; import {getEquList, getPersonList, getWorkCenter} from "@/api/device/plan"; @@ -766,6 +899,10 @@ export default { dicts: ['device_order_status', 'device_loop_type'], data() { return { + // 检验结果 + inspect: '0', + // 结果检验弹窗 + inspectDialog: false, // 选中的备件 selOnSpare: [], // 申领数量 @@ -885,6 +1022,7 @@ export default { planWorkshop: null, personList:[], planTimeArray:[], + timeArray:[], }, // 表单校验 rules: {} @@ -894,6 +1032,36 @@ export default { this.getList(); }, methods: { + // 点击结果检验按钮 + clickInspect() { + if (this.ids.length == 0 || this.ids == null) { + this.$message({ + message: '请勾选工单!', + type: 'warning' + }) + return; + } + this.inspect = "0"; + this.inspectDialog = true; + }, + // 提交检验信息 + subInspect() { + console.log("点击了提交检验确定按钮") + console.log(this.ids) + const data = { + ids : this.ids, + inspect : this.inspect, + } + + subInspect(data).then(response => { + this.getList(); + this.inspectDialog = false; + this.$message({ + message: '提交成功!', + type: 'success' + }) + }) + }, // 获取工作中心 setWorkCenter() { getWorkCenter().then(response => { @@ -1163,6 +1331,7 @@ export default { updateBy: null, updateTime: null, equ: {equipmentName: null}, + timeArray:[], }; this.resetForm("form"); }, @@ -1196,6 +1365,9 @@ export default { this.form = response.data; console.log("这里是回显信息") console.log(response.data) + if (response.data.timeArray[0] == null) { + response.data.timeArray = [] + } this.open = true; this.title = "填写记录"; }); @@ -1207,8 +1379,10 @@ export default { this.$refs["form"].validate(valid => { if (valid) { if (this.form.orderId != null) { + console.log("点击了提交") + console.log(this.form) updateUpkeepOrder(this.form).then(response => { - this.$modal.msgSuccess("修改成功"); + this.$modal.msgSuccess("提交成功"); this.open = false; this.getList(); });