feat(钢卷操作): 将操作类型显示从静态文本改为可编辑的下拉选择框

修改操作类型显示方式,从静态文本替换为可编辑的下拉选择框,支持用户直接修改操作类型。同时保留原有字典类型的选项支持,提升用户体验和操作便捷性。
This commit is contained in:
砂糖
2026-03-28 15:58:23 +08:00
parent 499654907b
commit 97cc86c6c4
2 changed files with 20 additions and 14 deletions

View File

@@ -238,12 +238,15 @@
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="操作类型" align="center" prop="actionType" width="160">
<template slot-scope="scope">
<span v-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>
<span v-else-if="scope.row.actionType === 405">钢卷打包</span>
<dict-tag v-else :options='dict.type.action_type' :value="scope.row.actionType"></dict-tag>
<el-select @change="handleStatusChange(scope.row)" v-model="scope.row.actionType" placeholder="请选择操作类型" clearable filterable>
<el-option label="入库/收货操作" :value="401" />
<el-option label="发货操作" :value="402" />
<el-option label="移库操作" :value="403" />
<el-option label="通过库区编辑钢卷" :value="404" />
<el-option label="钢卷打包" :value="405" />
<el-option v-for="item in dict.type.action_type" :key="item.value" :label="item.label"
:value="parseInt(item.value)" />
</el-select>
</template>
</el-table-column>
@@ -744,7 +747,7 @@ export default {
this.materialQueryParams.pageNum = 1;
this.searched = true;
this.getMaterialCoil();
// 同时获取操作记录
// if (this.materialCoilList.length > 0) {
// this.currentCoilId = this.materialCoilList[0].coilId;

View File

@@ -53,12 +53,20 @@
<el-table-column label="操作类型" align="center" prop="actionType" width="160">
<template slot-scope="scope">
<span v-if="scope.row.actionType === 401">入库/收货操作</span>
<el-select @change="handleStatusChange(scope.row)" v-model="scope.row.actionType" placeholder="请选择操作类型" clearable filterable>
<el-option label="入库/收货操作" :value="401" />
<el-option label="发货操作" :value="402" />
<el-option label="移库操作" :value="403" />
<el-option label="通过库区编辑钢卷" :value="404" />
<el-option label="钢卷打包" :value="405" />
<el-option v-for="item in dict.type.action_type" :key="item.value" :label="item.label" :value="parseInt(item.value)" />
</el-select>
<!-- <span v-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>
<span v-else-if="scope.row.actionType === 405">钢卷打包</span>
<dict-tag v-else :options='dict.type.action_type' :value="scope.row.actionType"></dict-tag>
<dict-tag v-else :options='dict.type.action_type' :value="scope.row.actionType"></dict-tag> -->
</template>
</el-table-column>
@@ -70,10 +78,6 @@
<el-option label="已完成" :value="2" />
<el-option label="已取消" :value="3" />
</el-select>
<!-- <el-tag v-if="scope.row.actionStatus === 0" type="info" size="small">待处理</el-tag>
<el-tag v-else-if="scope.row.actionStatus === 1" type="warning" size="small">处理中</el-tag>
<el-tag v-else-if="scope.row.actionStatus === 2" type="success" size="small">已完成</el-tag>
<el-tag v-else-if="scope.row.actionStatus === 3" type="danger" size="small">已取消</el-tag> -->
</template>
</el-table-column>
@@ -108,7 +112,6 @@
<el-select @change="handleProcessTimeChange(scope.row)" v-model="scope.row.createBy" placeholder="请选择创建人" filterable>
<el-option v-for="item in userList" :key="item.userId" :label="item.nickName" :value="item.userName" />
</el-select>
<!-- <span>{{ scope.row.createByName }}</span> -->
</template>
</el-table-column>