🎈 perf: 排产计划页面简化

This commit is contained in:
砂糖
2025-08-15 17:41:56 +08:00
parent 7392df515e
commit 8254c24488
6 changed files with 57 additions and 51 deletions

View File

@@ -12,7 +12,7 @@
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleInitBatch">生成批次</el-button>
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleInitBatch">生成生产任务</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
@@ -33,14 +33,14 @@
<el-table v-loading="loading" :data="batchList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="批次ID" align="center" prop="batchId" v-if="true" />
<el-table-column label="批次编号" align="center" prop="batchNo" />
<el-table-column label="生产任务ID" align="center" prop="batchId" v-if="true" />
<el-table-column label="生产任务编号" align="center" prop="batchNo" />
<el-table-column label="关联工艺ID" align="center" prop="processId">
<template slot-scope="scope">
<CraftInfo :craftId="scope.row.processId" />
</template>
</el-table-column>
<el-table-column label="批次总数量" align="center" prop="totalQuantity" />
<el-table-column label="生产任务总数量" align="center" prop="totalQuantity" />
<el-table-column label="合并来源" align="center" prop="mergeSource">
<template slot-scope="scope">
<div v-for="item in scope.row.mergeSource.split(',')" style="display: flex; align-items: center; justify-content: center; gap: 10px;" :key="item">
@@ -59,7 +59,7 @@
<span>{{ parseTime(scope.row.estimatedEndTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="批次状态" align="center" prop="batchStatus">
<el-table-column label="状态" align="center" prop="batchStatus">
<template slot-scope="scope">
<dict-tag :options="dict.type.batch_status" :value="scope.row.batchStatus" />
</template>
@@ -76,8 +76,8 @@
<!-- 添加或修改批次合并相同工艺的任务对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="批次编号" prop="batchNo">
<el-input v-model="form.batchNo" placeholder="请输入批次编号" />
<el-form-item label="生产任务编号" prop="batchNo">
<el-input v-model="form.batchNo" placeholder="请输入生产任务编号" />
</el-form-item>
<!-- <el-form-item label="关联工艺ID" prop="processId">
<el-input v-model="form.processId" placeholder="请输入关联工艺ID" />
@@ -114,9 +114,9 @@
</div>
</el-dialog>
<el-dialog title="批次生成" width="800px" :visible.sync="batchGenerateDialogVisible">
<el-dialog title="生成生产任务" width="800px" :visible.sync="batchGenerateDialogVisible">
<el-table :data="generateBatchList" style="width: 100%;" border>
<el-table-column label="批次编号" align="center" prop="batchNo">
<el-table-column label="生产任务编号" align="center" prop="batchNo">
<template slot-scope="scope">
<el-input v-model="scope.row.batchNo" />
</template>
@@ -131,7 +131,7 @@
</div>
</template>
</el-table-column>
<el-table-column label="批次总数量" align="center" prop="totalQuantity" />
<el-table-column label="生产任务总数量" align="center" prop="totalQuantity" />
<el-table-column label="预计开始时间" align="center" prop="estimatedStartTime">
<template slot-scope="scope">
<el-date-picker v-model="scope.row.estimatedStartTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
@@ -146,7 +146,7 @@
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="handleAddBatch(scope.row)">生成批次</el-button>
<el-button type="primary" size="mini" @click="handleAddBatch(scope.row)">创建生产任务</el-button>
</template>
</el-table-column>
</el-table>
@@ -343,7 +343,7 @@ export default {
handleAdd() {
this.reset();
this.open = true;
this.title = "添加批次(合并相同工艺的任务)";
this.title = "添加生产任务(合并相同工艺的任务)";
},
/** 修改按钮操作 */
handleUpdate(row) {
@@ -354,7 +354,7 @@ export default {
this.loading = false;
this.form = response.data;
this.open = true;
this.title = "修改批次(合并相同工艺的任务)";
this.title = "修改生产任务(合并相同工艺的任务)";
});
},
/** 提交按钮 */
@@ -393,7 +393,7 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const batchIds = row.batchId || this.ids;
this.$modal.confirm('是否确认删除批次(合并相同工艺的任务)编号为"' + batchIds + '"的数据项?').then(() => {
this.$modal.confirm('是否确认删除生产任务(合并相同工艺的任务)编号为"' + batchIds + '"的数据项?').then(() => {
this.loading = true;
return delBatch(batchIds);
}).then(() => {