工艺管理

修复“重置导致选中丢失”
修复“新增保存后不会停留在新方案”
修复“搜索后左右不同步”
生产计划
定位生产计划页 plan.vue 的查询参数、日期范围、完成按钮与方案下拉逻辑
修复日期范围筛选:前端按后端约定写入 queryParams.params.beginTime/endTime
修复“不显示生产完成”筛选:前后端新增 excludeDone 过滤并落到 SQL 条件
修复完成计划幂等:后端避免重复插入实绩;前端对已完成禁用按钮
生产绩效
修复“明细信息显示旧数据”
修复“点击表格行只看明细但不能直接修改/删除
修复“时间字段时分秒丢失”
 修复“补录/修改表单无校验”
This commit is contained in:
朱昊天
2026-06-16 13:56:58 +08:00
parent 21a1d339d5
commit 8ea6894552
11 changed files with 459 additions and 382 deletions

View File

@@ -96,7 +96,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="actualList" @selection-change="handleSelectionChange" @row-click="handleRowClick" highlight-current-row>
<el-table ref="actualTable" v-loading="loading" :data="actualList" row-key="actualId" @selection-change="handleSelectionChange" @row-click="handleRowClick" highlight-current-row>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="成品卷号" align="center" prop="exitMatId" />
<el-table-column label="来料卷号" align="center" prop="entryMatId" />
@@ -108,9 +108,9 @@
<el-table-column label="成品厚度" align="center" prop="exitThickness" />
<el-table-column label="成品宽度" align="center" prop="exitWidth" />
<el-table-column label="实际重量" align="center" prop="actualWeight" />
<el-table-column label="上线时间" align="center" prop="onlineTime" width="120">
<el-table-column label="上线时间" align="center" prop="onlineTime" width="170">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.onlineTime, '{y}-{m}-{d}') }}</span>
<span>{{ parseTime(scope.row.onlineTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="状态" align="center" prop="status" /> -->
@@ -476,6 +476,9 @@ export default {
},
form: {},
rules: {
exitMatId: [{ required: true, message: '请输入成品卷号', trigger: 'blur' }],
entryMatId: [{ required: true, message: '请输入来料卷号', trigger: 'blur' }],
planNo: [{ required: true, message: '请输入计划号', trigger: 'blur' }],
}
};
},
@@ -486,9 +489,17 @@ export default {
getList() {
this.loading = true;
listActual(this.queryParams).then(response => {
this.actualList = response.rows;
this.actualList = response.rows || [];
this.total = response.total;
this.loading = false;
this.ids = [];
this.single = true;
this.multiple = true;
if (this.$refs.actualTable) this.$refs.actualTable.clearSelection();
if (this.currentRow && this.currentRow.actualId != null) {
const updated = this.actualList.find(r => r.actualId === this.currentRow.actualId);
this.currentRow = updated || null;
}
});
},
cancel() {
@@ -549,6 +560,11 @@ export default {
},
resetQuery() {
this.resetForm("queryForm");
this.currentRow = null;
this.ids = [];
this.single = true;
this.multiple = true;
if (this.$refs.actualTable) this.$refs.actualTable.clearSelection();
this.handleQuery();
},
handleSelectionChange(selection) {
@@ -558,6 +574,10 @@ export default {
},
handleRowClick(row) {
this.currentRow = row;
if (this.$refs.actualTable) {
this.$refs.actualTable.clearSelection();
this.$refs.actualTable.toggleRowSelection(row, true);
}
},
handleAdd() {
this.reset();
@@ -600,6 +620,8 @@ export default {
this.$modal.confirm('是否确认删除轧线生产实绩编号为"' + actualIds + '"的数据项?').then(function() {
return delActual(actualIds);
}).then(() => {
const deleted = String(actualIds).split(',').map(v => Number(v));
if (this.currentRow && deleted.includes(Number(this.currentRow.actualId))) this.currentRow = null;
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});