feat(wms): 更新历史钢卷操作页面表格字段和显示逻辑
- 添加物品名称、材质、规格、生产厂家、锌层等物料信息列 - 新增创建人和完成时间列,完善操作记录信息 - 替换字典标签为映射值显示,优化操作类型和状态展示 - 集成操作状态标签颜色映射,提升视觉效果 - 移除字典依赖改为本地映射数据,提高性能 - 调整各列宽度以适应内容,优化表格布局 - 添加操作状态标签类型映射方法
This commit is contained in:
@@ -2,25 +2,36 @@
|
||||
<div class="app-container">
|
||||
<el-alert title="以下操作关联的钢卷已是历史钢卷,可手动标记完成" type="warning" show-icon :closable="false" class="mb8" />
|
||||
<KLPTable v-loading="loading" :data="list">
|
||||
<el-table-column label="当前钢卷号" align="center" prop="currentCoilNo"/>
|
||||
<el-table-column label="入场钢卷号" align="center" prop="enterCoilNo" width="180" />
|
||||
<el-table-column label="操作类型" align="center" prop="actionType" width="100">
|
||||
<el-table-column label="当前钢卷号" align="center" prop="currentCoilNo" width="150" />
|
||||
<el-table-column label="入场钢卷号" align="center" prop="enterCoilNo" width="150" />
|
||||
<el-table-column label="物品名称" align="center" prop="itemName" width="120" />
|
||||
<el-table-column label="材质" align="center" prop="material" width="100" />
|
||||
<el-table-column label="规格" align="center" prop="specification" width="110" />
|
||||
<el-table-column label="生产厂家" align="center" prop="manufacturer" width="100" />
|
||||
<el-table-column label="锌层" align="center" prop="zincLayer" width="100" />
|
||||
<el-table-column label="操作类型" align="center" prop="actionType" width="120">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.wms_coil_action_type" :value="scope.row.actionType" />
|
||||
<span>{{ actionTypeMap[scope.row.actionType] || scope.row.actionType }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作状态" align="center" prop="actionStatus" width="100">
|
||||
<el-table-column label="操作状态" align="center" prop="actionStatus" width="90">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.wms_action_status" :value="scope.row.actionStatus" />
|
||||
<el-tag :type="actionStatusTag(scope.row.actionStatus)">{{ actionStatusMap[scope.row.actionStatus] || scope.row.actionStatus }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="逻辑库区" align="center" prop="warehouseName" width="150" />
|
||||
<el-table-column label="实际库区" align="center" prop="actualWarehouseName" width="150" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="160">
|
||||
<el-table-column label="逻辑库区" align="center" prop="warehouseName" width="130" />
|
||||
<el-table-column label="实际库区" align="center" prop="actualWarehouseName" width="130" />
|
||||
<el-table-column label="创建人" align="center" prop="createByName" width="100" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="150">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="完成时间" align="center" prop="completeTime" width="150">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.completeTime, '{y}-{m}-{d} {h}:{i}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="160" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="primary" icon="el-icon-check"
|
||||
@@ -40,7 +51,6 @@ import { listStalePendingAction, completeAction, cancelAction } from "@/api/wms/
|
||||
|
||||
export default {
|
||||
name: "StaleAction",
|
||||
dicts: ['wms_coil_action_type', 'wms_action_status'],
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
@@ -50,6 +60,25 @@ export default {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
},
|
||||
actionTypeMap: {
|
||||
11: '酸连轧工序',
|
||||
120: '分条',
|
||||
201: '酸轧合卷',
|
||||
202: '镀锌合卷',
|
||||
203: '脱脂合卷',
|
||||
204: '拉矫平整合卷',
|
||||
205: '双机架合卷',
|
||||
206: '镀铬合卷',
|
||||
502: '脱脂工序',
|
||||
504: '双机架工序',
|
||||
506: '纵剪分条工序',
|
||||
},
|
||||
actionStatusMap: {
|
||||
0: '待处理',
|
||||
1: '处理中',
|
||||
2: '已完成',
|
||||
3: '已取消',
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -64,6 +93,10 @@ export default {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
actionStatusTag(status) {
|
||||
const map = { 0: 'warning', 1: 'primary', 2: 'success', 3: 'info' };
|
||||
return map[status] || '';
|
||||
},
|
||||
handleComplete(row) {
|
||||
this.$modal.confirm('确认完成操作ID为"' + row.actionId + '"的记录?').then(() => {
|
||||
return completeAction(row.actionId, '-');
|
||||
|
||||
Reference in New Issue
Block a user