Merge remote-tracking branch 'origin/master'

jg-waiwang-pro
胡川虎 6 months ago
commit 6f994d2029

@ -98,6 +98,8 @@
END AS status1,
c.F_Full_Name AS businessLineType,
d.F_Full_Name AS businessOrganizeType,
g.F_Full_Name AS workShopType,
f.F_Full_Name AS productionType,
i.f_real_name AS belongUserName,
e.f_status AS flowStatus
FROM
@ -106,6 +108,8 @@
AND i.f_delete_mark IS NULL
LEFT JOIN ( SELECT * FROM base_dictionary_data WHERE f_dictionary_type_id = '517662753159119813' ) c ON a.type = c.f_id
LEFT JOIN ( SELECT * FROM base_dictionary_data WHERE f_dictionary_type_id = '517958847835407557' ) d ON a.type = d.f_id
LEFT JOIN ( SELECT * FROM base_dictionary_data WHERE f_dictionary_type_id = '521639387734218757' ) g ON a.type = g.f_id
LEFT JOIN ( SELECT * FROM base_dictionary_data WHERE f_dictionary_type_id = '521639458429212677' ) f ON a.type = f.f_id
LEFT JOIN flow_task e ON a.id = e.f_process_id
${ew.customSqlSegment}
</select>

@ -710,6 +710,52 @@
${ew.customSqlSegment}
</select>
<select id="saleOrderByDeliveryOrder" resultMap="saleOrder">
SELECT
a.*,
CASE
a.STATUS
WHEN '1' THEN
'待提交'
WHEN '2' THEN
'待审核'
WHEN '3' THEN
'待锁定'
WHEN '4' THEN
'待出库'
WHEN '5' THEN
'部分出库'
WHEN '6' THEN
'已完成'
WHEN '7' THEN
'已驳回'
WHEN '8' THEN
'已关闭'
END AS saleStatus,
CASE
a.order_type
WHEN '1' THEN
'标准销售'
WHEN '2' THEN
'计划销售'
WHEN '3' THEN
'合同销售'
WHEN '4' THEN
'其他销售'
END AS orderType1,
CASE
a.delivery_type
WHEN '1' THEN '仓配'
WHEN '2' THEN '直送'
END AS deliveryType1,
b.NAME AS subjectName,
c.contract_name AS contractName
FROM
jg_business_order a
LEFT JOIN jg_subject_basic b ON a.first_subject_basic_id = b.id AND b.f_delete_mark IS NULL
LEFT JOIN jg_contract c ON a.contract_id = c.id AND c.f_delete_mark is NULL
${ew.customSqlSegment}
</select>
<select id="queryCurrentDayNum" resultType="java.math.BigDecimal">
SELECT IFNULL(SUM( business_num ),0) businessNum from jg_business_order_product_relational where business_order_id in (SELECT a.id from jg_business_order a
LEFT JOIN flow_task b on a.id = b.f_process_id

@ -53,6 +53,7 @@
<result column="order_main_unit_name" property="orderMainUnitName"/>
<result column="sales_main_unit_id" property="salesMainUnitId"/>
<result column="sales_main_unit_name" property="salesMainUnitName"/>
<result column="business_line_id_arr" property="businessLineIdArr"/>
<result column="input_tax_rate" property="inputTaxRate"/>
<result column="output_tax_rate" property="outputTaxRate"/>
<result column="productId" property="productId"/>
@ -71,8 +72,12 @@
a.order_main_unit_id, JgFnUnitArrName(a.order_main_unit_id) as order_main_unit_name,
a.sales_main_unit_id, JgFnUnitArrName(a.sales_main_unit_id) as sales_main_unit_name,
a.input_tax_rate,
a.output_tax_rate
FROM jg_product a ${ew.customSqlSegment}
a.output_tax_rate,
b.business_line_id as business_line_id_arr
FROM jg_product a LEFT JOIN jg_product_business b ON a.id = b.product_id ${ew.customSqlSegment}
<if test="productWarehousePagination.businessLineIdArr != null and productWarehousePagination.businessLineIdArr != ''">
WHERE b.business_line_id like CONCAT('%',${productWarehousePagination.businessLineIdArr},'%')
</if>
<if test="productWarehousePagination.sidx != null and productWarehousePagination.sidx != ''">
ORDER BY ${productWarehousePagination.sidx} ${productWarehousePagination.sort}
</if>

@ -299,6 +299,19 @@
<select id="queryReturnOrderByDelivery" resultMap="returnCargoOrder">
SELECT
a.*,
case a.document_type
when '1' then '采购退供'
when '2' then '销售退货'
when '3' then '其他退货'
end as documentTypeReturn,
case a.document_status
when '1' then '待提交'
when '2' then '待审核'
when '3' then '待出库'
when '4' then '部分出库'
when '5' then '已完成'
when '6' then '已关闭'
end as documentStatusReturn,
b.currency,
b.sale_mode as saleMode,
CASE
@ -362,7 +375,8 @@
end as businessOrderType1,
c.name as secondSupplyName,
d.name as thirdSupplyName,
e.name as businessLineName
e.name as businessLineName,
f.name as supplyName
FROM
jg_return_cargo_order a
LEFT JOIN jg_business_order b ON a.business_id = b.id
@ -373,6 +387,7 @@
AND d.f_delete_mark IS NULL
LEFT JOIN jg_business_line e ON b.business_line_id = e.id
AND e.f_delete_mark IS NULL
LEFT JOIN jg_subject_basic f ON b.first_subject_basic_id = f.id AND f.f_delete_mark IS NULL
${ew.customSqlSegment}
</select>
</mapper>

@ -47,6 +47,7 @@ public interface BusinessOrderMapper extends BaseMapper<BusinessOrderEntity> {
List<ProductWarehouseEntity> orderByVoucher(@Param("voucherIds") List<String> voucherIds);
List<BusinessOrderEntity> purchaseOrderByReceiptOrder(@Param("ew") QueryWrapper<BusinessOrderEntity> queryWrapper);
List<BusinessOrderEntity> saleOrderByDeliveryOrder(@Param("ew") QueryWrapper<BusinessOrderEntity> queryWrapper);
BigDecimal queryOccupyInventory(@Param("inventoryEntity") InventoryEntity entity);

@ -70,6 +70,8 @@ public interface BusinessOrderService extends IService<BusinessOrderEntity> {
//采购收货单中的采购订单列表
List<BusinessOrderEntity> purchaseOrderByReceiptOrderInfo(QueryWrapper<BusinessOrderEntity> queryWrapper);
//销售发货单中的销售订单列表
List<BusinessOrderEntity> saleOrderByDeliveryOrderInfo(QueryWrapper<BusinessOrderEntity> queryWrapper);
BigDecimal queryOccupyInventory(InventoryEntity entity);

@ -859,6 +859,11 @@ public class BusinessOrderServiceImpl extends ServiceImpl<BusinessOrderMapper, B
return businessOrderMapper.purchaseOrderByReceiptOrder(queryWrapper);
}
@Override
public List<BusinessOrderEntity> saleOrderByDeliveryOrderInfo(QueryWrapper<BusinessOrderEntity> queryWrapper) {
return businessOrderMapper.saleOrderByDeliveryOrder(queryWrapper);
}
@Override
public BusinessOrderEntity getInfo(String id){
QueryWrapper<BusinessOrderEntity> queryWrapper=new QueryWrapper<>();
@ -973,6 +978,7 @@ public class BusinessOrderServiceImpl extends ServiceImpl<BusinessOrderMapper, B
entity.setFixPriceMode(contractModel.getPricingModel());
entity.setSecondSubjectBasicId(contractModel.getSubject2());
entity.setThirdSubjectBasicId(contractModel.getSubject3());
entity.setStatus("1");
}else{
// entity.setCode(generaterSwapUtil.getBillNumber("cgdd", false));
// entity.setCreateOrderDate(DateUtil.getNowDate());
@ -995,6 +1001,7 @@ public class BusinessOrderServiceImpl extends ServiceImpl<BusinessOrderMapper, B
entity.setSaleMode(contractModel.getProcurementModel());
entity.setFixPriceMode(contractModel.getPricingModel());
entity.setSecondSubjectBasicId(contractModel.getSubject2());
entity.setStatus("1");
}else{
// entity.setCode(generaterSwapUtil.getBillNumber("ssdj", false));
// entity.setCreateOrderDate(DateUtil.getNowDate());

@ -62,6 +62,14 @@ public class WarehousingOutboundServiceImpl extends ServiceImpl<WarehousingOutbo
private DeliveryOrderService deliveryOrderService;
@Autowired
private ReturnCargoOrderService returnCargoOrderService;
@Autowired
private ProductWarehouseService productWarehouseService;
@Autowired
private InventoryService inventoryService;
@Autowired
private InventoryLogService inventoryLogService;
@Autowired
private BusinessOrderService businessOrderService;
@Override
public List<WarehousingOutboundEntity> getList(WarehousingOutboundPagination warehousingOutboundPagination){
return getTypeList(warehousingOutboundPagination,warehousingOutboundPagination.getDataType());
@ -643,6 +651,7 @@ public class WarehousingOutboundServiceImpl extends ServiceImpl<WarehousingOutbo
@Override
@Transactional
public void saveOrUpdateByPurchaseDelivery(DeliveryOrderForm deliveryOrderForm) throws Exception {
String deliveryType = deliveryOrderForm.getDeliveryType();
UserInfo userInfo=userProvider.get();
UserEntity userEntity = generaterSwapUtil.getUser(userInfo.getUserId());
// warehousingOutboundForm = JsonUtil.getJsonToBean(
@ -651,7 +660,11 @@ public class WarehousingOutboundServiceImpl extends ServiceImpl<WarehousingOutbo
WarehousingOutboundEntity entity = new WarehousingOutboundEntity();
entity.setDocumentNo(generaterSwapUtil.getBillNumber("chukudanbianhao", false));
entity.setWarehousingOutboundType("11");//采购发货单出库
if (deliveryType.equals("1")) {
entity.setWarehousingOutboundType("11");//采购发货单出库
}else if (deliveryType.equals("2")){
entity.setWarehousingOutboundType("12");//销售发货单出库
}
entity.setWarehousingOutboundStatus("3");//已出库
entity.setWarehousingId(deliveryOrderForm.getId());
entity.setWarehouseId(deliveryOrderForm.getWarehouseId());
@ -683,6 +696,63 @@ public class WarehousingOutboundServiceImpl extends ServiceImpl<WarehousingOutbo
warehousingOutboundProductEntity.setBatchNumber(entitys.getBatchNo());
warehousingOutboundProductEntity.setDateManufacture(entitys.getProduceTime());
warehousingOutboundProductService.saveOrUpdate(warehousingOutboundProductEntity);
//查询商品详情
ProductWarehouseEntity productWarehouseEntity = new ProductWarehouseEntity();
if(StringUtil.isNotEmpty(entitys.getProductId())){
productWarehouseEntity = productWarehouseService.getById(entitys.getProductId());
}
//更新库存
//根据商品id和批次号查询库存信息
QueryWrapper<InventoryEntity> inventoryQueryWrapper = new QueryWrapper<>();
inventoryQueryWrapper.lambda().eq(InventoryEntity::getProductId, entitys.getProductId());
inventoryQueryWrapper.lambda().eq(InventoryEntity::getBatchNumber, entitys.getBatchNo());
List<InventoryEntity> inventoryList = inventoryService.list(inventoryQueryWrapper);
InventoryEntity inventoryEntity = new InventoryEntity();
if(inventoryList != null && inventoryList.size() > 0){
inventoryEntity = inventoryList.get(0);
inventoryEntity.setInventoryNumber(inventoryEntity.getInventoryNumber().subtract((entitys.getDeliveryNum())));//库存数量
}else{
inventoryEntity.setProductId(entitys.getProductId());
inventoryEntity.setCode(productWarehouseEntity.getCode());
inventoryEntity.setName(productWarehouseEntity.getName());
inventoryEntity.setPhoto(productWarehouseEntity.getPhoto());
inventoryEntity.setBrandId(productWarehouseEntity.getBrandId());
inventoryEntity.setProductTypeId(productWarehouseEntity.getProductTypeId());
inventoryEntity.setSpec(productWarehouseEntity.getSpec());
inventoryEntity.setInventoryUnitId(productWarehouseEntity.getInventoryUnitId());
inventoryEntity.setWarehouseId(entity.getWarehouseId());
inventoryEntity.setStorageAreaId(entitys.getCargoId());
inventoryEntity.setBatchNumber(entitys.getBatchNo());
inventoryEntity.setInventoryNumber((entitys.getDeliveryNum()));//库存数量
//inventoryEntity.setPurchasePrice();//平均采购单价
//inventoryEntity.setTotalCost();//总成本
}
inventoryService.saveOrUpdate(inventoryEntity);
//更新库存流水
InventoryLogEntity inventoryLogEntity = new InventoryLogEntity();
inventoryLogEntity.setProductId(entitys.getProductId());
inventoryLogEntity.setBusinessNo(entity.getDocumentNo());
if (deliveryType.equals("1")){
inventoryLogEntity.setBusinessType("26");//采购发货单出库
}else if (deliveryType.equals("2")) {
inventoryLogEntity.setBusinessType("27");//销售发货单出库
}
inventoryLogEntity.setCode(productWarehouseEntity.getCode());
inventoryLogEntity.setName(productWarehouseEntity.getName());
inventoryLogEntity.setPhoto(productWarehouseEntity.getPhoto());
inventoryLogEntity.setBrandId(productWarehouseEntity.getBrandId());
inventoryLogEntity.setProductTypeId(productWarehouseEntity.getProductTypeId());
inventoryLogEntity.setSpec(productWarehouseEntity.getSpec());
inventoryLogEntity.setInventoryUnitId(productWarehouseEntity.getInventoryUnitId());
inventoryLogEntity.setWarehouseId(entity.getWarehouseId());
inventoryLogEntity.setStorageAreaId(entitys.getCargoId());
inventoryLogEntity.setBatchNumber(entitys.getBatchNo());
inventoryLogEntity.setChangeNumber((entitys.getDeliveryNum()));
inventoryLogEntity.setInventoryNumber((inventoryEntity.getInventoryNumber()));//库存数量
inventoryLogService.saveOrUpdate(inventoryLogEntity);
}
//更新发货单中的发货数量和发货时间
DeliveryOrderEntity deliveryOrderEntity = deliveryOrderService.getInfo(deliveryOrderForm.getId());
@ -691,26 +761,51 @@ public class WarehousingOutboundServiceImpl extends ServiceImpl<WarehousingOutbo
deliveryOrderEntity.setExecuteDocumentId(entity.getDocumentNo()); //执行单据号
deliveryOrderEntity.setDeliveryStatus("3");//已发货
deliveryOrderService.saveOrUpdate(deliveryOrderEntity);
//查询退货订单,更新退货订单的状态和已发货数量和发货次数
if (StringUtils.isNotEmpty(deliveryOrderEntity.getBusinessId())){
ReturnCargoOrderEntity returnCargoOrderEntity = returnCargoOrderService.getInfo(deliveryOrderEntity.getBusinessId());
if (returnCargoOrderEntity.getDocumentStatus().equals("3")){
returnCargoOrderEntity.setReturnedNum(countNum);
returnCargoOrderEntity.setReturnedNo(1);
if (returnCargoOrderEntity.getPlanReturnNum().compareTo(countNum) == 0){
returnCargoOrderEntity.setDocumentStatus("5");
}else{
returnCargoOrderEntity.setDocumentStatus("4");
if(deliveryType.equals("1")) {
//查询退货订单,更新退货订单的状态和已发货数量和发货次数
if (StringUtils.isNotEmpty(deliveryOrderEntity.getBusinessId())) {
ReturnCargoOrderEntity returnCargoOrderEntity = returnCargoOrderService.getInfo(deliveryOrderEntity.getBusinessId());
if (returnCargoOrderEntity.getDocumentStatus().equals("3")) {
returnCargoOrderEntity.setReturnedNum(countNum);
returnCargoOrderEntity.setReturnedNo(1);
if (returnCargoOrderEntity.getPlanReturnNum().compareTo(countNum) == 0) {
returnCargoOrderEntity.setDocumentStatus("5");
} else {
returnCargoOrderEntity.setDocumentStatus("4");
}
returnCargoOrderService.saveOrUpdate(returnCargoOrderEntity);
} else if (returnCargoOrderEntity.getDocumentStatus().equals("4")) {
BigDecimal returnNum = returnCargoOrderEntity.getReturnedNum().add(countNum);
returnCargoOrderEntity.setReturnedNum(returnNum);
returnCargoOrderEntity.setReturnedNo(returnCargoOrderEntity.getReturnedNo() + 1);
if (returnCargoOrderEntity.getPlanReturnNum().compareTo(returnNum) == 0) {
returnCargoOrderEntity.setDocumentStatus("5");
}
returnCargoOrderService.saveOrUpdate(returnCargoOrderEntity);
}
returnCargoOrderService.saveOrUpdate(returnCargoOrderEntity);
}else if (returnCargoOrderEntity.getDocumentStatus().equals("4")){
BigDecimal returnNum = returnCargoOrderEntity.getReturnedNum().add(countNum);
returnCargoOrderEntity.setReturnedNum(returnNum);
returnCargoOrderEntity.setReturnedNo(returnCargoOrderEntity.getReturnedNo()+1);
if (returnCargoOrderEntity.getPlanReturnNum().compareTo(returnNum) == 0){
returnCargoOrderEntity.setDocumentStatus("5");
}
}else if (deliveryType.equals("2")){
//查询销售订单,更新销售订单的状态和已发货数量和发货次数
if (StringUtils.isNotEmpty(deliveryOrderEntity.getBusinessId())){
BusinessOrderEntity businessOrderEntity = businessOrderService.getInfo(deliveryOrderEntity.getBusinessId());
if (businessOrderEntity.getStatus().equals("4")){
businessOrderEntity.setReceivedNum(countNum);
businessOrderEntity.setReceivedNo(1);
if (businessOrderEntity.getPlanPurchaseNum().compareTo(countNum) == 0){
businessOrderEntity.setStatus("6");
}else{
businessOrderEntity.setStatus("5");
}
businessOrderService.saveOrUpdate(businessOrderEntity);
}else if (businessOrderEntity.getStatus().equals("5")){
BigDecimal receivedNum = businessOrderEntity.getReceivedNum().add(countNum);
businessOrderEntity.setReceivedNum(receivedNum);
businessOrderEntity.setReceivedNo(businessOrderEntity.getReceivedNo()+1);
if (businessOrderEntity.getPlanPurchaseNum().compareTo(receivedNum) == 0){
businessOrderEntity.setStatus("6");
}
businessOrderService.saveOrUpdate(businessOrderEntity);
}
returnCargoOrderService.saveOrUpdate(returnCargoOrderEntity);
}
}
}
@ -721,8 +816,13 @@ public class WarehousingOutboundServiceImpl extends ServiceImpl<WarehousingOutbo
List<WarehousingOutboundPoundlistEntity> tableField114 = JsonUtil.getJsonToList(deliveryOrderForm.getDeliveryVoucherRelationList(),WarehousingOutboundPoundlistEntity.class);
for(WarehousingOutboundPoundlistEntity entitys : tableField114){
entitys.setId(RandomUtil.uuId());
entitys.setDocumentType("2");
entitys.setBusinessType("1");
if (deliveryType.equals("1")) {
entitys.setDocumentType("2");
entitys.setBusinessType("1");
}else if (deliveryType.equals("2")){
entitys.setDocumentType("2");
entitys.setBusinessType("2");
}
entitys.setWarehousingOutboundId(entity.getId());
// //将商品子表id放入凭证子表
// QueryWrapper<WarehousingStorageProductEntity> productQueryWrapper = new QueryWrapper<>();

@ -69,6 +69,12 @@ public class WarehousingStorageServiceImpl extends ServiceImpl<WarehousingStorag
private ReceiptOrderService receiptOrderService;
@Autowired
private BusinessOrderService businessOrderService;
@Autowired
private ProductWarehouseService productWarehouseService;
@Autowired
private InventoryService inventoryService;
@Autowired
private InventoryLogService inventoryLogService;
@Override
public List<WarehousingStorageEntity> getList(WarehousingStoragePagination warehousingStoragePagination){
return getTypeList(warehousingStoragePagination,warehousingStoragePagination.getDataType());
@ -715,6 +721,58 @@ public class WarehousingStorageServiceImpl extends ServiceImpl<WarehousingStorag
warehousingStorageProductEntity.setBatchNumber(entitys.getBatchNo());
warehousingStorageProductEntity.setDateManufacture(entitys.getProduceTime());
warehousingStorageProductService.saveOrUpdate(warehousingStorageProductEntity);
//查询商品详情
ProductWarehouseEntity productWarehouseEntity = new ProductWarehouseEntity();
if(StringUtil.isNotEmpty(entitys.getProductId())){
productWarehouseEntity = productWarehouseService.getById(entitys.getProductId());
}
//更新库存
//根据商品id和批次号查询库存信息
QueryWrapper<InventoryEntity> inventoryQueryWrapper = new QueryWrapper<>();
inventoryQueryWrapper.lambda().eq(InventoryEntity::getProductId, entitys.getProductId());
inventoryQueryWrapper.lambda().eq(InventoryEntity::getBatchNumber, entitys.getBatchNo());
List<InventoryEntity> inventoryList = inventoryService.list(inventoryQueryWrapper);
InventoryEntity inventoryEntity = new InventoryEntity();
if(inventoryList != null && inventoryList.size() > 0){
inventoryEntity = inventoryList.get(0);
inventoryEntity.setInventoryNumber(inventoryEntity.getInventoryNumber().add((entitys.getDeliveryNum())));//库存数量
}else{
inventoryEntity.setProductId(entitys.getProductId());
inventoryEntity.setCode(productWarehouseEntity.getCode());
inventoryEntity.setName(productWarehouseEntity.getName());
inventoryEntity.setPhoto(productWarehouseEntity.getPhoto());
inventoryEntity.setBrandId(productWarehouseEntity.getBrandId());
inventoryEntity.setProductTypeId(productWarehouseEntity.getProductTypeId());
inventoryEntity.setSpec(productWarehouseEntity.getSpec());
inventoryEntity.setInventoryUnitId(productWarehouseEntity.getInventoryUnitId());
inventoryEntity.setWarehouseId(entity.getWarehouseId());
inventoryEntity.setStorageAreaId(entitys.getCargoId());
inventoryEntity.setBatchNumber(entitys.getBatchNo());
inventoryEntity.setInventoryNumber((entitys.getDeliveryNum()));//库存数量
//inventoryEntity.setPurchasePrice();//平均采购单价
//inventoryEntity.setTotalCost();//总成本
}
inventoryService.saveOrUpdate(inventoryEntity);
//更新库存流水
InventoryLogEntity inventoryLogEntity = new InventoryLogEntity();
inventoryLogEntity.setProductId(entitys.getProductId());
inventoryLogEntity.setBusinessNo(entity.getDocumentNo());
inventoryLogEntity.setBusinessType("18");//采购收货单入库
inventoryLogEntity.setCode(productWarehouseEntity.getCode());
inventoryLogEntity.setName(productWarehouseEntity.getName());
inventoryLogEntity.setPhoto(productWarehouseEntity.getPhoto());
inventoryLogEntity.setBrandId(productWarehouseEntity.getBrandId());
inventoryLogEntity.setProductTypeId(productWarehouseEntity.getProductTypeId());
inventoryLogEntity.setSpec(productWarehouseEntity.getSpec());
inventoryLogEntity.setInventoryUnitId(productWarehouseEntity.getInventoryUnitId());
inventoryLogEntity.setWarehouseId(entity.getWarehouseId());
inventoryLogEntity.setStorageAreaId(entitys.getCargoId());
inventoryLogEntity.setBatchNumber(entitys.getBatchNo());
inventoryLogEntity.setChangeNumber((entitys.getDeliveryNum()));
inventoryLogEntity.setInventoryNumber((inventoryEntity.getInventoryNumber()));//库存数量
inventoryLogService.saveOrUpdate(inventoryLogEntity);
}
//更新收货单中的收货数量和收货时间
ReceiptOrderEntity receiptOrderEntity = receiptOrderService.getInfo(receiptOrderForm.getId());

@ -143,6 +143,16 @@ public class BusinessLineController {
}
//流程状态添加
for(Map<String, Object> vo:realList){
if (ObjectUtil.isEmpty(vo.get("type")) && vo.get("diffFlag").equals("1")){
List<BusinessLineEntity> businessLineEntity = list.stream().filter(e -> e.getId().equals(vo.get("id"))).collect(Collectors.toList());
vo.put("type",businessLineEntity.get(0).getBusinessLineType());
}else if (ObjectUtil.isEmpty(vo.get("type")) && vo.get("diffFlag").equals("5")){
List<BusinessLineEntity> businessLineEntity = list.stream().filter(e -> e.getId().equals(vo.get("id"))).collect(Collectors.toList());
vo.put("type",businessLineEntity.get(0).getWorkShopType());
}else if (ObjectUtil.isEmpty(vo.get("type")) && vo.get("diffFlag").equals("6")){
List<BusinessLineEntity> businessLineEntity = list.stream().filter(e -> e.getId().equals(vo.get("id"))).collect(Collectors.toList());
vo.put("type",businessLineEntity.get(0).getProductionType());
}
FlowTaskEntity flowTaskEntity = generaterSwapUtil.getInfoSubmit(String.valueOf(vo.get("id")), FlowTaskEntity::getStatus);
if (flowTaskEntity!=null){
vo.put("flowState",flowTaskEntity.getStatus());

@ -671,15 +671,18 @@ public class BusinessOrderController {
*
* @return
*/
@Operation(summary = "获取销售订单")
@Operation(summary = "销售发货单中的销售订单列表")
@GetMapping("/getSalesOrderList")
public ActionResult list()throws IOException{
QueryWrapper<BusinessOrderEntity> businessOrderQueryWrapper=new QueryWrapper<>();
businessOrderQueryWrapper.lambda().eq(BusinessOrderEntity::getBusinessType, "2");//销售
businessOrderQueryWrapper.lambda().eq(BusinessOrderEntity::getDeliveryType,"2");//配送方式为直送
businessOrderQueryWrapper.isNull("f_delete_mark");
businessOrderQueryWrapper.inSql("id", "SELECT f_process_id FROM flow_task WHERE f_status = '2'");//通过审核的订单
List<BusinessOrderEntity> businessOrderEntityList = businessOrderService.list(businessOrderQueryWrapper);
businessOrderQueryWrapper.eq("a.business_type", "2");//销售
businessOrderQueryWrapper.eq("a.delivery_type","2");//配送方式为直送
businessOrderQueryWrapper.and(wrapper ->
wrapper.eq("a.status","4").or().eq("a.status","5")
);
businessOrderQueryWrapper.isNull("a.f_delete_mark");
businessOrderQueryWrapper.inSql("a.id", "SELECT f_process_id FROM flow_task WHERE f_status = '2'");//通过审核的订单
List<BusinessOrderEntity> businessOrderEntityList = businessOrderService.saleOrderByDeliveryOrderInfo(businessOrderQueryWrapper);
// List<Map<String, Object>> realList=new ArrayList<>();
for (BusinessOrderEntity entity: businessOrderEntityList) {
if (StringUtil.isNotEmpty(entity.getSecondSubjectBasicId())){
@ -888,6 +891,68 @@ public class BusinessOrderController {
return ActionResult.success(businessOrderEntity);
}
/**
*
*
* @return
*/
@Operation(summary = "出库通知订单列表")
@GetMapping("/outBoundPurchaseOrderList")
public ActionResult outBoundPurchaseOrderList(@RequestParam("id") String id)throws IOException{
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<SettlementInfoEntity> settlementInfoList = businessOrderService.getSettlementInfoList(businessOrderEntity.getId());
//查询订单下面的商品
List<BusinessOrderProductRelationalEntity> businessOrderProductRelationalList = businessOrderService.getBusinessOrderProductRelationalList(businessOrderEntity.getId());
//查询已经生成的入库通知
List<WarehousingProductEntity> list = warehousingNotificationService.queryInBoundNoticeInfo(businessOrderEntity.getId(),"8");
if (list != null && list.size()>0) {
//对出库通知中相同的商品进行通知数量合并
List<WarehousingProductEntity> warehousingProductEntityList = list.stream().collect(Collectors.toMap(s -> s.getProductId()+";"+s.getPurchaseUnitId(), 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()) && businessOrderProductRelationalList.get(i).getSalesMainUnitId().equals(warehousingProductEntityList.get(j).getPurchaseUnitId())) {
BigDecimal num = businessOrderProductRelationalList.get(i).getBusinessNum().subtract(warehousingProductEntityList.get(j).getNotificationStorageNumber());
businessOrderProductRelationalList.get(i).setRemainingStockableQuantity(num);
businessOrderProductRelationalList.get(i).setNotificationStorageNumber(num);
}
}
}
}else{
for (BusinessOrderProductRelationalEntity businessOrderProductRelationalEntity : businessOrderProductRelationalList){
businessOrderProductRelationalEntity.setRemainingStockableQuantity(businessOrderProductRelationalEntity.getBusinessNum());
businessOrderProductRelationalEntity.setNotificationStorageNumber(businessOrderProductRelationalEntity.getBusinessNum());
}
}
businessOrderEntity.setSettlementInfoList(settlementInfoList);
businessOrderEntity.setBusinessOrderProductRelationalList(businessOrderProductRelationalList);
return ActionResult.success(businessOrderEntity);
}
/**
*

@ -146,7 +146,7 @@ public class ProductWarehouseController {
@PostMapping("/getBomProductlist")
public ActionResult bomProductlist(@RequestBody ProductWarehousePagination productWarehousePagination)throws IOException{
List<ProductWarehouseEntity> list= productWarehouseService.getProductList(productWarehousePagination);
List<Map<String, Object>> realList=new ArrayList<>();
List<Map<String, Object>> realList = new ArrayList<>();
for (ProductWarehouseEntity entity : list) {
Map<String, Object> productWarehouseMap=JsonUtil.entityToMap(entity);
productWarehouseMap.put("id", productWarehouseMap.get("id"));

@ -144,4 +144,8 @@ public class BusinessLineEntity {
private Integer flowStatus;
@TableField(exist = false)
private String status1;
@TableField(exist = false)
private String workShopType;
@TableField(exist = false)
private String productionType;
}

@ -296,5 +296,7 @@ public class ProductWarehouseEntity {
private String orderMainUnitName;
@TableField(exist = false)
private String salesMainUnitName;
@TableField(exist = false)
private String businessLineIdArr;
}

@ -163,4 +163,8 @@ public class ReturnCargoOrderEntity {
private String realName;
@TableField(exist = false)
private String realNameA;
@TableField(exist = false)
private String documentTypeReturn;
@TableField(exist = false)
private String documentStatusReturn;
}

@ -33,6 +33,9 @@ public class ProductWarehousePagination extends Pagination {
/** 商品名称 */
@JsonProperty("name")
private Object name;
/** 业务线 */
@JsonProperty("businessLineIdArr")
private Object businessLineIdArr;
/** 商品类型 */
@JsonProperty("productTypeId")
private Object productTypeId;

@ -4,20 +4,23 @@
<el-input :placeholder="placeholder" v-model="innerValue" readonly :validate-event="false"
@mouseenter.native="inputHovering = true" @mouseleave.native="inputHovering = false">
<template slot="suffix">
<i v-show="!showClose" :class="['el-select__caret', 'el-input__icon', 'el-icon-arrow-up']"></i>
<i v-if="showClose" class="el-select__caret el-input__icon el-icon-circle-close" @click="clear"></i>
<i v-show="!showClose"
:class="['el-select__caret', 'el-input__icon', 'el-icon-arrow-up']"></i>
<i v-if="showClose" class="el-select__caret el-input__icon el-icon-circle-close"
@click="clear"></i>
</template>
</el-input>
</div>
<template v-if="popupType === 'dialog'">
<el-dialog :title="popupTitle" :close-on-click-modal="false" :visible.sync="visible" v-if="visible"
class="JNPF-dialog JNPF-dialog_center" lock-scroll append-to-body :width='popupWidth'>
<el-dialog :title="popupTitle" :close-on-click-modal="false" :visible.sync="visible"
v-if="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll append-to-body
:width='popupWidth'>
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<el-col :span="10">
<el-form-item label="关键词">
<el-input v-model="listQuery.keyword" placeholder="请输入关键词查询" clearable @keyup.enter.native="search()"
class="search-input" />
<el-input v-model="listQuery.keyword" placeholder="请输入关键词查询" clearable
@keyup.enter.native="search()" class="search-input" />
</el-form-item>
</el-col>
<el-col :span="8">
@ -32,39 +35,42 @@
</el-form>
<div class="JNPF-common-search-box-right">
<el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" @click="initData()" />
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="initData()" />
</el-tooltip>
</div>
</el-row>
<JNPF-table v-loading="listLoading" :data="list" :border="false" highlight-current-row @row-click="rowClick"
:hasNO="false">
<JNPF-table v-loading="listLoading" :data="list" :border="false" highlight-current-row
@row-click="rowClick" :hasNO="false">
<el-table-column width="35">
<template slot-scope="scope">
<el-radio :label="scope.row[propsValue]" v-model="checked">&nbsp;</el-radio>
</template>
</el-table-column>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column :prop="item.value" :label="item.label" v-for="(item, i) in columnOptions" :key="i" />
<el-table-column :prop="item.value" :label="item.label" v-for="(item, i) in columnOptions"
:key="i" />
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" v-if="hasPage" />
<pagination :total="total" :page.sync="listQuery.currentPage"
:limit.sync="listQuery.pageSize" @pagination="initData" v-if="hasPage" />
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false" size="small">{{ $t('common.cancelButton') }}</el-button>
<el-button @click="visible = false"
size="small">{{ $t('common.cancelButton') }}</el-button>
<el-button type="primary" @click="select()" size="small">{{ $t('common.confirmButton') }}
</el-button>
</span>
</el-dialog>
</template>
<template v-if="popupType === 'drawer'">
<el-drawer :title="popupTitle" :visible.sync="visible" :wrapperClosable="false" ref="drawer" :size='popupWidth'
append-to-body class="JNPF-common-drawer">
<el-drawer :title="popupTitle" :visible.sync="visible" :wrapperClosable="false" ref="drawer"
:size='popupWidth' append-to-body class="JNPF-common-drawer">
<div class="JNPF-flex-main">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<el-col :span="10">
<el-form-item label="关键词">
<el-input v-model="listQuery.keyword" placeholder="请输入关键词查询" clearable @keyup.enter.native="search()"
class="search-input" />
<el-input v-model="listQuery.keyword" placeholder="请输入关键词查询" clearable
@keyup.enter.native="search()" class="search-input" />
</el-form-item>
</el-col>
<el-col :span="8">
@ -79,26 +85,29 @@
</el-form>
<div class="JNPF-common-search-box-right">
<el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" @click="initData()" />
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="initData()" />
</el-tooltip>
</div>
</el-row>
<JNPF-table v-loading="listLoading" :data="list" :border="false" highlight-current-row @row-click="rowClick"
:hasNO="false">
<JNPF-table v-loading="listLoading" :data="list" :border="false" highlight-current-row
@row-click="rowClick" :hasNO="false">
<el-table-column width="35">
<template slot-scope="scope">
<el-radio :label="scope.row[propsValue]" v-model="checked">&nbsp;</el-radio>
</template>
</el-table-column>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column :prop="item.value" :label="item.label" v-for="(item, i) in columnOptions" :key="i" />
<el-table-column :prop="item.value" :label="item.label"
v-for="(item, i) in columnOptions" :key="i" />
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" v-if="hasPage" />
<pagination :total="total" :page.sync="listQuery.currentPage"
:limit.sync="listQuery.pageSize" @pagination="initData" v-if="hasPage" />
<div class="drawer-footer">
<el-button @click="visible = false" size="small">{{ $t('common.cancelButton') }}
</el-button>
<el-button type="primary" @click="select()" size="small">{{ $t('common.confirmButton') }}
<el-button type="primary" @click="select()"
size="small">{{ $t('common.confirmButton') }}
</el-button>
</div>
</div>
@ -298,7 +307,7 @@ export default {
this.innerValue = ''
this.checkedRow = {}
this.$emit('input', this.checked)
this.$emit('change', this.checked, this.checkedRow)
this.$emit('change', this.checked, this.checkedRow, this.rowIndex)
dispatch.call(this, 'ElFormItem', 'el.form.change', this.checked)
event.stopPropagation();
},
@ -306,7 +315,7 @@ export default {
if (!this.checked) return
this.innerValue = this.checkedTxt
this.$emit('input', this.checked)
this.$emit('change', this.checked, this.checkedRow)
this.$emit('change', this.checked, this.checkedRow, this.rowIndex)
dispatch.call(this, 'ElFormItem', 'el.form.change', this.checked)
this.visible = false
},
@ -330,7 +339,7 @@ export default {
getDataInterfaceDataInfoByIds(this.interfaceId, query).then(res => {
const data = res.data && res.data.length ? res.data[0] : {};
this.innerValue = data[this.relationField]
if(!this.innerValue){
if (!this.innerValue) {
this.innerValue = this.innerName;
}
if (!this.field) return
@ -352,7 +361,7 @@ export default {
}
</script>
<style lang="scss" scoped>
>>>.el-dialog__body {
>>> .el-dialog__body {
height: 70vh;
padding: 0 0 10px !important;
display: flex;

@ -386,11 +386,12 @@ export default {
if (i > 1) {
setTimeout(() => {
e.name = undefined
}, 100);
e.mobilePhone = undefined
}, 1500);
this.$message({
message: '姓名不能重复',
type: 'error',
duration: 1000
duration: 1500
})
}
return

@ -101,7 +101,7 @@
</el-table-column>
<el-table-column prop="employeeNum" label="成员数量" align="center">
</el-table-column>
<el-table-column prop="belongUserName" label="主管人员" align="center">
<el-table-column prop="belongUserName" label="归属人员" align="center">
</el-table-column>
<el-table-column prop="description" label="描述" align="center">
</el-table-column>

@ -80,28 +80,12 @@
<el-table-column prop="name" label="业务组织名称" align="left" fixed="left">
</el-table-column>
<el-table-column prop="type" label="类型" align="center" fixed="left">
<template slot-scope="scope" v-if="scope.row.diffFlag == '1'">
{{ scope.row.businessLineType }}
</template>
<template slot-scope="scope" v-if="scope.row.diffFlag == '2'">
{{ scope.row.businessOrganizeType }}
</template>
</el-table-column>
<!-- <template slot-scope="scope" v-if="scope.row.diffFlag == '1'">
<el-table-column prop="businessLineType" label="类型" sortable align="center"
fixed="left">
</el-table-column>
</template>
<template slot-scope="scope" v-if="scope.row.diffFlag == '2'">
<el-table-column prop="businessOrganizeType" label="类型" sortable align="center"
fixed="left">
</el-table-column>
</template> -->
<el-table-column prop="status1" label="状态" align="center">
</el-table-column>
<el-table-column prop="employeeNum" label="成员数量" align="center">
</el-table-column>
<el-table-column prop="belongUserName" label="主管人员" align="center">
<el-table-column prop="belongUserName" label="归属人员" align="center">
</el-table-column>
<el-table-column prop="description" label="描述" align="center">
</el-table-column>

@ -1076,10 +1076,7 @@
changeData('contractlcommodity-taxRate', scope.$index)
"
placeholder="请输入"
:disabled="
judgeWrite('contractlcommodityList') ||
judgeWrite('contractlcommodityList-taxRate')
"
:disabled="true"
clearable
addonAfter="%"
:style="{ width: '100%' }"
@ -2430,7 +2427,6 @@ export default {
},
watch: {
// "dataForm.contractType": function(val, oldVal) {
// console.log(val);
// this.dataForm.subject = undefined;
// this.dataForm.subject2 = undefined;
// this.dataForm.subject3 = undefined;
@ -2574,17 +2570,35 @@ export default {
break;
}
this.dataForm.contractLCommodityList.push(item);
let filterArr = [];
this.dataForm.contractLCommodityList = this.dataForm.contractLCommodityList.filter(
val => {
if (filterArr.includes(val.commodityCode + val.procureUnit)) {
return false;
} else {
filterArr.push(val.commodityCode + val.procureUnit);
return true;
}
}
);
}
},
choiceRaw() {
this.BomgoodsBoxRawVisible = true;
// console.log('55555', this.dataForm.workOrderProductList)
let excludeIdList = [];
for (let i = 0; i < this.dataForm.contractLCommodityList.length; i++) {
excludeIdList.push(this.dataForm.contractLCommodityList[i].productId);
}
this.$nextTick(() => {
this.$refs.BomGoodsRawBox.init(excludeIdList);
if (!this.dataForm.businessId) {
this.$message({
message: "请先选择业务线",
type: "error",
duration: 1000
});
return;
}
this.$refs.BomGoodsRawBox.init(excludeIdList, this.dataForm.businessId);
});
},
chgContractType() {
@ -2600,6 +2614,7 @@ export default {
this.dataForm.subject = undefined;
this.dataForm.subject2 = undefined;
this.dataForm.subject3 = undefined;
this.dataForm.contractLCommodityList = [];
this.paramListSubject11[2]["defaultValue"] = this.dataForm.businessId;
this.paramListSubject21[2]["defaultValue"] = this.dataForm.businessId;
this.paramListSubject12[2]["defaultValue"] = this.dataForm.businessId;
@ -2677,16 +2692,12 @@ export default {
this.dataForm.contractLCommodityList[index][
"contractlcommodityprocureUnitOptions"
] = procureUnitOptionsArr;
// console.log(procureUnitOptionsArr)
// this.contractlcommodityprocureUnitOptions = procureUnitOptionsArr
}
})
.catch(() => {});
}
},
changeData(model, index) {
console.log("changeData:");
console.log(model);
this.fnChgTotalRate();
if (model == "contractlcommodity-productId") {
this.getProductInfoChg(index);
@ -2697,6 +2708,19 @@ export default {
if (model == "businessId") {
this.chgBusinessId();
}
if (model == "contractlcommodity-procureUnit") {
let filterArr = [];
this.dataForm.contractLCommodityList = this.dataForm.contractLCommodityList.filter(
val => {
if (filterArr.includes(val.commodityCode + val.procureUnit)) {
return false;
} else {
filterArr.push(val.commodityCode + val.procureUnit);
return true;
}
}
);
}
this.isEdit = false;
this.childIndex = index;
let modelAll = model.split("-");
@ -2832,7 +2856,6 @@ export default {
});
return;
}
console.log(e);
}
return isOk;
},

@ -1151,6 +1151,13 @@ export default {
message: "请输入",
trigger: "blur"
}
],
jnpf_jg_product_business_jnpf_businessLineId: [
{
required: true,
message: "请选择",
trigger: "change"
}
]
},
productTypeIdOptions: [],

@ -28,34 +28,30 @@
</el-row>
<JNPF-table v-loading="listLoading" :data="list" hasC @selection-change="handleSelectionChange"
:border="false">
<el-table-column prop="commodityName" label="商品名称" align="left">
<el-table-column prop="name" label="商品名称" align="left">
</el-table-column>
<!-- <el-table-column prop="code" label="商品编码" align="left">
<el-table-column prop="code" label="商品编码" align="left">
</el-table-column>
<el-table-column prop="productTypeId" label="商品类型" align="left">
</el-table-column>
<el-table-column prop="shortName" label="商品简称" align="left">
</el-table-column> -->
</el-table-column>
<el-table-column prop="spec" label="商品规格" align="left">
</el-table-column>
<!-- <el-table-column prop="barCode" label="商品条码" align="left">
<el-table-column prop="barCode" label="商品条码" align="left">
</el-table-column>
<el-table-column prop="inventoryType" label="存货类型" align="left">
</el-table-column> -->
<!-- <el-table-column prop="brandId" label="品牌" align="left">
</el-table-column> -->
<!-- <el-table-column prop="productCategoryId" label="商品分类" align="left">
</el-table-column> -->
<!-- <el-table-column prop="area" label="产地" align="left">
</el-table-column>
<el-table-column prop="firstSupplierId" label="首选供应商" align="left">
</el-table-column> -->
<!-- <el-table-column prop="deliveryType" label="配送方式" align="left">
</el-table-column> -->
<!-- <el-table-column prop="salesMainUnitIds" label="销售单位" align="left">
</el-table-column> -->
<!-- <el-table-column prop="inventoryUnitIds" label="库存单位" align="left">
<el-table-column prop="brandId" label="品牌" align="left">
</el-table-column>
<el-table-column prop="productCategoryId" label="商品分类" align="left">
</el-table-column>
<el-table-column prop="area" label="产地" align="left">
</el-table-column>
<!-- <el-table-column prop="firstSupplierId" label="首选供应商" align="left">
</el-table-column> -->
<el-table-column prop="deliveryType" label="配送方式" align="left">
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="init" />
@ -103,12 +99,8 @@ export default {
excludeIdList: this.excludeIdList,
dataType: 0,
}
/* GoodsList(query).then(res => {
this.list = res.data.list
this.listLoading = false
}) */
request({
url: `/api/scm/BusinessOrder/productByContractPopup`,
url: `/api/scm/ProductWarehouse/getBomProductlist`,
method: 'post',
data: query
}).then(res => {

@ -99,19 +99,23 @@ export default {
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: ""
sidx: "",
businessLineIdArr: ""
},
excludeIdList: [],
checked: []
};
},
methods: {
init(excludeIdList, val) {
init(excludeIdList, business_line_id) {
this.visible = true;
this.listLoading = true;
if (excludeIdList && excludeIdList instanceof Array) {
this.excludeIdList = excludeIdList;
if (!excludeIdList.page) {
this.listQuery.businessLineIdArr = business_line_id;
}
}
console.log(this.listQuery);
let query = {
...this.listQuery,
dataType: 0,
@ -150,7 +154,6 @@ export default {
this.$emit("refreshDataList", this.checked);
},
handleSelectionChange(val) {
console.log(val);
this.checked = val;
}
}

@ -1132,7 +1132,7 @@ export default {
transportModeProps: { "label": "fullName", "value": "id" },
deliveryTypeOptions: [{ "fullName": "退供发货", "id": "1" }],
deliveryTypeProps: { "label": "fullName", "value": "id" },
businessIdcolumnOptions: [{ "label": "订单编号", "value": "returnCargoCode" },],
businessIdcolumnOptions: [{ "label": "订单编号", "value": "returnCargoCode" }, { "label": "供应商名称", "value": "supplyName" }, { "label": "单据类型", "value": "documentTypeReturn" }, { "label": "业务线", "value": "businessLineName" }, { "label": "状态", "value": "documentStatusReturn" }],
reservedFields1columnOptions: [{ "label": "业务线编码", "value": "code" }, { "label": "业务线名称", "value": "name" },],
subjectIdcolumnOptions: [{ "label": "客户编码", "value": "code" }, { "label": "客户名称", "value": "name" },],
enterpriseIdcolumnOptions: [{ "label": "机构编码", "value": "f_en_code" }, { "label": "机构名称", "value": "f_full_name" },],

@ -187,12 +187,12 @@
v-if="judgeRequired('voucherproductList-grossWeight')">*</span>毛重
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.grossWeight"
<JnpfInputNumber v-model="scope.row.grossWeight"
@change="changeData('voucherproduct-grossWeight', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('voucherproductList') || judgeWrite('voucherproductList-grossWeight')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
:precision="6" :step="1" :min="0" @input="UpdateWeight(scope.row)">
</JnpfInputNumber>
</template>
</el-table-column>
<el-table-column label="皮重" v-if="judgeShow('voucherproduct-tareWeight')"
@ -202,12 +202,12 @@
v-if="judgeRequired('voucherproductList-tareWeight')">*</span>皮重
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.tareWeight"
<JnpfInputNumber v-model="scope.row.tareWeight"
@change="changeData('voucherproduct-tareWeight', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('voucherproductList') || judgeWrite('voucherproductList-tareWeight')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
:precision="6" :step="1" :min="0" @input="UpdateWeight(scope.row)">
</JnpfInputNumber>
</template>
</el-table-column>
<el-table-column label="扣重" v-if="judgeShow('voucherproduct-buckleWeight')"
@ -217,12 +217,12 @@
v-if="judgeRequired('voucherproductList-buckleWeight')">*</span>扣重
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.buckleWeight"
<JnpfInputNumber v-model="scope.row.buckleWeight"
@change="changeData('voucherproduct-buckleWeight', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('voucherproductList') || judgeWrite('voucherproductList-buckleWeight')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
:precision="6" :step="1" :min="0" @input="UpdateWeight(scope.row)">
</JnpfInputNumber>
</template>
</el-table-column>
<el-table-column label="净重" v-if="judgeShow('voucherproduct-netWeight')"
@ -232,12 +232,12 @@
v-if="judgeRequired('voucherproductList-netWeight')">*</span>净重
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.netWeight"
<JnpfInputNumber v-model="scope.row.netWeight"
@change="changeData('voucherproduct-netWeight', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('voucherproductList') || judgeWrite('voucherproductList-netWeight')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
:precision="6" :step="1" :min="0">
</JnpfInputNumber>
</template>
</el-table-column>
<el-table-column label="备注" v-if="judgeShow('voucherproduct-remark')" prop="remark">
@ -899,6 +899,10 @@ export default {
},
mounted() { },
methods: {
//
UpdateWeight(row) {
row.netWeight = this.jnpf.floatSub(this.jnpf.floatSub(parseFloat(row.grossWeight), parseFloat(row.tareWeight)), parseFloat(row.buckleWeight)) //-- =
},
//
poundlistUploadSuccess(val, res) {
if (res && res.data) {
@ -1054,6 +1058,10 @@ export default {
let isOk = true;
for (let i = 0; i < this.dataForm.voucherProductList.length; i++) {
const e = this.dataForm.voucherProductList[i];
var tareWeight = e.tareWeight;//
var grossWeight = e.grossWeight;//
var buckleWeight = e.buckleWeight;//
var netWeight = e.netWeight;//
if (!e.productId) {
this.$message({
message: '商品不能为空',
@ -1063,6 +1071,33 @@ export default {
isOk = false
break
}
if (grossWeight < tareWeight + buckleWeight + netWeight) {
this.$message({
message: '毛重不得小于皮重+扣重+净重',
type: 'error',
duration: 1000
})
isOk = false
break
}
if (buckleWeight >= netWeight) {
this.$message({
message: '扣重不得大于净重',
type: 'error',
duration: 1000
})
isOk = false
break
}
if (buckleWeight >= grossWeight) {
this.$message({
message: '扣重不得大于毛重',
type: 'error',
duration: 1000
})
isOk = false
break
}
}
return isOk;
},

@ -284,7 +284,7 @@
<jnpf-form-tip-item label="发货地址" v-if="judgeShow('shippingAddress')"
prop="shippingAddress">
<JnpfInput v-model="dataForm.shippingAddress" @change="true" placeholder="请输入"
:disabled="judgeWrite('shippingAddress')" clearable :style="{ width: '100%' }">
:disabled="true" clearable :style="{ width: '100%' }">
</JnpfInput>
</jnpf-form-tip-item>
</el-col>

@ -1643,10 +1643,11 @@ export default {
initProductList(list) {
for (let i = 0; i < list.length; i++) {
const e = list[i];
debugger
let item = {
productId: e.productId,
productId: e.id,
spec: e.spec,
inventoryUnitId: e.inventoryUnitId1,
inventoryUnitId: e.inventoryUnitIds,
realBound: e.realBound,
useBound: e.useBound,
purchaseOrderQuantityDown: e.purchaseOrderQuantityDown,
@ -1654,16 +1655,16 @@ export default {
purchaseOrderMultiple: e.purchaseOrderMultiple,
businessNum: e.businessNum,
businessPrice: e.businessPrice,
tax: e.tax,
tax: e.inputTaxRate,
taxCount: e.taxCount,
// notTaxPrice: e.notTaxPrice,
// notTaxCount: e.notTaxCount,
// lastSalePrice: e.lastSalePrice,
notTaxPrice: this.jnpf.floatDiv(e.businessPrice, this.jnpf.floatAdd(1, this.jnpf.floatDiv(e.tax, 100))).toFixed(6), //
notTaxCount: this.jnpf.floatMul(e.businessNum, this.jnpf.floatDiv(e.businessPrice, this.jnpf.floatAdd(1, this.jnpf.floatDiv(e.tax, 100))).toFixed(6)).toFixed(2) //
// notTaxPrice: this.jnpf.floatDiv(e.businessPrice, this.jnpf.floatAdd(1, this.jnpf.floatDiv(e.tax, 100))).toFixed(6), //
// notTaxCount: this.jnpf.floatMul(e.businessNum, this.jnpf.floatDiv(e.businessPrice, this.jnpf.floatAdd(1, this.jnpf.floatDiv(e.tax, 100))).toFixed(6)).toFixed(2) //
}
if (e.orderMainUnitId1) {
var unitName = JSON.parse(e.orderMainUnitId1)
if (e.orderMainUnitIds) {
var unitName = JSON.parse(e.orderMainUnitIds)
var optArray = [];
for (let i = 0; i < unitName.length; i++) {
item.salesMainUnitId = unitName[0]

@ -1852,23 +1852,33 @@ export default {
},
deliveryvoucherrelationExist() {
let isOk = true;
for (
let i = 0;
i < this.dataForm.deliveryVoucherRelationList.length;
i++
) {
for (let i = 0; i < this.dataForm.deliveryVoucherRelationList.length; i++) {
const e = this.dataForm.deliveryVoucherRelationList[i];
}
return isOk;
},
deliveryproductrelationExist() {
let isOk = true;
for (
let i = 0;
i < this.dataForm.deliveryProductRelationList.length;
i++
) {
for (let i = 0; i < this.dataForm.deliveryProductRelationList.length; i++) {
const e = this.dataForm.deliveryProductRelationList[i];
if (!e.cargoId) {
this.$message({
message: '货区不能为空',
type: 'error',
duration: 1000
});
isOk = false
break
}
if (!e.deliveryNum) {
this.$message({
message: '收货数量不能为空',
type: 'error',
duration: 1000
});
isOk = false
break
}
}
return isOk;
},

@ -186,12 +186,12 @@
v-if="judgeRequired('voucherproductList-grossWeight')">*</span>毛重
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.grossWeight"
<JnpfInputNumber v-model="scope.row.grossWeight"
@change="changeData('voucherproduct-grossWeight', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('voucherproductList') || judgeWrite('voucherproductList-grossWeight')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
:precision="6" :step="1" :min="0" @input="UpdateWeight(scope.row)">
</JnpfInputNumber>
</template>
</el-table-column>
<el-table-column label="皮重" v-if="judgeShow('voucherproduct-tareWeight')"
@ -201,12 +201,12 @@
v-if="judgeRequired('voucherproductList-tareWeight')">*</span>皮重
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.tareWeight"
<JnpfInputNumber v-model="scope.row.tareWeight"
@change="changeData('voucherproduct-tareWeight', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('voucherproductList') || judgeWrite('voucherproductList-tareWeight')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
:precision="6" :step="1" :min="0" @input="UpdateWeight(scope.row)">
</JnpfInputNumber>
</template>
</el-table-column>
<el-table-column label="扣重" v-if="judgeShow('voucherproduct-buckleWeight')"
@ -216,12 +216,12 @@
v-if="judgeRequired('voucherproductList-buckleWeight')">*</span>扣重
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.buckleWeight"
<JnpfInputNumber v-model="scope.row.buckleWeight"
@change="changeData('voucherproduct-buckleWeight', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('voucherproductList') || judgeWrite('voucherproductList-buckleWeight')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
:precision="6" :step="1" :min="0" @input="UpdateWeight(scope.row)">
</JnpfInputNumber>
</template>
</el-table-column>
<el-table-column label="净重" v-if="judgeShow('voucherproduct-netWeight')"
@ -231,12 +231,12 @@
v-if="judgeRequired('voucherproductList-netWeight')">*</span>净重
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.netWeight"
<JnpfInputNumber v-model="scope.row.netWeight"
@change="changeData('voucherproduct-netWeight', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('voucherproductList') || judgeWrite('voucherproductList-netWeight')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
:precision="6" :step="1" :min="0">
</JnpfInputNumber>
</template>
</el-table-column>
<el-table-column label="备注" v-if="judgeShow('voucherproduct-remark')" prop="remark">
@ -920,6 +920,10 @@ export default {
this.initPurchaseData();
},
methods: {
//
UpdateWeight(row) {
row.netWeight = this.jnpf.floatSub(this.jnpf.floatSub(parseFloat(row.grossWeight), parseFloat(row.tareWeight)), parseFloat(row.buckleWeight)) //-- =
},
initPurchaseData() {
const data = this.setting.selectData
if (!data) { return }
@ -1085,6 +1089,10 @@ export default {
let isOk = true;
for (let i = 0; i < this.dataForm.voucherProductList.length; i++) {
const e = this.dataForm.voucherProductList[i];
var tareWeight = e.tareWeight;//
var grossWeight = e.grossWeight;//
var buckleWeight = e.buckleWeight;//
var netWeight = e.netWeight;//
if (!e.productId) {
this.$message({
message: '商品不能为空',
@ -1094,6 +1102,33 @@ export default {
isOk = false
break
}
if (grossWeight < tareWeight + buckleWeight + netWeight) {
this.$message({
message: '毛重不得小于皮重+扣重+净重',
type: 'error',
duration: 1000
})
isOk = false
break
}
if (buckleWeight >= netWeight) {
this.$message({
message: '扣重不得大于净重',
type: 'error',
duration: 1000
})
isOk = false
break
}
if (buckleWeight >= grossWeight) {
this.$message({
message: '扣重不得大于毛重',
type: 'error',
duration: 1000
})
isOk = false
break
}
}
return isOk;
},

@ -1195,7 +1195,7 @@ export default {
transportModeProps: { "label": "fullName", "value": "id" },
documentTypeOptions: [{ "fullName": "采购退货", "id": "1" }],
documentTypeProps: { "label": "fullName", "value": "id" },
businessIdcolumnOptions: [{ "label": "订单编号", "value": "code" },],
businessIdcolumnOptions: [{ "label": "订单编号", "value": "code" }, { "label": "供应商名称", "value": "subjectName" }, { "label": "单据类型", "value": "orderType1" }, { "label": "合同名称", "value": "contractName" }, { "label": "状态", "value": "purchaseStatus" },],
reservedFields1columnOptions: [{ "label": "业务线编码", "value": "code" }, { "label": "业务线名称", "value": "name" },],
subjectIdcolumnOptions: [{ "label": "客户编码", "value": "code" }, { "label": "客户名称", "value": "name" },],
enterpriseIdcolumnOptions: [{ "label": "机构编码", "value": "f_en_code" }, { "label": "机构名称", "value": "f_full_name" },],

@ -324,7 +324,7 @@
<el-table :data="dataForm.deliveryVoucherRelationList" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="凭证编号" v-if="judgeShow('deliveryvoucherrelation-voucherId')"
prop="voucherId">
prop="voucherId" width="200">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryvoucherrelationList-voucherId')">*</span>凭证编号
@ -345,7 +345,8 @@
</template>
</el-table-column>
<el-table-column label="单据类型"
v-if="judgeShow('deliveryvoucherrelation-documentType')" prop="documentType">
v-if="judgeShow('deliveryvoucherrelation-documentType')" prop="documentType"
width="150">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryvoucherrelationList-documentType')">*</span>单据类型
@ -362,7 +363,8 @@
</template>
</el-table-column>
<el-table-column label="凭证类型"
v-if="judgeShow('deliveryvoucherrelation-voucherType')" prop="voucherType">
v-if="judgeShow('deliveryvoucherrelation-voucherType')" prop="voucherType"
width="150">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryvoucherrelationList-voucherType')">*</span>凭证类型
@ -379,7 +381,7 @@
</template>
</el-table-column>
<el-table-column label="磅单编号" v-if="judgeShow('deliveryvoucherrelation-poundCode')"
prop="poundCode">
prop="poundCode" width="150">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryvoucherrelationList-poundCode')">*</span>磅单编号
@ -395,7 +397,8 @@
</el-table-column>
<el-table-column label="磅单时间"
v-if="judgeShow('deliveryvoucherrelation-poundlistTime')" prop="poundlistTime">
v-if="judgeShow('deliveryvoucherrelation-poundlistTime')" prop="poundlistTime"
width="150">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryvoucherrelationList-poundlistTime')">*</span>磅单时间
@ -411,7 +414,7 @@
</template>
</el-table-column>
<el-table-column label="车牌号" v-if="judgeShow('deliveryvoucherrelation-vehicleId')"
prop="vehicleId">
prop="vehicleId" width="150">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryvoucherrelationList-vehicleId')">*</span>车牌号
@ -435,7 +438,7 @@
</template>
</el-table-column>
<el-table-column label="商品名称" v-if="judgeShow('deliveryvoucherrelation-productId')"
prop="productId">
prop="productId" width="250">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryvoucherrelationList-productId')">*</span>商品名称
@ -445,18 +448,16 @@
@change="changeData('deliveryvoucherrelation-productId', scope.$index)"
:rowIndex="scope.$index" :formData="dataForm"
:templateJson="interfaceRes.deliveryvoucherrelationproductId"
placeholder="请选择"
:disabled="judgeWrite('deliveryvoucherrelationList') || judgeWrite('deliveryvoucherrelationList-productId')"
propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog"
relationField='name' :field="'productId' + scope.$index"
interfaceId="529919666429100229" :pageSize="20"
:columnOptions="deliveryvoucherrelationproductIdcolumnOptions" clearable
:style='{ "width": "100%" }'>
placeholder="请选择" :disabled="true" propsValue="id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField='name'
:field="'productId' + scope.$index" interfaceId="529919666429100229"
:pageSize="20" :columnOptions="deliveryvoucherrelationproductIdcolumnOptions"
clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
</template>
</el-table-column>
<el-table-column label="规格" v-if="judgeShow('deliveryvoucherrelation-spec')"
prop="spec">
prop="spec" width="150">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryvoucherrelationList-spec')">*</span>规格
@ -464,14 +465,12 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.spec"
@change="changeData('deliveryvoucherrelation-spec', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('deliveryvoucherrelationList') || judgeWrite('deliveryvoucherrelationList-spec')"
clearable :style='{ "width": "100%" }'>
placeholder="请输入" :disabled="true" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="单位" v-if="judgeShow('deliveryvoucherrelation-unit')"
prop="unit">
prop="unit" width="100">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryvoucherrelationList-unit')">*</span>单位
@ -479,14 +478,12 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.unit"
@change="changeData('deliveryvoucherrelation-unit', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('deliveryvoucherrelationList') || judgeWrite('deliveryvoucherrelationList-unit')"
clearable :style='{ "width": "100%" }'>
placeholder="请输入" :disabled="true" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="毛重" v-if="judgeShow('deliveryvoucherrelation-grossWeight')"
prop="grossWeight">
prop="grossWeight" width="150">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryvoucherrelationList-grossWeight')">*</span>毛重
@ -494,14 +491,12 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.grossWeight"
@change="changeData('deliveryvoucherrelation-grossWeight', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('deliveryvoucherrelationList') || judgeWrite('deliveryvoucherrelationList-grossWeight')"
clearable :style='{ "width": "100%" }'>
placeholder="请输入" :disabled="true" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="皮重" v-if="judgeShow('deliveryvoucherrelation-tareWeight')"
prop="tareWeight">
prop="tareWeight" width="150">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryvoucherrelationList-tareWeight')">*</span>皮重
@ -509,14 +504,12 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.tareWeight"
@change="changeData('deliveryvoucherrelation-tareWeight', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('deliveryvoucherrelationList') || judgeWrite('deliveryvoucherrelationList-tareWeight')"
clearable :style='{ "width": "100%" }'>
placeholder="请输入" :disabled="true" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="扣重" v-if="judgeShow('deliveryvoucherrelation-buckleWeight')"
prop="buckleWeight">
prop="buckleWeight" width="150">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryvoucherrelationList-buckleWeight')">*</span>扣重
@ -524,14 +517,12 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.buckleWeight"
@change="changeData('deliveryvoucherrelation-buckleWeight', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('deliveryvoucherrelationList') || judgeWrite('deliveryvoucherrelationList-buckleWeight')"
clearable :style='{ "width": "100%" }'>
placeholder="请输入" :disabled="true" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="净重" v-if="judgeShow('deliveryvoucherrelation-netWeight')"
prop="netWeight">
prop="netWeight" width="150">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryvoucherrelationList-netWeight')">*</span>净重
@ -539,14 +530,12 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.netWeight"
@change="changeData('deliveryvoucherrelation-netWeight', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('deliveryvoucherrelationList') || judgeWrite('deliveryvoucherrelationList-netWeight')"
clearable :style='{ "width": "100%" }'>
placeholder="请输入" :disabled="true" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="备注" v-if="judgeShow('deliveryvoucherrelation-remark')"
prop="remark">
prop="remark" width="150">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryvoucherrelationList-remark')">*</span>备注
@ -582,7 +571,7 @@
<el-table :data="dataForm.deliveryProductRelationList" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="商品名称" v-if="judgeShow('deliveryproductrelation-productId')"
prop="productId">
prop="productId" width="250">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryproductrelationList-productId')">*</span>商品名称
@ -592,18 +581,16 @@
@change="changeData('deliveryproductrelation-productId', scope.$index)"
:rowIndex="scope.$index" :formData="dataForm"
:templateJson="interfaceRes.deliveryproductrelationproductId"
placeholder="请选择"
:disabled="judgeWrite('deliveryproductrelationList') || judgeWrite('deliveryproductrelationList-productId')"
propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog"
relationField='name' :field="'productId' + scope.$index"
interfaceId="529919666429100229" :pageSize="20"
:columnOptions="deliveryproductrelationproductIdcolumnOptions" clearable
:style='{ "width": "100%" }'>
placeholder="请选择" :disabled="true" propsValue="id" popupWidth="800px"
popupTitle="选择数据" popupType="dialog" relationField='name'
:field="'productId' + scope.$index" interfaceId="529919666429100229"
:pageSize="20" :columnOptions="deliveryproductrelationproductIdcolumnOptions"
clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
</template>
</el-table-column>
<el-table-column label="规格" v-if="judgeShow('deliveryproductrelation-spec')"
prop="spec">
prop="spec" width="150">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryproductrelationList-spec')">*</span>规格
@ -611,15 +598,13 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.spec"
@change="changeData('deliveryproductrelation-spec', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('deliveryproductrelationList') || judgeWrite('deliveryproductrelationList-spec')"
clearable :style='{ "width": "100%" }'>
placeholder="请输入" :disabled="true" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="库存单位"
v-if="judgeShow('deliveryproductrelation-inventoryUnitId')"
prop="inventoryUnitId">
v-if="judgeShow('deliveryproductrelation-inventoryUnitId')" prop="inventoryUnitId"
width="100">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryproductrelationList-inventoryUnitId')">*</span>库存单位
@ -627,15 +612,13 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.inventoryUnitId"
@change="changeData('deliveryproductrelation-inventoryUnitId', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('deliveryproductrelationList') || judgeWrite('deliveryproductrelationList-inventoryUnitId')"
clearable :style='{ "width": "100%" }'>
placeholder="请输入" :disabled="true" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="销售单位"
v-if="judgeShow('deliveryproductrelation-salesMainUnitId')"
prop="salesMainUnitId">
v-if="judgeShow('deliveryproductrelation-salesMainUnitId')" prop="salesMainUnitId"
width="100">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryproductrelationList-salesMainUnitId')">*</span>销售单位
@ -643,14 +626,12 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.salesMainUnitId"
@change="changeData('deliveryproductrelation-salesMainUnitId', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('deliveryproductrelationList') || judgeWrite('deliveryproductrelationList-salesMainUnitId')"
clearable :style='{ "width": "100%" }'>
placeholder="请输入" :disabled="true" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="销售数量" v-if="judgeShow('deliveryproductrelation-saleNum')"
prop="saleNum">
prop="saleNum" width="150">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryproductrelationList-saleNum')">*</span>销售数量
@ -658,14 +639,13 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.saleNum"
@change="changeData('deliveryproductrelation-saleNum', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('deliveryproductrelationList') || judgeWrite('deliveryproductrelationList-saleNum')"
clearable :style='{ "width": "100%" }'>
placeholder="请输入" :disabled="true" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="发货单位"
v-if="judgeShow('deliveryproductrelation-deliveryUnit')" prop="deliveryUnit">
v-if="judgeShow('deliveryproductrelation-deliveryUnit')" prop="deliveryUnit"
width="100">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryproductrelationList-deliveryUnit')">*</span>发货单位
@ -673,16 +653,14 @@
<template slot-scope="scope">
<JnpfSelect v-model="scope.row.deliveryUnit"
@change="changeData('deliveryproductrelation-deliveryUnit', scope.$index)"
placeholder="请选择"
:disabled="judgeWrite('deliveryproductrelationList') || judgeWrite('deliveryproductrelationList-deliveryUnit')"
clearable :style='{ "width": "100%" }'
placeholder="请选择" :disabled="true" clearable :style='{ "width": "100%" }'
:options="deliveryproductrelationdeliveryUnitOptions"
:props="deliveryproductrelationdeliveryUnitProps">
</JnpfSelect>
</template>
</el-table-column>
<el-table-column label="毛重" v-if="judgeShow('deliveryproductrelation-grossWeight')"
prop="grossWeight">
prop="grossWeight" width="150">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryproductrelationList-grossWeight')">*</span>毛重
@ -690,14 +668,12 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.grossWeight"
@change="changeData('deliveryproductrelation-grossWeight', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('deliveryproductrelationList') || judgeWrite('deliveryproductrelationList-grossWeight')"
clearable :style='{ "width": "100%" }'>
placeholder="请输入" :disabled="true" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="皮重" v-if="judgeShow('deliveryproductrelation-tareWeight')"
prop="tareWeight">
prop="tareWeight" width="150">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryproductrelationList-tareWeight')">*</span>皮重
@ -705,14 +681,12 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.tareWeight"
@change="changeData('deliveryproductrelation-tareWeight', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('deliveryproductrelationList') || judgeWrite('deliveryproductrelationList-tareWeight')"
clearable :style='{ "width": "100%" }'>
placeholder="请输入" :disabled="true" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="扣重" v-if="judgeShow('deliveryproductrelation-buckleWeight')"
prop="buckleWeight">
prop="buckleWeight" width="150">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryproductrelationList-buckleWeight')">*</span>扣重
@ -720,14 +694,12 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.buckleWeight"
@change="changeData('deliveryproductrelation-buckleWeight', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('deliveryproductrelationList') || judgeWrite('deliveryproductrelationList-buckleWeight')"
clearable :style='{ "width": "100%" }'>
placeholder="请输入" :disabled="true" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="净重" v-if="judgeShow('deliveryproductrelation-netWeight')"
prop="netWeight">
prop="netWeight" width="150">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryproductrelationList-netWeight')">*</span>净重
@ -735,34 +707,32 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.netWeight"
@change="changeData('deliveryproductrelation-netWeight', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('deliveryproductrelationList') || judgeWrite('deliveryproductrelationList-netWeight')"
clearable :style='{ "width": "100%" }'>
placeholder="请输入" :disabled="true" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="货区名称" v-if="judgeShow('deliveryproductrelation-cargoId')"
prop="cargoId">
prop="cargoId" width="200">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryproductrelationList-cargoId')">*</span>货区名称
</template>
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.cargoId"
@change="changeData('deliveryproductrelation-cargoId', scope.$index)"
<JnpfPopupSelect v-model="scope.row.cargoId" @change="batchNoMethod"
:rowIndex="scope.$index" :formData="dataForm"
:templateJson="interfaceRes.deliveryproductrelationcargoId" placeholder="请选择"
:disabled="judgeWrite('deliveryproductrelationList') || judgeWrite('deliveryproductrelationList-cargoId')"
propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog"
relationField='cargo_name' :field="'cargoId' + scope.$index"
interfaceId="530700536261903749" :pageSize="20"
relationField='cargoName' :field="'cargoId' + scope.$index"
interfaceId="549927783325776837" :pageSize="20"
:columnOptions="deliveryproductrelationcargoIdcolumnOptions" clearable
:style='{ "width": "100%" }'>
</JnpfPopupSelect>
</template>
</el-table-column>
<el-table-column label="发货数量"
v-if="judgeShow('deliveryproductrelation-deliveryNum')" prop="deliveryNum">
v-if="judgeShow('deliveryproductrelation-deliveryNum')" prop="deliveryNum"
width="150">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryproductrelationList-deliveryNum')">*</span>发货数量
@ -777,7 +747,7 @@
</template>
</el-table-column>
<el-table-column label="批次号" v-if="judgeShow('deliveryproductrelation-batchNo')"
prop="batchNo">
prop="batchNo" width="200">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryproductrelationList-batchNo')">*</span>批次号
@ -785,46 +755,44 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.batchNo"
@change="changeData('deliveryproductrelation-batchNo', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('deliveryproductrelationList') || judgeWrite('deliveryproductrelationList-batchNo')"
clearable :style='{ "width": "100%" }'>
placeholder="请输入" :disabled="true" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="生产日期"
v-if="judgeShow('deliveryproductrelation-produceTime')" prop="produceTime">
<el-table-column label="生产日期" v-if="judgeShow('warehousingproduct-produceDate')"
prop="produceDate" width="200">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryproductrelationList-produceTime')">*</span>生产日期
v-if="judgeRequired('warehousingproductList-produceDate')">*</span>生产日期
</template>
<template slot-scope="scope">
<JnpfDatePicker v-model="scope.row.produceTime"
@change="changeData('deliveryproductrelation-produceTime', scope.$index)"
:startTime="dateTime(false, 1, 1, '', '')"
:endTime="dateTime(false, 1, 1, '', '')" placeholder="请选择"
:disabled="judgeWrite('deliveryproductrelationList') || judgeWrite('deliveryproductrelationList-produceTime')"
clearable :style='{ "width": "100%" }' type="date" format="yyyy-MM-dd">
<JnpfDatePicker v-model="scope.row.produceDate" @change="
changeData(
'warehousingproduct-produceDate',
scope.$index
)
" :startTime="dateTime(false, 1, 1, '', '')"
:endTime="dateTime(false, 1, 1, '', '')" placeholder="请选择" :disabled="true
" clearable :style="{ width: '100%' }" type="date" format="yyyy-MM-dd">
</JnpfDatePicker>
</template>
</el-table-column>
<el-table-column label="退货单价" v-if="judgeShow('deliveryproductrelation-returnUnit')"
prop="returnUnit">
<el-table-column label="货单价" v-if="judgeShow('deliveryproductrelation-returnUnit')"
prop="returnUnit" width="150">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryproductrelationList-returnUnit')">*</span>退货单价
v-if="judgeRequired('deliveryproductrelationList-returnUnit')">*</span>货单价
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.returnUnit"
@change="changeData('deliveryproductrelation-returnUnit', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('deliveryproductrelationList') || judgeWrite('deliveryproductrelationList-returnUnit')"
clearable :style='{ "width": "100%" }'>
placeholder="请输入" :disabled="true" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="税率" v-if="judgeShow('deliveryproductrelation-tax')"
prop="tax">
prop="tax" width="100">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryproductrelationList-tax')">*</span>税率
@ -832,14 +800,12 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.tax"
@change="changeData('deliveryproductrelation-tax', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('deliveryproductrelationList') || judgeWrite('deliveryproductrelationList-tax')"
clearable :style='{ "width": "100%" }'>
placeholder="请输入" :disabled="true" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="含税小计" v-if="judgeShow('deliveryproductrelation-taxCount')"
prop="taxCount">
prop="taxCount" width="150">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryproductrelationList-taxCount')">*</span>含税小计
@ -847,14 +813,13 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.taxCount"
@change="changeData('deliveryproductrelation-taxCount', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('deliveryproductrelationList') || judgeWrite('deliveryproductrelationList-taxCount')"
clearable :style='{ "width": "100%" }'>
placeholder="请输入" :disabled="true" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="不含税单价"
v-if="judgeShow('deliveryproductrelation-notTaxPrice')" prop="notTaxPrice">
v-if="judgeShow('deliveryproductrelation-notTaxPrice')" prop="notTaxPrice"
width="150">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryproductrelationList-notTaxPrice')">*</span>不含税单价
@ -862,14 +827,13 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.notTaxPrice"
@change="changeData('deliveryproductrelation-notTaxPrice', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('deliveryproductrelationList') || judgeWrite('deliveryproductrelationList-notTaxPrice')"
clearable :style='{ "width": "100%" }'>
placeholder="请输入" :disabled="true" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="不含税小计"
v-if="judgeShow('deliveryproductrelation-notTaxCount')" prop="notTaxCount">
v-if="judgeShow('deliveryproductrelation-notTaxCount')" prop="notTaxCount"
width="150">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('deliveryproductrelationList-notTaxCount')">*</span>不含税小计
@ -877,9 +841,7 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.notTaxCount"
@change="changeData('deliveryproductrelation-notTaxCount', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('deliveryproductrelationList') || judgeWrite('deliveryproductrelationList-notTaxCount')"
clearable :style='{ "width": "100%" }'>
placeholder="请输入" :disabled="true" clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
@ -1123,7 +1085,7 @@ export default {
transportModeProps: { "label": "fullName", "value": "id" },
deliveryTypeOptions: [{ "fullName": "销售发货", "id": "2" }],
deliveryTypeProps: { "label": "fullName", "value": "id" },
businessIdcolumnOptions: [{ "label": "订单编号", "value": "code" },],
businessIdcolumnOptions: [{ "label": "订单编号", "value": "code" }, { "label": "客户名称", "value": "subjectName" }, { "label": "单据类型", "value": "orderType1" }, { "label": "配送方式", "value": "deliveryType1" }, { "label": "状态", "value": "saleStatus" },],
reservedFields1columnOptions: [{ "label": "业务线编码", "value": "code" }, { "label": "业务线名称", "value": "name" },],
subjectIdcolumnOptions: [{ "label": "客户编码", "value": "code" }, { "label": "客户名称", "value": "name" },],
enterpriseIdcolumnOptions: [{ "label": "机构编码", "value": "f_en_code" }, { "label": "机构名称", "value": "f_full_name" },],
@ -1138,7 +1100,10 @@ export default {
deliveryproductrelationproductIdcolumnOptions: [{ "label": "商品编码", "value": "code" }, { "label": "商品名称", "value": "name" },],
deliveryproductrelationdeliveryUnitOptions: [{ "fullName": "吨", "id": "1" }, { "fullName": "千克", "id": "2" }],
deliveryproductrelationdeliveryUnitProps: { "label": "fullName", "value": "id" },
deliveryproductrelationcargoIdcolumnOptions: [{ "label": "货区类型", "value": "cargo_type" }, { "label": "货区名称", "value": "cargo_name" },],
deliveryproductrelationcargoIdcolumnOptions: [{ label: "货区类型", value: "cargoType" },
{ label: "货区名称", value: "cargoName" },
{ label: "批次号", value: "batch_number" },
{ label: "库存数量", value: "inventory_number" }],
vouchervehiclevehicleIdcolumnOptions: [{ "label": "车牌号", "value": "vehicle_number" }, { "label": "驾驶员", "value": "name" }, { "label": "电话", "value": "mobile" },],
childIndex: -1,
isEdit: false,
@ -1178,7 +1143,26 @@ export default {
deliveryproductrelationtareWeight: [],
deliveryproductrelationbuckleWeight: [],
deliveryproductrelationnetWeight: [],
deliveryproductrelationcargoId: [{ "fieldName": "", "field": "businessOrganizeId", "defaultValue": "", "jnpfKey": "popupSelect", "dataType": "varchar", "id": "AyAmdw1", "relationField": "warehouseId", "required": "0" }],
deliveryproductrelationcargoId: [{
fieldName: "",
field: "warehouseId",
defaultValue: "",
jnpfKey: "popupSelect",
dataType: "varchar",
id: "AyAmdw1",
relationField: "warehouseId",
required: "0"
},
{
fieldName: "",
field: "productId",
defaultValue: "",
jnpfKey: "popupSelect",
dataType: "varchar",
id: "AyAmdw1",
relationField: "deliveryProductRelationList-productId",
required: "0"
}],
deliveryproductrelationdeliveryNum: [],
deliveryproductrelationbatchNo: [],
deliveryproductrelationproduceTime: [],
@ -1208,6 +1192,10 @@ export default {
this.initPurchaseData();
},
methods: {
batchNoMethod(val, val2, idx) {
this.dataForm.deliveryProductRelationList[idx].batchNo = val2.batch_number
this.dataForm.deliveryProductRelationList[idx].produceDate = val2.produce_date
},
//
choiceProduct() {
this.BomgoodsBoxVisible = true
@ -1250,7 +1238,7 @@ export default {
let businessType = '2';
let documentType = '2';
let businessId = '';
let type = '1';
let type = '3';
this.$nextTick(() => {
this.$refs.VoucherBox.init(excludeIdList, businessType, documentType, this.productIdList, businessId, type)
})

@ -83,7 +83,7 @@
:disabled="judgeWrite('vehicleName')" clearable :style='{ "width": "100%" }'>
</JnpfInput> -->
<JnpfPopupSelect v-model="dataForm.vehicleId" @change="vehicleInfo" :rowIndex="null"
:disabled="judgeWrite('vehicleId')" :formData="dataForm"
:disabled="judgeWrite('vehicleName')" :formData="dataForm"
:templateJson="interfaceRes.vouchervehiclevehicleId" placeholder="请选择"
propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog"
relationField='vehicle_number' field='vehicleId' interfaceId="529920852288864453"
@ -99,7 +99,7 @@
</JnpfInput> -->
<JnpfPopupSelect v-model="dataForm.supplierId"
@change="changeData('enterpriseId', -1)" :rowIndex="null" :formData="dataForm"
:disabled="judgeWrite('supplierId')" :templateJson="interfaceRes.enterpriseId"
:disabled="judgeWrite('supplierName')" :templateJson="interfaceRes.enterpriseId"
placeholder="请选择" propsValue="f_id" popupWidth="800px" popupTitle="选择数据"
popupType="dialog" relationField='f_full_name' field='enterpriseId'
interfaceId="522729853024209157" :pageSize="20"
@ -113,7 +113,7 @@
:disabled="judgeWrite('customerName')" clearable :style='{ "width": "100%" }'>
</JnpfInput> -->
<JnpfPopupSelect v-model="dataForm.customerId" :rowIndex="null" :formData="dataForm"
:disabled="judgeWrite('customerId')"
:disabled="judgeWrite('customerName')"
:templateJson="interfaceRes.firstSubjectBasicId" placeholder="请选择" propsValue="id"
popupWidth="800px" popupTitle="选择数据" popupType="dialog" relationField='name'
field='firstSubjectBasicId' interfaceId="530001731111617029" :pageSize="20"
@ -187,12 +187,12 @@
v-if="judgeRequired('voucherproductList-grossWeight')">*</span>毛重
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.grossWeight"
<JnpfInputNumber v-model="scope.row.grossWeight"
@change="changeData('voucherproduct-grossWeight', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('voucherproductList') || judgeWrite('voucherproductList-grossWeight')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
:precision="6" :step="1" :min="0" @input="UpdateWeight(scope.row)">
</JnpfInputNumber>
</template>
</el-table-column>
<el-table-column label="皮重" v-if="judgeShow('voucherproduct-tareWeight')"
@ -202,12 +202,12 @@
v-if="judgeRequired('voucherproductList-tareWeight')">*</span>皮重
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.tareWeight"
<JnpfInputNumber v-model="scope.row.tareWeight"
@change="changeData('voucherproduct-tareWeight', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('voucherproductList') || judgeWrite('voucherproductList-tareWeight')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
:precision="6" :step="1" :min="0" @input="UpdateWeight(scope.row)">
</JnpfInputNumber>
</template>
</el-table-column>
<el-table-column label="扣重" v-if="judgeShow('voucherproduct-buckleWeight')"
@ -217,12 +217,12 @@
v-if="judgeRequired('voucherproductList-buckleWeight')">*</span>扣重
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.buckleWeight"
<JnpfInputNumber v-model="scope.row.buckleWeight"
@change="changeData('voucherproduct-buckleWeight', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('voucherproductList') || judgeWrite('voucherproductList-buckleWeight')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
:precision="6" :step="1" :min="0" @input="UpdateWeight(scope.row)">
</JnpfInputNumber>
</template>
</el-table-column>
<el-table-column label="净重" v-if="judgeShow('voucherproduct-netWeight')"
@ -232,12 +232,12 @@
v-if="judgeRequired('voucherproductList-netWeight')">*</span>净重
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.netWeight"
<JnpfInputNumber v-model="scope.row.netWeight"
@change="changeData('voucherproduct-netWeight', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('voucherproductList') || judgeWrite('voucherproductList-netWeight')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
:precision="6" :step="1" :min="0">
</JnpfInputNumber>
</template>
</el-table-column>
<el-table-column label="备注" v-if="judgeShow('voucherproduct-remark')" prop="remark">
@ -532,7 +532,8 @@
<template slot-scope="scope">
<JnpfInput v-model="scope.row.carrier"
@change="changeData('vouchervehicle-carrier', scope.$index)" placeholder="请输入"
:disabled="true" clearable :style='{ "width": "100%" }'>
:disabled="judgeWrite('vouchervehicleList') || judgeWrite('vouchervehicleList-carrier')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
</template>
</el-table-column>
@ -896,6 +897,10 @@ export default {
this.initPurchaseData();
},
methods: {
//
UpdateWeight(row) {
row.netWeight = this.jnpf.floatSub(this.jnpf.floatSub(parseFloat(row.grossWeight), parseFloat(row.tareWeight)), parseFloat(row.buckleWeight)) //-- =
},
//
vehicleInfo(val, val2) {
this.dataForm.voucherVehicleList = []
@ -1068,6 +1073,10 @@ export default {
let isOk = true;
for (let i = 0; i < this.dataForm.voucherProductList.length; i++) {
const e = this.dataForm.voucherProductList[i];
var tareWeight = e.tareWeight;//
var grossWeight = e.grossWeight;//
var buckleWeight = e.buckleWeight;//
var netWeight = e.netWeight;//
if (!e.productId) {
this.$message({
message: '商品不能为空',
@ -1077,6 +1086,33 @@ export default {
isOk = false
break
}
if (grossWeight < tareWeight + buckleWeight + netWeight) {
this.$message({
message: '毛重不得小于皮重+扣重+净重',
type: 'error',
duration: 1000
})
isOk = false
break
}
if (buckleWeight >= netWeight) {
this.$message({
message: '扣重不得大于净重',
type: 'error',
duration: 1000
})
isOk = false
break
}
if (buckleWeight >= grossWeight) {
this.$message({
message: '扣重不得大于毛重',
type: 'error',
duration: 1000
})
isOk = false
break
}
}
return isOk;
},

@ -180,12 +180,12 @@
v-if="judgeRequired('voucherproductList-grossWeight')">*</span>毛重
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.grossWeight"
<JnpfInputNumber v-model="scope.row.grossWeight"
@change="changeData('voucherproduct-grossWeight', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('voucherproductList') || judgeWrite('voucherproductList-grossWeight')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
:precision="6" :step="1" :min="0" @input="UpdateWeight(scope.row)">
</JnpfInputNumber>
</template>
</el-table-column>
<el-table-column label="皮重" v-if="judgeShow('voucherproduct-tareWeight')"
@ -195,12 +195,12 @@
v-if="judgeRequired('voucherproductList-tareWeight')">*</span>皮重
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.tareWeight"
<JnpfInputNumber v-model="scope.row.tareWeight"
@change="changeData('voucherproduct-tareWeight', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('voucherproductList') || judgeWrite('voucherproductList-tareWeight')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
:precision="6" :step="1" :min="0" @input="UpdateWeight(scope.row)">
</JnpfInputNumber>
</template>
</el-table-column>
<el-table-column label="扣重" v-if="judgeShow('voucherproduct-buckleWeight')"
@ -210,12 +210,12 @@
v-if="judgeRequired('voucherproductList-buckleWeight')">*</span>扣重
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.buckleWeight"
<JnpfInputNumber v-model="scope.row.buckleWeight"
@change="changeData('voucherproduct-buckleWeight', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('voucherproductList') || judgeWrite('voucherproductList-buckleWeight')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
:precision="6" :step="1" :min="0" @input="UpdateWeight(scope.row)">
</JnpfInputNumber>
</template>
</el-table-column>
<el-table-column label="净重" v-if="judgeShow('voucherproduct-netWeight')"
@ -225,12 +225,12 @@
v-if="judgeRequired('voucherproductList-netWeight')">*</span>净重
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.netWeight"
<JnpfInputNumber v-model="scope.row.netWeight"
@change="changeData('voucherproduct-netWeight', scope.$index)"
placeholder="请输入"
:disabled="judgeWrite('voucherproductList') || judgeWrite('voucherproductList-netWeight')"
clearable :style='{ "width": "100%" }'>
</JnpfInput>
:precision="6" :step="1" :min="0">
</JnpfInputNumber>
</template>
</el-table-column>
<el-table-column label="备注" v-if="judgeShow('voucherproduct-remark')" prop="remark">
@ -884,6 +884,10 @@ export default {
},
mounted() { },
methods: {
//
UpdateWeight(row) {
row.netWeight = this.jnpf.floatSub(this.jnpf.floatSub(parseFloat(row.grossWeight), parseFloat(row.tareWeight)), parseFloat(row.buckleWeight)) //-- =
},
//
vehicleInfo(val, val2) {
this.dataForm.voucherVehicleList = []
@ -1025,6 +1029,10 @@ export default {
let isOk = true;
for (let i = 0; i < this.dataForm.voucherProductList.length; i++) {
const e = this.dataForm.voucherProductList[i];
var tareWeight = e.tareWeight;//
var grossWeight = e.grossWeight;//
var buckleWeight = e.buckleWeight;//
var netWeight = e.netWeight;//
if (!e.productId) {
this.$message({
message: '商品不能为空',
@ -1034,6 +1042,33 @@ export default {
isOk = false
break
}
if (grossWeight < tareWeight + buckleWeight + netWeight) {
this.$message({
message: '毛重不得小于皮重+扣重+净重',
type: 'error',
duration: 1000
})
isOk = false
break
}
if (buckleWeight >= netWeight) {
this.$message({
message: '扣重不得大于净重',
type: 'error',
duration: 1000
})
isOk = false
break
}
if (buckleWeight >= grossWeight) {
this.$message({
message: '扣重不得大于毛重',
type: 'error',
duration: 1000
})
isOk = false
break
}
}
return isOk;
},

@ -33,7 +33,7 @@
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('businessLineId')">
<jnpf-form-tip-item label="关联业务" v-if="judgeShow('businessLineId')"
<jnpf-form-tip-item label="关联业务线" v-if="judgeShow('businessLineId')"
prop="businessLineId">
<JnpfPopupSelect v-model="dataForm.businessLineId"
@change="changeData('businessLineId', -1)" :rowIndex="null" :formData="dataForm"
@ -1469,9 +1469,8 @@ export default {
businessPrice: e.businessPrice,
tax: e.tax,
taxCount: e.taxCount,
notTaxPrice: e.notTaxPrice,
notTaxCount: e.notTaxCount,
lastSalePrice: e.lastSalePrice,
notTaxPrice: this.jnpf.floatDiv(e.businessPrice, this.jnpf.floatAdd(1, this.jnpf.floatDiv(e.tax, 100))).toFixed(6), //
notTaxCount: this.jnpf.floatMul(e.businessNum, this.jnpf.floatDiv(e.businessPrice, this.jnpf.floatAdd(1, this.jnpf.floatDiv(e.tax, 100))).toFixed(6)).toFixed(2) //
}
if (e.saleMainUnitId1) {
var unitName = JSON.parse(e.saleMainUnitId1)

@ -327,7 +327,7 @@ export default {
transactionModeProps: { "label": "fullName", "value": "id" },
transportModeOptions: [{ "fullName": "公路", "id": "1" }, { "fullName": "铁路", "id": "2" }, { "fullName": "轮船", "id": "3" }, { "fullName": "空运", "id": "4" }, { "fullName": "无", "id": "5" }],
transportModeProps: { "label": "fullName", "value": "id" },
statusOptions: [{ "fullName": "待校验", "id": "1" }, { "fullName": "待审核", "id": "2" }, { "fullName": "待处理", "id": "3" }, { "fullName": "待执行", "id": "4" }, { "fullName": "执行中", "id": "5" }, { "fullName": "已完成", "id": "6" }, { "fullName": "校验失败", "id": "7" }, { "fullName": "已取消", "id": "8" }],
statusOptions: [{ "fullName": "待校验", "id": "1" }, { "fullName": "待审核", "id": "2" }, { "fullName": "待锁定", "id": "3" }, { "fullName": "待出库", "id": "4" }, { "fullName": "部分出库", "id": "5" }, { "fullName": "已完成", "id": "6" }, { "fullName": "已驳回", "id": "7" }, { "fullName": "已关闭", "id": "8" }],
statusProps: { "label": "fullName", "value": "id" },
tableField135_paymentMethodOptions: [],
tableField135_paymentMethodProps: { "label": "fullName", "value": "enCode" },
@ -370,7 +370,6 @@ export default {
this.flowList = res2.data
this.getColumnList(),
this.initSearchDataAndListData()
this.query.deliveryType = '1'
this.queryData = JSON.parse(JSON.stringify(this.query))
}).catch((e) => {
this.$message({ type: 'error', message: e.message });

Loading…
Cancel
Save