product
杨世强 2 years ago
parent 3524526cbd
commit ee5317f86d

@ -13,8 +13,11 @@ import jnpf.base.vo.PageListVO;
import jnpf.base.vo.PaginationVO;
import jnpf.base.UserInfo;
import jnpf.base.vo.DownloadVO;
import jnpf.collection.service.SaleorderCETService;
import jnpf.config.ConfigValueUtil;
import jnpf.exception.DataException;
import jnpf.saleback.entity.SaleorderEntity;
import org.bytedeco.opencv.presets.opencv_core;
import org.springframework.transaction.annotation.Transactional;
import jnpf.base.entity.ProvinceEntity;
import jnpf.collection.model.collection.*;
@ -44,6 +47,8 @@ import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import jnpf.util.GeneraterSwapUtil;
import java.math.BigDecimal;
import java.util.*;
import jnpf.util.file.UploadUtil;
@ -55,7 +60,7 @@ import jnpf.util.enums.FileTypeEnum;
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-11
* @ 2023-02-09
*/
@Slf4j
@RestController
@ -78,23 +83,58 @@ public class CollectionController {
@Autowired
private Collection_item0Service collection_item0Service;
@Autowired
private SaleorderCETService saleorderCETService;
@PostMapping("/confirmprice")
@Transactional
public ActionResult confirmPrice(@RequestBody CollectionListVO collectionListVO) {
CollectionEntity collectionEntity = collectionService.getInfo(collectionListVO.getId());
if (!collectionEntity.getStatus().equals("2")){
return ActionResult.fail("审核中,请先通过审核");
}
QueryWrapper<Collection_item0Entity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(Collection_item0Entity::getCollectionId,collectionListVO.getId());
List<Collection_item0Entity> collection_item0EntityList = collection_item0Service.list(queryWrapper);
for (Collection_item0Entity collection_item0Entity : collection_item0EntityList){
SaleorderCETEntity saleordercetEntity = saleorderCETService.getById(collection_item0Entity.getSalesorderId());
if (saleordercetEntity.getAmountCollected().equals(saleordercetEntity.getPrice())){
return ActionResult.fail("已回款金额等于金额");
}
if (saleordercetEntity.getAmountCollected()!=null && collection_item0Entity.getAmount() !=null) {
BigDecimal sum =saleordercetEntity.getAmountCollected().add(collection_item0Entity.getAmount());
saleordercetEntity.setAmountCollected(sum);
if (saleordercetEntity.getAmountCollected().compareTo(saleordercetEntity.getPrice()) > 0) {
return ActionResult.fail("总回款金额大于金额");
}
saleordercetEntity.setStatus("2");
saleorderCETService.updateById(saleordercetEntity);
}else {
return ActionResult.fail("已回款金额或回款金额不能为空");
}
}
return ActionResult.success("认款成功");
}
/**
*
*
* @param collectionPagination
* @return
*/
@PostMapping("/getList")
@PostMapping("/getList")
public ActionResult list(@RequestBody CollectionPagination collectionPagination)throws IOException{
List<CollectionEntity> list= collectionService.getList(collectionPagination);
//处理id字段转名称若无需转或者为空可删除
for(CollectionEntity entity:list){
}
List<CollectionListVO> listVO=JsonUtil.getJsonToList(list,CollectionListVO.class);
for(CollectionListVO collectionVO:listVO){
}
for(CollectionEntity entity:list){
Map<String,Object> customerNameMap = new HashMap<>();
entity.setCustomerName(generaterSwapUtil.getPopupSelectValue("393371066040385285","supplier_nm","supplier_nm",entity.getCustomerName(),customerNameMap));
entity.setVoucher(generaterSwapUtil.getFileNameInJson(entity.getVoucher()));
}
List<CollectionListVO> listVO=JsonUtil.getJsonToList(list,CollectionListVO.class);
for(CollectionListVO jg_collectionVO:listVO){
}
PageListVO vo=new PageListVO();
@ -116,19 +156,15 @@ public class CollectionController {
public ActionResult create(@RequestBody @Valid CollectionCrForm collectionCrForm) throws DataException {
String mainId =RandomUtil.uuId();
UserInfo userInfo=userProvider.get();
collectionCrForm.setDocumentNo(generaterSwapUtil.getBillNumber("collection", false));
CollectionEntity entity = JsonUtil.getJsonToBean(collectionCrForm, CollectionEntity.class);
entity.setId(mainId);
collectionService.save(entity);
List<Collection_item0Entity> Collection_item0List = JsonUtil.getJsonToList(collectionCrForm.getCollection_item0List(),Collection_item0Entity.class);
for(Collection_item0Entity entitys : Collection_item0List){
entitys.setSalesorderId(entitys.getId());
entitys.setId(RandomUtil.uuId());
entitys.setCollectionId(entity.getId());
collection_item0Service.save(entitys);
}
@ -172,6 +208,9 @@ public class CollectionController {
List<CollectionEntity> list= collectionService.getTypeList(collectionPagination,collectionPaginationExportModel.getDataType());
//处理id字段转名称若无需转或者为空可删除
for(CollectionEntity entity:list){
Map<String,Object> customerNameMap = new HashMap<>();
entity.setCustomerName(generaterSwapUtil.getPopupSelectValue("393371066040385285","supplier_nm","supplier_nm",entity.getCustomerName(),customerNameMap));
entity.setVoucher(generaterSwapUtil.getFileNameInJson(entity.getVoucher()));
}
List<CollectionListVO> listVO=JsonUtil.getJsonToList(list,CollectionListVO.class);
for(CollectionListVO collectionVO:listVO){
@ -194,33 +233,33 @@ public class CollectionController {
case "documentNo" :
entitys.add(new ExcelExportEntity("单据编号" ,"documentNo"));
break;
case "businessDate" :
entitys.add(new ExcelExportEntity("业务日期" ,"businessDate"));
break;
case "customerName" :
entitys.add(new ExcelExportEntity("客户名称" ,"customerName"));
break;
case "amountCollected" :
entitys.add(new ExcelExportEntity("收款金额" ,"amountCollected"));
break;
case "paymentType" :
entitys.add(new ExcelExportEntity("收款类型 " ,"paymentType"));
break;
case "collectionCount" :
entitys.add(new ExcelExportEntity("收款账户" ,"collectionCount"));
break;
case "collectionBank" :
entitys.add(new ExcelExportEntity("收款银行" ,"collectionBank"));
break;
case "settlementType" :
entitys.add(new ExcelExportEntity("结算类型" ,"settlementType"));
case "paymentType" :
entitys.add(new ExcelExportEntity("收款类型 " ,"paymentType"));
break;
case "currency" :
entitys.add(new ExcelExportEntity("币别 " ,"currency"));
break;
case "settlementType" :
entitys.add(new ExcelExportEntity("结算类型" ,"settlementType"));
break;
case "remark" :
entitys.add(new ExcelExportEntity("备注信息" ,"remark"));
break;
case "voucher" :
entitys.add(new ExcelExportEntity("收款凭证" ,"voucher"));
break;
case "status" :
entitys.add(new ExcelExportEntity("单据状态 " ,"status"));
break;
@ -293,9 +332,24 @@ public class CollectionController {
//子表
List<Collection_item0Entity> Collection_item0List = collectionService.GetCollection_item0List(id);
List<Collection_item0Model> collection_item0ModelList = new ArrayList<>();
Collection_item0Model collection_item0Model = new Collection_item0Model();
for(Collection_item0Entity collection_item0Entity : Collection_item0List){
SaleorderCETEntity saleorderCETEntity = saleorderCETService.getById(collection_item0Entity.getSalesorderId());
collection_item0Model.setId(collection_item0Entity.getSalesorderId());
collection_item0Model.setAmount(String.valueOf(collection_item0Entity.getAmount()));
collection_item0Model.setPrice(String.valueOf(saleorderCETEntity.getPrice()));
collection_item0Model.setAmountCollected(String.valueOf(saleorderCETEntity.getAmountCollected()));
collection_item0Model.setDocumentNo(String.valueOf(saleorderCETEntity.getDocumentNo()));
collection_item0Model.setContractCode(String.valueOf(saleorderCETEntity.getContractCode()));
collection_item0Model.setNum(String.valueOf(saleorderCETEntity.getNum()));
collection_item0Model.setAdvanceAmount(String.valueOf(saleorderCETEntity.getAdvanceAmount()));
collection_item0Model.setRate(String.valueOf(saleorderCETEntity.getRate()));
collection_item0Model.setNotPrice(String.valueOf(saleorderCETEntity.getNotPrice()));
collection_item0Model.setCreatorTime(String.valueOf(saleorderCETEntity.getCreatorTime()));
collection_item0ModelList.add(collection_item0Model);
}
vo.setCollection_item0List(JsonUtil.getJsonToList(Collection_item0List,Collection_item0Model.class ));
vo.setCollection_item0List(JsonUtil.getJsonToList(collection_item0ModelList,Collection_item0Model.class ));
//副表
return ActionResult.success(vo);
}
@ -315,12 +369,15 @@ public class CollectionController {
List<Collection_item0Entity> jg_collection_item0List = collectionService.GetCollection_item0List(id);
List<Collection_item0Model> jg_collection_item0ModelList = JsonUtil.getJsonToList(jg_collection_item0List,Collection_item0Model.class);
for(Collection_item0Model jg_collection_item0Model : jg_collection_item0ModelList){
Map<String,Object> deleteTimeMap = new HashMap<>();
jg_collection_item0Model.setDocumentNo(generaterSwapUtil.getPopupSelectValue("393372436705378053","document_no","document_no",jg_collection_item0Model.getDocumentNo(),deleteTimeMap));
}
vo.setCollection_item0List(jg_collection_item0ModelList);
//附表数据转换
//添加到详情表单对象中
vo.setVoucher(generaterSwapUtil.getFileNameInJson(vo.getVoucher()));
return ActionResult.success(vo);
}
@ -339,6 +396,9 @@ public class CollectionController {
public ActionResult update(@PathVariable("id") String id,@RequestBody @Valid CollectionUpForm collectionUpForm) throws DataException {
UserInfo userInfo=userProvider.get();
CollectionEntity entity= collectionService.getInfo(id);
if (entity.getStatus().equals("2") || entity.getStatus().equals("3")){
return ActionResult.fail("已审核,不允许编辑");
}
if(entity!=null){
CollectionEntity subentity=JsonUtil.getJsonToBean(collectionUpForm, CollectionEntity.class);
collectionService.update(id, subentity);
@ -346,15 +406,13 @@ public class CollectionController {
QueryWrapper<Collection_item0Entity> Collection_item0queryWrapper = new QueryWrapper<>();
Collection_item0queryWrapper.lambda().eq(Collection_item0Entity::getCollectionId, entity.getId());
collection_item0Service.remove(Collection_item0queryWrapper);
for (Collection_item0Model collection_item0Model : collectionUpForm.getCollection_item0List()){
collection_item0Model.setCreatorTime(null);
}
List<Collection_item0Entity> Collection_item0List = JsonUtil.getJsonToList(collectionUpForm.getCollection_item0List(),Collection_item0Entity.class);
for(Collection_item0Entity entitys : Collection_item0List){
entitys.setSalesorderId(entitys.getId());
entitys.setId(RandomUtil.uuId());
entitys.setCollectionId(entity.getId());
collection_item0Service.save(entitys);

@ -17,7 +17,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-11
* @ 2023-02-09
*/
@Data
@TableName("jg_collection")
@ -26,36 +26,6 @@ public class CollectionEntity {
@TableId("ID")
private String id;
@TableField("CREATOR_USER_ID")
private String creatorUserId;
@TableField("CREATOR_USER_NAME")
private String creatorUserName;
@TableField("CREATOR_TIME")
private Date creatorTime;
@TableField("LAST_MODIFY_USER_ID")
private String lastModifyUserId;
@TableField("LAST_MODIFY_USER_NAME")
private String lastModifyUserName;
@TableField("LAST_MODIFY_TIME")
private Date lastModifyTime;
@TableField("DELETE_USER_ID")
private String deleteUserId;
@TableField("DELETE_USER_NAME")
private String deleteUserName;
@TableField("DELETE_TIME")
private Date deleteTime;
@TableField("DELETE_MARK")
private String deleteMark;
@TableField("ORGNIZE_ID")
private String orgnizeId;
@ -92,9 +62,15 @@ public class CollectionEntity {
@TableField("PAYMENT_TYPE")
private String paymentType;
@TableField("VOUCHER")
private String voucher;
@TableField("SETTLEMENT_TYPE")
private String settlementType;
@TableField("IS_COLLECTION")
private String IS_COLLECTION;
@TableField("REMARK")
private String remark;
@ -104,4 +80,34 @@ public class CollectionEntity {
@TableField("COLLECTION_BANK")
private String collectionBank;
@TableField("CREATOR_USER_ID")
private String creatorUserId;
@TableField("CREATOR_USER_NAME")
private String creatorUserName;
@TableField("CREATOR_TIME")
private Date creatorTime;
@TableField("LAST_MODIFY_USER_ID")
private String lastModifyUserId;
@TableField("LAST_MODIFY_USER_NAME")
private String lastModifyUserName;
@TableField("LAST_MODIFY_TIME")
private Date lastModifyTime;
@TableField("DELETE_USER_ID")
private String deleteUserId;
@TableField("DELETE_USER_NAME")
private String deleteUserName;
@TableField("DELETE_TIME")
private Date deleteTime;
@TableField("DELETE_MARK")
private String deleteMark;
}

@ -8,11 +8,8 @@ import lombok.Data;
import java.util.Date;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.bytedeco.opencv.presets.opencv_core;
/**
@ -21,7 +18,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-11
* @ 2023-02-09
*/
@Data
@TableName("jg_collection_item0")
@ -69,34 +66,10 @@ public class Collection_item0Entity {
@TableField("COLLECTION_ID")
private String collectionId;
@TableField("ORDER_ID")
private Integer orderId;
@TableField("CAR_NUMBER")
private String carNumber;
@TableField("MATERIAL_NAME")
private String materialName;
@TableField("QUANTITY")
private BigDecimal quantity;
@TableField("SALE_PRICE")
private BigDecimal salePrice;
@TableField("TAX_RATE")
private String taxRate;
@TableField("SALESORDER_ID")
private String salesorderId;
@TableField("AMOUNT")
private BigDecimal amount;
@TableField("AMOUNT_NOT_TAX")
private BigDecimal amountNotTax;
@TableField("TAX_AMOUNT")
private BigDecimal taxAmount;
@TableField("REMARK")
private String remark;
}

@ -0,0 +1,144 @@
package jnpf.collection.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
/**
*
*
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-02-03
*/
@Data
@TableName("jg_salesorder")
public class SaleorderCETEntity {
@TableId("ID")
private String id;
@TableField("CREATOR_USER_ID")
private String creatorUserId;
@TableField("CREATOR_USER_NAME")
private String creatorUserName;
@TableField("CREATOR_TIME")
private Date creatorTime;
@TableField("LAST_MODIFY_USER_ID")
private String lastModifyUserId;
@TableField("LAST_MODIFY_USER_NAME")
private String lastModifyUserName;
@TableField("LAST_MODIFY_TIME")
private Date lastModifyTime;
@TableField("DELETE_USER_ID")
private String deleteUserId;
@TableField("DELETE_USER_NAME")
private String deleteUserName;
@TableField("DELETE_TIME")
private Date deleteTime;
@TableField("DELETE_MARK")
private String deleteMark;
@TableField("ORGNIZE_ID")
private String orgnizeId;
@TableField("DEPARTMENT_ID")
private String departmentId;
@TableField("DOCUMENT_NO")
private String documentNo;
@TableField("ERP_NO")
private String erpNo;
@TableField("SOURCE_PO_NO")
private String sourcePoNo;
@TableField("CONTRACT_CODE")
private String contractCode;
@TableField("CONTRACT_NAME")
private String contractName;
@TableField("CONTRACT_NO")
private String contractNo;
@TableField("COSTOMER_CODE")
private String costomerCode;
@TableField("COSTOMER_NAME")
private String costomerName;
@TableField("NUM")
private BigDecimal num;
@TableField("PRICE")
private BigDecimal price;
@TableField("NOT_PRICE")
private BigDecimal notPrice;
@TableField("RATE")
private BigDecimal rate;
@TableField("POUND_NUM")
private Integer poundNum;
@TableField("CURRENCY")
private String currency;
@TableField("ADVANCE_AMOUNT")
private BigDecimal advanceAmount;
@TableField("AMOUNT_COLLECTED")
private BigDecimal amountCollected;
@TableField("INVOICE_NUM")
private BigDecimal invoiceNum;
@TableField("INVOICE_AMOUNT")
private BigDecimal invoiceAmount;
@TableField("RETURN_QUANTITY")
private BigDecimal returnQuantity;
@TableField("REF_AMOUNT")
private BigDecimal reamount;
@TableField("STATUS")
private String status;
@TableField("SOURCE_SYSTEM")
private String sourceSystem;
@TableField("IS_SETTLE")
private String isSettle;
@TableField("ISSUE")
private String issue;
@TableField("REMARK")
private String remark;
@TableField("CLOSING_DATE")
private Date closingDate;
@TableField("OVERDUE_INTEREST")
private BigDecimal overdueInterest;
}

@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* V3.2.0
* LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-01-11
* 2023-02-09
*/
public interface CollectionMapper extends BaseMapper<CollectionEntity> {

@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* V3.2.0
* LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-01-11
* 2023-02-09
*/
public interface Collection_item0Mapper extends BaseMapper<Collection_item0Entity> {

@ -0,0 +1,17 @@
package jnpf.collection.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jnpf.collection.entity.SaleorderCETEntity;
/**
*
* saleorder
* V3.2.0
* LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-02-03
*/
public interface SaleorderCETMapper extends BaseMapper<SaleorderCETEntity> {
}

@ -15,19 +15,19 @@ import com.fasterxml.jackson.annotation.JsonProperty;
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-11
* @ 2023-02-09
*/
@Data
public class CollectionCrForm {
/** 客户名称 **/
@JsonProperty("customerCode")
private String customerCode;
/** 单据编号 **/
@JsonProperty("documentNo")
private String documentNo;
/** 业务日期 **/
@JsonProperty("businessDate")
private Long businessDate;
/** 客户名称 **/
@JsonProperty("customerName")
private String customerName;
@ -36,10 +36,6 @@ public class CollectionCrForm {
@JsonProperty("amountCollected")
private String amountCollected;
/** 收款类型 **/
@JsonProperty("paymentType")
private String paymentType;
/** 收款账户 **/
@JsonProperty("collectionCount")
private String collectionCount;
@ -48,18 +44,26 @@ public class CollectionCrForm {
@JsonProperty("collectionBank")
private String collectionBank;
/** 结算类型 **/
@JsonProperty("settlementType")
private String settlementType;
/** 收款类型 **/
@JsonProperty("paymentType")
private String paymentType;
/** 币别 **/
@JsonProperty("currency")
private String currency;
/** 结算类型 **/
@JsonProperty("settlementType")
private String settlementType;
/** 备注信息 **/
@JsonProperty("remark")
private String remark;
/** 收款凭证 **/
@JsonProperty("voucher")
private String voucher;
/** 单据状态 **/
@JsonProperty("status")
private String status;

@ -16,7 +16,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-11
* @ 2023-02-09
*/
@Data
public class CollectionInfoVO{
@ -28,9 +28,9 @@ public class CollectionInfoVO{
@JsonProperty("documentNo")
private String documentNo;
/** 业务日期 **/
@JsonProperty("businessDate")
private Long businessDate;
/** 客户名称 **/
@JsonProperty("customerCode")
private String customerCode;
/** 客户名称 **/
@JsonProperty("customerName")
@ -40,10 +40,6 @@ public class CollectionInfoVO{
@JsonProperty("amountCollected")
private String amountCollected;
/** 收款类型 **/
@JsonProperty("paymentType")
private String paymentType;
/** 收款账户 **/
@JsonProperty("collectionCount")
private String collectionCount;
@ -52,18 +48,26 @@ public class CollectionInfoVO{
@JsonProperty("collectionBank")
private String collectionBank;
/** 结算类型 **/
@JsonProperty("settlementType")
private String settlementType;
/** 收款类型 **/
@JsonProperty("paymentType")
private String paymentType;
/** 币别 **/
@JsonProperty("currency")
private String currency;
/** 结算类型 **/
@JsonProperty("settlementType")
private String settlementType;
/** 备注信息 **/
@JsonProperty("remark")
private String remark;
/** 收款凭证 **/
@JsonProperty("voucher")
private String voucher;
/** 单据状态 **/
@JsonProperty("status")
private String status;

@ -10,7 +10,7 @@ import java.util.List;
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-11
* @ 2023-02-09
*/
@Data
public class CollectionListQuery extends Pagination {

@ -15,7 +15,7 @@ import java.math.BigDecimal;
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-11
* @ 2023-02-09
*/
@Data
public class CollectionListVO{
@ -28,11 +28,9 @@ public class CollectionListVO{
@JsonProperty("documentNo")
private String documentNo;
/** 业务日期 **/
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
@JsonProperty("businessDate")
private Date businessDate;
/** 客户名称 **/
@JsonProperty("customerCode")
private String customerCode;
/** 客户名称 **/
@ -45,11 +43,6 @@ public class CollectionListVO{
private String amountCollected;
/** 收款类型 **/
@JsonProperty("paymentType")
private String paymentType;
/** 收款账户 **/
@JsonProperty("collectionCount")
private String collectionCount;
@ -60,9 +53,9 @@ public class CollectionListVO{
private String collectionBank;
/** 结算类型 **/
@JsonProperty("settlementType")
private String settlementType;
/** 收款类型 **/
@JsonProperty("paymentType")
private String paymentType;
/** 币别 **/
@ -70,11 +63,21 @@ public class CollectionListVO{
private String currency;
/** 结算类型 **/
@JsonProperty("settlementType")
private String settlementType;
/** 备注信息 **/
@JsonProperty("remark")
private String remark;
/** 收款凭证 **/
@JsonProperty("voucher")
private String voucher;
/** 单据状态 **/
@JsonProperty("status")
private String status;

@ -11,7 +11,7 @@ import java.util.List;
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-11
* @ 2023-02-09
*/
@Data
public class CollectionPagination extends Pagination {

@ -9,7 +9,7 @@ import java.util.*;
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-11
* @ 2023-02-09
*/
@Data
public class CollectionPaginationExportModel extends Pagination {

@ -16,7 +16,7 @@ import lombok.Data;
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-11
* @ 2023-02-09
*/
@Data
public class CollectionUpForm{
@ -28,10 +28,9 @@ public class CollectionUpForm{
@JsonProperty("documentNo")
private String documentNo;
/** 业务日期 **/
@JsonProperty("businessDate")
private Long businessDate;
/** 客户名称 **/
@JsonProperty("customerCode")
private String customerCode;
/** 客户名称 **/
@ -44,11 +43,6 @@ public class CollectionUpForm{
private String amountCollected;
/** 收款类型 **/
@JsonProperty("paymentType")
private String paymentType;
/** 收款账户 **/
@JsonProperty("collectionCount")
private String collectionCount;
@ -59,9 +53,9 @@ public class CollectionUpForm{
private String collectionBank;
/** 结算类型 **/
@JsonProperty("settlementType")
private String settlementType;
/** 收款类型 **/
@JsonProperty("paymentType")
private String paymentType;
/** 币别 **/
@ -69,11 +63,21 @@ public class CollectionUpForm{
private String currency;
/** 结算类型 **/
@JsonProperty("settlementType")
private String settlementType;
/** 备注信息 **/
@JsonProperty("remark")
private String remark;
/** 收款凭证 **/
@JsonProperty("voucher")
private String voucher;
/** 单据状态 **/
@JsonProperty("status")
private String status;

@ -13,34 +13,53 @@ import com.alibaba.fastjson.annotation.JSONField;
* V3.2.0
* : LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-01-11
* 2023-02-09
*/
@Data
public class Collection_item0Model {
/** 金额 **/
/** 收款金额 **/
@JsonProperty("amount")
private String amount;
/** 数量 **/
@JsonProperty("quantity")
private String quantity;
/** 销售订单主表id **/
@JsonProperty("id")
private String id;
/** 税率 **/
@JsonProperty("taxRate")
private String taxRate;
/** 订单金额 **/
@JsonProperty("price")
private String price;
/** 已收款金额 **/
@JsonProperty("amountCollected")
private String amountCollected;
/** 销售订单编号 **/
@JsonProperty("documentNo")
private String documentNo;
/** 合同编号 **/
@JsonProperty("contractCode")
private String contractCode;
/** 重量 **/
@JsonProperty("num")
private String num;
/** 垫资金额 **/
@JsonProperty("advanceAmount")
private String advanceAmount;
/** 税额 **/
@JsonProperty("taxAmount")
private String taxAmount;
@JsonProperty("rate")
private String rate;
/** 不含税金额 **/
@JsonProperty("amountNotTax")
private String amountNotTax;
/** 备注 **/
@JsonProperty("remark")
private String remark;
@JsonProperty("notPrice")
private String notPrice;
/** 业务日期 **/
@JsonProperty("creatorTime")
private String creatorTime;
}

@ -12,7 +12,7 @@ import java.util.*;
* V3.2.0
* LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-01-11
* 2023-02-09
*/
public interface CollectionService extends IService<CollectionEntity> {

@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
* V3.2.0
* LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-01-11
* 2023-02-09
*/
public interface Collection_item0Service extends IService<Collection_item0Entity> {

@ -0,0 +1,20 @@
package jnpf.collection.service;
import com.baomidou.mybatisplus.extension.service.IService;
import jnpf.collection.entity.*;
import jnpf.saleorder.model.saleorder.SaleorderPagination;
import java.util.List;
/**
*
* saleorder
* V3.2.0
* LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-02-03
*/
public interface SaleorderCETService extends IService<SaleorderCETEntity> {
}

@ -38,7 +38,7 @@ import java.util.*;
* V3.2.0
* LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-01-11
* 2023-02-09
*/
@Service
public class CollectionServiceImpl extends ServiceImpl<CollectionMapper, CollectionEntity> implements CollectionService{

@ -32,7 +32,7 @@ import java.util.*;
* V3.2.0
* LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-01-11
* 2023-02-09
*/
@Service
public class Collection_item0ServiceImpl extends ServiceImpl<Collection_item0Mapper, Collection_item0Entity> implements Collection_item0Service{

@ -0,0 +1,28 @@
package jnpf.collection.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jnpf.collection.entity.*;
import jnpf.collection.mapper.SaleorderCETMapper;
import jnpf.collection.service.*;
import org.springframework.stereotype.Service;
/**
*
* saleorder
* V3.2.0
* LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-02-03
*/
@Service
public class SaleorderCETServiceImpl extends ServiceImpl<SaleorderCETMapper, SaleorderCETEntity> implements SaleorderCETService {
}

@ -1,55 +1,56 @@
package jnpf.customer.controller;
import cn.afterturn.easypoi.excel.ExcelExportUtil;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import jnpf.base.ActionResult;
import jnpf.base.UserInfo;
import jnpf.base.vo.DownloadVO;
import jnpf.base.vo.PageListVO;
import jnpf.base.vo.PaginationVO;
import jnpf.base.UserInfo;
import jnpf.base.vo.DownloadVO;
import jnpf.config.ConfigValueUtil;
import jnpf.customer.entity.CustomerJGEntity;
import jnpf.customer.entity.CustomerJGMobileEntity;
import jnpf.customer.model.customer.*;
import jnpf.customer.service.CustomerJGService;
import jnpf.exception.DataException;
import org.springframework.transaction.annotation.Transactional;
import jnpf.customer.model.customer.*;
import jnpf.customer.model.customer.CustomerPagination;
import jnpf.util.*;
import jnpf.util.enums.FileTypeEnum;
import jnpf.util.file.UploadUtil;
import lombok.Cleanup;
import lombok.extern.slf4j.Slf4j;
import lombok.Cleanup;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import jnpf.customer.entity.CustomerJGMobileEntity;
import jnpf.customer.service.CustomerJGMobileService;
import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;
import javax.validation.Valid;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import jnpf.util.GeneraterSwapUtil;
import java.util.*;
import jnpf.util.file.UploadUtil;
import jnpf.util.enums.FileTypeEnum;
/**
*
*
* customer
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-04
* @ 2023-02-13
*/
@Slf4j
@RestController
@Api(tags = "客户档案" , value = "customer")
@Api(tags = "customer" , value = "customer")
@RequestMapping("/api/customer/Customer")
public class CustomerJGController {
public class CustomerJGMobileController {
@Autowired
private GeneraterSwapUtil generaterSwapUtil;
@ -61,7 +62,7 @@ public class CustomerJGController {
private UserProvider userProvider;
@Autowired
private CustomerJGService customerService;
private CustomerJGMobileService customerJGMobileService;
@ -74,9 +75,10 @@ public class CustomerJGController {
*/
@PostMapping("/getList")
public ActionResult list(@RequestBody CustomerPagination customerPagination)throws IOException{
List<CustomerJGMobileEntity> list= customerService.getList(customerPagination);
List<CustomerJGMobileEntity> list= customerJGMobileService.getList(customerPagination);
//处理id字段转名称若无需转或者为空可删除
for(CustomerJGMobileEntity entity:list){
entity.setOrgId(generaterSwapUtil.comSelectValues(entity.getOrgId()));
entity.setStatus(generaterSwapUtil.switchSelectValue(entity.getStatus() ,"1" ,"2"));
}
List<CustomerListVO> listVO=JsonUtil.getJsonToList(list,CustomerListVO.class);
@ -103,9 +105,9 @@ public class CustomerJGController {
public ActionResult create(@RequestBody @Valid CustomerCrForm customerCrForm) throws DataException {
String mainId =RandomUtil.uuId();
UserInfo userInfo=userProvider.get();
CustomerJGEntity entity = JsonUtil.getJsonToBean(customerCrForm, CustomerJGEntity.class);
CustomerJGMobileEntity entity = JsonUtil.getJsonToBean(customerCrForm, CustomerJGMobileEntity.class);
entity.setId(mainId);
customerService.save(entity);
customerJGMobileService.save(entity);
return ActionResult.success("创建成功");
@ -143,9 +145,10 @@ public class CustomerJGController {
return ActionResult.fail("请选择导出字段");
}
CustomerPagination customerPagination=JsonUtil.getJsonToBean(customerPaginationExportModel, CustomerPagination.class);
List<CustomerJGEntity> list= customerService.getTypeList(customerPagination,customerPaginationExportModel.getDataType());
List<CustomerJGMobileEntity> list= customerJGMobileService.getTypeList(customerPagination,customerPaginationExportModel.getDataType());
//处理id字段转名称若无需转或者为空可删除
for(CustomerJGEntity entity:list){
for(CustomerJGMobileEntity entity:list){
entity.setOrgId(generaterSwapUtil.comSelectValues(entity.getOrgId()));
entity.setStatus(generaterSwapUtil.switchSelectValue(entity.getStatus() ,"1" ,"2"));
}
List<CustomerListVO> listVO=JsonUtil.getJsonToList(list,CustomerListVO.class);
@ -173,23 +176,20 @@ public class CustomerJGController {
entitys.add(new ExcelExportEntity("客户名称" ,"supplierNm"));
break;
case "orgId" :
entitys.add(new ExcelExportEntity("所属公司ID" ,"orgId"));
entitys.add(new ExcelExportEntity("公司名称" ,"orgId"));
break;
case "orgName" :
entitys.add(new ExcelExportEntity("公司代码" ,"orgName"));
case "contactName" :
entitys.add(new ExcelExportEntity("联系人" ,"contactName"));
break;
case "customerLevel" :
entitys.add(new ExcelExportEntity("客户等级" ,"customerLevel"));
break;
case "contactName" :
entitys.add(new ExcelExportEntity("联系人" ,"contactName"));
case "contactPhone" :
entitys.add(new ExcelExportEntity("电话" ,"contactPhone"));
break;
case "address" :
entitys.add(new ExcelExportEntity("地址" ,"address"));
break;
case "contactPhone" :
entitys.add(new ExcelExportEntity("电话" ,"contactPhone"));
break;
case "status" :
entitys.add(new ExcelExportEntity("是否启用" ,"status"));
break;
@ -254,7 +254,7 @@ public class CustomerJGController {
*/
@GetMapping("/{id}")
public ActionResult<CustomerInfoVO> info(@PathVariable("id") String id){
CustomerJGEntity entity= customerService.getInfo(id);
CustomerJGMobileEntity entity= customerJGMobileService.getInfo(id);
CustomerInfoVO vo=JsonUtil.getJsonToBean(entity, CustomerInfoVO.class);
//子表
@ -270,7 +270,7 @@ public class CustomerJGController {
*/
@GetMapping("/detail/{id}")
public ActionResult<CustomerInfoVO> detailInfo(@PathVariable("id") String id){
CustomerJGEntity entity= customerService.getInfo(id);
CustomerJGMobileEntity entity= customerJGMobileService.getInfo(id);
CustomerInfoVO vo=JsonUtil.getJsonToBean(entity, CustomerInfoVO.class);
//子表数据转换
@ -278,6 +278,7 @@ public class CustomerJGController {
//附表数据转换
//添加到详情表单对象中
vo.setOrgId(generaterSwapUtil.comSelectValues(vo.getOrgId()));
vo.setStatus(generaterSwapUtil.switchSelectValue(vo.getStatus() ,"1" ,"2"));
return ActionResult.success(vo);
@ -296,10 +297,10 @@ public class CustomerJGController {
@Transactional
public ActionResult update(@PathVariable("id") String id,@RequestBody @Valid CustomerUpForm customerUpForm) throws DataException {
UserInfo userInfo=userProvider.get();
CustomerJGEntity entity= customerService.getInfo(id);
CustomerJGMobileEntity entity= customerJGMobileService.getInfo(id);
if(entity!=null){
CustomerJGEntity subentity=JsonUtil.getJsonToBean(customerUpForm, CustomerJGEntity.class);
customerService.update(id, subentity);
CustomerJGMobileEntity subentity=JsonUtil.getJsonToBean(customerUpForm, CustomerJGMobileEntity.class);
customerJGMobileService.update(id, subentity);
return ActionResult.success("更新成功");
}else{
return ActionResult.fail("更新失败,数据不存在");
@ -317,9 +318,9 @@ public class CustomerJGController {
@DeleteMapping("/{id}")
@Transactional
public ActionResult delete(@PathVariable("id") String id){
CustomerJGEntity entity= customerService.getInfo(id);
CustomerJGMobileEntity entity= customerJGMobileService.getInfo(id);
if(entity!=null){
customerService.delete(entity);
customerJGMobileService.delete(entity);
}
return ActionResult.success("删除成功");

@ -1,100 +0,0 @@
package jnpf.customer.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.util.Date;
/**
*
*
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-04
*/
@Data
@TableName("jg_customer")
public class CustomerJGEntity {
@TableId("ID")
private String id;
@TableField("CREATOR_USER_ID")
private String creatoruserid;
@TableField("CREATOR_USER_NAME")
private String creatorusername;
@TableField("CREATOR_TIME")
private Date creatortime;
@TableField("LAST_MODIFY_USER_ID")
private String lastmodifyuserid;
@TableField("LAST_MODIFY_USER_NAME")
private String lastmodifyusername;
@TableField("LAST_MODIFY_TIME")
private Date lastmodifytime;
@TableField("DELETE_USER_ID")
private String deleteuserid;
@TableField("DELETE_USER_NAME")
private String deleteusername;
@TableField("DELETE_TIME")
private Date deletetime;
@TableField("DELETE_MARK")
@TableLogic
private String deletemark;
@TableField("orgnize_id")
private String originId;
@TableField("department_id")
private String deptId;
@TableField("SUPPLIER_CD")
private String supplierCd;
@TableField("SUPPLIER_NM")
private String supplierNm;
@TableField("SUPPLIER_SITE_ID")
private String supplierSiteId;
@TableField("SUPPLIER_SITE_CODE")
private String supplierSiteCode;
@TableField("ORG_ID")
private String orgId;
@TableField("ORG_NAME")
private String orgName;
@TableField("VAT_REGISTRATION_NUM")
private String vatRegistrationNum;
@TableField("CUSTOMER_LEVEL")
private String customerLevel;
@TableField("CONTACT_NAME")
private String contactName;
@TableField("CONTACT_PHONE")
private String contactPhone;
@TableField("STATUS")
private String status;
@TableField("ADDRESS")
private String address;
}

@ -1,58 +1,65 @@
package jnpf.customer.entity;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* @Author: WangChuang
* @Date: 8/2/2023 8:35
* @Description //注释:
* @Version 1.0
*
*
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-02-13
*/
@Data
@TableName("jg_customer")
public class CustomerJGMobileEntity {
@TableId("ID")
private String id;
@TableField("CREATOR_USER_ID")
private String creatoruserid;
private String creatorUserId;
@TableField("CREATOR_USER_NAME")
private String creatorusername;
private String creatorUserName;
@TableField("CREATOR_TIME")
private Date creatortime;
private Date creatorTime;
@TableField("LAST_MODIFY_USER_ID")
private String lastmodifyuserid;
private String lastModifyUserId;
@TableField("LAST_MODIFY_USER_NAME")
private String lastmodifyusername;
private String lastModifyUserName;
@TableField("LAST_MODIFY_TIME")
private Date lastmodifytime;
private Date lastModifyTime;
@TableField("DELETE_USER_ID")
private String deleteuserid;
private String deleteUserId;
@TableField("DELETE_USER_NAME")
private String deleteusername;
private String deleteUserName;
@TableField("DELETE_TIME")
private Date deletetime;
private Date deleteTime;
@TableField("DELETE_MARK")
private String deletemark;
private String deleteMark;
@TableField("orgnize_id")
private String originId;
@TableField("ORGNIZE_ID")
private String orgnizeId;
@TableField("department_id")
private String deptId;
@TableField("DEPARTMENT_ID")
private String departmentId;
@TableField("SUPPLIER_CD")
private String supplierCd;
@ -90,15 +97,4 @@ public class CustomerJGMobileEntity {
@TableField("ADDRESS")
private String address;
// 收获量
private BigDecimal settlemenSum;
// 净重
private BigDecimal weightSum;
// 扣重
private BigDecimal buckleWeightSum;
// 总重
private BigDecimal grossWeightSum;
// 总额
private BigDecimal salesPriceSum;
}

@ -1,24 +0,0 @@
package jnpf.customer.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import jnpf.customer.entity.CustomerJGEntity;
import jnpf.customer.entity.CustomerJGMobileEntity;
import org.apache.ibatis.annotations.Param;
/**
*
*
* V3.2.0
* LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-01-04
*/
public interface CustomerJGMapper extends BaseMapper<CustomerJGEntity> {
IPage<CustomerJGMobileEntity> getMobileList(@Param("page") Page<CustomerJGMobileEntity> page, @Param("ew") Wrapper<CustomerJGEntity> ew);
}

@ -0,0 +1,17 @@
package jnpf.customer.mapper;
import jnpf.customer.entity.CustomerJGMobileEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
*
* customer
* V3.2.0
* LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-02-13
*/
public interface CustomerJGMobileMapper extends BaseMapper<CustomerJGMobileEntity> {
}

@ -14,7 +14,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-04
* @ 2023-02-13
*/
@Data
public class CustomerCrForm {
@ -27,30 +27,26 @@ public class CustomerCrForm {
@JsonProperty("supplierNm")
private String supplierNm;
/** 所属公司ID **/
/** 公司名称 **/
@JsonProperty("orgId")
private String orgId;
/** 公司代码 **/
@JsonProperty("orgName")
private String orgName;
/** 联系人 **/
@JsonProperty("contactName")
private String contactName;
/** 客户等级 **/
@JsonProperty("customerLevel")
private String customerLevel;
/** 联系人 **/
@JsonProperty("contactName")
private String contactName;
/** 电话 **/
@JsonProperty("contactPhone")
private String contactPhone;
/** 地址 **/
@JsonProperty("address")
private String address;
/** 电话 **/
@JsonProperty("contactPhone")
private String contactPhone;
/** 是否启用 **/
@JsonProperty("status")
private String status;

@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-04
* @ 2023-02-13
*/
@Data
public class CustomerInfoVO{
@ -31,30 +31,26 @@ public class CustomerInfoVO{
@JsonProperty("supplierNm")
private String supplierNm;
/** 所属公司ID **/
/** 公司名称 **/
@JsonProperty("orgId")
private String orgId;
/** 公司代码 **/
@JsonProperty("orgName")
private String orgName;
/** 联系人 **/
@JsonProperty("contactName")
private String contactName;
/** 客户等级 **/
@JsonProperty("customerLevel")
private String customerLevel;
/** 联系人 **/
@JsonProperty("contactName")
private String contactName;
/** 电话 **/
@JsonProperty("contactPhone")
private String contactPhone;
/** 地址 **/
@JsonProperty("address")
private String address;
/** 电话 **/
@JsonProperty("contactPhone")
private String contactPhone;
/** 是否启用 **/
@JsonProperty("status")
private String status;

@ -10,7 +10,7 @@ import java.util.List;
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-04
* @ 2023-02-13
*/
@Data
public class CustomerListQuery extends Pagination {

@ -3,15 +3,19 @@
package jnpf.customer.model.customer;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import java.sql.Time;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
/**
*
*
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-04
* @ 2023-02-13
*/
@Data
public class CustomerListVO{
@ -30,14 +34,14 @@ public class CustomerListVO{
private String supplierNm;
/** 所属公司ID **/
/** 公司名称 **/
@JsonProperty("orgId")
private String orgId;
/** 公司代码 **/
@JsonProperty("orgName")
private String orgName;
/** 联系人 **/
@JsonProperty("contactName")
private String contactName;
/** 客户等级 **/
@ -45,9 +49,9 @@ public class CustomerListVO{
private String customerLevel;
/** 联系人 **/
@JsonProperty("contactName")
private String contactName;
/** 电话 **/
@JsonProperty("contactPhone")
private String contactPhone;
/** 地址 **/
@ -55,28 +59,9 @@ public class CustomerListVO{
private String address;
/** 电话 **/
@JsonProperty("contactPhone")
private String contactPhone;
/** 是否启用 **/
@JsonProperty("status")
private String status;
// 收获量
@JsonProperty("settlemenSum")
private Double settlemenSum;
// 净重
@JsonProperty("weightSum")
private Double weightSum;
// 扣重
@JsonProperty("buckleWeightSum")
private Double buckleWeightSum;
// 总重
@JsonProperty("grossWeightSum")
private Double grossWeightSum;
// 总额
@JsonProperty("salesPriceSum")
private Double salesPriceSum;
}

@ -11,7 +11,7 @@ import java.util.List;
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-04
* @ 2023-02-13
*/
@Data
public class CustomerPagination extends Pagination {

@ -9,7 +9,7 @@ import java.util.*;
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-04
* @ 2023-02-13
*/
@Data
public class CustomerPaginationExportModel extends Pagination {

@ -15,7 +15,7 @@ import lombok.Data;
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-04
* @ 2023-02-13
*/
@Data
public class CustomerUpForm{
@ -33,14 +33,14 @@ public class CustomerUpForm{
private String supplierNm;
/** 所属公司ID **/
/** 公司名称 **/
@JsonProperty("orgId")
private String orgId;
/** 公司代码 **/
@JsonProperty("orgName")
private String orgName;
/** 联系人 **/
@JsonProperty("contactName")
private String contactName;
/** 客户等级 **/
@ -48,9 +48,9 @@ public class CustomerUpForm{
private String customerLevel;
/** 联系人 **/
@JsonProperty("contactName")
private String contactName;
/** 电话 **/
@JsonProperty("contactPhone")
private String contactPhone;
/** 地址 **/
@ -58,11 +58,6 @@ public class CustomerUpForm{
private String address;
/** 电话 **/
@JsonProperty("contactPhone")
private String contactPhone;
/** 是否启用 **/
@JsonProperty("status")
private String status;

@ -0,0 +1,34 @@
package jnpf.customer.service;
import jnpf.customer.entity.CustomerJGMobileEntity;
import com.baomidou.mybatisplus.extension.service.IService;
import jnpf.customer.model.customer.CustomerPagination;
import java.util.*;
/**
*
* customer
* V3.2.0
* LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-02-13
*/
public interface CustomerJGMobileService extends IService<CustomerJGMobileEntity> {
List<CustomerJGMobileEntity> getList(CustomerPagination customerPagination);
List<CustomerJGMobileEntity> getTypeList(CustomerPagination customerPagination, String dataType);
CustomerJGMobileEntity getInfo(String id);
void delete(CustomerJGMobileEntity entity);
void create(CustomerJGMobileEntity entity);
boolean update( String id, CustomerJGMobileEntity entity);
// 子表方法
//列表子表数据方法
}

@ -1,40 +0,0 @@
package jnpf.customer.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import jnpf.customer.entity.CustomerJGEntity;
import jnpf.customer.entity.CustomerJGMobileEntity;
import jnpf.customer.model.customer.CustomerPagination;
import java.util.*;
/**
*
*
* V3.2.0
* LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-01-04
*/
public interface CustomerJGService extends IService<CustomerJGEntity> {
List<CustomerJGMobileEntity> getList(CustomerPagination customerPagination);
List<CustomerJGEntity> getTypeList(CustomerPagination customerPagination, String dataType);
CustomerJGEntity getInfo(String id);
void delete(CustomerJGEntity entity);
void create(CustomerJGEntity entity);
boolean update(String id, CustomerJGEntity entity);
public IPage<CustomerJGMobileEntity> page(Page<CustomerJGMobileEntity> page, Wrapper<CustomerJGEntity> queryWrapper);
// 子表方法
//列表子表数据方法
}

@ -0,0 +1,223 @@
package jnpf.customer.service.impl;
import jnpf.customer.entity.*;
import jnpf.customer.mapper.CustomerJGMobileMapper;
import jnpf.customer.service.*;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.hutool.core.util.ObjectUtil;
import jnpf.permission.model.authorize.AuthorizeConditionModel;
import jnpf.customer.model.customer.CustomerPagination;
import jnpf.permission.service.AuthorizeService;
import java.lang.reflect.Field;
import com.baomidou.mybatisplus.annotation.TableField;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import jnpf.util.*;
import java.util.*;
/**
*
* customer
* V3.2.0
* LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-02-13
*/
@Service
public class CustomerJGMobileServiceImpl extends ServiceImpl<CustomerJGMobileMapper, CustomerJGMobileEntity> implements CustomerJGMobileService {
@Autowired
private UserProvider userProvider;
@Autowired
private AuthorizeService authorizeService;
@Override
public List<CustomerJGMobileEntity> getList(CustomerPagination customerPagination){
String userId=userProvider.get().getUserId();
List<String> AllIdList =new ArrayList();
int total=0;
int customerNum =0;
QueryWrapper<CustomerJGMobileEntity> customerQueryWrapper=new QueryWrapper<>();
boolean pcPermission = false;
boolean appPermission = false;
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
if(isPc && pcPermission){
if (!userProvider.get().getIsAdministrator()){
Object customerObj=authorizeService.getCondition(new AuthorizeConditionModel(customerQueryWrapper,customerPagination.getMenuId(),"customer"));
if (ObjectUtil.isEmpty(customerObj)){
return new ArrayList<>();
} else {
customerQueryWrapper = (QueryWrapper<CustomerJGMobileEntity>)customerObj;
customerNum++;
}
}
}
if(!isPc && appPermission){
if (!userProvider.get().getIsAdministrator()){
Object customerObj=authorizeService.getCondition(new AuthorizeConditionModel(customerQueryWrapper,customerPagination.getMenuId(),"customer"));
if (ObjectUtil.isEmpty(customerObj)){
return new ArrayList<>();
} else {
customerQueryWrapper = (QueryWrapper<CustomerJGMobileEntity>)customerObj;
customerNum++;
}
}
}
if(StringUtil.isNotEmpty(customerPagination.getSupplierCd())){
customerNum++;
customerQueryWrapper.lambda().like(CustomerJGMobileEntity::getSupplierCd,customerPagination.getSupplierCd());
}
if(StringUtil.isNotEmpty(customerPagination.getSupplierNm())){
customerNum++;
customerQueryWrapper.lambda().like(CustomerJGMobileEntity::getSupplierNm,customerPagination.getSupplierNm());
}
if(AllIdList.size()>0){
customerQueryWrapper.lambda().in(CustomerJGMobileEntity::getId, AllIdList);
}
//排序
if(StringUtil.isEmpty(customerPagination.getSidx())){
customerQueryWrapper.lambda().orderByDesc(CustomerJGMobileEntity::getSupplierCd);
}else{
try {
String sidx = customerPagination.getSidx();
CustomerJGMobileEntity customerJGMobileEntity = new CustomerJGMobileEntity();
Field declaredField = customerJGMobileEntity.getClass().getDeclaredField(sidx);
declaredField.setAccessible(true);
String value = declaredField.getAnnotation(TableField.class).value();
customerQueryWrapper="asc".equals(customerPagination.getSort().toLowerCase())?customerQueryWrapper.orderByAsc(value):customerQueryWrapper.orderByDesc(value);
} catch (NoSuchFieldException e) {
e.printStackTrace();
}
}
if((total>0 && AllIdList.size()>0) || total==0){
Page<CustomerJGMobileEntity> page=new Page<>(customerPagination.getCurrentPage(), customerPagination.getPageSize());
IPage<CustomerJGMobileEntity> userIPage=this.page(page, customerQueryWrapper);
return customerPagination.setData(userIPage.getRecords(),userIPage.getTotal());
}else{
List<CustomerJGMobileEntity> list = new ArrayList();
return customerPagination.setData(list, list.size());
}
}
@Override
public List<CustomerJGMobileEntity> getTypeList(CustomerPagination customerPagination, String dataType){
String userId=userProvider.get().getUserId();
List<String> AllIdList =new ArrayList();
int total=0;
int customerNum =0;
QueryWrapper<CustomerJGMobileEntity> customerQueryWrapper=new QueryWrapper<>();
boolean pcPermission = false;
boolean appPermission = false;
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
if(isPc && pcPermission){
if (!userProvider.get().getIsAdministrator()){
Object customerObj=authorizeService.getCondition(new AuthorizeConditionModel(customerQueryWrapper,customerPagination.getMenuId(),"customer"));
if (ObjectUtil.isEmpty(customerObj)){
return new ArrayList<>();
} else {
customerQueryWrapper = (QueryWrapper<CustomerJGMobileEntity>)customerObj;
customerNum++;
}
}
}
if(!isPc && appPermission){
if (!userProvider.get().getIsAdministrator()){
Object customerObj=authorizeService.getCondition(new AuthorizeConditionModel(customerQueryWrapper,customerPagination.getMenuId(),"customer"));
if (ObjectUtil.isEmpty(customerObj)){
return new ArrayList<>();
} else {
customerQueryWrapper = (QueryWrapper<CustomerJGMobileEntity>)customerObj;
customerNum++;
}
}
}
if(StringUtil.isNotEmpty(customerPagination.getSupplierCd())){
customerNum++;
customerQueryWrapper.lambda().like(CustomerJGMobileEntity::getSupplierCd,customerPagination.getSupplierCd());
}
if(StringUtil.isNotEmpty(customerPagination.getSupplierNm())){
customerNum++;
customerQueryWrapper.lambda().like(CustomerJGMobileEntity::getSupplierNm,customerPagination.getSupplierNm());
}
if(AllIdList.size()>0){
customerQueryWrapper.lambda().in(CustomerJGMobileEntity::getId, AllIdList);
}
//排序
if(StringUtil.isEmpty(customerPagination.getSidx())){
customerQueryWrapper.lambda().orderByDesc(CustomerJGMobileEntity::getSupplierCd);
}else{
try {
String sidx = customerPagination.getSidx();
CustomerJGMobileEntity customerJGMobileEntity = new CustomerJGMobileEntity();
Field declaredField = customerJGMobileEntity.getClass().getDeclaredField(sidx);
declaredField.setAccessible(true);
String value = declaredField.getAnnotation(TableField.class).value();
customerQueryWrapper="asc".equals(customerPagination.getSort().toLowerCase())?customerQueryWrapper.orderByAsc(value):customerQueryWrapper.orderByDesc(value);
} catch (NoSuchFieldException e) {
e.printStackTrace();
}
}
if("0".equals(dataType)){
if((total>0 && AllIdList.size()>0) || total==0){
Page<CustomerJGMobileEntity> page=new Page<>(customerPagination.getCurrentPage(), customerPagination.getPageSize());
IPage<CustomerJGMobileEntity> userIPage=this.page(page, customerQueryWrapper);
return customerPagination.setData(userIPage.getRecords(),userIPage.getTotal());
}else{
List<CustomerJGMobileEntity> list = new ArrayList();
return customerPagination.setData(list, list.size());
}
}else{
return this.list(customerQueryWrapper);
}
}
@Override
public CustomerJGMobileEntity getInfo(String id){
QueryWrapper<CustomerJGMobileEntity> queryWrapper=new QueryWrapper<>();
queryWrapper.lambda().eq(CustomerJGMobileEntity::getId,id);
return this.getOne(queryWrapper);
}
@Override
public void create(CustomerJGMobileEntity entity){
this.save(entity);
}
@Override
public boolean update(String id, CustomerJGMobileEntity entity){
entity.setId(id);
return this.updateById(entity);
}
@Override
public void delete(CustomerJGMobileEntity entity){
if(entity!=null){
this.removeById(entity.getId());
}
}
//子表方法
//列表子表数据方法
}

@ -1,250 +0,0 @@
package jnpf.customer.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jnpf.customer.entity.CustomerJGEntity;
import jnpf.customer.entity.CustomerJGMobileEntity;
import jnpf.customer.mapper.CustomerJGMapper;
import jnpf.customer.model.customer.CustomerPagination;
import jnpf.customer.service.CustomerJGService;
import jnpf.permission.model.authorize.AuthorizeConditionModel;
import jnpf.permission.service.AuthorizeService;
import jnpf.util.ServletUtil;
import jnpf.util.StringUtil;
import jnpf.util.UserProvider;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
/**
*
*
* V3.2.0
* LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-01-04
*/
@Service
public class CustomerJGServiceImpl extends ServiceImpl<CustomerJGMapper, CustomerJGEntity> implements CustomerJGService{
@Autowired
private UserProvider userProvider;
@Autowired
private AuthorizeService authorizeService;
@Resource
private CustomerJGMapper customerJGMapper;
@Override
public List<CustomerJGMobileEntity> getList(CustomerPagination customerPagination){
String userId=userProvider.get().getUserId();
List<String> AllIdList =new ArrayList();
int total=0;
int customerNum =0;
QueryWrapper<CustomerJGEntity> customerQueryWrapper=new QueryWrapper<>();
boolean pcPermission = false;
boolean appPermission = false;
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
if(isPc && pcPermission){
if (!userProvider.get().getIsAdministrator()){
Object customerObj=authorizeService.getCondition(new AuthorizeConditionModel(customerQueryWrapper,customerPagination.getMenuId(),"customer"));
if (ObjectUtil.isEmpty(customerObj)){
return new ArrayList<>();
} else {
customerQueryWrapper = (QueryWrapper<CustomerJGEntity>)customerObj;
customerNum++;
}
}
}
if(!isPc && appPermission){
if (!userProvider.get().getIsAdministrator()){
Object customerObj=authorizeService.getCondition(new AuthorizeConditionModel(customerQueryWrapper,customerPagination.getMenuId(),"customer"));
if (ObjectUtil.isEmpty(customerObj)){
return new ArrayList<>();
} else {
customerQueryWrapper = (QueryWrapper<CustomerJGEntity>)customerObj;
customerNum++;
}
}
}
if(StringUtil.isNotEmpty(customerPagination.getSupplierCd())){
customerNum++;
customerQueryWrapper.lambda().like(CustomerJGEntity::getSupplierCd,customerPagination.getSupplierCd());
}
if(StringUtil.isNotEmpty(customerPagination.getSupplierNm())){
customerNum++;
customerQueryWrapper.lambda().like(CustomerJGEntity::getSupplierNm,customerPagination.getSupplierNm());
}
if(StringUtil.isNotEmpty(customerPagination.getKeyword())){
customerNum++;
customerQueryWrapper.lambda().and(wq -> {
// 拼接sql
wq.like(CustomerJGEntity::getSupplierNm,customerPagination.getKeyword())
.or()
.like(CustomerJGEntity::getOrgName,customerPagination.getKeyword())
.or()
.like(CustomerJGEntity::getAddress,customerPagination.getKeyword());
});
}
if(AllIdList.size()>0){
customerQueryWrapper.lambda().in(CustomerJGEntity::getId, AllIdList);
}
//排序
if(StringUtil.isEmpty(customerPagination.getSidx())){
customerQueryWrapper.lambda().orderByDesc(CustomerJGEntity::getSupplierCd);
}else{
try {
String sidx = customerPagination.getSidx();
CustomerJGEntity customerEntity = new CustomerJGEntity();
Field declaredField = customerEntity.getClass().getDeclaredField(sidx);
declaredField.setAccessible(true);
String value = declaredField.getAnnotation(TableField.class).value();
customerQueryWrapper="asc".equals(customerPagination.getSort().toLowerCase())?customerQueryWrapper.orderByAsc(value):customerQueryWrapper.orderByDesc(value);
} catch (NoSuchFieldException e) {
e.printStackTrace();
}
}
if((total>0 && AllIdList.size()>0) || total==0){
Page<CustomerJGMobileEntity> page=new Page<>(customerPagination.getCurrentPage(), customerPagination.getPageSize());
IPage<CustomerJGMobileEntity> userIPage=this.page(page, customerQueryWrapper);
return customerPagination.setData(userIPage.getRecords(),userIPage.getTotal());
}else{
List<CustomerJGMobileEntity> list = new ArrayList();
return customerPagination.setData(list, list.size());
}
}
/**
* @TODO page
* @param page
* @param queryWrapper
* @return
*/
@Override
public IPage<CustomerJGMobileEntity> page( Page<CustomerJGMobileEntity> page, Wrapper<CustomerJGEntity> queryWrapper) {
return customerJGMapper.getMobileList(page, queryWrapper);
}
@Override
public List<CustomerJGEntity> getTypeList(CustomerPagination customerPagination,String dataType){
String userId=userProvider.get().getUserId();
List<String> AllIdList =new ArrayList();
int total=0;
int customerNum =0;
QueryWrapper<CustomerJGEntity> customerQueryWrapper=new QueryWrapper<>();
boolean pcPermission = false;
boolean appPermission = false;
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
if(isPc && pcPermission){
if (!userProvider.get().getIsAdministrator()){
Object customerObj=authorizeService.getCondition(new AuthorizeConditionModel(customerQueryWrapper,customerPagination.getMenuId(),"customer"));
if (ObjectUtil.isEmpty(customerObj)){
return new ArrayList<>();
} else {
customerQueryWrapper = (QueryWrapper<CustomerJGEntity>)customerObj;
customerNum++;
}
}
}
if(!isPc && appPermission){
if (!userProvider.get().getIsAdministrator()){
Object customerObj=authorizeService.getCondition(new AuthorizeConditionModel(customerQueryWrapper,customerPagination.getMenuId(),"customer"));
if (ObjectUtil.isEmpty(customerObj)){
return new ArrayList<>();
} else {
customerQueryWrapper = (QueryWrapper<CustomerJGEntity>)customerObj;
customerNum++;
}
}
}
if(StringUtil.isNotEmpty(customerPagination.getSupplierCd())){
customerNum++;
customerQueryWrapper.lambda().like(CustomerJGEntity::getSupplierCd,customerPagination.getSupplierCd());
}
if(StringUtil.isNotEmpty(customerPagination.getSupplierNm())){
customerNum++;
customerQueryWrapper.lambda().like(CustomerJGEntity::getSupplierNm,customerPagination.getSupplierNm());
}
if(AllIdList.size()>0){
customerQueryWrapper.lambda().in(CustomerJGEntity::getId, AllIdList);
}
//排序
if(StringUtil.isEmpty(customerPagination.getSidx())){
customerQueryWrapper.lambda().orderByDesc(CustomerJGEntity::getSupplierCd);
}else{
try {
String sidx = customerPagination.getSidx();
CustomerJGEntity customerEntity = new CustomerJGEntity();
Field declaredField = customerEntity.getClass().getDeclaredField(sidx);
declaredField.setAccessible(true);
String value = declaredField.getAnnotation(TableField.class).value();
customerQueryWrapper="asc".equals(customerPagination.getSort().toLowerCase())?customerQueryWrapper.orderByAsc(value):customerQueryWrapper.orderByDesc(value);
} catch (NoSuchFieldException e) {
e.printStackTrace();
}
}
if("0".equals(dataType)){
if((total>0 && AllIdList.size()>0) || total==0){
Page<CustomerJGEntity> page=new Page<>(customerPagination.getCurrentPage(), customerPagination.getPageSize());
IPage<CustomerJGEntity> userIPage=this.page(page, customerQueryWrapper);
return customerPagination.setData(userIPage.getRecords(),userIPage.getTotal());
}else{
List<CustomerJGEntity> list = new ArrayList();
return customerPagination.setData(list, list.size());
}
}else{
return this.list(customerQueryWrapper);
}
}
@Override
public CustomerJGEntity getInfo(String id){
QueryWrapper<CustomerJGEntity> queryWrapper=new QueryWrapper<>();
queryWrapper.lambda().eq(CustomerJGEntity::getId,id);
return this.getOne(queryWrapper);
}
@Override
public void create(CustomerJGEntity entity){
this.save(entity);
}
@Override
public boolean update(String id, CustomerJGEntity entity){
entity.setId(id);
return this.updateById(entity);
}
@Override
public void delete(CustomerJGEntity entity){
if(entity!=null){
this.removeById(entity.getId());
}
}
//子表方法
//列表子表数据方法
}

@ -1,40 +1,62 @@
package jnpf.payment.controller;
import cn.afterturn.easypoi.excel.ExcelExportUtil;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import jdk.nashorn.internal.ir.IfNode;
import jnpf.base.ActionResult;
import jnpf.base.UserInfo;
import jnpf.base.vo.DownloadVO;
import jnpf.base.vo.PageListVO;
import jnpf.base.vo.PaginationVO;
import jnpf.base.UserInfo;
import jnpf.base.vo.DownloadVO;
import jnpf.collection.model.collection.Collection_item0Model;
import jnpf.config.ConfigValueUtil;
import jnpf.exception.DataException;
import jnpf.payment.entity.PaymentEntity;
import jnpf.paymentdoc.entity.Paymentdoc_item0Entity;
import jnpf.paymentdoc.service.Paymentdoc_item0Service;
import jnpf.purchaseback.entity.PurchaseorderEntity;
import jnpf.purchaseback.service.PurchaseorderService;
import org.apache.commons.lang3.math.NumberUtils;
import org.springframework.transaction.annotation.Transactional;
import jnpf.base.entity.ProvinceEntity;
import jnpf.payment.model.payment.*;
import jnpf.payment.service.PaymentService;
import jnpf.payment.model.payment.PaymentPagination;
import jnpf.payment.entity.*;
import jnpf.payment.entity.Payment_item0Entity;
import jnpf.util.*;
import jnpf.util.enums.FileTypeEnum;
import jnpf.util.file.UploadUtil;
import lombok.Cleanup;
import jnpf.base.util.*;
import jnpf.base.vo.ListVO;
import jnpf.util.context.SpringContext;
import cn.hutool.core.util.ObjectUtil;
import lombok.extern.slf4j.Slf4j;
import lombok.Cleanup;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import jnpf.payment.entity.PaymentEntity;
import jnpf.payment.service.PaymentService;
import jnpf.payment.entity.Payment_item0Entity;
import jnpf.payment.service.Payment_item0Service;
import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.multipart.MultipartFile;
import javax.validation.Valid;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import jnpf.util.GeneraterSwapUtil;
import java.math.BigDecimal;
import java.util.*;
import jnpf.util.file.UploadUtil;
import jnpf.util.enums.FileTypeEnum;
/**
*
@ -42,12 +64,12 @@ import java.util.Map;
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-11
* @ 2023-02-10
*/
@Slf4j
@RestController
@Api(tags = "payment" , value = "example")
@RequestMapping("/api/example/Payment")
@Api(tags = "payment" , value = "payment")
@RequestMapping("/api/payment/Payment")
public class PaymentController {
@Autowired
@ -62,9 +84,43 @@ public class PaymentController {
@Autowired
private PaymentService paymentService;
@Autowired
private Payment_item0Service payment_item0Service;
@Autowired
private Paymentdoc_item0Service paymentdoc_item0Service;
@Autowired
private PurchaseorderService purchaseorderService;
@PostMapping("/confirmprice")
@Transactional
public ActionResult confirmPrice(@RequestBody PaymentListVO paymentListVO) {
PaymentEntity paymentEntity = paymentService.getInfo(paymentListVO.getId());
if (!paymentEntity.getStatus().equals("2")){
return ActionResult.fail("审核中,请先通过审核");
}
QueryWrapper<Payment_item0Entity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(Payment_item0Entity::getPaymentId,paymentListVO.getId());
List<Payment_item0Entity> dList = payment_item0Service.list(queryWrapper);
for (Payment_item0Entity payment_item0Entity : dList){
Paymentdoc_item0Entity paymentdoc_item0Entity = paymentdoc_item0Service.getById(payment_item0Entity.getPaymentdocitemId());
PurchaseorderEntity purchaseorderEntity = purchaseorderService.getById(paymentdoc_item0Entity.getPurchaseorderId());
if (purchaseorderEntity.getPayPrice().equals(purchaseorderEntity.getAmount())){
return ActionResult.fail("回款金额等于金额");
}
BigDecimal sum = purchaseorderEntity.getPayPrice().add(payment_item0Entity.getAmount());
if (sum.compareTo(purchaseorderEntity.getAmount()) > 0){
return ActionResult.fail("总回款金额大于金额");
}
purchaseorderEntity.setPayPrice(sum);
purchaseorderEntity.setStatus("1");
purchaseorderService.updateById(purchaseorderEntity);
}
return ActionResult.success("认款成功");
}
/**
*
*
@ -76,12 +132,6 @@ public class PaymentController {
List<PaymentEntity> list= paymentService.getList(paymentPagination);
//处理id字段转名称若无需转或者为空可删除
for(PaymentEntity entity:list){
entity.setCreatorUserId(generaterSwapUtil.comSelectValue(entity.getCreatorUserId(), "last"));
entity.setCreatorUserName(generaterSwapUtil.userSelectValue(entity.getCreatorUserName()));
entity.setLastModifyUserId(generaterSwapUtil.userSelectValue(entity.getLastModifyUserId()));
entity.setLastModifyUserName(generaterSwapUtil.userSelectValue(entity.getLastModifyUserName()));
entity.setDepartmentId(generaterSwapUtil.posSelectValue(entity.getDepartmentId()));
entity.setOrgnizeId(generaterSwapUtil.posSelectValue(entity.getOrgnizeId()));
}
List<PaymentListVO> listVO=JsonUtil.getJsonToList(list,PaymentListVO.class);
for(PaymentListVO paymentVO:listVO){
@ -107,18 +157,17 @@ public class PaymentController {
public ActionResult create(@RequestBody @Valid PaymentCrForm paymentCrForm) throws DataException {
String mainId =RandomUtil.uuId();
UserInfo userInfo=userProvider.get();
paymentCrForm.setCreatorUserId(StringUtil.isEmpty(userInfo.getDepartmentId()) ? userInfo.getOrganizeId() : userInfo.getDepartmentId());
paymentCrForm.setCreatorUserName(userInfo.getUserId());
paymentCrForm.setCreatorTime(DateUtil.getNow());
if(userInfo.getPositionIds()!=null&&userInfo.getPositionIds().length>0){
paymentCrForm.setDepartmentId(userInfo.getPositionIds()[0]);
}
if(userInfo.getPositionIds()!=null&&userInfo.getPositionIds().length>0){
paymentCrForm.setOrgnizeId(userInfo.getPositionIds()[0]);
}
paymentCrForm.setDocumentno(generaterSwapUtil.getBillNumber("payment", false));
PaymentEntity entity = JsonUtil.getJsonToBean(paymentCrForm, PaymentEntity.class);
entity.setId(mainId);
paymentService.save(entity);
List<Payment_item0Entity> Payment_item0List = JsonUtil.getJsonToList(paymentCrForm.getPayment_item0List(),Payment_item0Entity.class);
for(Payment_item0Entity entitys : Payment_item0List){
entitys.setId(RandomUtil.uuId());
entitys.setPaymentId(entity.getId());
payment_item0Service.save(entitys);
}
return ActionResult.success("创建成功");
@ -159,12 +208,6 @@ public class PaymentController {
List<PaymentEntity> list= paymentService.getTypeList(paymentPagination,paymentPaginationExportModel.getDataType());
//处理id字段转名称若无需转或者为空可删除
for(PaymentEntity entity:list){
entity.setCreatorUserId(generaterSwapUtil.comSelectValue(entity.getCreatorUserId(), "last"));
entity.setCreatorUserName(generaterSwapUtil.userSelectValue(entity.getCreatorUserName()));
entity.setLastModifyUserId(generaterSwapUtil.userSelectValue(entity.getLastModifyUserId()));
entity.setLastModifyUserName(generaterSwapUtil.userSelectValue(entity.getLastModifyUserName()));
entity.setDepartmentId(generaterSwapUtil.posSelectValue(entity.getDepartmentId()));
entity.setOrgnizeId(generaterSwapUtil.posSelectValue(entity.getOrgnizeId()));
}
List<PaymentListVO> listVO=JsonUtil.getJsonToList(list,PaymentListVO.class);
for(PaymentListVO paymentVO:listVO){
@ -184,20 +227,14 @@ public class PaymentController {
if(keys.length>0){
for(String key:keys){
switch(key){
case "businessdate" :
entitys.add(new ExcelExportEntity("业务日期" ,"businessdate"));
break;
case "documentno" :
entitys.add(new ExcelExportEntity("单据编号" ,"documentno"));
break;
case "suppliername" :
entitys.add(new ExcelExportEntity("客户" ,"suppliername"));
break;
case "currency" :
entitys.add(new ExcelExportEntity("币别" ,"currency"));
entitys.add(new ExcelExportEntity("供应商" ,"suppliername"));
break;
case "paymentamount" :
entitys.add(new ExcelExportEntity("付款金额" ,"paymentamount"));
case "paymenttype" :
entitys.add(new ExcelExportEntity("付款类型" ,"paymenttype"));
break;
case "paymentaccount" :
entitys.add(new ExcelExportEntity("付款账户" ,"paymentaccount"));
@ -205,38 +242,35 @@ public class PaymentController {
case "paymentbank" :
entitys.add(new ExcelExportEntity("付款银行" ,"paymentbank"));
break;
case "paymenttype" :
entitys.add(new ExcelExportEntity("付款类型" ,"paymenttype"));
break;
case "settlementtype" :
entitys.add(new ExcelExportEntity("结算类型" ,"settlementtype"));
case "paymentamount" :
entitys.add(new ExcelExportEntity("付款金额" ,"paymentamount"));
break;
case "status" :
entitys.add(new ExcelExportEntity("单据状态" ,"status"));
case "collectionaccount" :
entitys.add(new ExcelExportEntity("收款账户" ,"collectionaccount"));
break;
case "creatorUserId" :
entitys.add(new ExcelExportEntity("创建人id" ,"creatorUserId"));
case "collectionbank" :
entitys.add(new ExcelExportEntity("收款银行" ,"collectionbank"));
break;
case "creatorUserName" :
entitys.add(new ExcelExportEntity("创建人名称" ,"creatorUserName"));
case "requestedamount" :
entitys.add(new ExcelExportEntity("申请金额" ,"requestedamount"));
break;
case "creatorTime" :
entitys.add(new ExcelExportEntity("创建时间" ,"creatorTime"));
case "duedate" :
entitys.add(new ExcelExportEntity("应付日期" ,"duedate"));
break;
case "lastModifyUserId" :
entitys.add(new ExcelExportEntity("修改人id" ,"lastModifyUserId"));
case "currency" :
entitys.add(new ExcelExportEntity("币别 " ,"currency"));
break;
case "lastModifyUserName" :
entitys.add(new ExcelExportEntity("修改人名称" ,"lastModifyUserName"));
case "settlementtype" :
entitys.add(new ExcelExportEntity("结算类型" ,"settlementtype"));
break;
case "lastModifyTime" :
entitys.add(new ExcelExportEntity("修改时间" ,"lastModifyTime"));
case "paymentno" :
entitys.add(new ExcelExportEntity("来源单号" ,"paymentno"));
break;
case "departmentId" :
entitys.add(new ExcelExportEntity("部门id" ,"departmentId"));
case "remark" :
entitys.add(new ExcelExportEntity("备注" ,"remark"));
break;
case "orgnizeId" :
entitys.add(new ExcelExportEntity("组织id" ,"orgnizeId"));
case "status" :
entitys.add(new ExcelExportEntity("单据状态" ,"status"));
break;
default:
break;
@ -269,6 +303,28 @@ public class PaymentController {
}
/**
*
*
* @param ids
* @return
*/
@DeleteMapping("/batchRemove/{ids}")
@Transactional
public ActionResult batchRemove(@PathVariable("ids") String ids){
String[] idList = ids.split(",");
int i =0;
for (String allId : idList){
this.delete(allId);
i++;
}
if (i == 0 ){
return ActionResult.fail("删除失败");
}
return ActionResult.success("删除成功");
}
/**
*
*
@ -279,20 +335,27 @@ public class PaymentController {
public ActionResult<PaymentInfoVO> info(@PathVariable("id") String id){
PaymentEntity entity= paymentService.getInfo(id);
PaymentInfoVO vo=JsonUtil.getJsonToBean(entity, PaymentInfoVO.class);
vo.setCreatorUserId(generaterSwapUtil.comSelectValue(vo.getCreatorUserId(), "last"));
vo.setCreatorUserName(generaterSwapUtil.userSelectValue(vo.getCreatorUserName()));
if(vo.getCreatorTime()!=null){
vo.setCreatorTime(vo.getCreatorTime());
}
vo.setLastModifyUserId(generaterSwapUtil.userSelectValue(vo.getLastModifyUserId()));
vo.setLastModifyUserName(generaterSwapUtil.userSelectValue(vo.getLastModifyUserName()));
if(vo.getLastModifyTime()!=null){
vo.setLastModifyTime(vo.getLastModifyTime());
}
vo.setDepartmentId(generaterSwapUtil.posSelectValue(vo.getDepartmentId()));
vo.setOrgnizeId(generaterSwapUtil.posSelectValue(vo.getOrgnizeId()));
//子表
List<Payment_item0Entity> Payment_item0List = paymentService.GetPayment_item0List(id);
List<Payment_item0Model> payment_item0Models = new ArrayList<>();
Payment_item0Model payment_item0Model = new Payment_item0Model();
for(Payment_item0Entity payment_item0Entity : Payment_item0List){
Paymentdoc_item0Entity paymentdoc_item0Entity = paymentdoc_item0Service.getById(payment_item0Entity.getPaymentdocitemId());
PurchaseorderEntity purchaseorderEntity = purchaseorderService.getById(paymentdoc_item0Entity.getPurchaseorderId());
payment_item0Model.setAmount(String.valueOf(payment_item0Entity.getAmount()));
// payment_item0Model.setAmount(String.valueOf(purchaseorderEntity.getAmount()));
// payment_item0Model.setAmount(String.valueOf(purchaseorderEntity.getAmount()));
payment_item0Model.setPayPrice(String.valueOf(purchaseorderEntity.getPayPrice()));
payment_item0Model.setDocumentNo(String.valueOf(purchaseorderEntity.getDocumentNo()));
payment_item0Model.setContractCode(String.valueOf(purchaseorderEntity.getContractCode()));
payment_item0Model.setNum(String.valueOf(purchaseorderEntity.getNum()));
payment_item0Model.setAdvanceAmount(String.valueOf(purchaseorderEntity.getAdvanceAmount()));
payment_item0Model.setRate(String.valueOf(purchaseorderEntity.getRate()));
payment_item0Model.setNotAmount(String.valueOf(purchaseorderEntity.getNotAmount()));
payment_item0Models.add(payment_item0Model);
}
vo.setPayment_item0List(payment_item0Models);
//副表
return ActionResult.success(vo);
}
@ -309,16 +372,15 @@ public class PaymentController {
PaymentInfoVO vo=JsonUtil.getJsonToBean(entity, PaymentInfoVO.class);
//子表数据转换
List<Payment_item0Entity> jg_payment_item0List = paymentService.GetPayment_item0List(id);
List<Payment_item0Model> jg_payment_item0ModelList = JsonUtil.getJsonToList(jg_payment_item0List,Payment_item0Model.class);
for(Payment_item0Model jg_payment_item0Model : jg_payment_item0ModelList){
}
vo.setPayment_item0List(jg_payment_item0ModelList);
//附表数据转换
//添加到详情表单对象中
vo.setCreatorUserId(generaterSwapUtil.comSelectValue(vo.getCreatorUserId(), "last"));
vo.setCreatorUserName(generaterSwapUtil.userSelectValue(vo.getCreatorUserName()));
vo.setLastModifyUserId(generaterSwapUtil.userSelectValue(vo.getLastModifyUserId()));
vo.setLastModifyUserName(generaterSwapUtil.userSelectValue(vo.getLastModifyUserName()));
vo.setDepartmentId(generaterSwapUtil.posSelectValue(vo.getDepartmentId()));
vo.setOrgnizeId(generaterSwapUtil.posSelectValue(vo.getOrgnizeId()));
return ActionResult.success(vo);
}
@ -336,26 +398,29 @@ public class PaymentController {
@Transactional
public ActionResult update(@PathVariable("id") String id,@RequestBody @Valid PaymentUpForm paymentUpForm) throws DataException {
UserInfo userInfo=userProvider.get();
PaymentEntity entity= paymentService.getInfo(id);
if (entity.getStatus().equals("2")){
return ActionResult.fail("已审核,不允许编辑");
}
if(entity!=null){
// paymentCrForm.setCreatorUserId(StringUtil.isEmpty(userInfo.getDepartmentId()) ? userInfo.getOrganizeId() : userInfo.getDepartmentId());
// paymentCrForm.setCreatorUserName(userInfo.getUserId());
paymentUpForm.setCreatorUserId(entity.getCreatorUserId());
paymentUpForm.setLastModifyUserId(userInfo.getUserId());
paymentUpForm.setLastModifyUserName(userInfo.getUserId());
paymentUpForm.setLastModifyTime(DateUtil.getNow());
paymentUpForm.setDepartmentId(entity.getDepartmentId());
paymentUpForm.setOrgnizeId(entity.getOrgnizeId());
PaymentEntity subentity=JsonUtil.getJsonToBean(paymentUpForm, PaymentEntity.class);
subentity.setCreatorUserName(entity.getCreatorUserName());
subentity.setCreatorTime(entity.getCreatorTime());
paymentService.update(id, subentity);
System.out.println("#################");
System.out.println(subentity);
System.out.println(userInfo);
QueryWrapper<Payment_item0Entity> Payment_item0queryWrapper = new QueryWrapper<>();
Payment_item0queryWrapper.lambda().eq(Payment_item0Entity::getPaymentId, entity.getId());
List<Payment_item0Entity> list = payment_item0Service.list(Payment_item0queryWrapper);
payment_item0Service.remove(Payment_item0queryWrapper);
List<Payment_item0Entity> Payment_item0List = JsonUtil.getJsonToList(paymentUpForm.getPayment_item0List(),Payment_item0Entity.class);
for(Payment_item0Entity entitys : Payment_item0List){
entitys.setId(RandomUtil.uuId());
entitys.setPaymentId(entity.getId());
for (Payment_item0Entity payment_item0Entity : list) {
entitys.setPaymentdocitemId(payment_item0Entity.getPaymentdocitemId());
}
payment_item0Service.save(entitys);
}
return ActionResult.success("更新成功");
}else{
return ActionResult.fail("更新失败,数据不存在");
@ -376,6 +441,9 @@ public class PaymentController {
PaymentEntity entity= paymentService.getInfo(id);
if(entity!=null){
paymentService.delete(entity);
QueryWrapper<Payment_item0Entity> queryWrapperPayment_item0=new QueryWrapper<>();
queryWrapperPayment_item0.lambda().eq(Payment_item0Entity::getPaymentId,entity.getId());
payment_item0Service.remove(queryWrapperPayment_item0);
}
return ActionResult.success("删除成功");

@ -1,12 +1,15 @@
package jnpf.payment.entity;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
import java.math.BigDecimal;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
@ -15,7 +18,7 @@ import java.util.Date;
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-11
* @ 2023-02-10
*/
@Data
@TableName("jg_payment")

@ -1,12 +1,14 @@
package jnpf.payment.entity;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
@ -15,7 +17,7 @@ import java.util.Date;
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-11
* @ 2023-02-10
*/
@Data
@TableName("jg_payment_item0")
@ -63,37 +65,10 @@ public class Payment_item0Entity {
@TableField("PAYMENT_ID")
private String paymentId;
@TableField("PAYMENTID")
private String paymentid;
@TableField("CARNUMBER")
private String carnumber;
@TableField("MATERIALNAME")
private String materialname;
@TableField("QUANTITY")
private BigDecimal quantity;
@TableField("PURCHASEPRICE")
private BigDecimal purchaseprice;
@TableField("TAXRATE")
private String taxrate;
@TableField("AMOUNT")
private BigDecimal amount;
@TableField("AMOUNTNOTTAX")
private BigDecimal amountnottax;
@TableField("TAXAMOUNT")
private BigDecimal taxamount;
@TableField("REMARK")
private String remark;
@TableField("ISPAY")
private String ispay;
@TableField("PAYMENTDOCITEM_ID")
private String paymentdocitemId;
}

@ -1,8 +1,8 @@
package jnpf.payment.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jnpf.payment.entity.PaymentEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
*
@ -10,7 +10,7 @@ import jnpf.payment.entity.PaymentEntity;
* V3.2.0
* LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-01-11
* 2023-02-10
*/
public interface PaymentMapper extends BaseMapper<PaymentEntity> {

@ -1,8 +1,8 @@
package jnpf.payment.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jnpf.payment.entity.Payment_item0Entity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
*
@ -10,7 +10,7 @@ import jnpf.payment.entity.Payment_item0Entity;
* V3.2.0
* LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-01-11
* 2023-02-10
*/
public interface Payment_item0Mapper extends BaseMapper<Payment_item0Entity> {

@ -2,6 +2,7 @@
package jnpf.payment.model.payment;
import jnpf.payment.model.payment.Payment_item0Model;
import lombok.Data;
import java.util.List;
import java.math.BigDecimal;
@ -14,30 +15,22 @@ import com.fasterxml.jackson.annotation.JsonProperty;
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-11
* @ 2023-02-10
*/
@Data
public class PaymentCrForm {
/** 业务日期 **/
@JsonProperty("businessdate")
private Long businessdate;
/** 单据编号 **/
@JsonProperty("documentno")
private String documentno;
/** 客户 **/
/** 供应商 **/
@JsonProperty("suppliername")
private String suppliername;
/** 币别 **/
@JsonProperty("currency")
private String currency;
/** 付款金额 **/
@JsonProperty("paymentamount")
private String paymentamount;
/** 付款类型 **/
@JsonProperty("paymenttype")
private String paymenttype;
/** 付款账户 **/
@JsonProperty("paymentaccount")
@ -47,50 +40,49 @@ public class PaymentCrForm {
@JsonProperty("paymentbank")
private String paymentbank;
/** 付款类型 **/
@JsonProperty("paymenttype")
private String paymenttype;
/** 结算类型 **/
@JsonProperty("settlementtype")
private String settlementtype;
/** 付款金额 **/
@JsonProperty("paymentamount")
private String paymentamount;
/** 单据状态 **/
@JsonProperty("status")
private String status;
/** 收款账户 **/
@JsonProperty("collectionaccount")
private String collectionaccount;
/** 创建人id **/
@JsonProperty("creatorUserId")
private String creatorUserId;
/** 收款银行 **/
@JsonProperty("collectionbank")
private String collectionbank;
/** 创建人名称 **/
@JsonProperty("creatorUserName")
private String creatorUserName;
/** 申请金额 **/
@JsonProperty("requestedamount")
private String requestedamount;
/** 创建时间 **/
@JsonProperty("creatorTime")
private String creatorTime;
/** 应付日期 **/
@JsonProperty("duedate")
private Long duedate;
/** 修改人id **/
@JsonProperty("lastModifyUserId")
private String lastModifyUserId;
/** 币别 **/
@JsonProperty("currency")
private String currency;
/** 修改人名称 **/
@JsonProperty("lastModifyUserName")
private String lastModifyUserName;
/** 结算类型 **/
@JsonProperty("settlementtype")
private String settlementtype;
/** 修改时间 **/
@JsonProperty("lastModifyTime")
private String lastModifyTime;
/** 来源单号 **/
@JsonProperty("paymentno")
private String paymentno;
/** 部门id **/
@JsonProperty("departmentId")
private String departmentId;
/** 备注 **/
@JsonProperty("remark")
private String remark;
/** 组织id **/
@JsonProperty("orgnizeId")
private String orgnizeId;
/** 单据状态 **/
@JsonProperty("status")
private String status;
/** 子表数据 **/
@JsonProperty("payment_item0List")
private List<Payment_item0Model> payment_item0List;
}

@ -3,6 +3,7 @@
package jnpf.payment.model.payment;
import jnpf.payment.model.payment.Payment_item0Model;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
@ -15,7 +16,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-11
* @ 2023-02-10
*/
@Data
public class PaymentInfoVO{
@ -23,25 +24,17 @@ public class PaymentInfoVO{
@JsonProperty("id")
private String id;
/** 业务日期 **/
@JsonProperty("businessdate")
private Long businessdate;
/** 单据编号 **/
@JsonProperty("documentno")
private String documentno;
/** 客户 **/
/** 供应商 **/
@JsonProperty("suppliername")
private String suppliername;
/** 币别 **/
@JsonProperty("currency")
private String currency;
/** 付款金额 **/
@JsonProperty("paymentamount")
private String paymentamount;
/** 付款类型 **/
@JsonProperty("paymenttype")
private String paymenttype;
/** 付款账户 **/
@JsonProperty("paymentaccount")
@ -51,50 +44,47 @@ public class PaymentInfoVO{
@JsonProperty("paymentbank")
private String paymentbank;
/** 付款类型 **/
@JsonProperty("paymenttype")
private String paymenttype;
/** 结算类型 **/
@JsonProperty("settlementtype")
private String settlementtype;
/** 付款金额 **/
@JsonProperty("paymentamount")
private String paymentamount;
/** 单据状态 **/
@JsonProperty("status")
private String status;
/** 收款账户 **/
@JsonProperty("collectionaccount")
private String collectionaccount;
/** 创建人id **/
@JsonProperty("creatorUserId")
private String creatorUserId;
/** 收款银行 **/
@JsonProperty("collectionbank")
private String collectionbank;
/** 创建人名称 **/
@JsonProperty("creatorUserName")
private String creatorUserName;
/** 申请金额 **/
@JsonProperty("requestedamount")
private String requestedamount;
/** 创建时间 **/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
@JsonProperty("creatorTime")
private Date creatorTime;
/** 应付日期 **/
@JsonProperty("duedate")
private Long duedate;
/** 修改人id **/
@JsonProperty("lastModifyUserId")
private String lastModifyUserId;
/** 币别 **/
@JsonProperty("currency")
private String currency;
/** 修改人名称 **/
@JsonProperty("lastModifyUserName")
private String lastModifyUserName;
/** 结算类型 **/
@JsonProperty("settlementtype")
private String settlementtype;
/** 修改时间 **/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
@JsonProperty("lastModifyTime")
private Date lastModifyTime;
/** 来源单号 **/
@JsonProperty("paymentno")
private String paymentno;
/** 部门id **/
@JsonProperty("departmentId")
private String departmentId;
/** 备注 **/
@JsonProperty("remark")
private String remark;
/** 组织id **/
@JsonProperty("orgnizeId")
private String orgnizeId;
/** 单据状态 **/
@JsonProperty("status")
private String status;
/** 子表数据 **/
@JsonProperty("payment_item0List")
private List<Payment_item0Model> payment_item0List;
}

@ -10,16 +10,13 @@ import java.util.List;
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-11
* @ 2023-02-10
*/
@Data
public class PaymentListQuery extends Pagination {
/** 单据编号 */
private String documentno;
/** 客户 */
private String suppliername;
/**
* id
*/

@ -15,7 +15,7 @@ import java.math.BigDecimal;
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-11
* @ 2023-02-10
*/
@Data
public class PaymentListVO{
@ -24,30 +24,19 @@ public class PaymentListVO{
private String id;
/** 业务日期 **/
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
@JsonProperty("businessdate")
private Date businessdate;
/** 单据编号 **/
@JsonProperty("documentno")
private String documentno;
/** 客户 **/
/** 供应商 **/
@JsonProperty("suppliername")
private String suppliername;
/** 币别 **/
@JsonProperty("currency")
private String currency;
/** 付款金额 **/
@JsonProperty("paymentamount")
private String paymentamount;
/** 付款类型 **/
@JsonProperty("paymenttype")
private String paymenttype;
/** 付款账户 **/
@ -60,61 +49,55 @@ public class PaymentListVO{
private String paymentbank;
/** 付款类型 **/
@JsonProperty("paymenttype")
private String paymenttype;
/** 结算类型 **/
@JsonProperty("settlementtype")
private String settlementtype;
/** 付款金额 **/
@JsonProperty("paymentamount")
private String paymentamount;
/** 单据状态 **/
@JsonProperty("status")
private String status;
/** 收款账户 **/
@JsonProperty("collectionaccount")
private String collectionaccount;
/** 创建人id **/
@JsonProperty("creatorUserId")
private String creatorUserId;
/** 收款银行 **/
@JsonProperty("collectionbank")
private String collectionbank;
/** 创建人名称 **/
@JsonProperty("creatorUserName")
private String creatorUserName;
/** 申请金额 **/
@JsonProperty("requestedamount")
private String requestedamount;
/** 创建时间 **/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
@JsonProperty("creatorTime")
private Date creatorTime;
/** 应付日期 **/
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
@JsonProperty("duedate")
private Date duedate;
/** 修改人id **/
@JsonProperty("lastModifyUserId")
private String lastModifyUserId;
/** 币别 **/
@JsonProperty("currency")
private String currency;
/** 修改人名称 **/
@JsonProperty("lastModifyUserName")
private String lastModifyUserName;
/** 结算类型 **/
@JsonProperty("settlementtype")
private String settlementtype;
/** 修改时间 **/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
@JsonProperty("lastModifyTime")
private Date lastModifyTime;
/** 来源单号 **/
@JsonProperty("paymentno")
private String paymentno;
/** 部门id **/
@JsonProperty("departmentId")
private String departmentId;
/** 备注 **/
@JsonProperty("remark")
private String remark;
/** 组织id **/
@JsonProperty("orgnizeId")
private String orgnizeId;
/** 单据状态 **/
@JsonProperty("status")
private String status;
}

@ -11,16 +11,13 @@ import java.util.List;
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-11
* @ 2023-02-10
*/
@Data
public class PaymentPagination extends Pagination {
/** 单据编号 */
private String documentno;
/** 客户 */
private String suppliername;
/**
* id
*/

@ -9,7 +9,7 @@ import java.util.*;
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-11
* @ 2023-02-10
*/
@Data
public class PaymentPaginationExportModel extends Pagination {
@ -23,7 +23,4 @@ public class PaymentPaginationExportModel extends Pagination {
/** 单据编号 */
private String documentno;
/** 客户 */
private String suppliername;
}

@ -2,7 +2,12 @@
package jnpf.payment.model.payment;
import jnpf.payment.model.payment.Payment_item0Model;
import lombok.Data;
import java.util.List;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
/**
@ -11,7 +16,7 @@ import lombok.Data;
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-11
* @ 2023-02-10
*/
@Data
public class PaymentUpForm{
@ -19,29 +24,19 @@ public class PaymentUpForm{
private String id;
/** 业务日期 **/
@JsonProperty("businessdate")
private Long businessdate;
/** 单据编号 **/
@JsonProperty("documentno")
private String documentno;
/** 客户 **/
/** 供应商 **/
@JsonProperty("suppliername")
private String suppliername;
/** 币别 **/
@JsonProperty("currency")
private String currency;
/** 付款金额 **/
@JsonProperty("paymentamount")
private String paymentamount;
/** 付款类型 **/
@JsonProperty("paymenttype")
private String paymenttype;
/** 付款账户 **/
@ -54,59 +49,57 @@ public class PaymentUpForm{
private String paymentbank;
/** 付款类型 **/
@JsonProperty("paymenttype")
private String paymenttype;
/** 结算类型 **/
@JsonProperty("settlementtype")
private String settlementtype;
/** 付款金额 **/
@JsonProperty("paymentamount")
private String paymentamount;
/** 单据状态 **/
@JsonProperty("status")
private String status;
/** 收款账户 **/
@JsonProperty("collectionaccount")
private String collectionaccount;
/** 创建人id **/
@JsonProperty("creatorUserId")
private String creatorUserId;
/** 收款银行 **/
@JsonProperty("collectionbank")
private String collectionbank;
/** 创建人名称 **/
@JsonProperty("creatorUserName")
private String creatorUserName;
/** 申请金额 **/
@JsonProperty("requestedamount")
private String requestedamount;
/** 创建时间 **/
@JsonProperty("creatorTime")
private String creatorTime;
/** 应付日期 **/
@JsonProperty("duedate")
private Long duedate;
/** 修改人id **/
@JsonProperty("lastModifyUserId")
private String lastModifyUserId;
/** 币别 **/
@JsonProperty("currency")
private String currency;
/** 修改人名称 **/
@JsonProperty("lastModifyUserName")
private String lastModifyUserName;
/** 结算类型 **/
@JsonProperty("settlementtype")
private String settlementtype;
/** 修改时间 **/
@JsonProperty("lastModifyTime")
private String lastModifyTime;
/** 来源单号 **/
@JsonProperty("paymentno")
private String paymentno;
/** 部门id **/
@JsonProperty("departmentId")
private String departmentId;
/** 备注 **/
@JsonProperty("remark")
private String remark;
/** 组织id **/
@JsonProperty("orgnizeId")
private String orgnizeId;
/** 单据状态 **/
@JsonProperty("status")
private String status;
/** 子表数据 **/
@JsonProperty("payment_item0List")
private List<Payment_item0Model> payment_item0List;
}

@ -0,0 +1,73 @@
package jnpf.payment.model.payment;
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-02-10
*/
@Data
public class Payment_item0Model {
/** 付款金额 **/
@JsonProperty("amount")
private String amount;
/** 采购订单主表id **/
@JsonProperty("id")
private String id;
/** 付款申请子表id **/
@JsonProperty("paymentdocitemId")
private String paymentdocitemId;
// /** 申请金额 **/
// @JsonProperty("amount")
// private String amount;
//
// /** 订单金额 **/
// @JsonProperty("amount")
// private String amount;
/** 已付金额 **/
@JsonProperty("payPrice")
private String payPrice;
/** 订单编号 **/
@JsonProperty("documentNo")
private String documentNo;
/** 合同编码 **/
@JsonProperty("contractCode")
private String contractCode;
/** 重量 **/
@JsonProperty("num")
private String num;
/** 垫资金额 **/
@JsonProperty("advanceAmount")
private String advanceAmount;
/** 税额 **/
@JsonProperty("rate")
private String rate;
/** 不含税金额 **/
@JsonProperty("notAmount")
private String notAmount;
/** 业务日期 **/
@JsonProperty("creatorTime")
private Long creatorTime;
}

@ -1,17 +1,18 @@
package jnpf.payment.service;
import jnpf.payment.entity.Payment_item0Entity;
import jnpf.payment.service.Payment_item0Service;
import com.baomidou.mybatisplus.extension.service.IService;
import jnpf.payment.entity.PaymentEntity;
import com.baomidou.mybatisplus.extension.service.IService;
import jnpf.payment.model.payment.PaymentPagination;
import java.util.List;
import java.util.*;
/**
*
* payment
* V3.2.0
* LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-01-11
* 2023-02-10
*/
public interface PaymentService extends IService<PaymentEntity> {
@ -30,6 +31,7 @@ public interface PaymentService extends IService<PaymentEntity> {
boolean update( String id, PaymentEntity entity);
// 子表方法
List<Payment_item0Entity> GetPayment_item0List(String id);
//列表子表数据方法
}

@ -1,15 +1,14 @@
package jnpf.payment.service;
import com.baomidou.mybatisplus.extension.service.IService;
import jnpf.payment.entity.Payment_item0Entity;
import com.baomidou.mybatisplus.extension.service.IService;
/**
*
* jg_payment_item0
* V3.2.0
* LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-01-11
* 2023-02-10
*/
public interface Payment_item0Service extends IService<Payment_item0Entity> {

@ -1,27 +1,36 @@
package jnpf.payment.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jnpf.payment.entity.PaymentEntity;
import jnpf.payment.entity.Payment_item0Entity;
import jnpf.payment.entity.*;
import jnpf.payment.mapper.PaymentMapper;
import jnpf.payment.model.payment.PaymentPagination;
import jnpf.payment.service.PaymentService;
import jnpf.payment.service.*;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jnpf.util.RandomUtil;
import java.math.BigDecimal;
import cn.hutool.core.util.ObjectUtil;
import jnpf.permission.model.authorize.AuthorizeConditionModel;
import jnpf.permission.service.AuthorizeService;
import jnpf.util.ServletUtil;
import jnpf.util.StringUtil;
import jnpf.util.UserProvider;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import jnpf.payment.model.payment.PaymentPagination;
import jnpf.permission.service.AuthorizeService;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
import com.baomidou.mybatisplus.annotation.TableField;
import java.util.stream.Collectors;
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.*;
/**
*
@ -29,10 +38,10 @@ import java.util.List;
* V3.2.0
* LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-01-11
* 2023-02-10
*/
@Service
public class PaymentServiceImpl extends ServiceImpl<PaymentMapper, PaymentEntity> implements PaymentService {
public class PaymentServiceImpl extends ServiceImpl<PaymentMapper, PaymentEntity> implements PaymentService{
@Autowired
@ -42,6 +51,9 @@ public class PaymentServiceImpl extends ServiceImpl<PaymentMapper, PaymentEntity
private AuthorizeService authorizeService;
@Autowired
private Payment_item0Service payment_item0Service;
@ -102,11 +114,6 @@ public class PaymentServiceImpl extends ServiceImpl<PaymentMapper, PaymentEntity
paymentQueryWrapper.lambda().like(PaymentEntity::getDocumentno,paymentPagination.getDocumentno());
}
if(StringUtil.isNotEmpty(paymentPagination.getSuppliername())){
paymentNum++;
paymentQueryWrapper.lambda().like(PaymentEntity::getSuppliername,paymentPagination.getSuppliername());
}
if(AllIdList.size()>0){
paymentQueryWrapper.lambda().in(PaymentEntity::getId, AllIdList);
}
@ -191,11 +198,6 @@ public class PaymentServiceImpl extends ServiceImpl<PaymentMapper, PaymentEntity
paymentQueryWrapper.lambda().like(PaymentEntity::getDocumentno,paymentPagination.getDocumentno());
}
if(StringUtil.isNotEmpty(paymentPagination.getSuppliername())){
paymentNum++;
paymentQueryWrapper.lambda().like(PaymentEntity::getSuppliername,paymentPagination.getSuppliername());
}
if(AllIdList.size()>0){
paymentQueryWrapper.lambda().in(PaymentEntity::getId, AllIdList);
}
@ -252,6 +254,12 @@ public class PaymentServiceImpl extends ServiceImpl<PaymentMapper, PaymentEntity
}
}
//子表方法
@Override
public List<Payment_item0Entity> GetPayment_item0List(String id){
QueryWrapper<Payment_item0Entity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(Payment_item0Entity::getPaymentId, id);
return payment_item0Service.list(queryWrapper);
}
//列表子表数据方法

@ -1,10 +1,30 @@
package jnpf.payment.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jnpf.payment.entity.Payment_item0Entity;
import jnpf.payment.entity.*;
import jnpf.payment.mapper.Payment_item0Mapper;
import jnpf.payment.service.Payment_item0Service;
import jnpf.payment.service.*;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jnpf.util.RandomUtil;
import java.math.BigDecimal;
import cn.hutool.core.util.ObjectUtil;
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.*;
/**
*
@ -12,10 +32,10 @@ import org.springframework.stereotype.Service;
* V3.2.0
* LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-01-11
* 2023-02-10
*/
@Service
public class Payment_item0ServiceImpl extends ServiceImpl<Payment_item0Mapper, Payment_item0Entity> implements Payment_item0Service {
public class Payment_item0ServiceImpl extends ServiceImpl<Payment_item0Mapper, Payment_item0Entity> implements Payment_item0Service{
}

@ -15,8 +15,11 @@ import jnpf.base.UserInfo;
import jnpf.base.vo.DownloadVO;
import jnpf.config.ConfigValueUtil;
import jnpf.exception.DataException;
import jnpf.purchaseback.entity.PurchaseorderEntity;
import jnpf.purchaseback.service.PurchaseorderService;
import jnpf.purchaseorder.entity.*;
import jnpf.purchaseorder.service.*;
import org.bytedeco.opencv.presets.opencv_core;
import org.springframework.transaction.annotation.Transactional;
import jnpf.purchaseorder.model.purchaseorder.*;
import jnpf.purchaseorder.model.purchaseorder.PurchaseorderPagination;
@ -80,6 +83,8 @@ public class PurchaseorderController {
private PaymentdocpoService paymentdocpoService;
@Autowired
private InvoicesitemService invoicesitemService;
@Autowired
private PurchaseorderService purchaseorderService;
/**
@ -88,7 +93,8 @@ public class PurchaseorderController {
* @param
* @return
*/
@PostMapping("pigeonhole")
@PostMapping("/pigeonhole")
@Transactional
public ActionResult pigeonhole(@RequestBody PigeonholeModel pigeonholeModel) {
PurchaseorderitemEntity purchaseorder = purchaseorderitemService.getById(pigeonholeModel.getId());
if (purchaseorder.getInvoiceAmount().equals(purchaseorder.getAmount()) && purchaseorder.getInvoiceAmount().equals(purchaseorder.getPayPrice())){
@ -100,6 +106,37 @@ public class PurchaseorderController {
}
}
/**
*
*
* @param
* @return
*/
@PutMapping("/paymentapply/{ids}")
@Transactional
public ActionResult paymentapply(@PathVariable("ids") String ids) {
String[] idList = ids.split(",");
String supplier = "";
int i = 0;
for (String id : idList){
PurchaseorderEntity purchaseorderEntity = purchaseorderService.getById(id);
if (!purchaseorderEntity.getStatus().equals("2")){
return ActionResult.fail("请先完成入库操作");
}
if (purchaseorderEntity.getPayPrice().equals(purchaseorderEntity.getAmount())){
return ActionResult.fail("已完成付款");
}
if (!purchaseorderEntity.getInvoiceAmount().equals(purchaseorderEntity.getAmount())){
return ActionResult.fail("请先开具发票");
}
if (i>0 && !supplier.equals(purchaseorderEntity.getSupplierName())){
return ActionResult.fail("存在多个不同供应商,请重新勾选");
}
supplier = purchaseorderEntity.getSupplierName();
i++;
}
return ActionResult.success("付款申请通过");
}
/**
*

@ -1,55 +1,56 @@
package jnpf.supplier.controller;
import cn.afterturn.easypoi.excel.ExcelExportUtil;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import jnpf.base.ActionResult;
import jnpf.base.UserInfo;
import jnpf.base.vo.DownloadVO;
import jnpf.base.vo.PageListVO;
import jnpf.base.vo.PaginationVO;
import jnpf.base.UserInfo;
import jnpf.base.vo.DownloadVO;
import jnpf.config.ConfigValueUtil;
import jnpf.exception.DataException;
import jnpf.supplier.entity.SupplierEntity;
import jnpf.supplier.entity.SupplierMobileEntity;
import org.springframework.transaction.annotation.Transactional;
import jnpf.supplier.model.supplier.*;
import jnpf.supplier.service.SupplierService;
import jnpf.supplier.model.supplier.SupplierPagination;
import jnpf.util.*;
import jnpf.util.enums.FileTypeEnum;
import jnpf.util.file.UploadUtil;
import lombok.Cleanup;
import lombok.extern.slf4j.Slf4j;
import lombok.Cleanup;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import jnpf.supplier.entity.SupplierMobileEntity;
import jnpf.supplier.service.SupplierMobileService;
import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;
import javax.validation.Valid;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import jnpf.util.GeneraterSwapUtil;
import java.util.*;
import jnpf.util.file.UploadUtil;
import jnpf.util.enums.FileTypeEnum;
/**
*
*
* supplier
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-04
* @ 2023-02-13
*/
@Slf4j
@RestController
@Api(tags = "供应商档案" , value = "supplier")
@Api(tags = "supplier" , value = "supplier")
@RequestMapping("/api/supplier/Supplier")
public class SupplierController {
public class SupplierMobileController {
@Autowired
private GeneraterSwapUtil generaterSwapUtil;
@ -61,7 +62,7 @@ public class SupplierController {
private UserProvider userProvider;
@Autowired
private SupplierService supplierService;
private SupplierMobileService supplierMobileService;
@ -74,9 +75,10 @@ public class SupplierController {
*/
@PostMapping("/getList")
public ActionResult list(@RequestBody SupplierPagination supplierPagination)throws IOException{
List<SupplierMobileEntity> list= supplierService.getList(supplierPagination);
List<SupplierMobileEntity> list= supplierMobileService.getList(supplierPagination);
//处理id字段转名称若无需转或者为空可删除
for(SupplierMobileEntity entity:list){
entity.setCompanyId(generaterSwapUtil.comSelectValues(entity.getCompanyId()));
entity.setStatus(generaterSwapUtil.switchSelectValue(entity.getStatus() ,"1" ,"0"));
}
List<SupplierListVO> listVO=JsonUtil.getJsonToList(list,SupplierListVO.class);
@ -103,9 +105,9 @@ public class SupplierController {
public ActionResult create(@RequestBody @Valid SupplierCrForm supplierCrForm) throws DataException {
String mainId =RandomUtil.uuId();
UserInfo userInfo=userProvider.get();
SupplierEntity entity = JsonUtil.getJsonToBean(supplierCrForm, SupplierEntity.class);
SupplierMobileEntity entity = JsonUtil.getJsonToBean(supplierCrForm, SupplierMobileEntity.class);
entity.setId(mainId);
supplierService.save(entity);
supplierMobileService.save(entity);
return ActionResult.success("创建成功");
@ -143,9 +145,10 @@ public class SupplierController {
return ActionResult.fail("请选择导出字段");
}
SupplierPagination supplierPagination=JsonUtil.getJsonToBean(supplierPaginationExportModel, SupplierPagination.class);
List<SupplierEntity> list= supplierService.getTypeList(supplierPagination,supplierPaginationExportModel.getDataType());
List<SupplierMobileEntity> list= supplierMobileService.getTypeList(supplierPagination,supplierPaginationExportModel.getDataType());
//处理id字段转名称若无需转或者为空可删除
for(SupplierEntity entity:list){
for(SupplierMobileEntity entity:list){
entity.setCompanyId(generaterSwapUtil.comSelectValues(entity.getCompanyId()));
entity.setStatus(generaterSwapUtil.switchSelectValue(entity.getStatus() ,"1" ,"0"));
}
List<SupplierListVO> listVO=JsonUtil.getJsonToList(list,SupplierListVO.class);
@ -173,16 +176,16 @@ public class SupplierController {
entitys.add(new ExcelExportEntity("供应商名称" ,"supplierName"));
break;
case "supplierSiteId" :
entitys.add(new ExcelExportEntity("地点ID" ,"supplierSiteId"));
entitys.add(new ExcelExportEntity("供应商地点ID" ,"supplierSiteId"));
break;
case "supplierSiteCode" :
entitys.add(new ExcelExportEntity("地点名称" ,"supplierSiteCode"));
entitys.add(new ExcelExportEntity("供应商地点名称" ,"supplierSiteCode"));
break;
case "companyId" :
entitys.add(new ExcelExportEntity("所属公司编码" ,"companyId"));
entitys.add(new ExcelExportEntity("公司名称" ,"companyId"));
break;
case "companyName" :
entitys.add(new ExcelExportEntity("所属公司名称" ,"companyName"));
case "address" :
entitys.add(new ExcelExportEntity("地址" ,"address"));
break;
case "contactName" :
entitys.add(new ExcelExportEntity("联系人" ,"contactName"));
@ -193,9 +196,6 @@ public class SupplierController {
case "supplierLevel" :
entitys.add(new ExcelExportEntity("供应商等级" ,"supplierLevel"));
break;
case "address" :
entitys.add(new ExcelExportEntity("地址" ,"address"));
break;
case "status" :
entitys.add(new ExcelExportEntity("启用" ,"status"));
break;
@ -260,7 +260,7 @@ public class SupplierController {
*/
@GetMapping("/{id}")
public ActionResult<SupplierInfoVO> info(@PathVariable("id") String id){
SupplierEntity entity= supplierService.getInfo(id);
SupplierMobileEntity entity= supplierMobileService.getInfo(id);
SupplierInfoVO vo=JsonUtil.getJsonToBean(entity, SupplierInfoVO.class);
//子表
@ -276,7 +276,7 @@ public class SupplierController {
*/
@GetMapping("/detail/{id}")
public ActionResult<SupplierInfoVO> detailInfo(@PathVariable("id") String id){
SupplierEntity entity= supplierService.getInfo(id);
SupplierMobileEntity entity= supplierMobileService.getInfo(id);
SupplierInfoVO vo=JsonUtil.getJsonToBean(entity, SupplierInfoVO.class);
//子表数据转换
@ -284,6 +284,7 @@ public class SupplierController {
//附表数据转换
//添加到详情表单对象中
vo.setCompanyId(generaterSwapUtil.comSelectValues(vo.getCompanyId()));
vo.setStatus(generaterSwapUtil.switchSelectValue(vo.getStatus() ,"1" ,"0"));
return ActionResult.success(vo);
@ -302,10 +303,10 @@ public class SupplierController {
@Transactional
public ActionResult update(@PathVariable("id") String id,@RequestBody @Valid SupplierUpForm supplierUpForm) throws DataException {
UserInfo userInfo=userProvider.get();
SupplierEntity entity= supplierService.getInfo(id);
SupplierMobileEntity entity= supplierMobileService.getInfo(id);
if(entity!=null){
SupplierEntity subentity=JsonUtil.getJsonToBean(supplierUpForm, SupplierEntity.class);
supplierService.update(id, subentity);
SupplierMobileEntity subentity=JsonUtil.getJsonToBean(supplierUpForm, SupplierMobileEntity.class);
supplierMobileService.update(id, subentity);
return ActionResult.success("更新成功");
}else{
return ActionResult.fail("更新失败,数据不存在");
@ -323,9 +324,9 @@ public class SupplierController {
@DeleteMapping("/{id}")
@Transactional
public ActionResult delete(@PathVariable("id") String id){
SupplierEntity entity= supplierService.getInfo(id);
SupplierMobileEntity entity= supplierMobileService.getInfo(id);
if(entity!=null){
supplierService.delete(entity);
supplierMobileService.delete(entity);
}
return ActionResult.success("删除成功");

@ -1,108 +0,0 @@
package jnpf.supplier.entity;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
*
*
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-04
*/
@Data
@TableName("jg_supplier")
public class SupplierEntity {
@TableId("ID")
private String id;
@TableField("CREATOR_USER_ID")
private String creatoruserid;
@TableField("CREATOR_USER_NAME")
private String creatorusername;
@TableField("CREATOR_TIME")
private Date creatortime;
@TableField("LAST_MODIFY_USER_ID")
private String lastmodifyuserid;
@TableField("LAST_MODIFY_USER_NAME")
private String lastmodifyusername;
@TableField("LAST_MODIFY_TIME")
private Date lastmodifytime;
@TableField("DELETE_USER_ID")
private String deleteuserid;
@TableField("DELETE_USER_NAME")
private String deleteusername;
@TableField("DELETE_TIME")
private Date deletetime;
@TableField("DELETE_MARK")
private String deletemark;
@TableField("SUPPLIER_CODE")
private String supplierCode;
@TableField("SUPPLIER_NAME")
private String supplierName;
@TableField("SUPPLIER_SITE_ID")
private String supplierSiteId;
@TableField("SUPPLIER_SITE_CODE")
private String supplierSiteCode;
@TableField("COMPANY_ID")
private String companyId;
@TableField("COMPANY_NAME")
private String companyName;
@TableField("VAT_REGISTRATION_NUM")
private String vatRegistrationNum;
// @TableField("ORGNIZE_ID")
// private String orgnizeId;
@TableField("orgnize_id")
private String orgId;
@TableField("DEPARTMENT_ID")
private String departmentId;
@TableField("SUPPLY")
private Integer supply;
@TableField("CONTACT_NAME")
private String contactName;
@TableField("CONTACT_PHONE")
private String contactPhone;
@TableField("SUPPLIER_LEVEL")
private String supplierLevel;
@TableField("ADDRESS")
private String address;
@TableField("STATUS")
private String status;
}

@ -1,52 +1,59 @@
package jnpf.supplier.entity;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* @Author: WangChuang
* @Date: 8/2/2023 1:37
* @Description //注释:
* @Version 1.0
*
*
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-02-13
*/
@Data
@TableName("jg_supplier")
public class SupplierMobileEntity {
@TableId("ID")
private String id;
@TableField("CREATOR_USER_ID")
private String creatoruserid;
private String creatorUserId;
@TableField("CREATOR_USER_NAME")
private String creatorusername;
private String creatorUserName;
@TableField("CREATOR_TIME")
private Date creatortime;
private Date creatorTime;
@TableField("LAST_MODIFY_USER_ID")
private String lastmodifyuserid;
private String lastModifyUserId;
@TableField("LAST_MODIFY_USER_NAME")
private String lastmodifyusername;
private String lastModifyUserName;
@TableField("LAST_MODIFY_TIME")
private Date lastmodifytime;
private Date lastModifyTime;
@TableField("DELETE_USER_ID")
private String deleteuserid;
private String deleteUserId;
@TableField("DELETE_USER_NAME")
private String deleteusername;
private String deleteUserName;
@TableField("DELETE_TIME")
private Date deletetime;
private Date deleteTime;
@TableField("DELETE_MARK")
private String deletemark;
private String deleteMark;
@TableField("SUPPLIER_CODE")
private String supplierCode;
@ -69,13 +76,8 @@ public class SupplierMobileEntity {
@TableField("VAT_REGISTRATION_NUM")
private String vatRegistrationNum;
// @TableField("ORGNIZE_ID")
// private String orgnizeId;
@TableField("orgnize_id")
private String orgId;
@TableField("ORGNIZE_ID")
private String orgnizeId;
@TableField("DEPARTMENT_ID")
private String departmentId;
@ -98,14 +100,4 @@ public class SupplierMobileEntity {
@TableField("STATUS")
private String status;
// 收获量
private Double settlemenSum;
// 净重
private Double weightSum;
// 扣重
private Double buckleWeightSum;
// 总重
private Double grossWeightSum;
// 总额
private Double salesPriceSum;
}

@ -1,23 +0,0 @@
package jnpf.supplier.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import jnpf.supplier.entity.SupplierEntity;
import jnpf.supplier.entity.SupplierMobileEntity;
import org.apache.ibatis.annotations.Param;
/**
*
*
* V3.2.0
* LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-01-04
*/
public interface SupplierMapper extends BaseMapper<SupplierEntity> {
IPage<SupplierMobileEntity> getSupplierList(@Param("page") Page<SupplierMobileEntity> page, @Param("ew")Wrapper<SupplierEntity> wrapper);
}

@ -0,0 +1,17 @@
package jnpf.supplier.mapper;
import jnpf.supplier.entity.SupplierMobileEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
*
* supplier
* V3.2.0
* LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-02-13
*/
public interface SupplierMobileMapper extends BaseMapper<SupplierMobileEntity> {
}

@ -14,7 +14,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-04
* @ 2023-02-13
*/
@Data
public class SupplierCrForm {
@ -27,21 +27,21 @@ public class SupplierCrForm {
@JsonProperty("supplierName")
private String supplierName;
/** 地点ID **/
/** 供应商地点ID **/
@JsonProperty("supplierSiteId")
private String supplierSiteId;
/** 地点名称 **/
/** 供应商地点名称 **/
@JsonProperty("supplierSiteCode")
private String supplierSiteCode;
/** 所属公司编码 **/
/** 公司名称 **/
@JsonProperty("companyId")
private String companyId;
/** 所属公司名称 **/
@JsonProperty("companyName")
private String companyName;
/** 地址 **/
@JsonProperty("address")
private String address;
/** 联系人 **/
@JsonProperty("contactName")
@ -55,10 +55,6 @@ public class SupplierCrForm {
@JsonProperty("supplierLevel")
private String supplierLevel;
/** 地址 **/
@JsonProperty("address")
private String address;
/** 启用 **/
@JsonProperty("status")
private String status;

@ -15,7 +15,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-04
* @ 2023-02-13
*/
@Data
public class SupplierInfoVO{
@ -31,21 +31,21 @@ public class SupplierInfoVO{
@JsonProperty("supplierName")
private String supplierName;
/** 地点ID **/
/** 供应商地点ID **/
@JsonProperty("supplierSiteId")
private String supplierSiteId;
/** 地点名称 **/
/** 供应商地点名称 **/
@JsonProperty("supplierSiteCode")
private String supplierSiteCode;
/** 所属公司编码 **/
/** 公司名称 **/
@JsonProperty("companyId")
private String companyId;
/** 所属公司名称 **/
@JsonProperty("companyName")
private String companyName;
/** 地址 **/
@JsonProperty("address")
private String address;
/** 联系人 **/
@JsonProperty("contactName")
@ -59,10 +59,6 @@ public class SupplierInfoVO{
@JsonProperty("supplierLevel")
private String supplierLevel;
/** 地址 **/
@JsonProperty("address")
private String address;
/** 启用 **/
@JsonProperty("status")
private String status;

@ -10,7 +10,7 @@ import java.util.List;
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-04
* @ 2023-02-13
*/
@Data
public class SupplierListQuery extends Pagination {

@ -3,15 +3,19 @@
package jnpf.supplier.model.supplier;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import java.sql.Time;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
/**
*
*
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-04
* @ 2023-02-13
*/
@Data
public class SupplierListVO{
@ -30,24 +34,24 @@ public class SupplierListVO{
private String supplierName;
/** 地点ID **/
/** 供应商地点ID **/
@JsonProperty("supplierSiteId")
private String supplierSiteId;
/** 地点名称 **/
/** 供应商地点名称 **/
@JsonProperty("supplierSiteCode")
private String supplierSiteCode;
/** 所属公司编码 **/
/** 公司名称 **/
@JsonProperty("companyId")
private String companyId;
/** 所属公司名称 **/
@JsonProperty("companyName")
private String companyName;
/** 地址 **/
@JsonProperty("address")
private String address;
/** 联系人 **/
@ -65,23 +69,9 @@ public class SupplierListVO{
private String supplierLevel;
/** 地址 **/
@JsonProperty("address")
private String address;
/** 启用 **/
@JsonProperty("status")
private String status;
// 收获量
private Double settlemenSum;
// 净重
private Double weightSum;
// 扣重
private Double buckleWeightSum;
// 总重
private Double grossWeightSum;
// 总额
private Double salesPriceSum;
}

@ -11,7 +11,7 @@ import java.util.List;
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-04
* @ 2023-02-13
*/
@Data
public class SupplierPagination extends Pagination {

@ -9,7 +9,7 @@ import java.util.*;
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-04
* @ 2023-02-13
*/
@Data
public class SupplierPaginationExportModel extends Pagination {

@ -15,7 +15,7 @@ import lombok.Data;
* @ V3.2.0
* @ LINKAGE-BOOT
* @ LINKAGE-BOOT
* @ 2023-01-04
* @ 2023-02-13
*/
@Data
public class SupplierUpForm{
@ -33,24 +33,24 @@ public class SupplierUpForm{
private String supplierName;
/** 地点ID **/
/** 供应商地点ID **/
@JsonProperty("supplierSiteId")
private String supplierSiteId;
/** 地点名称 **/
/** 供应商地点名称 **/
@JsonProperty("supplierSiteCode")
private String supplierSiteCode;
/** 所属公司编码 **/
/** 公司名称 **/
@JsonProperty("companyId")
private String companyId;
/** 所属公司名称 **/
@JsonProperty("companyName")
private String companyName;
/** 地址 **/
@JsonProperty("address")
private String address;
/** 联系人 **/
@ -68,11 +68,6 @@ public class SupplierUpForm{
private String supplierLevel;
/** 地址 **/
@JsonProperty("address")
private String address;
/** 启用 **/
@JsonProperty("status")
private String status;

@ -0,0 +1,34 @@
package jnpf.supplier.service;
import jnpf.supplier.entity.SupplierMobileEntity;
import com.baomidou.mybatisplus.extension.service.IService;
import jnpf.supplier.model.supplier.SupplierPagination;
import java.util.*;
/**
*
* supplier
* V3.2.0
* LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-02-13
*/
public interface SupplierMobileService extends IService<SupplierMobileEntity> {
List<SupplierMobileEntity> getList(SupplierPagination supplierPagination);
List<SupplierMobileEntity> getTypeList(SupplierPagination supplierPagination, String dataType);
SupplierMobileEntity getInfo(String id);
void delete(SupplierMobileEntity entity);
void create(SupplierMobileEntity entity);
boolean update( String id, SupplierMobileEntity entity);
// 子表方法
//列表子表数据方法
}

@ -1,42 +0,0 @@
package jnpf.supplier.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import jnpf.supplier.entity.SupplierEntity;
import jnpf.supplier.entity.SupplierMobileEntity;
import jnpf.supplier.model.supplier.SupplierPagination;
import java.util.List;
/**
*
*
* V3.2.0
* LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-01-04
*/
public interface SupplierService extends IService<SupplierEntity> {
List<SupplierMobileEntity> getList(SupplierPagination supplierPagination);
IPage<SupplierMobileEntity>page(Page<SupplierMobileEntity> page, Wrapper<SupplierEntity> queryWrapper) ;
List<SupplierEntity> getTypeList(SupplierPagination supplierPagination, String dataType);
SupplierEntity getInfo(String id);
void delete(SupplierEntity entity);
void create(SupplierEntity entity);
boolean update(String id, SupplierEntity entity);
// 子表方法
//列表子表数据方法
}

@ -0,0 +1,223 @@
package jnpf.supplier.service.impl;
import jnpf.supplier.entity.*;
import jnpf.supplier.mapper.SupplierMobileMapper;
import jnpf.supplier.service.*;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.hutool.core.util.ObjectUtil;
import jnpf.permission.model.authorize.AuthorizeConditionModel;
import jnpf.supplier.model.supplier.SupplierPagination;
import jnpf.permission.service.AuthorizeService;
import java.lang.reflect.Field;
import com.baomidou.mybatisplus.annotation.TableField;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import jnpf.util.*;
import java.util.*;
/**
*
* supplier
* V3.2.0
* LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-02-13
*/
@Service
public class SupplierMobileServiceImpl extends ServiceImpl<SupplierMobileMapper, SupplierMobileEntity> implements SupplierMobileService {
@Autowired
private UserProvider userProvider;
@Autowired
private AuthorizeService authorizeService;
@Override
public List<SupplierMobileEntity> getList(SupplierPagination supplierPagination){
String userId=userProvider.get().getUserId();
List<String> AllIdList =new ArrayList();
int total=0;
int supplierNum =0;
QueryWrapper<SupplierMobileEntity> supplierQueryWrapper=new QueryWrapper<>();
boolean pcPermission = false;
boolean appPermission = false;
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
if(isPc && pcPermission){
if (!userProvider.get().getIsAdministrator()){
Object supplierObj=authorizeService.getCondition(new AuthorizeConditionModel(supplierQueryWrapper,supplierPagination.getMenuId(),"supplier"));
if (ObjectUtil.isEmpty(supplierObj)){
return new ArrayList<>();
} else {
supplierQueryWrapper = (QueryWrapper<SupplierMobileEntity>)supplierObj;
supplierNum++;
}
}
}
if(!isPc && appPermission){
if (!userProvider.get().getIsAdministrator()){
Object supplierObj=authorizeService.getCondition(new AuthorizeConditionModel(supplierQueryWrapper,supplierPagination.getMenuId(),"supplier"));
if (ObjectUtil.isEmpty(supplierObj)){
return new ArrayList<>();
} else {
supplierQueryWrapper = (QueryWrapper<SupplierMobileEntity>)supplierObj;
supplierNum++;
}
}
}
if(StringUtil.isNotEmpty(supplierPagination.getSupplierCode())){
supplierNum++;
supplierQueryWrapper.lambda().like(SupplierMobileEntity::getSupplierCode,supplierPagination.getSupplierCode());
}
if(StringUtil.isNotEmpty(supplierPagination.getSupplierName())){
supplierNum++;
supplierQueryWrapper.lambda().like(SupplierMobileEntity::getSupplierName,supplierPagination.getSupplierName());
}
if(AllIdList.size()>0){
supplierQueryWrapper.lambda().in(SupplierMobileEntity::getId, AllIdList);
}
//排序
if(StringUtil.isEmpty(supplierPagination.getSidx())){
supplierQueryWrapper.lambda().orderByDesc(SupplierMobileEntity::getSupplierCode);
}else{
try {
String sidx = supplierPagination.getSidx();
SupplierMobileEntity supplierMobileEntity = new SupplierMobileEntity();
Field declaredField = supplierMobileEntity.getClass().getDeclaredField(sidx);
declaredField.setAccessible(true);
String value = declaredField.getAnnotation(TableField.class).value();
supplierQueryWrapper="asc".equals(supplierPagination.getSort().toLowerCase())?supplierQueryWrapper.orderByAsc(value):supplierQueryWrapper.orderByDesc(value);
} catch (NoSuchFieldException e) {
e.printStackTrace();
}
}
if((total>0 && AllIdList.size()>0) || total==0){
Page<SupplierMobileEntity> page=new Page<>(supplierPagination.getCurrentPage(), supplierPagination.getPageSize());
IPage<SupplierMobileEntity> userIPage=this.page(page, supplierQueryWrapper);
return supplierPagination.setData(userIPage.getRecords(),userIPage.getTotal());
}else{
List<SupplierMobileEntity> list = new ArrayList();
return supplierPagination.setData(list, list.size());
}
}
@Override
public List<SupplierMobileEntity> getTypeList(SupplierPagination supplierPagination, String dataType){
String userId=userProvider.get().getUserId();
List<String> AllIdList =new ArrayList();
int total=0;
int supplierNum =0;
QueryWrapper<SupplierMobileEntity> supplierQueryWrapper=new QueryWrapper<>();
boolean pcPermission = false;
boolean appPermission = false;
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
if(isPc && pcPermission){
if (!userProvider.get().getIsAdministrator()){
Object supplierObj=authorizeService.getCondition(new AuthorizeConditionModel(supplierQueryWrapper,supplierPagination.getMenuId(),"supplier"));
if (ObjectUtil.isEmpty(supplierObj)){
return new ArrayList<>();
} else {
supplierQueryWrapper = (QueryWrapper<SupplierMobileEntity>)supplierObj;
supplierNum++;
}
}
}
if(!isPc && appPermission){
if (!userProvider.get().getIsAdministrator()){
Object supplierObj=authorizeService.getCondition(new AuthorizeConditionModel(supplierQueryWrapper,supplierPagination.getMenuId(),"supplier"));
if (ObjectUtil.isEmpty(supplierObj)){
return new ArrayList<>();
} else {
supplierQueryWrapper = (QueryWrapper<SupplierMobileEntity>)supplierObj;
supplierNum++;
}
}
}
if(StringUtil.isNotEmpty(supplierPagination.getSupplierCode())){
supplierNum++;
supplierQueryWrapper.lambda().like(SupplierMobileEntity::getSupplierCode,supplierPagination.getSupplierCode());
}
if(StringUtil.isNotEmpty(supplierPagination.getSupplierName())){
supplierNum++;
supplierQueryWrapper.lambda().like(SupplierMobileEntity::getSupplierName,supplierPagination.getSupplierName());
}
if(AllIdList.size()>0){
supplierQueryWrapper.lambda().in(SupplierMobileEntity::getId, AllIdList);
}
//排序
if(StringUtil.isEmpty(supplierPagination.getSidx())){
supplierQueryWrapper.lambda().orderByDesc(SupplierMobileEntity::getSupplierCode);
}else{
try {
String sidx = supplierPagination.getSidx();
SupplierMobileEntity supplierMobileEntity = new SupplierMobileEntity();
Field declaredField = supplierMobileEntity.getClass().getDeclaredField(sidx);
declaredField.setAccessible(true);
String value = declaredField.getAnnotation(TableField.class).value();
supplierQueryWrapper="asc".equals(supplierPagination.getSort().toLowerCase())?supplierQueryWrapper.orderByAsc(value):supplierQueryWrapper.orderByDesc(value);
} catch (NoSuchFieldException e) {
e.printStackTrace();
}
}
if("0".equals(dataType)){
if((total>0 && AllIdList.size()>0) || total==0){
Page<SupplierMobileEntity> page=new Page<>(supplierPagination.getCurrentPage(), supplierPagination.getPageSize());
IPage<SupplierMobileEntity> userIPage=this.page(page, supplierQueryWrapper);
return supplierPagination.setData(userIPage.getRecords(),userIPage.getTotal());
}else{
List<SupplierMobileEntity> list = new ArrayList();
return supplierPagination.setData(list, list.size());
}
}else{
return this.list(supplierQueryWrapper);
}
}
@Override
public SupplierMobileEntity getInfo(String id){
QueryWrapper<SupplierMobileEntity> queryWrapper=new QueryWrapper<>();
queryWrapper.lambda().eq(SupplierMobileEntity::getId,id);
return this.getOne(queryWrapper);
}
@Override
public void create(SupplierMobileEntity entity){
this.save(entity);
}
@Override
public boolean update(String id, SupplierMobileEntity entity){
entity.setId(id);
return this.updateById(entity);
}
@Override
public void delete(SupplierMobileEntity entity){
if(entity!=null){
this.removeById(entity.getId());
}
}
//子表方法
//列表子表数据方法
}

@ -1,243 +0,0 @@
package jnpf.supplier.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jnpf.permission.model.authorize.AuthorizeConditionModel;
import jnpf.permission.service.AuthorizeService;
import jnpf.supplier.entity.SupplierEntity;
import jnpf.supplier.entity.SupplierMobileEntity;
import jnpf.supplier.mapper.SupplierMapper;
import jnpf.supplier.model.supplier.SupplierPagination;
import jnpf.supplier.service.SupplierService;
import jnpf.util.ServletUtil;
import jnpf.util.StringUtil;
import jnpf.util.UserProvider;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
/**
*
*
* V3.2.0
* LINKAGE-BOOT
* LINKAGE-BOOT
* 2023-01-04
*/
@Service
public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, SupplierEntity> implements SupplierService {
@Autowired
private UserProvider userProvider;
@Autowired
private AuthorizeService authorizeService;
@Resource
private SupplierMapper supplierMapper;
@Override
public List<SupplierMobileEntity> getList(SupplierPagination supplierPagination){
String userId=userProvider.get().getUserId();
List<String> AllIdList =new ArrayList();
int total=0;
int supplierNum =0;
QueryWrapper<SupplierEntity> supplierQueryWrapper=new QueryWrapper<>();
boolean pcPermission = false;
boolean appPermission = false;
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
if(isPc && pcPermission){
if (!userProvider.get().getIsAdministrator()){
Object supplierObj=authorizeService.getCondition(new AuthorizeConditionModel(supplierQueryWrapper,supplierPagination.getMenuId(),"supplier"));
if (ObjectUtil.isEmpty(supplierObj)){
return new ArrayList<>();
} else {
supplierQueryWrapper = (QueryWrapper<SupplierEntity>)supplierObj;
supplierNum++;
}
}
}
if(!isPc && appPermission){
if (!userProvider.get().getIsAdministrator()){
Object supplierObj=authorizeService.getCondition(new AuthorizeConditionModel(supplierQueryWrapper,supplierPagination.getMenuId(),"supplier"));
if (ObjectUtil.isEmpty(supplierObj)){
return new ArrayList<>();
} else {
supplierQueryWrapper = (QueryWrapper<SupplierEntity>)supplierObj;
supplierNum++;
}
}
}
if(StringUtil.isNotEmpty(supplierPagination.getSupplierCode())){
supplierNum++;
supplierQueryWrapper.lambda().like(SupplierEntity::getSupplierCode,supplierPagination.getSupplierCode());
}
if(StringUtil.isNotEmpty(supplierPagination.getSupplierName())){
supplierNum++;
supplierQueryWrapper.lambda().like(SupplierEntity::getSupplierName,supplierPagination.getSupplierName());
}
if(StringUtil.isNotEmpty(supplierPagination.getKeyword())){
supplierNum++;
supplierQueryWrapper.lambda().and(wq -> {
// 拼接sql
wq.like(SupplierEntity::getSupplierName,supplierPagination.getKeyword())
.or()
.like(SupplierEntity::getCompanyName,supplierPagination.getKeyword())
.or()
.like(SupplierEntity::getAddress,supplierPagination.getKeyword());
});
}
if(AllIdList.size()>0){
supplierQueryWrapper.lambda().in(SupplierEntity::getId, AllIdList);
}
//排序
if(StringUtil.isEmpty(supplierPagination.getSidx())){
supplierQueryWrapper.lambda().orderByDesc(SupplierEntity::getSupplierCode);
}else{
try {
String sidx = supplierPagination.getSidx();
SupplierEntity supplierEntity = new SupplierEntity();
Field declaredField = supplierEntity.getClass().getDeclaredField(sidx);
declaredField.setAccessible(true);
String value = declaredField.getAnnotation(TableField.class).value();
supplierQueryWrapper="asc".equals(supplierPagination.getSort().toLowerCase())?supplierQueryWrapper.orderByAsc(value):supplierQueryWrapper.orderByDesc(value);
} catch (NoSuchFieldException e) {
e.printStackTrace();
}
}
if((total>0 && AllIdList.size()>0) || total==0){
Page<SupplierMobileEntity> page=new Page<>(supplierPagination.getCurrentPage(), supplierPagination.getPageSize());
IPage<SupplierMobileEntity> userIPage=this.page(page, supplierQueryWrapper);
return supplierPagination.setData(userIPage.getRecords(),userIPage.getTotal());
}else{
List<SupplierMobileEntity> list = new ArrayList();
return supplierPagination.setData(list, list.size());
}
}
@Override
public IPage<SupplierMobileEntity> page(Page<SupplierMobileEntity> page, Wrapper<SupplierEntity> queryWrapper) {
return supplierMapper.getSupplierList(page,queryWrapper);
}
@Override
public List<SupplierEntity> getTypeList(SupplierPagination supplierPagination,String dataType){
String userId=userProvider.get().getUserId();
List<String> AllIdList =new ArrayList();
int total=0;
int supplierNum =0;
QueryWrapper<SupplierEntity> supplierQueryWrapper=new QueryWrapper<>();
boolean pcPermission = false;
boolean appPermission = false;
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
if(isPc && pcPermission){
if (!userProvider.get().getIsAdministrator()){
Object supplierObj=authorizeService.getCondition(new AuthorizeConditionModel(supplierQueryWrapper,supplierPagination.getMenuId(),"supplier"));
if (ObjectUtil.isEmpty(supplierObj)){
return new ArrayList<>();
} else {
supplierQueryWrapper = (QueryWrapper<SupplierEntity>)supplierObj;
supplierNum++;
}
}
}
if(!isPc && appPermission){
if (!userProvider.get().getIsAdministrator()){
Object supplierObj=authorizeService.getCondition(new AuthorizeConditionModel(supplierQueryWrapper,supplierPagination.getMenuId(),"supplier"));
if (ObjectUtil.isEmpty(supplierObj)){
return new ArrayList<>();
} else {
supplierQueryWrapper = (QueryWrapper<SupplierEntity>)supplierObj;
supplierNum++;
}
}
}
if(StringUtil.isNotEmpty(supplierPagination.getSupplierCode())){
supplierNum++;
supplierQueryWrapper.lambda().like(SupplierEntity::getSupplierCode,supplierPagination.getSupplierCode());
}
if(StringUtil.isNotEmpty(supplierPagination.getSupplierName())){
supplierNum++;
supplierQueryWrapper.lambda().like(SupplierEntity::getSupplierName,supplierPagination.getSupplierName());
}
if(AllIdList.size()>0){
supplierQueryWrapper.lambda().in(SupplierEntity::getId, AllIdList);
}
//排序
if(StringUtil.isEmpty(supplierPagination.getSidx())){
supplierQueryWrapper.lambda().orderByDesc(SupplierEntity::getSupplierCode);
}else{
try {
String sidx = supplierPagination.getSidx();
SupplierEntity supplierEntity = new SupplierEntity();
Field declaredField = supplierEntity.getClass().getDeclaredField(sidx);
declaredField.setAccessible(true);
String value = declaredField.getAnnotation(TableField.class).value();
supplierQueryWrapper="asc".equals(supplierPagination.getSort().toLowerCase())?supplierQueryWrapper.orderByAsc(value):supplierQueryWrapper.orderByDesc(value);
} catch (NoSuchFieldException e) {
e.printStackTrace();
}
}
if("0".equals(dataType)){
if((total>0 && AllIdList.size()>0) || total==0){
Page<SupplierEntity> page=new Page<>(supplierPagination.getCurrentPage(), supplierPagination.getPageSize());
IPage<SupplierEntity> userIPage=this.page(page, supplierQueryWrapper);
return supplierPagination.setData(userIPage.getRecords(),userIPage.getTotal());
}else{
List<SupplierEntity> list = new ArrayList();
return supplierPagination.setData(list, list.size());
}
}else{
return this.list(supplierQueryWrapper);
}
}
@Override
public SupplierEntity getInfo(String id){
QueryWrapper<SupplierEntity> queryWrapper=new QueryWrapper<>();
queryWrapper.lambda().eq(SupplierEntity::getId,id);
return this.getOne(queryWrapper);
}
@Override
public void create(SupplierEntity entity){
this.save(entity);
}
@Override
public boolean update(String id, SupplierEntity entity){
entity.setId(id);
return this.updateById(entity);
}
@Override
public void delete(SupplierEntity entity){
if(entity!=null){
this.removeById(entity.getId());
}
}
//子表方法
//列表子表数据方法
}

@ -1,6 +1,6 @@
<?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.supplier.mapper.SupplierMapper">
<mapper namespace="jnpf.supplier.mapper.SupplierMobileMapper">

@ -1,6 +1,6 @@
<?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.supplier.mapper.SupplierMapper">
<mapper namespace="jnpf.supplier.mapper.SupplierMobileMapper">
<select id="getSupplierList" resultMap="supplierMap">
SELECT
*

@ -2,7 +2,7 @@
<el-dialog title="详情"
:close-on-click-modal="false" append-to-body
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
width="800px">
width="1000px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" >
<template v-if="!loading">
@ -12,12 +12,6 @@
<p>{{dataForm.documentNo}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="业务日期"
prop="businessDate" >
<p>{{jnpf.dateFormat(dataForm.businessDate)}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="客户名称"
prop="customerName" >
@ -30,12 +24,6 @@
<p>{{dataForm.amountCollected}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="收款类型 "
prop="paymentType" >
<p>{{ dataForm.paymentType | dynamicText(paymentTypeOptions) }} </p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="收款账户"
prop="collectionCount" >
@ -49,9 +37,9 @@
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="结算类型"
prop="settlementType" >
<p>{{ dataForm.settlementType | dynamicText(settlementTypeOptions) }} </p>
<el-form-item label="收款类型 "
prop="paymentType" >
<p>{{ dataForm.paymentType | dynamicText(paymentTypeOptions) }} </p>
</el-form-item>
</el-col>
<el-col :span="8" >
@ -60,26 +48,41 @@
<p>{{ dataForm.currency | dynamicText(currencyOptions) }} </p>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-col :span="8" >
<el-form-item label="结算类型"
prop="settlementType" >
<p>{{ dataForm.settlementType | dynamicText(settlementTypeOptions) }} </p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="备注信息"
prop="remark" >
<p>{{dataForm.remark}}</p>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-col :span="8" >
<el-form-item label="收款凭证"
prop="voucher" >
<JNPF-UploadFz v-model="dataForm.voucher"
disabled
detailed :fileSize="5" sizeUnit="MB" :limit="9" buttonText="点击上传" >
</JNPF-UploadFz>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="单据状态 "
prop="status" >
<p>{{ dataForm.status | dynamicText(statusOptions) }} </p>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-col :span="8" >
<el-form-item label="制单人"
prop="creatorUserName" >
<p>{{dataForm.creatorUserName}}</p>
</el-form-item>
</el-col>
<el-col :span="24">
<el-tabs v-model="activeukycpv" tab-position="top" class="mb-20">
<el-tabs v-model="activeojnisi" tab-position="top" class="mb-20">
<el-tab-pane label="收款明细">
<el-col :span="24" >
<el-form-item label-width="0">
@ -88,14 +91,34 @@
</div>
<el-table :data="dataForm.collection_item0List" size='mini' >
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="amount" label="金额">
<el-table-column prop="amount" label="收款金额">
<template slot-scope="scope">
<p>{{scope.row.amount}}</p>
</template>
</el-table-column>
<el-table-column prop="quantity" label="数量">
<el-table-column prop="creatorUserId" label="订单金额">
<template slot-scope="scope">
<p>{{scope.row.creatorUserId}}</p>
</template>
</el-table-column>
<el-table-column prop="creatorUserName" label="已收款金额">
<template slot-scope="scope">
<p>{{scope.row.creatorUserName}}</p>
</template>
</el-table-column>
<el-table-column prop="deleteTime" label="删除时间">
<template slot-scope="scope">
<p>{{scope.row.deleteTime}}</p>
</template>
</el-table-column>
<el-table-column prop="lastModifyUserId" label="合同编号">
<template slot-scope="scope">
<p>{{scope.row.quantity}}</p>
<p>{{scope.row.lastModifyUserId}}</p>
</template>
</el-table-column>
<el-table-column prop="lastModifyUserName" label="重量">
<template slot-scope="scope">
<p>{{scope.row.lastModifyUserName}}</p>
</template>
</el-table-column>
<el-table-column prop="taxRate" label="税率">
@ -103,19 +126,24 @@
<p>{{ scope.row.taxRate | dynamicText(taxRateOptions) }}</p>
</template>
</el-table-column>
<el-table-column prop="taxAmount" label="税额">
<el-table-column prop="lastModifyTime" label="垫资金额">
<template slot-scope="scope">
<p>{{scope.row.lastModifyTime}}</p>
</template>
</el-table-column>
<el-table-column prop="deleteUserId" label="税额">
<template slot-scope="scope">
<p>{{scope.row.taxAmount}}</p>
<p>{{scope.row.deleteUserId}}</p>
</template>
</el-table-column>
<el-table-column prop="amountNotTax" label="不含税金额">
<el-table-column prop="deleteUserName" label="不含税金额">
<template slot-scope="scope">
<p>{{scope.row.amountNotTax}}</p>
<p>{{scope.row.deleteUserName}}</p>
</template>
</el-table-column>
<el-table-column prop="remark" label="备注">
<el-table-column prop="creatorTime" label="业务日期">
<template slot-scope="scope">
<p>{{scope.row.remark}}</p>
<p>{{jnpf.dateFormat(scope.row.creatorTime)}}</p>
</template>
</el-table-column>
</el-table>
@ -148,23 +176,23 @@
dataForm: {
id :'',
documentNo : '',
businessDate : '',
customerName : '',
amountCollected : '',
paymentType : "0",
collectionCount : '',
collectionBank : '',
settlementType : "0",
paymentType : "0",
currency : "0",
settlementType : "0",
remark : '',
voucher : [],
status : "0",
creatorUserName : '',
collection_item0List:[],
},
activeukycpv:'0',
activeojnisi:'0',
paymentTypeOptions:[{"fullName":"货款","id":"0"},{"fullName":"运费","id":"1"},{"fullName":"仓储","id":"2"}],
settlementTypeOptions:[{"fullName":"现金","id":"0"},{"fullName":"赊购","id":"1"},{"fullName":"网银","id":"2"},{"fullName":"银企直连","id":"3"},{"fullName":"银票","id":"4"},{"fullName":"商票","id":"5"}],
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
settlementTypeOptions:[{"fullName":"现金","id":"0"},{"fullName":"赊购","id":"1"},{"fullName":"网银","id":"2"},{"fullName":"银企直连","id":"3"},{"fullName":"银票","id":"4"},{"fullName":"商票","id":"5"}],
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"},{"fullName":"已付款","id":"3"}],
taxRateOptions:[{"fullName":"13","id":"0"},{"fullName":"9","id":"1"},{"fullName":"6","id":"2"},{"fullName":"5","id":"3"},{"fullName":"3","id":"4"},{"fullName":"0","id":"5"}],
@ -179,8 +207,10 @@
methods: {
dataInfo(dataAll){
let _dataAll =dataAll
_dataAll.voucher = _dataAll.voucher ? JSON.parse( _dataAll.voucher):[]
for(let i=0;i<_dataAll.collection_item0List.length;i++){
var _list = _dataAll.collection_item0List[i];
_list.creatorTime = _list.creatorTime ? jnpf.dateFormat(_list.creatorTime) : ''
}
this.dataForm = _dataAll
},

@ -2,39 +2,31 @@
<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="800px">
width="1000px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" >
<template v-if="!loading">
<el-col :span="8" >
<el-form-item label="单据编号"
<el-form-item label="单据编号"
prop="documentNo" >
<el-input v-model="dataForm.documentNo"
placeholder="请输入" clearable :style='{"width":"100%"}'>
placeholder="系统自动生成" readonly>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="业务日期"
prop="businessDate" >
<el-date-picker v-model="dataForm.businessDate"
placeholder="请选择" clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" >
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="客户名称"
<el-form-item label="客户名称"
prop="customerName" >
<el-input v-model="dataForm.customerName"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
<popupSelect v-model="dataForm.customerName"
placeholder="请选择" clearable field="customerName" interfaceId="393371066040385285" :columnOptions="customerNamecolumnOptions" propsValue="supplier_nm" relationField="supplier_nm" popupType="dialog"
popupTitle="选择数据" popupWidth="800px" @change="popupSelect"
>
</popupSelect>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="收款金额"
<el-form-item label="收款金额"
prop="amountCollected" >
<el-input v-model="dataForm.amountCollected"
placeholder="请输入" clearable :style='{"width":"100%"}'>
@ -43,17 +35,7 @@
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="收款类型 "
prop="paymentType" >
<el-select v-model="dataForm.paymentType"
placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in paymentTypeOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="收款账户"
<el-form-item label="收款账户"
prop="collectionCount" >
<el-input v-model="dataForm.collectionCount"
placeholder="请输入" clearable :style='{"width":"100%"}'>
@ -62,7 +44,7 @@
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="收款银行"
<el-form-item label="收款银行"
prop="collectionBank" >
<el-input v-model="dataForm.collectionBank"
placeholder="请输入" clearable :style='{"width":"100%"}'>
@ -71,17 +53,17 @@
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="结算类型"
prop="settlementType" >
<el-select v-model="dataForm.settlementType"
<el-form-item label="收款类型 "
prop="paymentType" >
<el-select v-model="dataForm.paymentType"
placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in settlementTypeOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
<el-option v-for="(item, index) in paymentTypeOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="币别 "
<el-form-item label="币别 "
prop="currency" >
<el-select v-model="dataForm.currency"
placeholder="请选择" clearable :style='{"width":"100%"}'>
@ -90,8 +72,18 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="备注信息"
<el-col :span="8" >
<el-form-item label="结算类型"
prop="settlementType" >
<el-select v-model="dataForm.settlementType"
placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in settlementTypeOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="备注信息"
prop="remark" >
<el-input v-model="dataForm.remark"
placeholder="请输入" clearable :style='{"width":"100%"}'>
@ -99,8 +91,17 @@
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="单据状态 "
<el-col :span="8" >
<el-form-item label="收款凭证"
prop="voucher" >
<JNPF-UploadFz v-model="dataForm.voucher"
:fileSize="5" sizeUnit="MB" :limit="9" buttonText="点击上传" >
</JNPF-UploadFz>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="单据状态 "
prop="status" >
<el-select v-model="dataForm.status"
placeholder="请选择" clearable :style='{"width":"100%"}'>
@ -109,8 +110,8 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="制单人"
<el-col :span="8" >
<el-form-item label="制单人"
prop="creatorUserName" >
<el-input v-model="dataForm.creatorUserName"
placeholder="请输入" clearable :style='{"width":"100%"}'>
@ -119,7 +120,7 @@
</el-form-item>
</el-col>
<el-col :span="24">
<el-tabs v-model="activeukycpv" tab-position="top" class="mb-20">
<el-tabs v-model="activeojnisi" tab-position="top" class="mb-20">
<el-tab-pane label="收款明细">
<el-col :span="24" >
<el-form-item label-width="0">
@ -128,49 +129,86 @@
</div>
<el-table :data="dataForm.collection_item0List" size='mini' >
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="amount" label="金额">
<el-table-column prop="amount" label="收款金额">
<template slot-scope="scope">
<el-input v-model="scope.row.amount"
placeholder="请输入" clearable :style='{"width":"100%"}'>
placeholder="请输入" clearable :style='{"width":"200%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="quantity" label="数量">
<el-table-column prop="creatorUserId" label="订单金额">
<template slot-scope="scope">
<el-input v-model="scope.row.quantity"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-input v-model="scope.row.price"
placeholder="请输入" clearable :style='{"width":"200%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="taxRate" label="税率">
<el-table-column prop="creatorUserName" label="已收款金额">
<template slot-scope="scope">
<el-select v-model="scope.row.taxRate"
placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in taxRateOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
</el-select>
<el-input v-model="scope.row.amountCollected"
placeholder="请输入" clearable :style='{"width":"200%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="taxAmount" label="税额">
<el-table-column prop="deleteTime" label="销售订单编号">
<template slot-scope="scope">
<el-input v-model="scope.row.taxAmount"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<popupSelect v-model="scope.row.documentNo"
placeholder="请选择" clearable :field="'deleteTime'+scope.$index" interfaceId="393372436705378053" :columnOptions="jg_collection_item0deleteTimecolumnOptions" propsValue="document_no" relationField="document_no" popupType="dialog"
popupWidth="800px" :bissId="dataForm.customerCode" @change="popupSelect2"
>
</popupSelect>
</template>
</el-table-column>
<el-table-column prop="lastModifyUserId" label="合同编号">
<template slot-scope="scope">
<el-input v-model="scope.row.contractCode"
placeholder="请输入" clearable :style='{"width":"200%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="amountNotTax" label="不含税金额">
<el-table-column prop="lastModifyUserName" label="重量">
<template slot-scope="scope">
<el-input v-model="scope.row.amountNotTax"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-input v-model="scope.row.num"
placeholder="请输入" clearable :style='{"width":"200%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="remark" label="备注">
<!-- <el-table-column prop="taxRate" label="税率">-->
<!-- <template slot-scope="scope">-->
<!-- <el-select v-model="scope.row.taxRate"-->
<!-- placeholder="请选择" clearable :style='{"width":"100%"}'>-->
<!-- <el-option v-for="(item, index) in taxRateOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>-->
<!-- </el-select>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column prop="lastModifyTime" label="垫资金额">
<template slot-scope="scope">
<el-input v-model="scope.row.remark"
placeholder="请输入" clearable :style='{"width":"100%"}'>
<el-input v-model="scope.row.advanceAmount"
placeholder="请输入" clearable :style='{"width":"200%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="deleteUserId" label="税额">
<template slot-scope="scope">
<el-input v-model="scope.row.rate"
placeholder="请输入" clearable :style='{"width":"200%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="deleteUserName" label="不含税金额">
<template slot-scope="scope">
<el-input v-model="scope.row.notPrice"
placeholder="请输入" clearable :style='{"width":"200%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="creatorTime" label="业务日期">
<template slot-scope="scope">
<el-date-picker v-model="scope.row.creatorTime"
placeholder="请选择" clearable :style='{"width":"200%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" >
</el-date-picker>
</template>
</el-table-column>
<el-table-column label="操作" width="50" >
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn" @click="delcollection_item0List(scope.$index)"></el-button>
@ -207,27 +245,33 @@
loading: false,
isDetail: false,
dataForm: {
customerCode : '',
documentNo : '',
businessDate : '',
customerName : '',
amountCollected : '',
paymentType : "0",
collectionCount : '',
collectionBank : '',
settlementType : "0",
paymentType : "0",
currency : "0",
settlementType : "0",
remark : '',
voucher : [],
status : "0",
creatorUserName : '',
collection_item0List:[],
},
activeukycpv:'0',
activeojnisi:'0',
rules:
{
},
customerNamecolumnOptions:[ {"label":"客户编码","value":"supplier_cd"}, {"label":"客户名称","value":"supplier_nm"}, {"label":"客户地点名称","value":"supplier_site_code"}, {"label":"客户等级","value":"customer_level"},],
jg_collection_item0deleteTimecolumnOptions:[ {"label":"销售订单ID","value":"id"},{"label":"销售订单编号","value":"document_no"}, {"label":"合同编号","value":"contract_code"},
{"label":"订单金额","value":"price"}, {"label":"已收款金额","value":"amount_collected"},
{"label":"重量","value":"num"}, {"label":"垫资金额","value":"advance_amount"},
{"label":"税额","value":"rate"}, {"label":"不含税金额","value":"not_price"}, {"label":"业务日期","value":"creator_time"},],
paymentTypeOptions:[{"fullName":"货款","id":"0"},{"fullName":"运费","id":"1"},{"fullName":"仓储","id":"2"}],
settlementTypeOptions:[{"fullName":"现金","id":"0"},{"fullName":"赊购","id":"1"},{"fullName":"网银","id":"2"},{"fullName":"银企直连","id":"3"},{"fullName":"银票","id":"4"},{"fullName":"商票","id":"5"}],
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
settlementTypeOptions:[{"fullName":"现金","id":"0"},{"fullName":"赊购","id":"1"},{"fullName":"网银","id":"2"},{"fullName":"银企直连","id":"3"},{"fullName":"银票","id":"4"},{"fullName":"商票","id":"5"}],
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"},{"fullName":"已付款","id":"3"}],
taxRateOptions:[{"fullName":"13","id":"0"},{"fullName":"9","id":"1"},{"fullName":"6","id":"2"},{"fullName":"5","id":"3"},{"fullName":"3","id":"4"},{"fullName":"0","id":"5"}],
@ -239,6 +283,24 @@
},
mounted() {},
methods: {
popupSelect(e,d){
this.dataForm.customerCode = d.id;
},
popupSelect2(a,b) {
for (let i = 0; i < this.dataForm.collection_item0List.length; i++) {
if (a == this.dataForm.collection_item0List[i].documentNo) {
this.dataForm.collection_item0List[i].id = b.id;
this.dataForm.collection_item0List[i].price = b.price;
this.dataForm.collection_item0List[i].amountCollected = b.amount_collected;
this.dataForm.collection_item0List[i].contractCode = b.contract_code;
this.dataForm.collection_item0List[i].num = b.num;
this.dataForm.collection_item0List[i].advanceAmount = b.advance_amount;
this.dataForm.collection_item0List[i].rate = b.rate;
this.dataForm.collection_item0List[i].notPrice = b.not_price;
this.dataForm.collection_item0List[i].creatorTime = b.creator_time;
}
}
},
collection_item0Exist() {
let isOk = true;
for(let i=0;i<this.dataForm.collection_item0List.length;i++){
@ -326,11 +388,16 @@
addcollection_item0List(){
let item = {
amount:undefined,
quantity:undefined,
creatorUserId:undefined,
creatorUserName:undefined,
deleteTime:undefined,
lastModifyUserId:undefined,
lastModifyUserName:undefined,
taxRate:undefined,
taxAmount:undefined,
amountNotTax:undefined,
remark:undefined,
lastModifyTime:undefined,
deleteUserId:undefined,
deleteUserName:undefined,
creatorTime:undefined,
}
this.dataForm.collection_item0List.push(item)
},
@ -339,6 +406,7 @@
},
dataList(){
var _data = JSON.parse(JSON.stringify(this.dataForm));
_data.voucher = JSON.stringify(_data.voucher)
for(let i=0;i<_data.collection_item0List.length;i++){
var _list = _data.collection_item0List[i];
}
@ -346,6 +414,7 @@
},
dataInfo(dataAll){
let _dataAll =dataAll
_dataAll.voucher = JSON.parse( _dataAll.voucher)
for(let i=0;i<_dataAll.collection_item0List.length;i++){
var _list = _dataAll.collection_item0List[i];
}

@ -26,6 +26,8 @@
</el-button>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()" >批量删除
</el-button>
<el-button type="primary" icon="el-icon-plus" @click="confirmprice()">
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
@ -36,8 +38,6 @@
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange">
<el-table-column prop="businessDate" label="业务日期" width="0" align="left"
/>
<el-table-column prop="documentNo" label="单据编号" width="0" align="left"
/>
<el-table-column prop="customerName" label="客户名称" width="0" align="left"
@ -82,7 +82,7 @@ width="150" >
</el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button>
<el-button type="text"
<el-button type="text"
@click="goDetail(scope.row.id)">详情
</el-button>
</template>
@ -130,7 +130,6 @@ width="150" >
formVisible: false,
exportBoxVisible: false,
columnList: [
{prop: 'businessDate', label: '业务日期'},
{prop: 'documentNo', label: '单据编号'},
{prop: 'customerName', label: '客户名称'},
{prop: 'currency', label: '币别 '},
@ -144,10 +143,10 @@ width="150" >
],
paymentTypeOptions:[{"fullName":"货款","id":"0"},{"fullName":"运费","id":"1"},{"fullName":"仓储","id":"2"}],
paymentTypeProps:{"label":"fullName","value":"id"},
settlementTypeOptions:[{"fullName":"现金","id":"0"},{"fullName":"赊购","id":"1"},{"fullName":"网银","id":"2"},{"fullName":"银企直连","id":"3"},{"fullName":"银票","id":"4"},{"fullName":"商票","id":"5"}],
settlementTypeProps:{"label":"fullName","value":"id"},
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
currencyProps:{"label":"fullName","value":"id"},
settlementTypeOptions:[{"fullName":"现金","id":"0"},{"fullName":"赊购","id":"1"},{"fullName":"网银","id":"2"},{"fullName":"银企直连","id":"3"},{"fullName":"银票","id":"4"},{"fullName":"商票","id":"5"}],
settlementTypeProps:{"label":"fullName","value":"id"},
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"},{"fullName":"已付款","id":"3"}],
statusProps:{"label":"fullName","value":"id"},
}
@ -246,6 +245,35 @@ width="150" >
}).catch(() => {
})
},
confirmprice(){
if (!this.multipleSelection.length) {
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 1500,
})
return
}
let id = this.multipleSelection.join()
let param = {};
param = this.list.find(function(param) {
debugger
return param.id == id;
})
request({
url: `/api/collection/Collection/confirmprice`,
method: 'POST',
data: param
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
},
addOrUpdateHandle(id, isDetail) {
this.formVisible = true
this.$nextTick(() => {

@ -150,7 +150,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="金额" prop="amount">
<el-input-number v-model="dataForm.amount" :min="0" label="请输入" :style='{"width":"100%"}'></el-input-number>
<el-input v-model="dataForm.amount" placeholder="请输入" clearable :style='{"width":"100%"}'></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
@ -215,13 +215,13 @@
</el-form-item>
</el-col>
-->
<el-col :span="24">
<el-form-item label="集团审批" prop="approval">
<el-switch v-model="dataForm.approval" :active-value="1" :inactive-value="0">
<!-- <el-col :span="24">-->
<!-- <el-form-item label="集团审批" prop="approval">-->
<!-- <el-switch v-model="dataForm.approval" :active-value="1" :inactive-value="0">-->
</el-switch>
</el-form-item>
</el-col>
<!-- </el-switch>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="24">
<el-tabs v-model="activemdfrsi" tab-position="top" class="mb-20">
<el-tab-pane label="物料明细">
@ -267,27 +267,29 @@
</el-table-column>
<el-table-column prop="price" label="单价" align="center">
<template slot-scope="scope">
<el-input-number v-model="scope.row.price" :min="0" label="请输入" :style='{"width":"100%"}'></el-input-number>
<el-input v-model="scope.row.price" placeholder="请输入" clearable :style='{"width":"100%"}'></el-input>
</template>
</el-table-column>
<el-table-column prop="amount" label="金额" align="center">
<template slot-scope="scope">
<el-input-number v-model="scope.row.amount" :min="0" label="请输入" :style='{"width":"100%"}'></el-input-number>
<el-input v-model="scope.row.amount" placeholder="请输入" clearable :style='{"width":"100%"}'></el-input>
</template>
</el-table-column>
<el-table-column prop="rate" label="税率 " align="center">
<template slot-scope="scope">
<el-input-number v-model="scope.row.rate" :min="0" label="请输入" :style='{"width":"100%"}'></el-input-number>
<el-select v-model="scope.row.rate" :min="0" label="请输入" :style='{"width":"100%"}'>
<el-option v-for="(item, index) in rateOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="notPrice" label="不含税单价" align="center">
<template slot-scope="scope">
<el-input-number v-model="scope.row.notPrice" :min="0" label="请输入" :style='{"width":"100%"}'></el-input-number>
<el-input v-model="scope.row.notPrice" placeholder="请输入" clearable :style='{"width":"100%"}'></el-input>
</template>
</el-table-column>
<el-table-column prop="notAmount" label="不含税金额" align="center">
<template slot-scope="scope">
<el-input-number v-model="scope.row.notAmount" :min="0" label="请输入" :style='{"width":"100%"}'></el-input-number>
<el-input v-model="scope.row.notAmount" placeholder="请输入" clearable :style='{"width":"100%"}'></el-input>
</template>
</el-table-column>
<el-table-column prop="remark" label="备注" align="center">
@ -448,7 +450,13 @@
"id": "6"
}
],
rateOptions:[
{"fullName":"13","id":"0"},
{"fullName":"9","id":"1"},
{"fullName":"6","id":"2"},
{"fullName":"5","id":"3"},
{"fullName":"3","id":"4"},
{"fullName":"0","id":"5"}],
}
},
computed: {},

@ -25,12 +25,14 @@
<div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head">
<div>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">
</el-button>
<!-- <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">-->
<!-- </el-button>-->
<!-- <el-button type="text" icon="=el-icon-detail" @click="goDetail(scope.row.id)">-->
<!-- </el-button>-->
<el-button type="text" icon="el-icon-download" @click="exportData()">
</el-button>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">
</el-button>
<!-- <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">-->
<!-- </el-button>-->
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
@ -59,14 +61,26 @@
<el-table-column prop="remark" label="备注" width="0" align="left" />
<el-table-column prop="creatorusername" label="录入人" width="0" align="left" />
<el-table-column prop="status" label="合同状态" width="0" align="left" />
<el-table-column prop="approval" label="集团审批" width="0" align="left" />
<el-table-column prop="approval" label="集团审批" width="0" align="left" >
<template slot-scope="scope">
<el-tag type="danger" disable-transitions v-if="scope.row.approval == '关'">
</el-tag>
<el-tag type="success" disable-transitions v-else></el-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="150">
<template slot-scope="scope">
<el-button type="text" @click="addOrUpdateHandle(scope.row.id)">
</el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button>
<el-button type="text" @click="goDetail(scope.row.id)">
<el-button type="text" @click="exportData()">
</el-button>
<!-- <el-button type="text" @click="addOrUpdateHandle(scope.row.id)">-->
<!-- </el-button>-->
<!-- <el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">-->
<!-- </el-button>-->
<el-button type="text" @click="goDetail(scope.row.id)">
</el-button>
</template>
</el-table-column>

@ -19,15 +19,15 @@
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="所属公司ID"
<el-form-item label="公司名称"
prop="orgId" >
<p>{{dataForm.orgId}}</p>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="公司代码"
prop="orgName" >
<p>{{dataForm.orgName}}</p>
<el-form-item label="联系人"
prop="contactName" >
<p>{{dataForm.contactName}}</p>
</el-form-item>
</el-col>
<el-col :span="12" >
@ -37,9 +37,9 @@
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="联系人"
prop="contactName" >
<p>{{dataForm.contactName}}</p>
<el-form-item label="电话"
prop="contactPhone" >
<p>{{dataForm.contactPhone}}</p>
</el-form-item>
</el-col>
<el-col :span="12" >
@ -48,12 +48,6 @@
<p>{{dataForm.address}}</p>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="电话"
prop="contactPhone" >
<p>{{dataForm.contactPhone}}</p>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="是否启用"
prop="status" >
@ -85,12 +79,11 @@
id :'',
supplierCd : '',
supplierNm : '',
orgId : '',
orgName : '',
customerLevel : "1",
orgId : [],
contactName : '',
address : '',
customerLevel : "1",
contactPhone : '',
address : '',
status : 1,
},
customerLevelOptions:[{"fullName":"一级","id":"1"},{"fullName":"二级","id":"2"},{"fullName":"三级","id":"3"}],

@ -1,235 +1,233 @@
<template>
<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="1000px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px"
label-position="right">
<template v-if="!loading">
<el-col :span="12">
<el-form-item label="客户编码" prop="supplierCd">
<el-input v-model="dataForm.supplierCd" placeholder="请输入客户编码" clearable
:style='{"width":"100%"}'>
<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="600px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" >
<template v-if="!loading">
<el-col :span="12" >
<el-form-item label="客户编码"
prop="supplierCd" >
<el-input v-model="dataForm.supplierCd"
placeholder="请输入客户编码" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="客户名称" prop="supplierNm">
<el-input v-model="dataForm.supplierNm" placeholder="请输入客户名称" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="客户名称"
prop="supplierNm" >
<el-input v-model="dataForm.supplierNm"
placeholder="请输入客户名称" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="所属公司ID" prop="orgId">
<el-input v-model="dataForm.orgId" placeholder="请输入所属公司ID" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="公司名称"
prop="orgId" >
<com-select v-model="dataForm.orgId"
placeholder="请选择" clearable >
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="公司代码" prop="orgName">
<el-input v-model="dataForm.orgName" placeholder="请输入公司代码" clearable
:style='{"width":"100%"}'>
</com-select>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="联系人"
prop="contactName" >
<el-input v-model="dataForm.contactName"
placeholder="请输入联系人" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="客户等级" prop="customerLevel">
<el-select v-model="dataForm.customerLevel" placeholder="请选择客户等级" :style='{"width":"100%"}'>
<el-option v-for="(item, index) in customerLevelOptions" :key="index"
:label="item.fullName" :value="item.id" :disabled="item.disabled"></el-option>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="客户等级"
prop="customerLevel" >
<el-select v-model="dataForm.customerLevel"
placeholder="请选择客户等级" :style='{"width":"100%"}'>
<el-option v-for="(item, index) in customerLevelOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系人" prop="contactName">
<el-input v-model="dataForm.contactName" placeholder="请输入联系人" clearable
:style='{"width":"100%"}'>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="电话"
prop="contactPhone" >
<el-input v-model="dataForm.contactPhone"
placeholder="请输入电话" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="地址" prop="address">
<el-input v-model="dataForm.address" placeholder="请输入地址" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="地址"
prop="address" >
<el-input v-model="dataForm.address"
placeholder="请输入地址" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="电话" prop="contactPhone">
<el-input v-model="dataForm.contactPhone" placeholder="请输入电话" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="是否启用"
prop="status" >
<el-switch v-model="dataForm.status"
:active-value="1" :inactive-value="0" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否启用" prop="status">
<el-switch v-model="dataForm.status" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
</el-col>
</template>
</el-form>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button>
<el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail"> </el-button>
</span>
</el-dialog>
</el-switch>
</el-form-item>
</el-col>
</template>
</el-form>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button>
<el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail"> </el-button>
</span>
</el-dialog>
</template>
<script>
import request from '@/utils/request'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
export default {
components: {},
props: [],
data() {
return {
visible: false,
loading: false,
isDetail: false,
dataForm: {
supplierCd: '',
supplierNm: '',
orgId: '',
orgName: '',
customerLevel: "1",
contactName: '',
address: '',
contactPhone: '',
status: 1,
},
rules: {
supplierCd: [{
required: true,
message: '请输入客户编码',
trigger: 'blur'
}, ],
supplierNm: [{
required: true,
message: '请输入客户名称',
trigger: 'blur'
}, ],
contactPhone: [],
},
customerLevelOptions: [{
"fullName": "一级",
"id": "1"
}, {
"fullName": "二级",
"id": "2"
}, {
"fullName": "三级",
"id": "3"
}],
import request from '@/utils/request'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
export default {
components: {},
props: [],
data() {
return {
visible: false,
loading: false,
isDetail: false,
dataForm: {
supplierCd : '',
supplierNm : '',
orgId : [],
contactName : '',
customerLevel : "1",
contactPhone : '',
address : '',
status : 1,
},
rules:
{
supplierCd: [
{
required: true,
message: '请输入客户编码',
trigger: 'blur'
},
],
supplierNm: [
{
required: true,
message: '请输入客户名称',
trigger: 'blur'
},
],
contactPhone: [
],
},
customerLevelOptions:[{"fullName":"一级","id":"1"},{"fullName":"二级","id":"2"},{"fullName":"三级","id":"3"}],
}
},
computed: {},
watch: {},
created() {
},
mounted() {},
methods: {
clearData(data){
for (let key in data) {
if (data[key] instanceof Array) {
data[key] = [];
} else if (data[key] instanceof Object) {
this.clearData(data[key]);
} else {
data[key] = "";
}
}
},
init(id, isDetail) {
this.dataForm.id = id || 0;
this.visible = true;
this.isDetail = isDetail || false;
this.$nextTick(() => {
this.$refs['elForm'].resetFields();
if(this.dataForm.id){
this.loading = true
request({
url: '/api/customer/Customer/'+this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.loading = false
});
}else{
this.clearData(this.dataForm)
}
});
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
},
//
dataFormSubmit() {
this.$refs['elForm'].validate((valid) => {
if (valid) {
this.request()
}
})
},
request() {
var _data =this.dataList()
if (!this.dataForm.id) {
request({
url: '/api/customer/Customer',
method: 'post',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
this.visible = false
this.$emit('refresh', true)
}
})
})
}else{
request({
url: '/api/customer/Customer/'+this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
this.visible = false
this.$emit('refresh', true)
}
})
})
}
},
dataList(){
var _data = JSON.parse(JSON.stringify(this.dataForm));
_data.orgId = JSON.stringify(_data.orgId)
_data.status = parseInt(_data.status)
return _data;
},
dataInfo(dataAll){
let _dataAll =dataAll
_dataAll.orgId = JSON.parse( _dataAll.orgId)
_dataAll.status = parseInt( _dataAll.status)
this.dataForm = _dataAll
},
},
}
}
},
computed: {},
watch: {},
created() {},
mounted() {},
methods: {
clearData(data) {
for (let key in data) {
if (data[key] instanceof Array) {
data[key] = [];
} else if (data[key] instanceof Object) {
this.clearData(data[key]);
} else {
data[key] = "";
}
}
},
init(id, isDetail) {
this.dataForm.id = id || 0;
this.visible = true;
this.isDetail = isDetail || false;
this.$nextTick(() => {
this.$refs['elForm'].resetFields();
if (this.dataForm.id) {
this.loading = true
request({
url: '/api/customer/Customer/' + this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.loading = false
});
} else {
this.clearData(this.dataForm)
}
});
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
},
//
dataFormSubmit() {
this.$refs['elForm'].validate((valid) => {
if (valid) {
this.request()
}
})
},
request() {
var _data = this.dataList()
if (!this.dataForm.id) {
request({
url: '/api/customer/Customer',
method: 'post',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
this.visible = false
this.$emit('refresh', true)
}
})
})
} else {
request({
url: '/api/customer/Customer/' + this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
this.visible = false
this.$emit('refresh', true)
}
})
})
}
},
dataList() {
var _data = JSON.parse(JSON.stringify(this.dataForm));
_data.status = parseInt(_data.status)
return _data;
},
dataInfo(dataAll) {
let _dataAll = dataAll
_dataAll.status = parseInt(_dataAll.status)
this.dataForm = _dataAll
},
},
}
</script>

@ -1,321 +1,279 @@
<template>
<div class="JNPF-common-layout">
<div class="JNPF-common-layout">
<div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<el-col :span="6">
<el-form-item label="客户编码">
<el-input v-model="query.supplierCd" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="客户名称">
<el-input v-model="query.supplierNm" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
</el-form-item>
</el-col>
</el-form>
</el-row>
<div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head">
<div>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">
</el-button>
<el-button type="text" icon="el-icon-download" @click="exportData()">
</el-button>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="reset()" />
</el-tooltip>
<screenfull isContainer />
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c
@selection-change="handleSelectionChange">
<el-table-column prop="supplierCd" label="客户编码" width="0" align="left" sortable="custom" />
<el-table-column prop="supplierNm" label="客户名称" width="0" align="left" sortable="custom" />
<el-table-column prop="orgId" label="所属公司ID" width="0" align="left" sortable="custom" />
<el-table-column prop="orgName" label="公司代码" width="0" align="left" sortable="custom" />
<el-table-column label="客户等级" width="0" prop="customerLevel" algin="left" sortable="custom">
<template slot-scope="scope">
{{ scope.row.customerLevel | dynamicText(customerLevelOptions) }}
</template>
</el-table-column>
<el-table-column prop="contactName" label="联系人" width="0" align="left" sortable="custom" />
<el-table-column prop="address" label="地址" width="0" align="left" sortable="custom" />
<el-table-column prop="contactPhone" label="电话" width="0" align="left" sortable="custom" />
<el-table-column prop="status" label="是否启用" width="0" align="left" />
<el-table-column label="操作" fixed="right" width="150">
<template slot-scope="scope">
<el-button type="text" @click="addOrUpdateHandle(scope.row.id)">
</el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button>
<el-button type="text" @click="goDetail(scope.row.id)">
</el-button>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" />
</div>
</div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
</div>
<div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<el-col :span="6">
<el-form-item label="客户编码">
<el-input v-model="query.supplierCd" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="客户名称">
<el-input v-model="query.supplierNm" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
</el-form-item>
</el-col>
</el-form>
</el-row>
<div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head">
<div>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">
</el-button>
<el-button type="text" icon="el-icon-download" @click="exportData()" >导出
</el-button>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()" >批量删除
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="reset()"/>
</el-tooltip>
<screenfull isContainer/>
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange">
<el-table-column prop="supplierCd" label="客户编码" width="0" align="left"
sortable="custom" />
<el-table-column prop="supplierNm" label="客户名称" width="0" align="left"
sortable="custom" />
<el-table-column prop="orgId" label="公司名称" width="0" align="left"
sortable="custom" />
<el-table-column label="客户等级" width="0" prop="customerLevel" algin="left"
sortable="custom" >
<template slot-scope="scope">
{{ scope.row.customerLevel | dynamicText(customerLevelOptions) }}
</template>
</el-table-column>
<el-table-column prop="contactName" label="联系人" width="0" align="left"
sortable="custom" />
<el-table-column prop="contactPhone" label="电话" width="0" align="left"
sortable="custom" />
<el-table-column prop="address" label="地址" width="0" align="left"
sortable="custom" />
<el-table-column prop="status" label="是否启用" width="0" align="left" sortable="custom" >
<template slot-scope="scope">
<el-tag type="success" disable-transitions v-if="scope.row.status == '1'">
</el-tag>
<el-tag type="danger" disable-transitions v-else></el-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right"
width="150" >
<template slot-scope="scope">
<el-button type="text"
@click="addOrUpdateHandle(scope.row.id)" >编辑
</el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button>
<el-button type="text"
@click="goDetail(scope.row.id)">详情
</el-button>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/>
</div>
</div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/>
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
</div>
</template>
<script>
import request from '@/utils/request'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
import JNPFForm from './Form'
import ExportBox from './ExportBox'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import Detail from './Detail'
import request from '@/utils/request'
import {getDictionaryDataSelector} from '@/api/systemData/dictionary'
import JNPFForm from './Form'
import ExportBox from './ExportBox'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface'
import Detail from './Detail'
export default {
components: {
JNPFForm,
ExportBox,
Detail
},
data() {
return {
detailVisible: false,
query: {
supplierCd: undefined,
supplierNm: undefined,
},
treeProps: {
children: 'children',
label: 'fullName',
value: 'id'
},
list: [],
listLoading: true,
multipleSelection: [],
total: 0,
listQuery: {
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "supplierCd",
},
formVisible: false,
exportBoxVisible: false,
columnList: [{
prop: 'supplierCd',
label: '客户编码'
},
{
prop: 'supplierNm',
label: '客户名称'
},
{
prop: 'orgId',
label: '所属公司ID'
},
{
prop: 'orgName',
label: '公司代码'
},
{
prop: 'customerLevel',
label: '客户等级'
},
{
prop: 'contactName',
label: '联系人'
},
{
prop: 'address',
label: '地址'
},
{
prop: 'contactPhone',
label: '电话'
},
{
prop: 'status',
label: '是否启用'
},
],
customerLevelOptions: [{
"fullName": "一级",
"id": "1"
}, {
"fullName": "二级",
"id": "2"
}, {
"fullName": "三级",
"id": "3"
}],
customerLevelProps: {
"label": "fullName",
"value": "id"
},
}
},
computed: {
menuId() {
return this.$route.meta.modelId || ''
}
},
created() {
this.initData()
},
methods: {
goDetail(id) {
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(id)
})
},
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/customer/Customer/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
export default {
components: {JNPFForm, ExportBox,Detail},
data() {
return {
detailVisible: false,
query: {
supplierCd:undefined,
supplierNm:undefined,
},
treeProps: {
children: 'children',
label: 'fullName',
value: 'id'
},
list: [],
listLoading: true,
multipleSelection: [], total: 0,
listQuery: {
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "supplierCd",
},
formVisible: false,
exportBoxVisible: false,
columnList: [
{prop: 'supplierCd', label: '客户编码'},
{prop: 'supplierNm', label: '客户名称'},
{prop: 'orgId', label: '公司名称'},
{prop: 'customerLevel', label: '客户等级'},
{prop: 'contactName', label: '联系人'},
{prop: 'contactPhone', label: '电话'},
{prop: 'address', label: '地址'},
{prop: 'status', label: '是否启用'},
],
customerLevelOptions:[{"fullName":"一级","id":"1"},{"fullName":"二级","id":"2"},{"fullName":"三级","id":"3"}],
customerLevelProps:{"label":"fullName","value":"id"},
}
},
computed: {
menuId() {
return this.$route.meta.modelId || ''
}
},
created() {
this.initData()
},
methods: {
goDetail(id){
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(id)
})
},
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/customer/Customer/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/customer/Customer/${id}`,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
}).catch(() => {});
},
handleSelectionChange(val) {
const res = val.map(item => item.id)
this.multipleSelection = res
},
handleBatchRemoveDel() {
if (!this.multipleSelection.length) {
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 1500,
})
return
}
const ids = this.multipleSelection.join()
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
request({
url: `/api/customer/Customer/batchRemove/${ids}`,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
}).catch(() => {})
},
addOrUpdateHandle(id, isDetail) {
this.formVisible = true
this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail)
})
},
exportData() {
this.exportBoxVisible = true
this.$nextTick(() => {
this.$refs.ExportBox.init(this.columnList)
})
},
download(data) {
let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId
}
request({
url: `/api/customer/Customer/Actions/Export`,
method: 'GET',
data: query
}).then(res => {
if (!res.data.url) return
this.jnpf.downloadFile(res.data.url)
this.$refs.ExportBox.visible = false
this.exportBoxVisible = false
})
},
search() {
this.listQuery = {
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "supplierCd",
}
this.initData()
},
refresh(isrRefresh) {
this.formVisible = false
if (isrRefresh) this.reset()
},
reset() {
for (let key in this.query) {
this.query[key] = undefined
}
this.search()
}
}
}
this.listLoading = false
})
},
handleDel(id) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
request({
url: `/api/customer/Customer/${id}`,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
}).catch(() => {
});
},
handleSelectionChange(val) {
const res = val.map(item => item.id)
this.multipleSelection = res
},
handleBatchRemoveDel() {
if (!this.multipleSelection.length) {
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 1500,
})
return
}
const ids = this.multipleSelection.join()
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
request({
url: `/api/customer/Customer/batchRemove/${ids}`,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
}).catch(() => {
})
},
addOrUpdateHandle(id, isDetail) {
this.formVisible = true
this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail)
})
},
exportData() {
this.exportBoxVisible = true
this.$nextTick(() => {
this.$refs.ExportBox.init(this.columnList)
})
},
download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId}
request({
url: `/api/customer/Customer/Actions/Export`,
method: 'GET',
data: query
}).then(res => {
if (!res.data.url) return
this.jnpf.downloadFile(res.data.url)
this.$refs.ExportBox.visible = false
this.exportBoxVisible = false
})
},
search() {
this.listQuery = {
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "supplierCd",
}
this.initData()
},
refresh(isrRefresh) {
this.formVisible = false
if (isrRefresh) this.reset()
},
reset() {
for (let key in this.query) {
this.query[key] = undefined
}
this.search()
}
}
}
</script>

@ -82,7 +82,7 @@
</popupSelect>
</el-form-item>
</el-col>
<el-col :span="12">
<!-- <el-col :span="12">
<el-form-item label="创建人名称" prop="creatorusername">
<el-input v-model="dataForm.creatorusername" placeholder="请输入" clearable
:style='{"width":"100%"}'>
@ -144,8 +144,8 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
</el-col>-->
<!-- <el-col :span="12">
<el-form-item label="读取时间" prop="readDate">
<el-date-picker v-model="dataForm.readDate" placeholder="请选择" clearable
:style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss"
@ -161,7 +161,7 @@
</el-input>
</el-form-item>
</el-col>
</el-col>-->
</template>
</el-form>
</el-row>

@ -2,70 +2,171 @@
<el-dialog title="详情"
:close-on-click-modal="false" append-to-body
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
width="600px">
width="1000px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" >
<template v-if="!loading">
<el-col :span="12" >
<el-form-item label="业务日期"
prop="businessdate" >
<p>{{jnpf.dateFormat(dataForm.businessdate)}}</p>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-col :span="8" >
<el-form-item label="单据编号"
prop="documentno" >
<p>{{dataForm.documentno}}</p>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="客户"
<el-col :span="8" >
<el-form-item label="供应商"
prop="suppliername" >
<p>{{dataForm.suppliername}}</p>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="币别"
prop="currency" >
<p>{{ dataForm.currency | dynamicText(currencyOptions) }} </p>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="付款金额"
prop="paymentamount" >
<p>{{dataForm.paymentamount}}</p>
<el-col :span="8" >
<el-form-item label="付款类型"
prop="paymenttype" >
<p>{{ dataForm.paymenttype | dynamicText(paymenttypeOptions) }} </p>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-col :span="8" >
<el-form-item label="付款账户"
prop="paymentaccount" >
<p>{{dataForm.paymentaccount}}</p>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-col :span="8" >
<el-form-item label="付款银行"
prop="paymentbank" >
<p>{{dataForm.paymentbank}}</p>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="付款类型"
prop="paymenttype" >
<p>{{ dataForm.paymenttype | dynamicText(paymenttypeOptions) }} </p>
<el-col :span="8" >
<el-form-item label="付款金额"
prop="paymentamount" >
<p>{{dataForm.paymentamount}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="收款账户"
prop="collectionaccount" >
<p>{{dataForm.collectionaccount}}</p>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-col :span="8" >
<el-form-item label="收款银行"
prop="collectionbank" >
<p>{{dataForm.collectionbank}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="申请金额"
prop="requestedamount" >
<p>{{dataForm.requestedamount}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="应付日期"
prop="duedate" >
<p>{{jnpf.dateFormat(dataForm.duedate)}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="币别 "
prop="currency" >
<p>{{ dataForm.currency | dynamicText(currencyOptions) }} </p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="结算类型"
prop="settlementtype" >
<p>{{ dataForm.settlementtype | dynamicText(settlementtypeOptions) }} </p>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-col :span="8" >
<el-form-item label="来源单号"
prop="paymentno" >
<p>{{dataForm.paymentno}}</p>
</el-form-item>
</el-col>
<el-col :span="16" >
<el-form-item label="备注"
prop="remark" >
<p>{{dataForm.remark}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="单据状态"
prop="status" >
<p>{{ dataForm.status | dynamicText(statusOptions) }} </p>
</el-form-item>
</el-col>
<el-col :span="24">
<el-tabs v-model="activeivpzpd" tab-position="top" class="mb-20">
<el-tab-pane label="Tab 1">
<el-col :span="24" >
<el-form-item label-width="0">
<div class="JNPF-common-title">
<h2></h2>
</div>
<el-table :data="dataForm.payment_item0List" size='mini' >
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="amount" label="付款金额">
<template slot-scope="scope">
<p>{{scope.row.amount}}</p>
</template>
</el-table-column>
<el-table-column prop="creatorUserId" label="申请金额">
<template slot-scope="scope">
<p>{{scope.row.creatorUserId}}</p>
</template>
</el-table-column>
<el-table-column prop="creatorUserName" label="订单金额">
<template slot-scope="scope">
<p>{{scope.row.creatorUserName}}</p>
</template>
</el-table-column>
<el-table-column prop="lastModifyUserId" label="已付金额">
<template slot-scope="scope">
<p>{{scope.row.lastModifyUserId}}</p>
</template>
</el-table-column>
<el-table-column prop="lastModifyUserName" label="订单编号">
<template slot-scope="scope">
<p>{{scope.row.lastModifyUserName}}</p>
</template>
</el-table-column>
<el-table-column prop="lastModifyTime" label="合同编码">
<template slot-scope="scope">
<p>{{scope.row.lastModifyTime}}</p>
</template>
</el-table-column>
<el-table-column prop="deleteUserId" label="重量">
<template slot-scope="scope">
<p>{{scope.row.deleteUserId}}</p>
</template>
</el-table-column>
<el-table-column prop="deleteTime" label="垫资金额">
<template slot-scope="scope">
<p>{{scope.row.deleteTime}}</p>
</template>
</el-table-column>
<el-table-column prop="orgnizeId" label="税额">
<template slot-scope="scope">
<p>{{scope.row.orgnizeId}}</p>
</template>
</el-table-column>
<el-table-column prop="departmentId" label="不含税金额">
<template slot-scope="scope">
<p>{{scope.row.departmentId}}</p>
</template>
</el-table-column>
<el-table-column prop="creatorTime" label="业务日期">
<template slot-scope="scope">
<p>{{jnpf.dateFormat(scope.row.creatorTime)}}</p>
</template>
</el-table-column>
</el-table>
</el-form-item>
</el-col>
</el-tab-pane >
</el-tabs>
</el-col>
</template>
</el-form>
</el-row>
@ -89,27 +190,26 @@
printId: '',
dataForm: {
id :'',
businessdate : '',
documentno : '',
suppliername : '',
currency : "0",
paymentamount : '',
paymenttype : "0",
paymentaccount : '',
paymentbank : '',
paymenttype : "",
settlementtype : "",
status : "",
creatorUserId : "",
creatorUserName : "",
creatorTime : "",
lastModifyUserId : "",
lastModifyUserName : "",
lastModifyTime : "",
departmentId : "",
orgnizeId : "",
paymentamount : '',
collectionaccount : '',
collectionbank : '',
requestedamount : '',
duedate : '',
currency : "0",
settlementtype : "0",
paymentno : '',
remark : '',
status : "0",
payment_item0List:[],
},
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
activeivpzpd:'0',
paymenttypeOptions:[{"fullName":"贷款","id":"0"},{"fullName":"运费","id":"1"},{"fullName":"仓储","id":"2"}],
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
settlementtypeOptions:[{"fullName":"现金","id":"0"},{"fullName":"赊购","id":"1"},{"fullName":"网银","id":"2"},{"fullName":"银企直连","id":"3"},{"fullName":"银票","id":"4"},{"fullName":"商票","id":"5"}],
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"},{"fullName":"已付款","id":"3"}],
@ -124,6 +224,10 @@
methods: {
dataInfo(dataAll){
let _dataAll =dataAll
for(let i=0;i<_dataAll.payment_item0List.length;i++){
var _list = _dataAll.payment_item0List[i];
_list.creatorTime = _list.creatorTime ? jnpf.dateFormat(_list.creatorTime) : ''
}
this.dataForm = _dataAll
},
@ -134,7 +238,7 @@
if(this.dataForm.id){
this.loading = true
request({
url: '/api/example/Payment/detail/'+this.dataForm.id,
url: '/api/payment/Payment/detail/'+this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)

@ -2,49 +2,58 @@
<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="600px">
width="1000px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" >
<template v-if="!loading">
<el-col :span="12" >
<el-form-item label="业务日期"
prop="businessdate" >
<el-date-picker v-model="dataForm.businessdate"
placeholder="请选择" clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" >
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="单据编号"
<el-col :span="8" >
<el-form-item label="单据编号"
prop="documentno" >
<el-input v-model="dataForm.documentno"
placeholder="请输入" clearable :style='{"width":"100%"}'>
placeholder="系统自动生成" readonly >
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="客户"
<el-col :span="8" >
<el-form-item label="供应商"
prop="suppliername" >
<el-input v-model="dataForm.suppliername"
placeholder="请输入" clearable :style='{"width":"100%"}'>
placeholder="请输入付款账户" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="币别"
prop="currency" >
<el-select v-model="dataForm.currency"
placeholder="请选择" :style='{"width":"100%"}'>
<el-option v-for="(item, index) in currencyOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
<el-col :span="8" >
<el-form-item label="付款类型"
prop="paymenttype" >
<el-select v-model="dataForm.paymenttype"
placeholder="请选择付款类型" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in paymenttypeOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="付款金额"
<el-col :span="8" >
<el-form-item label="付款账户"
prop="paymentaccount" >
<el-input v-model="dataForm.paymentaccount"
placeholder="请输入付款账户" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="付款银行"
prop="paymentbank" >
<el-input v-model="dataForm.paymentbank"
placeholder="请输入付款银行" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="付款金额"
prop="paymentamount" >
<el-input v-model="dataForm.paymentamount"
placeholder="请输入付款金额" clearable :style='{"width":"100%"}'>
@ -52,36 +61,54 @@
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="付款账户"
prop="paymentaccount" >
<el-input v-model="dataForm.paymentaccount"
placeholder="请输入付款账户" clearable :style='{"width":"100%"}'>
<el-col :span="8" >
<el-form-item label="收款账户"
prop="collectionaccount" >
<el-input v-model="dataForm.collectionaccount"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="付款银行"
prop="paymentbank" >
<el-input v-model="dataForm.paymentbank"
placeholder="请输入付款银行" clearable :style='{"width":"100%"}'>
<el-col :span="8" >
<el-form-item label="收款银行"
prop="collectionbank" >
<el-input v-model="dataForm.collectionbank"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="付款类型"
prop="paymenttype" >
<el-select v-model="dataForm.paymenttype"
placeholder="请选择付款类型" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in paymenttypeOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
<el-col :span="8" >
<el-form-item label="申请金额"
prop="requestedamount" >
<el-input v-model="dataForm.requestedamount"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="应付日期"
prop="duedate" >
<el-date-picker v-model="dataForm.duedate"
placeholder="请选择" clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" >
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="币别 "
prop="currency" >
<el-select v-model="dataForm.currency"
placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in currencyOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="结算类型"
<el-col :span="8" >
<el-form-item label="结算类型"
prop="settlementtype" >
<el-select v-model="dataForm.settlementtype"
placeholder="请选择" clearable :style='{"width":"100%"}'>
@ -90,16 +117,135 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="单据状态"
<el-col :span="8" >
<el-form-item label="来源单号"
prop="paymentno" >
<el-input v-model="dataForm.paymentno"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="16" >
<el-form-item label="备注"
prop="remark" >
<el-input v-model="dataForm.remark"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="单据状态"
prop="status" >
<el-select v-model="dataForm.status"
placeholder="请选择单据状态" clearable :style='{"width":"100%"}'>
placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<el-tabs v-model="activeivpzpd" tab-position="top" class="mb-20">
<el-tab-pane label="申请明细">
<el-col :span="24" >
<el-form-item label-width="0">
<div class="JNPF-common-title">
<h2></h2>
</div>
<el-table :data="dataForm.payment_item0List" size='mini' >
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="amount" label="付款金额">
<template slot-scope="scope">
<el-input v-model="scope.row.amount"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<!-- <el-table-column prop="creatorUserId" label="申请金额">-->
<!-- <template slot-scope="scope">-->
<!-- <el-input v-model="scope.row.creatorUserId"-->
<!-- placeholder="请输入" clearable :style='{"width":"100%"}'>-->
<!-- </el-input>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column prop="creatorUserName" label="订单金额">-->
<!-- <template slot-scope="scope">-->
<!-- <el-input v-model="scope.row.creatorUserName"-->
<!-- placeholder="请输入" clearable :style='{"width":"100%"}'>-->
<!-- </el-input>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column prop="lastModifyUserId" label="已付金额">
<template slot-scope="scope">
<el-input v-model="scope.row.payPrice"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="lastModifyUserName" label="订单编号">
<template slot-scope="scope">
<el-input v-model="scope.row.documentNo"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="lastModifyTime" label="合同编码">
<template slot-scope="scope">
<el-input v-model="scope.row.contractCode"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="deleteUserId" label="重量">
<template slot-scope="scope">
<el-input v-model="scope.row.num"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="deleteTime" label="垫资金额">
<template slot-scope="scope">
<el-input v-model="scope.row.advanceAmount"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="orgnizeId" label="税额">
<template slot-scope="scope">
<el-input v-model="scope.row.rate"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="departmentId" label="不含税金额">
<template slot-scope="scope">
<el-input v-model="scope.row.notAmount"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="creatorTime" label="业务日期">
<template slot-scope="scope">
<el-date-picker v-model="scope.row.creatorTime"
placeholder="请选择" clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" >
</el-date-picker>
</template>
</el-table-column>
<el-table-column label="操作" width="50" >
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn" @click="delpayment_item0List(scope.$index)"></el-button>
</template>
</el-table-column>
</el-table>
<div class="table-actions" @click="addpayment_item0List()">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div>
</el-form-item>
</el-col>
</el-tab-pane >
</el-tabs>
</el-col>
</template>
</el-form>
</el-row>
@ -122,41 +268,45 @@
loading: false,
isDetail: false,
dataForm: {
businessdate : '',
documentno : '',
suppliername : '',
currency : "0",
paymentamount : '',
paymenttype : "0",
paymentaccount : '',
paymentbank : '',
paymenttype : "",
settlementtype : "",
status : "",
creatorUserId : "",
creatorUserName : "",
creatorTime : "",
lastModifyUserId : "",
lastModifyUserName : "",
lastModifyTime : "",
departmentId : "",
orgnizeId : "",
paymentamount : '',
collectionaccount : '',
collectionbank : '',
requestedamount : '',
duedate : '',
currency : "0",
settlementtype : "0",
paymentno : '',
remark : '',
status : "0",
payment_item0List:[],
},
activeivpzpd:'0',
rules:
{
currency: [
suppliername: [
],
paymentaccount: [
],
paymentamount: [
{
required: true,
message: '请至少选择一个',
trigger: 'change'
message: '请输入付款金额',
trigger: 'blur'
},
],
paymentamount: [
],
paymentaccount: [
{
pattern: /^[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0$/,
message: '请输入正确的金额',
trigger: 'blur'
},
],
},
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
paymenttypeOptions:[{"fullName":"贷款","id":"0"},{"fullName":"运费","id":"1"},{"fullName":"仓储","id":"2"}],
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
settlementtypeOptions:[{"fullName":"现金","id":"0"},{"fullName":"赊购","id":"1"},{"fullName":"网银","id":"2"},{"fullName":"银企直连","id":"3"},{"fullName":"银票","id":"4"},{"fullName":"商票","id":"5"}],
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"},{"fullName":"已付款","id":"3"}],
@ -168,6 +318,13 @@
},
mounted() {},
methods: {
payment_item0Exist() {
let isOk = true;
for(let i=0;i<this.dataForm.payment_item0List.length;i++){
const e = this.dataForm.payment_item0List[i];
}
return isOk;
},
clearData(data){
for (let key in data) {
if (data[key] instanceof Array) {
@ -188,7 +345,7 @@
if(this.dataForm.id){
this.loading = true
request({
url: '/api/example/Payment/'+this.dataForm.id,
url: '/api/payment/Payment/'+this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
@ -204,6 +361,7 @@
dataFormSubmit() {
this.$refs['elForm'].validate((valid) => {
if (valid) {
if (!this.payment_item0Exist()) return
this.request()
}
})
@ -212,7 +370,7 @@
var _data =this.dataList()
if (!this.dataForm.id) {
request({
url: '/api/example/Payment',
url: '/api/payment/Payment',
method: 'post',
data: _data
}).then((res) => {
@ -228,7 +386,7 @@
})
}else{
request({
url: '/api/example/Payment/'+this.dataForm.id,
url: '/api/payment/Payment/'+this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
@ -244,12 +402,37 @@
})
}
},
addpayment_item0List(){
let item = {
amount:undefined,
creatorUserId:undefined,
creatorUserName:undefined,
lastModifyUserId:undefined,
lastModifyUserName:undefined,
lastModifyTime:undefined,
deleteUserId:undefined,
deleteTime:undefined,
orgnizeId:undefined,
departmentId:undefined,
creatorTime:undefined,
}
this.dataForm.payment_item0List.push(item)
},
delpayment_item0List(index) {
this.dataForm.payment_item0List.splice(index, 1);
},
dataList(){
var _data = JSON.parse(JSON.stringify(this.dataForm));
for(let i=0;i<_data.payment_item0List.length;i++){
var _list = _data.payment_item0List[i];
}
return _data;
},
dataInfo(dataAll){
let _dataAll =dataAll
for(let i=0;i<_dataAll.payment_item0List.length;i++){
var _list = _dataAll.payment_item0List[i];
}
this.dataForm = _dataAll
},
},

@ -9,11 +9,6 @@
<el-input v-model="query.documentno" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="客户">
<el-input v-model="query.suppliername" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
@ -29,6 +24,10 @@
</el-button>
<el-button type="text" icon="el-icon-download" @click="exportData()" >导出
</el-button>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()" >批量删除
</el-button>
<el-button type="primary" icon="el-icon-plus" @click="confirmprice()">
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
@ -38,20 +37,22 @@
<screenfull isContainer/>
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' >
<el-table-column prop="businessdate" label="业务日期" width="0" align="left"
sortable="custom" />
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange">
<el-table-column prop="paymentno" label="来源单号" width="0" align="left"
/>
<el-table-column prop="documentno" label="单据编号" width="0" align="left"
/>
<el-table-column prop="suppliername" label="客户" width="0" align="left"
<el-table-column prop="suppliername" label="供应商" width="0" align="left"
/>
<el-table-column label="币别" width="0" prop="currency" algin="left"
<el-table-column label="币别 " width="0" prop="currency" algin="left"
>
<template slot-scope="scope">
{{ scope.row.currency | dynamicText(currencyOptions) }}
</template>
</el-table-column>
<el-table-column prop="paymentamount" label="付款金额" width="0" align="left"
/>
<el-table-column prop="requestedamount" label="申请金额" width="0" align="left"
/>
<el-table-column prop="paymentaccount" label="付款账户" width="0" align="left"
/>
@ -83,7 +84,7 @@ width="150" >
</el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button>
<el-button type="text"
<el-button type="text"
@click="goDetail(scope.row.id)">详情
</el-button>
</template>
@ -113,7 +114,6 @@ width="150" >
detailVisible: false,
query: {
documentno:undefined,
suppliername:undefined,
},
treeProps: {
children: 'children',
@ -122,7 +122,7 @@ width="150" >
},
list: [],
listLoading: true,
total: 0,
multipleSelection: [], total: 0,
listQuery: {
currentPage: 1,
pageSize: 20,
@ -132,21 +132,22 @@ width="150" >
formVisible: false,
exportBoxVisible: false,
columnList: [
{prop: 'businessdate', label: '业务日期'},
{prop: 'paymentno', label: '来源单号'},
{prop: 'documentno', label: '单据编号'},
{prop: 'suppliername', label: '客户'},
{prop: 'currency', label: '币别'},
{prop: 'suppliername', label: '供应商'},
{prop: 'currency', label: '币别 '},
{prop: 'paymentamount', label: '付款金额'},
{prop: 'requestedamount', label: '申请金额'},
{prop: 'paymentaccount', label: '付款账户'},
{prop: 'paymentbank', label: '付款银行'},
{prop: 'paymenttype', label: '付款类型'},
{prop: 'settlementtype', label: '结算类型'},
{prop: 'status', label: '单据状态'},
],
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
currencyProps:{"label":"fullName","value":"id"},
paymenttypeOptions:[{"fullName":"贷款","id":"0"},{"fullName":"运费","id":"1"},{"fullName":"仓储","id":"2"}],
paymenttypeProps:{"label":"fullName","value":"id"},
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
currencyProps:{"label":"fullName","value":"id"},
settlementtypeOptions:[{"fullName":"现金","id":"0"},{"fullName":"赊购","id":"1"},{"fullName":"网银","id":"2"},{"fullName":"银企直连","id":"3"},{"fullName":"银票","id":"4"},{"fullName":"商票","id":"5"}],
settlementtypeProps:{"label":"fullName","value":"id"},
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"},{"fullName":"已付款","id":"3"}],
@ -181,7 +182,7 @@ width="150" >
menuId:this.menuId
};
request({
url: `/api/example/Payment/getList`,
url: `/api/payment/Payment/getList`,
method: 'post',
data: _query
}).then(res => {
@ -201,7 +202,7 @@ width="150" >
type: 'warning'
}).then(() => {
request({
url: `/api/example/Payment/${id}`,
url: `/api/payment/Payment/${id}`,
method: 'DELETE'
}).then(res => {
this.$message({
@ -215,6 +216,67 @@ width="150" >
}).catch(() => {
});
},
handleSelectionChange(val) {
const res = val.map(item => item.id)
this.multipleSelection = res
},
handleBatchRemoveDel() {
if (!this.multipleSelection.length) {
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 1500,
})
return
}
const ids = this.multipleSelection.join()
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
request({
url: `/api/payment/Payment/batchRemove/${ids}`,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
}).catch(() => {
})
},
confirmprice(){
if (!this.multipleSelection.length) {
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 1500,
})
return
}
let id = this.multipleSelection.join()
let param = {};
param = this.list.find(function(param) {
debugger
return param.id == id;
})
request({
url: `/api/payment/Payment/confirmprice`,
method: 'POST',
data: param
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
},
addOrUpdateHandle(id, isDetail) {
this.formVisible = true
this.$nextTick(() => {
@ -230,7 +292,7 @@ width="150" >
download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId}
request({
url: `/api/example/Payment/Actions/Export`,
url: `/api/payment/Payment/Actions/Export`,
method: 'GET',
data: query
}).then(res => {

@ -297,7 +297,7 @@
</el-tab-pane >
<el-tab-pane v-if="" label="发票信息">
<!-- <el-tab-pane v-if="" label="发票信息">
<el-col :span="24" >
<el-form-item label-width="0">
<div class="JNPF-common-title">
@ -388,8 +388,8 @@
</div>
</el-form-item>
</el-col>
</el-tab-pane >
<el-tab-pane label="付款信息">
</el-tab-pane >-->
<!-- <el-tab-pane label="付款信息">
<el-col :span="24" >
<el-form-item label-width="0">
<div class="JNPF-common-title">
@ -562,7 +562,7 @@
</div>
</el-form-item>
</el-col>
</el-tab-pane >
</el-tab-pane >-->
@ -708,9 +708,6 @@
this.dataForm.purchaseorder_item0List[i].poundPictures = b.pound_pictures;
this.dataForm.purchaseorder_item0List[i].vehiclePictures = b.vehicle_pictures;
this.dataForm.purchaseorder_item0List[i].pountType = b.pound_type;
// a = a + pound_pictures;
// }{
// a = a + this.dataForm.purchaseorder_item0List[i].poundPictures;
}
}
},

@ -28,7 +28,7 @@
</el-button>
<el-button type="primary" icon="el-icon-plus" @click="pigeonhole()">
</el-button>
<el-button type="primary" icon="el-icon-plus" @click="payment()">
<el-button type="primary" icon="el-icon-plus" @click="paymentApply()">
</el-button>
</div>
<div class="JNPF-common-head-right">
@ -269,13 +269,11 @@
})
return
}
// let id = {}
let id = this.multipleSelection.join()
let param ={};
param = this.list.find(function(param) {
return param.id == id;
})
debugger
request({
url: `/api/purchaseorder/Purchaseorder/pigeonhole`,
method: 'POST',
@ -290,7 +288,7 @@
});
})
},
payment(){
paymentApply(){
if (!this.multipleSelection.length) {
this.$message({
type: 'error',
@ -300,12 +298,19 @@
return
}
let ids = this.multipleSelection.join()
if (this.multipleSelection.length ===1){
let info = {};
info = this.list.find(function(info) {
return info.id == ids
})
if (info.amount != info.invoiceAmount){
request({
url: `/api/purchaseorder/Purchaseorder/paymentapply/${ids}`,
method: 'put',
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
/* if (info.amount != info.invoiceAmount){
this.$message({
type: 'error',
message: '请先开具发票',
@ -321,8 +326,7 @@
// this.$refs.JNPFForm.init(id, isDetail)
// })
this.$router.push({path:'/paymentdoc'})
}
}
}*/
},
exportData() {
this.exportBoxVisible = true

@ -40,7 +40,7 @@
<el-form-item label="入库金额"
prop="receiptamount" >
<el-input v-model="dataForm.receiptamount"
placeholder="请输入入库金额" clearable :style='{"width":"100%"}'>
placeholder="请输入入库金额" readonly>
</el-input>
</el-form-item>
@ -49,7 +49,7 @@
<el-form-item label="币别"
prop="currency" >
<el-select v-model="dataForm.currency"
placeholder="请选择币别" clearable :style='{"width":"100%"}'>
placeholder="请选择币别" readonly>
<el-option v-for="(item, index) in currencyOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
</el-select>
@ -59,7 +59,7 @@
<el-form-item label="入库数量"
prop="receiptnum" >
<el-input v-model="dataForm.receiptnum"
placeholder="请输入入库数量" clearable :style='{"width":"100%"}'>
placeholder="请输入入库数量" readonly>
</el-input>
</el-form-item>
@ -68,7 +68,7 @@
<el-form-item label="供应商名称"
prop="suppliername" >
<el-input v-model="dataForm.suppliername"
placeholder="请输入供应商名称" clearable :style='{"width":"100%"}'>
placeholder="请输入供应商名称" readonly>
</el-input>
</el-form-item>
@ -82,25 +82,25 @@
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="入库日期"
prop="warehousingdate" >
<el-date-picker v-model="dataForm.warehousingdate"
placeholder="请选择入库日期" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >
<!-- <el-col :span="12" >-->
<!-- <el-form-item label="入库日期"-->
<!-- prop="warehousingdate" >-->
<!-- <el-date-picker v-model="dataForm.warehousingdate"-->
<!-- placeholder="请选择入库日期" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >-->
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="单据状态"
prop="status" >
<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" :disabled="item.disabled" ></el-option>
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="12" >-->
<!-- <el-form-item label="单据状态"-->
<!-- prop="status" >-->
<!-- <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" :disabled="item.disabled" ></el-option>-->
</el-select>
</el-form-item>
</el-col>
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="24">
<el-tabs v-model="activevpzhms" tab-position="top" class="mb-20">
<el-tab-pane label="磅单明细">
@ -123,7 +123,7 @@
<el-table-column prop="materialname" label="物料名称">
<template slot-scope="scope">
<el-input v-model="scope.row.materialname"
placeholder="请输入" clearable :style='{"width":"200%"}'>
placeholder="请输入" :disabled="true">
</el-input>
</template>
</el-table-column>

@ -26,27 +26,27 @@
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="地点ID"
<el-form-item label="供应商地点ID"
prop="supplierSiteId" >
<p>{{dataForm.supplierSiteId}}</p>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="地点名称"
<el-form-item label="供应商地点名称"
prop="supplierSiteCode" >
<p>{{dataForm.supplierSiteCode}}</p>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="所属公司编码"
<el-form-item label="公司名称"
prop="companyId" >
<p>{{dataForm.companyId}}</p>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="所属公司名称"
prop="companyName" >
<p>{{dataForm.companyName}}</p>
<el-form-item label="地址"
prop="address" >
<p>{{dataForm.address}}</p>
</el-form-item>
</el-col>
<el-col :span="12" >
@ -67,12 +67,6 @@
<p>{{ dataForm.supplierLevel | dynamicText(supplierLevelOptions) }} </p>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="地址"
prop="address" >
<p>{{dataForm.address}}</p>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="启用"
prop="status" >
@ -106,12 +100,11 @@
supplierName : '',
supplierSiteId : '',
supplierSiteCode : '',
companyId : '',
companyName : '',
companyId : [],
address : '',
contactName : '',
contactPhone : '',
supplierLevel : "1",
address : '',
status : 1,
},
supplierLevelOptions:[{"fullName":"一级","id":"1"},{"fullName":"二级","id":"2"},{"fullName":"三级","id":"3"},{"fullName":"四级","id":"4"}],

@ -1,264 +1,258 @@
<template>
<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="1000px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px"
label-position="right">
<template v-if="!loading">
<el-col :span="24">
<el-form-item label-width="0">
<JNPF-Text :style='{"width":"100%"}'
:textStyle='{"color":"#000000","font-weight":"bold","text-decoration":"none","font-size":18,"line-height":32,"font-style":"normal","text-align":"left"}'
value="供应商编辑">
</JNPF-Text>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="供应商编码" prop="supplierCode">
<el-input v-model="dataForm.supplierCode" placeholder="请输入供应商编码" clearable
:style='{"width":"100%"}'>
<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="1000px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right" >
<template v-if="!loading">
<el-col :span="24" >
<el-form-item label-width="0">
<JNPF-Text :style='{"width":"100%"}'
:textStyle='{"color":"#000000","font-weight":"bold","text-decoration":"none","font-size":18,"line-height":32,"font-style":"normal","text-align":"left"}' value="供应商编辑">
</JNPF-Text>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="供应商编码"
prop="supplierCode" >
<el-input v-model="dataForm.supplierCode"
placeholder="请输入供应商编码" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="供应商名称" prop="supplierName">
<el-input v-model="dataForm.supplierName" placeholder="请输入供应商名称" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="供应商名称"
prop="supplierName" >
<el-input v-model="dataForm.supplierName"
placeholder="请输入供应商名称" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="地点ID" prop="supplierSiteId">
<el-input v-model="dataForm.supplierSiteId" placeholder="请输入供应商地点ID" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="供应商地点ID"
prop="supplierSiteId" >
<el-input v-model="dataForm.supplierSiteId"
placeholder="请输入供应商地点ID" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="地点名称" prop="supplierSiteCode">
<el-input v-model="dataForm.supplierSiteCode" placeholder="请输入供应商地点名称" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="供应商地点名称"
prop="supplierSiteCode" >
<el-input v-model="dataForm.supplierSiteCode"
placeholder="请输入供应商地点名称" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="所属公司编码" prop="companyId">
<el-input v-model="dataForm.companyId" placeholder="请输入所属公司编码" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="公司名称"
prop="companyId" >
<com-select v-model="dataForm.companyId"
placeholder="请选择" clearable >
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="所属公司名称" prop="companyName">
<el-input v-model="dataForm.companyName" placeholder="请输入公司名称" clearable
:style='{"width":"100%"}'>
</com-select>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="地址"
prop="address" >
<el-input v-model="dataForm.address"
placeholder="请输入地址" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系人" prop="contactName">
<el-input v-model="dataForm.contactName" placeholder="请输入联系人" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="联系人"
prop="contactName" >
<el-input v-model="dataForm.contactName"
placeholder="请输入联系人" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系电话" prop="contactPhone">
<el-input v-model="dataForm.contactPhone" placeholder="请输入联系电话" clearable
:style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="联系电话"
prop="contactPhone" >
<el-input v-model="dataForm.contactPhone"
placeholder="请输入联系电话" clearable :style='{"width":"100%"}'>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="供应商等级" prop="supplierLevel">
<el-select v-model="dataForm.supplierLevel" placeholder="请选择" clearable
:style='{"width":"100%"}'>
<el-option v-for="(item, index) in supplierLevelOptions" :key="index"
:label="item.fullName" :value="item.id" :disabled="item.disabled"></el-option>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="供应商等级"
prop="supplierLevel" >
<el-select v-model="dataForm.supplierLevel"
placeholder="请选择" clearable :style='{"width":"100%"}'>
<el-option v-for="(item, index) in supplierLevelOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="地址" prop="address">
<el-input v-model="dataForm.address" placeholder="请输入地址" clearable
:style='{"width":"100%"}'>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="启用"
prop="status" >
<el-switch v-model="dataForm.status"
:active-value="1" :inactive-value="0" >
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="启用" prop="status">
<el-switch v-model="dataForm.status" :active-value="1" :inactive-value="0">
</el-switch>
</el-form-item>
</el-col>
</template>
</el-form>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button>
<el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail"> </el-button>
</span>
</el-dialog>
</el-switch>
</el-form-item>
</el-col>
</template>
</el-form>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button>
<el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail"> </el-button>
</span>
</el-dialog>
</template>
<script>
import request from '@/utils/request'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
export default {
components: {},
props: [],
data() {
return {
visible: false,
loading: false,
isDetail: false,
dataForm: {
supplierCode: '',
supplierName: '',
supplierSiteId: '',
supplierSiteCode: '',
companyId: '',
companyName: '',
contactName: '',
contactPhone: '',
supplierLevel: "1",
address: '',
status: 1,
},
rules: {
supplierCode: [{
required: true,
message: '请输入供应商编码',
trigger: 'blur'
}, ],
supplierName: [{
required: true,
message: '请输入供应商名称',
trigger: 'blur'
}, ],
},
supplierLevelOptions: [{
"fullName": "一级",
"id": "1"
}, {
"fullName": "二级",
"id": "2"
}, {
"fullName": "三级",
"id": "3"
}, {
"fullName": "四级",
"id": "4"
}],
import request from '@/utils/request'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
export default {
components: {},
props: [],
data() {
return {
visible: false,
loading: false,
isDetail: false,
dataForm: {
supplierCode : '',
supplierName : '',
supplierSiteId : '',
supplierSiteCode : '',
companyId : [],
address : '',
contactName : '',
contactPhone : '',
supplierLevel : "1",
status : 1,
},
rules:
{
supplierCode: [
{
required: true,
message: '请输入供应商编码',
trigger: 'blur'
},
],
supplierName: [
{
required: true,
message: '请输入供应商名称',
trigger: 'blur'
},
],
},
supplierLevelOptions:[{"fullName":"一级","id":"1"},{"fullName":"二级","id":"2"},{"fullName":"三级","id":"3"},{"fullName":"四级","id":"4"}],
}
},
computed: {},
watch: {},
created() {
},
mounted() {},
methods: {
clearData(data){
for (let key in data) {
if (data[key] instanceof Array) {
data[key] = [];
} else if (data[key] instanceof Object) {
this.clearData(data[key]);
} else {
data[key] = "";
}
}
},
init(id, isDetail) {
this.dataForm.id = id || 0;
this.visible = true;
this.isDetail = isDetail || false;
this.$nextTick(() => {
this.$refs['elForm'].resetFields();
if(this.dataForm.id){
this.loading = true
request({
url: '/api/supplier/Supplier/'+this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.loading = false
});
}else{
this.clearData(this.dataForm)
}
});
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
},
//
dataFormSubmit() {
this.$refs['elForm'].validate((valid) => {
if (valid) {
this.request()
}
})
},
request() {
var _data =this.dataList()
if (!this.dataForm.id) {
request({
url: '/api/supplier/Supplier',
method: 'post',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
this.visible = false
this.$emit('refresh', true)
}
})
})
}else{
request({
url: '/api/supplier/Supplier/'+this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
this.visible = false
this.$emit('refresh', true)
}
})
})
}
},
dataList(){
var _data = JSON.parse(JSON.stringify(this.dataForm));
_data.companyId = JSON.stringify(_data.companyId)
_data.status = parseInt(_data.status)
return _data;
},
dataInfo(dataAll){
let _dataAll =dataAll
_dataAll.companyId = JSON.parse( _dataAll.companyId)
_dataAll.status = parseInt( _dataAll.status)
this.dataForm = _dataAll
},
},
}
}
},
computed: {},
watch: {},
created() {},
mounted() {},
methods: {
clearData(data) {
for (let key in data) {
if (data[key] instanceof Array) {
data[key] = [];
} else if (data[key] instanceof Object) {
this.clearData(data[key]);
} else {
data[key] = "";
}
}
},
init(id, isDetail) {
this.dataForm.id = id || 0;
this.visible = true;
this.isDetail = isDetail || false;
this.$nextTick(() => {
this.$refs['elForm'].resetFields();
if (this.dataForm.id) {
this.loading = true
request({
url: '/api/supplier/Supplier/' + this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.loading = false
});
} else {
this.clearData(this.dataForm)
}
});
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
},
//
dataFormSubmit() {
this.$refs['elForm'].validate((valid) => {
if (valid) {
this.request()
}
})
},
request() {
var _data = this.dataList()
if (!this.dataForm.id) {
request({
url: '/api/supplier/Supplier',
method: 'post',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
this.visible = false
this.$emit('refresh', true)
}
})
})
} else {
request({
url: '/api/supplier/Supplier/' + this.dataForm.id,
method: 'PUT',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
this.visible = false
this.$emit('refresh', true)
}
})
})
}
},
dataList() {
var _data = JSON.parse(JSON.stringify(this.dataForm));
_data.status = parseInt(_data.status)
return _data;
},
dataInfo(dataAll) {
let _dataAll = dataAll
_dataAll.status = parseInt(_dataAll.status)
this.dataForm = _dataAll
},
},
}
</script>

@ -1,345 +1,285 @@
<template>
<div class="JNPF-common-layout">
<div class="JNPF-common-layout">
<div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<el-col :span="6">
<el-form-item label="供应商编码">
<el-input v-model="query.supplierCode" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="供应商名称">
<el-input v-model="query.supplierName" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
</el-form-item>
</el-col>
</el-form>
</el-row>
<div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head">
<div>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">
</el-button>
<el-button type="text" icon="el-icon-download" @click="exportData()">
</el-button>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="reset()" />
</el-tooltip>
<screenfull isContainer />
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c
@selection-change="handleSelectionChange">
<el-table-column prop="supplierCode" label="供应商编码" width="0" align="left" sortable="custom" />
<el-table-column prop="supplierName" label="供应商名称" width="0" align="left" sortable="custom" />
<el-table-column prop="supplierSiteId" label="地点ID" width="0" align="left" sortable="custom" />
<el-table-column prop="supplierSiteCode" label="地点名称" width="0" align="left" sortable="custom" />
<el-table-column prop="companyId" label="所属公司编码" width="0" align="left" sortable="custom" />
<el-table-column prop="companyName" label="所属公司名称" width="0" align="left" sortable="custom" />
<el-table-column prop="contactName" label="联系人" width="0" align="left" sortable="custom" />
<el-table-column prop="contactPhone" label="联系电话" width="0" align="left" sortable="custom" />
<el-table-column label="供应商等级" width="0" prop="supplierLevel" algin="left" sortable="custom">
<template slot-scope="scope">
{{ scope.row.supplierLevel | dynamicText(supplierLevelOptions) }}
</template>
</el-table-column>
<el-table-column prop="address" label="地址" width="0" align="left" sortable="custom" />
<!-- <el-table-column prop="status" label="启用" width="0" align="left"
sortable="custom" /> -->
<el-table-column prop="status" label="状态" width="0" align="left">
<template slot-scope="scope">
<el-tag type="success" disable-transitions v-if="scope.row.status == 1">
</el-tag>
<el-tag type="danger" disable-transitions v-else></el-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="150">
<template slot-scope="scope">
<el-button type="text" @click="addOrUpdateHandle(scope.row.id)">
</el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button>
<el-button type="text" @click="goDetail(scope.row.id)">
</el-button>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" />
</div>
</div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
</div>
<div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<el-col :span="6">
<el-form-item label="供应商编码">
<el-input v-model="query.supplierCode" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="供应商名称">
<el-input v-model="query.supplierName" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
</el-form-item>
</el-col>
</el-form>
</el-row>
<div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head">
<div>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">
</el-button>
<el-button type="text" icon="el-icon-download" @click="exportData()" >导出
</el-button>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()" >批量删除
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="reset()"/>
</el-tooltip>
<screenfull isContainer/>
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange">
<el-table-column prop="supplierCode" label="供应商编码" width="0" align="left"
sortable="custom" />
<el-table-column prop="supplierName" label="供应商名称" width="0" align="left"
sortable="custom" />
<el-table-column prop="supplierSiteId" label="供应商地点ID" width="0" align="left"
sortable="custom" />
<el-table-column prop="supplierSiteCode" label="供应商地点名称" width="0" align="left"
sortable="custom" />
<el-table-column prop="companyId" label="公司名称" width="0" align="left"
sortable="custom" />
<el-table-column prop="contactName" label="联系人" width="0" align="left"
sortable="custom" />
<el-table-column prop="contactPhone" label="联系电话" width="0" align="left"
sortable="custom" />
<el-table-column label="供应商等级" width="0" prop="supplierLevel" algin="left"
sortable="custom" >
<template slot-scope="scope">
{{ scope.row.supplierLevel | dynamicText(supplierLevelOptions) }}
</template>
</el-table-column>
<el-table-column prop="address" label="地址" width="0" align="left"
sortable="custom" />
<el-table-column prop="status" label="启用" width="0" align="left" sortable="custom" >
<template slot-scope="scope">
<el-tag type="success" disable-transitions v-if="scope.row.status == '1'">
</el-tag>
<el-tag type="danger" disable-transitions v-else></el-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right"
width="150" >
<template slot-scope="scope">
<el-button type="text"
@click="addOrUpdateHandle(scope.row.id)" >编辑
</el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button>
<el-button type="text"
@click="goDetail(scope.row.id)">详情
</el-button>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/>
</div>
</div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/>
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
</div>
</template>
<script>
import request from '@/utils/request'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
import JNPFForm from './Form'
import ExportBox from './ExportBox'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import Detail from './Detail'
import request from '@/utils/request'
import {getDictionaryDataSelector} from '@/api/systemData/dictionary'
import JNPFForm from './Form'
import ExportBox from './ExportBox'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface'
import Detail from './Detail'
export default {
components: {
JNPFForm,
ExportBox,
Detail
},
data() {
return {
detailVisible: false,
query: {
supplierCode: undefined,
supplierName: undefined,
},
treeProps: {
children: 'children',
label: 'fullName',
value: 'id'
},
list: [],
listLoading: true,
multipleSelection: [],
total: 0,
listQuery: {
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "supplierCode",
},
formVisible: false,
exportBoxVisible: false,
columnList: [{
prop: 'supplierCode',
label: '供应商编码'
},
{
prop: 'supplierName',
label: '供应商名称'
},
{
prop: 'supplierSiteId',
label: '地点ID'
},
{
prop: 'supplierSiteCode',
label: '地点名称'
},
{
prop: 'companyId',
label: '所属公司编码'
},
{
prop: 'companyName',
label: '所属公司名称'
},
{
prop: 'contactName',
label: '联系人'
},
{
prop: 'contactPhone',
label: '联系电话'
},
{
prop: 'supplierLevel',
label: '供应商等级'
},
{
prop: 'address',
label: '地址'
},
{
prop: 'status',
label: '启用'
},
],
supplierLevelOptions: [{
"fullName": "一级",
"id": "1"
}, {
"fullName": "二级",
"id": "2"
}, {
"fullName": "三级",
"id": "3"
}, {
"fullName": "四级",
"id": "4"
}],
supplierLevelProps: {
"label": "fullName",
"value": "id"
},
}
},
computed: {
menuId() {
return this.$route.meta.modelId || ''
}
},
created() {
this.initData()
},
methods: {
goDetail(id) {
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(id)
})
},
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/supplier/Supplier/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
export default {
components: {JNPFForm, ExportBox,Detail},
data() {
return {
detailVisible: false,
query: {
supplierCode:undefined,
supplierName:undefined,
},
treeProps: {
children: 'children',
label: 'fullName',
value: 'id'
},
list: [],
listLoading: true,
multipleSelection: [], total: 0,
listQuery: {
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "supplierCode",
},
formVisible: false,
exportBoxVisible: false,
columnList: [
{prop: 'supplierCode', label: '供应商编码'},
{prop: 'supplierName', label: '供应商名称'},
{prop: 'supplierSiteId', label: '供应商地点ID'},
{prop: 'supplierSiteCode', label: '供应商地点名称'},
{prop: 'companyId', label: '公司名称'},
{prop: 'contactName', label: '联系人'},
{prop: 'contactPhone', label: '联系电话'},
{prop: 'supplierLevel', label: '供应商等级'},
{prop: 'address', label: '地址'},
{prop: 'status', label: '启用'},
],
supplierLevelOptions:[{"fullName":"一级","id":"1"},{"fullName":"二级","id":"2"},{"fullName":"三级","id":"3"},{"fullName":"四级","id":"4"}],
supplierLevelProps:{"label":"fullName","value":"id"},
}
},
computed: {
menuId() {
return this.$route.meta.modelId || ''
}
},
created() {
this.initData()
},
methods: {
goDetail(id){
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(id)
})
},
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/supplier/Supplier/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/supplier/Supplier/${id}`,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
}).catch(() => {});
},
handleSelectionChange(val) {
const res = val.map(item => item.id)
this.multipleSelection = res
},
handleBatchRemoveDel() {
if (!this.multipleSelection.length) {
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 1500,
})
return
}
const ids = this.multipleSelection.join()
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
request({
url: `/api/supplier/Supplier/batchRemove/${ids}`,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
}).catch(() => {})
},
addOrUpdateHandle(id, isDetail) {
this.formVisible = true
this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail)
})
},
exportData() {
this.exportBoxVisible = true
this.$nextTick(() => {
this.$refs.ExportBox.init(this.columnList)
})
},
download(data) {
let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId
}
request({
url: `/api/supplier/Supplier/Actions/Export`,
method: 'GET',
data: query
}).then(res => {
if (!res.data.url) return
this.jnpf.downloadFile(res.data.url)
this.$refs.ExportBox.visible = false
this.exportBoxVisible = false
})
},
search() {
this.listQuery = {
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "supplierCode",
}
this.initData()
},
refresh(isrRefresh) {
this.formVisible = false
if (isrRefresh) this.reset()
},
reset() {
for (let key in this.query) {
this.query[key] = undefined
}
this.search()
}
}
}
this.listLoading = false
})
},
handleDel(id) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
request({
url: `/api/supplier/Supplier/${id}`,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
}).catch(() => {
});
},
handleSelectionChange(val) {
const res = val.map(item => item.id)
this.multipleSelection = res
},
handleBatchRemoveDel() {
if (!this.multipleSelection.length) {
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 1500,
})
return
}
const ids = this.multipleSelection.join()
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
request({
url: `/api/supplier/Supplier/batchRemove/${ids}`,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
}).catch(() => {
})
},
addOrUpdateHandle(id, isDetail) {
this.formVisible = true
this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail)
})
},
exportData() {
this.exportBoxVisible = true
this.$nextTick(() => {
this.$refs.ExportBox.init(this.columnList)
})
},
download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId}
request({
url: `/api/supplier/Supplier/Actions/Export`,
method: 'GET',
data: query
}).then(res => {
if (!res.data.url) return
this.jnpf.downloadFile(res.data.url)
this.$refs.ExportBox.visible = false
this.exportBoxVisible = false
})
},
search() {
this.listQuery = {
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "supplierCode",
}
this.initData()
},
refresh(isrRefresh) {
this.formVisible = false
if (isrRefresh) this.reset()
},
reset() {
for (let key in this.query) {
this.query[key] = undefined
}
this.search()
}
}
}
</script>

@ -22,8 +22,8 @@
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="司机名称" prop="drivername">
<el-input v-model="dataForm.drivername" placeholder="请输入司机名称" clearable
<el-form-item label="司机" prop="drivername">
<el-input v-model="dataForm.drivername" placeholder="请输入司机" clearable
:style='{"width":"100%"}'>
</el-input>
@ -45,7 +45,7 @@
</el-form-item>
</el-col>
<!-- <el-col :span="12" >
<el-form-item label="录入人"
<el-form-item label="录入人"
prop="creatorusername" >
<el-input v-model="dataForm.creatorusername"
placeholder="请输入录入人" clearable :style='{"width":"100%"}'>
@ -54,7 +54,7 @@
</el-form-item>
</el-col>
<el-col :span="12" >
<el-form-item label="创建时间"
<el-form-item label="创建时间"
prop="creatortime" >
<el-input v-model="dataForm.creatortime"
placeholder="系统自动生成" readonly >

@ -42,25 +42,25 @@
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c
@selection-change="handleSelectionChange">
<!-- <el-table-column prop="id" label="ID" width="0" align="left" /> -->
<el-table-column prop="id" label="ID" width="0" align="left" />
<el-table-column prop="ticketno" label="车牌号" width="0" align="left" />
<el-table-column prop="drivername" label="司机名称" width="0" align="left" />
<el-table-column prop="contact" label="手机号" width="0" align="left" />
<el-table-column prop="vehiclephotos" label="车辆照片" width="0" align="left">
<template slot-scope="scope">
<el-table-column prop="drivername" label="司机" width="0" align="left" />
<el-table-column prop="vehiclephotos" label="车辆照片" width="0" align="left">
<template slot-scope="scope">
<span v-for="(item,index) in JSON.parse(scope.row.vehiclephotos)" :key="index">
<el-popover placement="bottom" trigger="click" width="1000">
<img :src="`/dev${item.url}`" width="100%" />
<img
slot="reference"
:src="`/dev${item.url}`"
:alt="`/dev${item.url}`"
style="max-height: 70px;max-width: 70px; padding: 5px"
/>
slot="reference"
:src="`/dev${item.url}`"
:alt="`/dev${item.url}`"
style="max-height: 70px;max-width: 70px; padding: 5px"
/>
</el-popover>
</span>
</template>
</el-table-column>
</template>
</el-table-column>
<el-table-column prop="contact" label="手机号" width="0" align="left" />
<el-table-column prop="creatorusername" label="录入人" width="0" align="left" />
<el-table-column prop="creatortime" label="创建时间" width="0" align="left" />
<el-table-column label="操作" fixed="right" width="100">

Loading…
Cancel
Save