feat(钢卷管理): 在操作列添加数字钢卷按钮并实现跳转功能

添加数字钢卷按钮到钢卷管理页面的操作列,并实现点击跳转到数字钢卷详情页面的功能。同时调整了操作列的宽度以适应新增按钮。
This commit is contained in:
2026-04-27 16:42:43 +08:00
parent 81252ccb2d
commit 702de37397
2 changed files with 34 additions and 19 deletions

View File

@@ -50,7 +50,8 @@
<i class="el-icon-box"></i>
<p>暂无待领物料</p>
</div> -->
<KLPTable :data="materialCoilList" height="calc(100vh - 340px)" :floatLayer="true" :floatLayerConfig="floatLayerConfig" :row-style="getRowStyle">
<KLPTable :data="materialCoilList" height="calc(100vh - 340px)" :floatLayer="true"
:floatLayerConfig="floatLayerConfig" :row-style="getRowStyle">
<el-table-column prop="status" label="钢卷状态" width="100" show-overflow-tooltip>
<template slot-scope="scope">
<el-tag size="small" :style="getBorderStyle(scope.row)">{{ getTypeLabel(scope.row) }}</el-tag>
@@ -66,12 +67,15 @@
<el-table-column prop="warehouseName" label="逻辑库区" show-overflow-tooltip></el-table-column>
<el-table-column prop="specification" label="规格" width="100" show-overflow-tooltip></el-table-column>
<el-table-column prop="netWeight" label="净重" width="100" show-overflow-tooltip></el-table-column>
<el-table-column prop="action" label="操作" width="400">
<el-table-column prop="action" label="操作" width="500">
<template slot-scope="scope">
<el-button v-loading="buttonLoading" style="margin-left: 0px; padding: 4px !important;" type="default"
size="mini" icon="el-icon-view" @click="handlePreviewLabel(scope.row)" title="预览标签">预览</el-button>
<el-button v-loading="buttonLoading" style="margin-left: 0px; padding: 4px !important;" type="default"
size="mini" icon="el-icon-printer" @click="handlePrintLabel(scope.row)" title="打印标签">打印</el-button>
<el-button size="mini" type="default" style="margin-left: 0px; padding: 4px !important;" icon="el-icon-view" @click="handleNumberCoilClick(scope.row)">
数字钢卷
</el-button>
<el-button type="warning" icon="el-icon-time" size="mini" @click="handleTrace(scope.row)"
:loading="scope.row.picking" class="action-btn">追溯</el-button>
@@ -80,14 +84,12 @@
<el-button type="danger" icon="el-icon-delete" size="mini" @click="hanleDeleteMaterial(scope.row)"
:loading="scope.row.picking" class="action-btn">删除</el-button>
<el-button v-if="scope.row.dataType == 1 && scope.row.status == 0"
type="success" icon="el-icon-refresh"
size="mini" @click="handleRestoreMaterial(scope.row)" :loading="scope.row.cancelling"
class="action-btn">回滚</el-button>
<el-button v-if="scope.row.dataType == 10 && scope.row.status == 0"
type="success" icon="el-icon-refresh"
size="mini" @click="handleForceInMaterial(scope.row)" :loading="scope.row.cancelling"
class="action-btn">强制入库</el-button>
<el-button v-if="scope.row.dataType == 1 && scope.row.status == 0" type="success"
icon="el-icon-refresh" size="mini" @click="handleRestoreMaterial(scope.row)"
:loading="scope.row.cancelling" class="action-btn">回滚</el-button>
<el-button v-if="scope.row.dataType == 10 && scope.row.status == 0" type="success"
icon="el-icon-refresh" size="mini" @click="handleForceInMaterial(scope.row)"
:loading="scope.row.cancelling" class="action-btn">强制入库</el-button>
</template>
</el-table-column>
@@ -490,7 +492,7 @@ export default {
correctVisible: false,
buttonLoading: false,
userList: [],
floatLayerConfig: {
floatLayerConfig: {
columns: [
{ label: '入场钢卷号', prop: 'enterCoilNo' },
{ label: '当前钢卷号', prop: 'currentCoilNo' },
@@ -603,6 +605,12 @@ export default {
},
methods: {
parseTime,
// 进入数字钢卷页面
handleNumberCoilClick(row) {
this.$router.push({
path: '/wms/coil/' + row.coilId,
});
},
/** 新增按钮操作 */
handleAdd() {
this.reset();

View File

@@ -54,13 +54,16 @@
<el-table-column prop="warehouseName" label="逻辑库区" show-overflow-tooltip></el-table-column>
<el-table-column prop="specification" label="规格" width="100" show-overflow-tooltip></el-table-column>
<el-table-column prop="netWeight" label="净重" width="100" show-overflow-tooltip></el-table-column>
<el-table-column prop="action" label="操作" width="400">
<el-table-column prop="action" label="操作" width="460">
<template slot-scope="scope">
<el-button v-loading="buttonLoading" style="margin-left: 0px; padding: 4px !important;" type="default"
size="mini" icon="el-icon-view" @click="handlePreviewLabel(scope.row)" title="预览标签">预览</el-button>
<el-button v-loading="buttonLoading" style="margin-left: 0px; padding: 4px !important;" type="default"
size="mini" icon="el-icon-printer" @click="handlePrintLabel(scope.row)" title="打印标签">打印</el-button>
<el-button size="mini" type="default" style="margin-left: 0px; padding: 4px !important;" icon="el-icon-view" @click="handleNumberCoilClick(scope.row)">
数字钢卷
</el-button>
<el-button type="warning" icon="el-icon-time" size="mini" @click="handleTrace(scope.row)"
:loading="scope.row.picking" class="action-btn">追溯</el-button>
@@ -69,14 +72,12 @@
<el-button type="danger" icon="el-icon-delete" size="mini" @click="hanleDeleteMaterial(scope.row)"
:loading="scope.row.picking" class="action-btn">删除</el-button>
<el-button v-if="scope.row.dataType == 1 && scope.row.status == 0"
type="success" icon="el-icon-refresh"
<el-button v-if="scope.row.dataType == 1 && scope.row.status == 0" type="success" icon="el-icon-refresh"
size="mini" @click="handleRestoreMaterial(scope.row)" :loading="scope.row.cancelling"
class="action-btn">回滚</el-button>
<el-button v-if="scope.row.dataType == 10 && scope.row.status == 0"
type="success" icon="el-icon-refresh"
size="mini" @click="handleForceInMaterial(scope.row)" :loading="scope.row.cancelling"
class="action-btn">强制入库</el-button>
<el-button v-if="scope.row.dataType == 10 && scope.row.status == 0" type="success"
icon="el-icon-refresh" size="mini" @click="handleForceInMaterial(scope.row)"
:loading="scope.row.cancelling" class="action-btn">强制入库</el-button>
</template>
</el-table-column>
@@ -597,6 +598,12 @@ export default {
}
return '物品类型';
},
// 进入数字钢卷页面
handleNumberCoilClick(row) {
this.$router.push({
path: '/wms/coil/' + row.coilId,
});
},
// 分条操作列表100-199
splitTypes() {
if (!this.dict.type.action_type) return [];