From 4ad16b799cc6e0eccc1ff7bee7be5401003b77c9 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Tue, 27 Feb 2024 17:28:12 +0800 Subject: [PATCH] =?UTF-8?q?2024-02-27=20=E7=B3=BB=E7=BB=9F=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/eam/eam.js | 2 + src/api/partspare/inventorystock.js | 60 +- .../modules/eamReport/eamCheckRecord.vue | 934 ++++++++++++++ .../modules/eamReport/eamDefectRecord.vue | 1079 +++++++++++++++++ .../eamReport/eamMaintenanceRecord.vue | 952 +++++++++++++++ .../reportWorkOrder/reportCheckOrder.vue | 29 +- .../reportWorkOrder/reportDefectOrder.vue | 38 +- .../reportMaintenanceOrder.vue | 50 +- 8 files changed, 3124 insertions(+), 20 deletions(-) create mode 100644 src/views/modules/eamReport/eamCheckRecord.vue create mode 100644 src/views/modules/eamReport/eamDefectRecord.vue create mode 100644 src/views/modules/eamReport/eamMaintenanceRecord.vue diff --git a/src/api/eam/eam.js b/src/api/eam/eam.js index 2dfb212..8ab378d 100644 --- a/src/api/eam/eam.js +++ b/src/api/eam/eam.js @@ -186,3 +186,5 @@ export const AddTreeselect= data => createAPI(`/pms/eam/AddTreeselect`,'post',da export const EditTreeselect= data => createAPI(`/pms/eam/EditTreeselect`,'post',data) export const getSiteAndBuByUserName= data => createAPI(`/pms/eam/getSiteAndBuByUserName`,'post',data) +export const eamCheckRecordSearch= data => createAPI(`/pms/eam/eamCheckRecordSearch`,'post',data) +export const eamDefectRecordSearch= data => createAPI(`/pms/eam/eamDefectRecordSearch`,'post',data) diff --git a/src/api/partspare/inventorystock.js b/src/api/partspare/inventorystock.js index 8a139f8..3889410 100644 --- a/src/api/partspare/inventorystock.js +++ b/src/api/partspare/inventorystock.js @@ -10,23 +10,51 @@ export function partSpareTemp(dataList) { if (LODOP) { console.log(dataList) for (const row of dataList) { + // LODOP.NewPage(); + // LODOP.SET_PRINT_PAGESIZE(0, 800, 600, ""); + // LODOP.SET_PRINT_STYLE("FontSize", 8); + // LODOP.SET_PRINT_STYLE("LineHeight", -2); + // // //内容,参数(上边距,左边距,内容显示宽度,内容显示高度) + // LODOP.ADD_PRINT_BARCODE(3, 3, 105, 101, "QRCode", row.partNo); + // //LODOP.ADD_PRINT_TEXT(140,8,140,130,"" +row.toolInstanceID ); + // LODOP.ADD_PRINT_TEXT(10, 100, 100, 20, "备品备件编码:"); + // LODOP.ADD_PRINT_TEXT(10, 189, 140, 21, row.partNo); + // LODOP.ADD_PRINT_TEXT(29, 100, 100, 21, "备品备件名称:"); + // LODOP.ADD_PRINT_TEXT(29, 189, 140, 21, row.partDescription); + // LODOP.ADD_PRINT_TEXT(50, 99, 100, 20, "计量单位:"); + // LODOP.ADD_PRINT_TEXT(50, 189, 141, 21, row.umid); + // LODOP.ADD_PRINT_TEXT(95, 6, 68, 20, "规格型号:"); + // LODOP.ADD_PRINT_TEXT(95, 73, 241, 21, row.spec); + // LODOP.ADD_PRINT_TEXT(69, 98, 92, 20, "货位编码:"); + // LODOP.ADD_PRINT_TEXT(70, 188, 141, 21, row.locationId); + LODOP.NewPage(); - LODOP.SET_PRINT_PAGESIZE(0, 800, 600, ""); - LODOP.SET_PRINT_STYLE("FontSize", 8); - LODOP.SET_PRINT_STYLE("LineHeight", -2); - // //内容,参数(上边距,左边距,内容显示宽度,内容显示高度) - LODOP.ADD_PRINT_BARCODE(3, 3, 105, 101, "QRCode", row.partNo); - //LODOP.ADD_PRINT_TEXT(140,8,140,130,"" +row.toolInstanceID ); - LODOP.ADD_PRINT_TEXT(10, 100, 100, 20, "备品备件编码:"); - LODOP.ADD_PRINT_TEXT(10, 189, 140, 21, row.partNo); - LODOP.ADD_PRINT_TEXT(29, 100, 100, 21, "备品备件名称:"); - LODOP.ADD_PRINT_TEXT(29, 189, 140, 21, row.partDescription); - LODOP.ADD_PRINT_TEXT(50, 99, 100, 20, "计量单位:"); - LODOP.ADD_PRINT_TEXT(50, 189, 141, 21, row.umid); - LODOP.ADD_PRINT_TEXT(95, 6, 68, 20, "规格型号:"); - LODOP.ADD_PRINT_TEXT(95, 73, 241, 21, row.spec); - LODOP.ADD_PRINT_TEXT(69, 98, 92, 20, "货位编码:"); - LODOP.ADD_PRINT_TEXT(70, 188, 141, 21, row.locationId); + LODOP.PRINT_INIT(""); + LODOP.SET_PRINT_PAGESIZE(0,800,600,""); + LODOP.ADD_PRINT_BARCODE(3,3,105,101,"QRCode",row.partNo+";"+row.batchNo); + LODOP.SET_PRINT_STYLEA(0,"FontSize",10); + LODOP.ADD_PRINT_TEXT(6,98,60,20,"编码:"); + LODOP.SET_PRINT_STYLEA(0,"FontSize",10); + LODOP.ADD_PRINT_TEXT(3,160,129,20,row.partNo); + LODOP.SET_PRINT_STYLEA(0,"FontSize",10); + LODOP.ADD_PRINT_TEXT(25,98,60,21,"批次号:"); + LODOP.SET_PRINT_STYLEA(0,"FontSize",10); + LODOP.ADD_PRINT_TEXT(24,160,129,20,row.batchNo); + LODOP.SET_PRINT_STYLEA(0,"FontSize",10); + LODOP.ADD_PRINT_TEXT(44,98,60,20,"名称:"); + LODOP.SET_PRINT_STYLEA(0,"FontSize",10); + LODOP.ADD_PRINT_TEXT(44,160,129,40,row.partDescription); + LODOP.SET_PRINT_STYLEA(0,"FontSize",10); + LODOP.SET_PRINT_STYLEA(0,"LineSpacing",-4); + LODOP.ADD_PRINT_TEXT(116,6,68,20,"规格型号:"); + LODOP.SET_PRINT_STYLEA(0,"FontSize",10); + LODOP.ADD_PRINT_TEXT(116,73,241,21,row.spec); + LODOP.SET_PRINT_STYLEA(0,"FontSize",10); + LODOP.ADD_PRINT_TEXT(90,99,60,20,"库位:"); + LODOP.SET_PRINT_STYLEA(0,"FontSize",10); + LODOP.ADD_PRINT_TEXT(90,160,129,20,row.locationId); + LODOP.SET_PRINT_STYLEA(0,"FontSize",10); + LODOP.SET_PRINT_STYLEA(0,"LineSpacing",-3); } // LODOP.PRINT_DESIGN(); LODOP.PREVIEW(); diff --git a/src/views/modules/eamReport/eamCheckRecord.vue b/src/views/modules/eamReport/eamCheckRecord.vue new file mode 100644 index 0000000..681af74 --- /dev/null +++ b/src/views/modules/eamReport/eamCheckRecord.vue @@ -0,0 +1,934 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ➞ + + + + + + + + + + + ➞ + + + + + + + 查询 + + {{ "导出" }} + + + + + + + + + {{ scope.row.checkResult }} + + + + + + {{ scope.row[item.columnProp] }} + + + + + + + + + + + + + + 关闭 + + + + + + + + + + + diff --git a/src/views/modules/eamReport/eamDefectRecord.vue b/src/views/modules/eamReport/eamDefectRecord.vue new file mode 100644 index 0000000..ae4f5e2 --- /dev/null +++ b/src/views/modules/eamReport/eamDefectRecord.vue @@ -0,0 +1,1079 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ➞ + + + + + + + + + + + ➞ + + + + + + + 查询 + + {{ "导出" }} + + + + + + + + + + + {{ scope.row.result }} + + + + + + {{ scope.row[item.columnProp] }} + + + + + + + + + + + + + + 关闭 + + + + + + + + + + + diff --git a/src/views/modules/eamReport/eamMaintenanceRecord.vue b/src/views/modules/eamReport/eamMaintenanceRecord.vue new file mode 100644 index 0000000..1b9543e --- /dev/null +++ b/src/views/modules/eamReport/eamMaintenanceRecord.vue @@ -0,0 +1,952 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ➞ + + + + + + + + + + + ➞ + + + + + + + 查询 + + {{ "导出" }} + + + + + + + + + {{ scope.row.checkResult }} + + + + + + {{ scope.row[item.columnProp] }} + + + + + + + + + + + + + + 关闭 + + + + + + + + + + + diff --git a/src/views/modules/reportWorkOrder/reportCheckOrder.vue b/src/views/modules/reportWorkOrder/reportCheckOrder.vue index f64a319..ed67f29 100644 --- a/src/views/modules/reportWorkOrder/reportCheckOrder.vue +++ b/src/views/modules/reportWorkOrder/reportCheckOrder.vue @@ -28,7 +28,7 @@ - + @@ -1061,6 +1061,7 @@ this.$nextTick(() => { this.height = window.innerHeight - 210 }) + this.$refs.objectID.focus() }, created () { @@ -1079,6 +1080,32 @@ }, methods: { + // 取消小键盘 + cancelKeyboard (e) { + // this.$refs.objectID + e.target.setAttribute('readonly', true); + setTimeout(() => { + e.target.removeAttribute('readonly'); + }, 100); + }, + + // 设备编码回车事件 + objectIdEnter () { + this.searchData.limit = this.pageSize + this.searchData.page = this.pageIndex + eamWorkOrderSearch(this.searchData).then(({data}) => { + if (data.code === 0) { + this.dataList = data.page.list + this.pageIndex = data.page.currPage + this.pageSize = data.page.pageSize + this.totalPage = data.page.totalCount + if (this.searchData.objectID != null && this.searchData.objectID !== '' && this.dataList.length > 0) { + this.reportModal(this.dataList[0]) + } + } + }) + }, + // 获取用户的bu getSiteAndBuByUserName () { let tempData = { diff --git a/src/views/modules/reportWorkOrder/reportDefectOrder.vue b/src/views/modules/reportWorkOrder/reportDefectOrder.vue index 34b6405..614b84d 100644 --- a/src/views/modules/reportWorkOrder/reportDefectOrder.vue +++ b/src/views/modules/reportWorkOrder/reportDefectOrder.vue @@ -25,7 +25,7 @@ - + @@ -987,6 +987,7 @@ this.$nextTick(() => { this.height = window.innerHeight - 210 }) + this.$refs.objectID.focus() }, created() { @@ -1004,6 +1005,41 @@ }, methods: { + // 取消小键盘 + cancelKeyboard (e) { + // this.$refs.objectID + e.target.setAttribute('readonly', true); + setTimeout(() => { + e.target.removeAttribute('readonly'); + }, 100); + }, + + // 设备编码回车事件 + objectIdEnter () { + this.searchData.limit = this.pageSize + this.searchData.page = this.pageIndex + eamWorkOrderSearch(this.searchData).then(({data}) => { + if (data.code === 0) { + this.dataList = data.page.list + this.pageIndex = data.page.currPage + this.pageSize = data.page.pageSize + this.totalPage = data.page.totalCount + if (this.searchData.objectID != null && this.searchData.objectID !== '' && this.dataList.length > 0) { + if (this.dataList[0].status == '未开工') { + this.saveData.site = this.dataList[0].site + this.saveData.buNo = this.dataList[0].buNo + this.saveData.operator = '' + this.saveData.operatorName = '' + this.operatorData.bu = this.dataList[0].site + '_' + this.dataList[0].buNo + this.reachData = this.dataList[0] + this.chooseReachModelFlag = true + } else if (this.dataList[0].status == '已到达') { + this.reportModal(this.dataList[0]) + } + } + } + }) + }, // 获取用户的bu getSiteAndBuByUserName () { diff --git a/src/views/modules/reportWorkOrder/reportMaintenanceOrder.vue b/src/views/modules/reportWorkOrder/reportMaintenanceOrder.vue index e143e59..b9027fe 100644 --- a/src/views/modules/reportWorkOrder/reportMaintenanceOrder.vue +++ b/src/views/modules/reportWorkOrder/reportMaintenanceOrder.vue @@ -28,7 +28,7 @@ - + @@ -1208,10 +1208,10 @@ }, mounted () { - this.$nextTick(() => { this.height = window.innerHeight - 210 }) + this.$refs.objectID.focus() }, created () { @@ -1230,6 +1230,52 @@ }, methods: { + // 取消小键盘 + cancelKeyboard (e) { + // this.$refs.objectID + e.target.setAttribute('readonly', true); + setTimeout(() => { + e.target.removeAttribute('readonly'); + }, 100); + }, + + // 设备编码回车事件 + objectIdEnter () { + this.searchData.limit = this.pageSize + this.searchData.page = this.pageIndex + eamWorkOrderSearch(this.searchData).then(({data}) => { + if (data.code === 0) { + this.dataList = data.page.list + this.pageIndex = data.page.currPage + this.pageSize = data.page.pageSize + this.totalPage = data.page.totalCount + if (this.searchData.objectID != null && this.searchData.objectID !== '' && this.dataList.length > 0) { + if (this.dataList[0].status == '未开工') { + let tempData = { + site: this.dataList[0].site, + buNo: this.dataList[0].buNo, + functionType: 'B', + orderNo: this.dataList[0].orderNo, + status: '已到达' + } + this.$confirm(`是否确认到达?`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + reach(tempData).then(({data}) => { + if (data && data.code === 0) { + this.reportModal(this.dataList[0]) + } + }) + }) + } else if (this.dataList[0].status == '已到达') { + this.reportModal(this.dataList[0]) + } + } + } + }) + }, // 获取用户的bu getSiteAndBuByUserName () {