guoyujie
2025-08-20 01401afd49fece4f776a56ce21434bb4e4f531a5
提交装箱调架功能
4个文件已修改
45 ■■■■■ 已修改文件
north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheetLuoyangDetails.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/productStock/ProductStockList.vue 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/productStock/StorageRecord.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/mm/FinishedGoodsInventoryService.java 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheetLuoyangDetails.vue
@@ -515,7 +515,7 @@
  }*/
  .foot{
    position: absolute;
    bottom: 0.3cm;
    bottom: 0.1cm;
  //transform: translateY(8cm);
  }
  /*#table-sum {
north-glass-erp/northglass-erp/src/views/mm/productStock/ProductStockList.vue
@@ -232,7 +232,7 @@
      { 'code' :'issue','name':t('productStock.orderTransfer'),status: 'primary'},
      { 'code' :'out','name':t('productStock.finishedProductPickup'),status: 'primary'},
      /*{ 'code' :'rework','name':t('productStock.finishedProductRework'),status: 'primary'},*/
      /*{ 'code' :'changeRack','name':'装箱调架',status: 'primary'},*/
      { 'code' :'changeRack','name':'装箱调架',status: 'primary'},
    ],
    /*import: false,
@@ -288,7 +288,6 @@
            return
          }
          currentRecord.value = JSON.parse(JSON.stringify(xGrid.value.getCurrentRecord()))
          console.log(currentRecord.value)
          dialogTableVisible.value = true
          break
        }
@@ -296,14 +295,20 @@
    }
  }
}
const changeRack = () => {
  // if(){
  //
  // }
  request.post(`/finishedGoodsInventory/changeRack`,currentRecord.value).then((res) => {
    console.log(res)
    if(res.code==200 && res.data ===true){
const changeRack =async () => {
  const max = xGrid.value.getCurrentRecord().quantityAvailable*1 || 0
  if(currentRecord.value.quantityAvailable<=0 || parseInt(currentRecord.value.quantityAvailable)>max){
    ElMessage.warning(`0<value<=${xGrid.value.getCurrentRecord().quantityAvailable}`)
    return
  }
  if(currentRecord.value.boxNo.length>255 || currentRecord.value.remark.length>255){
    ElMessage.warning('箱号或备注'+t('basicData.msg.max255'))
    return
  }
  await request.post(`/finishedGoodsInventory/changeRack`,currentRecord.value).then((res) => {
    if(res.code==200 ){
      ElMessage.success('装箱调架成功')
      router.push({path: '/main/productStock/productStockList', query:{random:Math.random()}})
    }else{
      ElMessage.warning(res.msg)
    }
north-glass-erp/northglass-erp/src/views/mm/productStock/StorageRecord.vue
@@ -293,6 +293,8 @@
              }else if(res.data==="false1"){
                ElMessage.warning("发货单已创建")
              }else if(res.data==="false2"){
                ElMessage.warning("物料可能存在装箱调架,无法退回")
              }else{
                ElMessage.warning(t('productStock.cancellationFailed'))
              }
north-glass-erp/src/main/java/com/example/erp/service/mm/FinishedGoodsInventoryService.java
@@ -985,7 +985,19 @@
            if(Objects.equals(finishedOperateLog.getOperateType(), "入库")){
                Delivery delivery = finishedGoodsInventoryMapper.findOrderDelivery(finishedOperateLog.getOrderId());
                if(delivery==null){
                FinishedGoodsInventory existFinishedGoodsInventory = finishedGoodsInventoryMapper.
                        selectOne(new LambdaQueryWrapper<FinishedGoodsInventory>()
                                .eq(FinishedGoodsInventory::getOrderId, finishedOperateLog.getOrderId())
                                .eq(FinishedGoodsInventory::getOrderNumber, finishedOperateLog.getOperationNumber())
                                .eq(FinishedGoodsInventory::getBoxNo, finishedOperateLog.getRemarks())
                        );
                if(delivery!=null){
                    return "false1";
                }
                if(!Objects.equals(existFinishedGoodsInventory.getQuantityAvailable(), finishedOperateLog.getQuantity())){
                    return "false2";
                }
                    //修改记录表
                    finishedOperateLogMapper.updateFinishedOperateLogState(finishedOperateLog,"已作废");
                    //修改库存表入库数量
@@ -1007,9 +1019,7 @@
                        finishedGoodsInventoryMapper.updateOrderWarehousingState(finishedOperateLog.getOrderId(),0);
                    }
                    log.setFunction("cancelFinishedGoodsInventoryStorage入库");
                }else{
                    return "false1";
                }