refactor(wms): 清理无用代码并优化格式
删除废弃的BOM相关组件和文件 优化仓库组件代码格式和样式 移除注释掉的BOM面板引用 统一表单元素格式 清理冗余样式代码
This commit is contained in:
@@ -3,21 +3,17 @@
|
||||
<!-- 搜索栏 -->
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
|
||||
<el-form-item label="钢卷号" prop="currentCoilNo">
|
||||
<el-input
|
||||
v-model="queryParams.currentCoilNo"
|
||||
placeholder="请输入钢卷号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
<el-input v-model="queryParams.currentCoilNo" placeholder="请输入钢卷号" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="操作类型" prop="actionType">
|
||||
<el-select v-model="queryParams.actionType" placeholder="请选择操作类型">
|
||||
<el-option v-for="item in dict.type.action_type" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="只看待操作" prop="actionStatus">
|
||||
<el-switch @change="switchActionStatus" v-model="queryParams.actionSwitch" />
|
||||
</el-form-item>
|
||||
<el-form-item label="操作类型" prop="actionType">
|
||||
<el-select v-model="queryParams.actionType" placeholder="请选择操作类型">
|
||||
<el-option v-for="item in dict.type.action_type" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="只看待操作" prop="actionStatus">
|
||||
<el-switch @change="switchActionStatus" v-model="queryParams.actionSwitch"/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
@@ -27,45 +23,22 @@
|
||||
<!-- 工具栏 -->
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>新增</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
>删除</el-button>
|
||||
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple"
|
||||
@click="handleDelete">删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-refresh"
|
||||
size="mini"
|
||||
@click="handleRefresh"
|
||||
:disabled="buttonLoading"
|
||||
v-loading="buttonLoading"
|
||||
>刷新</el-button>
|
||||
<el-button type="warning" plain icon="el-icon-refresh" size="mini" @click="handleRefresh"
|
||||
:disabled="buttonLoading" v-loading="buttonLoading">刷新</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<!-- 数据表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="actionList"
|
||||
@selection-change="handleSelectionChange"
|
||||
:row-class-name="tableRowClassName"
|
||||
>
|
||||
<el-table v-loading="loading" :data="actionList" @selection-change="handleSelectionChange"
|
||||
:row-class-name="tableRowClassName">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="序号" type="index" width="60" align="center" />
|
||||
|
||||
@@ -75,15 +48,15 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作类型" align="center" prop="actionType" width="160" >
|
||||
<el-table-column label="操作类型" align="center" prop="actionType" width="160">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.actionType===5">移库操作已在移动端完成</span>
|
||||
<span v-else-if="scope.row.actionType===4">发货操作已在移动端完成</span>
|
||||
<span v-else-if="scope.row.actionType===401">入库操作</span>
|
||||
<span v-else-if="scope.row.actionType===402">发货操作</span>
|
||||
<span v-else-if="scope.row.actionType===403">移库操作</span>
|
||||
<span v-else-if="scope.row.actionType===404">通过库区编辑钢卷</span>
|
||||
<dict-tag v-else :options='dict.type.action_type' :value="scope.row.actionType "></dict-tag>
|
||||
<span v-if="scope.row.actionType === 5">移库操作已在移动端完成</span>
|
||||
<span v-else-if="scope.row.actionType === 4">发货操作已在移动端完成</span>
|
||||
<span v-else-if="scope.row.actionType === 401">入库操作</span>
|
||||
<span v-else-if="scope.row.actionType === 402">发货操作</span>
|
||||
<span v-else-if="scope.row.actionType === 403">移库操作</span>
|
||||
<span v-else-if="scope.row.actionType === 404">通过库区编辑钢卷</span>
|
||||
<dict-tag v-else :options='dict.type.action_type' :value="scope.row.actionType"></dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -136,59 +109,27 @@
|
||||
<template slot-scope="scope">
|
||||
<!-- 待处理状态显示操作按钮 -->
|
||||
<template v-if="scope.row.actionStatus === 0">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
@click="handleProcess(scope.row)"
|
||||
v-loading="buttonLoading"
|
||||
:disabled="buttonLoading"
|
||||
>操作</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
<el-button size="mini" type="primary" icon="el-icon-edit" @click="handleProcess(scope.row)"
|
||||
v-loading="buttonLoading" :disabled="buttonLoading">操作</el-button>
|
||||
<el-button size="mini" type="danger" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
<!-- 处理中状态显示继续按钮 -->
|
||||
<template v-else-if="scope.row.actionStatus === 1">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="warning"
|
||||
icon="el-icon-edit"
|
||||
@click="handleProcess(scope.row)"
|
||||
:disabled="buttonLoading"
|
||||
v-loading="buttonLoading"
|
||||
>继续</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="info"
|
||||
icon="el-icon-close"
|
||||
@click="handleCancel(scope.row)"
|
||||
>取消</el-button>
|
||||
<el-button size="mini" type="warning" icon="el-icon-edit" @click="handleProcess(scope.row)"
|
||||
:disabled="buttonLoading" v-loading="buttonLoading">继续</el-button>
|
||||
<el-button size="mini" type="info" icon="el-icon-close" @click="handleCancel(scope.row)">取消</el-button>
|
||||
</template>
|
||||
<!-- 已完成或已取消状态显示删除按钮 -->
|
||||
<template v-else>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
<el-button size="mini" type="danger" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
|
||||
<!-- 添加或修改对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="1200px" append-to-body>
|
||||
@@ -202,12 +143,8 @@
|
||||
<div class="card-section" v-if="splitTypes.length > 0">
|
||||
<div class="section-title">分条操作</div>
|
||||
<div class="action-cards-row">
|
||||
<div
|
||||
v-for="item in splitTypes"
|
||||
:key="item.value"
|
||||
class="action-card split-card"
|
||||
:class="{ 'active': form.actionType == item.value }"
|
||||
@click="form.actionType = parseInt(item.value)">
|
||||
<div v-for="item in splitTypes" :key="item.value" class="action-card split-card"
|
||||
:class="{ 'active': form.actionType == item.value }" @click="form.actionType = parseInt(item.value)">
|
||||
<div class="card-icon">
|
||||
<i :class="getActionIcon(item.value)"></i>
|
||||
</div>
|
||||
@@ -218,17 +155,13 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 其他操作区 -->
|
||||
<div class="card-section" v-if="otherTypes.length > 0">
|
||||
<div class="section-title">其他操作</div>
|
||||
<div class="action-cards-row">
|
||||
<div
|
||||
v-for="item in otherTypes"
|
||||
:key="item.value"
|
||||
class="action-card"
|
||||
:class="{ 'active': form.actionType == item.value }"
|
||||
@click="form.actionType = parseInt(item.value)">
|
||||
<div v-for="item in otherTypes" :key="item.value" class="action-card"
|
||||
:class="{ 'active': form.actionType == item.value }" @click="form.actionType = parseInt(item.value)">
|
||||
<div class="card-icon">
|
||||
<i :class="getActionIcon(item.value)"></i>
|
||||
</div>
|
||||
@@ -253,7 +186,8 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm" :disabled="buttonLoading" v-loading="buttonLoading">确 定</el-button>
|
||||
<el-button type="primary" @click="submitForm" :disabled="buttonLoading" v-loading="buttonLoading">确
|
||||
定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@@ -464,7 +398,7 @@ export default {
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$message.success('删除成功');
|
||||
}).catch(() => {});
|
||||
}).catch(() => { });
|
||||
},
|
||||
/** 处理操作 - 跳转到对应页面 */
|
||||
handleProcess(row) {
|
||||
@@ -485,17 +419,17 @@ export default {
|
||||
|
||||
// 根据操作类型跳转到不同页面
|
||||
let path = '';
|
||||
|
||||
|
||||
// 分条操作:100-199
|
||||
if (actionType >= 100 && actionType <= 199) {
|
||||
path = '/wms/split';
|
||||
}
|
||||
}
|
||||
// 合卷操作:200-299
|
||||
else if (actionType == 200) {
|
||||
path = '/wms/merge';
|
||||
}
|
||||
// 其他操作类型
|
||||
else{
|
||||
else {
|
||||
path = '/wms/typing';
|
||||
}
|
||||
|
||||
@@ -540,7 +474,7 @@ export default {
|
||||
}).then(() => {
|
||||
this.$message.success('操作已取消');
|
||||
this.getList();
|
||||
}).catch(() => {});
|
||||
}).catch(() => { });
|
||||
},
|
||||
/** 刷新列表 */
|
||||
handleRefresh() {
|
||||
@@ -552,8 +486,8 @@ export default {
|
||||
// 每30秒自动刷新一次(用于移动端扫码后自动更新列表)
|
||||
this.refreshTimer = setInterval(() => {
|
||||
|
||||
// 只在查看待处理状态时自动刷新
|
||||
this.getList();
|
||||
// 只在查看待处理状态时自动刷新
|
||||
this.getList();
|
||||
}, 30000);
|
||||
},
|
||||
/** 表格行样式 */
|
||||
@@ -653,15 +587,15 @@ export default {
|
||||
/* 操作类型卡片样式 */
|
||||
.action-type-cards {
|
||||
width: 100%;
|
||||
|
||||
|
||||
.card-section {
|
||||
margin-bottom: 24px;
|
||||
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.section-title {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
@@ -670,18 +604,18 @@ export default {
|
||||
padding-left: 8px;
|
||||
border-left: 3px solid #409eff;
|
||||
}
|
||||
|
||||
|
||||
// 分条操作区域的特殊样式
|
||||
.card-section:first-child .section-title {
|
||||
border-left-color: #e6a23c;
|
||||
}
|
||||
|
||||
|
||||
.action-cards-row {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
|
||||
.action-card {
|
||||
min-width: 0;
|
||||
padding: 16px;
|
||||
@@ -693,50 +627,50 @@ export default {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
|
||||
|
||||
&:hover {
|
||||
border-color: #409eff;
|
||||
box-shadow: 0 2px 12px 0 rgba(64, 158, 255, 0.15);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
|
||||
&.active {
|
||||
border-color: #409eff;
|
||||
background: linear-gradient(135deg, #e3f2fd 0%, #f0f7ff 100%);
|
||||
box-shadow: 0 2px 12px 0 rgba(64, 158, 255, 0.3);
|
||||
|
||||
|
||||
.card-icon {
|
||||
background: linear-gradient(135deg, #409eff 0%, #66b1ff 100%);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
.card-title {
|
||||
color: #409eff;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
&.split-card {
|
||||
&.active {
|
||||
background: linear-gradient(135deg, #fff3e0 0%, #fff8f0 100%);
|
||||
border-color: #e6a23c;
|
||||
|
||||
|
||||
.card-icon {
|
||||
background: linear-gradient(135deg, #e6a23c 0%, #f0ad4e 100%);
|
||||
}
|
||||
|
||||
|
||||
.card-title {
|
||||
color: #e6a23c;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
&:hover {
|
||||
border-color: #e6a23c;
|
||||
box-shadow: 0 2px 12px 0 rgba(230, 162, 60, 0.15);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.card-icon {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
@@ -750,11 +684,11 @@ export default {
|
||||
transition: all 0.3s ease;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
|
||||
.card-content {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
|
||||
.card-title {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
@@ -762,7 +696,7 @@ export default {
|
||||
margin-bottom: 4px;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
|
||||
.card-desc {
|
||||
font-size: 13px;
|
||||
color: #909399;
|
||||
|
||||
Reference in New Issue
Block a user