Merge remote-tracking branch 'origin/main'

product
chuang 2 years ago
commit 4fde231057

@ -21,7 +21,9 @@ import jnpf.contractfile.service.ContractFileService;
import jnpf.exception.DataException; import jnpf.exception.DataException;
import jnpf.paymentdoc.entity.PaymentdocEntity; import jnpf.paymentdoc.entity.PaymentdocEntity;
import jnpf.paymentdoc.entity.PaymentdocItem0Entity; import jnpf.paymentdoc.entity.PaymentdocItem0Entity;
import jnpf.paymentdoc.entity.PaymentdocItem1Entity;
import jnpf.paymentdoc.service.PaymentdocItem0Service; import jnpf.paymentdoc.service.PaymentdocItem0Service;
import jnpf.paymentdoc.service.PaymentdocItem1Service;
import jnpf.paymentdoc.service.PaymentdocService; import jnpf.paymentdoc.service.PaymentdocService;
import jnpf.poundlist.entity.PoundlistEntity; import jnpf.poundlist.entity.PoundlistEntity;
import jnpf.poundlist.service.PoundlistService; import jnpf.poundlist.service.PoundlistService;
@ -64,6 +66,7 @@ import jnpf.util.GeneraterSwapUtil;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
import jnpf.util.file.UploadUtil; import jnpf.util.file.UploadUtil;
import jnpf.util.enums.FileTypeEnum; import jnpf.util.enums.FileTypeEnum;
@ -108,6 +111,8 @@ public class PaymentController {
private PaymentdocService paymentdocService; private PaymentdocService paymentdocService;
@Autowired @Autowired
private PoundlistService poundlistService; private PoundlistService poundlistService;
@Autowired
private PaymentdocItem1Service paymentdocItem1Service;
@PostMapping("/submitprice") @PostMapping("/submitprice")
@Transactional @Transactional
@ -119,11 +124,32 @@ public class PaymentController {
paymentdocQueryWrapper.lambda().eq(PaymentdocEntity::getDocumentNo, paymentEntity.getPaymentno()); paymentdocQueryWrapper.lambda().eq(PaymentdocEntity::getDocumentNo, paymentEntity.getPaymentno());
List<PaymentdocEntity> paymentdocList = paymentdocService.list(paymentdocQueryWrapper); List<PaymentdocEntity> paymentdocList = paymentdocService.list(paymentdocQueryWrapper);
for (PaymentdocEntity paymentdocEntity : paymentdocList) { for (PaymentdocEntity paymentdocEntity : paymentdocList) {
paymentdocEntity.setDocStatus("3"); //paymentdocEntity.setDocStatus("3");
paymentdocEntity.setPaymentAmount(paymentEntity.getPaymentamount()); paymentdocEntity.setIsSubmit("0");
paymentdocEntity.setUnpaymentAmount(paymentdocEntity.getRamount().subtract(paymentdocEntity.getPaymentAmount())); paymentdocEntity.setPaymentAmount(paymentEntity.getPaymentamount().add(paymentdocEntity.getPaymentAmount()));//已付款金额
paymentdocEntity.setUnpaymentAmount(paymentdocEntity.getRamount().subtract(paymentdocEntity.getPaymentAmount()));//未付款金额
int i = paymentdocEntity.getPaymentAmount().compareTo(paymentdocEntity.getRamount());
if (i == 1) {
return ActionResult.fail("付款金额过多,请先修改付款金额");
}
if (i == 0) {
paymentdocEntity.setDocStatus("3");
paymentdocEntity.setIsStop("1");
List<PaymentdocItem0Entity> paymentdocItem0EntityList = paymentdocService.GetPaymentdocItem0List(paymentdocEntity.getId());
for (PaymentdocItem0Entity paymentdocItem0Entity : paymentdocItem0EntityList) {
PurchaseorderitemEntity purchaseorderitemEntity = purchaseorderitemService.getById(paymentdocItem0Entity.getPurchaseorderId());
purchaseorderitemEntity.setIsPayment("0");
purchaseorderitemService.updateById(purchaseorderitemEntity);
}
}
paymentdocService.updateById(paymentdocEntity); paymentdocService.updateById(paymentdocEntity);
} }
List<Payment_item0Entity> payment_item0EntityList = paymentService.GetPayment_item0List(paymentEntity.getId());
for (Payment_item0Entity payment_item0Entity : payment_item0EntityList) {
PaymentdocItem0Entity paymentdocItem0Entity = paymentdoc_item0Service.getById(payment_item0Entity.getPaymentdocitemId());
paymentdocItem0Entity.setPaymentAmount(paymentdocItem0Entity.getPaymentAmount().add(payment_item0Entity.getAmount()));
paymentdoc_item0Service.updateById(paymentdocItem0Entity);
}
return ActionResult.success("提交成功"); return ActionResult.success("提交成功");
} }
@ -139,10 +165,16 @@ public class PaymentController {
PurchaseorderitemEntity purchaseorderitemEntity = purchaseorderitemService.getById(paymentdocItem0Entity.getPurchaseorderId()); PurchaseorderitemEntity purchaseorderitemEntity = purchaseorderitemService.getById(paymentdocItem0Entity.getPurchaseorderId());
purchaseorderitemEntity.setPayPrice(purchaseorderitemEntity.getPayPrice().add(payment_item0Entity.getAmount())); purchaseorderitemEntity.setPayPrice(purchaseorderitemEntity.getPayPrice().add(payment_item0Entity.getAmount()));
purchaseorderitemService.updateById(purchaseorderitemEntity); purchaseorderitemService.updateById(purchaseorderitemEntity);
QueryWrapper<PaymentdocItem1Entity> PaymentdocItem1EntityqueryWrapper = new QueryWrapper<>();
PaymentdocItem1EntityqueryWrapper.lambda().eq(PaymentdocItem1Entity::getPaymentdocId, paymentdocItem0Entity.getPaymentdocId());
PaymentdocItem1EntityqueryWrapper.lambda().eq(PaymentdocItem1Entity::getPurchaseorderId, purchaseorderitemEntity.getId());
PaymentdocItem1EntityqueryWrapper.lambda().select(PaymentdocItem1Entity::getPoundlistId);
List<String> poundlistIdList = paymentdocItem1Service.listObjs(PaymentdocItem1EntityqueryWrapper).stream().map(o -> (String) o).collect(Collectors.toList());
List<Purchaseorder_item0Entity> Purchaseorder_item0List = purchaseorderitemService.GetPurchaseorder_item0List(purchaseorderitemEntity.getId()); List<Purchaseorder_item0Entity> Purchaseorder_item0List = purchaseorderitemService.GetPurchaseorder_item0List(purchaseorderitemEntity.getId());
List<PoundlistEntity> poundlistEntityList = purchaseorderitemService.getPoundList(paymentdocItem0Entity.getPurchaseorderId()); List<PoundlistEntity> poundlistEntityList = poundlistService.queryPoundListByIdsRenkuan(poundlistIdList, paymentdocItem0Entity.getPaymentdocId());
//poundlistEntityList
Purchaseorder_item0Entity orderItem = Purchaseorder_item0List.stream().filter(item0 -> ObjectUtil.equals(item0.getPoundlistId(), poundlistEntityList.get(0).getId())).findAny().get(); Purchaseorder_item0Entity orderItem = Purchaseorder_item0List.stream().filter(item0 -> ObjectUtil.equals(item0.getPoundlistId(), poundlistEntityList.get(0).getId())).findAny().get();
BigDecimal total = orderItem.getAmount(); BigDecimal total = orderItem.getAmount();//第一条磅单
int i = 0; int i = 0;
while (purchaseorderitemEntity.getPayPrice().compareTo(total) >= 0){ while (purchaseorderitemEntity.getPayPrice().compareTo(total) >= 0){
i++; i++;
@ -158,6 +190,14 @@ public class PaymentController {
poundlistEntityList.get(j).setIsPay("1"); poundlistEntityList.get(j).setIsPay("1");
poundlistEntityList.get(j).setPayDate(new Date()); poundlistEntityList.get(j).setPayDate(new Date());
poundlistService.updateById(poundlistEntityList.get(j)); poundlistService.updateById(poundlistEntityList.get(j));
QueryWrapper<PaymentdocItem1Entity> item1queryWrapper = new QueryWrapper<>();
item1queryWrapper.lambda().eq(PaymentdocItem1Entity::getPaymentdocId, paymentdocItem0Entity.getPaymentdocId());
item1queryWrapper.lambda().eq(PaymentdocItem1Entity::getPoundlistId, poundlistEntityList.get(j).getId());
List<PaymentdocItem1Entity> paymentdocItem1Entities = paymentdocItem1Service.list(item1queryWrapper);
for (PaymentdocItem1Entity paymentdocItem1 : paymentdocItem1Entities) {
paymentdocItem1.setIsPay("1");
}
paymentdocItem1Service.updateBatchById(paymentdocItem1Entities);
} }
} }
return ActionResult.success("认款成功"); return ActionResult.success("认款成功");
@ -207,8 +247,9 @@ public class PaymentController {
paymentdocEntityWrapper.lambda().eq(PaymentdocEntity::getDocumentNo, entity.getPaymentno()); paymentdocEntityWrapper.lambda().eq(PaymentdocEntity::getDocumentNo, entity.getPaymentno());
List<PaymentdocEntity> list = paymentdocService.list(paymentdocEntityWrapper); List<PaymentdocEntity> list = paymentdocService.list(paymentdocEntityWrapper);
for (PaymentdocEntity paymentdocEntity: list) { for (PaymentdocEntity paymentdocEntity: list) {
paymentdocEntity.setIsSubmit("1");
paymentdocEntity.setDocStatus("3");//已付款 paymentdocEntity.setDocStatus("3");//已付款
paymentdocEntity.setRamount(entity.getPaymentamount()); //paymentdocEntity.setRamount(entity.getPaymentamount());
paymentdocService.updateById(paymentdocEntity); paymentdocService.updateById(paymentdocEntity);
} }
List<Payment_item0Entity> Payment_item0List = JsonUtil.getJsonToList(paymentCrForm.getPayment_item0List(),Payment_item0Entity.class); List<Payment_item0Entity> Payment_item0List = JsonUtil.getJsonToList(paymentCrForm.getPayment_item0List(),Payment_item0Entity.class);
@ -395,7 +436,6 @@ public class PaymentController {
//子表 //子表
List<Payment_item0Entity> Payment_item0List = paymentService.GetPayment_item0List(id); List<Payment_item0Entity> Payment_item0List = paymentService.GetPayment_item0List(id);
List<Payment_item0Model> payment_item0Models = new ArrayList<>(); List<Payment_item0Model> payment_item0Models = new ArrayList<>();
Payment_item0Model payment_item0Model = new Payment_item0Model();
for(Payment_item0Entity payment_item0Entity : Payment_item0List){ for(Payment_item0Entity payment_item0Entity : Payment_item0List){
PaymentdocItem0Entity paymentdoc_item0Entity = paymentdoc_item0Service.getById(payment_item0Entity.getPaymentdocitemId()); PaymentdocItem0Entity paymentdoc_item0Entity = paymentdoc_item0Service.getById(payment_item0Entity.getPaymentdocitemId());
PurchaseorderitemEntity purchaseorderEntity = purchaseorderitemService.getById(paymentdoc_item0Entity.getPurchaseorderId()); PurchaseorderitemEntity purchaseorderEntity = purchaseorderitemService.getById(paymentdoc_item0Entity.getPurchaseorderId());
@ -405,11 +445,13 @@ public class PaymentController {
purchaseorderEntity.setContractNo(contractFileEntity.getContractCode()); purchaseorderEntity.setContractNo(contractFileEntity.getContractCode());
} }
} }
Payment_item0Model payment_item0Model = new Payment_item0Model();
payment_item0Model.setPaymentdocitemId(payment_item0Entity.getPaymentdocitemId()); payment_item0Model.setPaymentdocitemId(payment_item0Entity.getPaymentdocitemId());
payment_item0Model.setAmount(payment_item0Entity.getAmount()); payment_item0Model.setAmount(payment_item0Entity.getAmount());
payment_item0Model.setAllAmount(purchaseorderEntity.getAmount()); payment_item0Model.setAllAmount(purchaseorderEntity.getAmount());
payment_item0Model.setRequestAmount(purchaseorderEntity.getAmount()); payment_item0Model.setRequestAmount(paymentdoc_item0Entity.getAmount());
payment_item0Model.setPayPrice(purchaseorderEntity.getPayPrice()); payment_item0Model.setPayPrice(purchaseorderEntity.getPayPrice());
payment_item0Model.setPaymentAmount(paymentdoc_item0Entity.getPaymentAmount());
payment_item0Model.setDocumentNo(purchaseorderEntity.getDocumentNo()); payment_item0Model.setDocumentNo(purchaseorderEntity.getDocumentNo());
payment_item0Model.setContractNo(purchaseorderEntity.getContractNo()); payment_item0Model.setContractNo(purchaseorderEntity.getContractNo());
payment_item0Model.setNum(purchaseorderEntity.getNum()); payment_item0Model.setNum(purchaseorderEntity.getNum());
@ -479,9 +521,6 @@ public class PaymentController {
for(Payment_item0Entity entitys : Payment_item0List){ for(Payment_item0Entity entitys : Payment_item0List){
entitys.setId(RandomUtil.uuId()); entitys.setId(RandomUtil.uuId());
entitys.setPaymentId(entity.getId()); entitys.setPaymentId(entity.getId());
for (Payment_item0Entity payment_item0Entity : list) {
entitys.setPaymentdocitemId(payment_item0Entity.getPaymentdocitemId());
}
payment_item0Service.save(entitys); payment_item0Service.save(entitys);
} }

@ -115,6 +115,7 @@ public class PaymentEntity {
@TableField("voucher") @TableField("voucher")
private String voucher; private String voucher;
@TableField("supplier_id")
private String supplierId;
} }

@ -25,6 +25,10 @@ public class PaymentCrForm {
@JsonProperty("documentno") @JsonProperty("documentno")
private String documentno; private String documentno;
/** 供应商 **/
@JsonProperty("supplierId")
private String supplierId;
/** 供应商 **/ /** 供应商 **/
@JsonProperty("suppliername") @JsonProperty("suppliername")
private String suppliername; private String suppliername;

@ -92,6 +92,10 @@ public class PaymentInfoVO{
@JsonProperty("voucher") @JsonProperty("voucher")
private String voucher; private String voucher;
/** 供应商 **/
@JsonProperty("supplierId")
private String supplierId;
/** 子表数据 **/ /** 子表数据 **/
@JsonProperty("payment_item0List") @JsonProperty("payment_item0List")
private List<Payment_item0Model> payment_item0List; private List<Payment_item0Model> payment_item0List;

@ -106,4 +106,8 @@ public class PaymentListVO{
/** 付款凭证 **/ /** 付款凭证 **/
@JsonProperty("voucher") @JsonProperty("voucher")
private String voucher; private String voucher;
/** 供应商 **/
@JsonProperty("supplierId")
private String supplierId;
} }

@ -107,6 +107,10 @@ public class PaymentUpForm{
@JsonProperty("voucher") @JsonProperty("voucher")
private String voucher; private String voucher;
/** 供应商 **/
@JsonProperty("supplierId")
private String supplierId;
/** 子表数据 **/ /** 子表数据 **/
@JsonProperty("payment_item0List") @JsonProperty("payment_item0List")
private List<Payment_item0Model> payment_item0List; private List<Payment_item0Model> payment_item0List;

@ -78,4 +78,7 @@ public class Payment_item0Model {
/** 业务日期 **/ /** 业务日期 **/
@JsonProperty("requestAmount") @JsonProperty("requestAmount")
private BigDecimal requestAmount; private BigDecimal requestAmount;
@JsonProperty("paymentAmount")
private BigDecimal paymentAmount;
} }

@ -4,6 +4,7 @@ import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType; import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity; import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import jnpf.base.ActionResult; import jnpf.base.ActionResult;
@ -17,6 +18,8 @@ import jnpf.contractfile.service.ContractFileService;
import jnpf.exception.DataException; import jnpf.exception.DataException;
import jnpf.payment.entity.PaymentEntity; import jnpf.payment.entity.PaymentEntity;
import jnpf.payment.service.PaymentService; import jnpf.payment.service.PaymentService;
import jnpf.poundlist.entity.PoundlistEntity;
import jnpf.poundlist.service.PoundlistService;
import jnpf.purchaseback.entity.PurchaseorderEntity; import jnpf.purchaseback.entity.PurchaseorderEntity;
import jnpf.purchaseback.service.PurchaseorderService; import jnpf.purchaseback.service.PurchaseorderService;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@ -26,6 +29,8 @@ import jnpf.paymentdoc.model.paymentdoc.*;
import jnpf.paymentdoc.model.paymentdoc.PaymentdocPagination; import jnpf.paymentdoc.model.paymentdoc.PaymentdocPagination;
import jnpf.paymentdoc.entity.*; import jnpf.paymentdoc.entity.*;
import jnpf.paymentdoc.entity.PaymentdocItem0Entity; import jnpf.paymentdoc.entity.PaymentdocItem0Entity;
import jnpf.paymentdoc.entity.PaymentdocItem1Entity;
import jnpf.paymentdoc.entity.PaymentdocItem2Entity;
import jnpf.util.*; import jnpf.util.*;
import jnpf.base.util.*; import jnpf.base.util.*;
import jnpf.base.vo.ListVO; import jnpf.base.vo.ListVO;
@ -43,6 +48,10 @@ import jnpf.paymentdoc.entity.PaymentdocEntity;
import jnpf.paymentdoc.service.PaymentdocService; import jnpf.paymentdoc.service.PaymentdocService;
import jnpf.paymentdoc.entity.PaymentdocItem0Entity; import jnpf.paymentdoc.entity.PaymentdocItem0Entity;
import jnpf.paymentdoc.service.PaymentdocItem0Service; import jnpf.paymentdoc.service.PaymentdocItem0Service;
import jnpf.paymentdoc.entity.PaymentdocItem1Entity;
import jnpf.paymentdoc.service.PaymentdocItem1Service;
import jnpf.paymentdoc.entity.PaymentdocItem2Entity;
import jnpf.paymentdoc.service.PaymentdocItem2Service;
import jnpf.exception.WorkFlowException; import jnpf.exception.WorkFlowException;
import jnpf.engine.enums.FlowStatusEnum; import jnpf.engine.enums.FlowStatusEnum;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -53,6 +62,8 @@ import java.io.FileNotFoundException;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import jnpf.util.GeneraterSwapUtil; import jnpf.util.GeneraterSwapUtil;
import java.math.BigDecimal;
import java.util.*; import java.util.*;
import jnpf.util.file.UploadUtil; import jnpf.util.file.UploadUtil;
@ -65,7 +76,7 @@ import jnpf.util.enums.FileTypeEnum;
* @ V3.2.0 * @ V3.2.0
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ 2023-02-23 * @ 2023-03-22
*/ */
@Slf4j @Slf4j
@RestController @RestController
@ -86,15 +97,19 @@ public class PaymentdocController {
@Autowired @Autowired
private PaymentdocItem0Service paymentdocItem0Service; private PaymentdocItem0Service paymentdocItem0Service;
@Autowired
private PaymentdocItem1Service paymentdocItem1Service;
@Autowired
private PaymentdocItem2Service paymentdocItem2Service;
@Autowired @Autowired
private PurchaseorderService purchaseorderService; private PurchaseorderService purchaseorderService;
@Autowired @Autowired
private ContractFileService contractFileService; private ContractFileService contractFileService;
@Autowired @Autowired
private PaymentService paymentService; private PaymentService paymentService;
@Autowired
private PoundlistService poundlistService;
/** /**
* *
@ -107,21 +122,19 @@ public class PaymentdocController {
List<PaymentdocEntity> list= paymentdocService.getList(paymentdocPagination); List<PaymentdocEntity> list= paymentdocService.getList(paymentdocPagination);
//处理id字段转名称若无需转或者为空可删除 //处理id字段转名称若无需转或者为空可删除
for(PaymentdocEntity entity:list){ for(PaymentdocEntity entity:list){
/*Map<String,Object> purchaseIdMap = new HashMap<>();
entity.setPurchaseId(generaterSwapUtil.getPopupSelectValue("389673535976550149","id","document_no",entity.getPurchaseId(),purchaseIdMap));
Map<String,Object> contractIdMap = new HashMap<>();
entity.setContractId(generaterSwapUtil.getPopupSelectValue("389673903103979269","id","contract_name",entity.getContractId(),contractIdMap));
Map<String,Object> supplierIdMap = new HashMap<>(); Map<String,Object> supplierIdMap = new HashMap<>();
entity.setSupplierId(generaterSwapUtil.getPopupSelectValue("389674191453990661","id","supplier_name",entity.getSupplierId(),supplierIdMap));*/ entity.setSupplierName(generaterSwapUtil.getPopupSelectValue("389674191453990661","id","supplier_name",entity.getSupplierId(),supplierIdMap));
QueryWrapper<PaymentEntity> PaymentqueryWrapper = new QueryWrapper<>(); QueryWrapper<PaymentEntity> PaymentqueryWrapper = new QueryWrapper<>();
PaymentqueryWrapper.lambda().eq(PaymentEntity::getPaymentno, entity.getDocumentNo()); PaymentqueryWrapper.lambda().eq(PaymentEntity::getPaymentno, entity.getDocumentNo());
PaymentEntity paymentEntity = paymentService.getOne(PaymentqueryWrapper); List<PaymentEntity> paymentEntityList = paymentService.list(PaymentqueryWrapper);
if(paymentEntity != null){ if(paymentEntityList != null && paymentEntityList.size() > 0){
entity.setPaymentEntity(paymentEntity); PaymentEntity paymentEntity = paymentEntityList.get(0);
}else{ if(paymentEntity != null){
entity.setPaymentEntity(new PaymentEntity()); entity.setPaymentEntity(paymentEntity);
}else{
entity.setPaymentEntity(new PaymentEntity());
}
} }
} }
List<PaymentdocListVO> listVO=JsonUtil.getJsonToList(list,PaymentdocListVO.class); List<PaymentdocListVO> listVO=JsonUtil.getJsonToList(list,PaymentdocListVO.class);
for(PaymentdocListVO paymentdocVO:listVO){ for(PaymentdocListVO paymentdocVO:listVO){
@ -164,6 +177,7 @@ public class PaymentdocController {
PaymentdocEntity entity = JsonUtil.getJsonToBean(paymentdocCrForm, PaymentdocEntity.class); PaymentdocEntity entity = JsonUtil.getJsonToBean(paymentdocCrForm, PaymentdocEntity.class);
entity.setId(mainId); entity.setId(mainId);
paymentdocService.save(entity); paymentdocService.save(entity);
List<PaymentdocItem0Entity> PaymentdocItem0List = JsonUtil.getJsonToList(paymentdocCrForm.getPaymentdocitem0List(),PaymentdocItem0Entity.class); List<PaymentdocItem0Entity> PaymentdocItem0List = JsonUtil.getJsonToList(paymentdocCrForm.getPaymentdocitem0List(),PaymentdocItem0Entity.class);
for(PaymentdocItem0Entity entitys : PaymentdocItem0List){ for(PaymentdocItem0Entity entitys : PaymentdocItem0List){
@ -171,6 +185,26 @@ public class PaymentdocController {
entitys.setPaymentdocId(entity.getId()); entitys.setPaymentdocId(entity.getId());
paymentdocItem0Service.save(entitys); paymentdocItem0Service.save(entitys);
//修改采购订单为已付款申请
PurchaseorderEntity purchaseorderEntity = purchaseorderService.getById(entitys.getPurchaseorderId());
purchaseorderEntity.setIsPayment("1");
purchaseorderService.updateById(purchaseorderEntity);
}
List<PaymentdocItem1Entity> PaymentdocItem1List = JsonUtil.getJsonToList(paymentdocCrForm.getPaymentdocitem1List(),PaymentdocItem1Entity.class);
for(PaymentdocItem1Entity entitys : PaymentdocItem1List){
entitys.setId(RandomUtil.uuId());
entitys.setPaymentdocId(entity.getId());
paymentdocItem1Service.save(entitys);
}
List<PaymentdocItem2Entity> PaymentdocItem2List = JsonUtil.getJsonToList(paymentdocCrForm.getPaymentdocitem2List(),PaymentdocItem2Entity.class);
for(PaymentdocItem2Entity entitys : PaymentdocItem2List){
entitys.setId(RandomUtil.uuId());
entitys.setPaymentdocId(entity.getId());
paymentdocItem2Service.save(entitys);
} }
if (FlowStatusEnum.submit.getMessage().equals(paymentdocCrForm.getStatus())){ if (FlowStatusEnum.submit.getMessage().equals(paymentdocCrForm.getStatus())){
try { try {
@ -200,34 +234,137 @@ public class PaymentdocController {
PaymentdocInfoVO vo=JsonUtil.getJsonToBean(entity, PaymentdocInfoVO.class); PaymentdocInfoVO vo=JsonUtil.getJsonToBean(entity, PaymentdocInfoVO.class);
//子表 //子表
List<String> purchaseorderIdList = new ArrayList<>();
List<PurchaseorderEntity> purchaseorderEntityList = new ArrayList<>();
List<PaymentdocItem0Entity> PaymentdocItem0List = paymentdocService.GetPaymentdocItem0List(id); List<PaymentdocItem0Entity> PaymentdocItem0List = paymentdocService.GetPaymentdocItem0List(id);
List<PaymentdocItem0Model> list = JsonUtil.getJsonToList(PaymentdocItem0List,PaymentdocItem0Model.class ); for(PaymentdocItem0Entity paymentdocitem0Entity : PaymentdocItem0List){
for (PaymentdocItem0Model paymentdocItem0Model : list) { PurchaseorderEntity purchaseorderEntity = purchaseorderService.getById(paymentdocitem0Entity.getPurchaseorderId());
PurchaseorderEntity purchaseorderEntity = purchaseorderService.getById(paymentdocItem0Model.getPurchaseorderId());
if(purchaseorderEntity != null && StringUtils.isNotEmpty(purchaseorderEntity.getContractCode())){ if(purchaseorderEntity != null && StringUtils.isNotEmpty(purchaseorderEntity.getContractCode())){
ContractFileEntity contractFileEntity = contractFileService.getById(purchaseorderEntity.getContractCode()); ContractFileEntity contractFileEntity = contractFileService.getById(purchaseorderEntity.getContractCode());
if(contractFileEntity != null && StringUtils.isNotEmpty(contractFileEntity.getContractName())){ if(contractFileEntity != null && StringUtils.isNotEmpty(contractFileEntity.getContractName())){
purchaseorderEntity.setContractNo(contractFileEntity.getContractCode()); purchaseorderEntity.setContractNo(contractFileEntity.getContractCode());
} }
} }
paymentdocItem0Model.setAllAmount(purchaseorderEntity.getAmount()); paymentdocitem0Entity.setAllAmount(purchaseorderEntity.getAmount());
paymentdocItem0Model.setPayPrice(purchaseorderEntity.getPayPrice()); paymentdocitem0Entity.setPayPrice(purchaseorderEntity.getPayPrice());
paymentdocItem0Model.setDocumentNo(purchaseorderEntity.getDocumentNo()); paymentdocitem0Entity.setDocumentNo(purchaseorderEntity.getDocumentNo());
paymentdocItem0Model.setContractNo(purchaseorderEntity.getContractNo()); paymentdocitem0Entity.setContractNo(purchaseorderEntity.getContractNo());
paymentdocItem0Model.setNum(purchaseorderEntity.getNum()); paymentdocitem0Entity.setNum(purchaseorderEntity.getNum());
paymentdocItem0Model.setAdvanceAmount(purchaseorderEntity.getAdvanceAmount()); paymentdocitem0Entity.setAdvanceAmount(purchaseorderEntity.getAdvanceAmount());
paymentdocItem0Model.setRate(purchaseorderEntity.getRate()); paymentdocitem0Entity.setRate(purchaseorderEntity.getRate());
paymentdocItem0Model.setNotAmount(purchaseorderEntity.getNotAmount()); paymentdocitem0Entity.setNotAmount(purchaseorderEntity.getNotAmount());
paymentdocItem0Model.setCreatorTime(purchaseorderEntity.getCreatorTime()); paymentdocitem0Entity.setCreatorTime(purchaseorderEntity.getCreatorTime());
} }
vo.setPaymentdocItem0List(list); vo.setPaymentdocItem0List(JsonUtil.getJsonToList(PaymentdocItem0List,PaymentdocItem0Model.class ));
List<PaymentdocItem1Entity> PaymentdocItem1List = paymentdocService.GetPaymentdocItem1List(id);
List<String> poundlistIdList = new ArrayList<>();
for(PaymentdocItem1Entity paymentdocitem1Entity : PaymentdocItem1List){
PurchaseorderEntity purchaseorderEntity = purchaseorderService.getById(paymentdocitem1Entity.getPurchaseorderId());
paymentdocitem1Entity.setPurchaseorderNo(purchaseorderEntity.getDocumentNo());
PoundlistEntity poundlistEntity = poundlistService.queryPoundById(paymentdocitem1Entity.getPoundlistId());
paymentdocitem1Entity.setVehicleName(poundlistEntity.getVehicleName());
paymentdocitem1Entity.setMaterialName(poundlistEntity.getMaterialName());
paymentdocitem1Entity.setPoundType(poundlistEntity.getPoundType());
paymentdocitem1Entity.setNetWeight(poundlistEntity.getNetWeight());
paymentdocitem1Entity.setUnit(poundlistEntity.getUnit());
paymentdocitem1Entity.setAdvance(poundlistEntity.getAdvance());
paymentdocitem1Entity.setPurchasePrice(poundlistEntity.getPurchasePrice());
paymentdocitem1Entity.setSettlement(poundlistEntity.getSettlement());
paymentdocitem1Entity.setRate(poundlistEntity.getRate());
paymentdocitem1Entity.setAmount(poundlistEntity.getAmount());
paymentdocitem1Entity.setNotAmount(poundlistEntity.getNotAmount());
paymentdocitem1Entity.setRemark(poundlistEntity.getRemark());
}
if(poundlistIdList.size() > 0){
List<PoundlistEntity> poundlistEntityList = poundlistService.queryPoundListByIds(poundlistIdList);
vo.setPaymentdocItem1List(JsonUtil.getJsonToList(poundlistEntityList,PaymentdocItem1Model.class));
}else{
vo.setPaymentdocItem1List(JsonUtil.getJsonToList(PaymentdocItem1List,PaymentdocItem1Model.class ));
}
List<PaymentdocItem2Entity> PaymentdocItem2List = paymentdocService.GetPaymentdocItem2List(id);
for(PaymentdocItem2Entity paymentdocitem2Entity : PaymentdocItem2List){
}
vo.setPaymentdocItem2List(JsonUtil.getJsonToList(PaymentdocItem2List,PaymentdocItem2Model.class ));
QueryWrapper<PaymentEntity> PaymentqueryWrapper = new QueryWrapper<>();
PaymentqueryWrapper.lambda().eq(PaymentEntity::getPaymentno, entity.getDocumentNo());
List<PaymentEntity> paymentEntityList = paymentService.list(PaymentqueryWrapper);
vo.setPaymentEntityList(paymentEntityList);
//副表 //副表
return ActionResult.success(vo); return ActionResult.success(vo);
} }
/**
*
*
* @param id
* @return
*/
@GetMapping("paymentcocToPaymen/{id}")
public ActionResult<PaymentdocInfoVO> paymentcocToPaymen(@PathVariable("id") String id){
PaymentdocEntity entity= paymentdocService.getInfo(id);
PaymentdocInfoVO vo=JsonUtil.getJsonToBean(entity, PaymentdocInfoVO.class);
//子表
List<PaymentdocItem0Entity> PaymentdocItem0List = paymentdocService.GetPaymentdocItem0List(id);
for(PaymentdocItem0Entity paymentdocitem0Entity : PaymentdocItem0List){
PurchaseorderEntity purchaseorderEntity = purchaseorderService.getById(paymentdocitem0Entity.getPurchaseorderId());
if(purchaseorderEntity != null && StringUtils.isNotEmpty(purchaseorderEntity.getContractCode())){
ContractFileEntity contractFileEntity = contractFileService.getById(purchaseorderEntity.getContractCode());
if(contractFileEntity != null && StringUtils.isNotEmpty(contractFileEntity.getContractName())){
purchaseorderEntity.setContractNo(contractFileEntity.getContractCode());
}
}
paymentdocitem0Entity.setRequestAmount(paymentdocitem0Entity.getAmount());
paymentdocitem0Entity.setAmount(paymentdocitem0Entity.getAmount().subtract(paymentdocitem0Entity.getPaymentAmount()));
paymentdocitem0Entity.setAllAmount(purchaseorderEntity.getAmount());
paymentdocitem0Entity.setPaymentAmount(paymentdocitem0Entity.getPaymentAmount());
paymentdocitem0Entity.setPayPrice(purchaseorderEntity.getPayPrice());
paymentdocitem0Entity.setDocumentNo(purchaseorderEntity.getDocumentNo());
paymentdocitem0Entity.setContractNo(purchaseorderEntity.getContractNo());
paymentdocitem0Entity.setNum(purchaseorderEntity.getNum());
paymentdocitem0Entity.setAdvanceAmount(purchaseorderEntity.getAdvanceAmount());
paymentdocitem0Entity.setRate(purchaseorderEntity.getRate());
paymentdocitem0Entity.setNotAmount(purchaseorderEntity.getNotAmount());
paymentdocitem0Entity.setCreatorTime(purchaseorderEntity.getCreatorTime());
}
vo.setPaymentdocItem0List(JsonUtil.getJsonToList(PaymentdocItem0List,PaymentdocItem0Model.class ));
List<PaymentdocItem1Entity> PaymentdocItem1List = paymentdocService.GetPaymentdocItem1List(id);
List<String> poundlistIdList = new ArrayList<>();
for(PaymentdocItem1Entity paymentdocitem1Entity : PaymentdocItem1List){
PurchaseorderEntity purchaseorderEntity = purchaseorderService.getById(paymentdocitem1Entity.getPurchaseorderId());
paymentdocitem1Entity.setPurchaseorderNo(purchaseorderEntity.getDocumentNo());
PoundlistEntity poundlistEntity = poundlistService.queryPoundById(paymentdocitem1Entity.getPoundlistId());
paymentdocitem1Entity.setVehicleName(poundlistEntity.getVehicleName());
paymentdocitem1Entity.setMaterialName(poundlistEntity.getMaterialName());
paymentdocitem1Entity.setPoundType(poundlistEntity.getPoundType());
paymentdocitem1Entity.setNetWeight(poundlistEntity.getNetWeight());
paymentdocitem1Entity.setUnit(poundlistEntity.getUnit());
paymentdocitem1Entity.setAdvance(poundlistEntity.getAdvance());
paymentdocitem1Entity.setPurchasePrice(poundlistEntity.getPurchasePrice());
paymentdocitem1Entity.setSettlement(poundlistEntity.getSettlement());
paymentdocitem1Entity.setRate(poundlistEntity.getRate());
paymentdocitem1Entity.setAmount(poundlistEntity.getAmount());
paymentdocitem1Entity.setNotAmount(poundlistEntity.getNotAmount());
paymentdocitem1Entity.setRemark(poundlistEntity.getRemark());
}
if(poundlistIdList.size() > 0){
List<PoundlistEntity> poundlistEntityList = poundlistService.queryPoundListByIds(poundlistIdList);
vo.setPaymentdocItem1List(JsonUtil.getJsonToList(poundlistEntityList,PaymentdocItem1Model.class));
}else{
vo.setPaymentdocItem1List(JsonUtil.getJsonToList(PaymentdocItem1List,PaymentdocItem1Model.class ));
}
List<PaymentdocItem2Entity> PaymentdocItem2List = paymentdocService.GetPaymentdocItem2List(id);
for(PaymentdocItem2Entity paymentdocitem2Entity : PaymentdocItem2List){
}
vo.setPaymentdocItem2List(JsonUtil.getJsonToList(PaymentdocItem2List,PaymentdocItem2Model.class ));
QueryWrapper<PaymentEntity> PaymentqueryWrapper = new QueryWrapper<>();
PaymentqueryWrapper.lambda().eq(PaymentEntity::getPaymentno, entity.getDocumentNo());
List<PaymentEntity> paymentEntityList = paymentService.list(PaymentqueryWrapper);
vo.setPaymentEntityList(paymentEntityList);
//副表
return ActionResult.success(vo);
}
@ -262,15 +399,41 @@ public class PaymentdocController {
} }
QueryWrapper<PaymentdocItem1Entity> PaymentdocItem1queryWrapper = new QueryWrapper<>();
PaymentdocItem1queryWrapper.lambda().eq(PaymentdocItem1Entity::getPaymentdocId, entity.getId());
paymentdocItem1Service.remove(PaymentdocItem1queryWrapper);
List<PaymentdocItem1Entity> PaymentdocItem1List = JsonUtil.getJsonToList(paymentdocUpForm.getPaymentdocitem1List(),PaymentdocItem1Entity.class);
for(PaymentdocItem1Entity entitys : PaymentdocItem1List){
entitys.setId(RandomUtil.uuId());
entitys.setPaymentdocId(entity.getId());
paymentdocItem1Service.save(entitys);
}
QueryWrapper<PaymentdocItem2Entity> PaymentdocItem2queryWrapper = new QueryWrapper<>();
PaymentdocItem2queryWrapper.lambda().eq(PaymentdocItem2Entity::getPaymentdocId, entity.getId());
paymentdocItem2Service.remove(PaymentdocItem2queryWrapper);
List<PaymentdocItem2Entity> PaymentdocItem2List = JsonUtil.getJsonToList(paymentdocUpForm.getPaymentdocitem2List(),PaymentdocItem2Entity.class);
for(PaymentdocItem2Entity entitys : PaymentdocItem2List){
entitys.setId(RandomUtil.uuId());
entitys.setPaymentdocId(entity.getId());
paymentdocItem2Service.save(entitys);
}
if (FlowStatusEnum.submit.getMessage().equals(paymentdocUpForm.getStatus())){ if (FlowStatusEnum.submit.getMessage().equals(paymentdocUpForm.getStatus())){
try { try {
generaterSwapUtil.submitFlowTask(visualdevEntity,id,subentity,userInfo,paymentdocUpForm.getCandidateList()); generaterSwapUtil.submitFlowTask(visualdevEntity,id,subentity,userInfo,paymentdocUpForm.getCandidateList());
//提交流程,状态改为 1审批中
entity.setDocStatus("1");
paymentdocService.updateById(entity);
} catch (WorkFlowException e) { } catch (WorkFlowException e) {
e.printStackTrace(); e.printStackTrace();
} }
//提交流程,状态改为 1审批中
entity.setDocStatus("1");
paymentdocService.updateById(entity);
return ActionResult.success("提交成功,请耐心等待"); return ActionResult.success("提交成功,请耐心等待");
} }
return ActionResult.success("更新成功"); return ActionResult.success("更新成功");
@ -301,11 +464,53 @@ public class PaymentdocController {
paymentdocService.delete(entity); paymentdocService.delete(entity);
QueryWrapper<PaymentdocItem0Entity> queryWrapperPaymentdocItem0=new QueryWrapper<>(); QueryWrapper<PaymentdocItem0Entity> queryWrapperPaymentdocItem0=new QueryWrapper<>();
queryWrapperPaymentdocItem0.lambda().eq(PaymentdocItem0Entity::getPaymentdocId,entity.getId()); queryWrapperPaymentdocItem0.lambda().eq(PaymentdocItem0Entity::getPaymentdocId,entity.getId());
List<PaymentdocItem0Entity> list = paymentdocItem0Service.list(queryWrapperPaymentdocItem0);
for (PaymentdocItem0Entity paymentdocItem0Entity : list) {
PurchaseorderEntity purchaseorderEntity = purchaseorderService.getById(paymentdocItem0Entity.getPurchaseorderId());
purchaseorderEntity.setIsPayment("0");
purchaseorderService.updateById(purchaseorderEntity);
}
paymentdocItem0Service.remove(queryWrapperPaymentdocItem0); paymentdocItem0Service.remove(queryWrapperPaymentdocItem0);
QueryWrapper<PaymentdocItem1Entity> queryWrapperPaymentdocItem1=new QueryWrapper<>();
queryWrapperPaymentdocItem1.lambda().eq(PaymentdocItem1Entity::getPaymentdocId,entity.getId());
paymentdocItem1Service.remove(queryWrapperPaymentdocItem1);
QueryWrapper<PaymentdocItem2Entity> queryWrapperPaymentdocItem2=new QueryWrapper<>();
queryWrapperPaymentdocItem2.lambda().eq(PaymentdocItem2Entity::getPaymentdocId,entity.getId());
paymentdocItem2Service.remove(queryWrapperPaymentdocItem2);
} }
return ActionResult.success("删除成功"); return ActionResult.success("删除成功");
} }
/**
*
*
* @param ids
* @return
*/
@PostMapping("/batchtopPayment/{ids}")
@Transactional
public ActionResult batchtopPayment(@PathVariable("ids") String ids) {
int i = 0;
String[] idList = ids.split(",");
for (String id : idList) {
PaymentdocEntity paymentdocEntity = paymentdocService.getById(id);
paymentdocEntity.setIsStop("1");
paymentdocEntity.setIsSubmit("1");
paymentdocService.updateById(paymentdocEntity);
QueryWrapper<PaymentdocItem0Entity> queryWrapperPaymentdocItem0=new QueryWrapper<>();
queryWrapperPaymentdocItem0.lambda().eq(PaymentdocItem0Entity::getPaymentdocId,id);
List<PaymentdocItem0Entity> list = paymentdocItem0Service.list(queryWrapperPaymentdocItem0);
for (PaymentdocItem0Entity paymentdocItem0Entity : list) {
PurchaseorderEntity purchaseorderEntity = purchaseorderService.getById(paymentdocItem0Entity.getPurchaseorderId());
purchaseorderEntity.setIsPayment("0");
purchaseorderService.updateById(purchaseorderEntity);
}
i++;
}
if (i == 0) {
return ActionResult.fail("终止失败");
}
return ActionResult.success("终止成功");
}
} }

@ -16,7 +16,7 @@ import java.math.BigDecimal;
* @ V3.2.0 * @ V3.2.0
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ 2023-02-23 * @ 2023-03-22
*/ */
@Data @Data
@TableName("jg_paymentdoc") @TableName("jg_paymentdoc")
@ -127,4 +127,13 @@ public class PaymentdocEntity {
@TableField(exist = false) @TableField(exist = false)
private PaymentEntity paymentEntity; private PaymentEntity paymentEntity;
@TableField("IS_STOP")
private String isStop;
@TableField("IS_SUBMIT")
private String isSubmit;
@TableField("payment_amount_history")
private String paymentAmountHistory;
} }

@ -13,7 +13,7 @@ import java.math.BigDecimal;
* @ V3.2.0 * @ V3.2.0
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ 2023-02-23 * @ 2023-03-22
*/ */
@Data @Data
@TableName("jg_paymentdoc_item0") @TableName("jg_paymentdoc_item0")
@ -68,4 +68,86 @@ public class PaymentdocItem0Entity {
@TableField("AMOUNT") @TableField("AMOUNT")
private BigDecimal amount; private BigDecimal amount;
@TableField("payment_amount")
private BigDecimal paymentAmount;
@TableField(exist = false)
private String documentNo;
@TableField(exist = false)
private String erpNo;
@TableField(exist = false)
private String contractCode;
@TableField(exist = false)
private String contractName;
@TableField(exist = false)
private String contractNo;
@TableField(exist = false)
private String supplierCode;
@TableField(exist = false)
private String supplierName;
@TableField(exist = false)
private BigDecimal num;
@TableField(exist = false)
private BigDecimal allAmount;
@TableField(exist = false)
private BigDecimal notAmount;
@TableField(exist = false)
private BigDecimal rate;
@TableField(exist = false)
private Integer poundNum;
@TableField(exist = false)
private String currency;
@TableField(exist = false)
private BigDecimal advanceAmount;
@TableField(exist = false)
private BigDecimal payPrice;
@TableField(exist = false)
private BigDecimal invoiceNum;
@TableField(exist = false)
private BigDecimal invoiceAmount;
@TableField(exist = false)
private BigDecimal refundableNum;
@TableField(exist = false)
private BigDecimal refundableAmount;
@TableField(exist = false)
private String status;
@TableField(exist = false)
private String sourceSystem;
@TableField(exist = false)
private String isSettle;
@TableField(exist = false)
private String issue;
@TableField(exist = false)
private String isTransfer;
@TableField(exist = false)
private String remark;
@TableField(exist = false)
private String supplierId;
@TableField(exist = false)
private BigDecimal requestAmount;
} }

@ -0,0 +1,246 @@
package jnpf.paymentdoc.entity;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
*
*
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-03-22
*/
@Data
@TableName("jg_paymentdoc_item1")
public class PaymentdocItem1Entity {
@TableId("ID")
private String id;
@TableField(value = "CREATOR_USER_ID",fill = FieldFill.INSERT)
private String creatorUserId;
@TableField(value = "CREATOR_USER_NAME",fill = FieldFill.INSERT)
private String creatorUserName;
@TableField(value = "CREATOR_TIME",fill = FieldFill.INSERT)
private Date creatorTime;
@TableField(value = "LAST_MODIFY_USER_ID",fill = FieldFill.INSERT_UPDATE)
private String lastModifyUserId;
@TableField(value = "LAST_MODIFY_USER_NAME",fill = FieldFill.INSERT_UPDATE)
private String lastModifyUserName;
@TableField(value = "LAST_MODIFY_TIME",fill = FieldFill.INSERT_UPDATE)
private Date lastModifyTime;
@TableField(value = "DELETE_USER_ID",fill = FieldFill.UPDATE)
private String deleteUserId;
@TableField(value = "DELETE_USER_NAME",fill = FieldFill.UPDATE)
private String deleteUserName;
@TableField(value = "DELETE_TIME",fill = FieldFill.UPDATE)
private Date deleteTime;
@TableField("DELETE_MARK")
@TableLogic
private String deleteMark;
@TableField(value = "ORGNIZE_ID",fill = FieldFill.INSERT)
private String orgnizeId;
@TableField(value = "DEPARTMENT_ID",fill = FieldFill.INSERT)
private String departmentId;
@TableField("PAYMENTDOC_ID")
private String paymentdocId;
@TableField("POUNDLIST_ID")
private String poundlistId;
@TableField("IS_FIRSTPAY")
private String isFirstpay;
@TableField("IS_PAY")
private String isPay;
@TableField("PURCHASEORDER_ID")
private String purchaseorderId;
@TableField(exist = false)
private String customerId;
@TableField(exist = false)
private String salesId;
@TableField(exist = false)
private String supplierId;
@TableField(exist = false)
private String supplierName;
@TableField(exist = false)
private String purchaseId;
@TableField(exist = false)
private String materialId;
@TableField(exist = false)
private String advance;
@TableField(exist = false)
private String unit;
@TableField(exist = false)
private BigDecimal grossWeight;
@TableField(exist = false)
private BigDecimal tareWeight;
@TableField(exist = false)
private BigDecimal buckleWeight;
@TableField(exist = false)
private BigDecimal netWeight;
@TableField(exist = false)
private BigDecimal settlement;
@TableField(exist = false)
private BigDecimal purchasePrice;
@TableField(exist = false)
private BigDecimal collectPrice;
@TableField(exist = false)
private BigDecimal salesPrice;
@TableField(exist = false)
private Date inputDate;
@TableField(exist = false)
private Date outputDate;
@TableField(exist = false)
private Date payDate;
@TableField(exist = false)
private Date paymentDate;
@TableField(exist = false)
private Date poundDate;
@TableField(exist = false)
private String businessId;
@TableField(exist = false)
private String poundPictures;
@TableField(exist = false)
private String vehiclePictures;
@TableField(exist = false)
private String poundType;
@TableField(exist = false)
private String poundStatus;
@TableField(exist = false)
private String salesStatus;
@TableField(exist = false)
private String purchaseStatus;
@TableField(exist = false)
private String remark;
@TableField(exist = false)
private String transportType;
@TableField(exist = false)
private BigDecimal transportPrice;
@TableField(exist = false)
private String originPlace;
@TableField(exist = false)
private String naturalId;
@TableField(exist = false)
private String poundlistNo;
@TableField(exist = false)
private String vehicleId;
@TableField(exist = false)
private String isExamine;
@TableField(exist = false)
private String isInvoicing;
@TableField(exist = false)
private String isCollection;
@TableField(exist = false)
private String isExpense;
@TableField(exist = false)
private String materialName;
@TableField(exist = false)
private String customerName;
@TableField(exist = false)
private String salesName;
@TableField(exist = false)
private String vehicleName;
@TableField(exist = false)
private String businessName;
@TableField(exist = false)
private String naturalName;
@TableField(exist = false)
private String purchaseName;
@TableField(exist = false)
private String contractNo;
@TableField(exist = false)
private String purchaseContractNo;
@TableField(exist = false)
private String documentNo;
@TableField(exist = false)
private String rate;
@TableField(exist = false)
private BigDecimal unitPrice;
@TableField(exist = false)
private BigDecimal noPrice;
@TableField(exist = false)
private BigDecimal price;
@TableField(exist = false)
private String salesContractNo;
@TableField(exist = false)
private String purchaseorderItem0Id;
@TableField(exist = false)
private String salesorderItem0Id;
@TableField(exist = false)
private String saleRate;
@TableField(exist = false)
private String amount;
@TableField(exist = false)
private String notAmount;
@TableField(exist = false)
private String purchaseorderNo;
}

@ -0,0 +1,68 @@
package jnpf.paymentdoc.entity;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
/**
*
*
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-03-22
*/
@Data
@TableName("jg_paymentdoc_item2")
public class PaymentdocItem2Entity {
@TableId("ID")
private String id;
@TableField(value = "CREATOR_USER_ID",fill = FieldFill.INSERT)
private String creatorUserId;
@TableField(value = "CREATOR_USER_NAME",fill = FieldFill.INSERT)
private String creatorUserName;
@TableField(value = "CREATOR_TIME",fill = FieldFill.INSERT)
private Date creatorTime;
@TableField(value = "LAST_MODIFY_USER_ID",fill = FieldFill.INSERT_UPDATE)
private String lastModifyUserId;
@TableField(value = "LAST_MODIFY_USER_NAME",fill = FieldFill.INSERT_UPDATE)
private String lastModifyUserName;
@TableField(value = "LAST_MODIFY_TIME",fill = FieldFill.INSERT_UPDATE)
private Date lastModifyTime;
@TableField(value = "DELETE_USER_ID",fill = FieldFill.UPDATE)
private String deleteUserId;
@TableField(value = "DELETE_USER_NAME",fill = FieldFill.UPDATE)
private String deleteUserName;
@TableField(value = "DELETE_TIME",fill = FieldFill.UPDATE)
private Date deleteTime;
@TableField("DELETE_MARK")
@TableLogic
private String deleteMark;
@TableField(value = "ORGNIZE_ID",fill = FieldFill.INSERT)
private String orgnizeId;
@TableField(value = "DEPARTMENT_ID",fill = FieldFill.INSERT)
private String departmentId;
@TableField("PAYMENTDOC_ID")
private String paymentdocId;
@TableField("ENCLOSURE")
private String enclosure;
}

@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* V3.2.0 * V3.2.0
* LINKAGE-BOOT * LINKAGE-BOOT
* LINKAGE-BOOT * LINKAGE-BOOT
* 2023-02-23 * 2023-03-22
*/ */
public interface PaymentdocItem0Mapper extends BaseMapper<PaymentdocItem0Entity> { public interface PaymentdocItem0Mapper extends BaseMapper<PaymentdocItem0Entity> {

@ -0,0 +1,17 @@
package jnpf.paymentdoc.mapper;
import jnpf.paymentdoc.entity.PaymentdocItem1Entity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
*
* jg_paymentdoc_item1
* V3.2.0
* LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-03-22
*/
public interface PaymentdocItem1Mapper extends BaseMapper<PaymentdocItem1Entity> {
}

@ -0,0 +1,17 @@
package jnpf.paymentdoc.mapper;
import jnpf.paymentdoc.entity.PaymentdocItem2Entity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
*
* jg_paymentdoc_item2
* V3.2.0
* LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-03-22
*/
public interface PaymentdocItem2Mapper extends BaseMapper<PaymentdocItem2Entity> {
}

@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* V3.2.0 * V3.2.0
* LINKAGE-BOOT * LINKAGE-BOOT
* LINKAGE-BOOT * LINKAGE-BOOT
* 2023-02-23 * 2023-03-22
*/ */
public interface PaymentdocMapper extends BaseMapper<PaymentdocEntity> { public interface PaymentdocMapper extends BaseMapper<PaymentdocEntity> {

@ -3,6 +3,8 @@
package jnpf.paymentdoc.model.paymentdoc; package jnpf.paymentdoc.model.paymentdoc;
import jnpf.paymentdoc.model.paymentdoc.PaymentdocItem0Model; import jnpf.paymentdoc.model.paymentdoc.PaymentdocItem0Model;
import jnpf.paymentdoc.model.paymentdoc.PaymentdocItem1Model;
import jnpf.paymentdoc.model.paymentdoc.PaymentdocItem2Model;
import lombok.Data; import lombok.Data;
import java.util.List; import java.util.List;
import java.math.BigDecimal; import java.math.BigDecimal;
@ -15,7 +17,7 @@ import java.util.Map;
* @ V3.2.0 * @ V3.2.0
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ 2023-02-23 * @ 2023-03-22
*/ */
@Data @Data
public class PaymentdocCrForm { public class PaymentdocCrForm {
@ -99,6 +101,7 @@ public class PaymentdocCrForm {
@JsonProperty("isPay") @JsonProperty("isPay")
private String isPay; private String isPay;
/** 备注 **/ /** 备注 **/
@JsonProperty("remark") @JsonProperty("remark")
private String remark; private String remark;
@ -107,9 +110,22 @@ public class PaymentdocCrForm {
@JsonProperty("docStatus") @JsonProperty("docStatus")
private String docStatus; private String docStatus;
/** 部门id **/
@JsonProperty("departmentId")
private String departmentId;
@JsonProperty("paymentAmountHistory")
private String paymentAmountHistory;
/** 子表数据 **/ /** 子表数据 **/
@JsonProperty("paymentdocitem0List") @JsonProperty("paymentdocitem0List")
private List<PaymentdocItem0Model> paymentdocitem0List; private List<PaymentdocItem0Model> paymentdocitem0List;
/** 子表数据 **/
@JsonProperty("paymentdocitem1List")
private List<PaymentdocItem1Model> paymentdocitem1List;
/** 子表数据 **/
@JsonProperty("paymentdocitem2List")
private List<PaymentdocItem2Model> paymentdocitem2List;
} }

@ -2,7 +2,10 @@
package jnpf.paymentdoc.model.paymentdoc; package jnpf.paymentdoc.model.paymentdoc;
import jnpf.payment.entity.PaymentEntity;
import jnpf.paymentdoc.model.paymentdoc.PaymentdocItem0Model; import jnpf.paymentdoc.model.paymentdoc.PaymentdocItem0Model;
import jnpf.paymentdoc.model.paymentdoc.PaymentdocItem1Model;
import jnpf.paymentdoc.model.paymentdoc.PaymentdocItem2Model;
import lombok.Data; import lombok.Data;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List; import java.util.List;
@ -15,7 +18,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
* @ V3.2.0 * @ V3.2.0
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ 2023-02-23 * @ 2023-03-22
*/ */
@Data @Data
public class PaymentdocInfoVO{ public class PaymentdocInfoVO{
@ -91,11 +94,27 @@ public class PaymentdocInfoVO{
@JsonProperty("remark") @JsonProperty("remark")
private String remark; private String remark;
/** 部门id **/
@JsonProperty("departmentId")
private String departmentId;
/** 状态 **/ /** 状态 **/
@JsonProperty("docStatus") @JsonProperty("docStatus")
private String docStatus; private String docStatus;
@JsonProperty("paymentAmountHistory")
private String paymentAmountHistory;
/** 子表数据 **/ /** 子表数据 **/
@JsonProperty("paymentdocitem0List") @JsonProperty("paymentdocitem0List")
private List<PaymentdocItem0Model> paymentdocItem0List; private List<PaymentdocItem0Model> paymentdocItem0List;
/** 子表数据 **/
@JsonProperty("paymentdocitem1List")
private List<PaymentdocItem1Model> paymentdocItem1List;
/** 子表数据 **/
@JsonProperty("paymentdocitem2List")
private List<PaymentdocItem2Model> paymentdocItem2List;
/** 子表数据 **/
@JsonProperty("paymentEntityList")
private List<PaymentEntity> paymentEntityList;
} }

@ -13,7 +13,7 @@ import com.alibaba.fastjson.annotation.JSONField;
* V3.2.0 * V3.2.0
* : LINKAGE-BOOT * : LINKAGE-BOOT
* LINKAGE-BOOT * LINKAGE-BOOT
* 2023-02-23 * 2023-03-22
*/ */
@Data @Data
public class PaymentdocItem0Model { public class PaymentdocItem0Model {
@ -109,4 +109,9 @@ public class PaymentdocItem0Model {
@JsonProperty("creatorTime") @JsonProperty("creatorTime")
private Date creatorTime; private Date creatorTime;
@JsonProperty("paymentAmount")
private BigDecimal paymentAmount;
@JsonProperty("requestAmount")
private BigDecimal requestAmount;
} }

@ -0,0 +1,57 @@
package jnpf.paymentdoc.model.paymentdoc;
import lombok.Data;
import java.util.List;
import java.util.Date;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.alibaba.fastjson.annotation.JSONField;
/**
*
*
* V3.2.0
* : LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-03-22
*/
@Data
public class PaymentdocItem1Model {
@JsonProperty("id")
private String id;
@JsonProperty("poundlistId")
private String poundlistId;
@JsonProperty("purchaseorderId")
private String purchaseorderId;
@JsonProperty("isFirstpay")
private String isFirstpay;
@JsonProperty("isPay")
private String isPay;
@JsonProperty("vehicleName")
private String vehicleName;
@JsonProperty("materialName")
private String materialName;
@JsonProperty("poundType")
private String poundType;
@JsonProperty("netWeight")
private BigDecimal netWeight;
@JsonProperty("unit")
private String unit;
@JsonProperty("advance")
private String advance;
@JsonProperty("purchasePrice")
private BigDecimal purchasePrice;
@JsonProperty("settlement")
private BigDecimal settlement;
@JsonProperty("rate")
private String rate;
@JsonProperty("amount")
private String amount;
@JsonProperty("notAmount")
private String notAmount;
@JsonProperty("remark")
private String remark;
@JsonProperty("purchaseorderNo")
private String purchaseorderNo;
}

@ -0,0 +1,25 @@
package jnpf.paymentdoc.model.paymentdoc;
import lombok.Data;
import java.util.List;
import java.util.Date;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.alibaba.fastjson.annotation.JSONField;
/**
*
*
* V3.2.0
* : LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-03-22
*/
@Data
public class PaymentdocItem2Model {
/** 文件附件 **/
@JsonProperty("enclosure")
private String enclosure;
}

@ -10,7 +10,7 @@ import java.util.List;
* @ V3.2.0 * @ V3.2.0
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ 2023-02-23 * @ 2023-03-22
*/ */
@Data @Data
public class PaymentdocListQuery extends Pagination { public class PaymentdocListQuery extends Pagination {

@ -3,7 +3,6 @@
package jnpf.paymentdoc.model.paymentdoc; package jnpf.paymentdoc.model.paymentdoc;
import jnpf.payment.entity.PaymentEntity;
import lombok.Data; import lombok.Data;
import java.sql.Time; import java.sql.Time;
import java.util.Date; import java.util.Date;
@ -16,7 +15,7 @@ import java.math.BigDecimal;
* @ V3.2.0 * @ V3.2.0
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ 2023-02-23 * @ 2023-03-22
*/ */
@Data @Data
public class PaymentdocListVO{ public class PaymentdocListVO{
@ -45,10 +44,9 @@ public class PaymentdocListVO{
/** 供应商 **/ /** 供应商 **/
@JsonProperty("supplierId") @JsonProperty("supplierId")
private String supplierId; private String supplierId;
/** 供应商 **/
@JsonProperty("supplierName")
private String supplierName;
@JsonProperty("supplierName")
private String supplierName;
/** 付款类型 **/ /** 付款类型 **/
@JsonProperty("paymentType") @JsonProperty("paymentType")
@ -128,13 +126,22 @@ public class PaymentdocListVO{
@JsonProperty("remark") @JsonProperty("remark")
private String remark; private String remark;
/** 状态 **/
@JsonProperty("docStatus")
private String docStatus; /** 部门id **/
@JsonProperty("departmentId")
private String departmentId;
@JsonProperty("paymentAmountHistory")
private String paymentAmountHistory;
@JsonProperty("flowState") @JsonProperty("flowState")
private Integer flowState; private Integer flowState;
@JsonProperty("paymentEntity") @JsonProperty("isSubmit")
private PaymentEntity paymentEntity; private String isSubmit;
@JsonProperty("isStop")
private String isStop;
@JsonProperty("docStatus")
private String docStatus;
} }

@ -11,15 +11,15 @@ import java.util.List;
* @ V3.2.0 * @ V3.2.0
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ 2023-02-23 * @ 2023-03-22
*/ */
@Data @Data
public class PaymentdocPagination extends Pagination { public class PaymentdocPagination extends Pagination {
/** 单据编号 */ /** 单据编号 */
private String documentNo; private String documentNo;
/** 供应商 */ /** 供应商 */
private String supplierName; private String supplierName;
/** /**
* id * id
*/ */

@ -9,7 +9,7 @@ import java.util.*;
* @ V3.2.0 * @ V3.2.0
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ 2023-02-23 * @ 2023-03-22
*/ */
@Data @Data
public class PaymentdocPaginationExportModel extends Pagination { public class PaymentdocPaginationExportModel extends Pagination {

@ -3,6 +3,8 @@
package jnpf.paymentdoc.model.paymentdoc; package jnpf.paymentdoc.model.paymentdoc;
import jnpf.paymentdoc.model.paymentdoc.PaymentdocItem0Model; import jnpf.paymentdoc.model.paymentdoc.PaymentdocItem0Model;
import jnpf.paymentdoc.model.paymentdoc.PaymentdocItem1Model;
import jnpf.paymentdoc.model.paymentdoc.PaymentdocItem2Model;
import lombok.Data; import lombok.Data;
import java.util.List; import java.util.List;
import java.math.BigDecimal; import java.math.BigDecimal;
@ -17,7 +19,7 @@ import lombok.Data;
* @ V3.2.0 * @ V3.2.0
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ LINKAGE-BOOT * @ LINKAGE-BOOT
* @ 2023-02-23 * @ 2023-03-22
*/ */
@Data @Data
public class PaymentdocUpForm{ public class PaymentdocUpForm{
@ -98,8 +100,21 @@ public class PaymentdocUpForm{
@JsonProperty("docStatus") @JsonProperty("docStatus")
private String docStatus; private String docStatus;
/** 部门id **/
@JsonProperty("departmentId")
private String departmentId;
@JsonProperty("paymentAmountHistory")
private String paymentAmountHistory;
/** 子表数据 **/ /** 子表数据 **/
@JsonProperty("paymentdocitem0List") @JsonProperty("paymentdocitem0List")
private List<PaymentdocItem0Model> paymentdocitem0List; private List<PaymentdocItem0Model> paymentdocitem0List;
/** 子表数据 **/
@JsonProperty("paymentdocitem1List")
private List<PaymentdocItem1Model> paymentdocitem1List;
/** 子表数据 **/
@JsonProperty("paymentdocitem2List")
private List<PaymentdocItem2Model> paymentdocitem2List;
} }

@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
* V3.2.0 * V3.2.0
* LINKAGE-BOOT * LINKAGE-BOOT
* LINKAGE-BOOT * LINKAGE-BOOT
* 2023-02-23 * 2023-03-22
*/ */
public interface PaymentdocItem0Service extends IService<PaymentdocItem0Entity> { public interface PaymentdocItem0Service extends IService<PaymentdocItem0Entity> {

@ -0,0 +1,15 @@
package jnpf.paymentdoc.service;
import jnpf.paymentdoc.entity.PaymentdocItem1Entity;
import com.baomidou.mybatisplus.extension.service.IService;
/**
*
* jg_paymentdoc_item1
* V3.2.0
* LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-03-22
*/
public interface PaymentdocItem1Service extends IService<PaymentdocItem1Entity> {
}

@ -0,0 +1,15 @@
package jnpf.paymentdoc.service;
import jnpf.paymentdoc.entity.PaymentdocItem2Entity;
import com.baomidou.mybatisplus.extension.service.IService;
/**
*
* jg_paymentdoc_item2
* V3.2.0
* LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-03-22
*/
public interface PaymentdocItem2Service extends IService<PaymentdocItem2Entity> {
}

@ -1,6 +1,10 @@
package jnpf.paymentdoc.service; package jnpf.paymentdoc.service;
import jnpf.paymentdoc.entity.PaymentdocItem0Entity; import jnpf.paymentdoc.entity.PaymentdocItem0Entity;
import jnpf.paymentdoc.service.PaymentdocItem0Service; import jnpf.paymentdoc.service.PaymentdocItem0Service;
import jnpf.paymentdoc.entity.PaymentdocItem1Entity;
import jnpf.paymentdoc.service.PaymentdocItem1Service;
import jnpf.paymentdoc.entity.PaymentdocItem2Entity;
import jnpf.paymentdoc.service.PaymentdocItem2Service;
import jnpf.paymentdoc.entity.PaymentdocEntity; import jnpf.paymentdoc.entity.PaymentdocEntity;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
@ -12,13 +16,13 @@ import java.util.*;
* V3.2.0 * V3.2.0
* LINKAGE-BOOT * LINKAGE-BOOT
* LINKAGE-BOOT * LINKAGE-BOOT
* 2023-02-23 * 2023-03-22
*/ */
public interface PaymentdocService extends IService<PaymentdocEntity> { public interface PaymentdocService extends IService<PaymentdocEntity> {
List<PaymentdocEntity> getList(PaymentdocPagination paymentdocPagination); List<PaymentdocEntity> getList(PaymentdocPagination paymentdocPagination);
List<PaymentdocEntity> getTypeList(PaymentdocPagination paymentdocPagination, String dataType); List<PaymentdocEntity> getTypeList(PaymentdocPagination paymentdocPagination,String dataType);
@ -28,10 +32,12 @@ public interface PaymentdocService extends IService<PaymentdocEntity> {
void create(PaymentdocEntity entity); void create(PaymentdocEntity entity);
boolean update(String id, PaymentdocEntity entity); boolean update( String id, PaymentdocEntity entity);
// 子表方法 // 子表方法
List<PaymentdocItem0Entity> GetPaymentdocItem0List(String id); List<PaymentdocItem0Entity> GetPaymentdocItem0List(String id);
List<PaymentdocItem1Entity> GetPaymentdocItem1List(String id);
List<PaymentdocItem2Entity> GetPaymentdocItem2List(String id);
//列表子表数据方法 //列表子表数据方法
} }

@ -31,7 +31,7 @@ import java.util.*;
* V3.2.0 * V3.2.0
* LINKAGE-BOOT * LINKAGE-BOOT
* LINKAGE-BOOT * LINKAGE-BOOT
* 2023-02-23 * 2023-03-22
*/ */
@Service @Service
public class PaymentdocItem0ServiceImpl extends ServiceImpl<PaymentdocItem0Mapper, PaymentdocItem0Entity> implements PaymentdocItem0Service { public class PaymentdocItem0ServiceImpl extends ServiceImpl<PaymentdocItem0Mapper, PaymentdocItem0Entity> implements PaymentdocItem0Service {

@ -0,0 +1,39 @@
package jnpf.paymentdoc.service.impl;
import jnpf.paymentdoc.entity.*;
import jnpf.paymentdoc.mapper.PaymentdocItem1Mapper;
import jnpf.paymentdoc.service.*;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jnpf.util.RandomUtil;
import java.math.BigDecimal;
import jnpf.permission.model.authorize.AuthorizeConditionModel;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import java.text.SimpleDateFormat;
import jnpf.util.*;
import java.util.*;
/**
*
* jg_paymentdoc_item1
* V3.2.0
* LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-03-22
*/
@Service
public class PaymentdocItem1ServiceImpl extends ServiceImpl<PaymentdocItem1Mapper, PaymentdocItem1Entity> implements PaymentdocItem1Service {
}

@ -0,0 +1,39 @@
package jnpf.paymentdoc.service.impl;
import jnpf.paymentdoc.entity.*;
import jnpf.paymentdoc.mapper.PaymentdocItem2Mapper;
import jnpf.paymentdoc.service.*;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jnpf.util.RandomUtil;
import java.math.BigDecimal;
import jnpf.permission.model.authorize.AuthorizeConditionModel;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import java.text.SimpleDateFormat;
import jnpf.util.*;
import java.util.*;
/**
*
* jg_paymentdoc_item2
* V3.2.0
* LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-03-22
*/
@Service
public class PaymentdocItem2ServiceImpl extends ServiceImpl<PaymentdocItem2Mapper, PaymentdocItem2Entity> implements PaymentdocItem2Service {
}

@ -40,7 +40,7 @@ import java.util.*;
* V3.2.0 * V3.2.0
* LINKAGE-BOOT * LINKAGE-BOOT
* LINKAGE-BOOT * LINKAGE-BOOT
* 2023-02-23 * 2023-03-22
*/ */
@Service @Service
public class PaymentdocServiceImpl extends ServiceImpl<PaymentdocMapper, PaymentdocEntity> implements PaymentdocService { public class PaymentdocServiceImpl extends ServiceImpl<PaymentdocMapper, PaymentdocEntity> implements PaymentdocService {
@ -55,6 +55,12 @@ public class PaymentdocServiceImpl extends ServiceImpl<PaymentdocMapper, Payment
@Autowired @Autowired
private PaymentdocItem0Service paymentdocItem0Service; private PaymentdocItem0Service paymentdocItem0Service;
@Autowired
private PaymentdocItem1Service paymentdocItem1Service;
@Autowired
private PaymentdocItem2Service paymentdocItem2Service;
@Autowired @Autowired
private SupplierService supplierService; private SupplierService supplierService;
@ -70,43 +76,75 @@ public class PaymentdocServiceImpl extends ServiceImpl<PaymentdocMapper, Payment
QueryWrapper<PaymentdocEntity> paymentdocQueryWrapper=new QueryWrapper<>(); QueryWrapper<PaymentdocEntity> paymentdocQueryWrapper=new QueryWrapper<>();
int paymentdocItem0Num =0; int paymentdocItem0Num =0;
QueryWrapper<PaymentdocItem0Entity> paymentdocItem0QueryWrapper=new QueryWrapper<>(); QueryWrapper<PaymentdocItem0Entity> paymentdocItem0QueryWrapper=new QueryWrapper<>();
boolean pcPermission = true; int paymentdocItem1Num =0;
boolean appPermission = true; QueryWrapper<PaymentdocItem1Entity> paymentdocItem1QueryWrapper=new QueryWrapper<>();
int paymentdocItem2Num =0;
QueryWrapper<PaymentdocItem2Entity> paymentdocItem2QueryWrapper=new QueryWrapper<>();
boolean pcPermission = false;
boolean appPermission = false;
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc"); boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
if(isPc && pcPermission){ if(isPc && pcPermission){
if (!userProvider.get().getIsAdministrator()){ if (!userProvider.get().getIsAdministrator()){
Object paymentdocObj=authorizeService.getCondition(new AuthorizeConditionModel(paymentdocQueryWrapper,paymentdocPagination.getMenuId(),"jg_paymentdoc")); Object paymentdocObj=authorizeService.getCondition(new AuthorizeConditionModel(paymentdocQueryWrapper,paymentdocPagination.getMenuId(),"paymentdoc"));
if (ObjectUtil.isEmpty(paymentdocObj)){ if (ObjectUtil.isEmpty(paymentdocObj)){
return new ArrayList<>(); return new ArrayList<>();
} else { } else {
paymentdocQueryWrapper = (QueryWrapper<PaymentdocEntity>)paymentdocObj; paymentdocQueryWrapper = (QueryWrapper<PaymentdocEntity>)paymentdocObj;
paymentdocNum++; paymentdocNum++;
} }
Object paymentdocItem0Obj=authorizeService.getCondition(new AuthorizeConditionModel(paymentdocItem0QueryWrapper,paymentdocPagination.getMenuId(),"jg_paymentdocItem0")); Object paymentdocItem0Obj=authorizeService.getCondition(new AuthorizeConditionModel(paymentdocItem0QueryWrapper,paymentdocPagination.getMenuId(),"paymentdocItem0"));
if (ObjectUtil.isEmpty(paymentdocItem0Obj)){ if (ObjectUtil.isEmpty(paymentdocItem0Obj)){
return new ArrayList<>(); return new ArrayList<>();
} else { } else {
paymentdocItem0QueryWrapper = (QueryWrapper<PaymentdocItem0Entity>)paymentdocItem0Obj; paymentdocItem0QueryWrapper = (QueryWrapper<PaymentdocItem0Entity>)paymentdocItem0Obj;
paymentdocItem0Num++; paymentdocItem0Num++;
} }
Object paymentdocItem1Obj=authorizeService.getCondition(new AuthorizeConditionModel(paymentdocItem1QueryWrapper,paymentdocPagination.getMenuId(),"paymentdocItem1"));
if (ObjectUtil.isEmpty(paymentdocItem1Obj)){
return new ArrayList<>();
} else {
paymentdocItem1QueryWrapper = (QueryWrapper<PaymentdocItem1Entity>)paymentdocItem1Obj;
paymentdocItem1Num++;
}
Object paymentdocItem2Obj=authorizeService.getCondition(new AuthorizeConditionModel(paymentdocItem2QueryWrapper,paymentdocPagination.getMenuId(),"paymentdocItem2"));
if (ObjectUtil.isEmpty(paymentdocItem2Obj)){
return new ArrayList<>();
} else {
paymentdocItem2QueryWrapper = (QueryWrapper<PaymentdocItem2Entity>)paymentdocItem2Obj;
paymentdocItem2Num++;
}
} }
} }
if(!isPc && appPermission){ if(!isPc && appPermission){
if (!userProvider.get().getIsAdministrator()){ if (!userProvider.get().getIsAdministrator()){
Object paymentdocObj=authorizeService.getCondition(new AuthorizeConditionModel(paymentdocQueryWrapper,paymentdocPagination.getMenuId(),"jg_paymentdoc")); Object paymentdocObj=authorizeService.getCondition(new AuthorizeConditionModel(paymentdocQueryWrapper,paymentdocPagination.getMenuId(),"paymentdoc"));
if (ObjectUtil.isEmpty(paymentdocObj)){ if (ObjectUtil.isEmpty(paymentdocObj)){
return new ArrayList<>(); return new ArrayList<>();
} else { } else {
paymentdocQueryWrapper = (QueryWrapper<PaymentdocEntity>)paymentdocObj; paymentdocQueryWrapper = (QueryWrapper<PaymentdocEntity>)paymentdocObj;
paymentdocNum++; paymentdocNum++;
} }
Object paymentdocItem0Obj=authorizeService.getCondition(new AuthorizeConditionModel(paymentdocItem0QueryWrapper,paymentdocPagination.getMenuId(),"jg_paymentdocItem0")); Object paymentdocItem0Obj=authorizeService.getCondition(new AuthorizeConditionModel(paymentdocItem0QueryWrapper,paymentdocPagination.getMenuId(),"paymentdocItem0"));
if (ObjectUtil.isEmpty(paymentdocItem0Obj)){ if (ObjectUtil.isEmpty(paymentdocItem0Obj)){
return new ArrayList<>(); return new ArrayList<>();
} else { } else {
paymentdocItem0QueryWrapper = (QueryWrapper<PaymentdocItem0Entity>)paymentdocItem0Obj; paymentdocItem0QueryWrapper = (QueryWrapper<PaymentdocItem0Entity>)paymentdocItem0Obj;
paymentdocItem0Num++; paymentdocItem0Num++;
} }
Object paymentdocItem1Obj=authorizeService.getCondition(new AuthorizeConditionModel(paymentdocItem1QueryWrapper,paymentdocPagination.getMenuId(),"paymentdocItem1"));
if (ObjectUtil.isEmpty(paymentdocItem1Obj)){
return new ArrayList<>();
} else {
paymentdocItem1QueryWrapper = (QueryWrapper<PaymentdocItem1Entity>)paymentdocItem1Obj;
paymentdocItem1Num++;
}
Object paymentdocItem2Obj=authorizeService.getCondition(new AuthorizeConditionModel(paymentdocItem2QueryWrapper,paymentdocPagination.getMenuId(),"paymentdocItem2"));
if (ObjectUtil.isEmpty(paymentdocItem2Obj)){
return new ArrayList<>();
} else {
paymentdocItem2QueryWrapper = (QueryWrapper<PaymentdocItem2Entity>)paymentdocItem2Obj;
paymentdocItem2Num++;
}
} }
} }
if(StringUtil.isNotEmpty(paymentdocPagination.getDocumentNo())){ if(StringUtil.isNotEmpty(paymentdocPagination.getDocumentNo())){
@ -162,43 +200,75 @@ public class PaymentdocServiceImpl extends ServiceImpl<PaymentdocMapper, Payment
QueryWrapper<PaymentdocEntity> paymentdocQueryWrapper=new QueryWrapper<>(); QueryWrapper<PaymentdocEntity> paymentdocQueryWrapper=new QueryWrapper<>();
int paymentdocItem0Num =0; int paymentdocItem0Num =0;
QueryWrapper<PaymentdocItem0Entity> paymentdocItem0QueryWrapper=new QueryWrapper<>(); QueryWrapper<PaymentdocItem0Entity> paymentdocItem0QueryWrapper=new QueryWrapper<>();
boolean pcPermission = true; int paymentdocItem1Num =0;
boolean appPermission = true; QueryWrapper<PaymentdocItem1Entity> paymentdocItem1QueryWrapper=new QueryWrapper<>();
int paymentdocItem2Num =0;
QueryWrapper<PaymentdocItem2Entity> paymentdocItem2QueryWrapper=new QueryWrapper<>();
boolean pcPermission = false;
boolean appPermission = false;
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc"); boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
if(isPc && pcPermission){ if(isPc && pcPermission){
if (!userProvider.get().getIsAdministrator()){ if (!userProvider.get().getIsAdministrator()){
Object paymentdocObj=authorizeService.getCondition(new AuthorizeConditionModel(paymentdocQueryWrapper,paymentdocPagination.getMenuId(),"jg_paymentdoc")); Object paymentdocObj=authorizeService.getCondition(new AuthorizeConditionModel(paymentdocQueryWrapper,paymentdocPagination.getMenuId(),"paymentdoc"));
if (ObjectUtil.isEmpty(paymentdocObj)){ if (ObjectUtil.isEmpty(paymentdocObj)){
return new ArrayList<>(); return new ArrayList<>();
} else { } else {
paymentdocQueryWrapper = (QueryWrapper<PaymentdocEntity>)paymentdocObj; paymentdocQueryWrapper = (QueryWrapper<PaymentdocEntity>)paymentdocObj;
paymentdocNum++; paymentdocNum++;
} }
Object paymentdocItem0Obj=authorizeService.getCondition(new AuthorizeConditionModel(paymentdocItem0QueryWrapper,paymentdocPagination.getMenuId(),"jg_paymentdocItem0")); Object paymentdocItem0Obj=authorizeService.getCondition(new AuthorizeConditionModel(paymentdocItem0QueryWrapper,paymentdocPagination.getMenuId(),"paymentdocItem0"));
if (ObjectUtil.isEmpty(paymentdocItem0Obj)){ if (ObjectUtil.isEmpty(paymentdocItem0Obj)){
return new ArrayList<>(); return new ArrayList<>();
} else { } else {
paymentdocItem0QueryWrapper = (QueryWrapper<PaymentdocItem0Entity>)paymentdocItem0Obj; paymentdocItem0QueryWrapper = (QueryWrapper<PaymentdocItem0Entity>)paymentdocItem0Obj;
paymentdocItem0Num++; paymentdocItem0Num++;
} }
Object paymentdocItem1Obj=authorizeService.getCondition(new AuthorizeConditionModel(paymentdocItem1QueryWrapper,paymentdocPagination.getMenuId(),"paymentdocItem1"));
if (ObjectUtil.isEmpty(paymentdocItem1Obj)){
return new ArrayList<>();
} else {
paymentdocItem1QueryWrapper = (QueryWrapper<PaymentdocItem1Entity>)paymentdocItem1Obj;
paymentdocItem1Num++;
}
Object paymentdocItem2Obj=authorizeService.getCondition(new AuthorizeConditionModel(paymentdocItem2QueryWrapper,paymentdocPagination.getMenuId(),"paymentdocItem2"));
if (ObjectUtil.isEmpty(paymentdocItem2Obj)){
return new ArrayList<>();
} else {
paymentdocItem2QueryWrapper = (QueryWrapper<PaymentdocItem2Entity>)paymentdocItem2Obj;
paymentdocItem2Num++;
}
} }
} }
if(!isPc && appPermission){ if(!isPc && appPermission){
if (!userProvider.get().getIsAdministrator()){ if (!userProvider.get().getIsAdministrator()){
Object paymentdocObj=authorizeService.getCondition(new AuthorizeConditionModel(paymentdocQueryWrapper,paymentdocPagination.getMenuId(),"jg_paymentdoc")); Object paymentdocObj=authorizeService.getCondition(new AuthorizeConditionModel(paymentdocQueryWrapper,paymentdocPagination.getMenuId(),"paymentdoc"));
if (ObjectUtil.isEmpty(paymentdocObj)){ if (ObjectUtil.isEmpty(paymentdocObj)){
return new ArrayList<>(); return new ArrayList<>();
} else { } else {
paymentdocQueryWrapper = (QueryWrapper<PaymentdocEntity>)paymentdocObj; paymentdocQueryWrapper = (QueryWrapper<PaymentdocEntity>)paymentdocObj;
paymentdocNum++; paymentdocNum++;
} }
Object paymentdocItem0Obj=authorizeService.getCondition(new AuthorizeConditionModel(paymentdocItem0QueryWrapper,paymentdocPagination.getMenuId(),"jg_paymentdocItem0")); Object paymentdocItem0Obj=authorizeService.getCondition(new AuthorizeConditionModel(paymentdocItem0QueryWrapper,paymentdocPagination.getMenuId(),"paymentdocItem0"));
if (ObjectUtil.isEmpty(paymentdocItem0Obj)){ if (ObjectUtil.isEmpty(paymentdocItem0Obj)){
return new ArrayList<>(); return new ArrayList<>();
} else { } else {
paymentdocItem0QueryWrapper = (QueryWrapper<PaymentdocItem0Entity>)paymentdocItem0Obj; paymentdocItem0QueryWrapper = (QueryWrapper<PaymentdocItem0Entity>)paymentdocItem0Obj;
paymentdocItem0Num++; paymentdocItem0Num++;
} }
Object paymentdocItem1Obj=authorizeService.getCondition(new AuthorizeConditionModel(paymentdocItem1QueryWrapper,paymentdocPagination.getMenuId(),"paymentdocItem1"));
if (ObjectUtil.isEmpty(paymentdocItem1Obj)){
return new ArrayList<>();
} else {
paymentdocItem1QueryWrapper = (QueryWrapper<PaymentdocItem1Entity>)paymentdocItem1Obj;
paymentdocItem1Num++;
}
Object paymentdocItem2Obj=authorizeService.getCondition(new AuthorizeConditionModel(paymentdocItem2QueryWrapper,paymentdocPagination.getMenuId(),"paymentdocItem2"));
if (ObjectUtil.isEmpty(paymentdocItem2Obj)){
return new ArrayList<>();
} else {
paymentdocItem2QueryWrapper = (QueryWrapper<PaymentdocItem2Entity>)paymentdocItem2Obj;
paymentdocItem2Num++;
}
} }
} }
if(StringUtil.isNotEmpty(paymentdocPagination.getDocumentNo())){ if(StringUtil.isNotEmpty(paymentdocPagination.getDocumentNo())){
@ -268,6 +338,18 @@ public class PaymentdocServiceImpl extends ServiceImpl<PaymentdocMapper, Payment
queryWrapper.lambda().eq(PaymentdocItem0Entity::getPaymentdocId, id); queryWrapper.lambda().eq(PaymentdocItem0Entity::getPaymentdocId, id);
return paymentdocItem0Service.list(queryWrapper); return paymentdocItem0Service.list(queryWrapper);
} }
@Override
public List<PaymentdocItem1Entity> GetPaymentdocItem1List(String id){
QueryWrapper<PaymentdocItem1Entity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(PaymentdocItem1Entity::getPaymentdocId, id);
return paymentdocItem1Service.list(queryWrapper);
}
@Override
public List<PaymentdocItem2Entity> GetPaymentdocItem2List(String id){
QueryWrapper<PaymentdocItem2Entity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(PaymentdocItem2Entity::getPaymentdocId, id);
return paymentdocItem2Service.list(queryWrapper);
}
//列表子表数据方法 //列表子表数据方法

@ -231,6 +231,16 @@ public class PoundlistEntity {
private String salesorderItem0Id; private String salesorderItem0Id;
@TableField(exist = false) @TableField(exist = false)
private String saleRate; private String saleRate;
@TableField(exist = false)
private String amount;
@TableField(exist = false)
private String notAmount;
@TableField(exist = false)
private String isFirstpay = "0";
@TableField(exist = false)
private String purchaseorderNo;
@TableField(exist = false)
private String collectionAccount;
@TableField(exist = false)
private String colectionBank;
} }

@ -30,4 +30,8 @@ public interface PoundlistMapper extends BaseMapper<PoundlistEntity> {
List<PoundlistTwoEntity> qureylist2(PoundlistTwoEntity poundlistTwoEntity); List<PoundlistTwoEntity> qureylist2(PoundlistTwoEntity poundlistTwoEntity);
PoundlistEntity queryPoundById(String poundlistId); PoundlistEntity queryPoundById(String poundlistId);
List<PoundlistEntity> queryPoundListByIds(@Param("poundlistIdList") List<String> poundlistIdList);
List<PoundlistEntity> queryPoundListByIdsRenkuan(@Param("poundlistIdList") List<String> poundlistIdList, @Param("paymentdocId") String paymentdocId);
} }

@ -36,6 +36,10 @@ public interface PoundlistService extends IService<PoundlistEntity> {
PoundlistEntity queryPoundById(String poundlistId); PoundlistEntity queryPoundById(String poundlistId);
List<PoundlistEntity> queryPoundListByIds(List<String> poundlistIdList);
List<PoundlistEntity> queryPoundListByIdsRenkuan(List<String> poundlistIdList, String paymentdocId);
// 子表方法 // 子表方法
//列表子表数据方法 //列表子表数据方法

@ -128,10 +128,6 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
} }
Page<PoundlistEntity> page=new Page<>(poundlistPagination.getCurrentPage(), poundlistPagination.getPageSize()); Page<PoundlistEntity> page=new Page<>(poundlistPagination.getCurrentPage(), poundlistPagination.getPageSize());
IPage<PoundlistEntity> iPage = poundlistMapper.queryByKeyword(page, poundlistPagination); IPage<PoundlistEntity> iPage = poundlistMapper.queryByKeyword(page, poundlistPagination);
// IPage<PoundlistEntity> userIPage = poundlistMapper.queryByKeyword(page, poundlistPagination);
//
// IPage<PoundlistEntity> iPage=this.page(userIPage, poundlistQueryWrapper);
return poundlistPagination.setData(iPage.getRecords(),iPage.getTotal()); return poundlistPagination.setData(iPage.getRecords(),iPage.getTotal());
} }
@Override @Override
@ -252,6 +248,16 @@ public class PoundlistServiceImpl extends ServiceImpl<PoundlistMapper, Poundlist
return poundlistMapper.queryPoundById(poundlistId); return poundlistMapper.queryPoundById(poundlistId);
} }
@Override
public List<PoundlistEntity> queryPoundListByIds(List<String> poundlistIdList) {
return poundlistMapper.queryPoundListByIds(poundlistIdList);
}
@Override
public List<PoundlistEntity> queryPoundListByIdsRenkuan(List<String> poundlistIdList, String paymentdocId) {
return poundlistMapper.queryPoundListByIdsRenkuan(poundlistIdList, paymentdocId);
}
@Override @Override
public void delete(PoundlistEntity entity){ public void delete(PoundlistEntity entity){
if(entity!=null){ if(entity!=null){

@ -145,4 +145,7 @@ public class PurchaseorderEntity {
@TableField("REMARK") @TableField("REMARK")
private String remark; private String remark;
@TableField("is_payment")
private String isPayment;
} }

@ -546,7 +546,13 @@ public class PurchaseorderController {
String[] idList = ids.split(","); String[] idList = ids.split(",");
for (String id : idList) { for (String id : idList) {
PurchaseorderitemEntity entity = purchaseorderitemService.getInfo(id); PurchaseorderitemEntity entity = purchaseorderitemService.getInfo(id);
if(StringUtils.isNotEmpty(entity.getSupplierId())){
SupplierEntity supplierEntity = supplierService.getById(entity.getSupplierId());
entity.setColectionBank(supplierEntity.getBank());
entity.setCollectionAccount(supplierEntity.getBankAccount());
}
List<PoundlistEntity> poundlistEntityList = purchaseorderitemService.getPoundList(id); List<PoundlistEntity> poundlistEntityList = purchaseorderitemService.getPoundList(id);
poundlistEntityList = poundlistEntityList.stream().filter(fieLdsModel -> "0".equals(fieLdsModel.getIsPay())).collect(Collectors.toList());
entity.setPoundlistEntityList(poundlistEntityList); entity.setPoundlistEntityList(poundlistEntityList);
if (entity != null && StringUtils.isNotEmpty(entity.getContractCode())) { if (entity != null && StringUtils.isNotEmpty(entity.getContractCode())) {
ContractFileEntity contractFileEntity = contractFileService.getById(entity.getContractCode()); ContractFileEntity contractFileEntity = contractFileService.getById(entity.getContractCode());

@ -151,9 +151,15 @@ public class PurchaseorderitemEntity {
@TableField("SUPPLIER_ID") @TableField("SUPPLIER_ID")
private String supplierId; private String supplierId;
@TableField("is_payment")
private String isPayment;
@TableField(exist = false) @TableField(exist = false)
private List<PoundlistEntity> poundlistEntityList; private List<PoundlistEntity> poundlistEntityList;
@TableField(exist = false) @TableField(exist = false)
private List<PaymentdocEntity> paymentdocEntityList; private List<PaymentdocEntity> paymentdocEntityList;
@TableField(exist = false)
private String collectionAccount;
@TableField(exist = false)
private String colectionBank;
} }

@ -116,6 +116,9 @@ public class PurchaseorderCrForm {
@JsonProperty("supplierId") @JsonProperty("supplierId")
private String supplierId; private String supplierId;
@JsonProperty("isPayment")
private String isPayment;
/** 子表数据 **/ /** 子表数据 **/
@JsonProperty("purchaseorder_item0List") @JsonProperty("purchaseorder_item0List")
private List<Purchaseorder_item0Model> purchaseorder_item0List; private List<Purchaseorder_item0Model> purchaseorder_item0List;

@ -123,6 +123,9 @@ public class PurchaseorderInfoVO{
@JsonProperty("remark") @JsonProperty("remark")
private String remark; private String remark;
@JsonProperty("isPayment")
private String isPayment;
/** 子表数据 **/ /** 子表数据 **/
@JsonProperty("purchaseorder_item0List") @JsonProperty("purchaseorder_item0List")
private List<Purchaseorder_item0Model> purchaseorder_item0List; private List<Purchaseorder_item0Model> purchaseorder_item0List;

@ -3,6 +3,7 @@
package jnpf.purchaseorder.model.purchaseorder; package jnpf.purchaseorder.model.purchaseorder;
import com.baomidou.mybatisplus.annotation.TableField;
import jnpf.poundlist.entity.PoundlistEntity; import jnpf.poundlist.entity.PoundlistEntity;
import lombok.Data; import lombok.Data;
import java.sql.Time; import java.sql.Time;
@ -132,6 +133,9 @@ public class PurchaseorderListVO{
@JsonProperty("supplierId") @JsonProperty("supplierId")
private String supplierId; private String supplierId;
@JsonProperty("isPayment")
private String isPayment;
@JsonProperty("poundlistEntityList") @JsonProperty("poundlistEntityList")
private List<PoundlistEntity> poundlistEntityList; private List<PoundlistEntity> poundlistEntityList;
} }

@ -113,7 +113,8 @@ public class PurchaseorderUpForm{
@JsonProperty("invoiceAmount") @JsonProperty("invoiceAmount")
private String invoiceAmount; private String invoiceAmount;
@JsonProperty("isPayment")
private String isPayment;
/** 单据状态 **/ /** 单据状态 **/
@JsonProperty("status") @JsonProperty("status")
private String status; private String status;

@ -1762,9 +1762,10 @@ public class PurchaseorderitemServiceImpl extends ServiceImpl<PurchaseorderitemM
queryWrapper.lambda().eq(Purchaseorder_item0Entity::getPurchaseorderId, id); queryWrapper.lambda().eq(Purchaseorder_item0Entity::getPurchaseorderId, id);
queryWrapper.lambda().select(Purchaseorder_item0Entity::getPoundlistId); queryWrapper.lambda().select(Purchaseorder_item0Entity::getPoundlistId);
List<String> poundlistIdList = purchaseorder_item0Service.listObjs(queryWrapper).stream().map(o -> (String) o).collect(Collectors.toList()); List<String> poundlistIdList = purchaseorder_item0Service.listObjs(queryWrapper).stream().map(o -> (String) o).collect(Collectors.toList());
QueryWrapper<PoundlistEntity> queryWrapper2 = new QueryWrapper<>(); //QueryWrapper<PoundlistEntity> queryWrapper2 = new QueryWrapper<>();
queryWrapper2.lambda().in(PoundlistEntity::getId, poundlistIdList).orderByDesc(PoundlistEntity::getAdvance).orderByAsc(PoundlistEntity::getPoundDate); List<PoundlistEntity> poundlistEntityList = poundlistService.queryPoundListByIds(poundlistIdList);
return poundlistService.list(queryWrapper2); //queryWrapper2.lambda().in(PoundlistEntity::getId, poundlistIdList).orderByDesc(PoundlistEntity::getAdvance).orderByAsc(PoundlistEntity::getPoundDate);
return poundlistEntityList;
} }
//列表子表数据方法 //列表子表数据方法
} }

@ -7,7 +7,7 @@
LEFT JOIN jg_purchaseorder b on a.purchaseorder_id = b.id LEFT JOIN jg_purchaseorder b on a.purchaseorder_id = b.id
LEFT JOIN jg_contract c on a.contract_id = c.id LEFT JOIN jg_contract c on a.contract_id = c.id
LEFT JOIN jg_supplier d on a.supplier_id = d.id LEFT JOIN jg_supplier d on a.supplier_id = d.id
where 1=1 where 1=1 AND a.delete_mark = 0 AND b.delete_mark = 0 AND c.delete_mark = 0 AND d.delete_mark = 0
<if test="invoicesPagination.startDate != null and invoicesPagination.endDate != null"> <if test="invoicesPagination.startDate != null and invoicesPagination.endDate != null">
AND a.creator_time &gt; #{invoicesPagination.startDate} AND a.creator_time &lt;= #{invoicesPagination.endDate} AND a.creator_time &gt; #{invoicesPagination.startDate} AND a.creator_time &lt;= #{invoicesPagination.endDate}
</if> </if>

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.mapper.PaymentdocItem0Mapper">
</mapper>

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.mapper.PaymentdocItem1Mapper">
</mapper>

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.mapper.PaymentdocItem2Mapper">
</mapper>

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.mapper.PaymentdocMapper">
</mapper>

@ -26,7 +26,7 @@ LEFT JOIN jg_contract d ON a.sales_id=d.id
LEFT JOIN jg_receiptout_item0 e ON a.id=e.poundlist_id LEFT JOIN jg_receiptout_item0 e ON a.id=e.poundlist_id
LEFT JOIN jg_salesorder g ON g.contract_id=d.id LEFT JOIN jg_salesorder g ON g.contract_id=d.id
WHERE WHERE a.delete_mark = 0 and b.delete_mark = 0 and c.delete_mark = 0 and d.delete_mark = 0 and e.delete_mark = 0 and g.delete_mark = 0 and
a.creator_time BETWEEN #{startTime} and #{endTime} a.creator_time BETWEEN #{startTime} and #{endTime}
OR OR
a.department_id =#{departmentIdS} a.department_id =#{departmentIdS}
@ -50,7 +50,7 @@ WHERE
LEFT JOIN jg_supplier b ON a.supplier_id=b.id LEFT JOIN jg_supplier b ON a.supplier_id=b.id
LEFT JOIN jg_customer c ON a.customer_id=c.id LEFT JOIN jg_customer c ON a.customer_id=c.id
LEFT JOIN jg_material d ON a.material_id=d.id LEFT JOIN jg_material d ON a.material_id=d.id
WHERE WHERE a.delete_mark = 0 and b.delete_mark = 0 and c.delete_mark = 0 and d.delete_mark = 0
a.creator_time BETWEEN #{startTime} and #{endTime} a.creator_time BETWEEN #{startTime} and #{endTime}
</select> </select>
@ -69,7 +69,7 @@ WHERE
LEFT JOIN jg_natural i on a.natural_id = i.id LEFT JOIN jg_natural i on a.natural_id = i.id
LEFT JOIN jg_purchaseorder_item0 j on a.id = j.poundlist_id LEFT JOIN jg_purchaseorder_item0 j on a.id = j.poundlist_id
LEFT JOIN jg_salesorder_item0 k on a.id = k.poundlist_id LEFT JOIN jg_salesorder_item0 k on a.id = k.poundlist_id
where a.is_examine = '1' where a.is_examine = '1' and a.delete_mark = 0 and b.delete_mark = 0 and c.delete_mark = 0 and d.delete_mark = 0 and e.delete_mark = 0 and f.delete_mark = 0 and g.delete_mark = 0 and i.delete_mark = 0 and j.delete_mark = 0 and k.delete_mark = 0
<if test="poundlistPagination.keyword != null and poundlistPagination.keyword != ''"> <if test="poundlistPagination.keyword != null and poundlistPagination.keyword != ''">
AND (b.ticketno LIKE CONCAT('%',#{poundlistPagination.keyword},'%') OR c.supplier_name LIKE CONCAT('%',#{poundlistPagination.keyword},'%') OR d.supplier_nm LIKE CONCAT('%',#{poundlistPagination.keyword},'%')) AND (b.ticketno LIKE CONCAT('%',#{poundlistPagination.keyword},'%') OR c.supplier_name LIKE CONCAT('%',#{poundlistPagination.keyword},'%') OR d.supplier_nm LIKE CONCAT('%',#{poundlistPagination.keyword},'%'))
</if> </if>
@ -129,7 +129,7 @@ WHERE
<select id="queryPoundById" resultType="jnpf.poundlist.entity.PoundlistEntity"> <select id="queryPoundById" resultType="jnpf.poundlist.entity.PoundlistEntity">
SELECT a.*,b.ticketno vehicleName,c.supplier_name supplierName,d.supplier_nm customerName,e.item_name materialName,f.contract_name salesName,g.contract_name purchaseName,h.F_RealName businessName,i.name naturalName,g.contract_no purchaseContractNo,f.contract_no salesContractNo SELECT a.*,b.ticketno vehicleName,c.supplier_name supplierName,d.supplier_nm customerName,e.item_name materialName,f.contract_name salesName,g.contract_name purchaseName,h.F_RealName businessName,i.name naturalName,g.contract_no purchaseContractNo,f.contract_no salesContractNo,j.rate rate,j.amount amount,j.not_amount notAmount,k.document_no purchaseorderNo,c.bank colectionBank,c.bank_account collectionAccount
from jg_poundlist a from jg_poundlist a
LEFT JOIN jg_vehicle b on a.vehicle_id = b.id LEFT JOIN jg_vehicle b on a.vehicle_id = b.id
LEFT JOIN jg_supplier c on a.supplier_id = c.id LEFT JOIN jg_supplier c on a.supplier_id = c.id
@ -139,7 +139,50 @@ WHERE
LEFT JOIN jg_contract g on a.purchase_id = g.id LEFT JOIN jg_contract g on a.purchase_id = g.id
LEFT JOIN base_user h on a.business_id = h.f_id LEFT JOIN base_user h on a.business_id = h.f_id
LEFT JOIN jg_natural i on a.natural_id = i.id LEFT JOIN jg_natural i on a.natural_id = i.id
where a.id = #{id} LEFT JOIN jg_purchaseorder_item0 j on a.id = j.poundlist_id
LEFT JOIN jg_purchaseorder k on k.id = j.purchaseorder_id
where a.delete_mark = 0 and b.delete_mark = 0 and c.delete_mark = 0 and d.delete_mark = 0 and e.delete_mark = 0 and f.delete_mark = 0 and g.delete_mark = 0 and i.delete_mark = 0 and j.delete_mark = 0 and k.delete_mark = 0 and a.id = #{id}
</select>
<select id="queryPoundListByIds" resultType="jnpf.poundlist.entity.PoundlistEntity">
SELECT a.*,b.ticketno vehicleName,c.supplier_name supplierName,d.supplier_nm customerName,e.item_name materialName,f.contract_name salesName,g.contract_name purchaseName,h.F_RealName businessName,i.name naturalName,g.contract_no purchaseContractNo,f.contract_no salesContractNo,j.rate rate,j.amount amount,j.not_amount notAmount,k.document_no purchaseorderNo,c.bank colectionBank,c.bank_account collectionAccount
from jg_poundlist a
LEFT JOIN jg_vehicle b on a.vehicle_id = b.id
LEFT JOIN jg_supplier c on a.supplier_id = c.id
LEFT JOIN jg_customer d on a.customer_id = d.id
LEFT JOIN jg_material e on a.material_id = e.id
LEFT JOIN jg_contract f on a.sales_id = f.id
LEFT JOIN jg_contract g on a.purchase_id = g.id
LEFT JOIN base_user h on a.business_id = h.f_id
LEFT JOIN jg_natural i on a.natural_id = i.id
LEFT JOIN jg_purchaseorder_item0 j on a.id = j.poundlist_id
LEFT JOIN jg_purchaseorder k on k.id = j.purchaseorder_id
where a.delete_mark = 0 and b.delete_mark = 0 and c.delete_mark = 0 and d.delete_mark = 0 and e.delete_mark = 0 and f.delete_mark = 0 and g.delete_mark = 0 and i.delete_mark = 0 and j.delete_mark = 0 and k.delete_mark = 0 and a.id in
<foreach collection="poundlistIdList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</select> </select>
<select id="queryPoundListByIdsRenkuan" resultType="jnpf.poundlist.entity.PoundlistEntity">
SELECT a.*,b.ticketno vehicleName,c.supplier_name supplierName,d.supplier_nm customerName,e.item_name materialName,f.contract_name salesName,g.contract_name purchaseName,h.F_RealName businessName,i.name naturalName,g.contract_no purchaseContractNo,f.contract_no salesContractNo,j.rate rate,j.amount amount,j.not_amount notAmount,k.document_no purchaseorderNo,c.bank colectionBank,c.bank_account collectionAccount
from jg_poundlist a
LEFT JOIN jg_vehicle b on a.vehicle_id = b.id
LEFT JOIN jg_supplier c on a.supplier_id = c.id
LEFT JOIN jg_customer d on a.customer_id = d.id
LEFT JOIN jg_material e on a.material_id = e.id
LEFT JOIN jg_contract f on a.sales_id = f.id
LEFT JOIN jg_contract g on a.purchase_id = g.id
LEFT JOIN base_user h on a.business_id = h.f_id
LEFT JOIN jg_natural i on a.natural_id = i.id
LEFT JOIN jg_purchaseorder_item0 j on a.id = j.poundlist_id
LEFT JOIN jg_purchaseorder k on k.id = j.purchaseorder_id
LEFT JOIN jg_paymentdoc_item1 l on (a.id = l.poundlist_id and k.id = l.purchaseorder_id and l.paymentdoc_id = #{paymentdocId})
where a.delete_mark = 0 and b.delete_mark = 0 and c.delete_mark = 0 and d.delete_mark = 0 and e.delete_mark = 0 and f.delete_mark = 0 and g.delete_mark = 0 and i.delete_mark = 0 and j.delete_mark = 0 and k.delete_mark = 0 and a.id in
<foreach collection="poundlistIdList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
ORDER BY l.is_firstpay DESC,l.is_pay ASC,a.advance DESC,a.pound_date ASC
</select>
</mapper> </mapper>

@ -7,7 +7,7 @@
LEFT JOIN jg_purchaseorder b on a.purchase_order_id = b.id LEFT JOIN jg_purchaseorder b on a.purchase_order_id = b.id
LEFT JOIN jg_contract c on b.contract_code = c.id LEFT JOIN jg_contract c on b.contract_code = c.id
LEFT JOIN jg_supplier d on b.supplier_id = d.id LEFT JOIN jg_supplier d on b.supplier_id = d.id
where 1=1 where 1=1 and a.delete_mark = 0 and b.delete_mark = 0 and c.delete_mark = 0 and d.delete_mark = 0
<if test="purchasebackPagination.documentNo != null and purchasebackPagination.documentNo != ''"> <if test="purchasebackPagination.documentNo != null and purchasebackPagination.documentNo != ''">
AND a.document_no LIKE CONCAT('%',#{purchasebackPagination.documentNo},'%') AND a.document_no LIKE CONCAT('%',#{purchasebackPagination.documentNo},'%')
</if> </if>

@ -219,7 +219,7 @@
from jg_purchaseorder a from jg_purchaseorder a
LEFT JOIN jg_supplier b on a.supplier_id = b.id LEFT JOIN jg_supplier b on a.supplier_id = b.id
LEFT JOIN jg_contract c on a.contract_code = c.id LEFT JOIN jg_contract c on a.contract_code = c.id
WHERE 1=1 WHERE 1=1 and a.delete_mark = 0 and b.delete_mark = 0 and c.delete_mark = 0
<if test="purchaseorderPagination.keyword != null and purchaseorderPagination.keyword != ''"> <if test="purchaseorderPagination.keyword != null and purchaseorderPagination.keyword != ''">
AND (c.contract_name LIKE CONCAT('%',#{purchaseorderPagination.keyword},'%') OR b.supplier_name LIKE CONCAT('%',#{purchaseorderPagination.keyword},'%')) AND (c.contract_name LIKE CONCAT('%',#{purchaseorderPagination.keyword},'%') OR b.supplier_name LIKE CONCAT('%',#{purchaseorderPagination.keyword},'%'))
</if> </if>

@ -6,7 +6,7 @@
from jg_receiptin a from jg_receiptin a
LEFT JOIN jg_purchaseorder b on a.souceno = b.id LEFT JOIN jg_purchaseorder b on a.souceno = b.id
LEFT JOIN jg_supplier d on a.supplier_id = d.id LEFT JOIN jg_supplier d on a.supplier_id = d.id
where 1=1 where 1=1 and a.delete_mark = 0 and b.delete_mark = 0 and d.delete_mark = 0
<if test="receiptinPagination.startDate != null and receiptinPagination.endDate != null"> <if test="receiptinPagination.startDate != null and receiptinPagination.endDate != null">
AND a.creator_time &gt; #{receiptinPagination.startDate} AND a.creator_time &lt;= #{receiptinPagination.endDate} AND a.creator_time &gt; #{receiptinPagination.startDate} AND a.creator_time &lt;= #{receiptinPagination.endDate}
</if> </if>

@ -8,6 +8,6 @@
LEFT JOIN jg_material c on a.material_id = c.id LEFT JOIN jg_material c on a.material_id = c.id
LEFT JOIN jg_warehouse d on a.warehouse_id = d.id LEFT JOIN jg_warehouse d on a.warehouse_id = d.id
LEFT JOIN jg_reservoirarea e on a.reservoirarea_id = e.id LEFT JOIN jg_reservoirarea e on a.reservoirarea_id = e.id
WHERE receiptin_id = #{id} where 1=1 and a.delete_mark = 0 and b.delete_mark = 0 and c.delete_mark = 0 and d.delete_mark = 0 and e.delete_mark = 0 and receiptin_id = #{id}
</select> </select>
</mapper> </mapper>

@ -26,7 +26,7 @@ creator_time = DATE_SUB(NOW(),interval 15 day)
LEFT JOIN jg_contract g on a.purchase_id = g.id LEFT JOIN jg_contract g on a.purchase_id = g.id
LEFT JOIN base_user h on a.business_id = h.f_id LEFT JOIN base_user h on a.business_id = h.f_id
LEFT JOIN jg_natural i on a.natural_id = i.id LEFT JOIN jg_natural i on a.natural_id = i.id
where a.is_examine = '0' where a.is_examine = '0' AND a.delete_mark = 0
<if test="tradeuploadPagination.keyword != null and tradeuploadPagination.keyword != ''"> <if test="tradeuploadPagination.keyword != null and tradeuploadPagination.keyword != ''">
AND (b.ticketno LIKE CONCAT('%',#{tradeuploadPagination.keyword},'%') OR c.supplier_name LIKE CONCAT('%',#{tradeuploadPagination.keyword},'%') OR d.supplier_nm LIKE CONCAT('%',#{tradeuploadPagination.keyword},'%')) AND (b.ticketno LIKE CONCAT('%',#{tradeuploadPagination.keyword},'%') OR c.supplier_name LIKE CONCAT('%',#{tradeuploadPagination.keyword},'%') OR d.supplier_nm LIKE CONCAT('%',#{tradeuploadPagination.keyword},'%'))
</if> </if>

File diff suppressed because it is too large Load Diff

@ -1,5 +1,5 @@
<template> <template>
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'详情'" :close-on-click-modal="false" append-to-body <el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" append-to-body
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1500px"> :visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1500px">
<el-row :gutter="15" class=""> <el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right"> <el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right">
@ -64,7 +64,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="申请金额" prop="requestedamount"> <el-form-item label="申请金额" prop="requestedamount">
<el-input v-model="dataForm.requestedamount" placeholder="请输入" clearable :style='{"width":"100%"}'> <el-input v-model="dataForm.requestedamount" placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
</el-input> </el-input>
</el-form-item> </el-form-item>
@ -72,7 +72,7 @@
<el-col :span="8"> <el-col :span="8">
<el-form-item label="应付日期" prop="duedate"> <el-form-item label="应付日期" prop="duedate">
<el-date-picker v-model="dataForm.duedate" placeholder="请选择" clearable :style='{"width":"100%"}' <el-date-picker v-model="dataForm.duedate" placeholder="请选择" clearable :style='{"width":"100%"}'
type="date" format="yyyy-MM-dd" value-format="timestamp"> type="date" format="yyyy-MM-dd" value-format="timestamp" :disabled="true">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
@ -81,7 +81,7 @@
<el-form-item label="实付日期" prop="businessdate"> <el-form-item label="实付日期" prop="businessdate">
<el-date-picker v-model="dataForm.businessdate" placeholder="请选择" clearable :style='{"width":"100%"}' <el-date-picker v-model="dataForm.businessdate" placeholder="请选择" clearable :style='{"width":"100%"}'
type="date" format="yyyy-MM-dd" value-format="timestamp"> type="date" format="yyyy-MM-dd" value-format="timestamp">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -105,7 +105,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="来源单号" prop="paymentno"> <el-form-item label="来源单号" prop="paymentno">
<el-input v-model="dataForm.paymentno" placeholder="请输入" clearable :style='{"width":"100%"}'> <el-input v-model="dataForm.paymentno" placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
</el-input> </el-input>
</el-form-item> </el-form-item>
@ -117,7 +117,7 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <!-- <el-col :span="8">
<el-form-item label="单据状态" prop="status"> <el-form-item label="单据状态" prop="status">
<el-select v-model="dataForm.status" placeholder="请选择" clearable :style='{"width":"100%"}'> <el-select v-model="dataForm.status" placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" :value="item.id" <el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" :value="item.id"
@ -125,7 +125,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col> -->
<el-col :span="8"> <el-col :span="8">
<el-form-item label="付款凭证" prop="voucher"> <el-form-item label="付款凭证" prop="voucher">
<JNPF-UploadFz v-model="dataForm.voucher" :fileSize="15" :showTip="true" sizeUnit="MB" :limit="9" <JNPF-UploadFz v-model="dataForm.voucher" :fileSize="15" :showTip="true" sizeUnit="MB" :limit="9"
@ -163,7 +163,14 @@
</el-input> </el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="payPrice" width="150" label="已付金额" align="center"> <el-table-column prop="paymentAmount" width="150" label="已付金额" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.paymentAmount" placeholder="请输入" clearable :style='{"width":"100%"}'
readonly>
</el-input>
</template>
</el-table-column>
<el-table-column prop="payPrice" width="150" label="历史已付" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.payPrice" placeholder="请输入" clearable :style='{"width":"100%"}' readonly> <el-input v-model="scope.row.payPrice" placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
</el-input> </el-input>
@ -267,6 +274,7 @@
collectionbank: '', collectionbank: '',
requestedamount: '', requestedamount: '',
duedate: '', duedate: '',
businessdate: '',
currency: "0", currency: "0",
settlementtype: "0", settlementtype: "0",
paymentno: '', paymentno: '',
@ -284,15 +292,16 @@
message: '请输入付款金额', message: '请输入付款金额',
trigger: 'blur' trigger: 'blur'
}, },
{ ],
pattern: /^[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0$/, businessdate: [{
message: '请输入正确的金额', required: true,
message: '请选择实付日期',
trigger: 'blur' trigger: 'blur'
}, }
], ],
}, },
paymenttypeOptions: [{ paymenttypeOptions: [{
"fullName": "款", "fullName": "款",
"id": "0" "id": "0"
}, { }, {
"fullName": "运费", "fullName": "运费",
@ -368,7 +377,7 @@
return; return;
} }
const values = data.map(item => Number(item[column.property])); const values = data.map(item => Number(item[column.property]));
if (!values.every(value => isNaN(value)) && (index === 1 || index === 2 || index === 3 || index ===4 || index === 7|| index === 8 || index === 9|| index === 10 )) { if (!values.every(value => isNaN(value)) && (index === 1 || index === 2 || index === 3 || index === 4|| index === 5|| index === 8|| index === 9|| index === 10|| index === 11 )) {
sums[index] = values.reduce((prev, curr) => { sums[index] = values.reduce((prev, curr) => {
const value = Number(curr); const value = Number(curr);
if (!isNaN(value)) { if (!isNaN(value)) {

@ -163,7 +163,14 @@
</el-input> </el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="payPrice" width="150" label="已付金额" align="center"> <el-table-column prop="paymentAmount" width="150" label="已付金额" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.paymentAmount" placeholder="请输入" clearable :style='{"width":"100%"}'
readonly>
</el-input>
</template>
</el-table-column>
<el-table-column prop="payPrice" width="150" label="历史已付" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.payPrice" placeholder="请输入" clearable :style='{"width":"100%"}' readonly> <el-input v-model="scope.row.payPrice" placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
</el-input> </el-input>
@ -285,11 +292,6 @@
message: '请输入付款金额', message: '请输入付款金额',
trigger: 'blur' trigger: 'blur'
}, },
{
pattern: /^[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0$/,
message: '请输入正确的金额',
trigger: 'blur'
},
], ],
businessdate: [{ businessdate: [{
required: true, required: true,
@ -375,7 +377,7 @@
return; return;
} }
const values = data.map(item => Number(item[column.property])); const values = data.map(item => Number(item[column.property]));
if (!values.every(value => isNaN(value)) && (index === 1 || index === 2 || index === 3 || index === 4|| index === 7|| index === 8|| index === 9|| index === 10 )) { if (!values.every(value => isNaN(value)) && (index === 1 || index === 2 || index === 3 || index === 4|| index === 5|| index === 8|| index === 9|| index === 10|| index === 11 )) {
sums[index] = values.reduce((prev, curr) => { sums[index] = values.reduce((prev, curr) => {
const value = Number(curr); const value = Number(curr);
if (!isNaN(value)) { if (!isNaN(value)) {

@ -1,458 +1,513 @@
<template> <template>
<div class="JNPF-common-layout"> <div class="JNPF-common-layout">
<div class="JNPF-common-layout-center"> <div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16"> <el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent> <el-form @submit.native.prevent>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="单据编号"> <el-form-item label="单据编号">
<el-input v-model="query.documentNo" placeholder="请输入" clearable> </el-input> <el-input v-model="query.documentNo" placeholder="请输入" clearable> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="供应商"> <el-form-item label="供应商">
<el-input v-model="query.supplierName" placeholder="请输入" clearable></el-input> <el-input v-model="query.supplierName" placeholder="请输入" clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button> <el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button> <el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
</el-row> </el-row>
<div class="JNPF-common-layout-main JNPF-flex-main"> <div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head"> <div class="JNPF-common-head">
<div> <div>
<!-- <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()"> <el-button type="primary" icon="el-icon-plus" @click="stopPayment()">
</el-button> --> </el-button>
</div> </div>
<div class="JNPF-common-head-right"> <div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top"> <el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" @click="reset()" /> <el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
</el-tooltip> @click="reset()" />
<screenfull isContainer /> </el-tooltip>
</div> <screenfull isContainer />
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false" border> </div>
<el-table-column type="index" width="50" label="序号" fixed="left" align="center" /> <JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange'
<el-table-column prop="documentNo" label="单据编号" fixed="left" width="200" align="center" sortable="custom" /> @selection-change="handleSelectionChange" has-c :hasNO="false" border>
<!-- <el-table-column prop="purchaseId" label="采购订单" width="200" align="center" sortable="custom" /> <el-table-column type="index" width="50" label="序号" fixed="left" align="center" />
<el-table-column prop="documentNo" label="单据编号" fixed="left" width="200" align="center"
sortable="custom" />
<el-table-column label="是否提交" width="100" prop="isSubmit" align="center" sortable="custom">
<template slot-scope="scope">
{{ scope.row.isSubmit | dynamicText(isPayOptions) }}
</template>
</el-table-column>
<el-table-column label="是否终止" width="100" prop="isStop" align="center" sortable="custom">
<template slot-scope="scope">
{{ scope.row.isStop | dynamicText(isPayOptions) }}
</template>
</el-table-column>
<!-- <el-table-column prop="purchaseId" label="采购订单" width="200" align="center" sortable="custom" />
<el-table-column prop="contractId" label="合同" width="150" align="center" sortable="custom" /> <el-table-column prop="contractId" label="合同" width="150" align="center" sortable="custom" />
<el-table-column prop="supplierId" label="供应商" width="200" align="center" sortable="custom" /> --> <el-table-column prop="supplierId" label="供应商" width="200" align="center" sortable="custom" /> -->
<el-table-column label="付款类型" width="150" fixed="left" prop="paymentType" align="center" sortable="custom"> <el-table-column label="付款类型" width="150" fixed="left" prop="paymentType" align="center"
<template slot-scope="scope"> sortable="custom">
{{ scope.row.paymentType | dynamicText(paymentTypeOptions) }} <template slot-scope="scope">
</template> {{ scope.row.paymentType | dynamicText(paymentTypeOptions) }}
</el-table-column> </template>
<el-table-column prop="businessDate" label="业务日期" width="150" align="center" sortable="custom" /> </el-table-column>
<el-table-column label="币别" width="150" prop="currency" align="center" sortable="custom"> <el-table-column prop="businessDate" label="业务日期" width="150" align="center" sortable="custom" />
<template slot-scope="scope"> <el-table-column label="币别" width="150" prop="currency" align="center" sortable="custom">
{{ scope.row.currency | dynamicText(currencyOptions) }} <template slot-scope="scope">
</template> {{ scope.row.currency | dynamicText(currencyOptions) }}
</el-table-column> </template>
<el-table-column label="结算类型" width="150" prop="settlementType" align="center" sortable="custom"> </el-table-column>
<template slot-scope="scope"> <el-table-column label="结算类型" width="150" prop="settlementType" align="center" sortable="custom">
{{ scope.row.settlementType | dynamicText(settlementTypeOptions) }} <template slot-scope="scope">
</template> {{ scope.row.settlementType | dynamicText(settlementTypeOptions) }}
</el-table-column> </template>
<el-table-column prop="supplierName" label="供应商" width="200" align="center" sortable="custom" /> </el-table-column>
<el-table-column prop="ramount" label="申请金额" width="150" align="center" sortable="custom" /> <el-table-column prop="supplierName" label="供应商" width="200" align="center" sortable="custom" />
<el-table-column prop="paymentAmount" label="付款金额" width="150" align="center" sortable="custom" /> <el-table-column prop="ramount" label="申请金额" width="150" align="center" sortable="custom" />
<el-table-column prop="unpaymentAmount" label="付款金额" width="150" align="center" sortable="custom" /> <el-table-column prop="paymentAmount" label="付款金额" width="150" align="center" sortable="custom" />
<el-table-column prop="collectionAccount" label="收款账户" width="150" align="center" sortable="custom" /> <el-table-column prop="unpaymentAmount" label="未付款金额" width="150" align="center"
<el-table-column prop="colectionBank" label="收款银行" width="150" align="center" sortable="custom" /> sortable="custom" />
<el-table-column prop="dueDate" label="应付日期" width="150" align="center" sortable="custom" /> <el-table-column prop="collectionAccount" label="收款账户" width="150" align="center"
<el-table-column label="是否付款" width="150" prop="docStatus" align="center" sortable="custom"> sortable="custom" />
<template slot-scope="scope"> <el-table-column prop="colectionBank" label="收款银行" width="150" align="center" sortable="custom" />
{{ scope.row.docStatus | dynamicText(isPayOptions) }} <el-table-column prop="dueDate" label="应付日期" width="150" align="center" sortable="custom" />
</template> <el-table-column prop="remark" label="备注" width="150" align="center" sortable="custom" />
</el-table-column> <el-table-column prop="flowState" label="状态" width="100">
<el-table-column prop="remark" label="备注" width="150" align="center" sortable="custom" /> <template slot-scope="scope">
<el-table-column prop="flowState" label="状态" width="100"> <el-tag v-if="scope.row.flowState==1"></el-tag>
<template slot-scope="scope"> <el-tag type="success" v-else-if="scope.row.flowState==2">审核通过</el-tag>
<el-tag v-if="scope.row.flowState==1"></el-tag> <el-tag type="danger" v-else-if="scope.row.flowState==3">审核驳回</el-tag>
<el-tag type="success" v-else-if="scope.row.flowState==2">审核通过</el-tag> <el-tag type="info" v-else-if="scope.row.flowState==4">流程撤回</el-tag>
<el-tag type="danger" v-else-if="scope.row.flowState==3">审核驳回</el-tag> <el-tag type="info" v-else-if="scope.row.flowState==5">审核终止</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState==4">流程撤回</el-tag> <el-tag type="warning" v-else></el-tag>
<el-tag type="info" v-else-if="scope.row.flowState==5">审核终止</el-tag> </template>
<el-tag type="warning" v-else></el-tag> </el-table-column>
</template> <el-table-column label="操作" fixed="right" width="200">
</el-table-column> <template slot-scope="scope">
<el-table-column label="操作" fixed="right" width="100"> <el-button v-has="'btn_edit'" type="text"
<template slot-scope="scope"> :disabled="[1,2,4,5].indexOf(scope.row.flowState)>-1"
<el-button v-has="'btn_edit'" type="text" :disabled="[1,2,4,5].indexOf(scope.row.flowState)>-1" @click="addOrUpdateHandle(scope.row.id)">编辑
@click="addOrUpdateHandle(scope.row.id)">编辑 </el-button>
</el-button> <el-button type="text" v-has="'btn_remove'" class="JNPF-table-delBtn"
<el-button type="text" v-has="'btn_remove'" class="JNPF-table-delBtn" :disabled="!!scope.row.flowState" :disabled="!!scope.row.flowState" @click="handleDel(scope.row)">删除
@click="handleDel(scope.row.id)">删除 </el-button>
</el-button> <el-button size="mini" v-has="'btn_detail'" type="text" :disabled="!scope.row.flowState"
<el-button size="mini" v-has="'btn_detail'" type="text" :disabled="!scope.row.flowState" @click="addOrUpdateHandle(scope.row.id,scope.row.flowState)">详情</el-button>
@click="addOrUpdateHandle(scope.row.id,scope.row.flowState)">详情</el-button> <el-button size="mini" type="text" :disabled="!scope.row.flowState"
<el-button size="mini" type="text" :disabled="!scope.row.flowState" @click="fukuanHandle(scope.row.id,scope.row.flowState, scope.row.isSubmit, scope.row.isStop)">付款
@click="fukuanHandle(scope.row.id,scope.row.flowState, scope.row.docStatus)">付款</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</JNPF-table> </JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" /> @pagination="initData" />
</div> </div>
</div> </div>
<FlowBox v-if="flowVisible" ref="FlowBox" @close="colseFlow" /> <FlowBox v-if="flowVisible" ref="FlowBox" @close="colseFlow" />
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" /> <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
</div> </div>
</template> </template>
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import { import {
getDictionaryDataSelector getDictionaryDataSelector
} from '@/api/systemData/dictionary' } from '@/api/systemData/dictionary'
import FlowBox from '@/views/workFlow/components/FlowBox' import FlowBox from '@/views/workFlow/components/FlowBox'
import JNPFForm from './paymentForm' import JNPFForm from './paymentForm'
import ExportBox from './ExportBox' import ExportBox from './ExportBox'
import { import {
getDataInterfaceRes getDataInterfaceRes
} from '@/api/systemData/dataInterface' } from '@/api/systemData/dataInterface'
export default { export default {
components: { components: {
FlowBox, FlowBox,
JNPFForm, JNPFForm,
ExportBox ExportBox
}, },
data() { data() {
return { return {
formVisible: false, multipleSelection: [],
query: { multipleSelectionItem: [],
documentNo: undefined, formVisible: false,
}, query: {
treeProps: { documentNo: undefined,
children: 'children', },
label: 'fullName', treeProps: {
value: 'id' children: 'children',
}, label: 'fullName',
list: [], value: 'id'
listLoading: true, },
total: 0, list: [],
listQuery: { listLoading: true,
currentPage: 1, total: 0,
pageSize: 20, listQuery: {
sort: "desc", currentPage: 1,
sidx: "", pageSize: 20,
}, sort: "desc",
flowVisible: false, sidx: "",
exportBoxVisible: false, },
columnList: [{ flowVisible: false,
prop: 'documentNo', exportBoxVisible: false,
label: '单据编号' columnList: [{
}, prop: 'documentNo',
{ label: '单据编号'
prop: 'purchaseId', },
label: '采购订单' {
}, prop: 'purchaseId',
{ label: '采购订单'
prop: 'contractId', },
label: '合同' {
}, prop: 'contractId',
{ label: '合同'
prop: 'supplierId', },
label: '供应商' {
}, prop: 'supplierId',
{ label: '供应商'
prop: 'paymentType', },
label: '付款类型' {
}, prop: 'paymentType',
{ label: '付款类型'
prop: 'businessDate', },
label: '业务日期' {
}, prop: 'businessDate',
{ label: '业务日期'
prop: 'currency', },
label: '币别' {
}, prop: 'currency',
{ label: '币别'
prop: 'settlementType', },
label: '结算类型' {
}, prop: 'settlementType',
{ label: '结算类型'
prop: 'ramount', },
label: '申请金额' {
}, prop: 'ramount',
{ label: '申请金额'
prop: 'paymentAmount', },
label: '付款金额' {
}, prop: 'paymentAmount',
{ label: '付款金额'
prop: 'unpaymentAmount', },
label: '未付款金额' {
}, prop: 'unpaymentAmount',
{ label: '未付款金额'
prop: 'collectionAccount', },
label: '收款账户' {
}, prop: 'collectionAccount',
{ label: '收款账户'
prop: 'colectionBank', },
label: '收款银行' {
}, prop: 'colectionBank',
{ label: '收款银行'
prop: 'dueDate', },
label: '应付日期' {
}, prop: 'dueDate',
{ label: '应付日期'
prop: 'isPay', },
label: '是否付款' {
}, prop: 'isPay',
{ label: '是否付款'
prop: 'remark', },
label: '备注' {
}, prop: 'remark',
], label: '备注'
paymentTypeOptions: [{ },
"fullName": "货款", ],
"id": "0" paymentTypeOptions: [{
}, { "fullName": "货款",
"fullName": "运费", "id": "0"
"id": "1" }, {
}, { "fullName": "运费",
"fullName": "仓储", "id": "1"
"id": "2" }, {
}], "fullName": "仓储",
paymentTypeProps: { "id": "2"
"label": "fullName", }],
"value": "id" paymentTypeProps: {
}, "label": "fullName",
currencyOptions: [{ "value": "id"
"fullName": "人民币", },
"id": "0" currencyOptions: [{
}, { "fullName": "人民币",
"fullName": "美元", "id": "0"
"id": "1" }, {
}, { "fullName": "美元",
"fullName": "英镑", "id": "1"
"id": "2" }, {
}], "fullName": "英镑",
currencyProps: { "id": "2"
"label": "fullName", }],
"value": "id" currencyProps: {
}, "label": "fullName",
settlementTypeOptions: [{ "value": "id"
"fullName": "现金", },
"id": "0" settlementTypeOptions: [{
}, { "fullName": "现金",
"fullName": "赊购", "id": "0"
"id": "1" }, {
}, { "fullName": "赊购",
"fullName": "网银", "id": "1"
"id": "2" }, {
}, { "fullName": "网银",
"fullName": "银企直连", "id": "2"
"id": "3" }, {
}, { "fullName": "银企直连",
"fullName": "银票", "id": "3"
"id": "4" }, {
}, { "fullName": "银票",
"fullName": "商票", "id": "4"
"id": "5" }, {
}], "fullName": "商票",
settlementTypeProps: { "id": "5"
"label": "fullName", }],
"value": "id" settlementTypeProps: {
}, "label": "fullName",
isPayOptions: [{ "value": "id"
"fullName": "否", },
"id": "0" isPayOptions: [{
}, { "fullName": "否",
"fullName": "否", "id": "0"
"id": "1" }, {
}, { "fullName": "是",
"fullName": "否", "id": "1"
"id": "2" }],
}, { isPayProps: {
"fullName": "是", "label": "fullName",
"id": "3" "value": "id"
}], },
isPayProps: { statusOptions: [{
"label": "fullName", "fullName": "已保存",
"value": "id" "id": "0"
}, }, {
statusOptions: [{ "fullName": "审批中",
"fullName": "已保存", "id": "1"
"id": "0" }, {
}, { "fullName": "已审批",
"fullName": "审批中", "id": "2"
"id": "1" }, {
}, { "fullName": "已付款",
"fullName": "已审批", "id": "3"
"id": "2" }],
}, { statusProps: {
"fullName": "已付款", "label": "fullName",
"id": "3" "value": "id"
}], },
statusProps: { }
"label": "fullName", },
"value": "id" computed: {
}, menuId() {
} return this.$route.meta.modelId || ''
}, }
computed: { },
menuId() { created() {
return this.$route.meta.modelId || '' this.initData()
} },
}, methods: {
created() { stopPayment() {
this.initData() var statusFlag = true;
}, this.multipleSelectionItem.forEach((item, index) => {
methods: { if (item.isSubmit == '1' || item.isStop == '1') {
sortChange({ statusFlag = false;
column, }
prop, });
order if (!statusFlag) {
}) { this.$message({
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc' type: 'error',
this.listQuery.sidx = !order ? '' : prop message: '存在待提交的付款申请单无法终止',
this.initData() duration: 1000
}, });
initData() { return
this.listLoading = true; }
let _query = { const ids = this.multipleSelection.join()
...this.listQuery, this.$confirm('您确定要终止这些数据吗, 是否继续?', '提示', {
...this.query, type: 'warning'
menuId: this.menuId }).then(() => {
};
request({
url: `/api/paymentdoc/Paymentdoc/getList`,
method: 'post',
data: _query
}).then(res => {
var _list = [];
for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i];
_list.push(_data)
}
this.list = _list
this.total = res.data.pagination.total
this.listLoading = false
})
},
handleDel(id) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
request({
url: `/api/paymentdoc/Paymentdoc/${id}`,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
}).catch(() => {});
},
fukuanHandle(id, flowState, docStatus){
if(flowState == 2){
if(docStatus != 3){
this.formVisible = true
this.$nextTick(() => {
request({ request({
url: '/api/paymentdoc/Paymentdoc/' + id, url: `/api/paymentdoc/Paymentdoc/batchtopPayment/${ids}`,
method: 'get' method: 'post'
}).then(res => { }).then(res => {
this.$refs.JNPFForm.init(res.data) this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
}) })
}).catch(() => {})
},
handleSelectionChange(val) {
this.multipleSelectionItem = val
const res = val.map(item => item.id)
this.multipleSelection = res
},
sortChange({
column,
prop,
order
}) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
},
initData() {
this.listLoading = true;
let _query = {
...this.listQuery,
...this.query,
menuId: this.menuId
};
request({
url: `/api/paymentdoc/Paymentdoc/getList`,
method: 'post',
data: _query
}).then(res => {
var _list = [];
for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i];
_list.push(_data)
}
this.list = _list
this.total = res.data.pagination.total
this.listLoading = false
}) })
}else{ },
this.$message({ handleDel(row) {
type: 'error', if(row.isStop == '1' || row.isSubmit == '1' || row.paymentAmount > 0){
message: '该订单已提交付款', this.$message({
duration: 1000 type: 'error',
}); message: '已终止或者提交付款的单据无法删除',
return duration: 1000
} });
return
}
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
request({
url: `/api/paymentdoc/Paymentdoc/${row.id}`,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
}).catch(() => {});
},
fukuanHandle(id, flowState, isSubmit, isStop) {
if (flowState == 2) {
if (isSubmit == 0 && isStop == 0) {
this.formVisible = true
this.$nextTick(() => {
request({
url: '/api/paymentdoc/Paymentdoc/paymentcocToPaymen/' + id,
method: 'get'
}).then(res => {
this.$refs.JNPFForm.init(res.data)
})
})
} else {
this.$message({
type: 'error',
message: '该订单已提交付款并生成付款单',
duration: 1000
});
return
}
}else{ } else {
this.$message({ this.$message({
type: 'error', type: 'error',
message: '请耐心等待审批结束', message: '请耐心等待审批结束',
duration: 1000 duration: 1000
}); });
return return
} }
}, },
addOrUpdateHandle(id, flowState) { addOrUpdateHandle(id, flowState) {
let data = { let data = {
id: id || '', id: id || '',
enCode: 'paymentdoc', enCode: 'paymentdoc',
flowId: '398482034802139205', flowId: '398482034802139205',
formType: 1, formType: 1,
opType: flowState ? 0 : '-1', opType: flowState ? 0 : '-1',
status: flowState status: flowState
} }
this.flowVisible = true this.flowVisible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.FlowBox.init(data) this.$refs.FlowBox.init(data)
}) })
}, },
exportData() { exportData() {
this.exportBoxVisible = true this.exportBoxVisible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ExportBox.init(this.columnList) this.$refs.ExportBox.init(this.columnList)
}) })
}, },
download(data) { download(data) {
let query = { let query = {
...data, ...data,
...this.listQuery, ...this.listQuery,
...this.query, ...this.query,
menuId: this.menuId menuId: this.menuId
} }
request({ request({
url: `/api/paymentdoc/Paymentdoc/Actions/Export`, url: `/api/paymentdoc/Paymentdoc/Actions/Export`,
method: 'GET', method: 'GET',
data: query data: query
}).then(res => { }).then(res => {
if (!res.data.url) return if (!res.data.url) return
this.jnpf.downloadFile(res.data.url) this.jnpf.downloadFile(res.data.url)
this.$refs.ExportBox.visible = false this.$refs.ExportBox.visible = false
this.exportBoxVisible = false this.exportBoxVisible = false
}) })
}, },
search() { search() {
this.listQuery = { this.listQuery = {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: "desc", sort: "desc",
sidx: "", sidx: "",
} }
this.initData() this.initData()
}, },
colseFlow(isrRefresh) { colseFlow(isrRefresh) {
this.flowVisible = false this.flowVisible = false
if (isrRefresh) this.reset() if (isrRefresh) this.reset()
}, },
refresh(isrRefresh) { refresh(isrRefresh) {
this.formVisible = false this.formVisible = false
if (isrRefresh) this.reset() if (isrRefresh) this.reset()
}, },
reset() { reset() {
for (let key in this.query) { for (let key in this.query) {
this.query[key] = undefined this.query[key] = undefined
} }
this.listQuery = { this.listQuery = {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: "desc", sort: "desc",
sidx: "", sidx: "",
} }
this.initData() this.initData()
} }
} }
} }
</script> </script>

@ -170,7 +170,14 @@
</el-input> </el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="payPrice" width="150" label="已付金额" align="center"> <el-table-column prop="paymentAmount" width="150" label="已付金额" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.paymentAmount" placeholder="请输入" clearable :style='{"width":"100%"}'
readonly>
</el-input>
</template>
</el-table-column>
<el-table-column prop="payPrice" width="150" label="历史已付" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.payPrice" placeholder="请输入" clearable :style='{"width":"100%"}' <el-input v-model="scope.row.payPrice" placeholder="请输入" clearable :style='{"width":"100%"}'
readonly> readonly>
@ -295,13 +302,7 @@
required: true, required: true,
message: '请输入付款金额', message: '请输入付款金额',
trigger: 'blur' trigger: 'blur'
}, }],
{
pattern: /^[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0$/,
message: '请输入正确的金额',
trigger: 'blur'
},
],
businessdate: [{ businessdate: [{
required: true, required: true,
message: '请选择实付日期', message: '请选择实付日期',
@ -390,7 +391,7 @@
} }
const values = data.map(item => Number(item[column.property])); const values = data.map(item => Number(item[column.property]));
if (!values.every(value => isNaN(value)) && (index === 1 || index === 2 || index === 3 || index === 4 || if (!values.every(value => isNaN(value)) && (index === 1 || index === 2 || index === 3 || index === 4 ||
index === 7 || index === 8 || index === 9 || index === 10)) { index === 5 || index === 8 || index === 9 || index === 10 || index === 11)) {
sums[index] = values.reduce((prev, curr) => { sums[index] = values.reduce((prev, curr) => {
const value = Number(curr); const value = Number(curr);
if (!isNaN(value)) { if (!isNaN(value)) {
@ -434,11 +435,12 @@
} }
}, },
init(paymentdoc) { init(paymentdoc) {
var that = this;
this.fileList = [] this.fileList = []
this.dataForm.id = ''; this.dataForm.id = '';
this.visible = true; this.visible = true;
this.dataForm.supplierId = paymentdoc.supplierId
this.dataForm.paymenttype = paymentdoc.paymentType this.dataForm.paymenttype = paymentdoc.paymentType
this.dataForm.requestedamount = paymentdoc.ramount
this.dataForm.paymentamount = paymentdoc.ramount this.dataForm.paymentamount = paymentdoc.ramount
this.dataForm.collectionaccount = paymentdoc.collectionAccount this.dataForm.collectionaccount = paymentdoc.collectionAccount
this.dataForm.collectionbank = paymentdoc.colectionBank this.dataForm.collectionbank = paymentdoc.colectionBank
@ -447,11 +449,15 @@
this.dataForm.currency = paymentdoc.currency this.dataForm.currency = paymentdoc.currency
this.dataForm.settlementtype = paymentdoc.settlementType this.dataForm.settlementtype = paymentdoc.settlementType
this.dataForm.paymentno = paymentdoc.documentNo this.dataForm.paymentno = paymentdoc.documentNo
var requestedamount = 0;
paymentdoc.paymentdocitem0List.forEach((item, index) => { paymentdoc.paymentdocitem0List.forEach((item, index) => {
item.requestAmount = item.amount; //item.requestAmount = item.amount;
requestedamount = this.jnpf.floatAdd(requestedamount, item.requestAmount);
//item.amount = item.requestAmount;
item.paymentdocitemId = item.id; item.paymentdocitemId = item.id;
item.id = ''; item.id = '';
}); });
this.dataForm.requestedamount = requestedamount
this.dataForm.payment_item0List = paymentdoc.paymentdocitem0List this.dataForm.payment_item0List = paymentdoc.paymentdocitem0List
let param = { let param = {
param : 'payment' param : 'payment'

@ -16,7 +16,7 @@
<popupSelect v-model="dataForm.contractCode" placeholder="请选择" clearable field="contractCode" <popupSelect v-model="dataForm.contractCode" placeholder="请选择" clearable field="contractCode"
interfaceId="390143765857220229" :columnOptions="contractCodecolumnOptions" propsValue="id" interfaceId="390143765857220229" :columnOptions="contractCodecolumnOptions" propsValue="id"
relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage
:pageSize="20" @change="changeContract"> :pageSize="20" @change="changeContract" :disabled="true">
</popupSelect> </popupSelect>
</el-form-item> </el-form-item>
@ -26,7 +26,7 @@
<popupSelect v-model="dataForm.supplierId" placeholder="请选择" clearable field="supplierId" <popupSelect v-model="dataForm.supplierId" placeholder="请选择" clearable field="supplierId"
interfaceId="397751667988199621" :columnOptions="supplierIdcolumnOptions" propsValue="id" interfaceId="397751667988199621" :columnOptions="supplierIdcolumnOptions" propsValue="id"
relationField="supplier_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage relationField="supplier_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage
:pageSize="20"> :pageSize="20" :disabled="true">
</popupSelect> </popupSelect>
</el-form-item> </el-form-item>

@ -727,7 +727,7 @@
amountNotTax: 0, amountNotTax: 0,
invoiceStatus: '0', invoiceStatus: '0',
creatorUserName: undefined, creatorUserName: undefined,
invoicingDate: new Date(), invoicingDate: new Date().getTime(),
invoiceAttachment: [], invoiceAttachment: [],
} }
this.dataForm.invoicesitem0List.push(item) this.dataForm.invoicesitem0List.push(item)

@ -572,14 +572,14 @@
var statusFlag = true; var statusFlag = true;
for(var i=0;i<this.multipleSelectionItem.length;i++){ for(var i=0;i<this.multipleSelectionItem.length;i++){
supplierIdArr.push(this.multipleSelectionItem[i].supplierId); supplierIdArr.push(this.multipleSelectionItem[i].supplierId);
if(this.multipleSelectionItem[i].status != '2'){ if(this.multipleSelectionItem[i].status != '2' || this.multipleSelectionItem[i].isPayment == '1'){
statusFlag = false; statusFlag = false;
} }
} }
if(!statusFlag){ if(!statusFlag){
this.$message({ this.$message({
type: 'error', type: 'error',
message: '存在订单付款或请先入库', message: '存在订单付款或请先入库',
duration: 1500 duration: 1500
}) })
return return
@ -588,7 +588,7 @@
if(newSupplierIdArr.length != 1){ if(newSupplierIdArr.length != 1){
this.$message({ this.$message({
type: 'error', type: 'error',
message: '所选数据供应商需一致', message: '存在多个不同供应商,无法提交付款申请',
duration: 1000 duration: 1000
}); });
return return

@ -597,7 +597,7 @@
method: 'get', method: 'get',
data: param data: param
}).then(res => { }).then(res => {
this.dataForm.documentNo = res.msg this.dataForm.documentno = res.msg
}); });
/* this.dataForm.businessDate = new Date( ); /* this.dataForm.businessDate = new Date( );
this.dataForm.amount = purchaseorder.amount; this.dataForm.amount = purchaseorder.amount;

@ -52,8 +52,8 @@
<div class="JNPF-common-layout-main JNPF-flex-main"> <div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head"> <div class="JNPF-common-head">
<div> <div>
<el-button type="text" icon="el-icon-plus" @click="addOrUpdateHandle()"> <!-- <el-button type="text" icon="el-icon-plus" @click="addOrUpdateHandle()">
</el-button> </el-button> -->
<el-button type="text" icon="el-icon-download" @click="exportData()"> <el-button type="text" icon="el-icon-download" @click="exportData()">
</el-button> </el-button>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()"> <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">

@ -80,17 +80,17 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="毛重" prop="grossWeight"> <el-form-item label="毛重" prop="grossWeight">
<el-input-number v-model="dataForm.grossWeight" :style='{"width":"100%"}' :precision="6"></el-input-number> <el-input-number v-model="dataForm.grossWeight" :style='{"width":"100%"}' @change="grossWeightChange" :precision="6"></el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="皮重" prop="tareWeight"> <el-form-item label="皮重" prop="tareWeight">
<el-input-number v-model="dataForm.tareWeight" :style='{"width":"100%"}' :precision="6"></el-input-number> <el-input-number v-model="dataForm.tareWeight" :style='{"width":"100%"}' @change="grossWeightChange" :precision="6"></el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="扣重" prop="buckleWeight"> <el-form-item label="扣重" prop="buckleWeight">
<el-input-number v-model="dataForm.buckleWeight" :style='{"width":"100%"}' :precision="6"></el-input-number> <el-input-number v-model="dataForm.buckleWeight" :style='{"width":"100%"}' @change="grossWeightChange" :precision="6"></el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@ -443,6 +443,10 @@
created() {}, created() {},
mounted() {}, mounted() {},
methods: { methods: {
grossWeightChange(e, f){
//this.dataForm.netWeight = this.dataForm.grossWeight - this.dataForm.tareWeight - this.dataForm.buckleWeight;
this.dataForm.netWeight = this.jnpf.floatSub(this.jnpf.floatSub(parseFloat(this.dataForm.grossWeight), parseFloat(this.dataForm.tareWeight)), parseFloat(this.dataForm.buckleWeight))
},
unitChange(e){ unitChange(e){
this.dataForm.unit = e; this.dataForm.unit = e;
}, },
@ -470,7 +474,6 @@
}, },
customerSelect2(a, b) { customerSelect2(a, b) {
this.dataForm.supplierId = b.code; this.dataForm.supplierId = b.code;
debugger
}, },
handleAvatarSuccess(res, file) { handleAvatarSuccess(res, file) {
this.imageUrl = URL.createObjectURL(file.raw); this.imageUrl = URL.createObjectURL(file.raw);
@ -495,30 +498,14 @@
var grossWeight = this.dataForm.grossWeight;// var grossWeight = this.dataForm.grossWeight;//
var buckleWeight = this.dataForm.buckleWeight;// var buckleWeight = this.dataForm.buckleWeight;//
var netWeight = this.dataForm.netWeight;// var netWeight = this.dataForm.netWeight;//
if(grossWeight < tareWeight + buckleWeight + netWeight){ if(grossWeight != this.jnpf.floatAdd(tareWeight, this.jnpf.floatAdd(buckleWeight, netWeight))){
this.$message({ this.$message({
message: '毛重不得小于皮重+扣重+净重', message: '毛重必须等于皮重+扣重+净重',
type: 'success', type: 'error',
duration: 1000 duration: 1000
}) })
return return
} }
if(buckleWeight >= netWeight){
this.$message({
message: '扣重不得大于净重',
type: 'success',
duration: 1000
})
return
}
if(buckleWeight >= grossWeight){
this.$message({
message: '扣重不得大于毛重',
type: 'success',
duration: 1000
})
return
}
this.$refs['elForm'].validate((valid) => { this.$refs['elForm'].validate((valid) => {
if (valid) { if (valid) {
this.request3() this.request3()
@ -583,30 +570,14 @@
this.dataForm.unit = this.dataForm.unit ? this.dataForm.unit : 0; this.dataForm.unit = this.dataForm.unit ? this.dataForm.unit : 0;
this.dataForm.transportType = this.dataForm.transportType ? this.dataForm.transportType : 0; this.dataForm.transportType = this.dataForm.transportType ? this.dataForm.transportType : 0;
this.dataForm.advance = this.dataForm.advance ? this.dataForm.advance : 0; this.dataForm.advance = this.dataForm.advance ? this.dataForm.advance : 0;
if(grossWeight < tareWeight + buckleWeight + netWeight){ if(grossWeight != this.jnpf.floatAdd(tareWeight, this.jnpf.floatAdd(buckleWeight, netWeight))){
this.$message({ this.$message({
message: '毛重不得小于皮重+扣重+净重', message: '毛重必须等于皮重+扣重+净重',
type: 'success', type: 'error',
duration: 1000 duration: 1000
}) })
return return
} }
if(buckleWeight >= netWeight){
this.$message({
message: '扣重不得大于净重',
type: 'success',
duration: 1000
})
return
}
if(buckleWeight >= grossWeight){
this.$message({
message: '扣重不得大于毛重',
type: 'success',
duration: 1000
})
return
}
this.$refs['elForm'].validate((valid) => { this.$refs['elForm'].validate((valid) => {
if (valid) { if (valid) {
this.request2() this.request2()

Loading…
Cancel
Save