From 217fda3d8b707131dae7438dff2fbf205acb9bc1 Mon Sep 17 00:00:00 2001 From: Rui_Li <877258667@qq.com> Date: Wed, 9 Feb 2022 18:18:45 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=93=E6=9D=9F=E6=B4=BE=E5=B7=A5=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/yieldReport/com_finish_schedule.js | 33 +- .../yieldReport/com_exception_reason.vue | 2 +- .../modules/yieldReport/com_finish_roll.vue | 28 +- .../yieldReport/com_finish_schedule.vue | 1705 +++++++++-------- .../yieldReport/com_produce_material.vue | 1 - .../yieldReport/com_produce_report_normal.vue | 1 - 6 files changed, 910 insertions(+), 860 deletions(-) diff --git a/src/api/yieldReport/com_finish_schedule.js b/src/api/yieldReport/com_finish_schedule.js index 79a7768..66a2d61 100644 --- a/src/api/yieldReport/com_finish_schedule.js +++ b/src/api/yieldReport/com_finish_schedule.js @@ -12,33 +12,8 @@ export const getSfdcToolHistBySeqNo = data => createAPI('schedule/getSfdcToolHis // 获取派工单的材料记录 export const getSfdcMaterialHistBySeqNo = data => createAPI('schedule/getSfdcMaterialHistBySeqNo', 'POST', data) -// 获取当前卷sfdc表的报工数据 -export const getSfdcReportedData = data => createAPI('schedule/getSfdcReportedData', 'POST', data) - -// 获取当前卷的材料记录--在线的 -export const getSfdcMaterialByRollNo = data => createAPI('schedule/getSfdcMaterialByRollNo', 'POST', data) - -// 获取当前派工单的材料记录 -export const getSfdcMaterialByCon = data => createAPI('schedule/getSfdcMaterialByCon', 'POST', data) - -// 获取当前派工单的上机卷记录 -export const getSfdcRollOpsByCon = data => createAPI('schedule/getSfdcRollOpsByCon', 'POST', data) - -// 获取当前派工单的不良卷记录 -export const getSfdcDefectByCon = data => createAPI('schedule/getSfdcDefectByCon', 'POST', data) - -// 获取当前上机卷信息 -export const getSfdcRollByCon = data => createAPI('schedule/getSfdcRollByCon', 'POST', data) - -// 结束卷的验证 -export const checkFinishRollWithNoFqc = data => createAPI('schedule/checkFinishRollWithNoFqc', 'POST', data) - -// 结束卷的操作 -export const finishRollWithNoFqc = data => createAPI('schedule/finishRollWithNoFqc', 'POST', data) - - - - - - +// 检查当前派工单是否可以结束 +export const checkFinishScheduleWithNoFqc = data => createAPI('schedule/checkFinishScheduleWithNoFqc', 'POST', data) +// 派工单结束操作 +export const finishScheduleWithNoFqc = data => createAPI('schedule/finishScheduleWithNoFqc', 'POST', data) diff --git a/src/views/modules/yieldReport/com_exception_reason.vue b/src/views/modules/yieldReport/com_exception_reason.vue index d39e89f..9bc3b72 100644 --- a/src/views/modules/yieldReport/com_exception_reason.vue +++ b/src/views/modules/yieldReport/com_exception_reason.vue @@ -56,7 +56,7 @@ export default { //关闭当前的组件 this.closeDialog(); //处理结束卷组件的方法 - this.$emit('initExceptionReason'); + this.$emit('initExceptionReason', this.pageData.exceptionReason); }, }, diff --git a/src/views/modules/yieldReport/com_finish_roll.vue b/src/views/modules/yieldReport/com_finish_roll.vue index 62105e7..e35b995 100644 --- a/src/views/modules/yieldReport/com_finish_roll.vue +++ b/src/views/modules/yieldReport/com_finish_roll.vue @@ -584,8 +584,16 @@ export default { }); //3.刷新派工单的班次信息 await getScheduleShiftData(this.scheduleData).then(({data}) => { - this.pageData.shiftDesc = data.row.shiftDesc;//重置班次 - this.pageData.scheduledDate = data.row.scheduledDate.substring(0, 10);//重置排产日期 + //区分是否存在班次 + if(data.code == 500){ + this.pageData.shiftDesc = data.row.shiftDesc;//重置班次 + this.pageData.scheduledDate = '';//重置排产日期 + this.pageData.shiftNo = ''; + }else{ + this.pageData.shiftDesc = data.row.shiftDesc;//重置班次 + this.pageData.scheduledDate = data.row.scheduledDate.substring(0, 10);//重置排产日期 + this.pageData.shiftNo = data.row.shiftNo; + } }); //4.刷新当前卷的最早和最晚时间 await getSfdcTimeMaxAndMinTime(this.scheduleData).then(({data}) => { @@ -648,8 +656,16 @@ export default { //刷新派工单的班次信息 refreshScheduleShiftData(){ getScheduleShiftData(this.scheduleData).then(({data}) => { - this.pageData.shiftDesc = data.row.shiftDesc;//重置班次 - this.pageData.scheduledDate = data.row.scheduledDate.substring(0, 10);//重置排产日期 + //区分是否存在班次 + if(data.code == 500){ + this.pageData.shiftDesc = data.row.shiftDesc;//重置班次 + this.pageData.scheduledDate = '';//重置排产日期 + this.pageData.shiftNo = ''; + }else{ + this.pageData.shiftDesc = data.row.shiftDesc;//重置班次 + this.pageData.scheduledDate = data.row.scheduledDate.substring(0, 10);//重置排产日期 + this.pageData.shiftNo = data.row.shiftNo; + } }); }, @@ -712,6 +728,7 @@ export default { row.netIssueQty = 0;//重新赋值 return false; } + }, /*添加定制的css类*/ @@ -732,6 +749,8 @@ export default { checkValidApprovedQty(){ //调用刷新的方法 this.refreshSfdcData(); + debugger; + this.pageData.totalQty = parseFloat(this.pageData.approvedQty) + parseFloat(this.pageData.defectedQty); }, /*结束当前的操作*/ @@ -785,7 +804,6 @@ export default { let postData = {'pageData': JSON.stringify(this.pageData), 'materialList': JSON.stringify(this.sfdcMaterialList)}; //处理信息 finishRollWithNoFqc(postData).then(({data}) => { - this.$message.error('qty_reported找不到!'); //判断操作是否成功 if(data.code == 500){ this.$message.error(data.msg); diff --git a/src/views/modules/yieldReport/com_finish_schedule.vue b/src/views/modules/yieldReport/com_finish_schedule.vue index 1840c22..06e6bd7 100644 --- a/src/views/modules/yieldReport/com_finish_schedule.vue +++ b/src/views/modules/yieldReport/com_finish_schedule.vue @@ -8,15 +8,15 @@
数量 - - - + + + - - - + + +
@@ -33,7 +33,7 @@ - + @@ -42,20 +42,21 @@
- +
生产时间(只有结束的记录才会被统计) - - + + - - + + - + @@ -63,13 +64,13 @@ - + - + - + @@ -77,14 +78,16 @@ - + - - + + - - + + @@ -105,7 +108,8 @@ - + 关闭 @@ -128,12 +132,12 @@ - 有记录未结束 - + 仅显示未结束记录 @@ -171,12 +175,12 @@ - 有记录未结束 - + 仅显示未结束使用刀模记录 @@ -214,12 +218,12 @@ - 有记录未结束 - + 仅显示未结束使用材料记录 @@ -258,8 +262,8 @@ + :visible.sync="showExceptionFlag" + @initExceptionReason="initExceptionReason"> @@ -274,830 +278,885 @@ getSfdcTimeHistBySeqNo, getSfdcToolHistBySeqNo, getSfdcMaterialHistBySeqNo, + checkFinishScheduleWithNoFqc, + finishScheduleWithNoFqc, } from '@/api/yieldReport/com_finish_schedule.js'; -export default { - name: "com_finish_roll", - data() { - return { - titleCon: '', - showExceptionFlag: false, - pageData: { - site: this.$store.state.user.site, - userName: this.$store.state.user.name, - orderNo: '', - itemNo: 0, - seqNo: '', - operatorId: '', - approvedQty: 0, - defectedQty: 0, - reportedTime: this.dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss'), - scheduledDate: '', - shiftDesc: '', - totalSetupTime: 0,//总调机时间 - totalDowntimeTimeSetup: 0,//总调机过程停机时间 - totalPureSetupTime: 0,//净调机时间 - totalProdTime: 0,//总生产时间 - totalDowntimeTimeProd: '',//总生产过程停机时间 - totalPureProdTime: 0,//净生产时间 - totalManufactureTime: 0,//总制造时间 - totalManufactureDowntimeTime: 0,//总制造过程停机时间 - totalPureManufactureTime: 0,//净制造时间 - timeFinishedFlag: 'Y',//时间结束的标记 - showNoFinishedTimeFlag: 'Y',//显示未结束的时间记录标记 - toolFinishedFlag: 'Y',//时间结束的标记 - showNoFinishedToolFlag: 'Y',//显示未结束的时间记录标记 - materialFinishedFlag: 'Y',//时间结束的标记 - showNoFinishedMaterialFlag: 'Y',//显示未结束的时间记录标记 - remark: '', - exceptionFlag: 'N', - exceptionReason: '', - autoTool: 'N',//是否自动处理工具 - }, - operatorData: { - site: this.$store.state.user.site, - username: this.$store.state.user.name, - operatorId: '', - operatorName: '', - status: '', - seqNo: '', - showFlag: false - }, - sfdcTimeList: [], - columnTimeArray: [ - { - userId: this.$store.state.user.name, - functionId: 5307, - serialNumber: '5307TimeHistSeqNo', - tableId: "5307Time", - tableName: "时间记录表", - columnProp: "histSeqNo", - headerAlign: "center", - align: "center", - columnLabel: "记录号", - columnWidth: 55, - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: false - }, - { - userId: this.$store.state.user.name, - functionId: 5307, - serialNumber: '5307TimeEventDesc', - tableId: "5307Time", - tableName: "时间记录表", - columnProp: "eventDesc", - headerAlign: "center", - align: "center", - columnLabel: "事件", - columnWidth: 120, - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: false - }, - { - userId: this.$store.state.user.name, - functionId: 5307, - serialNumber: '5307TimeDowntimeCode', - tableId: "5307Time", - tableName: "时间记录表", - columnProp: "downtimeCode", - headerAlign: "center", - align: "center", - columnLabel: "停机代码", - columnWidth: 80, - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: false - }, - { - userId: this.$store.state.user.name, - functionId: 5307, - serialNumber: '5307TimeEventTime', - tableId: "5307Time", - tableName: "时间记录表", - columnProp: "eventTime", - headerAlign: "center", - align: "center", - columnLabel: "时间", - columnWidth: 125, - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: false - }, - { - userId: this.$store.state.user.name, - functionId: 5307, - serialNumber: '5307TimeEnteredby', - tableId: "5307Time", - tableName: "时间记录表", - columnProp: "enteredby", - headerAlign: "center", - align: "right", - columnLabel: "录入人", - columnWidth: 80, - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: false - }, - { - userId: this.$store.state.user.name, - functionId: 5307, - serialNumber: '5307TimeTillTime', - tableId: "5307Time", - tableName: "时间记录表", - columnProp: "tillTime", - headerAlign: "center", - align: "center", - columnLabel: "结束时间", - columnWidth: 125, - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: false - }, - { - userId: this.$store.state.user.name, - functionId: 5307, - serialNumber: '5307TimeTillEnteredBy', - tableId: "5307Time", - tableName: "时间记录表", - columnProp: "tillEnteredBy", - headerAlign: "center", - align: "center", - columnLabel: "结束录入人", - columnWidth: 125, - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: false - }, - { - userId: this.$store.state.user.name, - functionId: 5307, - serialNumber: '5307TimeCompletedFlag', - tableId: "5307Time", - tableName: "时间记录表", - columnProp: "completedFlag", - headerAlign: "center", - align: "center", - columnLabel: "结束", - columnWidth: 35, - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: false - }, - { - userId: this.$store.state.user.name, - functionId: 5307, - serialNumber: '5307TimeTotalTime', - tableId: "5307Time", - tableName: "时间记录表", - columnProp: "totalTime", - headerAlign: "center", - align: "center", - columnLabel: "总时长", - columnWidth: 55, - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: false - }, - { - userId: this.$store.state.user.name, - functionId: 5307, - serialNumber: '5307TimeDowntimePhaseIn', - tableId: "5307Time", - tableName: "时间记录表", - columnProp: "downtimePhaseIn", - headerAlign: "center", - align: "center", - columnLabel: "停机所处时段", - columnWidth: 90, - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: false - } - ], - sfdcToolList: [], - columnToolArray: [ - { - userId: this.$store.state.user.name, - functionId: 5307, - serialNumber: '5301ToolHistSeqNo', - tableId: "5307Tool", - tableName: "工具记录表", - columnProp: "histSeqNo", - headerAlign: "center", - align: "center", - columnLabel: "序号", - columnWidth: 35, - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: false - }, - { - userId: this.$store.state.user.name, - functionId: 5307, - serialNumber: '5301ToolRollNo', - tableId: "5307Tool", - tableName: "工单表", - columnProp: "rollNo", - headerAlign: "center", - align: "center", - columnLabel: "卷号", - columnWidth: 60, - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: false - }, - { - userId: this.$store.state.user.name, - functionId: 5307, - serialNumber: '5301ToolReportedDate', - tableId: "5307Tool", - tableName: "工单表", - columnProp: "reportedDate", - headerAlign: "center", - align: "center", - columnLabel: "报告时间", - columnWidth: 125, - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: false - }, - { - userId: this.$store.state.user.name, - functionId: 5307, - serialNumber: '5301ToolReportedBy', - tableId: "5307Tool", - tableName: "工单表", - columnProp: "reportedBy", - headerAlign: "center", - align: "center", - columnLabel: "报告人", - columnWidth: 80, - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: false - }, - { - userId: this.$store.state.user.name, - functionId: 5307, - serialNumber: '5301ToolToolInstanceId', - tableId: "5307Tool", - tableName: "工单表", - columnProp: "toolInstanceId", - headerAlign: "center", - align: "center", - columnLabel: "工具实例编号", - columnWidth: 80, - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: false - }, - { - userId: this.$store.state.user.name, - functionId: 5307, - serialNumber: '5301ToolStartDate', - tableId: "5307Tool", - tableName: "工单表", - columnProp: "startDate", - headerAlign: "center", - align: "center", - columnLabel: "开始使用时间", - columnWidth: 125, - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: false - }, - { - userId: this.$store.state.user.name, - functionId: 5307, - serialNumber: '5301ToolFinishedDate', - tableId: "5307Tool", - tableName: "工单表", - columnProp: "finishedDate", - headerAlign: "center", - align: "center", - columnLabel: "结束使用时间", - columnWidth: 125, - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: false - }, - { - userId: this.$store.state.user.name, - functionId: 5307, - serialNumber: '5301ToolFinishedFlag', - tableId: "5307Tool", - tableName: "工单表", - columnProp: "finishedFlag", - headerAlign: "center", - align: "center", - columnLabel: "使用结束", - columnWidth: 60, - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: false - }, - { - userId: this.$store.state.user.name, - functionId: 5307, - serialNumber: '5301ToolRemark', - tableId: "5307Tool", - tableName: "工单表", - columnProp: "remark", - headerAlign: "center", - align: "center", - columnLabel: "备注", - columnWidth: 80, - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: false - }, - { - userId: this.$store.state.user.name, - functionId: 5307, - serialNumber: '5301ToolStartFromRollNo', - tableId: "5307Tool", - tableName: "工单表", - columnProp: "startFromRollNo", - headerAlign: "center", - align: "center", - columnLabel: "上机时的半成品卷号", - columnWidth: 120, - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: false - }, - { - userId: this.$store.state.user.name, - functionId: 5307, - serialNumber: '5301ToolFinishQty', - tableId: "5307Tool", - tableName: "工单表", - columnProp: "finishQty", - headerAlign: "center", - align: "center", - columnLabel: "生产数量", - columnWidth: 60, - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: false - } - ], - sfdcMaterialList: [], - columnMaterialArray: [ - { - userId: this.$store.state.user.name, - functionId: 5307, - serialNumber: '5307MaterialReportDate', - tableId: "5307Material", - tableName: "派工单材料", - columnProp: "reportDate", - headerAlign: "center", - align: "center", - columnLabel: "报告时间", - columnWidth: 125, - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: false - }, - { - userId: this.$store.state.user.name, - functionId: 5307, - serialNumber: '5307MaterialReportedBy', - tableId: "5307Material", - tableName: "派工单材料", - columnProp: "reportedBy", - headerAlign: "center", - align: "center", - columnLabel: "报告人", - columnWidth: 80, - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: false - }, - { - userId: this.$store.state.user.name, - functionId: 5307, - serialNumber: '5307MaterialRmRollNo', - tableId: "5307Material", - tableName: "派工单材料", - columnProp: "rmRollNo", - headerAlign: "center", - align: "center", - columnLabel: "材料卷号", - columnWidth: 100, - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: false - }, - { - userId: this.$store.state.user.name, - functionId: 5307, - serialNumber: '5307MaterialPartNo', - tableId: "5307Material", - tableName: "派工单材料", - columnProp: "partNo", - headerAlign: "center", - align: "center", - columnLabel: "零部件编码", - columnWidth: 100, - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: false - }, - { - userId: this.$store.state.user.name, - functionId: 5307, - serialNumber: '5307MaterialStartDate', - tableId: "5307Material", - tableName: "派工单材料", - columnProp: "startDate", - headerAlign: "center", - align: "center", - columnLabel: "开始使用时间", - columnWidth: 125, - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: false - }, - { - userId: this.$store.state.user.name, - functionId: 5307, - serialNumber: '5307MaterialTransQty', - tableId: "5307Material", - tableName: "派工单材料", - columnProp: "transQty", - headerAlign: "center", - align: "center", - columnLabel: "数量", - columnWidth: 80, - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: false - }, - { - userId: this.$store.state.user.name, - functionId: 5307, - serialNumber: '5307MaterialNetIssueQty', - tableId: "5307Material", - tableName: "派工单材料", - columnProp: "netIssueQty", - headerAlign: "center", - align: "center", - columnLabel: "本卷耗用数量", - columnWidth: 100, - columnHidden: true, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: false + + export default { + name: "com_finish_roll", + data() { + return { + titleCon: '', + showExceptionFlag: false, + pageData: { + site: this.$store.state.user.site, + userName: this.$store.state.user.name, + orderNo: '', + itemNo: 0, + seqNo: '', + operatorId: '', + approvedQty: 0, + defectedQty: 0, + reportedTime: this.dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss'), + scheduledDate: '', + shiftDesc: '', + shiftNo: '', + totalSetupTime: 0,//总调机时间 + totalDowntimeTimeSetup: 0,//总调机过程停机时间 + totalPureSetupTime: 0,//净调机时间 + totalProdTime: 0,//总生产时间 + totalDowntimeTimeProd: '',//总生产过程停机时间 + totalPureProdTime: 0,//净生产时间 + totalManufactureTime: 0,//总制造时间 + totalManufactureDowntimeTime: 0,//总制造过程停机时间 + totalPureManufactureTime: 0,//净制造时间 + timeFinishedFlag: 'Y',//时间结束的标记 + showNoFinishedTimeFlag: 'Y',//显示未结束的时间记录标记 + toolFinishedFlag: 'Y',//时间结束的标记 + showNoFinishedToolFlag: 'Y',//显示未结束的时间记录标记 + materialFinishedFlag: 'Y',//时间结束的标记 + showNoFinishedMaterialFlag: 'Y',//显示未结束的时间记录标记 + remark: '', + exceptionFlag: 'N', + exceptionReason: '', + autoTool: 'N',//是否自动处理工具 }, - { - userId: this.$store.state.user.name, - functionId: 5307, - serialNumber: '5307MaterialKeyRMFlag', - tableId: "5307Material", - tableName: "派工单材料", - columnProp: "keyRMFlag", - headerAlign: "center", - align: "center", - columnLabel: "是否主材", - columnWidth: 80, - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: false + operatorData: { + site: this.$store.state.user.site, + username: this.$store.state.user.name, + operatorId: '', + operatorName: '', + status: '', + seqNo: '', + showFlag: false }, - { - userId: this.$store.state.user.name, - functionId: 5307, - serialNumber: '5307MaterialSAPBOMItemNo', - tableId: "5307Material", - tableName: "派工单材料", - columnProp: "sAPBOMItemNo", - headerAlign: "center", - align: "center", - columnLabel: "SAP BOM序号", - columnWidth: 100, - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: false - } - ], - dataListLoading: false, - } - }, - components: { - comExceptionReason,/*异常原因的组件*/ - }, - methods: { - /*初始化页面参数*/ - init(scheduleData, operatorData) { - //初始化参数 - this.pageData.orderNo = scheduleData.orderNo; - this.pageData.itemNo = scheduleData.itemNo; - this.pageData.seqNo = scheduleData.seqNo; - this.pageData.operatorId = operatorData.operatorId; - //重置时间 - this.pageData.reportedTime = this.dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss'); - //初始化操作员对象 - this.operatorData = JSON.parse(JSON.stringify(operatorData)); - //初始化标题 - this.titleCon = '结束派工单 \ - 派工单号:'+scheduleData.seqNo; - //处理异常的原因 - this.pageData.exceptionFlag = 'N'; - this.pageData.exceptionReason = ''; - //刷新当前派工单的信息 - this.refreshPageData(); + sfdcTimeList: [], + columnTimeArray: [ + { + userId: this.$store.state.user.name, + functionId: 5307, + serialNumber: '5307TimeHistSeqNo', + tableId: "5307Time", + tableName: "时间记录表", + columnProp: "histSeqNo", + headerAlign: "center", + align: "center", + columnLabel: "记录号", + columnWidth: 55, + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, + { + userId: this.$store.state.user.name, + functionId: 5307, + serialNumber: '5307TimeEventDesc', + tableId: "5307Time", + tableName: "时间记录表", + columnProp: "eventDesc", + headerAlign: "center", + align: "center", + columnLabel: "事件", + columnWidth: 120, + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, + { + userId: this.$store.state.user.name, + functionId: 5307, + serialNumber: '5307TimeDowntimeCode', + tableId: "5307Time", + tableName: "时间记录表", + columnProp: "downtimeCode", + headerAlign: "center", + align: "center", + columnLabel: "停机代码", + columnWidth: 80, + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, + { + userId: this.$store.state.user.name, + functionId: 5307, + serialNumber: '5307TimeEventTime', + tableId: "5307Time", + tableName: "时间记录表", + columnProp: "eventTime", + headerAlign: "center", + align: "center", + columnLabel: "时间", + columnWidth: 125, + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, + { + userId: this.$store.state.user.name, + functionId: 5307, + serialNumber: '5307TimeEnteredby', + tableId: "5307Time", + tableName: "时间记录表", + columnProp: "enteredby", + headerAlign: "center", + align: "right", + columnLabel: "录入人", + columnWidth: 80, + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, + { + userId: this.$store.state.user.name, + functionId: 5307, + serialNumber: '5307TimeTillTime', + tableId: "5307Time", + tableName: "时间记录表", + columnProp: "tillTime", + headerAlign: "center", + align: "center", + columnLabel: "结束时间", + columnWidth: 125, + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, + { + userId: this.$store.state.user.name, + functionId: 5307, + serialNumber: '5307TimeTillEnteredBy', + tableId: "5307Time", + tableName: "时间记录表", + columnProp: "tillEnteredBy", + headerAlign: "center", + align: "center", + columnLabel: "结束录入人", + columnWidth: 125, + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, + { + userId: this.$store.state.user.name, + functionId: 5307, + serialNumber: '5307TimeCompletedFlag', + tableId: "5307Time", + tableName: "时间记录表", + columnProp: "completedFlag", + headerAlign: "center", + align: "center", + columnLabel: "结束", + columnWidth: 35, + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, + { + userId: this.$store.state.user.name, + functionId: 5307, + serialNumber: '5307TimeTotalTime', + tableId: "5307Time", + tableName: "时间记录表", + columnProp: "totalTime", + headerAlign: "center", + align: "center", + columnLabel: "总时长", + columnWidth: 55, + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, + { + userId: this.$store.state.user.name, + functionId: 5307, + serialNumber: '5307TimeDowntimePhaseIn', + tableId: "5307Time", + tableName: "时间记录表", + columnProp: "downtimePhaseIn", + headerAlign: "center", + align: "center", + columnLabel: "停机所处时段", + columnWidth: 90, + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + } + ], + sfdcToolList: [], + columnToolArray: [ + { + userId: this.$store.state.user.name, + functionId: 5307, + serialNumber: '5301ToolHistSeqNo', + tableId: "5307Tool", + tableName: "工具记录表", + columnProp: "histSeqNo", + headerAlign: "center", + align: "center", + columnLabel: "序号", + columnWidth: 35, + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, + { + userId: this.$store.state.user.name, + functionId: 5307, + serialNumber: '5301ToolRollNo', + tableId: "5307Tool", + tableName: "工单表", + columnProp: "rollNo", + headerAlign: "center", + align: "center", + columnLabel: "卷号", + columnWidth: 60, + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, + { + userId: this.$store.state.user.name, + functionId: 5307, + serialNumber: '5301ToolReportedDate', + tableId: "5307Tool", + tableName: "工单表", + columnProp: "reportedDate", + headerAlign: "center", + align: "center", + columnLabel: "报告时间", + columnWidth: 125, + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, + { + userId: this.$store.state.user.name, + functionId: 5307, + serialNumber: '5301ToolReportedBy', + tableId: "5307Tool", + tableName: "工单表", + columnProp: "reportedBy", + headerAlign: "center", + align: "center", + columnLabel: "报告人", + columnWidth: 80, + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, + { + userId: this.$store.state.user.name, + functionId: 5307, + serialNumber: '5301ToolToolInstanceId', + tableId: "5307Tool", + tableName: "工单表", + columnProp: "toolInstanceId", + headerAlign: "center", + align: "center", + columnLabel: "工具实例编号", + columnWidth: 80, + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, + { + userId: this.$store.state.user.name, + functionId: 5307, + serialNumber: '5301ToolStartDate', + tableId: "5307Tool", + tableName: "工单表", + columnProp: "startDate", + headerAlign: "center", + align: "center", + columnLabel: "开始使用时间", + columnWidth: 125, + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, + { + userId: this.$store.state.user.name, + functionId: 5307, + serialNumber: '5301ToolFinishedDate', + tableId: "5307Tool", + tableName: "工单表", + columnProp: "finishedDate", + headerAlign: "center", + align: "center", + columnLabel: "结束使用时间", + columnWidth: 125, + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, + { + userId: this.$store.state.user.name, + functionId: 5307, + serialNumber: '5301ToolFinishedFlag', + tableId: "5307Tool", + tableName: "工单表", + columnProp: "finishedFlag", + headerAlign: "center", + align: "center", + columnLabel: "使用结束", + columnWidth: 60, + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, + { + userId: this.$store.state.user.name, + functionId: 5307, + serialNumber: '5301ToolRemark', + tableId: "5307Tool", + tableName: "工单表", + columnProp: "remark", + headerAlign: "center", + align: "center", + columnLabel: "备注", + columnWidth: 80, + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, + { + userId: this.$store.state.user.name, + functionId: 5307, + serialNumber: '5301ToolStartFromRollNo', + tableId: "5307Tool", + tableName: "工单表", + columnProp: "startFromRollNo", + headerAlign: "center", + align: "center", + columnLabel: "上机时的半成品卷号", + columnWidth: 120, + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, + { + userId: this.$store.state.user.name, + functionId: 5307, + serialNumber: '5301ToolFinishQty', + tableId: "5307Tool", + tableName: "工单表", + columnProp: "finishQty", + headerAlign: "center", + align: "center", + columnLabel: "生产数量", + columnWidth: 60, + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + } + ], + sfdcMaterialList: [], + columnMaterialArray: [ + { + userId: this.$store.state.user.name, + functionId: 5307, + serialNumber: '5307MaterialReportDate', + tableId: "5307Material", + tableName: "派工单材料", + columnProp: "reportDate", + headerAlign: "center", + align: "center", + columnLabel: "报告时间", + columnWidth: 125, + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, + { + userId: this.$store.state.user.name, + functionId: 5307, + serialNumber: '5307MaterialReportedBy', + tableId: "5307Material", + tableName: "派工单材料", + columnProp: "reportedBy", + headerAlign: "center", + align: "center", + columnLabel: "报告人", + columnWidth: 80, + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, + { + userId: this.$store.state.user.name, + functionId: 5307, + serialNumber: '5307MaterialRmRollNo', + tableId: "5307Material", + tableName: "派工单材料", + columnProp: "rmRollNo", + headerAlign: "center", + align: "center", + columnLabel: "材料卷号", + columnWidth: 100, + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, + { + userId: this.$store.state.user.name, + functionId: 5307, + serialNumber: '5307MaterialPartNo', + tableId: "5307Material", + tableName: "派工单材料", + columnProp: "partNo", + headerAlign: "center", + align: "center", + columnLabel: "零部件编码", + columnWidth: 100, + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, + { + userId: this.$store.state.user.name, + functionId: 5307, + serialNumber: '5307MaterialStartDate', + tableId: "5307Material", + tableName: "派工单材料", + columnProp: "startDate", + headerAlign: "center", + align: "center", + columnLabel: "开始使用时间", + columnWidth: 125, + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, + { + userId: this.$store.state.user.name, + functionId: 5307, + serialNumber: '5307MaterialTransQty', + tableId: "5307Material", + tableName: "派工单材料", + columnProp: "transQty", + headerAlign: "center", + align: "center", + columnLabel: "数量", + columnWidth: 80, + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, + { + userId: this.$store.state.user.name, + functionId: 5307, + serialNumber: '5307MaterialNetIssueQty', + tableId: "5307Material", + tableName: "派工单材料", + columnProp: "netIssueQty", + headerAlign: "center", + align: "center", + columnLabel: "本卷耗用数量", + columnWidth: 100, + columnHidden: true, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, + { + userId: this.$store.state.user.name, + functionId: 5307, + serialNumber: '5307MaterialKeyRMFlag', + tableId: "5307Material", + tableName: "派工单材料", + columnProp: "keyRMFlag", + headerAlign: "center", + align: "center", + columnLabel: "是否主材", + columnWidth: 80, + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, + { + userId: this.$store.state.user.name, + functionId: 5307, + serialNumber: '5307MaterialSAPBOMItemNo', + tableId: "5307Material", + tableName: "派工单材料", + columnProp: "sAPBOMItemNo", + headerAlign: "center", + align: "center", + columnLabel: "SAP BOM序号", + columnWidth: 100, + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + } + ], + dataListLoading: false, + } }, - - /*关闭modal*/ - closeDialog(){ - this.$emit('update:visible', false); + components: { + comExceptionReason,/*异常原因的组件*/ }, + methods: { + /*初始化页面参数*/ + init(scheduleData, operatorData) { + //初始化参数 + this.pageData.orderNo = scheduleData.orderNo; + this.pageData.itemNo = scheduleData.itemNo; + this.pageData.seqNo = scheduleData.seqNo; + this.pageData.operatorId = operatorData.operatorId; + //重置时间 + this.pageData.reportedTime = this.dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss'); + //初始化操作员对象 + this.operatorData = JSON.parse(JSON.stringify(operatorData)); + //初始化标题 + this.titleCon = '结束派工单 \ + 派工单号:' + scheduleData.seqNo; + //处理异常的原因 + this.pageData.exceptionFlag = 'N'; + this.pageData.exceptionReason = ''; + //刷新当前派工单的信息 + this.refreshPageData(); + }, - /*刷新当前的页面参数*/ - refreshPageData(){ - getFinishSchedulePageData(this.pageData).then(({data}) => { - this.pageData.approvedQty = data.resultMap.reportedQty;//总良品数量 - this.pageData.defectedQty = data.resultMap.defectedQty;//总不良品数量 - //调机的数据 - this.pageData.totalSetupTime = data.resultMap.totalSetupTime;//总调机时间 - this.pageData.totalDowntimeTimeSetup = data.resultMap.totalDowntimeTimeSetup;//总调机过程停机时间 - this.pageData.totalPureSetupTime = data.resultMap.pureSetupTime;//净调机时间 - //生产时间的数据 - this.pageData.totalProdTime = data.resultMap.totalProdTime; //总生产时间 - this.pageData.totalDowntimeTimeProd = data.resultMap.totalDowntimeTimeProd; //总生产过程停机时间 - this.pageData.totalPureProdTime = data.resultMap.pureProdTime; //净生产时间 - //制造时间的数据 - this.pageData.totalManufactureTime = data.resultMap.totalManfTime; //总制造时间 - this.pageData.totalManufactureDowntimeTime = data.resultMap.totalDowntimeTimeManf; //总制造过程停机时间 - this.pageData.totalPureManufactureTime = data.resultMap.pureManfTime; //净制造时间 - //班次和时间的数据 - this.pageData.scheduledDate = data.resultMap.scheduledDate; //排产日期 - this.pageData.shiftDesc = data.resultMap.shiftDesc; //班次 - //设置是否结束的标记 - this.pageData.timeFinishedFlag = data.resultMap.scheduledDate; //时间记录是否结束 - this.pageData.toolFinishedFlag = data.resultMap.shiftDesc; //工具记录是否结束 - this.pageData.materialFinishedFlag = data.resultMap.scheduledDate; //材料记录是否结束 - //刷新时间的记录 - this.refreshSfdcTimeHist(); - //刷新工具的记录 - this.refreshSfdcToolHist(); - //刷新材料的记录 - this.refreshSfdcMaterialHist(); + /*关闭modal*/ + closeDialog() { + this.$emit('update:visible', false); + }, - }); - }, + /*刷新当前的页面参数*/ + refreshPageData() { + getFinishSchedulePageData(this.pageData).then(({data}) => { + this.pageData.approvedQty = data.resultMap.reportedQty;//总良品数量 + this.pageData.defectedQty = data.resultMap.defectedQty;//总不良品数量 + //调机的数据 + this.pageData.totalSetupTime = data.resultMap.totalSetupTime;//总调机时间 + this.pageData.totalDowntimeTimeSetup = data.resultMap.totalDowntimeTimeSetup;//总调机过程停机时间 + this.pageData.totalPureSetupTime = data.resultMap.pureSetupTime;//净调机时间 + //生产时间的数据 + this.pageData.totalProdTime = data.resultMap.totalProdTime; //总生产时间 + this.pageData.totalDowntimeTimeProd = data.resultMap.totalDowntimeTimeProd; //总生产过程停机时间 + this.pageData.totalPureProdTime = data.resultMap.pureProdTime; //净生产时间 + //制造时间的数据 + this.pageData.totalManufactureTime = data.resultMap.totalManfTime; //总制造时间 + this.pageData.totalManufactureDowntimeTime = data.resultMap.totalDowntimeTimeManf; //总制造过程停机时间 + this.pageData.totalPureManufactureTime = data.resultMap.pureManfTime; //净制造时间 + //班次和时间的数据 + this.pageData.scheduledDate = data.resultMap.scheduledDate; //排产日期 + this.pageData.shiftDesc = data.resultMap.shiftDesc; //班次 + this.pageData.shiftNo = data.resultMap.shiftNo;//班次的编码 + //设置是否结束的标记 + this.pageData.timeFinishedFlag = data.resultMap.timeFinishedFlag; //时间记录是否结束 + this.pageData.toolFinishedFlag = data.resultMap.toolFinishedFlag; //工具记录是否结束 + this.pageData.materialFinishedFlag = data.resultMap.materialFinishedFlag; //材料记录是否结束 + //刷新时间的记录 + this.refreshSfdcTimeHist(); + //刷新工具的记录 + this.refreshSfdcToolHist(); + //刷新材料的记录 + this.refreshSfdcMaterialHist(); - //刷新当前页面时间的列表 - refreshSfdcTimeHist(){ - getSfdcTimeHistBySeqNo(this.pageData).then(({data}) => { - this.sfdcTimeList = data.rows; - }) - }, + }); + }, - //刷新当前页面工具的列表 - refreshSfdcToolHist(){ - getSfdcToolHistBySeqNo(this.pageData).then(({data}) => { - this.sfdcToolList = data.rows; - }) - }, + //刷新当前页面时间的列表 + refreshSfdcTimeHist() { + getSfdcTimeHistBySeqNo(this.pageData).then(({data}) => { + this.sfdcTimeList = data.rows; + }) + }, - //刷新当前页面材料的列表 - refreshSfdcMaterialHist(){ - getSfdcMaterialHistBySeqNo(this.pageData).then(({data}) => { - this.sfdcMaterialList = data.rows; - }) - }, + //刷新当前页面工具的列表 + refreshSfdcToolHist() { + getSfdcToolHistBySeqNo(this.pageData).then(({data}) => { + this.sfdcToolList = data.rows; + }) + }, - /*生产过程的停机组件*/ - exceptionReasonModal() { - //1.首先调用菜单判断方式 打开生产过程的停机的页面 - //checkProduceButton('produceDownFlag'); - //打开生产过程的工具的页面 - this.$nextTick(() => { - this.show = true; - this.$refs.comProduceDown.init(this.scheduleData, this.operatorData) - }); - }, + //刷新当前页面材料的列表 + refreshSfdcMaterialHist() { + getSfdcMaterialHistBySeqNo(this.pageData).then(({data}) => { + this.sfdcMaterialList = data.rows; + }) + }, - /*检验良品的总数量*/ - checkValidApprovedQty(){ - //首先判断数值是否通过判断 - let approvedQty = this.pageData.approvedQty; - if(approvedQty == null || approvedQty == ''){ - this.$message.error('请输入总良品数量!'); - this.pageData.approvedQty = 0;//重新赋值 - return false; - } - }, + /*生产过程的停机组件*/ + exceptionReasonModal() { + //1.首先调用菜单判断方式 打开生产过程的停机的页面 + //checkProduceButton('produceDownFlag'); + //打开生产过程的工具的页面 + this.$nextTick(() => { + this.show = true; + this.$refs.comProduceDown.init(this.scheduleData, this.operatorData) + }); + }, - /*结束当前的操作*/ - finishScheduleBun(){ - //首先判断数值是否通过判断 - let approvedQty = this.pageData.approvedQty; - if(approvedQty == null || approvedQty == ''){ - this.$message.error('请输入总良品数量!'); - this.pageData.approvedQty = 0;//重新赋值 - return false; - } - if(approvedQty <= 0){ - this.$message.error('总良品数量必须大于0!'); - this.pageData.approvedQty = 0;//重新赋值 - return false; - } - //班次判断 - if(this.pageData.shiftDesc == '无班次'){ - this.$message.error('该时间段内没有匹配的班次信息,请联系相关人员!!'); - return false; - } + /*检验良品的总数量*/ + checkValidApprovedQty() { + //首先判断数值是否通过判断 + let approvedQty = this.pageData.approvedQty; + if (approvedQty == null || approvedQty == '') { + this.$message.error('请输入总良品数量!'); + this.pageData.approvedQty = 0;//重新赋值 + return false; + } + }, - //先调用检查方法 - checkFinishScheduleWithNoFqc(this.pageData).then(({data}) => { - //判断是否成功 - if(data.code == 500){ - this.$message.error(data.msg); - }else if (data.resultMap.resultCode == '201'){ - //打开异常原因录入的界面 - this.$confirm(data.resultMap.resultMsg, '提示', { + /*结束当前的操作*/ + finishScheduleBun() { + //首先判断数值是否通过判断 + let approvedQty = this.pageData.approvedQty; + if (approvedQty == null || approvedQty == '') { + this.$message.error('请输入总良品数量!'); + this.pageData.approvedQty = 0;//重新赋值 + return false; + } + if (approvedQty <= 0) { + this.$message.error('总良品数量必须大于0!'); + this.pageData.approvedQty = 0;//重新赋值 + return false; + } + //班次判断 + if (this.pageData.shiftDesc == '无班次') { + this.$message.error('该时间段内没有匹配的班次信息,请联系相关人员!!'); + return false; + } + //先判断是否存在未结束的工具记录 + let countNums = 0; + let len = this.sfdcToolList.length; + //循环判断是否存在未结束的 + for (var i = 0; i < len; i++) { + let sfdcTool = this.sfdcToolList[i]; + let finishedFlag = sfdcTool.finishedFlag; + if ('N' === finishedFlag) { + //设置加1 + countNums = countNums + 1; + } + } + + //判断是否需要自动 + if (countNums > 0) { + this.$confirm('该派工单/卷上还有刀模尚未结束处理?请确认是否要自动处理?', '提示', { confirmButtonText: '确认', celButtonText: '取消', type: 'warning' }).then(() => { - this.showExceptionReasonModal(); + //设置自动处理工序的信息 + this.pageData.autoTool = 'Y'; + //调用检查方法 + //先调用检查方法 + checkFinishScheduleWithNoFqc(this.pageData).then(({data}) => { + //判断是否成功 + if (data.code == 500) { + this.$message.error(data.msg); + } else if (data.resultMap.resultCode == '201') { + //打开异常原因录入的界面 + this.$confirm(data.resultMap.resultMsg, '提示', { + confirmButtonText: '确认', + celButtonText: '取消', + type: 'warning' + }).then(() => { + //调用检查方法 + this.showExceptionReasonModal(); + }); + } else { + //执行结束派工单操作 + this.finishScheduleOperation(); + } + }); + }).catch(() => { + this.pageData.autoTool = 'N'; + }); + } else { + //调用检查的方法 + //先调用检查方法 + checkFinishScheduleWithNoFqc(this.pageData).then(({data}) => { + //判断是否成功 + if (data.code == 500) { + this.$message.error(data.msg); + } else if (data.resultMap.resultCode == '201') { + //打开异常原因录入的界面 + this.$confirm(data.resultMap.resultMsg, '提示', { + confirmButtonText: '确认', + celButtonText: '取消', + type: 'warning' + }).then(() => { + //调用检查方法 + this.showExceptionReasonModal(); + }); + } else { + //执行结束派工单操作 + this.finishScheduleOperation(); + } }); - }else{ - //执行结束卷操作 - this.finishRollOperation(); } - }); - }, - /*结束卷的具体操作*/ - finishRollOperation(){ - //验证通过提交到后台 - let postData = {'pageData': JSON.stringify(this.pageData), 'materialList': JSON.stringify(this.sfdcMaterialList)}; - //处理信息 - finishRollWithNoFqc(postData).then(({data}) => { - this.$message.error('qty_reported找不到!'); - //判断操作是否成功 - if(data.code == 500){ - this.$message.error(data.msg); - }else{ - //刷新报工的页面 - this.$emit('refreshPageData'); - //关闭当前的页面 - this.closeDialog(); - } - }) - }, - /*打开异常原因录入页面*/ - showExceptionReasonModal(){ - //1.首先调用菜单判断方式 打开生产过程的材料的页面 - //checkProduceButton('produceMaterialFlag'); - //打开生产过程的工具的页面 - this.$nextTick(() => { - this.showExceptionFlag = true; - this.$refs.comExceptionReason.init(); - }); - }, + }, + + /*结束卷的具体操作*/ + finishScheduleOperation() { + //处理信息 + finishScheduleWithNoFqc(this.pageData).then(({data}) => { + //判断操作是否成功 + if (data.code == 500) { + this.$message.error(data.msg); + } else { + //刷新报工的页面 + this.$emit('processFinishScheduleOperation'); + //关闭当前的页面 + this.closeDialog(); + } + }) + }, + + /*打开异常原因录入页面*/ + showExceptionReasonModal() { + //1.首先调用菜单判断方式 打开生产过程的材料的页面 + //checkProduceButton('produceMaterialFlag'); + //打开生产过程的工具的页面 + this.$nextTick(() => { + this.showExceptionFlag = true; + this.$refs.comExceptionReason.init(); + }); + }, - /*处理异常的原因*/ - initExceptionReason(exceptionReason){ - //处理异常的原因 - this.pageData.exceptionFlag = 'Y'; - this.pageData.exceptionReason = exceptionReason; - //然后提交结束卷的数据 - this.finishRollOperation(); + /*处理异常的原因*/ + initExceptionReason(exceptionReason) { + //处理异常的原因 + this.pageData.exceptionFlag = 'Y'; + this.pageData.exceptionReason = exceptionReason; + //然后提交结束派工单的数据 + this.finishScheduleOperation(); + } + }, + created() { + // this.factoryList() + // this.getLanguageList() } - }, - created() { - // this.factoryList() - // this.getLanguageList() } -} diff --git a/src/views/modules/yieldReport/com_produce_material.vue b/src/views/modules/yieldReport/com_produce_material.vue index 65c2c79..dfbf077 100644 --- a/src/views/modules/yieldReport/com_produce_material.vue +++ b/src/views/modules/yieldReport/com_produce_material.vue @@ -198,7 +198,6 @@ export default { } //调用方法执行上材料 feedingMaterialRoll(this.pageData).then(({data}) => { - debugger; if(data.code == 500){ this.$message.error(data.msg); }else{ diff --git a/src/views/modules/yieldReport/com_produce_report_normal.vue b/src/views/modules/yieldReport/com_produce_report_normal.vue index 69185b9..8114862 100644 --- a/src/views/modules/yieldReport/com_produce_report_normal.vue +++ b/src/views/modules/yieldReport/com_produce_report_normal.vue @@ -2903,7 +2903,6 @@ export default { this.searchData.rollNo = ''; } - console.log(this.scheduleData,this.searchData) //区分不同的页签刷新不同的列表数据 if (this.activeTable == 'sfdc_time') { await this.getSfdcTimeList();