diff --git a/package.json b/package.json index 39ec700..60d05e1 100644 --- a/package.json +++ b/package.json @@ -46,12 +46,14 @@ "highlight.js": "9.18.5", "js-beautify": "1.13.0", "js-cookie": "3.0.1", + "jsbarcode": "^3.11.6", "jsencrypt": "3.0.0-rc.1", "less": "^3.9.0", "less-loader": "^5.0.0", "moment": "^2.29.4", "nprogress": "0.2.0", "print-js": "^1.6.0", + "qrcode": "^1.5.4", "quill": "1.3.7", "screenfull": "5.0.2", "sortablejs": "1.10.2", @@ -62,6 +64,7 @@ "vue-cropper": "0.5.5", "vue-meta": "2.4.0", "vue-router": "3.4.9", + "vue-seamless-scroll": "^1.1.23", "vuedraggable": "2.24.3", "vuex": "3.6.0", "xlsx": "^0.17.0" diff --git a/src/api/device/repairOrder.js b/src/api/device/repairOrder.js index 71f2c80..fdabd15 100644 --- a/src/api/device/repairOrder.js +++ b/src/api/device/repairOrder.js @@ -80,9 +80,9 @@ export function queryEquFaultTypeTree(query) { } // 维修工单检验 -export function subInspect(data) { +export function checkRepairWorkOrder(data) { return request({ - url: '/device/repairOrder/subInspect', + url: '/device/repairOrder/checkRepairWorkOrder', method: 'post', data: data }); diff --git a/src/api/quality/qcTable.js b/src/api/quality/qcTable.js index da998cb..b5c6628 100644 --- a/src/api/quality/qcTable.js +++ b/src/api/quality/qcTable.js @@ -100,4 +100,44 @@ export function getDLTableCPKInfo(query) { method: 'get', params: query }); +} + +export function getTableHzTitle(query) { + return request({ + url: '/quality/staticTable/getTableHzTitle', + method: 'get', + params: query + }); +} +//巡检缺陷不良率表头 +export function getTableHzTitleTh(query) { + return request({ + url: '/quality/staticTable/getTableHzTitle', + method: 'post', + data: query + }); +} +//巡检缺陷不良率表体 +export function getTableHzData(query) { + return request({ + url: '/quality/staticTable/getTableHzData', + method: 'post', + data: query + }); +} +//巡检不良占比分析报表 +export function getTableHzNoOkData(query) { + return request({ + url: '/quality/staticTable/getTableHzNoOkData', + method: 'post', + data: query + }); +} +// 获取头部统计维度年月日 +export function getDictData(data) { + return request({ + url: '/quality/qcInterface/getDictData', + method: 'get', + params: data + }); } \ No newline at end of file diff --git a/src/api/system/dict/data.js b/src/api/system/dict/data.js index 6c9eb79..cc5fa8c 100644 --- a/src/api/system/dict/data.js +++ b/src/api/system/dict/data.js @@ -9,6 +9,15 @@ export function listData(query) { }) } +// 查询字典数据列表无分页,可筛选 +export function getDictData(query) { + return request({ + url: '/system/dict/data/getDictData', + method: 'get', + params: query + }) +} + // 查询字典数据详细 export function getData(dictCode) { return request({ diff --git a/src/main.js b/src/main.js index 4aa6ff5..c0f7ab3 100644 --- a/src/main.js +++ b/src/main.js @@ -46,6 +46,8 @@ import dataV from '@jiaminghi/data-view' // 打印插件 import Print from 'print-js' import VScaleScreen from 'v-scale-screen' +// 滚动 +import VueSeamlessScroll from 'vue-seamless-scroll' // 全局方法挂载 @@ -71,6 +73,7 @@ Vue.component('ImageUpload', ImageUpload) Vue.component('ImagePreview', ImagePreview) Vue.use(VScaleScreen) +Vue.use(VueSeamlessScroll) Vue.use(directive) Vue.use(plugins) Vue.use(VueMeta) diff --git a/src/views/device/faultReport/index.vue b/src/views/device/faultReport/index.vue index 2479eeb..cac3d4d 100644 --- a/src/views/device/faultReport/index.vue +++ b/src/views/device/faultReport/index.vue @@ -6,7 +6,7 @@ size="small" :inline="true" v-show="showSearch" - label-width="88px" + label-width="100px" > + + + + + + + + + + + + + + + - - - - - - + + + + + + - + + + @@ -214,7 +262,8 @@ label="设备编码" align="center" prop="equipmentCode" - width="100" + :show-overflow-tooltip="true" + width="120" /> - + - 计划性维修 + 计划性维修 + 立即维修 不维修 委外维修 - 立即维修 + @@ -486,12 +534,13 @@ + - + @@ -569,17 +618,11 @@ - + - + - + + @@ -634,8 +672,6 @@ /> - - + + + + + + + + @@ -847,6 +897,9 @@ {{ form.repairDestination }} + {{ + form.auditOpinion + }} + + + + + - - + + + + + + + - + 结果检验 + v-hasPermi="['device:repairOrder:check']" + >维修结果审核 @@ -272,7 +286,7 @@ label="维修单号" align="center" prop="workCode" - width="220" + width="250" fixed /> - - - + + - + + + + + + + + @@ -1273,14 +1308,22 @@ - - - 待检验 - 未通过 - 通过 + + + + 审核通过 + 驳回 + + 取 消 - 确 定 + 确 定 @@ -1693,7 +1736,7 @@ import { applyOutsource, writeRepairOrder, queryEquFaultTypeTree, - subInspect, + checkRepairWorkOrder, } from "@/api/device/repairOrder"; import { listFaultReason } from "@/api/device/faultReason"; import { listFaultMeasures } from "@/api/device/faultMeasures"; @@ -1704,11 +1747,10 @@ import ItemSelectPerson from "./selectSinglePerson.vue"; import { Message } from "element-ui"; import ItemSelectSpareParts from "./selectSpareParts.vue"; import moment from "moment"; - export default { name: " RepairOrder", components: { ItemSelect, ItemSelectPerson, ItemSelectSpareParts }, - dicts: ["device_repair_status"], + dicts: ["device_repair_status","device_audit_status"], data() { return { //委外表格格式 @@ -1795,8 +1837,14 @@ export default { inspectDialog: false, // 检验结果 inspect: null, + // 审核意见 + auditOpinion: null, // 多个维修单号 orderCodes: [], + //多个维修状态 + workStatus: [], + //多个审核状态 + resultInspect: [], // 查询参数 queryParams: { pageNum: 1, @@ -1827,6 +1875,7 @@ export default { //计划维修时间组、计划停机时间组 workPlanTimeArray: [], workPlanDownTimeArray: [], + resultInspect: null, }, auxiliaryQueryParams: { pageNum: 1, @@ -2140,6 +2189,7 @@ export default { updateBy: null, delFlag: null, factoryCode: null, + auditOpinion: null, }; this.resetForm("form"); }, @@ -2166,6 +2216,8 @@ export default { handleSelectionChange(selection) { this.ids = selection.map((item) => item.workId); this.orderCodes = selection.map((item) => item.workCode); + this.workStatus = selection.map((item) => item.workStatus); + this.resultInspect = selection.map((item) => item.resultInspect); this.single = selection.length !== 1; this.multiple = !selection.length; }, @@ -2395,7 +2447,9 @@ export default { writeRepairOrder(this.form).then((response) => { this.openWrite = false; - this.$modal.msgSuccess("填写维修记录成功!"); + if(response.code == 200){ + this.$modal.msgSuccess(response.msg); + } this.queryParams.workStatus = null; this.getList(); }); @@ -2404,6 +2458,7 @@ export default { } }); }, + // 点击结果检验按钮 clickInspect() { if (this.ids.length == 0 || this.ids == null) { @@ -2413,26 +2468,63 @@ export default { }); return; } - //需要加一个结果检验 - this.inspectDialog = true; - this.inspect = "1"; + + let workStatusMsg = true; + this.workStatus.forEach((item) => { + if(item == '0'){ + workStatusMsg = false; + } + }); + + let resultInspectMsg = true; + this.resultInspect.forEach((item) => { + if(item == '1'){ + resultInspectMsg = false; + } + }); + + if (workStatusMsg && resultInspectMsg) { + this.inspectDialog = true; + this.inspect = "1";//默认审核通过 + this.auditOpinion = null;//默认为空 + }else if(workStatusMsg == false){ + this.$message({ + message: "您选择的维修工单存在未完成的工单!", + type: "warning", + }); + return; + }else if(resultInspectMsg == false){ + this.$message({ + message: "您选择的维修工单存在已经审核过的工单,不能再次审核!", + type: "warning", + }); + return; + } }, // 提交检验信息 - subInspect() { + checkRepairWorkOrder() { const data = { ids: this.ids, inspect: this.inspect, orderCodes: this.orderCodes, + auditOpinion: this.auditOpinion, }; - subInspect(data).then((response) => { + checkRepairWorkOrder(data).then((response) => { this.getList(); this.inspectDialog = false; - this.$message({ + if(response.code = 500 ){ + this.$message({ + message: response.msg, + type: "warning", + }); + }else{ + this.$message({ message: "提交成功!", type: "success", }); + } }); }, //设备选择 diff --git a/src/views/device/upkeepOrder/index.vue b/src/views/device/upkeepOrder/index.vue index 02eced7..d26c313 100644 --- a/src/views/device/upkeepOrder/index.vue +++ b/src/views/device/upkeepOrder/index.vue @@ -394,10 +394,21 @@ icon="el-icon-edit" size="mini" @click="clickInspect" - v-hasPermi="['device:upkeepOrder:edit']" + v-hasPermi="['device:upkeepOrder:check']" >结果检验 + + 填写记录 + + + + + - - - diff --git a/src/views/device/upkeepPlan/index.vue b/src/views/device/upkeepPlan/index.vue index dc9b40f..1f13e43 100644 --- a/src/views/device/upkeepPlan/index.vue +++ b/src/views/device/upkeepPlan/index.vue @@ -305,7 +305,12 @@ - + + + + - - + + + - + - + - + - - - - - - - - - + @@ -386,8 +378,8 @@ - - + + + + + + + + + + + + + + + + + + +