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 14120955..8d3bb9bc 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
@@ -254,7 +254,7 @@
LEFT JOIN flow_task g ON a.id = g.f_process_id and g.f_delete_mark is null
WHERE
a.contract_type = '2'
- AND a.business_id = #{businessLineId}
+ AND (a.business_id = #{businessLineId} or a.business_id = '')
AND DATE_FORMAT( a.contract_period_time, '%Y-%m-%d' ) <= DATE_FORMAT( NOW( ), '%Y-%m-%d' )
AND DATE_FORMAT( a.contract_period_time_end, '%Y-%m-%d' ) >= DATE_FORMAT( NOW( ), '%Y-%m-%d' )
AND a.f_delete_mark IS NULL
diff --git a/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/VoucherMapper.xml b/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/VoucherMapper.xml
index 912a4f22..d2b08ea9 100644
--- a/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/VoucherMapper.xml
+++ b/jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/VoucherMapper.xml
@@ -70,6 +70,7 @@
+
@@ -154,13 +155,13 @@
c.remark,
d.vehicle_number,
a.purchase_contract_no as purchaseContractNo,
- f.name as productName
+ f.name as productName,
+ c.clear_weight
FROM
jg_voucher a
LEFT JOIN jg_voucher_vehicle b ON b.voucher_id = a.id AND b.f_delete_mark IS NULL
LEFT JOIN jg_voucher_product c ON c.voucher_id = a.id AND c.f_delete_mark IS NULL
LEFT JOIN jg_vehicle d ON a.vehicle_id = d.id AND d.f_delete_mark IS NULL
- LEFT JOIN flow_task e ON a.id = e.f_process_id
LEFT JOIN jg_product f ON c.product_id = f.id AND f.f_delete_mark IS NULL
${ew.customSqlSegment}
AND a.id not in(select voucher_id from jg_warehousing_storage_poundlist where business_type = #{businessType} and document_type = #{documentType} and f_delete_mark is null)
@@ -201,7 +202,6 @@
LEFT JOIN jg_voucher_vehicle b ON b.voucher_id = a.id AND b.f_delete_mark IS NULL
LEFT JOIN jg_voucher_product c ON c.voucher_id = a.id AND c.f_delete_mark IS NULL
LEFT JOIN jg_vehicle d ON a.vehicle_id = d.id AND d.f_delete_mark IS NULL
- LEFT JOIN flow_task e ON a.id = e.f_process_id
${ew.customSqlSegment}
AND a.id in (select voucher_id from jg_warehousing_storage_poundlist where business_type = #{businessType} and document_type = #{documentType} and f_delete_mark is null)
@@ -235,13 +235,13 @@
c.net_weight,
c.remark,
d.vehicle_number,
- f.name as productName
+ f.name as productName,
+ c.clear_weight
FROM
jg_voucher a
LEFT JOIN jg_voucher_vehicle b ON b.voucher_id = a.id AND b.f_delete_mark IS NULL
LEFT JOIN jg_voucher_product c ON c.voucher_id = a.id AND c.f_delete_mark IS NULL
LEFT JOIN jg_vehicle d ON a.vehicle_id = d.id AND d.f_delete_mark IS NULL
- LEFT JOIN flow_task e ON a.id = e.f_process_id
LEFT JOIN jg_product f ON c.product_id = f.id AND f.f_delete_mark IS NULL
${ew.customSqlSegment}
AND a.id not in(select voucher_id from jg_warehousing_outbound_poundlist where business_type = #{businessType} and document_type = #{documentType} and f_delete_mark is null)
@@ -302,7 +302,6 @@
jg_voucher a
LEFT JOIN jg_voucher_vehicle b ON b.voucher_id = a.id AND b.f_delete_mark IS NULL
LEFT JOIN jg_voucher_product c ON c.voucher_id = a.id AND c.f_delete_mark IS NULL
- LEFT JOIN flow_task e ON a.id = e.f_process_id
WHERE
a.business_type = '2'
AND a.document_type = '1'
@@ -326,7 +325,6 @@
jg_voucher a
LEFT JOIN jg_voucher_vehicle b ON b.voucher_id = a.id AND b.f_delete_mark IS NULL
LEFT JOIN jg_voucher_product c ON c.voucher_id = a.id AND c.f_delete_mark IS NULL
- LEFT JOIN flow_task e ON a.id = e.f_process_id
WHERE
a.business_type = '1'
AND a.document_type = '1'
@@ -349,7 +347,6 @@
jg_voucher a
LEFT JOIN jg_voucher_vehicle b ON b.voucher_id = a.id AND b.f_delete_mark IS NULL
LEFT JOIN jg_voucher_product c ON c.voucher_id = a.id AND c.f_delete_mark IS NULL
- LEFT JOIN flow_task e ON a.id = e.f_process_id
WHERE
a.business_type = '1'
AND a.document_type = '2'
@@ -573,7 +570,6 @@
b.vehicle_number
from jg_voucher a
left join jg_vehicle b on a.vehicle_id = b.id and b.f_delete_mark is null
- LEFT JOIN flow_task e ON a.id = e.f_process_id
where a.id = #{id}
@@ -610,7 +606,10 @@
c.telephone as telephone,
c.carrier as vehicleCarrier,
a.sale_contract_no as saleContractNo,
- a.sale_amount as saleAmount
+ a.sale_amount as saleAmount,
+ a.purchase_contract_no as purchaseContractNo,
+ a.purchase_amount as purchaseAmount,
+ b.clear_weight as clearWeight
FROM
jg_voucher a
LEFT JOIN jg_voucher_product b ON a.id = b.voucher_id AND b.f_delete_mark IS NULL
@@ -637,4 +636,29 @@
LEFT JOIN jg_product d ON a.product_id = d.id and d.f_delete_mark is null
${ew.customSqlSegment}
+
+
+
+
diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/mapper/VoucherMapper.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/mapper/VoucherMapper.java
index c10354a0..6c04ee0a 100644
--- a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/mapper/VoucherMapper.java
+++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/mapper/VoucherMapper.java
@@ -13,6 +13,7 @@ import jnpf.model.voucher.VoucherBatchProductModel;
import jnpf.model.voucher.VoucherPagination;
import org.apache.ibatis.annotations.Param;
+import java.math.BigDecimal;
import java.util.List;
/**
@@ -39,9 +40,11 @@ public interface VoucherMapper extends BaseMapper {
IPage queryVoucherList(@Param("page") Page page, @Param("voucherPagination")VoucherPagination voucherPagination, @Param("ew")QueryWrapper voucherEntityQueryWrapper);
IPage queryVoucherPopup1(@Param("page") Page page,@Param("ew") QueryWrapper voucherEntityQueryWrapper);
- VoucherEntity queryVoucherInfo(String id);
+ VoucherEntity queryVoucherInfo(@Param("id") String id);
//采购收货凭证批量转换为销售发货凭证
List voucherBatchChange(@Param("id") String id);
List returnVoucher(@Param("ew")QueryWrapper voucherEntityQueryWrapper);
List salereturnVoucher(@Param("ew")QueryWrapper voucherEntityQueryWrapper);
+ BigDecimal queryVoucherProductNetWeight(@Param("id") String id);
+ VoucherEntity queryVoucherDetail(@Param("id") String id);
}
diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/VoucherService.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/VoucherService.java
index 4eca9b08..f6d9cc9f 100644
--- a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/VoucherService.java
+++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/VoucherService.java
@@ -2,6 +2,8 @@ package jnpf.service;
import jnpf.model.voucher.*;
import jnpf.entity.*;
+
+import java.math.BigDecimal;
import java.util.*;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -72,4 +74,6 @@ public interface VoucherService extends IService {
List voucherBatchChangeInfo(String id);
List returnVoucherInfo(String id,VoucherPagination voucherPagination);
List salereturnVoucherInfo(String id,VoucherPagination voucherPagination);
+ VoucherEntity queryVoucherDetailInfo(String id);
+ BigDecimal queryVoucherProductNetWeightInfo(String id);
}
diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/BusinessOrderServiceImpl.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/BusinessOrderServiceImpl.java
index c95114af..fd48734e 100644
--- a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/BusinessOrderServiceImpl.java
+++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/BusinessOrderServiceImpl.java
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.taobao.api.internal.toplink.Pool;
import jnpf.config.ConfigValueUtil;
+import jnpf.engine.entity.FlowTaskEntity;
import jnpf.entity.*;
import jnpf.mapper.BusinessOrderMapper;
import jnpf.mapper.BusinessOrderProductRelationalMapper;
@@ -1122,6 +1123,25 @@ public class BusinessOrderServiceImpl extends ServiceImpl queryWrapper = new QueryWrapper<>();
+ queryWrapper.lambda().eq(VoucherEntity::getBusinessOrderId,entity.getId());
+ queryWrapper.lambda().isNull(VoucherEntity::getDeleteMark);
+ List voucherEntityList = voucherMapper.selectList(queryWrapper);
+ for (VoucherEntity voucherEntity : voucherEntityList){
+ ContractLEntity contractInfo = contractLService.getInfo(entity.getContractId());
+ if (ObjectUtil.isNotEmpty(contractInfo)) {
+ if (voucherEntity.getBusinessType().equals("1")) {
+ voucherEntity.setPurchaseContractNo(contractInfo.getContractNumber());
+ }else{
+ voucherEntity.setSaleContractNo(contractInfo.getContractNumber());
+ }
+ }
+ }
+ }
// if (entity.getBusinessType().equals("1")) {
// YunguanPurchaseOrderModel purchaseOrder = businessOrderMapper.queryPurchaseOrderByYunGuan(id);
// if (ObjectUtil.isNotEmpty(purchaseOrder)) {
diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/ReceiptOrderServiceImpl.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/ReceiptOrderServiceImpl.java
index ac6de078..7e46be6f 100644
--- a/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/ReceiptOrderServiceImpl.java
+++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-biz/src/main/java/jnpf/service/impl/ReceiptOrderServiceImpl.java
@@ -1,6 +1,7 @@
package jnpf.service.impl;
import jnpf.entity.*;
+import jnpf.mapper.ProductWarehouseMapper;
import jnpf.mapper.ReceiptOrderMapper;
import jnpf.mapper.VoucherMapper;
import jnpf.service.*;
@@ -59,6 +60,8 @@ public class ReceiptOrderServiceImpl extends ServiceImpl getList(ReceiptOrderPagination receiptOrderPagination){
return getTypeList(receiptOrderPagination,receiptOrderPagination.getDataType());
@@ -496,7 +499,12 @@ public class ReceiptOrderServiceImpl extends ServiceImpl queryWrapper = new QueryWrapper<>();
+ queryWrapper.lambda().eq(VoucherProductEntity::getVoucherId,voucherEntity.getId());
+ queryWrapper.lambda().isNull(VoucherProductEntity::getDeleteMark);
+ VoucherProductEntity voucherProductEntity = voucherProductService.getOne(queryWrapper);
+ if (ObjectUtil.isNotEmpty(voucherProductEntity)){
+ BigDecimal netWeightSum = voucherMapper.queryVoucherProductNetWeight(voucherEntity.getId());
+ netWeightSum = netWeightSum.add(entitys.getNetWeight());
+ if (netWeightSum.compareTo(voucherProductEntity.getNetWeight()) == 0){
+ voucherEntity.setIsSaleDeliveryVoucher("2");
+ voucherMapper.updateById(voucherEntity);
+ }
+ }
+ entity.setVoucherRelation(voucherEntity.getId()); //将销售发货凭证关联采购收货凭证id
+ this.saveOrUpdate(entity);
}
}
}
@@ -1221,4 +1234,14 @@ public class VoucherServiceImpl extends ServiceImpl voucherEntityList = voucherService.list(queryWrapper); //销售订单下所有销售发货凭证
for (VoucherEntity entity1 : voucherEntityList){
- QueryWrapper queryWrapper1 = new QueryWrapper<>();
- queryWrapper1.lambda().eq(VoucherEntity::getIsSaleDeliveryVoucher,"2");
- queryWrapper1.lambda().eq(VoucherEntity::getVoucherRelation,entity1.getId());
- queryWrapper1.lambda().isNull(VoucherEntity::getDeleteMark);
- VoucherEntity voucherEntity = voucherService.getOne(queryWrapper1); //销售发货凭证对应的采购收货凭证
+ VoucherEntity saleVoucher = voucherService.queryVoucherDetailInfo(entity1.getId()); //得到销售发货凭证的净重
+ VoucherEntity voucherEntity = voucherService.queryVoucherDetailInfo(entity1.getVoucherRelation()); //销售发货凭证对应的采购收货凭证
if (ObjectUtil.isNotEmpty(voucherEntity)){
- QueryWrapper queryWrapperVoucherProduct = new QueryWrapper<>();
- queryWrapperVoucherProduct.lambda().eq(VoucherProductEntity::getVoucherId,voucherEntity.getId());
- VoucherProductEntity voucherProductEntity = voucherProductService.getOne(queryWrapperVoucherProduct); //采购收货凭证下的商品信息
BusinessOrderEntity businessOrderEntity = businessOrderService.getInfo(voucherEntity.getBusinessOrderId()); //采购收货凭证对应的采购单
- if (ObjectUtil.isNotEmpty(businessOrderEntity) && ObjectUtil.isNotEmpty(voucherProductEntity)){
+ if (ObjectUtil.isNotEmpty(businessOrderEntity)){
QueryWrapper queryWrapper2 = new QueryWrapper<>();
queryWrapper2.lambda().eq(BusinessOrderProductRelationalEntity::getBusinessOrderId,businessOrderEntity.getId());
- queryWrapper2.lambda().eq(BusinessOrderProductRelationalEntity::getProductId,voucherProductEntity.getProductId());
+ queryWrapper2.lambda().eq(BusinessOrderProductRelationalEntity::getProductId,voucherEntity.getProductId());
BusinessOrderProductRelationalEntity businessOrderProductRelationalEntity = businessOrderProductRelationalService.getOne(queryWrapper2); //通过凭证商品id和采购单id找出采购单下具体的商品信息
if (ObjectUtil.isNotEmpty(businessOrderProductRelationalEntity)){
- purchaseAmount = purchaseAmount.add(businessOrderProductRelationalEntity.getBusinessPrice().multiply(voucherProductEntity.getNetWeight()).setScale(2,BigDecimal.ROUND_HALF_UP)); //采购单价*凭证净重 = 采购金额
+ purchaseAmount = purchaseAmount.add(businessOrderProductRelationalEntity.getBusinessPrice().multiply(saleVoucher.getNetWeight()).setScale(2, RoundingMode.HALF_UP)); //采购单价*凭证净重 = 采购金额
}
}
}
@@ -740,6 +735,14 @@ public class BusinessOrderController {
List businessOrderProductRelationalList = businessOrderService.getBusinessOrderProductRelationalList(entity.getId());
businessOrderMap.put("businessOrderProductRelationalList",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(businessOrderProductRelationalList)));
businessOrderMap = generaterSwapUtil.swapDataForm(businessOrderMap,BusinessOrderConstant.getFormData(),BusinessOrderConstant.TABLEFIELDKEY,BusinessOrderConstant.TABLERENAMES);
+ //判断订单是否由凭证生成
+ QueryWrapper queryWrapper = new QueryWrapper<>();
+ queryWrapper.lambda().eq(VoucherEntity::getBusinessOrderId,entity.getId());
+ queryWrapper.lambda().isNull(VoucherEntity::getDeleteMark);
+ long num = voucherService.count(queryWrapper);
+ if (num > 0){
+ businessOrderMap.put("voucherCreate","1");
+ }
return ActionResult.success(businessOrderMap);
}
diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-controller/src/main/java/jnpf/controller/VoucherController.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-controller/src/main/java/jnpf/controller/VoucherController.java
index 665a0e4a..6ceddf0e 100644
--- a/jnpf-java-boot/jnpf-scm/jnpf-scm-controller/src/main/java/jnpf/controller/VoucherController.java
+++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-controller/src/main/java/jnpf/controller/VoucherController.java
@@ -44,6 +44,7 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import java.io.InputStream;
+import java.math.BigDecimal;
import java.net.URLEncoder;
import java.nio.charset.Charset;
import java.text.SimpleDateFormat;
@@ -168,7 +169,10 @@ public class VoucherController {
entity.setPlaceDispatch(placeDispatchs.stream().collect(Collectors.joining(",")));
entity.setDestination(destinations.stream().collect(Collectors.joining(",")));
Map voucherMap=JsonUtil.entityToMap(entity);
- voucherMap.put("id", voucherMap.get("id"));
+ voucherMap.put("id", voucherMap.get("id"));
+ //剩余可生成销售凭证数量
+ BigDecimal netWeightSum = voucherService.queryVoucherProductNetWeightInfo(entity.getId());
+ voucherMap.put("remainder",entity.getNetWeight().subtract(netWeightSum));
//副表数据
//子表数据
List voucherProductList = voucherService.getVoucherProductList(entity.getId(),voucherPagination);
@@ -701,6 +705,7 @@ public class VoucherController {
productEntity.setTareWeight(entity.getTareWeight());
productEntity.setBuckleWeight(entity.getBuckleWeight());
productEntity.setNetWeight(entity.getNetWeight());
+ productEntity.setClearWeight(entity.getClearWeight());
}
entity.setProductWarehouseEntityList(productWarehouseEntity);
}
@@ -922,6 +927,7 @@ public class VoucherController {
productEntity.setTareWeight(entity.getTareWeight());
productEntity.setBuckleWeight(entity.getBuckleWeight());
productEntity.setNetWeight(entity.getNetWeight());
+ productEntity.setClearWeight(entity.getClearWeight());
}
entity.setProductWarehouseEntityList(productWarehouseEntity);
}
diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/entity/DeliveryProductRelationEntity.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/entity/DeliveryProductRelationEntity.java
index 5d120ffa..d9298f27 100644
--- a/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/entity/DeliveryProductRelationEntity.java
+++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/entity/DeliveryProductRelationEntity.java
@@ -86,6 +86,8 @@ public class DeliveryProductRelationEntity {
private String organizeJsonId;
@TableField("F_TENANT_ID")
private String tenantId;
+ @TableField(value = "CLEAR_WEIGHT" , updateStrategy = FieldStrategy.IGNORED)
+ private BigDecimal clearWeight;
@TableField(exist = false)
private BigDecimal remainingStockableQuantity;
diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/entity/DeliveryVoucherRelationEntity.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/entity/DeliveryVoucherRelationEntity.java
index 75bbb098..7909e8b8 100644
--- a/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/entity/DeliveryVoucherRelationEntity.java
+++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/entity/DeliveryVoucherRelationEntity.java
@@ -76,6 +76,8 @@ public class DeliveryVoucherRelationEntity {
private String organizeJsonId;
@TableField("F_TENANT_ID")
private String tenantId;
+ @TableField(value = "CLEAR_WEIGHT" , updateStrategy = FieldStrategy.IGNORED)
+ private BigDecimal clearWeight;
@TableField(exist = false)
private String isTransfer;
diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/entity/ProductWarehouseEntity.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/entity/ProductWarehouseEntity.java
index 8bf2ad90..125a0115 100644
--- a/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/entity/ProductWarehouseEntity.java
+++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/entity/ProductWarehouseEntity.java
@@ -307,6 +307,8 @@ public class ProductWarehouseEntity {
private BigDecimal purchaseAmount;
@TableField(exist = false)
private BigDecimal saleAmount;
+ @TableField(exist = false)
+ private BigDecimal clearWeight;
}
diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/entity/VoucherEntity.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/entity/VoucherEntity.java
index 4bcb5443..cd44d394 100644
--- a/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/entity/VoucherEntity.java
+++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/entity/VoucherEntity.java
@@ -212,5 +212,7 @@ public class VoucherEntity {
private String isReturnCargoOrder1;
@TableField(exist = false)
private List voucherBatchProductModelList;
+ @TableField(exist = false)
+ private BigDecimal clearWeight;
}
diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/entity/VoucherProductEntity.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/entity/VoucherProductEntity.java
index 2d4e4315..0461c938 100644
--- a/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/entity/VoucherProductEntity.java
+++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/entity/VoucherProductEntity.java
@@ -74,6 +74,8 @@ public class VoucherProductEntity {
private String deliveryUnit;
@TableField("DELIVERY_NUM")
private String deliveryNum;
+ @TableField("CLEAR_WEIGHT")
+ private BigDecimal clearWeight;
/** 运费 **/
@TableField(exist = false)
private BigDecimal freight;
@@ -149,4 +151,10 @@ public class VoucherProductEntity {
/** 销售额 **/
@TableField(exist = false)
private String saleAmount;
+ /** 采购合同 **/
+ @TableField(exist = false)
+ private String purchaseContractNo;
+ /** 采购额 **/
+ @TableField(exist = false)
+ private String purchaseAmount;
}
diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/entity/WarehousingOutboundPoundlistEntity.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/entity/WarehousingOutboundPoundlistEntity.java
index 7455bcbd..dc9bf39b 100644
--- a/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/entity/WarehousingOutboundPoundlistEntity.java
+++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/entity/WarehousingOutboundPoundlistEntity.java
@@ -90,6 +90,8 @@ public class WarehousingOutboundPoundlistEntity {
private String businessType;
@TableField(value = "STORAGE_PRODUCT_ID")
private String storageProductId;
+ @TableField(value = "CLEAR_WEIGHT" , updateStrategy = FieldStrategy.IGNORED)
+ private BigDecimal clearWeight;
//对应的商品List
@TableField(exist = false)
diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/model/deliveryorder/DeliveryProductRelationModel.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/model/deliveryorder/DeliveryProductRelationModel.java
index 98f8a239..87c5c3fc 100644
--- a/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/model/deliveryorder/DeliveryProductRelationModel.java
+++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/model/deliveryorder/DeliveryProductRelationModel.java
@@ -84,4 +84,7 @@ public class DeliveryProductRelationModel {
/** 业务类型 **/
@JSONField(name = "businessType")
private String businessType;
+ /** 净重 **/
+ @JSONField(name = "clearWeight")
+ private BigDecimal clearWeight;
}
diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/model/deliveryorder/DeliveryVoucherRelationModel.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/model/deliveryorder/DeliveryVoucherRelationModel.java
index 31e6a22a..7629d2f0 100644
--- a/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/model/deliveryorder/DeliveryVoucherRelationModel.java
+++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/model/deliveryorder/DeliveryVoucherRelationModel.java
@@ -67,4 +67,7 @@ public class DeliveryVoucherRelationModel {
/** 业务类型 **/
@JSONField(name = "businessType")
private String businessType;
+ /** 净重 **/
+ @JSONField(name = "clearWeight")
+ private BigDecimal clearWeight;
}
diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/model/voucher/VoucherProductModel.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/model/voucher/VoucherProductModel.java
index 040292e8..37c17d8c 100644
--- a/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/model/voucher/VoucherProductModel.java
+++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/model/voucher/VoucherProductModel.java
@@ -45,5 +45,8 @@ public class VoucherProductModel {
/** 打印时间 **/
@JSONField(name = "printTime")
private Long printTime;
+ /** 净重 **/
+ @JSONField(name = "clearWeight")
+ private String clearWeight;
}
diff --git a/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/model/warehousingoutbound/WarehousingOutboundPoundlistModel.java b/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/model/warehousingoutbound/WarehousingOutboundPoundlistModel.java
index 2f01fdda..5215da43 100644
--- a/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/model/warehousingoutbound/WarehousingOutboundPoundlistModel.java
+++ b/jnpf-java-boot/jnpf-scm/jnpf-scm-entity/src/main/java/jnpf/model/warehousingoutbound/WarehousingOutboundPoundlistModel.java
@@ -69,4 +69,6 @@ public class WarehousingOutboundPoundlistModel {
private String voucherTypes;
@JsonProperty("businessType")
private String businessType;
+ @TableField("CLEAR_WEIGHT")
+ private BigDecimal clearWeight;
}
diff --git a/jnpf-java-boot/jnpf-web/src/views/scm/contractL/form.vue b/jnpf-java-boot/jnpf-web/src/views/scm/contractL/form.vue
index 35ae01cc..d7f22881 100644
--- a/jnpf-java-boot/jnpf-web/src/views/scm/contractL/form.vue
+++ b/jnpf-java-boot/jnpf-web/src/views/scm/contractL/form.vue
@@ -1858,14 +1858,14 @@ export default {
excludeIdList.push(this.dataForm.contractLCommodityList[i].productId);
}
this.$nextTick(() => {
- if (!this.dataForm.businessId) {
- this.$message({
- message: "请先选择业务线",
- type: "error",
- duration: 1000
- });
- return;
- }
+ // if (!this.dataForm.businessId) {
+ // this.$message({
+ // message: "请先选择业务线",
+ // type: "error",
+ // duration: 1000
+ // });
+ // return;
+ // }
this.$refs.BomGoodsRawBox.init(excludeIdList, this.dataForm.businessId);
});
},
diff --git a/jnpf-java-boot/jnpf-web/src/views/scm/purchaseCenter/purchaseOrder/form.vue b/jnpf-java-boot/jnpf-web/src/views/scm/purchaseCenter/purchaseOrder/form.vue
index d8ec520f..a33f56b1 100644
--- a/jnpf-java-boot/jnpf-web/src/views/scm/purchaseCenter/purchaseOrder/form.vue
+++ b/jnpf-java-boot/jnpf-web/src/views/scm/purchaseCenter/purchaseOrder/form.vue
@@ -1165,6 +1165,7 @@ export default {
props: [],
data() {
return {
+ onlyContract: false,
isLongAgreement: '',
productIds: [],
productCreate: false,
@@ -1763,24 +1764,26 @@ export default {
} else if (subjectInfo.overdueInterestRate == 2) {
this.dataForm.settlementInfoList[0].overdueInterestRate = '按月化(' + subjectInfo.applyForOverdueRatio + '%)';
}
- val2.productByContractModelList.forEach(item => {
- item.notTaxPrice = this.jnpf.floatDiv(item.businessPrice, this.jnpf.floatAdd(1, this.jnpf.floatDiv(item.tax, 100))).toFixed(6) //采购不含税单价
- item.notTaxCount = this.jnpf.floatMul(item.businessNum, item.notTaxPrice).toFixed(2) //采购不含税总价
- item.inventoryUnitId = item.inventoryUnitId1
- if (item.orderMainUnitId1) {
- var unitName = JSON.parse(item.orderMainUnitId1)
- var optArray = [];
- for (let i = 0; i < unitName.length; i++) {
- item.salesMainUnitId = unitName[0]
- var opt = {};
- opt.fullName = unitName[i];
- opt.id = unitName[i];
- optArray.push(opt);
+ if (!this.onlyContract) {
+ val2.productByContractModelList.forEach(item => {
+ item.notTaxPrice = this.jnpf.floatDiv(item.businessPrice, this.jnpf.floatAdd(1, this.jnpf.floatDiv(item.tax, 100))).toFixed(6) //采购不含税单价
+ item.notTaxCount = this.jnpf.floatMul(item.businessNum, item.notTaxPrice).toFixed(2) //采购不含税总价
+ item.inventoryUnitId = item.inventoryUnitId1
+ if (item.orderMainUnitId1) {
+ var unitName = JSON.parse(item.orderMainUnitId1)
+ var optArray = [];
+ for (let i = 0; i < unitName.length; i++) {
+ item.salesMainUnitId = unitName[0]
+ var opt = {};
+ opt.fullName = unitName[i];
+ opt.id = unitName[i];
+ optArray.push(opt);
+ }
+ item.businessorderproductrelationalsalesMainUnitIdOptions = optArray;
}
- item.businessorderproductrelationalsalesMainUnitIdOptions = optArray;
- }
- })
- this.dataForm.businessOrderProductRelationalList = val2.productByContractModelList
+ })
+ this.dataForm.businessOrderProductRelationalList = val2.productByContractModelList
+ }
},
contractInfo2() {
let contractType = '1'//采购合同
@@ -1832,17 +1835,6 @@ export default {
} else if (subjectInfo.overdueInterestRate == 2) {
this.dataForm.settlementInfoList[0].overdueInterestRate = '按月化(' + subjectInfo.applyForOverdueRatio + '%)';
}
- // todo 采购收货凭证生成采购单,选择合同后带出单价
- // e.productByContractModelList.forEach(item => {
- // debugger
- // var productId = item.productId
- // var unit = item.unit
- // var price = item.businessPrice
- // const obj = this.dataForm.businessOrderProductRelationalList.find(e => e.productId == productId && e.salesMainUnitId == unit)
- // if (obj) {
- // obj.businessPrice = price
- // }
- // })
},
getSupplyName(val, val2) {
this.dataForm.settlementInfoList = [];
@@ -2245,6 +2237,9 @@ export default {
return _data;
},
dataInfo(dataAll) {
+ if (dataAll.voucherCreate && dataAll.voucherCreate == '1') {
+ this.onlyContract = true
+ }
let _dataAll = dataAll
this.dataForm = _dataAll
this.dataForm.expectArriveDate = [];
diff --git a/jnpf-java-boot/jnpf-web/src/views/scm/purchaseCenter/receiptOrder/form.vue b/jnpf-java-boot/jnpf-web/src/views/scm/purchaseCenter/receiptOrder/form.vue
index 6d61f3c1..7320d4da 100644
--- a/jnpf-java-boot/jnpf-web/src/views/scm/purchaseCenter/receiptOrder/form.vue
+++ b/jnpf-java-boot/jnpf-web/src/views/scm/purchaseCenter/receiptOrder/form.vue
@@ -668,6 +668,24 @@
+
+
+ *结算量
+
+
+
+
+
+
@@ -676,7 +694,7 @@
">*净重
-
+
+
+ *结算量
+
+
+
+
+
+
@@ -929,7 +965,7 @@
">*净重
-
+
+
+ *结算量
+
+
+
+
+
+
@@ -301,7 +316,7 @@
v-if="judgeRequired('voucherproductList-netWeight')">*净重
-
+
+
diff --git a/jnpf-java-boot/jnpf-web/src/views/scm/saleCenter/deliveryOrder/form.vue b/jnpf-java-boot/jnpf-web/src/views/scm/saleCenter/deliveryOrder/form.vue
index 2cd6dc83..ade20890 100644
--- a/jnpf-java-boot/jnpf-web/src/views/scm/saleCenter/deliveryOrder/form.vue
+++ b/jnpf-java-boot/jnpf-web/src/views/scm/saleCenter/deliveryOrder/form.vue
@@ -524,6 +524,19 @@
+
+
+ *结算量
+
+
+
+
+
+
@@ -531,7 +544,7 @@
v-if="judgeRequired('deliveryvoucherrelationList-netWeight')">*净重
-
@@ -706,6 +719,19 @@
+
+
+ *结算量
+
+
+
+
+
+
@@ -713,7 +739,7 @@
v-if="judgeRequired('deliveryproductrelationList-netWeight')">*净重
-
@@ -1294,6 +1320,7 @@ export default {
buckleWeight: e.buckleWeight,
netWeight: e.netWeight,
businessType: '4',
+ clearWeight: e.clearWeight,
}
this.dataForm.deliveryVoucherRelationList.push(item)
let productEntity = {}
@@ -1322,6 +1349,7 @@ export default {
product.grossWeight = this.jnpf.floatAdd(product.grossWeight, productEntity.grossWeight)
product.tareWeight = this.jnpf.floatAdd(product.tareWeight, productEntity.tareWeight)
product.buckleWeight = this.jnpf.floatAdd(product.buckleWeight, productEntity.buckleWeight)
+ product.clearWeight = this.jnpf.floatAdd(product.clearWeight, productEntity.clearWeight)
} else {
this.dataForm.deliveryProductRelationList.push(productEntity)
}
diff --git a/jnpf-java-boot/jnpf-web/src/views/scm/saleCenter/deliveryVoucher/form.vue b/jnpf-java-boot/jnpf-web/src/views/scm/saleCenter/deliveryVoucher/form.vue
index 3d03ca20..b47a9d2b 100644
--- a/jnpf-java-boot/jnpf-web/src/views/scm/saleCenter/deliveryVoucher/form.vue
+++ b/jnpf-java-boot/jnpf-web/src/views/scm/saleCenter/deliveryVoucher/form.vue
@@ -280,6 +280,21 @@
+
+
+ *结算量
+
+
+
+
+
+
@@ -287,7 +302,7 @@
v-if="judgeRequired('voucherproductList-netWeight')">*净重
- {
- item.notTaxPrice = this.jnpf.floatDiv(item.businessPrice, this.jnpf.floatAdd(1, this.jnpf.floatDiv(item.tax, 100))).toFixed(6) //销售不含税单价
- item.notTaxCount = this.jnpf.floatMul(item.businessNum, item.notTaxPrice).toFixed(2) //销售不含税总价
- item.inventoryUnitId = item.inventoryUnitId1
- if (item.saleMainUnitId1) {
- var unitName = JSON.parse(item.saleMainUnitId1)
- var optArray = [];
- for (let i = 0; i < unitName.length; i++) {
- item.salesMainUnitId = unitName[0]
- var opt = {};
- opt.fullName = unitName[i];
- opt.id = unitName[i];
- optArray.push(opt);
+ if (!this.onlyContract) {
+ val2.productByContractModelList.forEach(item => {
+ item.notTaxPrice = this.jnpf.floatDiv(item.businessPrice, this.jnpf.floatAdd(1, this.jnpf.floatDiv(item.tax, 100))).toFixed(6) //销售不含税单价
+ item.notTaxCount = this.jnpf.floatMul(item.businessNum, item.notTaxPrice).toFixed(2) //销售不含税总价
+ item.inventoryUnitId = item.inventoryUnitId1
+ if (item.saleMainUnitId1) {
+ var unitName = JSON.parse(item.saleMainUnitId1)
+ var optArray = [];
+ for (let i = 0; i < unitName.length; i++) {
+ item.salesMainUnitId = unitName[0]
+ var opt = {};
+ opt.fullName = unitName[i];
+ opt.id = unitName[i];
+ optArray.push(opt);
+ }
+ item.businessorderproductrelationalsalesMainUnitIdOptions = optArray;
}
- item.businessorderproductrelationalsalesMainUnitIdOptions = optArray;
- }
- })
- this.dataForm.businessOrderProductRelationalList = val2.productByContractModelList
+ })
+ this.dataForm.businessOrderProductRelationalList = val2.productByContractModelList
+ }
},
contractInfo2() {
let contractType = '2' //销售合同
@@ -2123,6 +2126,9 @@ export default {
return _data;
},
dataInfo(dataAll) {
+ if (dataAll.voucherCreate && dataAll.voucherCreate == '1') {
+ this.onlyContract = true
+ }
let _dataAll = dataAll
this.dataForm = _dataAll
this.dataForm.expectArriveDate = [];
diff --git a/jnpf-java-boot/jnpf-web/src/views/scm/voucherbatch/formBatch.vue b/jnpf-java-boot/jnpf-web/src/views/scm/voucherbatch/formBatch.vue
index 9f5a0e01..16676a99 100644
--- a/jnpf-java-boot/jnpf-web/src/views/scm/voucherbatch/formBatch.vue
+++ b/jnpf-java-boot/jnpf-web/src/views/scm/voucherbatch/formBatch.vue
@@ -171,12 +171,23 @@
+
+
+ *结算量
+
+
+
+
+
+
*净重
-