问题修改

jg-waiwang-pro
vayne 5 months ago
parent a6f8cbcd8b
commit ef21e72308

@ -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

@ -70,6 +70,7 @@
<result column="poundlist_time" property="poundlistTime"/>
<result column="delivery_type" property="deliveryType"/>
<result column="is_used" property="isUsed"/>
<result column="clear_weight" property="clearWeight"/>
</resultMap>
<resultMap id="purchaseReturn" type="jnpf.entity.WarehousingStoragePoundlistEntity">
@ -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)
</select>
@ -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}
</select>
@ -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}
</select>
<select id="queryVoucherProductNetWeight" resultType="java.math.BigDecimal">
select IFNULL(sum(b.net_weight),0) as netWeightSum from jg_voucher a
left join jg_voucher_product b on a.id = b.voucher_id and b.f_delete_mark is null
where a.f_delete_mark is null and a.voucher_relation = #{id}
</select>
<select id="queryVoucherDetail" resultMap="voucherList">
select a.*,
b.product_id AS productId,
b.spec,
b.unit,
b.gross_weight AS grossWeight,
b.tare_weight AS tareWeight,
b.buckle_weight AS buckleWeight,
b.net_weight AS netWeight,
c.vehicle_id as vehicleId,
c.driver_name as driverName,
c.telephone,
c.carrier
from jg_voucher a
left join jg_voucher_product b on a.id = b.voucher_id and b.f_delete_mark is null
left join jg_voucher_vehicle c on a.id = c.voucher_id and c.f_delete_mark is null
where a.f_delete_mark is null and a.id = #{id}
</select>
</mapper>

@ -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<VoucherEntity> {
IPage<VoucherEntity> queryVoucherList(@Param("page") Page<VoucherEntity> page, @Param("voucherPagination")VoucherPagination voucherPagination, @Param("ew")QueryWrapper<VoucherEntity> voucherEntityQueryWrapper);
IPage<VoucherEntity> queryVoucherPopup1(@Param("page") Page<VoucherEntity> page,@Param("ew") QueryWrapper<VoucherEntity> voucherEntityQueryWrapper);
VoucherEntity queryVoucherInfo(String id);
VoucherEntity queryVoucherInfo(@Param("id") String id);
//采购收货凭证批量转换为销售发货凭证
List<VoucherProductEntity> voucherBatchChange(@Param("id") String id);
List<WarehousingStoragePoundlistEntity> returnVoucher(@Param("ew")QueryWrapper<WarehousingStoragePoundlistEntity> voucherEntityQueryWrapper);
List<WarehousingOutboundPoundlistEntity> salereturnVoucher(@Param("ew")QueryWrapper<WarehousingOutboundPoundlistEntity> voucherEntityQueryWrapper);
BigDecimal queryVoucherProductNetWeight(@Param("id") String id);
VoucherEntity queryVoucherDetail(@Param("id") String id);
}

@ -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<VoucherEntity> {
List<VoucherProductEntity> voucherBatchChangeInfo(String id);
List<WarehousingStoragePoundlistEntity> returnVoucherInfo(String id,VoucherPagination voucherPagination);
List<WarehousingOutboundPoundlistEntity> salereturnVoucherInfo(String id,VoucherPagination voucherPagination);
VoucherEntity queryVoucherDetailInfo(String id);
BigDecimal queryVoucherProductNetWeightInfo(String id);
}

@ -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<BusinessOrderMapper, B
businessOrderEntity.setIsTransfer("2");
businessOrderMapper.updateById(businessOrderEntity);
}
//添加流程状态
FlowTaskEntity flowTaskEntity = generaterSwapUtil.getInfoSubmit(String.valueOf(entity.getId()), FlowTaskEntity::getStatus);
if (flowTaskEntity!=null && flowTaskEntity.getStatus() == 3){
//修改对应凭证的合同号
QueryWrapper<VoucherEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(VoucherEntity::getBusinessOrderId,entity.getId());
queryWrapper.lambda().isNull(VoucherEntity::getDeleteMark);
List<VoucherEntity> 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)) {

@ -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<ReceiptOrderMapper, Rec
private ReceiptOrderMapper receiptOrderMapper;
@Resource
private VoucherMapper voucherMapper;
@Autowired
private ProductWarehouseService productWarehouseService;
@Override
public List<ReceiptOrderEntity> getList(ReceiptOrderPagination receiptOrderPagination){
return getTypeList(receiptOrderPagination,receiptOrderPagination.getDataType());
@ -496,7 +499,12 @@ public class ReceiptOrderServiceImpl extends ServiceImpl<ReceiptOrderMapper, Rec
entitys.setId(RandomUtil.uuId());
entitys.setOrderId(entity.getId());
if(isSave && entity.getReceiptType().equals("1")){
entitys.setBatchNo(generaterSwapUtil.getBillNumber("batch", false));
ProductWarehouseEntity productWarehouseEntity = productWarehouseService.getInfo(entitys.getProductId());
if (ObjectUtil.isNotEmpty(productWarehouseEntity) && productWarehouseEntity.getInventoryType().equals("1")){
entitys.setBatchNo(productWarehouseEntity.getCode());
}else {
entitys.setBatchNo(generaterSwapUtil.getBillNumber("batch", false));
}
entitys.setProduceTime(DateUtil.getNowDate());
}
deliveryProductRelationService.saveOrUpdate(entitys);

@ -689,6 +689,8 @@ public class VoucherServiceImpl extends ServiceImpl<VoucherMapper, VoucherEntity
entity.setVehiclePictures(entitys.getVehiclePictures());
entity.setSaleContractNo(entitys.getSaleContractNo());
entity.setSaleAmount(entitys.getSaleAmount());
entity.setPurchaseContractNo(entitys.getPurchaseContractNo());
entity.setPurchaseAmount(entitys.getPurchaseAmount());
entity.setIsUsed("1");
this.saveOrUpdate(entity);
//商品子表
@ -707,9 +709,20 @@ public class VoucherServiceImpl extends ServiceImpl<VoucherMapper, VoucherEntity
if (StringUtil.isNotEmpty(entitys.getIsSaleDeliveryVoucherSource())){
VoucherEntity voucherEntity = voucherMapper.selectById(entitys.getIsSaleDeliveryVoucherSource());
voucherEntity.setIsSaleDeliveryVoucher("2");
voucherEntity.setVoucherRelation(entity.getId());
voucherMapper.updateById(voucherEntity);
QueryWrapper<VoucherProductEntity> 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<VoucherMapper, VoucherEntity
pountlistQueryWrapper.like(ObjectUtils.isNotEmpty(voucherPagination.getKeyword()),"b.voucher_code",voucherPagination.getKeyword());
return voucherMapper.salereturnVoucher(pountlistQueryWrapper);
}
@Override
public VoucherEntity queryVoucherDetailInfo(String id) {
return voucherMapper.queryVoucherDetail(id);
}
@Override
public BigDecimal queryVoucherProductNetWeightInfo(String id) {
return voucherMapper.queryVoucherProductNetWeight(id);
}
}

@ -591,9 +591,17 @@ public class WarehousingStorageServiceImpl extends ServiceImpl<WarehousingStorag
entitys.setWarehousingStorageId(entity.getId());
entitys.setReceivedQuantity(entitys.getStorageNumber());
if(isSave){
entitys.setBatchNumber(generaterSwapUtil.getBillNumber("picihao", false));
entitys.setOrdLn(String.valueOf(line));
line++;
if (entity.getWarehousingStorageType().equals("1")) {
ProductWarehouseEntity productWarehouseEntity = productWarehouseService.getInfo(entitys.getProductId());
if (ObjectUtil.isNotEmpty(productWarehouseEntity) && productWarehouseEntity.getInventoryType().equals("1")) {
entitys.setBatchNumber(productWarehouseEntity.getCode());
} else {
entitys.setBatchNumber(generaterSwapUtil.getBillNumber("batch", false));
}
// entitys.setBatchNumber(generaterSwapUtil.getBillNumber("picihao", false));
entitys.setOrdLn(String.valueOf(line));
line++;
}
}else{
}
warehousingStorageProductService.saveOrUpdate(entitys);

@ -36,6 +36,7 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*;
import jnpf.annotation.JnpfField;
import jnpf.base.vo.PageListVO;
@ -152,23 +153,17 @@ public class BusinessOrderController {
queryWrapper.lambda().isNull(VoucherEntity::getDeleteMark);
List<VoucherEntity> voucherEntityList = voucherService.list(queryWrapper); //销售订单下所有销售发货凭证
for (VoucherEntity entity1 : voucherEntityList){
QueryWrapper<VoucherEntity> 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<VoucherProductEntity> 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<BusinessOrderProductRelationalEntity> 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<BusinessOrderProductRelationalEntity> businessOrderProductRelationalList = businessOrderService.getBusinessOrderProductRelationalList(entity.getId());
businessOrderMap.put("businessOrderProductRelationalList",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(businessOrderProductRelationalList)));
businessOrderMap = generaterSwapUtil.swapDataForm(businessOrderMap,BusinessOrderConstant.getFormData(),BusinessOrderConstant.TABLEFIELDKEY,BusinessOrderConstant.TABLERENAMES);
//判断订单是否由凭证生成
QueryWrapper<VoucherEntity> 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);
}

@ -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<String, Object> 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<VoucherProductEntity> 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);
}

@ -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;

@ -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;

@ -307,6 +307,8 @@ public class ProductWarehouseEntity {
private BigDecimal purchaseAmount;
@TableField(exist = false)
private BigDecimal saleAmount;
@TableField(exist = false)
private BigDecimal clearWeight;
}

@ -212,5 +212,7 @@ public class VoucherEntity {
private String isReturnCargoOrder1;
@TableField(exist = false)
private List<VoucherBatchProductModel> voucherBatchProductModelList;
@TableField(exist = false)
private BigDecimal clearWeight;
}

@ -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;
}

@ -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)

@ -84,4 +84,7 @@ public class DeliveryProductRelationModel {
/** 业务类型 **/
@JSONField(name = "businessType")
private String businessType;
/** 净重 **/
@JSONField(name = "clearWeight")
private BigDecimal clearWeight;
}

@ -67,4 +67,7 @@ public class DeliveryVoucherRelationModel {
/** 业务类型 **/
@JSONField(name = "businessType")
private String businessType;
/** 净重 **/
@JSONField(name = "clearWeight")
private BigDecimal clearWeight;
}

@ -45,5 +45,8 @@ public class VoucherProductModel {
/** 打印时间 **/
@JSONField(name = "printTime")
private Long printTime;
/** 净重 **/
@JSONField(name = "clearWeight")
private String clearWeight;
}

@ -69,4 +69,6 @@ public class WarehousingOutboundPoundlistModel {
private String voucherTypes;
@JsonProperty("businessType")
private String businessType;
@TableField("CLEAR_WEIGHT")
private BigDecimal clearWeight;
}

@ -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);
});
},

@ -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 = [];

@ -668,6 +668,24 @@
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="结算量" v-if="judgeShow('deliveryvoucherrelation-netWeight')"
prop="netWeight" width="120">
<template slot="header">
<span class="required-sign" v-if="
judgeRequired('deliveryvoucherrelationList-netWeight')
">*</span>结算量
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.netWeight" @change="
changeData(
'deliveryvoucherrelation-netWeight',
scope.$index
)
" placeholder="请输入" :disabled="true
" clearable :style="{ width: '100%' }">
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="净重" v-if="judgeShow('deliveryvoucherrelation-netWeight')"
prop="netWeight" width="120">
<template slot="header">
@ -676,7 +694,7 @@
">*</span>净重
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.netWeight" @change="
<JnpfInput v-model="scope.row.clearWeight" @change="
changeData(
'deliveryvoucherrelation-netWeight',
scope.$index
@ -921,6 +939,24 @@
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="结算量" v-if="judgeShow('deliveryproductrelation-netWeight')"
prop="netWeight" width="120">
<template slot="header">
<span class="required-sign" v-if="
judgeRequired('deliveryproductrelationList-netWeight')
">*</span>结算量
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.netWeight" @change="
changeData(
'deliveryproductrelation-netWeight',
scope.$index
)
" placeholder="请输入" :disabled="true
" clearable :style="{ width: '100%' }">
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="净重" v-if="judgeShow('deliveryproductrelation-netWeight')"
prop="netWeight" width="120">
<template slot="header">
@ -929,7 +965,7 @@
">*</span>净重
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.netWeight" @change="
<JnpfInput v-model="scope.row.clearWeight" @change="
changeData(
'deliveryproductrelation-netWeight',
scope.$index
@ -1687,6 +1723,7 @@ export default {
buckleWeight: e.buckleWeight,
netWeight: e.netWeight,
businessType: "1",
clearWeight: e.clearWeight,
};
this.dataForm.deliveryVoucherRelationList.push(item);
let productEntity = {};
@ -1728,6 +1765,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)
}

@ -294,6 +294,21 @@
</JnpfInputNumber>
</template>
</el-table-column>
<el-table-column label="结算量" v-if="judgeShow('voucherproduct-netWeight')"
prop="netWeight">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('voucherproductList-netWeight')">*</span>结算量
</template>
<template slot-scope="scope">
<JnpfInputNumber v-model="scope.row.netWeight"
@change="changeData('voucherproduct-netWeight', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('voucherproductList') || judgeWrite('voucherproductList-netWeight')"
:precision="4" :step="1" :min="0">
</JnpfInputNumber>
</template>
</el-table-column>
<el-table-column label="净重" v-if="judgeShow('voucherproduct-netWeight')"
prop="netWeight">
<template slot="header">
@ -301,7 +316,7 @@
v-if="judgeRequired('voucherproductList-netWeight')">*</span>净重
</template>
<template slot-scope="scope">
<JnpfInputNumber v-model="scope.row.netWeight"
<JnpfInputNumber v-model="scope.row.clearWeight"
@change="changeData('voucherproduct-netWeight', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('voucherproductList') || judgeWrite('voucherproductList-netWeight')"
@ -913,6 +928,7 @@ export default {
//
UpdateWeight(row) {
row.netWeight = this.jnpf.floatSub(this.jnpf.floatSub(parseFloat(row.grossWeight), parseFloat(row.tareWeight)), parseFloat(row.buckleWeight)) //-- =
row.clearWeight = row.netWeight
},
//
poundlistUploadSuccess(val, res) {

@ -142,6 +142,8 @@
{{ scope.row.isSaleDeliveryVoucher1 }}
</template>
</el-table-column>
<el-table-column prop="remainder" label="可生成销售发货凭证数量" align="center" width="160">
</el-table-column>
<el-table-column prop="poundCode" label="磅单编号" align="center" width="160">
</el-table-column>
<el-table-column prop="associatedDocumentNo" label="关联单据号" align="center" width="160">

@ -524,6 +524,19 @@
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="结算量" v-if="judgeShow('deliveryvoucherrelation-netWeight')"
prop="netWeight" width="150">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryvoucherrelationList-netWeight')">*</span>结算量
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.netWeight"
@change="changeData('deliveryvoucherrelation-netWeight', scope.$index)"
placeholder="请输入" :disabled="true" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="净重" v-if="judgeShow('deliveryvoucherrelation-netWeight')"
prop="netWeight" width="150">
<template slot="header">
@ -531,7 +544,7 @@
v-if="judgeRequired('deliveryvoucherrelationList-netWeight')">*</span>净重
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.netWeight"
<JnpfInput v-model="scope.row.clearWeight"
@change="changeData('deliveryvoucherrelation-netWeight', scope.$index)"
placeholder="请输入" :disabled="true" clearable :style='{ "width": "100%" }'>
</JnpfInput>
@ -706,6 +719,19 @@
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="结算量" v-if="judgeShow('deliveryproductrelation-netWeight')"
prop="netWeight" width="150">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryproductrelationList-netWeight')">*</span>结算量
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.netWeight"
@change="changeData('deliveryproductrelation-netWeight', scope.$index)"
placeholder="请输入" :disabled="true" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="净重" v-if="judgeShow('deliveryproductrelation-netWeight')"
prop="netWeight" width="150">
<template slot="header">
@ -713,7 +739,7 @@
v-if="judgeRequired('deliveryproductrelationList-netWeight')">*</span>净重
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.netWeight"
<JnpfInput v-model="scope.row.clearWeight"
@change="changeData('deliveryproductrelation-netWeight', scope.$index)"
placeholder="请输入" :disabled="true" clearable :style='{ "width": "100%" }'>
</JnpfInput>
@ -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)
}

@ -280,6 +280,21 @@
</JnpfInputNumber>
</template>
</el-table-column>
<el-table-column label="结算量" v-if="judgeShow('voucherproduct-netWeight')"
prop="netWeight">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('voucherproductList-netWeight')">*</span>结算量
</template>
<template slot-scope="scope">
<JnpfInputNumber v-model="scope.row.netWeight"
@change="changeData('voucherproduct-netWeight', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('voucherproductList') || judgeWrite('voucherproductList-netWeight')"
:precision="4" :step="1" :min="0">
</JnpfInputNumber>
</template>
</el-table-column>
<el-table-column label="净重" v-if="judgeShow('voucherproduct-netWeight')"
prop="netWeight">
<template slot="header">
@ -287,7 +302,7 @@
v-if="judgeRequired('voucherproductList-netWeight')">*</span>净重
</template>
<template slot-scope="scope">
<JnpfInputNumber v-model="scope.row.netWeight"
<JnpfInputNumber v-model="scope.row.clearWeight"
@change="changeData('voucherproduct-netWeight', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('voucherproductList') || judgeWrite('voucherproductList-netWeight')"
@ -872,6 +887,7 @@ export default {
//
UpdateWeight(row) {
row.netWeight = this.jnpf.floatSub(this.jnpf.floatSub(parseFloat(row.grossWeight), parseFloat(row.tareWeight)), parseFloat(row.buckleWeight)) //-- =
row.clearWeight = row.netWeight
},
//
vehicleInfo(val, val2) {

@ -1107,6 +1107,7 @@ export default {
props: [],
data() {
return {
onlyContract: false,
ContractBoxVisible: false,
productIds: [],
productCreate: false,
@ -1642,24 +1643,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.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 = [];

@ -171,12 +171,23 @@
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="结算量" prop="netWeight" width="180">
<template slot="header" v-if="false">
<span class="required-sign">*</span>结算量
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.netWeight"
@change="changeData('voucherproduct-netWeight',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="净重" prop="netWeight" width="180">
<template slot="header" v-if="false">
<span class="required-sign">*</span>净重
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.netWeight"
<JnpfInput v-model="scope.row.clearWeight"
@change="changeData('voucherproduct-netWeight',scope.$index)"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</JnpfInput>

Loading…
Cancel
Save