完成wip-退火模块
This commit is contained in:
@@ -20,7 +20,7 @@ CREATE TABLE IF NOT EXISTS wms_furnace_plan (
|
|||||||
actual_start_time DATETIME NULL COMMENT '实际开始时间',
|
actual_start_time DATETIME NULL COMMENT '实际开始时间',
|
||||||
end_time DATETIME NULL COMMENT '结束时间',
|
end_time DATETIME NULL COMMENT '结束时间',
|
||||||
target_furnace_id BIGINT NOT NULL COMMENT '目标炉子ID',
|
target_furnace_id BIGINT NOT NULL COMMENT '目标炉子ID',
|
||||||
status TINYINT DEFAULT 0 COMMENT '计划状态(0草稿 1已下发 2执行中 3已完成 4已取消)',
|
status TINYINT DEFAULT 0 COMMENT '计划状态(0未开始 1进行中 2已完成)',
|
||||||
remark VARCHAR(500) NULL COMMENT '备注',
|
remark VARCHAR(500) NULL COMMENT '备注',
|
||||||
del_flag TINYINT DEFAULT 0 COMMENT '删除标记(0正常 1删除)',
|
del_flag TINYINT DEFAULT 0 COMMENT '删除标记(0正常 1删除)',
|
||||||
create_by VARCHAR(64) NULL,
|
create_by VARCHAR(64) NULL,
|
||||||
|
|||||||
@@ -75,7 +75,7 @@
|
|||||||
<el-table-column label="钢卷数" prop="coilCount" align="center" />
|
<el-table-column label="钢卷数" prop="coilCount" align="center" />
|
||||||
<el-table-column label="操作" align="center" width="160">
|
<el-table-column label="操作" align="center" width="160">
|
||||||
<template slot-scope="scope">
|
<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>
|
<el-button v-if="scope.row.status === 2" size="mini" type="success" @click="openCompleteDialog(scope.row)">完成</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -86,11 +86,9 @@
|
|||||||
<div class="complete-tip">请为每条钢卷分配实际库位,未分配将无法完成。</div>
|
<div class="complete-tip">请为每条钢卷分配实际库位,未分配将无法完成。</div>
|
||||||
<el-table :data="completeCoils" v-loading="completeLoading" height="360px">
|
<el-table :data="completeCoils" v-loading="completeLoading" height="360px">
|
||||||
<el-table-column label="入场钢卷号" prop="enterCoilNo" align="center" />
|
<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">
|
<template slot-scope="scope">
|
||||||
<el-select v-model="scope.row.actualWarehouseId" placeholder="请选择" filterable>
|
<ActualWarehouseSelect v-model="scope.row.actualWarehouseId" :clearInput="false" :showEmpty="false" :width="240" />
|
||||||
<el-option v-for="item in actualWarehouseOptions" :key="item.actualWarehouseId" :label="item.name" :value="item.actualWarehouseId" />
|
|
||||||
</el-select>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -105,10 +103,13 @@
|
|||||||
<script>
|
<script>
|
||||||
import { getAnnealOverview } from "@/api/wms/annealOverview";
|
import { getAnnealOverview } from "@/api/wms/annealOverview";
|
||||||
import { inFurnace, completeAnnealPlan, listAnnealPlanCoils } from "@/api/wms/annealPlan";
|
import { inFurnace, completeAnnealPlan, listAnnealPlanCoils } from "@/api/wms/annealPlan";
|
||||||
import { listActualWarehouse } from "@/api/wms/actualWarehouse";
|
import ActualWarehouseSelect from "@/components/KLPService/ActualWarehouseSelect";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "AnnealOverview",
|
name: "AnnealOverview",
|
||||||
|
components: {
|
||||||
|
ActualWarehouseSelect
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: true,
|
loading: true,
|
||||||
@@ -127,7 +128,6 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
this.fetchOverview();
|
this.fetchOverview();
|
||||||
this.startTimer();
|
this.startTimer();
|
||||||
this.loadActualWarehouses();
|
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
this.stopTimer();
|
this.stopTimer();
|
||||||
@@ -152,11 +152,6 @@ export default {
|
|||||||
this.timer = null;
|
this.timer = null;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
loadActualWarehouses() {
|
|
||||||
listActualWarehouse({ pageNum: 1, pageSize: 999, actualWarehouseType: 2, isEnabled: 1 }).then(response => {
|
|
||||||
this.actualWarehouseOptions = response.rows || [];
|
|
||||||
});
|
|
||||||
},
|
|
||||||
openCompleteDialog(row) {
|
openCompleteDialog(row) {
|
||||||
this.completePlanId = row.planId;
|
this.completePlanId = row.planId;
|
||||||
this.completeOpen = true;
|
this.completeOpen = true;
|
||||||
@@ -197,14 +192,14 @@ export default {
|
|||||||
if (!this.overview.planQueue) {
|
if (!this.overview.planQueue) {
|
||||||
return 0;
|
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) {
|
statusLabel(status) {
|
||||||
const map = { 0: '草稿', 1: '已下发', 2: '执行中', 3: '已完成', 4: '已取消' };
|
const map = { 0: '未开始', 2: '进行中', 3: '已完成' };
|
||||||
return map[status] || '-';
|
return map[status] || '未开始';
|
||||||
},
|
},
|
||||||
statusTag(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';
|
return map[status] || 'info';
|
||||||
},
|
},
|
||||||
formatCountdown(endTime) {
|
formatCountdown(endTime) {
|
||||||
@@ -225,13 +220,14 @@ export default {
|
|||||||
this.$message.warning(`炉子正忙:计划${furnace.currentPlanNo || ''},钢卷${furnace.coilCount || 0}卷`);
|
this.$message.warning(`炉子正忙:计划${furnace.currentPlanNo || ''},钢卷${furnace.coilCount || 0}卷`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.$confirm('确定入炉该计划吗?', '提示', {
|
this.$confirm('点击入炉后钢卷将会被释放库位,是否确认入炉', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
return inFurnace({ planId: row.planId });
|
return inFurnace({ planId: row.planId });
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
row.status = 2;
|
||||||
this.$message.success('入炉成功');
|
this.$message.success('入炉成功');
|
||||||
this.fetchOverview();
|
this.fetchOverview();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
<el-button size="mini" type="text" icon="el-icon-edit" @click.stop="handleUpdate(scope.row)">修改</el-button>
|
<el-button size="mini" type="text" icon="el-icon-edit" @click.stop="handleUpdate(scope.row)">修改</el-button>
|
||||||
<el-button size="mini" type="text" icon="el-icon-delete" @click.stop="handleDelete(scope.row)">删除</el-button>
|
<el-button size="mini" type="text" icon="el-icon-delete" @click.stop="handleDelete(scope.row)">删除</el-button>
|
||||||
<el-button size="mini" type="text" icon="el-icon-s-operation" @click.stop="openStatusDialog(scope.row)">状态</el-button>
|
<el-button size="mini" type="text" icon="el-icon-s-operation" @click.stop="openStatusDialog(scope.row)">状态</el-button>
|
||||||
<el-button v-if="scope.row.status === 0" size="mini" type="text" icon="el-icon-s-flag" @click.stop="handleInFurnace(scope.row)">入炉</el-button>
|
<el-button v-if="scope.row.status === 0" size="mini" type="text" icon="el-icon-s-flag" :disabled="!scope.row.coilCount" @click.stop="handleInFurnace(scope.row)">入炉</el-button>
|
||||||
<el-button v-if="scope.row.status === 2" size="mini" type="text" icon="el-icon-check" @click.stop="handleComplete(scope.row)">完成</el-button>
|
<el-button v-if="scope.row.status === 2" size="mini" type="text" icon="el-icon-check" @click.stop="handleComplete(scope.row)">完成</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -101,7 +101,7 @@
|
|||||||
<div class="material-title">{{ item.currentCoilNo || '-' }}</div>
|
<div class="material-title">{{ item.currentCoilNo || '-' }}</div>
|
||||||
<div class="material-sub">入场:{{ item.enterCoilNo || '-' }}</div>
|
<div class="material-sub">入场:{{ item.enterCoilNo || '-' }}</div>
|
||||||
</div>
|
</div>
|
||||||
<el-button type="primary" size="mini" @click="handleAddToPlan(item)" :disabled="!currentPlan.planId || currentPlan.status === 2">加入计划</el-button>
|
<el-button type="primary" size="mini" @click="handleAddToPlan(item)" :disabled="!currentPlan.planId || currentPlan.status !== 0">加入计划</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="material-body">
|
<div class="material-body">
|
||||||
<div class="material-row">厂家:{{ item.supplierCoilNo || '-' }}</div>
|
<div class="material-row">厂家:{{ item.supplierCoilNo || '-' }}</div>
|
||||||
@@ -120,6 +120,7 @@
|
|||||||
<span>退火计划</span>
|
<span>退火计划</span>
|
||||||
<div>
|
<div>
|
||||||
<el-button size="mini" icon="el-icon-refresh" @click="loadPlanCoils" :disabled="!currentPlan.planId">刷新</el-button>
|
<el-button size="mini" icon="el-icon-refresh" @click="loadPlanCoils" :disabled="!currentPlan.planId">刷新</el-button>
|
||||||
|
<el-button size="mini" type="primary" icon="el-icon-s-flag" :disabled="!currentPlan.planId || currentPlan.status !== 0 || !currentPlan.coilCount" @click="handleInFurnace(currentPlan)">入炉</el-button>
|
||||||
<el-button size="mini" type="success" icon="el-icon-check" :disabled="!currentPlan.planId || currentPlan.status !== 2" @click="openCompleteDialog">完成退火</el-button>
|
<el-button size="mini" type="success" icon="el-icon-check" :disabled="!currentPlan.planId || currentPlan.status !== 2" @click="openCompleteDialog">完成退火</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -131,6 +132,9 @@
|
|||||||
<div>计划号:{{ currentPlan.planNo }}</div>
|
<div>计划号:{{ currentPlan.planNo }}</div>
|
||||||
<div>目标炉:{{ currentPlan.targetFurnaceName || '-' }}</div>
|
<div>目标炉:{{ currentPlan.targetFurnaceName || '-' }}</div>
|
||||||
<div>状态:{{ statusLabel(currentPlan.status) }}</div>
|
<div>状态:{{ statusLabel(currentPlan.status) }}</div>
|
||||||
|
<div>
|
||||||
|
<el-button size="mini" type="primary" icon="el-icon-s-flag" :disabled="currentPlan.status !== 0" @click="handleInFurnace(currentPlan)">入炉</el-button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-table :data="coilList" v-loading="coilLoading" class="light-table">
|
<el-table :data="coilList" v-loading="coilLoading" class="light-table">
|
||||||
<el-table-column label="入场钢卷号" align="center" prop="enterCoilNo" />
|
<el-table-column label="入场钢卷号" align="center" prop="enterCoilNo" />
|
||||||
@@ -139,16 +143,16 @@
|
|||||||
{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}') }}
|
{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}') }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="实际库位" align="center" width="180">
|
<el-table-column label="实际库位" align="center" width="220">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-select v-model="scope.row.actualWarehouseId" placeholder="选择库位" clearable size="mini" filterable>
|
<span>{{ scope.row.actualWarehouseName || '-' }}</span>
|
||||||
<el-option v-for="item in actualWarehouseOptions" :key="item.actualWarehouseId" :label="item.actualWarehouseName" :value="item.actualWarehouseId" />
|
|
||||||
</el-select>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="100">
|
<el-table-column label="操作" align="center" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleUnbind(scope.row)" :disabled="currentPlan.status === 2">解绑</el-button>
|
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleUnbind(scope.row)">
|
||||||
|
{{ unbindLabel(currentPlan.status) }}
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -157,6 +161,22 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
<el-dialog title="完成退火" :visible.sync="completeOpen" width="720px" append-to-body>
|
||||||
|
<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">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<ActualWarehouseSelect v-model="scope.row.actualWarehouseId" :clear-input="false" :show-empty="false" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitComplete">确 定</el-button>
|
||||||
|
<el-button @click="completeOpen = false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog :title="title" :visible.sync="open" width="520px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="520px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
||||||
<el-form-item label="计划号" prop="planNo">
|
<el-form-item label="计划号" prop="planNo">
|
||||||
@@ -172,11 +192,9 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="状态" prop="status">
|
<el-form-item label="状态" prop="status">
|
||||||
<el-select v-model="form.status" placeholder="请选择">
|
<el-select v-model="form.status" placeholder="请选择">
|
||||||
<el-option label="草稿" :value="0" />
|
<el-option label="未开始" :value="0" />
|
||||||
<el-option label="已下发" :value="1" />
|
<el-option label="进行中" :value="2" />
|
||||||
<el-option label="执行中" :value="2" />
|
|
||||||
<el-option label="已完成" :value="3" />
|
<el-option label="已完成" :value="3" />
|
||||||
<el-option label="已取消" :value="4" />
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
@@ -211,10 +229,13 @@
|
|||||||
import { listAnnealPlan, getAnnealPlan, addAnnealPlan, updateAnnealPlan, delAnnealPlan, changeAnnealPlanStatus, inFurnace, completeAnnealPlan, listAnnealPlanCoils, bindAnnealPlanCoils, unbindAnnealPlanCoil } from "@/api/wms/annealPlan";
|
import { listAnnealPlan, getAnnealPlan, addAnnealPlan, updateAnnealPlan, delAnnealPlan, changeAnnealPlanStatus, inFurnace, completeAnnealPlan, listAnnealPlanCoils, bindAnnealPlanCoils, unbindAnnealPlanCoil } from "@/api/wms/annealPlan";
|
||||||
import { listAnnealFurnace } from "@/api/wms/annealFurnace";
|
import { listAnnealFurnace } from "@/api/wms/annealFurnace";
|
||||||
import { listMaterialCoil } from "@/api/wms/coil";
|
import { listMaterialCoil } from "@/api/wms/coil";
|
||||||
import { listActualWarehouse } from "@/api/wms/actualWarehouse";
|
import ActualWarehouseSelect from "@/components/KLPService/ActualWarehouseSelect";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "AnnealPlan",
|
name: "AnnealPlan",
|
||||||
|
components: {
|
||||||
|
ActualWarehouseSelect
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
buttonLoading: false,
|
buttonLoading: false,
|
||||||
@@ -249,17 +270,20 @@ export default {
|
|||||||
materialList: [],
|
materialList: [],
|
||||||
materialQueryParams: {
|
materialQueryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 20,
|
||||||
enterCoilNo: undefined,
|
enterCoilNo: undefined,
|
||||||
currentCoilNo: undefined,
|
currentCoilNo: undefined,
|
||||||
status: 0,
|
status: 0,
|
||||||
dataType: 1,
|
dataType: 1,
|
||||||
},
|
},
|
||||||
actualWarehouseOptions: [],
|
|
||||||
statusForm: {
|
statusForm: {
|
||||||
planId: undefined,
|
planId: undefined,
|
||||||
status: undefined,
|
status: undefined,
|
||||||
},
|
},
|
||||||
|
completeOpen: false,
|
||||||
|
completeLoading: false,
|
||||||
|
completePlanId: null,
|
||||||
|
completeCoils: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -303,11 +327,6 @@ export default {
|
|||||||
this.resetMaterialForm();
|
this.resetMaterialForm();
|
||||||
this.handleMaterialQuery();
|
this.handleMaterialQuery();
|
||||||
},
|
},
|
||||||
loadActualWarehouses() {
|
|
||||||
listActualWarehouse({ pageNum: 1, pageSize: 999, actualWarehouseType: 2, isEnabled: 1 }).then(response => {
|
|
||||||
this.actualWarehouseOptions = response.rows || [];
|
|
||||||
});
|
|
||||||
},
|
|
||||||
openCompleteDialog() {
|
openCompleteDialog() {
|
||||||
if (!this.currentPlan.planId) {
|
if (!this.currentPlan.planId) {
|
||||||
this.$message.warning('请先选择计划');
|
this.$message.warning('请先选择计划');
|
||||||
@@ -317,12 +336,18 @@ export default {
|
|||||||
this.$message.warning('计划未进行中,无法完成');
|
this.$message.warning('计划未进行中,无法完成');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.$confirm('完成计划前请为每条钢卷选择实际库位,确认继续?', '提示', {
|
this.completePlanId = this.currentPlan.planId;
|
||||||
confirmButtonText: '确定',
|
this.completeOpen = true;
|
||||||
cancelButtonText: '取消',
|
this.completeLoading = true;
|
||||||
type: 'warning'
|
listAnnealPlanCoils(this.currentPlan.planId).then(response => {
|
||||||
}).then(() => {
|
this.completeCoils = (response.data || []).map(item => ({
|
||||||
this.handleComplete(this.currentPlan);
|
coilId: item.coilId,
|
||||||
|
enterCoilNo: item.enterCoilNo,
|
||||||
|
actualWarehouseId: item.actualWarehouseId || null
|
||||||
|
}));
|
||||||
|
this.completeLoading = false;
|
||||||
|
}).catch(() => {
|
||||||
|
this.completeLoading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleAddToPlan(item) {
|
handleAddToPlan(item) {
|
||||||
@@ -462,7 +487,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
async handleInFurnace(row) {
|
async handleInFurnace(row) {
|
||||||
await this.$confirm('确定执行入炉操作吗?', '提示', {
|
await this.$confirm('点击入炉后钢卷将会被释放库位,是否确认入炉', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
@@ -470,14 +495,18 @@ export default {
|
|||||||
this.loading = true;
|
this.loading = true;
|
||||||
await inFurnace({ planId: row.planId });
|
await inFurnace({ planId: row.planId });
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.getList();
|
row.status = 2;
|
||||||
|
row.actualStartTime = new Date();
|
||||||
if (this.currentPlan.planId === row.planId) {
|
if (this.currentPlan.planId === row.planId) {
|
||||||
|
this.currentPlan.status = 2;
|
||||||
|
this.currentPlan.actualStartTime = row.actualStartTime;
|
||||||
this.loadPlanCoils();
|
this.loadPlanCoils();
|
||||||
}
|
}
|
||||||
|
this.getList();
|
||||||
this.$message.success('已入炉');
|
this.$message.success('已入炉');
|
||||||
},
|
},
|
||||||
async handleComplete(row) {
|
submitComplete() {
|
||||||
const locations = (this.coilList || []).map(item => ({
|
const locations = (this.completeCoils || []).map(item => ({
|
||||||
coilId: item.coilId,
|
coilId: item.coilId,
|
||||||
actualWarehouseId: item.actualWarehouseId
|
actualWarehouseId: item.actualWarehouseId
|
||||||
}));
|
}));
|
||||||
@@ -486,15 +515,18 @@ export default {
|
|||||||
this.$message.warning('请先为所有钢卷分配实际库位');
|
this.$message.warning('请先为所有钢卷分配实际库位');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.loading = true;
|
this.completeLoading = true;
|
||||||
await completeAnnealPlan({
|
completeAnnealPlan({
|
||||||
planId: row.planId,
|
planId: this.completePlanId,
|
||||||
locations: locations
|
locations: locations
|
||||||
|
}).then(() => {
|
||||||
|
this.$message.success('已完成');
|
||||||
|
this.completeOpen = false;
|
||||||
|
this.getList();
|
||||||
|
this.loadPlanCoils();
|
||||||
|
}).finally(() => {
|
||||||
|
this.completeLoading = false;
|
||||||
});
|
});
|
||||||
this.loading = false;
|
|
||||||
this.getList();
|
|
||||||
this.loadPlanCoils();
|
|
||||||
this.$message.success('已完成');
|
|
||||||
},
|
},
|
||||||
handleUnbind(row) {
|
handleUnbind(row) {
|
||||||
this.$confirm('确定解绑该钢卷吗?', '提示', {
|
this.$confirm('确定解绑该钢卷吗?', '提示', {
|
||||||
@@ -528,6 +560,15 @@ export default {
|
|||||||
return 'info';
|
return 'info';
|
||||||
}
|
}
|
||||||
return 'warning';
|
return 'warning';
|
||||||
|
},
|
||||||
|
unbindLabel(status) {
|
||||||
|
if (status === 2) {
|
||||||
|
return '取消';
|
||||||
|
}
|
||||||
|
if (status === 3) {
|
||||||
|
return '撤回';
|
||||||
|
}
|
||||||
|
return '解绑';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -551,10 +592,25 @@ export default {
|
|||||||
}
|
}
|
||||||
.material-grid {
|
.material-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
|
grid-template-columns: repeat(4, minmax(220px, 1fr));
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
min-height: 120px;
|
min-height: 120px;
|
||||||
}
|
}
|
||||||
|
@media (max-width: 1400px) {
|
||||||
|
.material-grid {
|
||||||
|
grid-template-columns: repeat(3, minmax(220px, 1fr));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (max-width: 1100px) {
|
||||||
|
.material-grid {
|
||||||
|
grid-template-columns: repeat(2, minmax(220px, 1fr));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.material-grid {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
|
}
|
||||||
.material-card {
|
.material-card {
|
||||||
border: 1px solid #e9ecf2;
|
border: 1px solid #e9ecf2;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
|
|||||||
@@ -28,6 +28,12 @@ public class WmsFurnacePlanCoilVo {
|
|||||||
@ExcelProperty(value = "入场钢卷号")
|
@ExcelProperty(value = "入场钢卷号")
|
||||||
private String enterCoilNo;
|
private String enterCoilNo;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "实际库位ID")
|
||||||
|
private Long actualWarehouseId;
|
||||||
|
|
||||||
|
@ExcelProperty(value = "实际库位")
|
||||||
|
private String actualWarehouseName;
|
||||||
|
|
||||||
@ExcelProperty(value = "创建时间")
|
@ExcelProperty(value = "创建时间")
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -192,9 +192,27 @@ public class WmsFurnacePlanServiceImpl implements IWmsFurnacePlanService {
|
|||||||
if (coilIds.isEmpty()) {
|
if (coilIds.isEmpty()) {
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
java.util.Map<Long, String> enterNoMap = materialCoilMapper.selectBatchIds(coilIds).stream()
|
List<WmsMaterialCoil> materialCoils = materialCoilMapper.selectBatchIds(coilIds);
|
||||||
.collect(Collectors.toMap(WmsMaterialCoil::getCoilId, WmsMaterialCoil::getEnterCoilNo, (a, b) -> a));
|
java.util.Map<Long, WmsMaterialCoil> coilMap = materialCoils.stream()
|
||||||
list.forEach(item -> item.setEnterCoilNo(enterNoMap.get(item.getCoilId())));
|
.collect(Collectors.toMap(WmsMaterialCoil::getCoilId, item -> item, (a, b) -> a));
|
||||||
|
List<Long> actualWarehouseIds = materialCoils.stream()
|
||||||
|
.map(WmsMaterialCoil::getActualWarehouseId)
|
||||||
|
.filter(id -> id != null)
|
||||||
|
.distinct()
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
java.util.Map<Long, String> warehouseMap = actualWarehouseIds.isEmpty()
|
||||||
|
? java.util.Collections.emptyMap()
|
||||||
|
: actualWarehouseMapper.selectBatchIds(actualWarehouseIds).stream()
|
||||||
|
.collect(Collectors.toMap(WmsActualWarehouse::getActualWarehouseId,
|
||||||
|
WmsActualWarehouse::getActualWarehouseName, (a, b) -> a));
|
||||||
|
list.forEach(item -> {
|
||||||
|
WmsMaterialCoil coil = coilMap.get(item.getCoilId());
|
||||||
|
if (coil != null) {
|
||||||
|
item.setEnterCoilNo(coil.getEnterCoilNo());
|
||||||
|
item.setActualWarehouseId(coil.getActualWarehouseId());
|
||||||
|
item.setActualWarehouseName(warehouseMap.get(coil.getActualWarehouseId()));
|
||||||
|
}
|
||||||
|
});
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -321,10 +339,9 @@ public class WmsFurnacePlanServiceImpl implements IWmsFurnacePlanService {
|
|||||||
warehouse.setIsEnabled(1);
|
warehouse.setIsEnabled(1);
|
||||||
actualWarehouseMapper.updateById(warehouse);
|
actualWarehouseMapper.updateById(warehouse);
|
||||||
}
|
}
|
||||||
WmsMaterialCoil updateCoil = new WmsMaterialCoil();
|
materialCoilMapper.update(null, Wrappers.<WmsMaterialCoil>lambdaUpdate()
|
||||||
updateCoil.setCoilId(coilId);
|
.eq(WmsMaterialCoil::getCoilId, coilId)
|
||||||
updateCoil.setActualWarehouseId(null);
|
.set(WmsMaterialCoil::getActualWarehouseId, null));
|
||||||
materialCoilMapper.updateById(updateCoil);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void occupyActualWarehouse(Long coilId, Long actualWarehouseId) {
|
private void occupyActualWarehouse(Long coilId, Long actualWarehouseId) {
|
||||||
|
|||||||
Reference in New Issue
Block a user