Merge remote-tracking branch 'origin/feature/20260716/wms-module' into feature/20260716/wms-module
This commit is contained in:
@@ -18,6 +18,7 @@ public interface ErrorCodeConstants {
|
|||||||
|
|
||||||
ErrorCode IOSTOR_INV_NO_MATCHING_INVENTORY = new ErrorCode(6_000_6, "没有符合当前出库明细的可用库存");
|
ErrorCode IOSTOR_INV_NO_MATCHING_INVENTORY = new ErrorCode(6_000_6, "没有符合当前出库明细的可用库存");
|
||||||
ErrorCode IOSTOR_INV_MANUAL_STATUS_INVALID = new ErrorCode(6_000_7, "只有生成或分配中的明细允许手工分配");
|
ErrorCode IOSTOR_INV_MANUAL_STATUS_INVALID = new ErrorCode(6_000_7, "只有生成或分配中的明细允许手工分配");
|
||||||
|
ErrorCode IOSTOR_INV_UPDATE_STATUS_INVALID = new ErrorCode(6_000_8, "只有生成状态的出库单允许修改");
|
||||||
|
|
||||||
ErrorCode IOSTORINV_DTL_NOT_EXISTS = new ErrorCode(5, "出入库单明细不存在");
|
ErrorCode IOSTORINV_DTL_NOT_EXISTS = new ErrorCode(5, "出入库单明细不存在");
|
||||||
|
|
||||||
|
|||||||
@@ -223,7 +223,13 @@ public class IostorInvServiceImpl implements IostorInvService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void updateOutbound(IostorInvUpdateReqVO reqVO) {
|
public void updateOutbound(IostorInvUpdateReqVO reqVO) {
|
||||||
validateIostorInvExists(String.valueOf(reqVO.getIostorinvId()));
|
IostorInvDO current = iostorInvMapper.selectById(reqVO.getIostorinvId());
|
||||||
|
if (current == null) {
|
||||||
|
throw exception(IOSTOR_INV_NOT_EXISTS);
|
||||||
|
}
|
||||||
|
if (!"10".equals(current.getBillStatus())) {
|
||||||
|
throw exception(IOSTOR_INV_UPDATE_STATUS_INVALID);
|
||||||
|
}
|
||||||
Map<Long, AvailableInventoryRespVO> inventorySnapshot = validateAndLockInventory(reqVO);
|
Map<Long, AvailableInventoryRespVO> inventorySnapshot = validateAndLockInventory(reqVO);
|
||||||
BigDecimal totalWeight = reqVO.getDetails().stream()
|
BigDecimal totalWeight = reqVO.getDetails().stream()
|
||||||
.map(IostorInvCreateReqVO.Detail::getPlanQty)
|
.map(IostorInvCreateReqVO.Detail::getPlanQty)
|
||||||
|
|||||||
@@ -48,6 +48,10 @@ function handleCreate() {
|
|||||||
|
|
||||||
/** 编辑出入库单主表 */
|
/** 编辑出入库单主表 */
|
||||||
function handleEdit(row: WmsIostorInvApi.IostorInv) {
|
function handleEdit(row: WmsIostorInvApi.IostorInv) {
|
||||||
|
if (row.billStatus !== '10') {
|
||||||
|
message.warning('只有生成状态的出库单允许修改');
|
||||||
|
return;
|
||||||
|
}
|
||||||
formModalApi.setData(row).open();
|
formModalApi.setData(row).open();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -157,7 +161,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
|||||||
<TableAction
|
<TableAction
|
||||||
:actions="[
|
:actions="[
|
||||||
{
|
{
|
||||||
label: $t('ui.actionTitle.create', ['出入库单主表']),
|
label: $t('ui.actionTitle.create', ['']),
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: ACTION_ICON.ADD,
|
icon: ACTION_ICON.ADD,
|
||||||
auth: ['wms:iostor-inv:create'],
|
auth: ['wms:iostor-inv:create'],
|
||||||
@@ -197,6 +201,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
|||||||
type: 'link',
|
type: 'link',
|
||||||
icon: ACTION_ICON.EDIT,
|
icon: ACTION_ICON.EDIT,
|
||||||
auth: ['wms:iostor-inv:update'],
|
auth: ['wms:iostor-inv:update'],
|
||||||
|
disabled: row.billStatus !== '10',
|
||||||
onClick: handleEdit.bind(null, row),
|
onClick: handleEdit.bind(null, row),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user