Browse Source

2025-12-15

过站采集-》车间工作平台->结单增加材料清单
master
fengyuan_yang 9 months ago
parent
commit
5d8100bf2a
  1. 3
      src/api/yieldReport/com_finish_schedule.js
  2. 190
      src/views/modules/yieldReport/com_finish_schedule.vue

3
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)

190
src/views/modules/yieldReport/com_finish_schedule.vue

@ -262,21 +262,102 @@
</el-dialog>
<!-- 备注对话框 -->
<el-dialog title="填写备注" :visible.sync="remarkDialogVisible" width="500px" :close-on-click-modal="false">
<el-form :model="remarkForm" label-position="top">
<el-form-item label="备注信息:">
<el-dialog title="结单关闭" :visible.sync="remarkDialogVisible" width="950px" :close-on-click-modal="false" class="finish-remark-dialog">
<div class="remark-dialog-content">
<!-- 备注信息区域 -->
<div class="remark-section">
<div class="section-label">备注信息:</div>
<el-input
type="textarea"
v-model="remarkForm.remark"
:rows="5"
placeholder="请填写结单备注信息">
:rows="3"
placeholder="请填写结单备注信息"
style="width: 100%;">
</el-input>
</el-form-item>
</el-form>
<el-footer style="height:35px;margin-top: 90px;text-align:center">
<el-button type="primary" @click="confirmRemark">确 定</el-button>
<el-button @click="remarkDialogVisible = false">取 消</el-button>
</el-footer>
</div>
<!-- 材料清单区域 -->
<div class="material-section">
<div class="section-label">材料清单:</div>
<el-table
:data="orderBomList"
border
max-height="280"
style="width: 100%;"
class="material-remark-table">
<el-table-column
prop="componentPartNo"
header-align="center"
align="left"
width="120"
label="材料编码">
</el-table-column>
<el-table-column
prop="partDesc"
header-align="center"
align="left"
min-width="150"
label="材料名称"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="partSpec"
header-align="center"
align="center"
width="100"
label="规格型号"
show-overflow-tooltip>
</el-table-column>
<el-table-column
prop="qtyRequired"
header-align="center"
align="right"
width="80"
label="需求数量">
</el-table-column>
<el-table-column
prop="qtyIssue"
header-align="center"
align="right"
width="80"
label="发料数量">
</el-table-column>
<el-table-column
prop="qtyReturn"
header-align="center"
align="right"
width="80"
label="退料数量">
</el-table-column>
<el-table-column
prop="theoryQtyReturn"
header-align="center"
align="right"
width="100"
label="理论应退数量">
</el-table-column>
<el-table-column
header-align="center"
align="left"
min-width="160"
label="备注信息">
<template slot-scope="scope">
<el-input
v-model="scope.row.remark"
placeholder="输入备注"
style="height: 11px; width: 98%;">
</el-input>
</template>
</el-table-column>
</el-table>
</div>
<!-- 按钮区域 -->
<div class="button-section">
<el-button type="primary" @click="confirmRemark">确 定</el-button>
<el-button @click="remarkDialogVisible = false">取 消</el-button>
</div>
</div>
</el-dialog>
<!-- 异常原因录入的组件 -->
@ -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;
}
</style>
Loading…
Cancel
Save