diff --git a/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/BusinessOrderMapper.xml b/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/BusinessOrderMapper.xml
index 3ca69460..6c1e37b2 100644
--- a/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/BusinessOrderMapper.xml
+++ b/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/BusinessOrderMapper.xml
@@ -660,7 +660,8 @@
FROM
`jg_voucher_product` a
LEFT JOIN jg_product b ON a.product_id = b.id AND b.f_delete_mark IS NULL
- WHERE a.voucher_id in
+ WHERE a._delete_mark is null
+ AND a.voucher_id in
#{id}
diff --git a/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/ReturnCargoOrderMapper.xml b/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/ReturnCargoOrderMapper.xml
index f80b8c50..d56e38b6 100644
--- a/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/ReturnCargoOrderMapper.xml
+++ b/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/ReturnCargoOrderMapper.xml
@@ -211,4 +211,12 @@
+
+
diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/mapper/ReturnCargoOrderMapper.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/mapper/ReturnCargoOrderMapper.java
index dd6001e5..87ffca3f 100644
--- a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/mapper/ReturnCargoOrderMapper.java
+++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/mapper/ReturnCargoOrderMapper.java
@@ -26,4 +26,6 @@ public interface ReturnCargoOrderMapper extends BaseMapper productWarehouseEntityList = businessOrderMapper.orderByVoucher(voucherIds);
productWarehouseEntityList = productWarehouseEntityList.stream().collect(Collectors.toMap(s-> s.getId()+";"+s.getUnit(),a->a,(o1,o2) -> {
o1.setNetWeight(o1.getNetWeight().add(o2.getNetWeight()));
+ o1.setGrossWeight(o1.getGrossWeight().add(o2.getGrossWeight()));
+ o1.setTareWeight(o1.getTareWeight().add(o2.getTareWeight()));
+ o1.setBuckleWeight(o1.getBuckleWeight().add(o2.getBuckleWeight()));
return o1;
})).values().stream().collect(Collectors.toList());
return productWarehouseEntityList;
diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/ReturnCargoOrderServiceImpl.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/ReturnCargoOrderServiceImpl.java
index 939cfe71..5fb3c9cb 100644
--- a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/ReturnCargoOrderServiceImpl.java
+++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/ReturnCargoOrderServiceImpl.java
@@ -516,4 +516,9 @@ public class ReturnCargoOrderServiceImpl extends ServiceImpl flowTaskNodeEntityQueryWrapper = new QueryWrapper<>();
+ flowTaskNodeEntityQueryWrapper.lambda().eq(FlowTaskNodeEntity::getNodeCode, flowTaskEntity.getThisStepId());
+ flowTaskNodeEntityQueryWrapper.lambda().eq(FlowTaskNodeEntity::getTaskId, flowTaskEntity.getId());
+ List flowTaskNodeEntityList = flowTaskNodeService.list(flowTaskNodeEntityQueryWrapper);
+ if(flowTaskNodeEntityList != null && flowTaskNodeEntityList.size()>0 && "end".equals(flowTaskNodeEntityList.get(0).getNodeNext())) {
+ entity.setDocumentStatus("3");
+ returnCargoOrderService.saveOrUpdate(entity);
+ }
+ }
}catch(Exception e){
return ActionResult.fail("修改数据失败");
}
@@ -599,6 +620,8 @@ public class ReturnCargoOrderController {
entity.setCarrier(businessOrderEntity.getCarrier());
entity.setBusinessLineId(businessOrderEntity.getBusinessLineId());
}
+ List settlementInfoList = businessOrderService.getSettlementInfoList(entity.getBusinessId());
+ entity.setSettlementInfoList(settlementInfoList);
}
//副表数据
//子表数据
@@ -686,5 +709,66 @@ public class ReturnCargoOrderController {
return ActionResult.success(list);
}
+ /**
+ * 采购退货出库通知订单列表
+ *
+ * @return
+ */
+ @Operation(summary = "采购退货出库通知订单列表")
+ @GetMapping("/inBoundPurchaseOrderList")
+ public ActionResult outBoundPurchaseOrderList(@RequestParam("id") String id)throws IOException{
+ ReturnCargoOrderEntity returnCargoOrderEntity = returnCargoOrderService.queryReturnOrderByIdInfo(id);
+ List settlementInfoEntityList = businessOrderService.getSettlementInfoList(returnCargoOrderEntity.getBusinessId());
+ returnCargoOrderEntity.setSettlementInfoList(settlementInfoEntityList);
+
+ BusinessOrderEntity businessOrderEntity = businessOrderService.getInfo(id);
+ //二级供应商名字
+ if (StringUtil.isNotEmpty(businessOrderEntity.getSecondSubjectBasicId())){
+ SubjectbasicEntity subjectbasicEntity = subjectbasicService.getInfo(businessOrderEntity.getSecondSubjectBasicId());
+ if (subjectbasicEntity != null) {
+ businessOrderEntity.setSecondSupplyName(subjectbasicEntity.getName());
+ }
+ }
+ //三级供应商名字
+ if (StringUtil.isNotEmpty(businessOrderEntity.getThirdSubjectBasicId())){
+ SubjectbasicEntity subjectbasicEntity = subjectbasicService.getInfo(businessOrderEntity.getThirdSubjectBasicId());
+ if (subjectbasicEntity != null) {
+ businessOrderEntity.setThirdSupplyName(subjectbasicEntity.getName());
+ }
+ }
+ //业务线名字
+ if (StringUtil.isNotEmpty(businessOrderEntity.getBusinessLineId())){
+ BusinessLineEntity businessLineEntity = businessLineService.getInfo(businessOrderEntity.getBusinessLineId());
+ if (businessLineEntity != null){
+ businessOrderEntity.setBusinessLineName(businessLineEntity.getName());
+ }
+ }
+ //结算信息
+ List settlementInfoList = businessOrderService.getSettlementInfoList(businessOrderEntity.getId());
+ //查询订单下面的商品
+ List businessOrderProductRelationalList = businessOrderService.getBusinessOrderProductRelationalList(businessOrderEntity.getId());
+ //查询已经生成的入库通知
+ List list = warehousingNotificationService.queryInBoundNoticeInfo(businessOrderEntity.getId(),"1");
+ if (list != null && list.size()>0) {
+ //对入库通知中相同的商品进行通知数量合并
+ List warehousingProductEntityList = list.stream().collect(Collectors.toMap(WarehousingProductEntity::getProductId, a -> a, (o1, o2) -> {
+ o1.setNotificationStorageNumber(o1.getNotificationStorageNumber().add(o2.getNotificationStorageNumber()));
+ return o1;
+ })).values().stream().collect(Collectors.toList());
+ for (int i = 0; i < businessOrderProductRelationalList.size(); i++) {
+ for (int j = 0; j < warehousingProductEntityList.size(); j++) {
+ if (businessOrderProductRelationalList.get(i).getProductId().equals(warehousingProductEntityList.get(j).getProductId())) {
+ BigDecimal num = businessOrderProductRelationalList.get(i).getBusinessNum().subtract(warehousingProductEntityList.get(j).getNotificationStorageNumber());
+ businessOrderProductRelationalList.get(i).setRemainingStockableQuantity(num);
+ businessOrderProductRelationalList.get(i).setNotificationStorageNumber(num);
+ }
+ }
+ }
+ }
+ businessOrderEntity.setSettlementInfoList(settlementInfoList);
+ businessOrderEntity.setBusinessOrderProductRelationalList(businessOrderProductRelationalList);
+ return ActionResult.success(returnCargoOrderEntity);
+ }
+
}
diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/entity/ReturnCargoOrderEntity.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/entity/ReturnCargoOrderEntity.java
index 11fd4e9a..9cd92fe3 100644
--- a/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/entity/ReturnCargoOrderEntity.java
+++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/entity/ReturnCargoOrderEntity.java
@@ -96,6 +96,8 @@ public class ReturnCargoOrderEntity {
@TableField(exist = false)
private List deliveryProductRelationEntityList;
@TableField(exist = false)
+ private List settlementInfoList;
+ @TableField(exist = false)
private Date expectArriveDateStart;
@TableField(exist = false)
private Date expectArriveDateEnd;
diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/model/returncargoorder/DeliveryVoucherRelationModel.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/model/returncargoorder/DeliveryVoucherRelationModel.java
index 8652c914..ac2a7d95 100644
--- a/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/model/returncargoorder/DeliveryVoucherRelationModel.java
+++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/model/returncargoorder/DeliveryVoucherRelationModel.java
@@ -37,8 +37,8 @@ public class DeliveryVoucherRelationModel {
private Long poundlistTime;
/** 车牌号 **/
- @JSONField(name = "vehicleName")
- private String vehicleName;
+ @JSONField(name = "vehicleId")
+ private String vehicleId;
/** 商品名称 **/
@JSONField(name = "productId")
private String productId;
diff --git a/jnpf-java-boot/jnpf-web/src/views/scm/purchaseCenter/purchaseOutBoundNotice/form.vue b/jnpf-java-boot/jnpf-web/src/views/scm/purchaseCenter/purchaseOutBoundNotice/form.vue
index 01e20482..cf2e8573 100644
--- a/jnpf-java-boot/jnpf-web/src/views/scm/purchaseCenter/purchaseOutBoundNotice/form.vue
+++ b/jnpf-java-boot/jnpf-web/src/views/scm/purchaseCenter/purchaseOutBoundNotice/form.vue
@@ -746,7 +746,7 @@ export default {
id: data.id
}
request({
- url: `/api/scm/BusinessOrder/inBoundPurchaseOrderList`,
+ url: `/api/scm/BusinessOrder/outBoundPurchaseOrderList`,
method: 'get',
data: id
}).then(res => {
diff --git a/jnpf-java-boot/jnpf-web/src/views/scm/purchaseCenter/returnCargoOrder/form.vue b/jnpf-java-boot/jnpf-web/src/views/scm/purchaseCenter/returnCargoOrder/form.vue
index e00edbe0..b2872e34 100644
--- a/jnpf-java-boot/jnpf-web/src/views/scm/purchaseCenter/returnCargoOrder/form.vue
+++ b/jnpf-java-boot/jnpf-web/src/views/scm/purchaseCenter/returnCargoOrder/form.vue
@@ -48,6 +48,7 @@
@@ -58,6 +59,7 @@
prop="expectArriveDateStart">
@@ -68,7 +70,8 @@
+ :disabled="judgeWrite('deliveryType')" :options="returnCargoWayOptions"
+ :props="returnCargoWayProps">
@@ -621,7 +624,7 @@
+ prop="productId" width="200">
*商品名称
@@ -710,14 +713,20 @@
v-if="judgeRequired('deliveryproductrelationList-deliveryUnit')">*退货单位
-
-
+ -->
+
+
*退货单价
-
@@ -1271,6 +1279,14 @@ export default {
this.initPurchaseData();
},
methods: {
+ //根据输入退货单价计算总价和不含税单价、不含税总价
+ priceCount(row) {
+ if (row.deliveryNum) {
+ row.taxCount = this.jnpf.floatMul(row.deliveryNum, row.returnUnit).toFixed(2) //采购含税总价
+ row.notTaxPrice = this.jnpf.floatDiv(row.returnUnit, this.jnpf.floatAdd(1, this.jnpf.floatDiv(row.tax, 100))).toFixed(6) //采购不含税单价
+ row.notTaxCount = this.jnpf.floatMul(row.deliveryNum, row.notTaxPrice).toFixed(2) //采购不含税总价
+ }
+ },
//选择商品弹窗
choiceProduct() {
this.BomgoodsBoxVisible = true
@@ -1350,24 +1366,16 @@ export default {
this.dataForm.deliveryVoucherRelationList.push(item)
let productEntity = {}
e.warehousingStorageProductEntityList.forEach(item => {
- debugger
- if (item.orderMainUnitIds) {
- var unitName = JSON.parse(item.orderMainUnitIds);
- var optArray = [];
- for (let i = 0; i < unitName.length; i++) {
- item.deliveryUnit = unitName[0];
- var opt = {};
- opt.fullName = unitName[i];
- opt.id = unitName[i];
- optArray.push(opt);
- }
- item.deliveryproductrelationdeliveryUnitOptions = optArray;
- }
- const obj = this.productByOrderList.find(e => e.productId == item.id) || {}
+ const obj = this.productByOrderList.find(e => e.productId == item.productId) || {}
item.salesMainUnitId = obj.salesMainUnitId
item.saleNum = obj.businessNum
- item.receivedQuantity = obj.receivedQuantity
- item.inventoryUnitId = item.inventoryUnitIds
+ item.tax = obj.tax
+ item.receivedQuantity = item.netWeight
+ item.deliveryNum = item.netWeight
+ item.cargoId = item.storageAreaId
+ item.batchNo = item.batchNumber
+ item.produceTime = item.dateManufacture
+ item.deliveryUnit = item.storageUnit
item.businessType = "2"
productEntity = item
})
@@ -1408,10 +1416,6 @@ export default {
this.dataForm.reservedFields1 = val2.businessLineId
val2.businessOrderProductRelationalList.forEach((item, index) => {
this.productIdList.push(item.productId)
- // item.productName = item.name
- // item.purchaseUnitId = item.salesMainUnitId
- // item.purchaseNum = item.businessNum
- // item.businessType = "2"
})
this.productByOrderList = val2.businessOrderProductRelationalList
},