feat: 增加调拨单审批功能及界面优化
fix(调拨单): 修正审批状态校验逻辑 feat(调拨单): 添加审批API接口 refactor(调拨单明细): 重构表格组件支持不同状态操作 style(调拨单): 优化界面显示和操作按钮 perf(发货单): 自动设置发货时间为当前时间 chore: 删除无用调拨记录页面
This commit is contained in:
@@ -541,7 +541,7 @@ public class WmsTransferOrderItemServiceImpl implements IWmsTransferOrderItemSer
|
||||
throw new IllegalArgumentException("调拨单不存在");
|
||||
}
|
||||
// 审批状态: 0-待审批 1-已通过 2-已驳回
|
||||
if (wmsTransferOrder.getApproveStatus() == null || wmsTransferOrder.getApproveStatus() != 1) {
|
||||
if (wmsTransferOrder.getApproveStatus() == null || wmsTransferOrder.getApproveStatus() != 2) {
|
||||
throw new IllegalArgumentException("审批未通过,不能调拨");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,14 +120,14 @@ public class WmsTransferOrderServiceImpl implements IWmsTransferOrderService {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
|
||||
|
||||
// 先删除关联的调拨单明细记录
|
||||
if (ids != null && !ids.isEmpty()) {
|
||||
LambdaQueryWrapper<WmsTransferOrderItem> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.in(WmsTransferOrderItem::getTransferId, ids);
|
||||
wmsTransferOrderItemMapper.delete(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
// 再删除调拨单主记录
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
@@ -141,7 +141,7 @@ public class WmsTransferOrderServiceImpl implements IWmsTransferOrderService {
|
||||
if (order == null) {
|
||||
throw new RuntimeException("调拨单不存在");
|
||||
}
|
||||
if (order.getApproveStatus() != null && order.getApproveStatus() != 0) {
|
||||
if (order.getApproveStatus() != null && order.getApproveStatus() != 1) {
|
||||
throw new RuntimeException("该调拨单已审批,不能重复审批");
|
||||
}
|
||||
order.setApproveStatus(approveStatus);
|
||||
|
||||
Reference in New Issue
Block a user