diff --git a/src/api/yieldReport/com_finish_schedule.js b/src/api/yieldReport/com_finish_schedule.js index bddfe84..170e0f6 100644 --- a/src/api/yieldReport/com_finish_schedule.js +++ b/src/api/yieldReport/com_finish_schedule.js @@ -21,3 +21,6 @@ export const finishScheduleWithNoFqc = data => createAPI('schedule/finishSchedul // 换包装结束工单 export const repackFinishScheduleWithNoFqc = data => createAPI('schedule/repackFinishScheduleWithNoFqc', 'POST', data) +// 更新工单BOM备注 +export const updateOrderBomRemark = data => createAPI('schedule/updateOrderBomRemark', 'POST', data) + diff --git a/src/views/modules/yieldReport/com_finish_schedule.vue b/src/views/modules/yieldReport/com_finish_schedule.vue index c9564d6..be90ac2 100644 --- a/src/views/modules/yieldReport/com_finish_schedule.vue +++ b/src/views/modules/yieldReport/com_finish_schedule.vue @@ -262,21 +262,102 @@ - - - + +
+ +
+ + :rows="3" + placeholder="请填写结单备注信息" + style="width: 100%;"> - - - - 确 定 - 取 消 - +
+ + +
+ + + + + + + + + + + + + + + + + + + + +
+ + +
+ 确 定 + 取 消 +
+
@@ -302,6 +383,10 @@ repackFinishScheduleWithNoFqc } from '@/api/yieldReport/com_finish_schedule.js'; + import { + getOrderBomByCon + } from '@/api/yieldReport/produce_report_normal.js'; + import { searchSysLanguagePackList, searchSysLanguageParam, @@ -327,6 +412,7 @@ remarkForm: { remark: '' }, + orderBomList: [], // 材料清单列表 scheduleNo: 0, pageData: { site: this.$store.state.user.site, @@ -358,6 +444,7 @@ materialFinishedFlag: 'Y',//时间结束的标记 showNoFinishedMaterialFlag: 'Y',//显示未结束的时间记录标记 remark: '', + bomList: [], // 材料清单备注列表 exceptionFlag: 'N', exceptionReason: '', autoTool: 'N',//是否自动处理工具 @@ -1336,17 +1423,41 @@ openRemarkDialog() { // 清空之前的备注 this.remarkForm.remark = this.pageData.remark || ''; + // 加载材料清单 + this.refreshOrderBomList(); // 打开对话框 this.remarkDialogVisible = true; }, + /*加载材料清单*/ + refreshOrderBomList() { + const searchData = { + site: this.pageData.site, + orderNo: this.pageData.orderNo, + itemNo: this.pageData.itemNo, + seqNo: this.pageData.seqNo + }; + getOrderBomByCon(searchData).then(({data}) => { + this.orderBomList = data.rows || []; + }); + }, + /*确认备注并继续结单*/ confirmRemark() { // 保存备注到pageData this.pageData.remark = this.remarkForm.remark; - // 关闭备注对话框 - this.remarkDialogVisible = false; - // 继续执行原有的结单逻辑 + + // 将材料清单数据放入pageData,在结单时一起保存(同一事务) + if (this.orderBomList && this.orderBomList.length > 0) { + this.pageData.bomList = this.orderBomList.map(item => ({ + itemNo: item.itemNo, + remark: item.remark || '' + })); + } else { + this.pageData.bomList = []; + } + + // 继续执行原有的结单逻辑(对话框在结单成功后关闭) this.finishScheduleBun(); }, @@ -1459,6 +1570,8 @@ if (data.code == 500) { this.$message.error(data.msg); } else { + //关闭备注对话框 + this.remarkDialogVisible = false; //刷新报工的页面 this.$emit('processFinishScheduleOperation'); //关闭当前的页面 @@ -1471,6 +1584,8 @@ if (data.code == 500) { this.$message.error(data.msg); } else { + //关闭备注对话框 + this.remarkDialogVisible = false; //刷新报工的页面 this.$emit('processFinishScheduleOperation'); //关闭当前的页面 @@ -1571,4 +1686,51 @@ text-align: right; } + /* 结单关闭对话框样式 */ + .finish-remark-dialog /deep/ .el-dialog__body { + padding: 15px 20px; + } + + .remark-dialog-content { + display: flex; + flex-direction: column; + gap: 15px; + } + + .remark-section { + width: 100%; + } + + .material-section { + width: 100%; + } + + .section-label { + font-size: 14px; + font-weight: 600; + color: #606266; + margin-bottom: 8px; + } + + .button-section { + text-align: center; + padding-top: 10px; + border-top: 1px solid #ebeef5; + margin-top: 5px; + } + + /* 材料清单表格行高调整 */ + .material-remark-table /deep/ .el-table__row { + height: auto; + } + + .material-remark-table /deep/ .el-table__row td { + padding: 8px 0; + } + + .material-remark-table /deep/ .cell { + line-height: 1.5; + height: auto; + } +