4.18入库修改

jg-waiwang-pro
CJYXTX\27961 6 months ago
parent d849766d76
commit 9ff04dcfb2

@ -475,9 +475,7 @@ public class WarehousingOutboundServiceImpl extends ServiceImpl<WarehousingOutbo
id = form.getId(); id = form.getId();
} }
//主表字段验证 //主表字段验证
if(StringUtil.isEmpty(form.getOutboundReason())){
return "出库原因不能为空";
}
//子表字段验证 //子表字段验证
if (form.getWarehousingOutboundPoundlistList()!=null){ if (form.getWarehousingOutboundPoundlistList()!=null){
} }

@ -479,18 +479,35 @@ public class WarehousingStorageServiceImpl extends ServiceImpl<WarehousingStorag
if (isUp){ if (isUp){
id = form.getId(); id = form.getId();
} }
// Map<String, WarehousingStoragePoundlistModel> ageMap = new HashMap<>();
// for (WarehousingStoragePoundlistModel poundlistModel : form.getWarehousingStoragePoundlistList()) {
// String productId = poundlistModel.getProductId();
// String unit = poundlistModel.getUnit();
//
// BigDecimal NetWeight = poundlistModel.getNetWeight();
// int age = user.getAge();
//
// if (ageMap.containsKey(name)) {
// ageMap.put(name, ageMap.get(name) + age);
// } else {
// ageMap.put(name, age);
// }
// }
//主表字段验证 //主表字段验证
//子表字段验证 //子表字段验证
if (form.getWarehousingStoragePoundlistList().size()>form.getWarehousingStorageProductList().size()){ //多凭证按照商品id合并
return "凭证条数不能大于商品条数"; // for (WarehousingStoragePoundlistModel warehousingStoragePoundlistModel : form.getWarehousingStoragePoundlistList()) {
} // warehousingStorageProductModel
// }
BigDecimal maxNum = BigDecimal.ZERO; BigDecimal maxNum = BigDecimal.ZERO;
BigDecimal YNum = BigDecimal.ZERO;
BigDecimal netWeightNum = BigDecimal.ZERO; BigDecimal netWeightNum = BigDecimal.ZERO;
for (WarehousingStorageProductModel warehousingStorageProductModel : form.getWarehousingStorageProductList()) { for (WarehousingStorageProductModel warehousingStorageProductModel : form.getWarehousingStorageProductList()) {
maxNum = maxNum.add( new BigDecimal(warehousingStorageProductModel.getStorageNumber())) ; maxNum = maxNum.add( new BigDecimal(warehousingStorageProductModel.getStorageNumber())) ;
// YNum = YNum.add( new BigDecimal(warehousingStorageProductModel.getReceivedQuantity())) ;
} }
for (WarehousingStoragePoundlistModel warehousingStoragePoundlistModel : form.getWarehousingStoragePoundlistList()) { for (WarehousingStoragePoundlistModel warehousingStoragePoundlistModel : form.getWarehousingStoragePoundlistList()) {
netWeightNum = netWeightNum.add( warehousingStoragePoundlistModel.getNetWeight()) ; netWeightNum = netWeightNum.add( warehousingStoragePoundlistModel.getNetWeight()) ;

@ -402,6 +402,8 @@ public class WarehousingInventoryController {
//生成入库单 //生成入库单
WarehousingStorageForm warehousingStorageForm=new WarehousingStorageForm(); WarehousingStorageForm warehousingStorageForm=new WarehousingStorageForm();
warehousingStorageForm.setWarehousingStorageType("4"); //盘盈入库 warehousingStorageForm.setWarehousingStorageType("4"); //盘盈入库
warehousingStorageForm.setWarehousingStorageStatus("3"); //已入库
warehousingStorageForm.setRemark("盘盈入库");
warehousingStorageForm.setWarehousingId(warehousingInventoryForm.getId()); warehousingStorageForm.setWarehousingId(warehousingInventoryForm.getId());
warehousingStorageForm.setWarehouseId(warehousingInventoryForm.getWarehouseId()); warehousingStorageForm.setWarehouseId(warehousingInventoryForm.getWarehouseId());
List<WarehousingStorageProductModel> list =new ArrayList<>(); List<WarehousingStorageProductModel> list =new ArrayList<>();
@ -468,6 +470,8 @@ public class WarehousingInventoryController {
warehousingOutboundForm.setWarehousingOutboundType("5"); warehousingOutboundForm.setWarehousingOutboundType("5");
warehousingOutboundForm.setWarehousingId(entity.getId()); warehousingOutboundForm.setWarehousingId(entity.getId());
warehousingOutboundForm.setWarehouseId(entity.getWarehouseId()); warehousingOutboundForm.setWarehouseId(entity.getWarehouseId());
warehousingOutboundForm.setWarehousingOutboundStatus("3");
warehousingOutboundForm.setOutboundReason("盘亏出库");
List<WarehousingOutboundProductModel> warehousingOutboundProductModelList =new ArrayList<>(); List<WarehousingOutboundProductModel> warehousingOutboundProductModelList =new ArrayList<>();
for (WarehousingInventoryProductModel warehousingInventoryProductModel:warehousingInventoryForm.getWarehousingInventoryProductList()){ for (WarehousingInventoryProductModel warehousingInventoryProductModel:warehousingInventoryForm.getWarehousingInventoryProductList()){
BigDecimal negative = new BigDecimal(warehousingInventoryProductModel.getProfitAndLossQuantity()); BigDecimal negative = new BigDecimal(warehousingInventoryProductModel.getProfitAndLossQuantity());
@ -481,6 +485,7 @@ public class WarehousingInventoryController {
warehousingOutboundProductModel.setOutboundUnit(warehousingInventoryProductModel.getInventoryUnitIds()); warehousingOutboundProductModel.setOutboundUnit(warehousingInventoryProductModel.getInventoryUnitIds());
warehousingOutboundProductModel.setOutboundNumber(warehousingInventoryProductModel.getProfitAndLossQuantity()); //盘亏数量=出库数量 warehousingOutboundProductModel.setOutboundNumber(warehousingInventoryProductModel.getProfitAndLossQuantity()); //盘亏数量=出库数量
warehousingOutboundProductModel.setReceivedQuantity(warehousingInventoryProductModel.getProfitAndLossQuantity());//盘亏数量=已出库数量 warehousingOutboundProductModel.setReceivedQuantity(warehousingInventoryProductModel.getProfitAndLossQuantity());//盘亏数量=已出库数量
warehousingOutboundProductModel.setBatchNumber(warehousingInventoryProductModel.getBatchNumber());
warehousingOutboundProductModelList.add(warehousingOutboundProductModel); warehousingOutboundProductModelList.add(warehousingOutboundProductModel);
warehousingOutboundForm.setWarehousingOutboundProductList(warehousingOutboundProductModelList); warehousingOutboundForm.setWarehousingOutboundProductList(warehousingOutboundProductModelList);
} }

@ -92,6 +92,16 @@ public class WarehousingOutboundController {
private InventoryService inventoryService; private InventoryService inventoryService;
@Autowired @Autowired
private ConfigValueUtil configValueUtil; private ConfigValueUtil configValueUtil;
@Autowired
private BusinessOrderService businessOrderService;
@Autowired
private WarehousingReceiveService warehousingReceiveService;
@Autowired
private WarehousingInventoryService warehousingInventoryService;
@Autowired
private WarehousingReportlossService warehousingReportlossService;
@Autowired
private DeliveryOrderService deliveryOrderService;
/** /**
* *
@ -105,8 +115,66 @@ public class WarehousingOutboundController {
List<WarehousingOutboundEntity> list= warehousingOutboundService.getList(warehousingOutboundPagination); List<WarehousingOutboundEntity> list= warehousingOutboundService.getList(warehousingOutboundPagination);
List<Map<String, Object>> realList=new ArrayList<>(); List<Map<String, Object>> realList=new ArrayList<>();
for (WarehousingOutboundEntity entity : list) { for (WarehousingOutboundEntity entity : list) {
if (entity.getWarehousingOutboundType().equals("1")){
//销售出库
BusinessOrderEntity businessOrderEntity = businessOrderService.getInfo(entity.getWarehousingId());
if (businessOrderEntity!=null){
entity.setBusinessCode(businessOrderEntity.getCode());
}
}else if (entity.getWarehousingOutboundType().equals("2")){
//调拨出库
}else if (entity.getWarehousingOutboundType().equals("3")){
//退供出库
// WarehousingNotificationEntity warehousingNotificationEntity =warehousingNotificationService.getInfo(entity.getWarehousingId());
// if (warehousingNotificationEntity!=null){
// ReceiptOrderEntity receiptOrderEntity = receiptOrderService.getInfo(warehousingNotificationEntity.getBusinessId());
// entity.setBusinessCode(receiptOrderEntity.getReceiptCode());
// }
}else if (entity.getWarehousingOutboundType().equals("4")){
//领用出库
WarehousingReceiveEntity warehousingReceiveEntity = warehousingReceiveService.getInfo(entity.getWarehousingId());
if (warehousingReceiveEntity!=null){
entity.setBusinessCode(warehousingReceiveEntity.getReceiveCode());
}
}else if (entity.getWarehousingOutboundType().equals("5")){
//盘亏出库
WarehousingInventoryEntity warehousingInventoryEntity = warehousingInventoryService.getInfo(entity.getWarehousingId());
if (warehousingInventoryEntity!=null){
entity.setBusinessCode(warehousingInventoryEntity.getDocumentNo());
}
}else if (entity.getWarehousingOutboundType().equals("6")){
//报损出库
WarehousingReportlossEntity warehousingReportlossEntity = warehousingReportlossService.getInfo(entity.getWarehousingId());
if (warehousingReportlossEntity!=null){
entity.setBusinessCode(warehousingReportlossEntity.getReportlossCode());
}
}else if (entity.getWarehousingOutboundType().equals("7")){
//其他出库
}else if (entity.getWarehousingOutboundType().equals("8")){
//差异调整出库
}else if (entity.getWarehousingOutboundType().equals("9")){
//库存初始化
}else if (entity.getWarehousingOutboundType().equals("10")){
//货权转移出库
}else if (entity.getWarehousingOutboundType().equals("11")){
//采购发货单出库
DeliveryOrderEntity deliveryOrderEntity =deliveryOrderService.getInfo(entity.getWarehousingId());
if (deliveryOrderEntity!=null){
entity.setBusinessCode(deliveryOrderEntity.getDeliveryCode());
}
}else if (entity.getWarehousingOutboundType().equals("12")){
//销售发货单出库
DeliveryOrderEntity deliveryOrderEntity =deliveryOrderService.getInfo(entity.getWarehousingId());
if (deliveryOrderEntity!=null){
entity.setBusinessCode(deliveryOrderEntity.getDeliveryCode());
}
}
entity.setOutNumber(warehousingOutboundService.queryOutboundNumber(entity.getId())); entity.setOutNumber(warehousingOutboundService.queryOutboundNumber(entity.getId()));
entity.setSalesNo(warehousingOutboundService.querySalesNo(entity.getId())); entity.setSalesNo(warehousingOutboundService.querySalesNo(entity.getId()))
;
Map<String, Object> warehousingOutboundMap=JsonUtil.entityToMap(entity); Map<String, Object> warehousingOutboundMap=JsonUtil.entityToMap(entity);
warehousingOutboundMap.put("id", warehousingOutboundMap.get("id")); warehousingOutboundMap.put("id", warehousingOutboundMap.get("id"));
//副表数据 //副表数据

@ -417,7 +417,7 @@ public class WarehousingReceiveController {
receiveWrapper.lambda().eq(WarehousingReceiveEntity::getBusinessId, id); receiveWrapper.lambda().eq(WarehousingReceiveEntity::getBusinessId, id);
List<WarehousingReceiveEntity> warehousingReceiveEntityList = warehousingReceiveService.list(receiveWrapper); List<WarehousingReceiveEntity> warehousingReceiveEntityList = warehousingReceiveService.list(receiveWrapper);
warehousingOutboundForm.setWarehousingOutboundType("4"); //领用出库 warehousingOutboundForm.setWarehousingOutboundType("4"); //领用出库
warehousingOutboundForm.setWarehousingOutboundStatus("4"); //已出库 warehousingOutboundForm.setWarehousingOutboundStatus("3"); //已出库
warehousingOutboundForm.setOutboundReason("领用单生成出出库单"); warehousingOutboundForm.setOutboundReason("领用单生成出出库单");
warehousingOutboundForm.setWarehousingId(warehousingReceiveEntityList.get(0).getId()); warehousingOutboundForm.setWarehousingId(warehousingReceiveEntityList.get(0).getId());
warehousingOutboundForm.setWarehouseId(warehousingReceiveForm.getWarehouseId()); warehousingOutboundForm.setWarehouseId(warehousingReceiveForm.getWarehouseId());

@ -413,7 +413,7 @@ public class WarehousingReportlossController {
//出库单 //出库单
WarehousingOutboundForm warehousingOutboundForm=new WarehousingOutboundForm(); WarehousingOutboundForm warehousingOutboundForm=new WarehousingOutboundForm();
warehousingOutboundForm.setWarehousingOutboundType("6"); warehousingOutboundForm.setWarehousingOutboundType("6");
warehousingOutboundForm.setWarehousingOutboundStatus("4"); warehousingOutboundForm.setWarehousingOutboundStatus("3");
warehousingOutboundForm.setWarehousingId(entity.getId()); warehousingOutboundForm.setWarehousingId(entity.getId());
warehousingOutboundForm.setWarehouseId(entity.getWarehouseId()); warehousingOutboundForm.setWarehouseId(entity.getWarehouseId());
List<WarehousingOutboundProductModel> warehousingOutboundProductModelList =new ArrayList<>(); List<WarehousingOutboundProductModel> warehousingOutboundProductModelList =new ArrayList<>();

@ -444,6 +444,9 @@ public class WarehousingReturnController {
warehousingStorageFormRenturn.setWarehousingStorageType("7"); warehousingStorageFormRenturn.setWarehousingStorageType("7");
warehousingStorageFormRenturn.setWarehousingId(entity.getId()); warehousingStorageFormRenturn.setWarehousingId(entity.getId());
warehousingStorageFormRenturn.setWarehouseId(entity.getWarehouseId()); warehousingStorageFormRenturn.setWarehouseId(entity.getWarehouseId());
warehousingStorageFormRenturn.setRemark("返库单生成的入库单");
warehousingStorageFormRenturn.setWarehousingStorageStatus("3");
List<WarehousingStorageProductModel> list1 =new ArrayList<>(); List<WarehousingStorageProductModel> list1 =new ArrayList<>();
for (WarehousingReturnProductModel warehousingReturnProductModel:warehousingReturnForm.getWarehousingReturnProductList()){ for (WarehousingReturnProductModel warehousingReturnProductModel:warehousingReturnForm.getWarehousingReturnProductList()){
WarehousingStorageProductModel warehousingStorageProductModel=new WarehousingStorageProductModel(); WarehousingStorageProductModel warehousingStorageProductModel=new WarehousingStorageProductModel();

@ -96,6 +96,13 @@ public class WarehousingStorageController {
@Autowired @Autowired
private BusinessOrderService businessOrderService; private BusinessOrderService businessOrderService;
@Autowired @Autowired
private WarehousingInventoryService warehousingInventoryService;
@Autowired
private WarehousingReturnService warehousingReturnService;
@Autowired
private ReceiptOrderService receiptOrderService;
@Autowired
private WorkOrderService workOrderService; private WorkOrderService workOrderService;
/** /**
@ -113,9 +120,9 @@ public class WarehousingStorageController {
if (entity.getWarehousingStorageType().equals("1")){ if (entity.getWarehousingStorageType().equals("1")){
//采购入库 //采购入库
BusinessOrderEntity businessOrderEntity = businessOrderService.getInfo(entity.getWarehousingId()); WarehousingNotificationEntity warehousingNotificationEntity = warehousingNotificationService.getInfo(entity.getWarehousingId());
if (businessOrderEntity!=null){ if (warehousingNotificationEntity!=null){
entity.setBusinessCode(businessOrderEntity.getCode()); entity.setBusinessCode(warehousingNotificationEntity.getWarehousingCode());
} }
}else if (entity.getWarehousingStorageType().equals("2")){ }else if (entity.getWarehousingStorageType().equals("2")){
//调拨入库 //调拨入库
@ -125,20 +132,49 @@ public class WarehousingStorageController {
// } // }
}else if (entity.getWarehousingStorageType().equals("3")){ }else if (entity.getWarehousingStorageType().equals("3")){
//退货入库 //退货入库
WarehousingNotificationEntity warehousingNotificationEntity =warehousingNotificationService.getInfo(entity.getWarehousingId());
if (warehousingNotificationEntity!=null){
ReceiptOrderEntity receiptOrderEntity = receiptOrderService.getInfo(warehousingNotificationEntity.getBusinessId());
if (receiptOrderEntity!=null){
entity.setBusinessCode(receiptOrderEntity.getReceiptCode());
}
}
}else if (entity.getWarehousingStorageType().equals("4")){ }else if (entity.getWarehousingStorageType().equals("4")){
//盘盈入库 //盘盈入库
WarehousingInventoryEntity warehousingInventoryEntity = warehousingInventoryService.getInfo(entity.getWarehousingId());
if (warehousingInventoryEntity!=null){
entity.setBusinessCode(warehousingInventoryEntity.getDocumentNo());
}
}else if (entity.getWarehousingStorageType().equals("5")){ }else if (entity.getWarehousingStorageType().equals("5")){
//其他入库 //其他入库
}else if (entity.getWarehousingStorageType().equals("6")){ }else if (entity.getWarehousingStorageType().equals("6")){
//差异调整入库 //差异调整入库
}else if (entity.getWarehousingStorageType().equals("7")){ }else if (entity.getWarehousingStorageType().equals("7")){
//领用返入库 //领用返入库
WarehousingReturnEntity warehousingReturnEntity = warehousingReturnService.getInfo(entity.getWarehousingId());
if (warehousingReturnEntity!=null){
entity.setBusinessCode(warehousingReturnEntity.getReturnCode());
}
}else if (entity.getWarehousingStorageType().equals("8")){ }else if (entity.getWarehousingStorageType().equals("8")){
//货权转移入库 //货权转移入库
}else if (entity.getWarehousingStorageType().equals("9")){ }else if (entity.getWarehousingStorageType().equals("9")){
//加工入库 //加工入库
WorkOrderEntity workOrderEntity = workOrderService.getInfo(entity.getWarehousingId()); WorkOrderEntity workOrderEntity = workOrderService.getInfo(entity.getWarehousingId());
entity.setBusinessCode(workOrderEntity.getCode()); if (workOrderEntity!=null){
entity.setBusinessCode(workOrderEntity.getCode());
}
}else if (entity.getWarehousingStorageType().equals("15")){
//采购收货单
ReceiptOrderEntity receiptOrderEntity = receiptOrderService.getInfo(entity.getWarehousingId());
if (receiptOrderEntity!=null){
entity.setBusinessCode(receiptOrderEntity.getReceiptCode());
}
} }
@ -201,7 +237,7 @@ public class WarehousingStorageController {
return ActionResult.fail(b ); return ActionResult.fail(b );
} }
try{ try{
warehousingStorageService.saveOrUpdate(warehousingStorageForm, id ,true); // warehousingStorageService.saveOrUpdate(warehousingStorageForm, id ,true);
FlowTaskEntity flowTaskEntity = flowTaskService.getById(id); FlowTaskEntity flowTaskEntity = flowTaskService.getById(id);
if (flowTaskEntity!=null||flowTaskEntity==null){ if (flowTaskEntity!=null||flowTaskEntity==null){
//添加一个是否在审核的判断 //添加一个是否在审核的判断
@ -224,7 +260,9 @@ public class WarehousingStorageController {
// }else { // }else {
// warehousingNotificationEntity.setWarehousingStatus("3"); // warehousingNotificationEntity.setWarehousingStatus("3");
// } // }
warehousingNotificationService.saveOrUpdate(warehousingNotificationEntity);
//先注释
// warehousingNotificationService.saveOrUpdate(warehousingNotificationEntity);
} }
}catch(Exception e){ }catch(Exception e){
@ -483,41 +521,51 @@ public class WarehousingStorageController {
try{ try{
warehousingStorageService.saveOrUpdate(warehousingStorageForm,id,false); warehousingStorageService.saveOrUpdate(warehousingStorageForm,id,false);
FlowTaskEntity flowTaskEntity = flowTaskService.getById(id); FlowTaskEntity flowTaskEntity = flowTaskService.getById(id);
if (flowTaskEntity!=null){ if (flowTaskEntity!=null) {
QueryWrapper<FlowTaskNodeEntity> flowTaskNodeEntityQueryWrapper = new QueryWrapper<>();
//flowTaskNodeEntityQueryWrapper.lambda().eq(FlowTaskNodeEntity::getState, flowTaskEntity.getThisStepId());
flowTaskNodeEntityQueryWrapper.lambda().eq(FlowTaskNodeEntity::getNodeCode, flowTaskEntity.getThisStepId());
flowTaskNodeEntityQueryWrapper.lambda().eq(FlowTaskNodeEntity::getTaskId, flowTaskEntity.getId());
List<FlowTaskNodeEntity> flowTaskNodeEntityList = flowTaskNodeService.list(flowTaskNodeEntityQueryWrapper);
if(flowTaskNodeEntityList != null && flowTaskNodeEntityList.size()>0 && "end".equals(flowTaskNodeEntityList.get(0).getNodeNext())) {
//审核通过修改入库通知
WarehousingNotificationEntity warehousingNotificationEntity =warehousingNotificationService.getInfo(warehousingStorageForm.getWarehousingId());
if (warehousingNotificationEntity!=null){
BigDecimal maxNum = BigDecimal.ZERO;
BigDecimal YNum = BigDecimal.ZERO;
BigDecimal netWeightNum = BigDecimal.ZERO;
for (WarehousingStorageProductModel warehousingStorageProductModel : warehousingStorageForm.getWarehousingStorageProductList()) {
maxNum = maxNum.add( new BigDecimal(warehousingStorageProductModel.getStorageNumber())) ;
if (warehousingStorageProductModel.getReceivedQuantity()!=null){
maxNum = maxNum.add( new BigDecimal(warehousingStorageProductModel.getReceivedQuantity())) ;
}else {
maxNum = maxNum.add( new BigDecimal(0)) ;
}
} QueryWrapper<FlowTaskNodeEntity> flowTaskNodeEntityQueryWrapper = new QueryWrapper<>();
for (WarehousingStoragePoundlistModel warehousingStoragePoundlistModel : warehousingStorageForm.getWarehousingStoragePoundlistList()) { //flowTaskNodeEntityQueryWrapper.lambda().eq(FlowTaskNodeEntity::getState, flowTaskEntity.getThisStepId());
netWeightNum = netWeightNum.add( warehousingStoragePoundlistModel.getNetWeight()) ; flowTaskNodeEntityQueryWrapper.lambda().eq(FlowTaskNodeEntity::getNodeCode, flowTaskEntity.getThisStepId());
} flowTaskNodeEntityQueryWrapper.lambda().eq(FlowTaskNodeEntity::getTaskId, flowTaskEntity.getId());
BigDecimal result = maxNum.subtract(YNum); List<FlowTaskNodeEntity> flowTaskNodeEntityList = flowTaskNodeService.list(flowTaskNodeEntityQueryWrapper);
result = result.subtract(netWeightNum); if (flowTaskNodeEntityList != null && flowTaskNodeEntityList.size() > 0 && "end".equals(flowTaskNodeEntityList.get(0).getNodeNext())) {
if (result.compareTo(BigDecimal.ZERO)==0){ //审核通过修改入库通知
warehousingNotificationEntity.setWarehousingStatus("4"); WarehousingNotificationEntity warehousingNotificationEntity = warehousingNotificationService.getInfo(warehousingStorageForm.getWarehousingId());
}else { // if (warehousingNotificationEntity!=null){
warehousingNotificationEntity.setWarehousingStatus("3"); // BigDecimal maxNum = BigDecimal.ZERO;
} // BigDecimal YNum = BigDecimal.ZERO;
// BigDecimal netWeightNum = BigDecimal.ZERO;
// for (WarehousingStorageProductModel warehousingStorageProductModel : warehousingStorageForm.getWarehousingStorageProductList()) {
// maxNum = maxNum.add( new BigDecimal(warehousingStorageProductModel.getStorageNumber())) ;//这次的入库数量
// if (warehousingStorageProductModel.getReceivedQuantity()!=null){
// maxNum = maxNum.add( new BigDecimal(warehousingStorageProductModel.getReceivedQuantity())) ;
// }else {
// maxNum = maxNum.add( new BigDecimal(0)) ;
// }
//
// }
// for (WarehousingStoragePoundlistModel warehousingStoragePoundlistModel : warehousingStorageForm.getWarehousingStoragePoundlistList()) {
// netWeightNum = netWeightNum.add( warehousingStoragePoundlistModel.getNetWeight()) ;
// }
// BigDecimal netWeightNumNot= netWeightNum; //这次的入库数量
// if (warehousingNotificationEntity.getConfirmWarehousingNum()!=null){
// YNum.add(new BigDecimal (warehousingNotificationEntity.getConfirmWarehousingNum()));
// }
// BigDecimal maxNums = maxNum; //暂存
// BigDecimal result = maxNum.subtract(YNum); //
// result = result.subtract(netWeightNum); //最后结果
//
//
//
// if (result.compareTo(BigDecimal.ZERO)==0){
// warehousingNotificationEntity.setWarehousingStatus("4");
// }else {
// warehousingNotificationEntity.setWarehousingStatus("3");
//// warehousingNotificationEntity.setNotificationStorageNumber();
// }
//上面注释是多次入库,现在先弄成一次性入库
warehousingNotificationEntity.setWarehousingStatus("4");
warehousingNotificationEntity.setIsFlow(1); warehousingNotificationEntity.setIsFlow(1);
warehousingNotificationService.saveOrUpdate(warehousingNotificationEntity); warehousingNotificationService.saveOrUpdate(warehousingNotificationEntity);
} }
@ -579,7 +627,7 @@ public class WarehousingStorageController {
} }
} }
}
}catch(Exception e){ }catch(Exception e){
return ActionResult.fail("修改数据失败"); return ActionResult.fail("修改数据失败");
} }
@ -697,4 +745,5 @@ public class WarehousingStorageController {
List<CwaccountvoucherEntity> list= warehousingStorageService.getWarehousingstorageoutboundPoundlist(warehousingStoragePagination); List<CwaccountvoucherEntity> list= warehousingStorageService.getWarehousingstorageoutboundPoundlist(warehousingStoragePagination);
return ActionResult.success(list); return ActionResult.success(list);
} }
} }

@ -1161,7 +1161,8 @@ public class WorkOrderController {
//成品生成入库单 //成品生成入库单
WarehousingStorageForm warehousingStorageForm=new WarehousingStorageForm(); WarehousingStorageForm warehousingStorageForm=new WarehousingStorageForm();
warehousingStorageForm.setWarehousingStorageType("9"); warehousingStorageForm.setWarehousingStorageType("9");
warehousingStorageForm.setWarehousingStorageStatus("4"); warehousingStorageForm.setWarehousingStorageStatus("3");
warehousingStorageForm.setRemark("加工成品入库");
warehousingStorageForm.setWarehousingId(workOrderForm.getId()); warehousingStorageForm.setWarehousingId(workOrderForm.getId());
warehousingStorageForm.setWarehouseId(workOrderForm.getWarehouseId()); warehousingStorageForm.setWarehouseId(workOrderForm.getWarehouseId());
List<WarehousingStorageProductModel> list =new ArrayList<>(); List<WarehousingStorageProductModel> list =new ArrayList<>();
@ -1285,7 +1286,7 @@ public class WorkOrderController {
receiveWrapper.lambda().eq(WarehousingReceiveEntity::getBusinessId, id); receiveWrapper.lambda().eq(WarehousingReceiveEntity::getBusinessId, id);
List<WarehousingReceiveEntity> warehousingReceiveEntityList = warehousingReceiveService.list(receiveWrapper); List<WarehousingReceiveEntity> warehousingReceiveEntityList = warehousingReceiveService.list(receiveWrapper);
warehousingOutboundForm.setWarehousingOutboundType("4"); //领用出库 warehousingOutboundForm.setWarehousingOutboundType("4"); //领用出库
warehousingOutboundForm.setWarehousingOutboundStatus("4"); //已出库 warehousingOutboundForm.setWarehousingOutboundStatus("3"); //已出库
warehousingOutboundForm.setOutboundReason("加工单——领用单生成出出库单"); warehousingOutboundForm.setOutboundReason("加工单——领用单生成出出库单");
warehousingOutboundForm.setWarehousingId(warehousingReceiveEntityList.get(0).getId()); warehousingOutboundForm.setWarehousingId(warehousingReceiveEntityList.get(0).getId());
warehousingOutboundForm.setWarehouseId(warehousingReceiveForm.getWarehouseId()); warehousingOutboundForm.setWarehouseId(warehousingReceiveForm.getWarehouseId());
@ -1410,6 +1411,8 @@ public class WorkOrderController {
//返库单再生成入库单 //返库单再生成入库单
WarehousingStorageForm warehousingStorageFormRenturn=new WarehousingStorageForm(); WarehousingStorageForm warehousingStorageFormRenturn=new WarehousingStorageForm();
warehousingStorageFormRenturn.setWarehousingStorageType("7"); warehousingStorageFormRenturn.setWarehousingStorageType("7");
warehousingStorageFormRenturn.setWarehousingStorageStatus("3");
warehousingStorageFormRenturn.setRemark("返库单生成入库单");
warehousingStorageFormRenturn.setWarehousingId(warehousingReturnEntityList.get(0).getId()); warehousingStorageFormRenturn.setWarehousingId(warehousingReturnEntityList.get(0).getId());
warehousingStorageFormRenturn.setWarehouseId(workOrderForm.getWarehouseId()); warehousingStorageFormRenturn.setWarehouseId(workOrderForm.getWarehouseId());
List<WarehousingStorageProductModel> list1 =new ArrayList<>(); List<WarehousingStorageProductModel> list1 =new ArrayList<>();
@ -1545,7 +1548,7 @@ public class WorkOrderController {
List<WarehousingReportlossEntity> warehousingReportlossEntityList = warehousingReportlossService.list(reportlossEntityQueryWrapper); List<WarehousingReportlossEntity> warehousingReportlossEntityList = warehousingReportlossService.list(reportlossEntityQueryWrapper);
warehousingOutboundFormReportloss.setWarehousingOutboundType("6"); warehousingOutboundFormReportloss.setWarehousingOutboundType("6");
warehousingOutboundFormReportloss.setWarehousingOutboundStatus("4"); warehousingOutboundFormReportloss.setWarehousingOutboundStatus("3");
warehousingOutboundFormReportloss.setWarehousingId(warehousingReportlossEntityList.get(0).getId()); warehousingOutboundFormReportloss.setWarehousingId(warehousingReportlossEntityList.get(0).getId());
warehousingOutboundFormReportloss.setWarehouseId(warehousingReceiveForm.getWarehouseId()); warehousingOutboundFormReportloss.setWarehouseId(warehousingReceiveForm.getWarehouseId());
warehousingOutboundFormReportloss.setOutboundReason("加工单——报损单生成出出库单"); warehousingOutboundFormReportloss.setOutboundReason("加工单——报损单生成出出库单");

@ -68,4 +68,6 @@ public class WarehousingOutboundEntity {
private String searchDateString; private String searchDateString;
@TableField(exist = false) @TableField(exist = false)
private String productId; private String productId;
@TableField(exist = false) //关联单号
private String businessCode;
} }

@ -36,10 +36,10 @@
</el-table-column> </el-table-column>
<el-table-column prop="poundCode" label="磅单编号" align="left"> <el-table-column prop="poundCode" label="磅单编号" align="left">
</el-table-column> </el-table-column>
<el-table-column prop="vehicleName" label="车牌号" align="left"> <!-- <el-table-column prop="vehicleName" label="车牌号" align="left">
</el-table-column> </el-table-column>
<el-table-column prop="supplierName" label="供应商名字" align="left"> <el-table-column prop="supplierName" label="供应商名字" align="left">
</el-table-column> </el-table-column> -->
</JNPF-table> </JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="init" /> @pagination="init" />
@ -83,7 +83,7 @@ export default {
if (excludeIdList && excludeIdList instanceof Array) { if (excludeIdList && excludeIdList instanceof Array) {
this.excludeIdList = excludeIdList; this.excludeIdList = excludeIdList;
} }
if (val && typeof(val) == 'string') { if (val && typeof (val) == 'string') {
this.val = val; this.val = val;
} }
let query = { let query = {

@ -30,8 +30,11 @@
</JnpfSelect> </JnpfSelect>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="8" v-if="judgeShow('warehousingId')"> <el-col :span="8" v-if="judgeShow('warehousingId')">
<jnpf-form-tip-item label="关联单号" v-if="judgeShow('warehousingId')" prop="warehousingId"> <jnpf-form-tip-item label="关联单号"
v-if="judgeShow('warehousingId') && dataForm.warehousingOutboundType==1 "
prop="warehousingId">
<JnpfPopupSelect v-model="dataForm.warehousingId" <JnpfPopupSelect v-model="dataForm.warehousingId"
@change="changeData('warehousingId', -1)" :rowIndex="null" :formData="dataForm" @change="changeData('warehousingId', -1)" :rowIndex="null" :formData="dataForm"
:templateJson="interfaceRes.warehousingId" placeholder="请选择" :templateJson="interfaceRes.warehousingId" placeholder="请选择"
@ -41,6 +44,72 @@
:columnOptions="warehousingIdcolumnOptions" clearable :style='{ "width": "100%" }'> :columnOptions="warehousingIdcolumnOptions" clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect> </JnpfPopupSelect>
</jnpf-form-tip-item> </jnpf-form-tip-item>
<jnpf-form-tip-item label="关联领用库"
v-if="judgeShow('warehousingId') && dataForm.warehousingOutboundType==4"
prop="warehousingId">
<JnpfPopupSelect v-model="dataForm.warehousingId"
@change="changeData('warehousingId', -1)" :rowIndex="null" :formData="dataForm"
:templateJson="interfaceRes.warehousingId" placeholder="请选择"
:disabled="judgeWrite('warehousingId')" propsValue="id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField='receive_code'
field='warehousingId' interfaceId="550700634353985221" :pageSize="20"
:columnOptions="warehousingIdcolumnOptions" clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
</jnpf-form-tip-item>
<jnpf-form-tip-item label="关联盘点单"
v-if="judgeShow('warehousingId') && dataForm.warehousingOutboundType==5"
prop="warehousingId">
<JnpfPopupSelect v-model="dataForm.warehousingId"
@change="changeData('warehousingId', -1)" :rowIndex="null" :formData="dataForm"
:templateJson="interfaceRes.warehousingId" placeholder="请选择"
:disabled="judgeWrite('warehousingId')" propsValue="id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField='document_no'
field='warehousingId' interfaceId="550680155190748869" :pageSize="20"
:columnOptions="warehousingIdcolumnOptions" clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
</jnpf-form-tip-item>
<jnpf-form-tip-item label="关联报损单"
v-if="judgeShow('warehousingId') && dataForm.warehousingOutboundType==6"
prop="warehousingId">
<JnpfPopupSelect v-model="dataForm.warehousingId"
@change="changeData('warehousingId', -1)" :rowIndex="null" :formData="dataForm"
:templateJson="interfaceRes.warehousingId" placeholder="请选择"
:disabled="judgeWrite('warehousingId')" propsValue="id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField='reportloss_code'
field='warehousingId' interfaceId="550707383463077573" :pageSize="20"
:columnOptions="warehousingIdcolumnOptions" clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
</jnpf-form-tip-item>
<jnpf-form-tip-item label="关联采购发货单出库"
v-if="judgeShow('warehousingId') && dataForm.warehousingOutboundType==11"
prop="warehousingId">
<JnpfPopupSelect v-model="dataForm.warehousingId"
@change="changeData('warehousingId', -1)" :rowIndex="null" :formData="dataForm"
:templateJson="interfaceRes.warehousingId" placeholder="请选择"
:disabled="judgeWrite('warehousingId')" propsValue="id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField='delivery_code'
field='warehousingId' interfaceId="550707995240064709" :pageSize="20"
:columnOptions="warehousingIdcolumnOptions" clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
</jnpf-form-tip-item>
<jnpf-form-tip-item label="关联销售发货单出库"
v-if="judgeShow('warehousingId') && dataForm.warehousingOutboundType==12"
prop="warehousingId">
<JnpfPopupSelect v-model="dataForm.warehousingId"
@change="changeData('warehousingId', -1)" :rowIndex="null" :formData="dataForm"
:templateJson="interfaceRes.warehousingId" placeholder="请选择"
:disabled="judgeWrite('warehousingId')" propsValue="id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField='delivery_code'
field='warehousingId' interfaceId="550707995240064709" :pageSize="20"
:columnOptions="warehousingIdcolumnOptions" clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
</jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="8" v-if="judgeShow('warehouseId')"> <el-col :span="8" v-if="judgeShow('warehouseId')">
<jnpf-form-tip-item label="出库仓库" v-if="judgeShow('warehouseId')" prop="warehouseId"> <jnpf-form-tip-item label="出库仓库" v-if="judgeShow('warehouseId')" prop="warehouseId">
@ -66,7 +135,7 @@
</JnpfDatePicker> </JnpfDatePicker>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="8" v-if="judgeShow('outboundReason')"> <!-- <el-col :span="8" v-if="judgeShow('outboundReason')">
<jnpf-form-tip-item label="出库原因" v-if="judgeShow('outboundReason')" <jnpf-form-tip-item label="出库原因" v-if="judgeShow('outboundReason')"
prop="outboundReason"> prop="outboundReason">
<JnpfInput v-model="dataForm.outboundReason" <JnpfInput v-model="dataForm.outboundReason"
@ -74,7 +143,7 @@
:disabled="judgeWrite('outboundReason')" clearable :style='{ "width": "100%" }'> :disabled="judgeWrite('outboundReason')" clearable :style='{ "width": "100%" }'>
</JnpfInput> </JnpfInput>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col> -->
<el-col :span="24" v-if="judgeShow('remark')"> <el-col :span="24" v-if="judgeShow('remark')">
<jnpf-form-tip-item label="备注" v-if="judgeShow('remark')" prop="remark"> <jnpf-form-tip-item label="备注" v-if="judgeShow('remark')" prop="remark">
<JnpfInput v-model="dataForm.remark" @change="changeData('remark', -1)" <JnpfInput v-model="dataForm.remark" @change="changeData('remark', -1)"
@ -338,21 +407,12 @@
v-if="judgeRequired('warehousingoutboundproductList-outboundUnit')">*</span>出库单位 v-if="judgeRequired('warehousingoutboundproductList-outboundUnit')">*</span>出库单位
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.outboundUnit" <JnpfInput v-model="scope.row.outboundUnit" placeholder="请输入" disabled clearable
@change="changeData('warehousingoutboundproduct-outboundUnit', scope.$index)"
:rowIndex="scope.$index" :formData="dataForm"
:templateJson="interfaceRes.warehousingoutboundproductoutboundUnit"
placeholder="请选择"
:disabled="judgeWrite('warehousingoutboundproductList') || judgeWrite('warehousingoutboundproductList-outboundUnit')"
hasPage propsValue="id" popupWidth="800px" popupTitle="选择数据"
popupType="dialog" relationField='unit_name'
:field="'outboundUnit' + scope.$index" interfaceId="523054191598383685"
:pageSize="20"
:columnOptions="warehousingoutboundproductoutboundUnitcolumnOptions" clearable
:style='{ "width": "100%" }'> :style='{ "width": "100%" }'>
</JnpfPopupSelect> </JnpfInput>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="出库货区" <el-table-column label="出库货区"
v-if="judgeShow('warehousingoutboundproduct-outboundAreaId')" v-if="judgeShow('warehousingoutboundproduct-outboundAreaId')"
prop="outboundAreaId" width="200" align="center"> prop="outboundAreaId" width="200" align="center">
@ -399,21 +459,16 @@
<span class="required-sign" <span class="required-sign"
v-if="judgeRequired('warehousingoutboundproductList-batchNumber')">*</span>批次号 v-if="judgeRequired('warehousingoutboundproductList-batchNumber')">*</span>批次号
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.batchNumber" <JnpfInput v-model="scope.row.batchNumber"
@change="changeData('warehousingoutboundproduct-batchNumber', scope.$index)" @change="changeData('warehousingoutboundproduct-batchNumber', scope.$index)"
:rowIndex="scope.$index" :formData="dataForm" placeholder="请输入"
:templateJson="interfaceRes.warehousingoutboundproductbatchNumber"
placeholder="请选择"
:disabled="judgeWrite('warehousingoutboundproductList') || judgeWrite('warehousingoutboundproductList-batchNumber')" :disabled="judgeWrite('warehousingoutboundproductList') || judgeWrite('warehousingoutboundproductList-batchNumber')"
hasPage propsValue="id" popupWidth="800px" popupTitle="选择数据" clearable :style='{ "width": "100%" }'>
popupType="dialog" relationField='storage_number' </JnpfInput>
:field="'batchNumber' + scope.$index" interfaceId="529928174901940421"
:pageSize="20"
:columnOptions="warehousingoutboundproductbatchNumbercolumnOptions" clearable
:style='{ "width": "100%" }'>
</JnpfPopupSelect>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="生产日期" <el-table-column label="生产日期"
@ -528,7 +583,7 @@ export default {
currVmodel: "", currVmodel: "",
dataForm: { dataForm: {
documentNo: undefined, documentNo: undefined,
warehousingOutboundType: "3", warehousingOutboundType: "1",
warehousingId: undefined, warehousingId: undefined,
warehouseId: undefined, warehouseId: undefined,
productIds: undefined, productIds: undefined,
@ -575,15 +630,10 @@ export default {
trigger: 'change' trigger: 'change'
}, },
], ],
outboundReason: [
{
required: true,
message: '请输入',
trigger: 'blur'
},
],
}, },
warehousingOutboundTypeOptions:[{"fullName":"销售出库","id":"1"},{"fullName":"挑拨出库","id":"2"},{"fullName":"退供出库","id":"3"},{"fullName":"领用出库","id":"4"},{"fullName":"盘亏出库","id":"5"},{"fullName":"报损出库","id":"6"},{"fullName":"其他出库","id":"7"},{"fullName":"差异调整出库","id":"8"},{"fullName":"库存初始化","id":"9"},{"fullName":"货权转移出库","id":"10"}], warehousingOutboundTypeProps: { "label": "fullName", "value": "id" }, warehousingOutboundTypeProps: { "label": "fullName", "value": "id" },
warehousingOutboundTypeOptions: [{ "fullName": "销售出库", "id": "1" }, { "fullName": "挑拨出库", "id": "2" }, { "fullName": "退供出库", "id": "3" }, { "fullName": "领用出库", "id": "4" }, { "fullName": "盘亏出库", "id": "5" }, { "fullName": "报损出库", "id": "6" }, { "fullName": "其他出库", "id": "7" }, { "fullName": "差异调整出库", "id": "8" }, { "fullName": "库存初始化", "id": "9" }, { "fullName": "货权转移出库", "id": "10" }, { "fullName": "采购发货单出库", "id": "11" }, { "fullName": "销售发货单出库", "id": "12" }],
warehousingIdcolumnOptions: [{ "label": "通知编号", "value": "warehousing_code" }, { "label": "供应商", "value": "subject_basic_id" }, { "label": "仓库", "value": "warehouse_id" },], warehousingIdcolumnOptions: [{ "label": "通知编号", "value": "warehousing_code" }, { "label": "供应商", "value": "subject_basic_id" }, { "label": "仓库", "value": "warehouse_id" },],
warehouseIdcolumnOptions: [{ "label": "仓库编号", "value": "code" }, { "label": "仓库名称", "value": "name" }, { "label": "仓库简称", "value": "simple_name" },], warehouseIdcolumnOptions: [{ "label": "仓库编号", "value": "code" }, { "label": "仓库名称", "value": "name" }, { "label": "仓库简称", "value": "simple_name" },],
warehousingoutboundpoundlistvoucherIdcolumnOptions: [{ "label": "凭证编号", "value": "voucher_code" }, { "label": "凭证类型", "value": "voucher_type" }, { "label": "车牌号", "value": "vehicle_number" }, { "label": "商品名称", "value": "product_name" },], warehousingoutboundpoundlistvoucherIdcolumnOptions: [{ "label": "凭证编号", "value": "voucher_code" }, { "label": "凭证类型", "value": "voucher_type" }, { "label": "车牌号", "value": "vehicle_number" }, { "label": "商品名称", "value": "product_name" },],
@ -598,7 +648,8 @@ export default {
interfaceRes: { interfaceRes: {
documentNo: [], documentNo: [],
warehousingOutboundType: [], warehousingOutboundType: [],
warehousingId: [], warehousingId: [{ "dataType": "varchar", "defaultValue": "", "field": "warehousingId", "fieldName": "", "id": "SWdAv32", "jnpfKey": "billRule", "relationField": "warehousingId", "required": "0" }],
// warehousingId: [],
warehouseId: [], warehouseId: [],
warehousingTime: [], warehousingTime: [],
outboundReason: [], outboundReason: [],

@ -93,8 +93,12 @@
{{ scope.row.warehousingOutboundType}} {{ scope.row.warehousingOutboundType}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="warehousingId" label="关联单号" align="center" width="200"> <!-- <el-table-column prop="warehousingId" label="关联单号" align="center" width="200">
</el-table-column> -->
<el-table-column prop="businessCode" label="关联单号" align="center" width="200">
</el-table-column> </el-table-column>
<el-table-column prop="warehouseId" label="出库仓库" align="center" width="150"> <el-table-column prop="warehouseId" label="出库仓库" align="center" width="150">
</el-table-column> </el-table-column>
@ -236,8 +240,7 @@ export default {
flowListVisible: false, flowListVisible: false,
flowList: [], flowList: [],
exportBoxVisible: false, exportBoxVisible: false,
warehousingOutboundTypeOptions: [{ "fullName": "销售出库", "id": "1" }, { "fullName": "挑拨出库", "id": "2" }, { "fullName": "退供出库", "id": "3" }, { "fullName": "领用出库", "id": "4" }, { "fullName": "盘亏出库", "id": "5" }, { "fullName": "报损出库", "id": "6" }, { "fullName": "其他出库", "id": "7" }, { "fullName": "差异调整出库", "id": "8" }, { "fullName": "库存初始化", "id": "9" }, { "fullName": "货权转移出库", "id": "10" }], warehousingOutboundTypeOptions: [{ "fullName": "销售出库", "id": "1" }, { "fullName": "挑拨出库", "id": "2" }, { "fullName": "退供出库", "id": "3" }, { "fullName": "领用出库", "id": "4" }, { "fullName": "盘亏出库", "id": "5" }, { "fullName": "报损出库", "id": "6" }, { "fullName": "其他出库", "id": "7" }, { "fullName": "差异调整出库", "id": "8" }, { "fullName": "库存初始化", "id": "9" }, { "fullName": "货权转移出库", "id": "10" }, { "fullName": "采购发货单出库", "id": "11" }, { "fullName": "销售发货单出库", "id": "12" }], warehousingOutboundTypeProps: { "label": "fullName", "value": "id" },
warehousingOutboundTypeProps: { "label": "fullName", "value": "id" },
tableField114_voucherIdcolumnOptions: [{ "label": "凭证编号", "value": "voucher_code" }, { "label": "凭证类型", "value": "voucher_type" }, { "label": "车牌号", "value": "vehicle_number" }, { "label": "商品名称", "value": "product_name" },], tableField114_voucherIdcolumnOptions: [{ "label": "凭证编号", "value": "voucher_code" }, { "label": "凭证类型", "value": "voucher_type" }, { "label": "车牌号", "value": "vehicle_number" }, { "label": "商品名称", "value": "product_name" },],
tableField119_productIdcolumnOptions: [{ "label": "商品名称", "value": "name" }, { "label": "商品编码", "value": "code" }, { "label": "商品规格", "value": "spec" },], tableField119_productIdcolumnOptions: [{ "label": "商品名称", "value": "name" }, { "label": "商品编码", "value": "code" }, { "label": "商品规格", "value": "spec" },],
tableField119_outboundUnitcolumnOptions: [{ "label": "单位名称", "value": "unit_name" }, { "label": "单位类型", "value": "unit_type" },], tableField119_outboundUnitcolumnOptions: [{ "label": "单位名称", "value": "unit_name" }, { "label": "单位类型", "value": "unit_type" },],

@ -31,7 +31,9 @@
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="8" v-if="judgeShow('warehousingId')"> <el-col :span="8" v-if="judgeShow('warehousingId')">
<jnpf-form-tip-item label="关联单号" v-if="judgeShow('warehousingId')" prop="warehousingId"> <jnpf-form-tip-item label="关联单号"
v-if="judgeShow('warehousingId') && dataForm.warehousingStorageType==1 "
prop="warehousingId">
<JnpfPopupSelect v-model="dataForm.warehousingId" <JnpfPopupSelect v-model="dataForm.warehousingId"
@change="changeData('warehousingId', -1)" :rowIndex="null" :formData="dataForm" @change="changeData('warehousingId', -1)" :rowIndex="null" :formData="dataForm"
:templateJson="interfaceRes.warehousingId" placeholder="请选择" :templateJson="interfaceRes.warehousingId" placeholder="请选择"
@ -41,6 +43,76 @@
:columnOptions="warehousingIdcolumnOptions" clearable :style='{ "width": "100%" }'> :columnOptions="warehousingIdcolumnOptions" clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect> </JnpfPopupSelect>
</jnpf-form-tip-item> </jnpf-form-tip-item>
<jnpf-form-tip-item label="关联单据"
v-if="judgeShow('warehousingId') && dataForm.warehousingStorageType==3"
prop="warehousingId">
<JnpfPopupSelect v-model="dataForm.warehousingId"
@change="changeData('warehousingId', -1)" :rowIndex="null" :formData="dataForm"
:templateJson="interfaceRes.warehousingId" placeholder="请选择"
:disabled="judgeWrite('warehousingId')" hasPage propsValue="id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField='receipt_code'
field='warehousingId' interfaceId="550678389309073093" :pageSize="20"
:columnOptions="warehousingIdcolumnOptions" clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
</jnpf-form-tip-item>
<!-- 盘点单 -->
<jnpf-form-tip-item label="关联盘点单"
v-if="judgeShow('warehousingId') && dataForm.warehousingStorageType==4"
prop="warehousingId">
<JnpfPopupSelect v-model="dataForm.warehousingId"
@change="changeData('warehousingId', -1)" :rowIndex="null" :formData="dataForm"
:templateJson="interfaceRes.warehousingId" placeholder="请选择"
:disabled="judgeWrite('warehousingId')" propsValue="id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField='document_no'
field='warehousingId' interfaceId="550680155190748869" :pageSize="20"
:columnOptions="warehousingIdcolumnOptions" clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
</jnpf-form-tip-item>
<!-- 返库单 -->
<jnpf-form-tip-item label="关联返库单"
v-if="judgeShow('warehousingId') && dataForm.warehousingStorageType==7"
prop="warehousingId">
<JnpfPopupSelect v-model="dataForm.warehousingId"
@change="changeData('warehousingId', -1)" :rowIndex="null" :formData="dataForm"
:templateJson="interfaceRes.warehousingId" placeholder="请选择"
:disabled="judgeWrite('warehousingId')" propsValue="id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField='return_code'
field='warehousingId' interfaceId="550694157258090181" :pageSize="20"
:columnOptions="warehousingIdcolumnOptions" clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
</jnpf-form-tip-item>
<!-- 加工单 -->
<jnpf-form-tip-item label="关联加工单"
v-if="judgeShow('warehousingId') && dataForm.warehousingStorageType==9"
prop="warehousingId">
<JnpfPopupSelect v-model="dataForm.warehousingId"
@change="changeData('warehousingId', -1)" :rowIndex="null" :formData="dataForm"
:templateJson="interfaceRes.warehousingId" placeholder="请选择"
:disabled="judgeWrite('warehousingId')" propsValue="id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField='code' field='warehousingId'
interfaceId="550695385308358341" :pageSize="20"
:columnOptions="warehousingIdcolumnOptions" clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
</jnpf-form-tip-item>
<!-- 采购收货单 -->
<jnpf-form-tip-item label="关联采购收货单"
v-if="judgeShow('warehousingId') && dataForm.warehousingStorageType==15"
prop="warehousingId">
<JnpfPopupSelect v-model="dataForm.warehousingId"
@change="changeData('warehousingId', -1)" :rowIndex="null" :formData="dataForm"
:templateJson="interfaceRes.warehousingId" placeholder="请选择"
:disabled="judgeWrite('warehousingId')" propsValue="id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField='receipt_code'
field='warehousingId' interfaceId="550696600431781573" :pageSize="20"
:columnOptions="warehousingIdcolumnOptions" clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
</jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="8" v-if="judgeShow('warehouseId')"> <el-col :span="8" v-if="judgeShow('warehouseId')">
<jnpf-form-tip-item label="入库仓库" v-if="judgeShow('warehouseId')" prop="warehouseId"> <jnpf-form-tip-item label="入库仓库" v-if="judgeShow('warehouseId')" prop="warehouseId">
@ -411,7 +483,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="入库数量" <!-- <el-table-column label="入库数量"
v-if="judgeShow('warehousingstorageproduct-storageNumber')" prop="storageNumber" v-if="judgeShow('warehousingstorageproduct-storageNumber')" prop="storageNumber"
width="200" align="center"> width="200" align="center">
@ -428,6 +500,21 @@
clearable :style='{ "width": "100%" }'> clearable :style='{ "width": "100%" }'>
</JnpfInput> </JnpfInput>
</template> </template>
</el-table-column> -->
<el-table-column label="入库数量"
v-if="judgeShow('warehousingstorageproduct-storageNumber')" prop="storageNumber"
width="200" align="center">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('warehousingstorageproductList-storageNumber')">*</span>入库数量
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.storageNumber"
@change="changeData('warehousingstorageproduct-storageNumber', scope.$index)"
placeholder="请输入" disabled clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column> </el-table-column>
<el-table-column label="已入库数量" <el-table-column label="已入库数量"
@ -485,14 +572,14 @@
</JnpfDatePicker> </JnpfDatePicker>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="50" align="center" fixed="right" <!-- <el-table-column label="操作" width="50" align="center" fixed="right"
v-if="!judgeWrite('warehousingstorageproductList')"> v-if="!judgeWrite('warehousingstorageproductList')">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn" <el-button size="mini" type="text" class="JNPF-table-delBtn"
@click="delwarehousingstorageproductList(scope.$index)">删除</el-button> @click="delwarehousingstorageproductList(scope.$index)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column> -->
</el-table> </el-table>
<!-- <div class="table-actions" @click="addwarehousingstorageproductList()" <!-- <div class="table-actions" @click="addwarehousingstorageproductList()"
v-if="!judgeWrite('warehousingstorageproductList')"> v-if="!judgeWrite('warehousingstorageproductList')">
@ -581,7 +668,7 @@ export default {
currVmodel: "", currVmodel: "",
dataForm: { dataForm: {
documentNo: undefined, documentNo: undefined,
warehousingStorageType: "3", warehousingStorageType: "1",
warehousingId: undefined, warehousingId: undefined,
warehouseId: undefined, warehouseId: undefined,
warehousingTime: undefined, warehousingTime: undefined,
@ -626,8 +713,10 @@ export default {
}, },
], ],
}, },
warehousingStorageTypeOptions: [{ "fullName": "采购入库", "id": "1" }, { "fullName": "调拨入库", "id": "2" }, { "fullName": "退货入库", "id": "3" }, { "fullName": "盘盈入库", "id": "4" }, { "fullName": "其他入库", "id": "5" }, { "fullName": "差异调整入库", "id": "6" }, { "fullName": "领用返库入库", "id": "7" }, { "fullName": "货权转移入库", "id": "8" }, { "fullName": "加工入库", "id": "9" }, { "fullName": "其他出库", "id": "10" }, { "fullName": "库存初始化", "id": "11" }, { "fullName": "调拨出库撤回", "id": "12" }, { "fullName": "其他出库撤回", "id": "13" }], warehousingStorageTypeProps: { "label": "fullName", "value": "id" }, warehousingStorageTypeOptions: [{ "fullName": "采购入库", "id": "1" }, { "fullName": "调拨入库", "id": "2" }, { "fullName": "退货入库", "id": "3" }, { "fullName": "盘盈入库", "id": "4" }, { "fullName": "其他入库", "id": "5" }, { "fullName": "差异调整入库", "id": "6" }, { "fullName": "领用返库入库", "id": "7" }, { "fullName": "货权转移入库", "id": "8" }, { "fullName": "加工入库", "id": "9" }, { "fullName": "其他出库", "id": "10" }, { "fullName": "库存初始化", "id": "11" }, { "fullName": "调拨出库撤回", "id": "12" }, { "fullName": "其他出库撤回", "id": "13" }],
warehousingStorageTypeProps: { "label": "fullName", "value": "id" },
warehousingIdcolumnOptions: [{ "label": "通知编号", "value": "warehousing_code" }, { "label": "供应商名称", "value": "subjectName" }, { "label": "仓库名称", "value": "businessName" },], warehousingIdcolumnOptions: [{ "label": "通知编号", "value": "warehousing_code" }, { "label": "供应商名称", "value": "subjectName" }, { "label": "仓库名称", "value": "businessName" },],
warehousingIdcolumnOptions4: [{ "label": "通知编号", "value": "documentNo" }, { "label": "供应商名称", "value": "document_no" }, { "label": "仓库名称", "value": "businessName" },],
warehouseIdcolumnOptions: [{ "label": "仓库编号", "value": "code" }, { "label": "仓库名称", "value": "name" }, { "label": "仓库简称", "value": "simple_name" },], warehouseIdcolumnOptions: [{ "label": "仓库编号", "value": "code" }, { "label": "仓库名称", "value": "name" }, { "label": "仓库简称", "value": "simple_name" },],
warehousingstoragepoundlistvoucherIdcolumnOptions: [{ "label": "凭证编号", "value": "voucher_code" }, { "label": "凭证类型", "value": "documentTypes" }], warehousingstoragepoundlistvoucherIdcolumnOptions: [{ "label": "凭证编号", "value": "voucher_code" }, { "label": "凭证类型", "value": "documentTypes" }],
warehousingstorageproductproductIdcolumnOptions: [{ "label": "商品名称", "value": "name" }, { "label": "商品编码", "value": "code" }, { "label": "商品规格", "value": "spec" },], warehousingstorageproductproductIdcolumnOptions: [{ "label": "商品名称", "value": "name" }, { "label": "商品编码", "value": "code" }, { "label": "商品规格", "value": "spec" },],
@ -638,7 +727,8 @@ export default {
interfaceRes: { interfaceRes: {
documentNo: [], documentNo: [],
warehousingStorageType: [], warehousingStorageType: [],
warehousingId: [], warehousingId: [{ "dataType": "varchar", "defaultValue": "", "field": "warehousingId", "fieldName": "", "id": "Kz7qu32", "jnpfKey": "billRule", "relationField": "warehousingId", "required": "0" }],
// warehousingId: [{ "dataType": "varchar", "defaultValue": "", "field": "warehousingId", "fieldName": "", "id": "odxww22", "jnpfKey": "popupSelect", "relationField": "warehousingId", "required": "0" }],
warehouseId: [], warehouseId: [],
warehousingTime: [], warehousingTime: [],
remark: [], remark: [],
@ -729,20 +819,15 @@ export default {
choice(val) { choice(val) {
if (this.dataForm.warehousingStoragePoundlistList.length >= this.dataForm.warehousingStorageProductList.length) { this.notificationVoucherVisible = true
this.$alert('凭证条数不能大于商品条数', { let excludeIdList = [];
confirmButtonText: '确定', for (let i = 0; i < this.dataForm.warehousingStoragePoundlistList.length; i++) {
}); excludeIdList.push(this.dataForm.warehousingStoragePoundlistList[i].voucherId);
} else {
this.notificationVoucherVisible = true
let excludeIdList = [];
for (let i = 0; i < this.dataForm.warehousingStoragePoundlistList.length; i++) {
excludeIdList.push(this.dataForm.warehousingStoragePoundlistList[i].voucherId);
}
this.$nextTick(() => {
this.$refs.NotificationVoucherGoodsBox.init(excludeIdList, val)
})
} }
this.$nextTick(() => {
this.$refs.NotificationVoucherGoodsBox.init(excludeIdList, val)
})
}, },
initList(list) { initList(list) {
for (let i = 0; i < list.length; i++) { for (let i = 0; i < list.length; i++) {
@ -862,12 +947,16 @@ export default {
} }
if (!this.warehousingstoragepoundlistExist()) return if (!this.warehousingstoragepoundlistExist()) return
if (!this.warehousingstorageproductExist()) return if (!this.warehousingstorageproductExist()) return
if (!this.warehousingstorageproductExist1()) return
return isOk return isOk
}, },
warehousingstoragepoundlistExist() { warehousingstoragepoundlistExist() {
let isOk = true; let isOk = true;
for (let i = 0; i < this.dataForm.warehousingStoragePoundlistList.length; i++) { for (let i = 0; i < this.dataForm.warehousingStoragePoundlistList.length; i++) {
const e = this.dataForm.warehousingStoragePoundlistList[i]; const e = this.dataForm.warehousingStoragePoundlistList[i];//
if (!e.voucherId) { if (!e.voucherId) {
this.$message({ this.$message({
message: '关联凭证id不能为空', message: '关联凭证id不能为空',
@ -880,6 +969,34 @@ export default {
} }
return isOk; return isOk;
}, },
warehousingstorageproductExist1() {
let isOk = true;
var data = JSON.parse(JSON.stringify(this.dataForm.warehousingStoragePoundlistList))
var echararr = [];
for (var i = 0; i < data.length; i++) {
var arrindex = echararr.findIndex((item) => { return item.productId == data[i].productId && item.unit == data[i].unit })
if (arrindex == -1) {
echararr.push(data[i]);
} else {
echararr[arrindex].netWeight = this.jnpf.floatAdd(echararr[arrindex].netWeight, data[i].netWeight)
}
}
echararr.forEach(item => {
debugger
const flag = this.dataForm.warehousingStorageProductList.find(e => e.productId == item.productId && e.storageUnit == item.unit && e.storageNumber == item.netWeight)
if (!flag) {
this.$message({
message: '凭证与商品不一致',
type: 'error',
duration: 1000
});
isOk = false
return isOk
}
})
return isOk
},
warehousingstorageproductExist() { warehousingstorageproductExist() {
let isOk = true; let isOk = true;
for (let i = 0; i < this.dataForm.warehousingStorageProductList.length; i++) { for (let i = 0; i < this.dataForm.warehousingStorageProductList.length; i++) {

@ -259,46 +259,7 @@ export default {
flowListVisible: false, flowListVisible: false,
flowList: [], flowList: [],
exportBoxVisible: false, exportBoxVisible: false,
warehousingStorageTypeOptions: [{ warehousingStorageTypeOptions: [{ "fullName": "采购入库", "id": "1" }, { "fullName": "调拨入库", "id": "2" }, { "fullName": "退货入库", "id": "3" }, { "fullName": "盘盈入库", "id": "4" }, { "fullName": "其他入库", "id": "5" }, { "fullName": "差异调整入库", "id": "6" }, { "fullName": "领用返库入库", "id": "7" }, { "fullName": "货权转移入库", "id": "8" }, { "fullName": "加工入库", "id": "9" }, { "fullName": "其他出库", "id": "10" }, { "fullName": "库存初始化", "id": "11" }, { "fullName": "调拨出库撤回", "id": "12" }, { "fullName": "其他出库撤回", "id": "13" }],
"fullName": "全部",
"id": "1"
}, {
"fullName": "盘盈入库",
"id": "2"
}, {
"fullName": "采购入库",
"id": "3"
}, {
"fullName": "调拨入库",
"id": "4"
}, {
"fullName": "退货入库",
"id": "5"
}, {
"fullName": "其他入库",
"id": "6"
}, {
"fullName": "差异调整入库",
"id": "7"
}, {
"fullName": "领用返库",
"id": "8"
}, {
"fullName": "货权转移入库",
"id": "9"
}, {
"fullName": "其他出库",
"id": "10"
}, {
"fullName": "库存初始化",
"id": "11"
}, {
"fullName": "调拨出库撤回",
"id": "12"
}, {
"fullName": "其他出库撤回",
"id": "13"
}],
warehousingStorageTypeProps: { warehousingStorageTypeProps: {
"label": "fullName", "label": "fullName",
"value": "id" "value": "id"

@ -47,15 +47,15 @@
<el-table-column prop="warehousingCode" label="通知编号" align="center" sortable width="200" <el-table-column prop="warehousingCode" label="通知编号" align="center" sortable width="200"
fixed="left"> fixed="left">
</el-table-column> </el-table-column>
<el-table-column prop="businessId" label="销售订单" align="center" width="150"> <el-table-column prop="businessCode" label="关联单据号" align="center" width="150">
</el-table-column> </el-table-column>
<el-table-column prop="subjectBasicId" label="客户名称" align="center" width="150"> <el-table-column prop="subjectBasicName" label="客户名称" align="center" width="150">
</el-table-column> </el-table-column>
<el-table-column prop="shippingAddress" label="收货地址" align="center" width="150"> <el-table-column prop="shippingAddress" label="收货地址" align="center" width="150">
</el-table-column> </el-table-column>
<el-table-column prop="enterpriseId" label="机构名称" align="center" width="150"> <el-table-column prop="enterpriseName" label="机构名称" align="center" width="150">
</el-table-column> </el-table-column>
<el-table-column prop="warehouseId" label="发货仓库" align="center" width="150"> <el-table-column prop="warehouseName" label="发货仓库" align="center" width="150">
</el-table-column> </el-table-column>
<el-table-column prop="deliveryAddress" label="发货地址" align="center" width="150"> <el-table-column prop="deliveryAddress" label="发货地址" align="center" width="150">
</el-table-column> </el-table-column>
@ -69,8 +69,7 @@
<el-table-column prop="remainingStockableQuantity" label="待确认出库数量" align="center" <el-table-column prop="remainingStockableQuantity" label="待确认出库数量" align="center"
width="150"> width="150">
</el-table-column> </el-table-column>
<el-table-column prop="warehouseId" label="期望送达时间" align="center" width="150">
</el-table-column>
<el-table-column prop="deliveryType" label="配送方式" align="center" width="150"> <el-table-column prop="deliveryType" label="配送方式" align="center" width="150">
</el-table-column> </el-table-column>
<el-table-column prop="transactionMode" label="交货方式" align="center" width="150"> <el-table-column prop="transactionMode" label="交货方式" align="center" width="150">
@ -82,13 +81,20 @@
<el-table-column prop="carrier" label="承运商" align="center" width="150"> <el-table-column prop="carrier" label="承运商" align="center" width="150">
</el-table-column> </el-table-column>
<el-table-column prop="creatorTime" label="创建时间" align="center" width="150"> <el-table-column prop="creatorTime" label="创建时间" align="center" width="140">
<template slot-scope="scope">
{{ scope.row.creatorTime | toDate("yyyy-MM-dd") }}
</template>
</el-table-column> </el-table-column>
<el-table-column prop="creatorUserId" label="创建用户" align="center" width="150">
<el-table-column prop="creatorUserName" label="创建用户" align="center" width="150">
</el-table-column> </el-table-column>
<el-table-column prop="lastModifyTime" label="修改时间" align="center" width="150"> <el-table-column prop="lastModifyTime" label="修改时间" align="center" width="150">
<template slot-scope="scope">
{{ scope.row.lastModifyTime | toDate("yyyy-MM-dd") }}
</template>
</el-table-column> </el-table-column>
<el-table-column prop="lastModifyUserId" label="修改用户" align="center" width="150"> <el-table-column prop="lastUserName" label="修改用户" align="center" width="150">
</el-table-column> </el-table-column>
<el-table-column prop="flowState" label="状态" align="center" width="150"> <el-table-column prop="flowState" label="状态" align="center" width="150">

@ -273,6 +273,19 @@
</JnpfInput> </JnpfInput>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="理论发料量(计算后)" prop="itemsnum">
<template slot="header" v-if="false">
<span class="required-sign">*</span>理论发料量(计算后)
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.itemsnum" disabled @change="
changeData('workorderprimary-itemsnum', scope.$index)
" placeholder="请输入" clearable :style="{ width: '100%' }">
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="实际发料量" prop="realityNum"> <el-table-column label="实际发料量" prop="realityNum">
<template slot="header" v-if="false"> <template slot="header" v-if="false">
<span class="required-sign">*</span>实际发料量 <span class="required-sign">*</span>实际发料量

Loading…
Cancel
Save