diff --git a/src/api/mes/reportWork.js b/src/api/mes/reportWork.js index a895802f..dca78152 100644 --- a/src/api/mes/reportWork.js +++ b/src/api/mes/reportWork.js @@ -183,9 +183,10 @@ export function getMesListEquip(query) { }); } //报工按钮 -export function reportSap(workorderCode) { +export function reportSap(workorderCode,machineCode) { const data = { - workorderCode + workorderCode, + machineCode } return request({ url: '/mes/reportWork/reportSap', @@ -194,9 +195,10 @@ export function reportSap(workorderCode) { }); } //报工撤销按钮 -export function reportSapCancel(workorderCode) { +export function reportSapCancel(workorderCode,machineCode) { const data = { - workorderCode + workorderCode, + machineCode } return request({ url: '/mes/reportWork/reportSapCancel', diff --git a/src/views/mes/reportWork/index.vue b/src/views/mes/reportWork/index.vue index 11729494..ba3f7794 100644 --- a/src/views/mes/reportWork/index.vue +++ b/src/views/mes/reportWork/index.vue @@ -1142,11 +1142,12 @@ export default { } const code = sr.workorderCode; + const machineCode = sr.machineCode; let _this = this; this.$modal - .confirm('是否确认工单"' + code + '"的数据项向sap报工?') + .confirm('是否确认线体'+machineCode+',工单' + code + '的数据项向sap报工?') .then(function () { - reportSap(code).then((response) => { + reportSap(code,machineCode).then((response) => { if (response != null && response.code == 200) { _this.$modal.msgSuccess("报工成功"); } @@ -1162,11 +1163,12 @@ export default { this.loading = true; let sr = this.selectRow[0]; const code = sr.workorderCode; + const machineCode = sr.machineCode; let _this = this; this.$modal .confirm('是否确认工单"' + code + '"的数据项撤销sap报工?') .then(function () { - reportSapCancel(code).then((response) => { + reportSapCancel(code,machineCode).then((response) => { if (response != null && response.code == 200) { _this.$modal.msgSuccess("报工撤销成功"); } @@ -1192,6 +1194,7 @@ export default { } this.queryParams.workorderCode = sr.workorderCode; + this.queryParams.machineCode = sr.machineCode; //查询工单报工记录列表 getAllLevelReportList(this.queryParams).then((response) => { @@ -1299,6 +1302,7 @@ export default { } this.queryParams.workorderCode = sr.workorderCode; + this.queryParams.machineCode = sr.machineCode; //查询母工单报工记录列表 getAllLevelConsumeList(this.queryParams).then((response) => { this.libConsumeTabs = response;