feat(钢卷待操作): 新增还原已删除记录功能并优化查询

新增还原已删除钢卷待操作记录的功能,包括前后端接口实现。优化查询逻辑,支持查看已删除记录。调整页面操作状态显示为下拉选择,并增加删除/还原按钮的显示控制。同时修改多处报表页面的分页参数为9999以提高数据展示量。

修改删除标志查询条件,将已删除状态从1改为2以区分逻辑删除状态。在钢卷待操作页面增加"查看被删除操作"复选框,支持切换显示正常/已删除记录。
This commit is contained in:
砂糖
2026-03-12 16:23:45 +08:00
parent 5f8ec04a17
commit 223a745991
18 changed files with 111 additions and 33 deletions

View File

@@ -33,6 +33,9 @@
<el-button type="warning" plain icon="el-icon-refresh" size="mini" @click="handleRefresh"
:disabled="buttonLoading" v-loading="buttonLoading">刷新</el-button>
</el-col>
<el-col :span="3">
<el-checkbox v-model="rubbish" label="1" @change="getList">查看被删除操作</el-checkbox>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@@ -59,12 +62,18 @@
</template>
</el-table-column>
<el-table-column label="操作状态" align="center" prop="actionStatus" width="100">
<el-table-column label="操作状态" align="center" prop="actionStatus" width="120">
<template slot-scope="scope">
<el-tag v-if="scope.row.actionStatus === 0" type="info" size="small">待处理</el-tag>
<el-select v-model="scope.row.actionStatus" placeholder="请选择操作状态" @change="handleStatusChange(scope.row)">
<el-option label="待处理" :value="0" />
<el-option label="处理中" :value="1" />
<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>
<el-tag v-else-if="scope.row.actionStatus === 3" type="danger" size="small">已取消</el-tag> -->
</template>
</el-table-column>
@@ -120,7 +129,8 @@
</template> -->
<!-- 已完成或已取消状态显示删除按钮 -->
<template v-if="scope.row.actionStatus === 2 || scope.row.actionStatus === 3">
<el-button size="mini" type="danger" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
<el-button v-if="scope.row.delFlag == 0" size="mini" type="danger" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
<el-button v-if="scope.row.delFlag == 2" size="mini" type="success" icon="el-icon-refresh" @click="handleRestore(scope.row)">还原</el-button>
</template>
</template>
</el-table-column>
@@ -185,8 +195,7 @@
</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>
@@ -201,7 +210,8 @@ import {
addPendingAction,
updatePendingAction,
startProcess,
cancelAction
cancelAction,
restorePendingAction,
} from '@/api/wms/pendingAction';
import CoilSelector from '@/components/CoilSelector';
import CoilNo from '@/components/KLPService/Renderer/CoilNo.vue';
@@ -219,6 +229,7 @@ export default {
// 遮罩层
loading: true,
buttonLoading: false,
rubbish: false,
// 选中数组
ids: [],
// 非单个禁用
@@ -293,9 +304,12 @@ export default {
getList() {
this.loading = true;
this.buttonLoading = true;
listPendingAction(this.queryParams).then(response => {
const payload = {
...this.queryParams,
includeDeleted: this.rubbish ? 2 : 0
}
listPendingAction(payload).then(response => {
console.log('response.rows', response.rows);
this.actionList = response.rows;
this.total = response.total;
this.buttonLoading = false;
@@ -340,6 +354,27 @@ export default {
this.resetForm('queryForm');
this.handleQuery();
},
handleStatusChange(row) {
// console.log(row)
updatePendingAction(row).then(response => {
this.$message.success('操作状态更新成功');
this.getList();
});
},
/** 还原按钮操作 */
handleRestore(row) {
const actionId = row.actionId;
this.$modal.confirm('是否确认还原该待操作记录?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
restorePendingAction(actionId).then(response => {
this.$message.success('还原成功');
this.getList();
});
});
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.actionId);

View File

@@ -318,7 +318,7 @@ export default {
const res1 = await listPendingAction({
actionStatus: 2,
actionType: 11, // 酸轧工序
pageSize: 999,
pageSize: 9999,
pageNum: 1,
startTime: this.queryParams.byCreateTimeStart,
endTime: this.queryParams.byCreateTimeEnd,
@@ -328,7 +328,7 @@ export default {
warehouseId: this.queryParams.planId,
// actionType: 401,
actionType: 120, // 分条工序
pageSize: 999,
pageSize: 9999,
pageNum: 1,
startTime: this.queryParams.byCreateTimeStart,
endTime: this.queryParams.byCreateTimeEnd,

View File

@@ -339,7 +339,7 @@ export default {
const res1 = await listPendingAction({
actionStatus: 2,
actionType: 11, // 酸轧工序
pageSize: 999,
pageSize: 9999,
pageNum: 1,
startTime: this.queryParams.byCreateTimeStart,
endTime: this.queryParams.byCreateTimeEnd,
@@ -349,7 +349,7 @@ export default {
warehouseId: this.queryParams.planId,
// actionType: 401,
actionType: 120, // 分条工序
pageSize: 999,
pageSize: 9999,
pageNum: 1,
startTime: this.queryParams.byCreateTimeStart,
endTime: this.queryParams.byCreateTimeEnd,

View File

@@ -394,7 +394,7 @@ export default {
const res1 = await listPendingAction({
actionStatus: 2,
actionType: 11, // 酸轧工序
pageSize: 999,
pageSize: 9999,
pageNum: 1,
startTime: this.queryParams.byCreateTimeStart,
endTime: this.queryParams.byCreateTimeEnd,
@@ -404,7 +404,7 @@ export default {
warehouseId: this.queryParams.planId,
// actionType: 401,
actionType: 120, // 分条工序
pageSize: 999,
pageSize: 9999,
pageNum: 1,
startTime: this.queryParams.byCreateTimeStart,
endTime: this.queryParams.byCreateTimeEnd,

View File

@@ -323,7 +323,7 @@ export default {
const res1 = await listPendingAction({
actionStatus: 2,
actionType: 11, // 酸轧工序
pageSize: 999,
pageSize: 9999,
pageNum: 1,
startTime: this.queryParams.byCreateTimeStart,
endTime: this.queryParams.byCreateTimeEnd,
@@ -333,7 +333,7 @@ export default {
warehouseId: this.queryParams.planId,
// actionType: 401,
actionType: 120, // 分条工序
pageSize: 999,
pageSize: 9999,
pageNum: 1,
startTime: this.queryParams.byCreateTimeStart,
endTime: this.queryParams.byCreateTimeEnd,

View File

@@ -186,7 +186,7 @@ export default {
warehouseId: this.queryParams.planId,
// actionType: 401,
actionType: 11, // 酸轧工序
pageSize: 999,
pageSize: 9999,
pageNum: 1,
startTime: this.queryParams.byCreateTimeStart,
endTime: this.queryParams.byCreateTimeEnd,
@@ -196,7 +196,7 @@ export default {
warehouseId: this.queryParams.planId,
// actionType: 401,
actionType: 120, // 分条工序
pageSize: 999,
pageSize: 9999,
pageNum: 1,
startTime: this.queryParams.byCreateTimeStart,
endTime: this.queryParams.byCreateTimeEnd,

View File

@@ -304,7 +304,7 @@ export default {
const res1 = await listPendingAction({
actionStatus: 2,
actionType: 501, // 镀锌工序
pageSize: 999,
pageSize: 9999,
pageNum: 1,
startTime: this.queryParams.byCreateTimeStart,
endTime: this.queryParams.byCreateTimeEnd,
@@ -314,7 +314,7 @@ export default {
warehouseId: this.queryParams.planId,
// actionType: 401,
actionType: 120, // 分条工序
pageSize: 999,
pageSize: 9999,
pageNum: 1,
startTime: this.queryParams.byCreateTimeStart,
endTime: this.queryParams.byCreateTimeEnd,

View File

@@ -325,7 +325,7 @@ export default {
const res1 = await listPendingAction({
actionStatus: 2,
actionType: 501, // 镀锌工序
pageSize: 999,
pageSize: 9999,
pageNum: 1,
startTime: this.queryParams.byCreateTimeStart,
endTime: this.queryParams.byCreateTimeEnd,
@@ -335,7 +335,7 @@ export default {
warehouseId: this.queryParams.planId,
// actionType: 401,
actionType: 120, // 分条工序
pageSize: 999,
pageSize: 9999,
pageNum: 1,
startTime: this.queryParams.byCreateTimeStart,
endTime: this.queryParams.byCreateTimeEnd,

View File

@@ -381,7 +381,7 @@ export default {
const res1 = await listPendingAction({
actionStatus: 2,
actionType: 501, // 镀锌工序
pageSize: 999,
pageSize: 9999,
pageNum: 1,
startTime: this.queryParams.byCreateTimeStart,
endTime: this.queryParams.byCreateTimeEnd,
@@ -391,7 +391,7 @@ export default {
warehouseId: this.queryParams.planId,
// actionType: 401,
actionType: 120, // 分条工序
pageSize: 999,
pageSize: 9999,
pageNum: 1,
startTime: this.queryParams.byCreateTimeStart,
endTime: this.queryParams.byCreateTimeEnd,

View File

@@ -307,7 +307,7 @@ export default {
const res1 = await listPendingAction({
actionStatus: 2,
actionType: 501, // 镀锌工序
pageSize: 999,
pageSize: 9999,
pageNum: 1,
startTime: this.queryParams.byCreateTimeStart,
endTime: this.queryParams.byCreateTimeEnd,
@@ -317,7 +317,7 @@ export default {
warehouseId: this.queryParams.planId,
// actionType: 401,
actionType: 120, // 分条工序
pageSize: 999,
pageSize: 9999,
pageNum: 1,
startTime: this.queryParams.byCreateTimeStart,
endTime: this.queryParams.byCreateTimeEnd,

View File

@@ -186,7 +186,7 @@ export default {
warehouseId: this.queryParams.planId,
// actionType: 401,
actionType: 501, // 镀锌工序
pageSize: 999,
pageSize: 9999,
pageNum: 1,
startTime: this.queryParams.byCreateTimeStart,
endTime: this.queryParams.byCreateTimeEnd,
@@ -196,7 +196,7 @@ export default {
warehouseId: this.queryParams.planId,
// actionType: 401,
actionType: 120, // 分条工序
pageSize: 999,
pageSize: 9999,
pageNum: 1,
startTime: this.queryParams.byCreateTimeStart,
endTime: this.queryParams.byCreateTimeEnd,