From f48b30996c109edaa99b13edbda930b3baf6a7f5 Mon Sep 17 00:00:00 2001 From: A0010407 Date: Thu, 23 May 2024 17:43:04 +0800 Subject: [PATCH 1/6] =?UTF-8?q?2024-05-23=20=E8=AE=BE=E5=A4=87=E6=A8=A1?= =?UTF-8?q?=E5=9D=97-=E6=8A=A5=E4=BF=AE-=E5=89=8D=E7=AB=AF=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/device/faultReport/index.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/views/device/faultReport/index.vue b/src/views/device/faultReport/index.vue index 9acbc8b0..f62e0a41 100644 --- a/src/views/device/faultReport/index.vue +++ b/src/views/device/faultReport/index.vue @@ -956,10 +956,10 @@ - + Date: Fri, 24 May 2024 17:41:24 +0800 Subject: [PATCH 2/6] =?UTF-8?q?2024-05-24=20=E8=AE=BE=E5=A4=87=E6=A8=A1?= =?UTF-8?q?=E5=9D=97-=E6=8A=A5=E4=BF=AE-=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/device/faultReport/index.vue | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/views/device/faultReport/index.vue b/src/views/device/faultReport/index.vue index f62e0a41..2479eeb6 100644 --- a/src/views/device/faultReport/index.vue +++ b/src/views/device/faultReport/index.vue @@ -196,13 +196,13 @@ > - - {{ - form.workDownMachine ? "是" : "否" + form.workDownMachine ? "否" : "是" }} {{ form.workPlanDownTime @@ -832,7 +832,7 @@ form.workPlanTime }} {{ - form.workDownMachine ? "是" : "否" + form.workDownMachine ? "否" : "是" }} {{ form.workPlanDownTime @@ -922,7 +922,7 @@ v-model="form.orderBreakdownTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" - placeholder="报修时间" + placeholder="故障时间" style="width: 200px" > From 4e3ca9309f2461040067f6bcc11ff622ad0c2dfe Mon Sep 17 00:00:00 2001 From: A0010407 Date: Mon, 27 May 2024 13:55:15 +0800 Subject: [PATCH 3/6] =?UTF-8?q?2024-05-27=20=E8=B4=A8=E9=87=8F-=E6=9D=A5?= =?UTF-8?q?=E6=96=99=E6=A3=80=E9=AA=8C/=E7=94=9F=E4=BA=A7=E8=BF=87?= =?UTF-8?q?=E7=A8=8B=E6=A3=80=E9=AA=8C/=E5=BA=93=E5=AD=98=E6=A3=80?= =?UTF-8?q?=E9=AA=8C-=E5=8A=A0=E5=8D=95=E4=B8=AA=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/quality/qcIncome/index.vue | 5 ++--- src/views/quality/qcInventory/index.vue | 5 ++--- src/views/quality/qcProduce/index.vue | 6 +++--- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/views/quality/qcIncome/index.vue b/src/views/quality/qcIncome/index.vue index 581fcc47..1841ecb5 100644 --- a/src/views/quality/qcIncome/index.vue +++ b/src/views/quality/qcIncome/index.vue @@ -113,18 +113,17 @@ v-hasPermi="['quality:qcIncome:edit']" >修改 - + 修改 - + 修改 - + Date: Mon, 27 May 2024 16:31:44 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E5=B7=A5=E5=8D=95?= =?UTF-8?q?=EF=BC=8C=E6=89=B9=E6=AC=A1=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/plan/workorder.js | 40 ++++- src/views/plan/workorder/index.vue | 229 ++++++++++++++++++++++++++++- 2 files changed, 267 insertions(+), 2 deletions(-) diff --git a/src/api/plan/workorder.js b/src/api/plan/workorder.js index 0fc34ad6..6be34925 100644 --- a/src/api/plan/workorder.js +++ b/src/api/plan/workorder.js @@ -135,4 +135,42 @@ export function getUnReadComment(data){ method:'post', data:data }) - } \ No newline at end of file +} + +export function getWorkOrderBatch(workOrderId) { + return request({ + url: '/plan/pro/workorder/getWorkOrderBatch/' + workOrderId, + method: 'get' + }); +} + +export function getWorkOrderBatchInfo(query) { + return request({ + url: '/plan/pro/workorder/getWorkOrderBatchInfo', + method: 'get', + params: query + }); +} + +export function insertWorkOrderBatch(data){ + return request({ + url:'/plan/pro/workorder/insertWorkOrderBatch', + method:'post', + data:data + }) +} + export function updateWorkOrderBatch(data){ + return request({ + url:'/plan/pro/workorder/updateWorkOrderBatch', + method:'put', + data:data + }) + } + +export function removeWorkOrderBatch(batchCode,workorderCode) { + return request({ + url: '/plan/pro/workorder/removeWorkOrderBatch/' +batchCode+ '/' +workorderCode, + method: 'delete', + }); +} + diff --git a/src/views/plan/workorder/index.vue b/src/views/plan/workorder/index.vue index 0d365bed..8ffce62a 100644 --- a/src/views/plan/workorder/index.vue +++ b/src/views/plan/workorder/index.vue @@ -173,6 +173,18 @@ >切线调拨 + + 批次编辑 + + @@ -622,6 +634,84 @@ 取 消 + + + + + 新增 + + + + 修改 + + + + 删除 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -634,7 +724,12 @@ import { getOrderAndWork,getProSortNo, getWorkBatchList, subChangeWorkOrderPro,subChangeWorkOrderM, - checkWorkOrder + checkWorkOrder, + getWorkOrderBatch, + getWorkOrderBatchInfo, + insertWorkOrderBatch, + updateWorkOrderBatch, + removeWorkOrderBatch } from '@/api/plan/workorder' import moment from 'moment'; import { getProEquipment, getProRoutes, getProShifts,selectMaterielList} from '@/api/plan/order' @@ -714,13 +809,18 @@ export default { }, // 遮罩层 loading: true, + batchLoading: true, // 选中数组 ids: [], cods: [], + // 批次编辑列表 + batchData: [], // 非单个禁用 single: true, + batchSingle: true, // 非多个禁用 multiple: true, + batchMultiple: true, // 下达禁用 statuses: [], // 显示搜索条件 @@ -732,9 +832,15 @@ export default { // 弹出层标题 title: "", titleM:"", + batchTitle: "", + bEditTitle: "", // 是否显示弹出层 open: false, openM:false, + batchOpen: false, + bEditOpen: false, + // 是否禁止修改批次 + editBatchFlag: false, // 查询参数 queryParams: { productDateArray: [new Date(), new Date()], @@ -768,6 +874,7 @@ export default { }, // 表单参数 form: {}, + batchForm: {}, // 表单校验 rules: { workorderCode: [ @@ -789,6 +896,23 @@ export default { {required: true, message: "单位不能为空", trigger: "blur"} ], }, + batchRules: { + workorderCode: [ + {required: true, message: "工单编码不能为空", trigger: "blur"} + ], + batchCode: [ + {required: true, message: "当前批次编码不能为空", trigger: "blur"} + ], + batchQuantity: [ + {required: true, message: "当前批次数量不能为空", trigger: "blur"} + ], + newBatchCode: [ + {required: true, message: "新批次编码不能为空", trigger: "blur"} + ], + newBatchQuantity: [ + {required: true, message: "新批次数量不能为空", trigger: "blur"} + ], + }, /**********************************/ eRouteProps: {multiple: true}, eRouteOptions: [], @@ -1626,6 +1750,17 @@ export default { }; this.resetForm("form"); }, + resetBatchForm() { + this.batchForm = { + workorderCode: null, + batchCode: null, + batchQuantity: null, + newBatchCode: null, + newBatchQuantity: null, + attr1: null, + } + this.resetForm("batchForm"); + }, // 首-搜索按钮操作 handleQuery() { this.queryParams.pageNum = 1; @@ -1647,6 +1782,13 @@ export default { this.multiple = !selection.length this.statuses = selection.map(item => item.status) }, + batchSelectionChange(selection) { + this.batchids = selection.map(item => item.workorderId) + this.bWorkCodes = selection.map(item => item.workorderCode) + this.batchCodes = selection.map(item => item.batchCode) + this.batchSingle = selection.length !== 1 + this.batchMultiple = !selection.length + }, // 首-新增按钮操作 handleAdd() { alert("待建设") @@ -1664,6 +1806,91 @@ export default { }) return value; }, + editBatch() { + this.batchLoading = true; + const workOrdercode = this.codes[0]; + getWorkOrderBatch(workOrdercode).then(response => { + if(response.code == 200) { + this.batchData = response.rows; + this.batchOpen = true; + this.batchLoading = false; + this.batchTitle = "批次编辑"; + } + + }) + }, + hangleCloseEditBatch() { + this.batchOpen = false; + this.getList(); + }, + + // 批次编辑新增 + handleAddBatch() { + this.resetBatchForm(); + this.batchForm.workorderCode = this.codes[0]; + this.bEditOpen = true; + this.bEditTitle = "批次新增"; + this.editBatchFlag = false; + }, + // 批次编辑修改 + handleUpdateBatch() { + this.editBatchFlag = true; + this.resetBatchForm(); + const params = { + workorderCode: this.bWorkCodes[0], + batchCode: this.batchCodes[0] + } + getWorkOrderBatchInfo(params).then(response => { + this.batchForm = response.data; + this.bEditOpen = true; + this.bEditTitle = "批次修改"; + }); + }, + // 批次编辑取消 + batchCancel() { + this.bEditOpen = false; + this.editBatch(); + }, + // 批次编辑提交 + batchSubmitForm() { + this.$refs["batchForm"].validate(valid => { + if (valid) { + if (this.batchForm.batchCode != null) { + updateWorkOrderBatch(this.batchForm).then(response => { + if(response.code === 200) { + this.$modal.msgSuccess("修改成功"); + }else{ + this.$modal.msgError(response.msg); + } + this.bEditOpen = false; + this.editBatch(); + }); + } else { + insertWorkOrderBatch(this.batchForm).then(response => { + if(response.code === 200) { + this.$modal.msgSuccess("新增成功"); + }else{ + this.$modal.msgError(response.msg); + } + this.bEditOpen = false; + this.editBatch(); + }); + } + } + }); + }, + // 删除批次 + handleRemoveBatch() { + const workorderCode = this.bWorkCodes[0]; + const batchCode = this.batchCodes[0]; + this.$modal.confirm('是否确认删除批次编号为"' + batchCode + '"的数据项?').then(function() { + return removeWorkOrderBatch(batchCode,workorderCode); + }).then(() => { + this.editBatch(); + this.$modal.msgSuccess("删除成功"); + }).catch(() => {}); + }, + //新增-打开组成白坯选择物料窗口 selectBPMateriel() { // 清除搜索缓存 From fadd2972110e5e4b2b390fc322354321f3de56cd Mon Sep 17 00:00:00 2001 From: A0010407 Date: Tue, 28 May 2024 15:46:08 +0800 Subject: [PATCH 5/6] =?UTF-8?q?2024-05-28=20=E8=AE=BE=E5=A4=87-=E4=BF=9D?= =?UTF-8?q?=E5=85=BB-=E7=BB=93=E6=9E=9C=E6=A3=80=E9=AA=8C=E5=90=8E?= =?UTF-8?q?=E5=8F=91=E9=80=81=E5=BE=AE=E4=BF=A1=E6=8F=90=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/device/upkeepOrder/index.vue | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/views/device/upkeepOrder/index.vue b/src/views/device/upkeepOrder/index.vue index 77d729bc..314b2d55 100644 --- a/src/views/device/upkeepOrder/index.vue +++ b/src/views/device/upkeepOrder/index.vue @@ -447,6 +447,14 @@ /> + + + - - - { @@ -2137,6 +2140,9 @@ export default { // 多选框选中数据 handleSelectionChange(selection) { this.ids = selection.map((item) => item.orderId); + this.orderCodes = selection.map((item) => item.orderCode); + console.log('this.ids',this.ids); + console.log('this.orderCodes',this.orderCodes); this.single = selection.length !== 1; this.multiple = !selection.length; }, From 2fe43351d8fb3fdc9bc02f0033dc80ed03adc71a Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Tue, 28 May 2024 16:59:11 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E6=88=90=E5=93=81=E6=A3=80=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mes/reportWork.js | 12 +++ src/views/mes/reportWork/index.vue | 56 ++++++++++-- src/views/plan/workorder/index.vue | 8 +- .../checkTypeProject/selectProject.vue | 28 +++--- src/views/quality/qcProduce/index.vue | 1 + .../quality/qcProduce/selectWorkOrder.vue | 1 + src/views/quality/qcWarehousing/index.vue | 85 +++++++++++++------ 7 files changed, 132 insertions(+), 59 deletions(-) diff --git a/src/api/mes/reportWork.js b/src/api/mes/reportWork.js index 0e5ee37f..952d28b4 100644 --- a/src/api/mes/reportWork.js +++ b/src/api/mes/reportWork.js @@ -352,3 +352,15 @@ export function deleteReportNow(reportCode) { method: 'delete' }); } + +//预报工 +export function preReportRow(reportCode) { + const data = { + reportCode + } + return request({ + url: '/mes/reportWork/preReportRow', + method: 'post', + data: data + }); +} diff --git a/src/views/mes/reportWork/index.vue b/src/views/mes/reportWork/index.vue index c223fb6c..523c2e73 100644 --- a/src/views/mes/reportWork/index.vue +++ b/src/views/mes/reportWork/index.vue @@ -362,30 +362,42 @@ :show-overflow-tooltip="true"> - +
@@ -398,7 +410,7 @@ @@ -645,7 +657,7 @@ import { submitReportPS, submitReportPSSAP, getCKList, - getPutInOrderList, + getPutInOrderList,preReportRow } from "@/api/mes/reportWork"; import { getConsumeList, @@ -1227,7 +1239,7 @@ export default { this.pReportRows = allRows.reduce((acc, cur) => { const hasDuplicate = acc.some( (item) => - item.batch === cur.batch && item.workorderCode === cur.workorderCode + item.batch === cur.batch && item.workorderCode === cur.workorderCode && item.reportCode === cur.reportCode ); if (!hasDuplicate) { acc.push(cur); @@ -1257,7 +1269,7 @@ export default { this.pReportRows = allRows.reduce((acc, cur) => { const hasDuplicate = acc.some( (item) => - item.batch === cur.batch && item.workorderCode === cur.workorderCode + item.batch === cur.batch && item.workorderCode === cur.workorderCode && item.reportCode === cur.reportCode ); if (!hasDuplicate) { acc.push(cur); @@ -1545,12 +1557,37 @@ export default { }).catch(() => {}); }, + //报工详情表格--预报工 + preReportRow(index, rows) { + let _this = this; + this.$modal.confirm('是否确认预报工?').then(function() { + _this.loading = true; + return preReportRow(rows[index].reportCode); + }).then(() => { + this.$modal.msgSuccess("预报工成功"); + debugger + var sr = rows[index]; + this.queryParams.workorderCode = sr.workorderCode; + this.queryParams.machineCode = sr.machineCode; + //查询工单报工记录列表 + getAllLevelReportList(this.queryParams).then((response) => { + this.queryParams.workorderCode = ""; + this.queryParams.machineCode = ""; + this.openReport = true; + this.titleReport = "工单报工详情"; + this.libTabs = response; + }); + _this.loading = false; + }).catch(() => {}); + }, + //物料损耗表格--删除 deleteBomRow(index, rows) { this.$modal .confirm("是否确认删除?确认后,不需要点击下方确定,立马删除!") .then(function () { if (rows[index].recordId != null) { + this.loading = true; return deleteBomRowNow(rows[index].recordId); } }) @@ -1567,6 +1604,7 @@ export default { this.pConsumeRows = newPConsumeRows; rows.splice(index, 1); this.$modal.msgSuccess("删除成功"); + this.loading = false; }) .catch(() => {}); }, diff --git a/src/views/plan/workorder/index.vue b/src/views/plan/workorder/index.vue index 8ffce62a..4ea8f9ff 100644 --- a/src/views/plan/workorder/index.vue +++ b/src/views/plan/workorder/index.vue @@ -905,13 +905,7 @@ export default { ], batchQuantity: [ {required: true, message: "当前批次数量不能为空", trigger: "blur"} - ], - newBatchCode: [ - {required: true, message: "新批次编码不能为空", trigger: "blur"} - ], - newBatchQuantity: [ - {required: true, message: "新批次数量不能为空", trigger: "blur"} - ], + ] }, /**********************************/ eRouteProps: {multiple: true}, diff --git a/src/views/quality/checkTypeProject/selectProject.vue b/src/views/quality/checkTypeProject/selectProject.vue index 19636b4f..2dfe97e9 100644 --- a/src/views/quality/checkTypeProject/selectProject.vue +++ b/src/views/quality/checkTypeProject/selectProject.vue @@ -17,13 +17,15 @@ @keyup.enter.native="handleQuery" /> - - + + + + + @@ -32,17 +34,7 @@ - - - {{ item.projectTypeName }} - - - + diff --git a/src/views/quality/qcProduce/index.vue b/src/views/quality/qcProduce/index.vue index 987d28b2..7d6a24a5 100644 --- a/src/views/quality/qcProduce/index.vue +++ b/src/views/quality/qcProduce/index.vue @@ -758,6 +758,7 @@ export default { this.form.quality = obj.quality; this.form.unit = obj.unit; this.form.incomeTime = obj.incomeTime; + this.form.checkLoc = obj.checkLocName; getBatchList(obj.workorderCode).then(response => { this.batchList = response; }); diff --git a/src/views/quality/qcProduce/selectWorkOrder.vue b/src/views/quality/qcProduce/selectWorkOrder.vue index 783ed5d4..da86777e 100644 --- a/src/views/quality/qcProduce/selectWorkOrder.vue +++ b/src/views/quality/qcProduce/selectWorkOrder.vue @@ -32,6 +32,7 @@ + @@ -321,6 +326,7 @@ + + + + + + + - + + + + + @@ -370,11 +387,16 @@ ref="itemSelectMaterial" @onSelected="onSelectMaterial" > - + + + { this.batchList = response; }); @@ -691,6 +716,16 @@ export default { this.form.materialName = obj.name; }, + /**工作中心选择弹出框**/ + handleSelectWorkCenter() { + this.$refs.itemSelectWorkCenter.showFlag = true; + }, + //工作中心选择确认 + onSelectWorkCenter(obj) { + this.form.supplierCode = obj.code; + this.form.supplierName = obj.name; + }, + /**仓库选择弹出框**/ handleSelectLoc() { this.$refs.itemSelectLoc.showFlag = true;