完成wip-退火模块

This commit is contained in:
2026-03-15 15:10:17 +08:00
parent 9a645100df
commit 5487f04cf5
5 changed files with 137 additions and 62 deletions

View File

@@ -75,7 +75,7 @@
<el-table-column label="钢卷数" prop="coilCount" align="center" />
<el-table-column label="操作" align="center" width="160">
<template slot-scope="scope">
<el-button v-if="scope.row.status === 0" size="mini" type="primary" @click="handleInFurnace(scope.row)">入炉</el-button>
<el-button v-if="scope.row.status === 0" size="mini" type="primary" :disabled="!scope.row.coilCount" @click="handleInFurnace(scope.row)">入炉</el-button>
<el-button v-if="scope.row.status === 2" size="mini" type="success" @click="openCompleteDialog(scope.row)">完成</el-button>
</template>
</el-table-column>
@@ -86,11 +86,9 @@
<div class="complete-tip">请为每条钢卷分配实际库位未分配将无法完成</div>
<el-table :data="completeCoils" v-loading="completeLoading" height="360px">
<el-table-column label="入场钢卷号" prop="enterCoilNo" align="center" />
<el-table-column label="实际库位" align="center" width="240">
<el-table-column label="实际库位" align="center" width="260">
<template slot-scope="scope">
<el-select v-model="scope.row.actualWarehouseId" placeholder="请选择" filterable>
<el-option v-for="item in actualWarehouseOptions" :key="item.actualWarehouseId" :label="item.name" :value="item.actualWarehouseId" />
</el-select>
<ActualWarehouseSelect v-model="scope.row.actualWarehouseId" :clearInput="false" :showEmpty="false" :width="240" />
</template>
</el-table-column>
</el-table>
@@ -105,10 +103,13 @@
<script>
import { getAnnealOverview } from "@/api/wms/annealOverview";
import { inFurnace, completeAnnealPlan, listAnnealPlanCoils } from "@/api/wms/annealPlan";
import { listActualWarehouse } from "@/api/wms/actualWarehouse";
import ActualWarehouseSelect from "@/components/KLPService/ActualWarehouseSelect";
export default {
name: "AnnealOverview",
components: {
ActualWarehouseSelect
},
data() {
return {
loading: true,
@@ -127,7 +128,6 @@ export default {
created() {
this.fetchOverview();
this.startTimer();
this.loadActualWarehouses();
},
beforeDestroy() {
this.stopTimer();
@@ -152,11 +152,6 @@ export default {
this.timer = null;
}
},
loadActualWarehouses() {
listActualWarehouse({ pageNum: 1, pageSize: 999, actualWarehouseType: 2, isEnabled: 1 }).then(response => {
this.actualWarehouseOptions = response.rows || [];
});
},
openCompleteDialog(row) {
this.completePlanId = row.planId;
this.completeOpen = true;
@@ -197,14 +192,14 @@ export default {
if (!this.overview.planQueue) {
return 0;
}
return this.overview.planQueue.filter(item => item.targetFurnaceId === furnaceId && item.status !== 2).length;
return this.overview.planQueue.filter(item => item.targetFurnaceId === furnaceId && item.status === 0).length;
},
statusLabel(status) {
const map = { 0: '草稿', 1: '已下发', 2: '行中', 3: '已完成', 4: '已取消' };
return map[status] || '-';
const map = { 0: '未开始', 2: '行中', 3: '已完成' };
return map[status] || '未开始';
},
statusTag(status) {
const map = { 0: 'info', 1: 'warning', 2: 'success', 3: 'success', 4: 'danger' };
const map = { 0: 'info', 2: 'success', 3: 'success' };
return map[status] || 'info';
},
formatCountdown(endTime) {
@@ -225,13 +220,14 @@ export default {
this.$message.warning(`炉子正忙:计划${furnace.currentPlanNo || ''},钢卷${furnace.coilCount || 0}`);
return;
}
this.$confirm('确定入炉该计划吗?', '提示', {
this.$confirm('点击入炉后钢卷将会被释放库位,是否确认入炉', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
return inFurnace({ planId: row.planId });
}).then(() => {
row.status = 2;
this.$message.success('入炉成功');
this.fetchOverview();
});