Compare commits
2 Commits
51cca2796d
...
210d7ab4a4
| Author | SHA1 | Date | |
|---|---|---|---|
| 210d7ab4a4 | |||
| e745208870 |
@@ -149,6 +149,15 @@ export function exportPendingAction(query) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询历史钢卷待完成操作列表(dataType=0 & actionStatus != 2)
|
||||||
|
export function listStalePendingAction(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/coilPendingAction/staleList',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 还原被删除的钢卷
|
* 还原被删除的钢卷
|
||||||
*/
|
*/
|
||||||
|
|||||||
85
klp-ui/src/views/wms/todo/stale.vue
Normal file
85
klp-ui/src/views/wms/todo/stale.vue
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
<template>
|
||||||
|
<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">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.wms_coil_action_type" :value="scope.row.actionType" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作状态" align="center" prop="actionStatus" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<dict-tag :options="dict.type.wms_action_status" :value="scope.row.actionStatus" />
|
||||||
|
</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">
|
||||||
|
<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" width="160" fixed="right">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button size="mini" type="primary" icon="el-icon-check"
|
||||||
|
@click="handleComplete(scope.row)">完成</el-button>
|
||||||
|
<el-button size="mini" type="danger" icon="el-icon-close"
|
||||||
|
@click="handleCancel(scope.row)">取消</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</KLPTable>
|
||||||
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listStalePendingAction, completeAction, cancelAction } from "@/api/wms/pendingAction";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "StaleAction",
|
||||||
|
dicts: ['wms_coil_action_type', 'wms_action_status'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: true,
|
||||||
|
total: 0,
|
||||||
|
list: [],
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listStalePendingAction(this.queryParams).then(response => {
|
||||||
|
this.list = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleComplete(row) {
|
||||||
|
this.$modal.confirm('确认完成操作ID为"' + row.actionId + '"的记录?').then(() => {
|
||||||
|
return completeAction(row.actionId, '-');
|
||||||
|
}).then(() => {
|
||||||
|
this.$modal.msgSuccess("操作已完成");
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleCancel(row) {
|
||||||
|
this.$modal.confirm('确认取消操作ID为"' + row.actionId + '"的记录?').then(() => {
|
||||||
|
return cancelAction(row.actionId);
|
||||||
|
}).then(() => {
|
||||||
|
this.$modal.msgSuccess("操作已取消");
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -177,7 +177,31 @@ public class WmsCoilPendingActionServiceImpl implements IWmsCoilPendingActionSer
|
|||||||
QueryWrapper<WmsCoilPendingAction> lqw = Wrappers.query();
|
QueryWrapper<WmsCoilPendingAction> lqw = Wrappers.query();
|
||||||
lqw.ne("wcpa.action_status", 2);
|
lqw.ne("wcpa.action_status", 2);
|
||||||
lqw.eq("wcpa.del_flag", 0);
|
lqw.eq("wcpa.del_flag", 0);
|
||||||
|
lqw.orderByDesc("wcpa.create_time");
|
||||||
|
lqw.orderByDesc("wcpa.scan_time");
|
||||||
Page<WmsCoilPendingActionVo> result = baseMapper.selectStaleActionVoPagePlus(pageQuery.build(), lqw);
|
Page<WmsCoilPendingActionVo> result = baseMapper.selectStaleActionVoPagePlus(pageQuery.build(), lqw);
|
||||||
|
List<WmsCoilPendingActionVo> records = result.getRecords();
|
||||||
|
if (records != null && !records.isEmpty()) {
|
||||||
|
Set<String> userNames = records.stream()
|
||||||
|
.flatMap(v -> java.util.stream.Stream.of(v.getCreateBy(), v.getOperatorName()))
|
||||||
|
.filter(StringUtils::isNotBlank)
|
||||||
|
.collect(Collectors.toSet());
|
||||||
|
if (!userNames.isEmpty()) {
|
||||||
|
Map<String, String> nickMap = userService.selectNickNameMapByUserNames(records.stream()
|
||||||
|
.flatMap(v -> java.util.stream.Stream.of(v.getCreateBy(), v.getOperatorName()))
|
||||||
|
.filter(StringUtils::isNotBlank)
|
||||||
|
.distinct()
|
||||||
|
.collect(Collectors.toList()));
|
||||||
|
records.forEach(item -> {
|
||||||
|
if (StringUtils.isNotBlank(item.getCreateBy())) {
|
||||||
|
item.setCreateByName(nickMap.getOrDefault(item.getCreateBy(), item.getCreateBy()));
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(item.getOperatorName())) {
|
||||||
|
item.setOperatorByName(nickMap.getOrDefault(item.getOperatorName(), item.getOperatorName()));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
return TableDataInfo.build(result);
|
return TableDataInfo.build(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user