فهرست منبع

入库记录删除添加货品已出库不可删除校验

xuezizhuo 1 سال پیش
والد
کامیت
92287fa49f

+ 12 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/ProductInventoryServiceImpl.java

@@ -318,6 +318,18 @@ public class ProductInventoryServiceImpl implements IProductInventoryService {
 
     @Override
     public AjaxResult deleteInventorByProductCodeListVO(ProductCodeListVO productCodeListVO) {
+
+        //查看当前码单是否已出库
+        System.err.println(productCodeListVO.toString());
+
+        //当前码单是否已出库
+        ProductHandsetOutboundRecord productHandsetOutboundRecord = productHandsetOutboundRecordMapper
+                .selectWhetherExist(productCodeListVO.getQrCode(), productCodeListVO.getQrCodeId());
+        if(productHandsetOutboundRecord != null){
+            return AjaxResult.warn("当前货品已出库,不可删除!");
+        }
+
+
         //出库   减 箱数、筒数、净重、毛重,
         //得到当前库存
         ProductInventory productInventory = productInventoryMapper.selectProductInventoryByQrCode(productCodeListVO.getQrCode());

+ 0 - 3
zkqy-ui/src/views/orderMange/productInRecord/index.vue

@@ -554,9 +554,6 @@ export default {
           this.getList();
           this.$modal.msgSuccess("删除成功");
         })
-        .catch(() => {
-          this.$modal.msgError("删除失败!请检查库存");
-        });
     },
     /** 导出按钮操作 */
     handleExport() {