4月15问题修改

jg-waiwang-pro
胡川虎 6 months ago
parent 7869e302e5
commit 0897b75b03

@ -2,7 +2,7 @@
server:
tomcat:
uri-encoding: UTF-8 #tomcat编码
port: 30000 #tomcat端口
port: 40000 #tomcat端口
spring:
devtools: #spring开发者工具模块
@ -17,11 +17,11 @@ spring:
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure #排除自动配置手动配置druid
datasource:
db-type: MySQL #数据库类型(可选值 MySQL、SQLServer、Oracle、DM8、KingbaseES、PostgreSQL请严格按可选值填写)
host: 192.168.0.210
port: 3306
username: java_boot_test
password: pBx5HaW6WMGSTdDf
db-name: java_boot_test
host: 127.0.0.1
port: 3309
username: root
password: qawsed,.123
db-name: jnpf_init
db-schema: #金仓达梦选填
prepare-url: #自定义url
@ -30,9 +30,35 @@ spring:
primary: master #设置默认的数据源或者数据源组,默认值即为master
strict: true #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源
druid:
#定时执行数据链接检测语句 防止数据库闲时超时断开链接
test-while-idle: true #空闲时执行
time-between-eviction-runs-millis: 60000 #执行间隔
# 空闲时执行连接测试
test-while-idle: true
# 连接测试最小间隔
time-between-eviction-runs-millis: 60000
# 获取连接等待3秒 根据网络情况设定
max-wait: 3000
# 初始化4个连接
initial-size: 4
# 最大20个连接
max-active: 20
# 最少保持4个空闲连接
min-idle: 4
# 空闲连接保活, 超过配置的空闲时间会进行连接检查完成保活操作(数据库自身会断开达到空闲时间的连接, 程序使用断开的连接会报错)
keep-alive: true
# 解除注释后Druid连接池打印SQL语句 忽略日志等级配置
#filters: slf4j
slf4j:
statementLogEnabled: true
resultSetLogEnabled: false
connectionLogEnabled: false
dataSourceLogEnabled: false
statementCreateAfterLogEnabled: false
statementCloseAfterLogEnabled: false
statementExecuteAfterLogEnabled: false
#打印SQL替换参数
statementExecutableSqlLogEnable: true
statementPrepareAfterLogEnabled: false
statementPrepareCallAfterLogEnabled: false
statementParameterSetLogEnabled: false
# datasource:
# master:
# url: jdbc:mysql://${spring.datasource.host}:${spring.datasource.port}/${spring.datasource.dbname}?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowMultiQueries=true&serverTimezone=UTC
@ -43,10 +69,10 @@ spring:
# ===================== Redis配置 =====================
# redis单机模式
redis:
database: 1 #缓存库编号
host: 192.168.0.220
database: 0 #缓存库编号
host: 127.0.0.1
port: 6379
password: 123456 # 密码为空时,请将本行注释
password: qweasd,.123 # 密码为空时,请将本行注释
timeout: 3000 #超时时间(单位:秒)
lettuce: #Lettuce为Redis的Java驱动包
pool:
@ -74,6 +100,18 @@ spring:
# min-idle: 0 # 连接池中的最小空闲连接
# max-idle: 8 # 连接池中的最大空闲连接
# SpringDoc接口文档 访问地址http://127.0.0.1:30000/doc.html
springdoc:
default-flat-param-object: true
api-docs:
enabled: true
#SpringDoc增强
#knife4j:
# basic: #接口文档访问鉴权
# enable: true
# username: jnpf
# password: 123456
config:
# ===================== 是否开启测试环境 =====================
TestVersion: false
@ -88,7 +126,7 @@ config:
enable-storage: true #启用存储
enable-access: true #启用访问(线上请使用 Nginx 配置,效率更高)
domain: "" # 访问域名例如“http://127.0.0.1:8030/”,注意后面要和 path-patterns 保持一致,“/”结尾,本地存储建议使用相对路径,方便后期更换域名
base-path: F:/work/jnpf-resources/ # 基础路径
base-path: D:/project/jnpf-resources/ # 基础路径
path-patterns: /** # 访问路径
storage-path: # 存储路径
aliyun-oss: # 阿里云 OSS ,不使用的情况下可以不写

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

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

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

@ -26,11 +26,14 @@
d.code orderCode,
(SELECT COUNT(1) from jg_warehousing_outbound_product WHERE warehousing_outbound_id = a.id) skuNum,
(SELECT COUNT(1) from jg_warehousing_outbound_poundlist WHERE warehousing_outbound_id = a.id) voucherNum,
a.f_creator_time storageTime
a.f_creator_time storageTime,
'退供出库' warehousingStorageTypeName,
e.name warehouseName
from jg_warehousing_outbound a
LEFT JOIN flow_task b on a.id = b.f_process_id
LEFT JOIN jg_warehousing_notification c ON a.warehousing_id = c.id
LEFT JOIN jg_business_order d ON c.business_id = d.id
LEFT JOIN jg_business_line e ON a.warehouse_id = e.id
WHERE a.f_delete_mark is null and a.id not in (SELECT storage_id from jg_cw_account_storage where f_delete_mark is null)
and b.f_status = '2' and a.warehousing_outbound_type = '5'
<if test="warehousingStoragePagination.excludeIdList!= null and warehousingStoragePagination.excludeIdList.size()>0">
@ -50,11 +53,14 @@
d.code orderCode,
(SELECT COUNT(1) from jg_warehousing_storage_product WHERE warehousing_storage_id = a.id) skuNum,
(SELECT COUNT(1) from jg_warehousing_storage_poundlist WHERE warehousing_storage_id = a.id) voucherNum,
a.f_creator_time storageTime
a.f_creator_time storageTime,
'采购入库' warehousingStorageTypeName,
e.name warehouseName
from jg_warehousing_storage a
LEFT JOIN flow_task b on a.id = b.f_process_id
LEFT JOIN jg_warehousing_notification c ON a.warehousing_id = c.id
LEFT JOIN jg_business_order d ON c.business_id = d.id
LEFT JOIN jg_business_line e ON a.warehouse_id = e.id
WHERE a.f_delete_mark is null and a.id not in (SELECT storage_id from jg_cw_account_storage where f_delete_mark is null)
and b.f_status = '2' and a.warehousing_storage_type = '3'
<if test="warehousingStoragePagination.excludeIdList!= null and warehousingStoragePagination.excludeIdList.size()>0">

@ -716,7 +716,7 @@ public class AuthorizeServiceImpl extends SuperServiceImpl<AuthorizeMapper, Auth
add(userInfo.getOrganizeId());
}});
if(CollectionUtils.isNotEmpty(orgAllPathList)){
itemValue = JsonUtil.getObjectToString(orgAllPathList.get(0));
itemValue = String.join(",", orgAllPathList.get(0));
}else{
itemValue = "";
}
@ -795,8 +795,8 @@ public class AuthorizeServiceImpl extends SuperServiceImpl<AuthorizeMapper, Auth
for(String itemOrg: allIdList){
OrganizeEntity organizeEntity =organizeService.getInfo(itemOrg);
if (organizeEntity != null) {
if (StringUtil.isNotEmpty(organizeEntity.getOrganizeIdTree())) {
String[] split = organizeEntity.getOrganizeIdTree().split(",");
if (StringUtil.isNotEmpty(organizeEntity.getCompanyIdTree())) {
String[] split = organizeEntity.getCompanyIdTree().split(",");
if(split.length > 0){
resOrg.add(Arrays.asList(split));
}

@ -423,6 +423,19 @@ public class OrganizeServiceImpl extends SuperServiceImpl<OrganizeMapper, Organi
}
}
@Override
public void getCompanyIdTree(String organizeId, List<String> organizeParentIdList) {
OrganizeEntity entity = getInfo(organizeId);
if (entity != null) {
if(StringUtil.equals(entity.getCategory(), "company")){
organizeParentIdList.add(entity.getId());
}
if (StringUtil.isNotEmpty(entity.getParentId())) {
getCompanyIdTree(entity.getParentId(), organizeParentIdList);
}
}
}
@Override
public void getOrganizeId(String organizeId, List<OrganizeEntity> organizeList) {
OrganizeEntity entity = getInfo(organizeId);

@ -477,7 +477,8 @@ public class OrganizeController extends SuperController<OrganizeService, Organiz
// 通过组织id获取父级组织
String organizeIdTree = getOrganizeIdTree(entity);
entity.setOrganizeIdTree(organizeIdTree);
String companyIdTree = getCompanyIdTree(entity);
entity.setCompanyIdTree(companyIdTree);
organizeService.create(entity);
threadPoolExecutor.execute(() -> {
try{
@ -525,6 +526,8 @@ public class OrganizeController extends SuperController<OrganizeService, Organiz
// 通过组织id获取父级组织
String organizeIdTree = getOrganizeIdTree(entity);
entity.setOrganizeIdTree(organizeIdTree);
String companyIdTree = getCompanyIdTree(entity);
entity.setCompanyIdTree(companyIdTree);
boolean flag = organizeService.update(id, entity);
synList.add(entity);
@ -853,7 +856,8 @@ public class OrganizeController extends SuperController<OrganizeService, Organiz
// 通过组织id获取父级组织
String organizeIdTree = getOrganizeIdTree(entity);
entity.setOrganizeIdTree(organizeIdTree);
String companyIdTree = getCompanyIdTree(entity);
entity.setCompanyIdTree(companyIdTree);
organizeService.create(entity);
threadPoolExecutor.execute(() -> {
try{
@ -903,6 +907,8 @@ public class OrganizeController extends SuperController<OrganizeService, Organiz
// 通过组织id获取父级组织
String organizeIdTree = getOrganizeIdTree(entity);
entity.setOrganizeIdTree(organizeIdTree);
String companyIdTree = getCompanyIdTree(entity);
entity.setCompanyIdTree(companyIdTree);
boolean flag = organizeService.update(id, entity);
synList.add(entity);
@ -1016,6 +1022,27 @@ public class OrganizeController extends SuperController<OrganizeService, Organiz
return organizeParentIdTree;
}
/**
* id
*
* @param entity
* @return
*/
private String getCompanyIdTree(OrganizeEntity entity) {
List<String> list = new ArrayList<>();
organizeService.getCompanyIdTree(entity.getId(), list);
// 倒叙排放
Collections.reverse(list);
StringBuilder organizeIdTree = new StringBuilder();
for (String organizeParentId : list) {
organizeIdTree.append("," + organizeParentId);
}
String organizeParentIdTree = organizeIdTree.toString();
if (StringUtil.isNotEmpty(organizeParentIdTree)) {
organizeParentIdTree = organizeParentIdTree.replaceFirst(",", "");
}
return organizeParentIdTree;
}
// /**
// * 获取父级组织id
// *

@ -79,4 +79,10 @@ public class OrganizeEntity extends PermissionEntityBase{
*/
@TableField("F_ENABLED_MARK")
private Integer enabledMark;
/**
*
*/
@TableField("F_COMPANY_ID_TREE")
private String companyIdTree;
}

@ -164,6 +164,14 @@ public interface OrganizeService extends SuperService<OrganizeEntity> {
*/
void getOrganizeIdTree(String organizeId, List<String> organizeParentIdList);
/**
* id
*
* @param organizeId id
* @param organizeParentIdList id
*/
void getCompanyIdTree(String organizeId, List<String> organizeParentIdList);
/**
* id
*

@ -0,0 +1,16 @@
package jnpf.mapper;
import jnpf.entity.CwpaymentlastsummaryEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* Cwpaymentreceipt
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-04-15
*/
public interface CwpaymentlastsummaryMapper extends BaseMapper<CwpaymentlastsummaryEntity> {
}

@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-04-10
* 2024-04-15
*/
public interface CwpaymentreceiptMapper extends BaseMapper<CwpaymentreceiptEntity> {

@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-04-10
* 2024-04-15
*/
public interface CwpaymentsummaryMapper extends BaseMapper<CwpaymentsummaryEntity> {

@ -0,0 +1,18 @@
package jnpf.service;
import jnpf.model.cwpaymentreceipt.*;
import jnpf.entity.*;
import java.util.*;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
/**
* Cwpaymentreceipt
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-04-15
*/
public interface CwpaymentlastsummaryService extends IService<CwpaymentlastsummaryEntity> {
QueryWrapper<CwpaymentlastsummaryEntity> getChild(CwpaymentreceiptPagination pagination,QueryWrapper<CwpaymentlastsummaryEntity> cwpaymentlastsummaryQueryWrapper);
}

@ -11,7 +11,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-04-10
* 2024-04-15
*/
public interface CwpaymentreceiptService extends IService<CwpaymentreceiptEntity> {
List<CwpaymentreceiptEntity> getList(CwpaymentreceiptPagination cwpaymentreceiptPagination);
@ -31,6 +31,10 @@ public interface CwpaymentreceiptService extends IService<CwpaymentreceiptEntity
List<CwpaymentsummaryEntity> getCwpaymentsummaryList(String id);
List<CwpaymentlastsummaryEntity> getCwpaymentlastsummaryList(String id,CwpaymentreceiptPagination cwpaymentreceiptPagination);
List<CwpaymentlastsummaryEntity> getCwpaymentlastsummaryList(String id);
//副表数据方法
String checkForm(CwpaymentreceiptForm form,int i);

@ -11,7 +11,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-04-10
* 2024-04-15
*/
public interface CwpaymentsummaryService extends IService<CwpaymentsummaryEntity> {
QueryWrapper<CwpaymentsummaryEntity> getChild(CwpaymentreceiptPagination pagination,QueryWrapper<CwpaymentsummaryEntity> cwpaymentsummaryQueryWrapper);

@ -313,7 +313,7 @@ public class CwCostServiceImpl extends ServiceImpl<CwCostMapper, CwCostEntity> i
if((total>0 && AllIdList.size()>0) || total==0){
Page<CwCostEntity> page=new Page<>(cwCostPagination.getCurrentPage(), cwCostPagination.getPageSize());
if("1".equals(cwCostPagination.getQueryFlowTaskPass())){
cwCostQueryWrapper.inSql("a.id", "SELECT f_process_id FROM flow_task WHERE f_status = '2'");
cwCostQueryWrapper.inSql("id", "SELECT f_process_id FROM flow_task WHERE f_status = '2'");
}
IPage<CwCostEntity> userIPage=this.page(page, cwCostQueryWrapper);
return cwCostPagination.setData(userIPage.getRecords(),userIPage.getTotal());

@ -498,7 +498,7 @@ public class CwaccountServiceImpl extends ServiceImpl<CwaccountMapper, Cwaccount
if((total>0 && AllIdList.size()>0) || total==0){
Page<CwaccountEntity> page=new Page<>(cwaccountPagination.getCurrentPage(), cwaccountPagination.getPageSize());
if("1".equals(cwaccountPagination.getQueryFlowTaskPass())){
cwaccountQueryWrapper.inSql("a.id", "SELECT f_process_id FROM flow_task WHERE f_status = '2'");
cwaccountQueryWrapper.inSql("id", "SELECT f_process_id FROM flow_task WHERE f_status = '2'");
}
IPage<CwaccountEntity> userIPage=this.page(page, cwaccountQueryWrapper);
return cwaccountPagination.setData(userIPage.getRecords(),userIPage.getTotal());

@ -0,0 +1,59 @@
package jnpf.service.impl;
import jnpf.entity.*;
import jnpf.mapper.CwpaymentlastsummaryMapper;
import jnpf.service.*;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jnpf.model.cwpaymentreceipt.*;
import java.math.BigDecimal;
import cn.hutool.core.util.ObjectUtil;
import jnpf.permission.model.authorize.AuthorizeConditionModel;
import jnpf.util.GeneraterSwapUtil;
import jnpf.database.model.superQuery.SuperQueryJsonModel;
import jnpf.database.model.superQuery.ConditionJsonModel;
import jnpf.database.model.superQuery.SuperQueryConditionModel;
import jnpf.model.QueryModel;
import java.util.stream.Collectors;
import jnpf.base.model.ColumnDataModel;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import jnpf.database.model.superQuery.SuperJsonModel;
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.*;
import jnpf.base.UserInfo;
import jnpf.permission.entity.UserEntity;
/**
*
* Cwpaymentreceipt
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-04-15
*/
@Service
public class CwpaymentlastsummaryServiceImpl extends ServiceImpl<CwpaymentlastsummaryMapper, CwpaymentlastsummaryEntity> implements CwpaymentlastsummaryService{
@Autowired
private GeneraterSwapUtil generaterSwapUtil;
@Autowired
private UserProvider userProvider;
//子表过滤方法
@Override
public QueryWrapper<CwpaymentlastsummaryEntity> getChild(CwpaymentreceiptPagination pagination, QueryWrapper<CwpaymentlastsummaryEntity> cwpaymentlastsummaryQueryWrapper){
boolean pcPermission = true;
boolean appPermission = false;
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
String ruleQueryJson = isPc?CwpaymentreceiptConstant.getColumnData():CwpaymentreceiptConstant.getAppColumnData();
ColumnDataModel dataModel = JsonUtil.getJsonToBean(ruleQueryJson,ColumnDataModel.class);
String ruleJson = isPc?JsonUtil.getObjectToString(dataModel.getRuleList()):JsonUtil.getObjectToString(dataModel.getRuleListApp());
if(isPc){
}
return cwpaymentlastsummaryQueryWrapper;
}
}

@ -36,7 +36,7 @@ import jnpf.permission.entity.UserEntity;
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-04-10
* 2024-04-15
*/
@Service
public class CwpaymentreceiptServiceImpl extends ServiceImpl<CwpaymentreceiptMapper, CwpaymentreceiptEntity> implements CwpaymentreceiptService{
@ -48,6 +48,8 @@ public class CwpaymentreceiptServiceImpl extends ServiceImpl<CwpaymentreceiptMap
@Autowired
private CwpaymentsummaryService cwpaymentsummaryService;
@Autowired
private CwpaymentlastsummaryService cwpaymentlastsummaryService;
@Override
public List<CwpaymentreceiptEntity> getList(CwpaymentreceiptPagination cwpaymentreceiptPagination){
return getTypeList(cwpaymentreceiptPagination,cwpaymentreceiptPagination.getDataType());
@ -68,7 +70,10 @@ public class CwpaymentreceiptServiceImpl extends ServiceImpl<CwpaymentreceiptMap
QueryWrapper<CwpaymentreceiptEntity> cwpaymentreceiptQueryWrapper=new QueryWrapper<>();
int cwpaymentsummaryNum =0;
QueryWrapper<CwpaymentsummaryEntity> cwpaymentsummaryQueryWrapper=new QueryWrapper<>();
int cwpaymentlastsummaryNum =0;
QueryWrapper<CwpaymentlastsummaryEntity> cwpaymentlastsummaryQueryWrapper=new QueryWrapper<>();
long cwpaymentsummarycount = cwpaymentsummaryService.count();
long cwpaymentlastsummarycount = cwpaymentlastsummaryService.count();
List<String> allSuperIDlist = new ArrayList<>();
String superOp ="";
if (ObjectUtil.isNotEmpty(cwpaymentreceiptPagination.getSuperQueryJson())){
@ -94,6 +99,14 @@ public class CwpaymentreceiptServiceImpl extends ServiceImpl<CwpaymentreceiptMap
intersectionSuperList.add(cwpaymentsummaryList);
superNum++;
}
String CwpaymentlastsummaryTable = "jg_cw_payment_last_summary";
boolean CwpaymentlastsummaryHasSql = queryJson.contains(CwpaymentlastsummaryTable);
List<String> cwpaymentlastsummaryList = generaterSwapUtil.selectIdsByChildCondition(CwpaymentreceiptConstant.getTableList(), CwpaymentlastsummaryTable , queryJson, null);
if (CwpaymentlastsummaryHasSql){
allSuperList.addAll(cwpaymentlastsummaryList);
intersectionSuperList.add(cwpaymentlastsummaryList);
superNum++;
}
superOp = superNum > 0 ? superJsonModel.getMatchLogic() : "";
//and or
if(superOp.equalsIgnoreCase("and")){
@ -126,6 +139,14 @@ public class CwpaymentreceiptServiceImpl extends ServiceImpl<CwpaymentreceiptMap
intersectionRuleList.add(cwpaymentsummaryList);
ruleNum++;
}
String CwpaymentlastsummaryTable = "jg_cw_payment_last_summary";
boolean CwpaymentlastsummaryHasSql = ruleJson.contains(CwpaymentlastsummaryTable);
List<String> cwpaymentlastsummaryList = generaterSwapUtil.selectIdsByChildCondition(CwpaymentreceiptConstant.getTableList(), CwpaymentlastsummaryTable , ruleJson, null);
if (CwpaymentlastsummaryHasSql){
allRuleList.addAll(cwpaymentlastsummaryList);
intersectionRuleList.add(cwpaymentlastsummaryList);
ruleNum++;
}
ruleOp = ruleNum > 0 ? ruleJsonModel.getMatchLogic() : "";
//and or
if(ruleOp.equalsIgnoreCase("and")){
@ -156,6 +177,15 @@ public class CwpaymentreceiptServiceImpl extends ServiceImpl<CwpaymentreceiptMap
cwpaymentsummaryNum++;
}
}
Object cwpaymentlastsummaryObj=generaterSwapUtil.getAuthorizeCondition(new QueryModel(cwpaymentlastsummaryQueryWrapper,CwpaymentlastsummaryEntity.class,cwpaymentreceiptPagination.getMenuId(),"0"));
if (ObjectUtil.isEmpty(cwpaymentlastsummaryObj)){
return new ArrayList<>();
} else {
cwpaymentlastsummaryQueryWrapper = (QueryWrapper<CwpaymentlastsummaryEntity>)cwpaymentlastsummaryObj;
if( cwpaymentlastsummaryQueryWrapper.getExpression().getNormal().size()>0){
cwpaymentlastsummaryNum++;
}
}
}
}
if(!isPc && appPermission){
@ -182,6 +212,17 @@ public class CwpaymentreceiptServiceImpl extends ServiceImpl<CwpaymentreceiptMap
}
Object cwpaymentlastsummaryObj=generaterSwapUtil.getAuthorizeCondition(new QueryModel(cwpaymentlastsummaryQueryWrapper,CwpaymentlastsummaryEntity.class,cwpaymentreceiptPagination.getMenuId(),"0"));
if (ObjectUtil.isEmpty(cwpaymentlastsummaryObj)){
return new ArrayList<>();
} else {
cwpaymentlastsummaryQueryWrapper = (QueryWrapper<CwpaymentlastsummaryEntity>)cwpaymentlastsummaryObj;
if( cwpaymentlastsummaryQueryWrapper.getExpression().getNormal().size()>0){
cwpaymentlastsummaryNum++;
}
}
}
}
if(isPc){
@ -232,6 +273,15 @@ public class CwpaymentreceiptServiceImpl extends ServiceImpl<CwpaymentreceiptMap
AllIdList.addAll(cwpaymentsummaryIdList);
}
total+=cwpaymentsummaryNum;
if(cwpaymentlastsummaryNum>0){
List<String> cwpaymentlastsummaryIdList = cwpaymentlastsummaryService.list(cwpaymentlastsummaryQueryWrapper).stream().filter(t->StringUtil.isNotEmpty(t.getPaymentId())).map(t->t.getPaymentId()).collect(Collectors.toList());
long count = cwpaymentlastsummaryService.count();
if (count>0){
intersectionList.add(cwpaymentlastsummaryIdList);
}
AllIdList.addAll(cwpaymentlastsummaryIdList);
}
total+=cwpaymentlastsummaryNum;
List<String> intersection = generaterSwapUtil.getIntersection(intersectionList);
if (total>0){
if (intersection.size()==0){
@ -329,6 +379,27 @@ public class CwpaymentreceiptServiceImpl extends ServiceImpl<CwpaymentreceiptMap
queryWrapper.lambda().eq(CwpaymentsummaryEntity::getPaymentId, id);
return cwpaymentsummaryService.list(queryWrapper);
}
/** Cwpaymentlastsummary子表方法 */
@Override
public List<CwpaymentlastsummaryEntity> getCwpaymentlastsummaryList(String id,CwpaymentreceiptPagination cwpaymentreceiptPagination){
Map<String, Object> newtabMap=CwpaymentreceiptConstant.TABLEFIELDKEY.entrySet()
.stream().collect( Collectors.toMap(e->e.getValue(),e->e.getKey()));
String tableName="cwpaymentlastsummary";
tableName=newtabMap.get(tableName)==null?tableName:newtabMap.get(tableName).toString();
QueryWrapper<CwpaymentlastsummaryEntity> queryWrapper = new QueryWrapper<>();
queryWrapper = cwpaymentlastsummaryService.getChild(cwpaymentreceiptPagination,queryWrapper);
queryWrapper.lambda().eq(CwpaymentlastsummaryEntity::getPaymentId, id);
generaterSwapUtil.wrapperHandle(CwpaymentreceiptConstant.getColumnData(), CwpaymentreceiptConstant.getAppColumnData(), queryWrapper,CwpaymentlastsummaryEntity.class,"sub",tableName);
return cwpaymentlastsummaryService.list(queryWrapper);
}
/** Cwpaymentlastsummary子表方法 */
@Override
public List<CwpaymentlastsummaryEntity> getCwpaymentlastsummaryList(String id){
QueryWrapper<CwpaymentlastsummaryEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(CwpaymentlastsummaryEntity::getPaymentId, id);
return cwpaymentlastsummaryService.list(queryWrapper);
}
/** 验证表单唯一字段,正则,非空 i-0新增-1修改*/
@Override
public String checkForm(CwpaymentreceiptForm form,int i) {
@ -344,6 +415,11 @@ public class CwpaymentreceiptServiceImpl extends ServiceImpl<CwpaymentreceiptMap
return "请输入正确的金额";
}
}
if(StringUtil.isNotEmpty(form.getApplyAmount())){
if(!Pattern.compile("^([1-9][\\d]*|0)(\\.[\\d]+)?$").matcher(String.valueOf(form.getApplyAmount())).matches()){
return "请输入正确的金额";
}
}
if(StringUtil.isNotEmpty(form.getPaymentAmount())){
if(!Pattern.compile("^([1-9][\\d]*|0)(\\.[\\d]+)?$").matcher(String.valueOf(form.getPaymentAmount())).matches()){
return "请输入正确的金额";
@ -352,6 +428,8 @@ public class CwpaymentreceiptServiceImpl extends ServiceImpl<CwpaymentreceiptMap
//子表字段验证
if (form.getCwpaymentsummaryList()!=null){
}
if (form.getCwpaymentlastsummaryList()!=null){
}
return countRecover;
}
/**
@ -406,5 +484,22 @@ public class CwpaymentreceiptServiceImpl extends ServiceImpl<CwpaymentreceiptMap
cwpaymentsummaryService.saveOrUpdate(entitys);
}
}
//Cwpaymentlastsummary子表数据新增修改
if(!isSave){
QueryWrapper<CwpaymentlastsummaryEntity> CwpaymentlastsummaryqueryWrapper = new QueryWrapper<>();
CwpaymentlastsummaryqueryWrapper.lambda().eq(CwpaymentlastsummaryEntity::getPaymentId, entity.getId());
cwpaymentlastsummaryService.remove(CwpaymentlastsummaryqueryWrapper);
}
if (cwpaymentreceiptForm.getCwpaymentlastsummaryList()!=null){
List<CwpaymentlastsummaryEntity> tableField311 = JsonUtil.getJsonToList(cwpaymentreceiptForm.getCwpaymentlastsummaryList(),CwpaymentlastsummaryEntity.class);
for(CwpaymentlastsummaryEntity entitys : tableField311){
entitys.setId(RandomUtil.uuId());
entitys.setPaymentId(entity.getId());
if(isSave){
}else{
}
cwpaymentlastsummaryService.saveOrUpdate(entitys);
}
}
}
}

@ -33,7 +33,7 @@ import jnpf.permission.entity.UserEntity;
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-04-10
* 2024-04-15
*/
@Service
public class CwpaymentsummaryServiceImpl extends ServiceImpl<CwpaymentsummaryMapper, CwpaymentsummaryEntity> implements CwpaymentsummaryService{

@ -55,7 +55,7 @@ import org.springframework.transaction.annotation.Transactional;
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-04-10
* @ 2024-04-15
*/
@Slf4j
@RestController
@ -75,6 +75,8 @@ public class CwpaymentreceiptController {
@Autowired
private CwpaymentsummaryService cwpaymentsummaryService;
@Autowired
private CwpaymentlastsummaryService cwpaymentlastsummaryService;
@Autowired
private CwsettlementService cwsettlementService;
@Autowired
@ -98,6 +100,8 @@ public class CwpaymentreceiptController {
//子表数据
List<CwpaymentsummaryEntity> cwpaymentsummaryList = cwpaymentreceiptService.getCwpaymentsummaryList(entity.getId(),cwpaymentreceiptPagination);
cwpaymentreceiptMap.put("tableField207",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(cwpaymentsummaryList)));
List<CwpaymentlastsummaryEntity> cwpaymentlastsummaryList = cwpaymentreceiptService.getCwpaymentlastsummaryList(entity.getId(),cwpaymentreceiptPagination);
cwpaymentreceiptMap.put("tableField311",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(cwpaymentlastsummaryList)));
realList.add(cwpaymentreceiptMap);
}
//数据转换
@ -153,7 +157,7 @@ public class CwpaymentreceiptController {
//可结金额为0已付款
cwsettlementEntity.setPaymentState("3");//已付款
cwsettlementEntity.setCompletionDate(new Date());//完成时间
}
}else{
if(cwsettlementEntity.getSettlableAmount().compareTo(cwsettlementEntity.getPayableAmount()) == 0){
//可结金额=应结金额(未付款)
cwsettlementEntity.setPaymentState("1");//已付款
@ -161,9 +165,9 @@ public class CwpaymentreceiptController {
//可结金额<应结金额(部分付款)
cwsettlementEntity.setPaymentState("2");//部分付款
}
}
cwsettlementService.updateById(cwsettlementEntity);
cwpaymentreceiptService.saveOrUpdate(cwpaymentreceiptForm, id ,true);
}catch(Exception e){
return ActionResult.fail("新增数据失败");
}
@ -189,6 +193,8 @@ public class CwpaymentreceiptController {
//子表数据
List<CwpaymentsummaryEntity> cwpaymentsummaryList = cwpaymentreceiptService.getCwpaymentsummaryList(entity.getId(),cwpaymentreceiptPagination);
cwpaymentreceiptMap.put("tableField207",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(cwpaymentsummaryList)));
List<CwpaymentlastsummaryEntity> cwpaymentlastsummaryList = cwpaymentreceiptService.getCwpaymentlastsummaryList(entity.getId(),cwpaymentreceiptPagination);
cwpaymentreceiptMap.put("tableField311",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(cwpaymentlastsummaryList)));
realList.add(cwpaymentreceiptMap);
}
//数据转换
@ -208,6 +214,8 @@ public class CwpaymentreceiptController {
if(keys.length>0){
ExcelExportEntity tableField207ExcelEntity = new ExcelExportEntity("结算汇总","tableField207");
List<ExcelExportEntity> tableField207List = new ArrayList<>();
ExcelExportEntity tableField311ExcelEntity = new ExcelExportEntity("票据打印汇总","tableField311");
List<ExcelExportEntity> tableField311List = new ArrayList<>();
for(String key:keys){
switch(key){
case "type" :
@ -291,6 +299,48 @@ public class CwpaymentreceiptController {
case "tableField207-remark":
tableField207List.add(new ExcelExportEntity("备注" ,"remark"));
break;
case "tableField311-productId":
tableField311List.add(new ExcelExportEntity("商品id" ,"productId"));
break;
case "tableField311-spec":
tableField311List.add(new ExcelExportEntity("规格" ,"spec"));
break;
case "tableField311-settlementUnit":
tableField311List.add(new ExcelExportEntity("结算单位" ,"settlementUnit"));
break;
case "tableField311-settlementSum":
tableField311List.add(new ExcelExportEntity("结算数量" ,"settlementSum"));
break;
case "tableField311-settlementPrice":
tableField311List.add(new ExcelExportEntity("结算单价(含税)" ,"settlementPrice"));
break;
case "tableField311-settlementSubtotal":
tableField311List.add(new ExcelExportEntity("结算小计(含税)" ,"settlementSubtotal"));
break;
case "tableField311-rate":
tableField311List.add(new ExcelExportEntity("税率" ,"rate"));
break;
case "tableField311-settlementPriceNo":
tableField311List.add(new ExcelExportEntity("结算单价(不含税)" ,"settlementPriceNo"));
break;
case "tableField311-settlementSubtotalNo":
tableField311List.add(new ExcelExportEntity("结算小计(不含税)" ,"settlementSubtotalNo"));
break;
case "tableField311-otherType":
tableField311List.add(new ExcelExportEntity("其他费用类型" ,"otherType"));
break;
case "tableField311-otherExpenses":
tableField311List.add(new ExcelExportEntity("其他费用" ,"otherExpenses"));
break;
case "tableField311-settlementTotal":
tableField311List.add(new ExcelExportEntity("结算合计(含税)" ,"settlementTotal"));
break;
case "tableField311-settlementTotalNo":
tableField311List.add(new ExcelExportEntity("结算合计(不含税)" ,"settlementTotalNo"));
break;
case "tableField311-remark":
tableField311List.add(new ExcelExportEntity("备注" ,"remark"));
break;
default:
break;
}
@ -299,6 +349,10 @@ public class CwpaymentreceiptController {
tableField207ExcelEntity.setList(tableField207List);
entitys.add(tableField207ExcelEntity);
}
if(tableField311List.size() > 0){
tableField311ExcelEntity.setList(tableField311List);
entitys.add(tableField311ExcelEntity);
}
}
ExportParams exportParams = new ExportParams(null, "表单信息");
@ -451,6 +505,8 @@ public class CwpaymentreceiptController {
//子表数据
List<CwpaymentsummaryEntity> cwpaymentsummaryList = cwpaymentreceiptService.getCwpaymentsummaryList(entity.getId());
cwpaymentreceiptMap.put("tableField207",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(cwpaymentsummaryList)));
List<CwpaymentlastsummaryEntity> cwpaymentlastsummaryList = cwpaymentreceiptService.getCwpaymentlastsummaryList(entity.getId());
cwpaymentreceiptMap.put("tableField311",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(cwpaymentlastsummaryList)));
cwpaymentreceiptMap = generaterSwapUtil.swapDataDetail(cwpaymentreceiptMap,CwpaymentreceiptConstant.getFormData(),"547733293450172677",false);
return ActionResult.success(cwpaymentreceiptMap);
}
@ -473,6 +529,8 @@ public class CwpaymentreceiptController {
//子表数据
List<CwpaymentsummaryEntity> cwpaymentsummaryList = cwpaymentreceiptService.getCwpaymentsummaryList(entity.getId());
cwpaymentreceiptMap.put("cwpaymentsummaryList",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(cwpaymentsummaryList)));
List<CwpaymentlastsummaryEntity> cwpaymentlastsummaryList = cwpaymentreceiptService.getCwpaymentlastsummaryList(entity.getId());
cwpaymentreceiptMap.put("cwpaymentlastsummaryList",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(cwpaymentlastsummaryList)));
cwpaymentreceiptMap = generaterSwapUtil.swapDataForm(cwpaymentreceiptMap,CwpaymentreceiptConstant.getFormData(),CwpaymentreceiptConstant.TABLEFIELDKEY,CwpaymentreceiptConstant.TABLERENAMES);
return ActionResult.success(cwpaymentreceiptMap);
}

@ -7,6 +7,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
import jnpf.base.ActionResult;
import jnpf.base.UserInfo;
import jnpf.exception.DataException;
import jnpf.mapper.CwpaymentsummaryMapper;
import jnpf.permission.entity.UserEntity;
import jnpf.service.*;
import jnpf.entity.*;
@ -88,6 +89,10 @@ public class CwsettlementController {
@Autowired
private ConfigValueUtil configValueUtil;
@Autowired
private CwpaymentreceiptService cwpaymentreceiptService;
@Autowired
private CwpaymentsummaryService cwpaymentsummaryService;
/**
*
@ -729,4 +734,58 @@ public class CwsettlementController {
return ActionResult.success(cwsettlementMap);
}
/**
* ()
* 使-
* @param id
* @return
*/
@Operation(summary = "信息")
@GetMapping("/getPaymentReceipt/{id}")
public ActionResult getPaymentReceipt(@PathVariable("id") String id){
CwsettlementEntity entity= cwsettlementService.getInfo(id);
if(entity==null){
return ActionResult.fail("表单数据不存在!");
}
Map<String, Object> cwsettlementMap=JsonUtil.entityToMap(entity);
cwsettlementMap.put("id", cwsettlementMap.get("id"));
//副表数据
//子表数据
List<CwsettlementsubjectEntity> cwsettlementsubjectList = cwsettlementService.getCwsettlementsubjectList(entity.getId());
cwsettlementMap.put("cwsettlementsubjectList",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(cwsettlementsubjectList)));
List<CwsettlementcontractEntity> cwsettlementcontractList = cwsettlementService.getCwsettlementcontractList(entity.getId());
cwsettlementMap.put("cwsettlementcontractList",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(cwsettlementcontractList)));
List<CwsettlementaccountEntity> cwsettlementaccountList = cwsettlementService.getCwsettlementaccountList(entity.getId());
cwsettlementMap.put("cwsettlementaccountList",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(cwsettlementaccountList)));
List<CwsettlementcostEntity> cwsettlementcostList = cwsettlementService.getCwsettlementcostList(entity.getId());
cwsettlementMap.put("cwsettlementcostList",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(cwsettlementcostList)));
List<CwsettlementpaymentreceiptEntity> cwsettlementpaymentreceiptList = cwsettlementService.getCwsettlementpaymentreceiptList(entity.getId());
cwsettlementMap.put("cwsettlementpaymentreceiptList",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(cwsettlementpaymentreceiptList)));
List<CwsettlementsummaryEntity> cwsettlementsummaryList = cwsettlementService.getCwsettlementsummaryList(entity.getId());
for (CwsettlementsummaryEntity cwsettlementsummaryEntity : cwsettlementsummaryList) {
//根据结算单id查询对应付款单idlist
QueryWrapper<CwpaymentreceiptEntity> cwpaymentreceiptQueryWrapper=new QueryWrapper<>();
cwpaymentreceiptQueryWrapper.lambda().eq(CwpaymentreceiptEntity::getSettlementId, id);
List<CwpaymentreceiptEntity> list = cwpaymentreceiptService.list(cwpaymentreceiptQueryWrapper);
if(list != null && list.size() > 0){
List<String> idList= list.stream().map(e -> e.getId()).collect(Collectors.toList());
//根据付款单idlist和tProductId查询对应cwpaymentsummaryList
QueryWrapper<CwpaymentsummaryEntity> cwpaymentsummaryEntityWrapper=new QueryWrapper<>();
cwpaymentsummaryEntityWrapper.lambda().eq(CwpaymentsummaryEntity::getProductId, cwsettlementsummaryEntity.getProductId());
cwpaymentsummaryEntityWrapper.lambda().in(CwpaymentsummaryEntity::getPaymentId, idList);
List<CwpaymentsummaryEntity> CwpaymentsummaryEntityList = cwpaymentsummaryService.list(cwpaymentsummaryEntityWrapper);
for (CwpaymentsummaryEntity cwpaymentsummaryEntity : CwpaymentsummaryEntityList) {
cwsettlementsummaryEntity.setSettlementSum(cwsettlementsummaryEntity.getSettlementSum().subtract(cwpaymentsummaryEntity.getSettlementSum()));
cwsettlementsummaryEntity.setSettlementSubtotal(cwsettlementsummaryEntity.getSettlementSubtotal().subtract(cwpaymentsummaryEntity.getSettlementSubtotal()));
cwsettlementsummaryEntity.setSettlementSubtotalNo(cwsettlementsummaryEntity.getSettlementSubtotalNo().subtract(cwpaymentsummaryEntity.getSettlementSubtotalNo()));
cwsettlementsummaryEntity.setSettlementTotal(cwsettlementsummaryEntity.getSettlementTotal().subtract(cwpaymentsummaryEntity.getSettlementTotal()));
cwsettlementsummaryEntity.setSettlementTotalNo(cwsettlementsummaryEntity.getSettlementTotalNo().subtract(cwpaymentsummaryEntity.getSettlementTotalNo()));
}
}
}
cwsettlementMap.put("cwsettlementsummaryList",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(cwsettlementsummaryList)));
cwsettlementMap = generaterSwapUtil.swapDataForm(cwsettlementMap,CwsettlementConstant.getFormData(),CwsettlementConstant.TABLEFIELDKEY,CwsettlementConstant.TABLERENAMES);
return ActionResult.success(cwsettlementMap);
}
}

@ -0,0 +1,81 @@
package jnpf.entity;
import com.baomidou.mybatisplus.annotation.*;
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 java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigDecimal;
/**
*
*
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-04-15
*/
@Data
@TableName("jg_cw_payment_last_summary")
public class CwpaymentlastsummaryEntity {
@TableId(value ="ID" )
private String id;
@TableField("PAYMENT_ID")
private String paymentId;
@TableField(value = "PRODUCT_ID" , updateStrategy = FieldStrategy.IGNORED)
private String productId;
@TableField(value = "SPEC" , updateStrategy = FieldStrategy.IGNORED)
private String spec;
@TableField(value = "SETTLEMENT_UNIT" , updateStrategy = FieldStrategy.IGNORED)
private String settlementUnit;
@TableField(value = "SETTLEMENT_SUM" , updateStrategy = FieldStrategy.IGNORED)
private BigDecimal settlementSum;
@TableField(value = "SETTLEMENT_PRICE" , updateStrategy = FieldStrategy.IGNORED)
private BigDecimal settlementPrice;
@TableField(value = "SETTLEMENT_SUBTOTAL" , updateStrategy = FieldStrategy.IGNORED)
private BigDecimal settlementSubtotal;
@TableField(value = "RATE" , updateStrategy = FieldStrategy.IGNORED)
private String rate;
@TableField(value = "SETTLEMENT_PRICE_NO" , updateStrategy = FieldStrategy.IGNORED)
private BigDecimal settlementPriceNo;
@TableField(value = "SETTLEMENT_SUBTOTAL_NO" , updateStrategy = FieldStrategy.IGNORED)
private BigDecimal settlementSubtotalNo;
@TableField(value = "OTHER_TYPE" , updateStrategy = FieldStrategy.IGNORED)
private String otherType;
@TableField(value = "OTHER_EXPENSES" , updateStrategy = FieldStrategy.IGNORED)
private BigDecimal otherExpenses;
@TableField(value = "SETTLEMENT_TOTAL" , updateStrategy = FieldStrategy.IGNORED)
private BigDecimal settlementTotal;
@TableField(value = "SETTLEMENT_TOTAL_NO" , updateStrategy = FieldStrategy.IGNORED)
private BigDecimal settlementTotalNo;
@TableField(value = "REMARK" , updateStrategy = FieldStrategy.IGNORED)
private String remark;
@TableField("F_CREATOR_USER_ID")
private String creatorUserId;
@TableField("F_LAST_MODIFY_TIME")
private Date lastModifyTime;
@TableField("F_LAST_MODIFY_USER_ID")
private String lastModifyUserId;
@TableField("F_DELETE_TIME")
private Date deleteTime;
@TableField("F_DELETE_USER_ID")
private String deleteUserId;
@TableField("F_DELETE_MARK")
private Integer deleteMark;
@TableField("F_TENANT_ID")
private String tenantId;
@TableField("F_FLOW_ID")
private String flowId;
@TableField("F_VERSION")
private Integer version;
@TableField("COMPANY_ID")
private String companyId;
@TableField("DEPARTMENT_ID")
private String departmentId;
@TableField("ORGANIZE_JSON_ID")
private String organizeJsonId;
}

@ -12,7 +12,7 @@ import java.math.BigDecimal;
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-04-10
* @ 2024-04-15
*/
@Data
@TableName("jg_cw_payment_receipt")
@ -43,30 +43,30 @@ public class CwpaymentreceiptEntity {
private Date payDate;
@TableField(value = "REMARK" , updateStrategy = FieldStrategy.IGNORED)
private String remark;
@TableField(value = "f_creator_time" , fill = FieldFill.INSERT)
@TableField("F_CREATOR_TIME")
private Date creatorTime;
@TableField(value = "f_creator_user_id" , fill = FieldFill.INSERT)
@TableField("F_CREATOR_USER_ID")
private String creatorUserId;
@TableField(value = "f_last_modify_time" , fill = FieldFill.INSERT_UPDATE)
@TableField("F_LAST_MODIFY_TIME")
private Date lastModifyTime;
@TableField(value = "f_last_modify_user_id" , fill = FieldFill.INSERT_UPDATE)
@TableField("F_LAST_MODIFY_USER_ID")
private String lastModifyUserId;
@TableField(value = "f_delete_time" , fill = FieldFill.UPDATE)
@TableField("F_DELETE_TIME")
private Date deleteTime;
@TableField(value = "f_delete_user_id" , fill = FieldFill.UPDATE)
@TableField("F_DELETE_USER_ID")
private String deleteUserId;
@TableField(value = "f_delete_mark" , updateStrategy = FieldStrategy.IGNORED)
@TableField("F_DELETE_MARK")
private Integer deleteMark;
@TableField(value = "company_id" , fill = FieldFill.INSERT)
private String companyId;
@TableField(value = "department_id" , fill = FieldFill.INSERT)
private String departmentId;
@TableField(value = "organize_json_id" , fill = FieldFill.INSERT)
private String organizeJsonId;
@TableField("F_TENANT_ID")
private String tenantId;
@TableField("F_FLOW_ID")
private String flowId;
@TableField("F_VERSION")
private Integer version;
@TableField("COMPANY_ID")
private String companyId;
@TableField("DEPARTMENT_ID")
private String departmentId;
@TableField("ORGANIZE_JSON_ID")
private String organizeJsonId;
}

@ -17,7 +17,7 @@ import java.math.BigDecimal;
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-04-10
* @ 2024-04-15
*/
@Data
@TableName("jg_cw_payment_summary")
@ -30,8 +30,6 @@ public class CwpaymentsummaryEntity {
private String productId;
@TableField(value = "SPEC" , updateStrategy = FieldStrategy.IGNORED)
private String spec;
@TableField(value = "RATE" , updateStrategy = FieldStrategy.IGNORED)
private String rate;
@TableField(value = "SETTLEMENT_UNIT" , updateStrategy = FieldStrategy.IGNORED)
private String settlementUnit;
@TableField(value = "SETTLEMENT_SUM" , updateStrategy = FieldStrategy.IGNORED)
@ -40,6 +38,8 @@ public class CwpaymentsummaryEntity {
private BigDecimal settlementPrice;
@TableField(value = "SETTLEMENT_SUBTOTAL" , updateStrategy = FieldStrategy.IGNORED)
private BigDecimal settlementSubtotal;
@TableField("RATE")
private String rate;
@TableField(value = "SETTLEMENT_PRICE_NO" , updateStrategy = FieldStrategy.IGNORED)
private BigDecimal settlementPriceNo;
@TableField(value = "SETTLEMENT_SUBTOTAL_NO" , updateStrategy = FieldStrategy.IGNORED)

@ -78,4 +78,9 @@ public class WarehousingStorageEntity {
@TableField(exist = false) //入库单id
private String storageId;
@TableField(exist = false) //类型
private String warehousingStorageTypeName;
@TableField(exist = false) //仓库
private String warehouseName;
}

@ -0,0 +1,63 @@
package jnpf.model.cwpaymentreceipt;
import lombok.Data;
import java.util.List;
import java.util.Date;
import java.math.BigDecimal;
import com.alibaba.fastjson.annotation.JSONField;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
*
* Cwpaymentreceipt
* V3.5
* : https://www.jnpfsoft.com
* JNPF
* 2024-04-15
*/
@Data
public class CwpaymentlastsummaryModel {
/** 商品id **/
@JSONField(name = "productId")
private String productId;
/** 规格 **/
@JSONField(name = "spec")
private String spec;
/** 结算单位 **/
@JSONField(name = "settlementUnit")
private String settlementUnit;
/** 结算数量 **/
@JSONField(name = "settlementSum")
private String settlementSum;
/** 结算单价(含税) **/
@JSONField(name = "settlementPrice")
private String settlementPrice;
/** 结算小计(含税) **/
@JSONField(name = "settlementSubtotal")
private String settlementSubtotal;
/** 税率 **/
@JSONField(name = "rate")
private String rate;
/** 结算单价(不含税) **/
@JSONField(name = "settlementPriceNo")
private String settlementPriceNo;
/** 结算小计(不含税) **/
@JSONField(name = "settlementSubtotalNo")
private String settlementSubtotalNo;
/** 其他费用类型 **/
@JSONField(name = "otherType")
private String otherType;
/** 其他费用 **/
@JSONField(name = "otherExpenses")
private String otherExpenses;
/** 结算合计(含税) **/
@JSONField(name = "settlementTotal")
private String settlementTotal;
/** 结算合计(不含税) **/
@JSONField(name = "settlementTotalNo")
private String settlementTotalNo;
/** 备注 **/
@JSONField(name = "remark")
private String remark;
}

@ -10,7 +10,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-04-10
* @ 2024-04-15
*/
@Data
public class CwpaymentreceiptForm {
@ -19,6 +19,9 @@ public class CwpaymentreceiptForm {
/** 子表数据 **/
@JsonProperty("cwpaymentsummaryList")
private List<CwpaymentsummaryModel> cwpaymentsummaryList;
/** 子表数据 **/
@JsonProperty("cwpaymentlastsummaryList")
private List<CwpaymentlastsummaryModel> cwpaymentlastsummaryList;
/** 乐观锁 **/
@JsonProperty("version")
private Integer version;
@ -60,8 +63,8 @@ public class CwpaymentreceiptForm {
@JsonProperty("settlableAmount")
private String settlableAmount;
/** 申请金额 **/
/*@JsonProperty("applyAmount")
private String applyAmount;*/
@JsonProperty("applyAmount")
private String applyAmount;
/** 付款金额 **/
@JsonProperty("paymentAmount")
private String paymentAmount;

@ -11,7 +11,7 @@ import java.util.List;
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-04-10
* @ 2024-04-15
*/
@Data
public class CwpaymentreceiptPagination extends Pagination {

@ -14,7 +14,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
* V3.5
* : https://www.jnpfsoft.com
* JNPF
* 2024-04-10
* 2024-04-15
*/
@Data
public class CwpaymentsummaryModel {
@ -33,9 +33,6 @@ public class CwpaymentsummaryModel {
/** 结算单价(含税) **/
@JSONField(name = "settlementPrice")
private String settlementPrice;
/** 税率 **/
@JSONField(name = "rate")
private String rate;
/** 结算小计(含税) **/
@JSONField(name = "settlementSubtotal")
private String settlementSubtotal;

@ -26,21 +26,16 @@
<JNPF-table v-loading="listLoading" :data="list" hasC @selection-change="handleSelectionChange" :border="false">
<el-table-column prop="documentNo" label="单据编号" align="center" sortable width="200" fixed="left">
</el-table-column>
<el-table-column label="业务类型" prop="warehousingStorageType" align="center" sortable width="150" fixed="left">
<template slot-scope="scope">
{{ scope.row.warehousingStorageType}}
</template>
<el-table-column prop="warehousingStorageTypeName" label="业务类型" align="center" sortable width="200" fixed="left">
</el-table-column>
<el-table-column prop="warehouseId" label="入库仓库" align="center" width="150">
<el-table-column prop="warehouseName" label="入库仓库" align="center" width="150">
</el-table-column>
<el-table-column prop="warehousingId" label="关联入库通知单号" align="center" width="200">
<el-table-column prop="orderCode" label="关联采购单号" align="center" width="200">
</el-table-column>
<el-table-column prop="purchaseNo" label="关联采购单号" align="center" width="200">
<el-table-column prop="skuNum" label="商品数" align="center" width="200">
</el-table-column>
<el-table-column prop="realityNumber" label="实际入库数量" align="center" width="150">
<el-table-column prop="voucherNum" label="凭证数" align="center" width="200">
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="init" />

@ -1117,7 +1117,7 @@
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="其他费用类型" v-if="judgeShow('cwaccountvoucher-otherType')" prop="otherType" align="center" width="300">
<!-- <el-table-column label="其他费用类型" v-if="judgeShow('cwaccountvoucher-otherType')" prop="otherType" align="center" width="300">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('cwaccountvoucherList-otherType')">*</span>
</template>
@ -1134,7 +1134,7 @@
addonBefore="¥" clearable :style='{"width":"60%"}'>
</JnpfInput>
</template>
</el-table-column>
</el-table-column> -->
<!-- <el-table-column label="其他费用" v-if="judgeShow('cwaccountvoucher-otherExpenses')" prop="otherExpenses" align="center" width="150">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('cwaccountvoucherList-otherExpenses')">*</span>
@ -1333,23 +1333,18 @@
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="其他费用" v-if="judgeShow('cwaccountsummary-otherType')" prop="otherType" align="center" width="200">
<!-- <el-table-column label="其他费用" v-if="judgeShow('cwaccountsummary-otherType')" prop="otherType" align="center" width="200">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('cwaccountsummaryList-otherType')">*</span>
</template>
<template slot-scope="scope">
<!-- <JnpfSelect v-model="scope.row.otherType" placeholder="请选择"
:disabled="true"
clearable :style='{"width":"40%"}' :options="cwaccountvoucherotherTypeOptions"
:props="cwaccountvoucherotherTypeProps">
</JnpfSelect> -->
<JnpfInput v-model="scope.row.otherExpenses"
@change="otherTypeChange(scope.row,scope.$index)" placeholder="请输入"
:disabled="true"
addonBefore="¥" clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="结算合计(含税)" v-if="judgeShow('cwaccountsummary-settlementTotal')"
prop="settlementTotal" align="center" width="200">
<template slot="header">
@ -2075,6 +2070,7 @@
this.dataForm.contractType = '';
},
contractChangeData(model, row){
debugger
this.dataForm.cwaccountcontractList[0].contractName = row.contract_name
this.dataForm.cwaccountcontractList[0].contractPeriodTime = row.contract_period_time ? row.contract_period_time.substring(0, 10) : '';
this.dataForm.cwaccountcontractList[0].contractPeriodTimeEnd = row.contract_period_time_end ? row.contract_period_time_end.substring(0, 10) : '';
@ -2395,7 +2391,7 @@
}
}
}
if (e.otherExpenses) {
/* if (e.otherExpenses) {
var regPos = [{
"pattern": "/^([1-9][\\d]*|0)(\\.[\\d]+)?$/",
"message": "请输入正确的金额"
@ -2412,7 +2408,7 @@
break;
}
}
}
} */
}
return isOk;
},

@ -6,33 +6,36 @@
<template v-if="!loading && formOperates">
<!-- 具体表单 -->
<el-col :span="24">
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">单据类型</span>
</div>
<div>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">
不同的单据类型需要选择不同的收货信息
</span>
</div>
<jnpf-form-tip-item>
<JnpfGroupTitle content="单据类型" contentPosition="left">
</JnpfGroupTitle>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item>
<JnpfText
:textStyle='{"color":"#000000","font-weight":"normal","text-decoration":"none","font-size":12,"line-height":32,"font-style":"normal","text-align":"left"}'
content=" 不同的单据类型,需要选择不同的收货信息">
</JnpfText>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" v-if="judgeShow('type')">
<jnpf-form-tip-item label="类型" v-if="judgeShow('type')" prop="type">
<JnpfRadio v-model="dataForm.type" @change="changeData('type',-1)" :disabled="true"
<JnpfRadio v-model="dataForm.type" @change="changeData('type',-1)" :disabled="judgeWrite('type')"
optionType="button" direction="horizontal" size="medium" :options="typeOptions" :props="typeProps">
</JnpfRadio>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">基础信息</span>
</div>
<jnpf-form-tip-item>
<JnpfGroupTitle content="基础配置" contentPosition="left">
</JnpfGroupTitle>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('code')">
<jnpf-form-tip-item label="单据编号" v-if="judgeShow('code')" prop="code">
<JnpfInput v-model="dataForm.code" @change="changeData('code',-1)" placeholder="系统自动生成"
:disabled="true" readonly :style='{"width":"100%"}'>
:disabled="judgeWrite('code')" readonly :style='{"width":"100%"}'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
@ -77,9 +80,9 @@
</el-col> -->
<el-col :span="8" v-if="judgeShow('paymentAmount')">
<jnpf-form-tip-item label="收付款金额" v-if="judgeShow('paymentAmount')" prop="paymentAmount">
<JnpfInputNumber v-model="dataForm.paymentAmount" @change="changeData('paymentAmount',-1)" placeholder="请输入"
:disabled="judgeWrite('paymentAmount')" addonAfter="元" clearable :style='{"width":"100%"}' :max="Number(dataForm.settlableAmount)" min="0">
</JnpfInputNumber>
<JnpfInput v-model="dataForm.paymentAmount" @change="changeData('paymentAmount',-1)" placeholder="请输入"
:disabled="judgeWrite('paymentAmount')" addonAfter="元" clearable :style='{"width":"100%"}'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" v-if="judgeShow('remark')">
@ -93,7 +96,7 @@
<el-col :span="24" v-if="judgeShow('-${html.relationField}')">
<jnpf-form-tip-item label-width="0">
<div class="JNPF-common-title">
<h2>最后结算明细票据明细</h2>
<h2>结算明细票据明细</h2>
</div>
<el-table :data="dataForm.cwpaymentsummaryList" size='mini' border>
<el-table-column type="index" width="50" label="序号" align="center" fixed="left" />
@ -149,7 +152,7 @@
</template>
</el-table-column>
<el-table-column label="结算单价(含税)" v-if="judgeShow('cwpaymentsummary-settlementPrice')"
prop="settlementPrice" align="center" width="200">
prop="settlementPrice" align="center" width="250">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('cwpaymentsummaryList-settlementPrice')">*</span>结算单价含税
@ -221,7 +224,7 @@
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="其他费用" v-if="judgeShow('cwpaymentsummary-otherType')" prop="otherType" align="center" width="200">
<!-- <el-table-column label="其他费用" v-if="judgeShow('cwpaymentsummary-otherType')" prop="otherType" align="center" width="200">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('cwpaymentsummaryList-otherType')">*</span>
</template>
@ -232,7 +235,7 @@
addonBefore="¥" clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="结算合计(含税)" v-if="judgeShow('cwpaymentsummary-settlementTotal')"
prop="settlementTotal" align="center" width="200">
<template slot="header">
@ -262,8 +265,184 @@
</template>
</el-table-column>
</el-table>
<!-- <div class="table-actions" @click="addcwpaymentsummaryList()" v-if="!judgeWrite('cwpaymentsummaryList')">
<el-button type="text" icon="el-icon-plus">加载票据</el-button>
<div class="table-actions" @click="addcwpaymentsummaryList()" v-if="!judgeWrite('cwpaymentsummaryList')">
<el-button type="text" icon="el-icon-plus">重载开票信息</el-button>
</div>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" v-if="judgeShow('cwpaymentsummary-${html.relationField}')">
<jnpf-form-tip-item label-width="0">
<div class="JNPF-common-title">
<h2>票据打印汇总</h2>
</div>
<el-table :data="dataForm.cwpaymentlastsummaryList" size='mini' border>
<el-table-column type="index" width="50" label="序号" align="center" fixed="left" />
<el-table-column label="商品" v-if="judgeShow('cwpaymentlastsummaryList-productId')" prop="productId" align="center" width="200" fixed="left">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('cwpaymentlastsummaryList-productId')">*</span>
</template>
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.productId"
:rowIndex="scope.$index"
:formData="dataForm" :templateJson="interfaceRes.voucherproductproductId" placeholder="请选择"
:disabled="true"
propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog" relationField='name'
:field="'productId' + scope.$index" interfaceId="529919666429100229" :pageSize="20"
:columnOptions="voucherproductproductIdcolumnOptions" clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
</template>
</el-table-column>
<el-table-column label="规格" v-if="judgeShow('cwpaymentlastsummary-spec')" prop="spec" align="center" width="150">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('cwpaymentlastsummaryList-spec')">*</span>
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.spec" @change="changeData('cwpaymentlastsummary-spec',scope.$index)"
placeholder="请输入"
:disabled="true" clearable
:style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="结算单位" v-if="judgeShow('cwpaymentlastsummary-settlementUnit')" prop="settlementUnit" align="center" width="150">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('cwpaymentlastsummaryList-settlementUnit')">*</span>
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.settlementUnit"
@change="changeData('cwpaymentlastsummary-settlementUnit',scope.$index)" placeholder="请输入"
:disabled="true"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="结算数量" v-if="judgeShow('cwpaymentlastsummary-settlementSum')" prop="settlementSum" align="center" width="150">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('cwpaymentlastsummaryList-settlementSum')">*</span>
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.settlementSum"
@change="changeData('cwpaymentlastsummary-settlementSum',scope.$index)" placeholder="请输入"
:addonAfter="scope.row.settlementUnit"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="结算单价(含税)" v-if="judgeShow('cwpaymentlastsummary-settlementPrice')"
prop="settlementPrice" align="center" width="250">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('cwpaymentlastsummaryList-settlementPrice')">*</span>结算单价含税
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.settlementPrice"
@change="changeData('cwpaymentlastsummary-settlementPrice',scope.$index)" placeholder="请输入"
:addonAfter="'/' + scope.row.settlementUnit" addonBefore="¥"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="结算小计(含税)" v-if="judgeShow('cwpaymentlastsummary-settlementSubtotal')"
prop="settlementSubtotal" align="center" width="200">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('cwpaymentlastsummaryList-settlementSubtotal')">*</span>结算小计含税
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.settlementSubtotal"
@change="changeData('cwpaymentlastsummary-settlementSubtotal',scope.$index)" placeholder="请输入"
addonBefore="¥"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="税率" v-if="judgeShow('cwpaymentlastsummary-settlementSubtotal')"
prop="settlementSubtotal" align="center" width="200">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('cwpaymentlastsummaryList-settlementSubtotal')">*</span>税率
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.rate"
@change="changeData('cwpaymentlastsummary-settlementSubtotal',scope.$index)" placeholder="请输入"
:disabled="true"
addonAfter="%"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="结算单价(不含税)" v-if="judgeShow('cwpaymentlastsummary-settlementPriceNo')"
prop="settlementPriceNo" align="center" width="250">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('cwpaymentlastsummaryList-settlementPriceNo')">*</span>结算单价不含税
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.settlementPriceNo"
@change="changeData('cwpaymentlastsummary-settlementPriceNo',scope.$index)" placeholder="请输入"
:addonAfter="'/' + scope.row.settlementUnit" addonBefore="¥"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="结算小计(不含税)" v-if="judgeShow('cwpaymentlastsummary-settlementSubtotalNo')"
prop="settlementSubtotalNo" align="center" width="200">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('cwpaymentlastsummaryList-settlementSubtotalNo')">*</span>结算小计不含税
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.settlementSubtotalNo"
@change="changeData('cwpaymentlastsummary-settlementSubtotalNo',scope.$index)" placeholder="请输入"
addonBefore="¥"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<!-- <el-table-column label="其他费用" v-if="judgeShow('cwpaymentlastsummary-otherType')" prop="otherType" align="center" width="200">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('cwpaymentlastsummaryList-otherType')">*</span>
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.otherExpenses"
@change="otherTypeChange(scope.row,scope.$index)" placeholder="请输入"
:disabled="true"
addonBefore="¥" clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column> -->
<el-table-column label="结算合计(含税)" v-if="judgeShow('cwpaymentlastsummary-settlementTotal')"
prop="settlementTotal" align="center" width="200">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('cwpaymentlastsummaryList-settlementTotal')">*</span>结算合计含税
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.settlementTotal"
@change="changeData('cwpaymentlastsummary-settlementTotal',scope.$index)" placeholder="请输入"
addonBefore="¥"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="结算合计(不含税)" v-if="judgeShow('cwpaymentlastsummary-settlementTotalNo')"
prop="settlementTotalNo" align="center" width="200">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('cwpaymentlastsummaryList-settlementTotalNo')">*</span>结算合计不含税
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.settlementTotalNo"
@change="changeData('cwpaymentlastsummary-settlementTotalNo',scope.$index)" placeholder="请输入"
addonBefore="¥"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
</el-table>
<!-- <div class="table-actions" @click="addcwpaymentlastsummaryList()"
v-if="!judgeWrite('cwpaymentlastsummaryList')">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div> -->
</jnpf-form-tip-item>
</el-col>
@ -343,6 +522,18 @@
"templateJson": [],
"popupWidth": "800px"
},
cwpaymentlastsummaryList: {
"popupType": "dialog",
"hasPage": true,
"popupTitle": "选择数据",
"pageSize": 20,
"columnOptions": [],
"interfaceId": "",
"interfaceName": "",
"relationOptions": [],
"templateJson": [],
"popupWidth": "800px"
},
},
//
ableAll: {},
@ -376,6 +567,37 @@
remarkOptions: [],
enabledmark: undefined
},
cwpaymentlastsummaryList: {
productId: '',
productIdOptions: [],
spec: '',
specOptions: [],
settlementUnit: '',
settlementUnitOptions: [],
settlementSum: '',
settlementSumOptions: [],
settlementPrice: '',
settlementPriceOptions: [],
settlementSubtotal: '',
settlementSubtotalOptions: [],
rate: '',
rateOptions: [],
settlementPriceNo: '',
settlementPriceNoOptions: [],
settlementSubtotalNo: '',
settlementSubtotalNoOptions: [],
otherType: '',
otherTypeOptions: [],
otherExpenses: '',
otherExpensesOptions: [],
settlementTotal: '',
settlementTotalOptions: [],
settlementTotalNo: '',
settlementTotalNoOptions: [],
remark: '',
remarkOptions: [],
enabledmark: undefined
},
},
Vmodel: "",
currVmodel: "",
@ -395,6 +617,7 @@
paymentAmount: undefined,
remark: undefined,
cwpaymentsummaryList: [],
cwpaymentlastsummaryList: [],
version: 0,
},
tableRequiredData: {},
@ -461,7 +684,6 @@
lastModifyUserId: [],
code: [],
settlementId: [],
voucherproductproductId: [],
payee: [],
payer: [],
payDate: [],
@ -469,6 +691,7 @@
applyAmount: [],
paymentAmount: [],
remark: [],
voucherproductproductId: [],
cwpaymentsummaryproductId: [],
cwpaymentsummaryspec: [],
cwpaymentsummarysettlementUnit: [],
@ -482,6 +705,20 @@
cwpaymentsummarysettlementTotal: [],
cwpaymentsummarysettlementTotalNo: [],
cwpaymentsummaryremark: [],
cwpaymentlastsummaryproductId: [],
cwpaymentlastsummaryspec: [],
cwpaymentlastsummarysettlementUnit: [],
cwpaymentlastsummarysettlementSum: [],
cwpaymentlastsummarysettlementPrice: [],
cwpaymentlastsummarysettlementSubtotal: [],
cwpaymentlastsummaryrate: [],
cwpaymentlastsummarysettlementPriceNo: [],
cwpaymentlastsummarysettlementSubtotalNo: [],
cwpaymentlastsummaryotherType: [],
cwpaymentlastsummaryotherExpenses: [],
cwpaymentlastsummarysettlementTotal: [],
cwpaymentlastsummarysettlementTotalNo: [],
cwpaymentlastsummaryremark: [],
},
}
},
@ -590,6 +827,7 @@
}
}
if (!this.cwpaymentsummaryExist()) return
if (!this.cwpaymentlastsummaryExist()) return
return isOk
},
cwpaymentsummaryExist() {
@ -599,6 +837,13 @@
}
return isOk;
},
cwpaymentlastsummaryExist() {
let isOk = true;
for (let i = 0; i < this.dataForm.cwpaymentlastsummaryList.length; i++) {
const e = this.dataForm.cwpaymentlastsummaryList[i];
}
return isOk;
},
clearData() {
this.dataForm = JSON.parse(JSON.stringify(this.dataValueAll))
},
@ -607,7 +852,19 @@
},
addcwpaymentsummaryList() {
let item = {
this.dataForm.cwpaymentsummaryList.forEach(item => {
//
item.settlementTotal = this.jnpf.floatMul(this.dataForm.paymentAmount, item.proportion)
//
item.settlementTotalNo = this.jnpf.floatDiv(Number(item.settlementTotal), this.jnpf.floatDiv(this.jnpf.floatAdd(100 + Number(item.rate)), 100));
//
item.settlementSubtotal = item.settlementTotal
//
item.settlementSubtotalNo = item.settlementTotalNo
//
item.settlementSum = this.jnpf.floatDiv(item.settlementSubtotal, item.settlementPrice)
})
/* let item = {
productId: undefined,
spec: undefined,
settlementUnit: undefined,
@ -622,7 +879,7 @@
settlementTotalNo: undefined,
remark: undefined,
}
this.getcwpaymentsummaryList(item)
this.getcwpaymentsummaryList(item) */
},
delcwpaymentsummaryList(index) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
@ -642,6 +899,43 @@
this.isEdit = false
this.childIndex = -1
},
addcwpaymentlastsummaryList() {
let item = {
productId: undefined,
spec: undefined,
settlementUnit: undefined,
settlementSum: undefined,
settlementPrice: undefined,
settlementSubtotal: undefined,
rate: undefined,
settlementPriceNo: undefined,
settlementSubtotalNo: undefined,
otherType: undefined,
otherExpenses: undefined,
settlementTotal: undefined,
settlementTotalNo: undefined,
remark: undefined,
}
this.getcwpaymentlastsummaryList(item)
},
delcwpaymentlastsummaryList(index) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
this.dataForm.cwpaymentlastsummaryList.splice(index, 1);
}).catch(() => {});
},
getcwpaymentlastsummaryList(value) {
let item = {
...this.tableRows.cwpaymentlastsummaryList,
...value
}
this.dataForm.cwpaymentlastsummaryList.push(item)
this.childIndex = this.dataForm.cwpaymentlastsummaryList.length - 1
this.isEdit = true
this.isEdit = false
this.childIndex = -1
},
openSelectDialog(key) {
this.currTableConf = this.addTableConf[key]
this.currVmodel = key
@ -733,13 +1027,16 @@
for (let i = 0; i < _dataAll.cwpaymentsummaryList.length; i++) {
this.childIndex = i
}
for (let i = 0; i < _dataAll.cwpaymentlastsummaryList.length; i++) {
this.childIndex = i
}
this.childIndex = -1
},
initCwpaymentreceiptData(){
const data = this.setting.selectData
if(data){
request({
url: `/api/scm/Cwsettlement/${data.id}`,
url: `/api/scm/Cwsettlement/getPaymentReceipt/${data.id}`,
method: 'GET'
}).then(res => {
this.dataForm.settlementId = res.data.id;
@ -750,6 +1047,11 @@
this.dataForm.payee = res.data.cwsettlementpaymentreceiptList[1].name;
this.dataForm.payer = res.data.cwsettlementpaymentreceiptList[0].name;
this.dataForm.cwpaymentsummaryList = res.data.cwsettlementsummaryList;
//
this.dataForm.cwpaymentsummaryList.forEach(item => {
item.proportion = this.jnpf.floatDiv(item.settlementSubtotal, this.dataForm.paymentAmount)
})
this.dataForm.cwpaymentlastsummaryList = JSON.parse(JSON.stringify(res.data.cwsettlementsummaryList))
/* this.dataForm.cwpaymentsummaryList.forEach(item => {

@ -0,0 +1,792 @@
<template>
<div :style="{margin: '0 auto',width:'100%'}">
<el-row :gutter="15" class="">
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px" label-position="right"
:disabled="setting.readonly">
<template v-if="!loading && formOperates">
<!-- 具体表单 -->
<el-col :span="24">
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">单据类型</span>
</div>
<div>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">
不同的单据类型需要选择不同的收货信息
</span>
</div>
</el-col>
<el-col :span="24" v-if="judgeShow('type')">
<jnpf-form-tip-item label="类型" v-if="judgeShow('type')" prop="type">
<JnpfRadio v-model="dataForm.type" @change="changeData('type',-1)" :disabled="true"
optionType="button" direction="horizontal" size="medium" :options="typeOptions" :props="typeProps">
</JnpfRadio>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">基础信息</span>
</div>
</el-col>
<el-col :span="8" v-if="judgeShow('code')">
<jnpf-form-tip-item label="单据编号" v-if="judgeShow('code')" prop="code">
<JnpfInput v-model="dataForm.code" @change="changeData('code',-1)" placeholder="系统自动生成"
:disabled="true" readonly :style='{"width":"100%"}'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('settlementId')">
<jnpf-form-tip-item label="结算单号" v-if="judgeShow('settlementId')" prop="settlementId">
<JnpfPopupSelect v-model="dataForm.settlementId" @change="changeData('settlementId',-1)" :rowIndex="null"
:formData="dataForm" :templateJson="interfaceRes.settlementId" placeholder="请选择"
:disabled="true" propsValue="id" popupWidth="800px" popupTitle="选择数据"
popupType="dialog" relationField='code' field='settlementId' interfaceId="547745774990039365"
:pageSize="20" :columnOptions="settlementIdcolumnOptions" clearable :style='{"width":"100%"}'>
</JnpfPopupSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('payee')">
<jnpf-form-tip-item label="收款方" v-if="judgeShow('payee')" prop="payee">
<JnpfInput v-model="dataForm.payee" @change="changeData('payee',-1)" placeholder="请输入"
:disabled="true" clearable :style='{"width":"100%"}'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('payer')">
<jnpf-form-tip-item label="付款方" v-if="judgeShow('payer')" prop="payer">
<JnpfInput v-model="dataForm.payer" @change="changeData('payer',-1)" placeholder="请输入"
:disabled="true" clearable :style='{"width":"100%"}'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('settlableAmount')">
<jnpf-form-tip-item label="可结金额" v-if="judgeShow('settlableAmount')" prop="settlableAmount">
<JnpfInput v-model="dataForm.settlableAmount" @change="changeData('settlableAmount',-1)" placeholder="请输入"
:disabled="true" addonAfter="元" clearable :style='{"width":"100%"}'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<!-- <el-col :span="8" v-if="judgeShow('applyAmount')">
<jnpf-form-tip-item label="申请金额" v-if="judgeShow('applyAmount')" prop="applyAmount">
<JnpfInput v-model="dataForm.applyAmount" @change="changeData('applyAmount',-1)" placeholder="请输入"
:disabled="judgeWrite('applyAmount')" addonAfter="元" clearable :style='{"width":"100%"}'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col> -->
<el-col :span="8" v-if="judgeShow('paymentAmount')">
<jnpf-form-tip-item label="收付款金额" v-if="judgeShow('paymentAmount')" prop="paymentAmount">
<JnpfInputNumber v-model="dataForm.paymentAmount" @change="changeData('paymentAmount',-1)" placeholder="请输入"
:disabled="judgeWrite('paymentAmount')" addonAfter="元" clearable :style='{"width":"100%"}' :max="Number(dataForm.settlableAmount)" min="0">
</JnpfInputNumber>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" v-if="judgeShow('remark')">
<jnpf-form-tip-item label="备注" v-if="judgeShow('remark')" prop="remark">
<JnpfTextarea v-model="dataForm.remark" @change="changeData('remark',-1)" placeholder="请输入"
:disabled="judgeWrite('remark')" :style='{"width":"100%"}' true type="textarea"
:autosize='{"minRows":4,"maxRows":4}'>
</JnpfTextarea>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" v-if="judgeShow('-${html.relationField}')">
<jnpf-form-tip-item label-width="0">
<div class="JNPF-common-title">
<h2>最后结算明细票据明细</h2>
</div>
<el-table :data="dataForm.cwpaymentsummaryList" size='mini' border>
<el-table-column type="index" width="50" label="序号" align="center" fixed="left" />
<el-table-column label="商品" v-if="judgeShow('cwpaymentsummary-productId')" prop="productId" align="center" width="200" fixed="left">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('cwpaymentsummaryList-productId')">*</span>
</template>
<template slot-scope="scope">
<JnpfPopupSelect v-model="scope.row.productId"
:rowIndex="scope.$index"
:formData="dataForm" :templateJson="interfaceRes.voucherproductproductId" placeholder="请选择"
:disabled="true"
propsValue="id" popupWidth="800px" popupTitle="选择数据" popupType="dialog" relationField='name'
:field="'productId' + scope.$index" interfaceId="529919666429100229" :pageSize="20"
:columnOptions="voucherproductproductIdcolumnOptions" clearable :style='{ "width": "100%" }'>
</JnpfPopupSelect>
</template>
</el-table-column>
<el-table-column label="规格" v-if="judgeShow('cwpaymentsummary-spec')" prop="spec" align="center" width="150">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('cwpaymentsummaryList-spec')">*</span>
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.spec" @change="changeData('cwpaymentsummary-spec',scope.$index)"
placeholder="请输入"
:disabled="true" clearable
:style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="结算单位" v-if="judgeShow('cwpaymentsummary-settlementUnit')" prop="settlementUnit" align="center" width="150">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('cwpaymentsummaryList-settlementUnit')">*</span>
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.settlementUnit"
@change="changeData('cwpaymentsummary-settlementUnit',scope.$index)" placeholder="请输入"
:disabled="true"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="结算数量" v-if="judgeShow('cwpaymentsummary-settlementSum')" prop="settlementSum" align="center" width="150">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('cwpaymentsummaryList-settlementSum')">*</span>
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.settlementSum"
@change="changeData('cwpaymentsummary-settlementSum',scope.$index)" placeholder="请输入"
:addonAfter="scope.row.settlementUnit" :disabled="true"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="结算单价(含税)" v-if="judgeShow('cwpaymentsummary-settlementPrice')"
prop="settlementPrice" align="center" width="200">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('cwpaymentsummaryList-settlementPrice')">*</span>结算单价含税
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.settlementPrice"
@change="changeData('cwpaymentsummary-settlementPrice',scope.$index)" placeholder="请输入"
:disabled="true"
:addonAfter="'/' + scope.row.settlementUnit" addonBefore="¥"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="结算小计(含税)" v-if="judgeShow('cwpaymentsummary-settlementSubtotal')"
prop="settlementSubtotal" align="center" width="200">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('cwpaymentsummaryList-settlementSubtotal')">*</span>结算小计含税
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.settlementSubtotal"
@change="changeData('cwpaymentsummary-settlementSubtotal',scope.$index)" placeholder="请输入"
:disabled="true"
addonBefore="¥"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="税率" v-if="judgeShow('cwpaymentsummary-settlementSubtotal')"
prop="settlementSubtotal" align="center" width="200">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('cwpaymentsummaryList-settlementSubtotal')">*</span>税率
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.rate"
@change="changeData('cwpaymentsummary-settlementSubtotal',scope.$index)" placeholder="请输入"
:disabled="true"
addonAfter="%"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="结算单价(不含税)" v-if="judgeShow('cwpaymentsummary-settlementPriceNo')"
prop="settlementPriceNo" align="center" width="250">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('cwpaymentsummaryList-settlementPriceNo')">*</span>结算单价不含税
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.settlementPriceNo"
@change="changeData('cwpaymentsummary-settlementPriceNo',scope.$index)" placeholder="请输入"
:addonAfter="'/' + scope.row.settlementUnit" addonBefore="¥" :disabled="true"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="结算小计(不含税)" v-if="judgeShow('cwpaymentsummary-settlementSubtotalNo')"
prop="settlementSubtotalNo" align="center" width="200">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('cwpaymentsummaryList-settlementSubtotalNo')">*</span>结算小计不含税
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.settlementSubtotalNo"
@change="changeData('cwpaymentsummary-settlementSubtotalNo',scope.$index)" placeholder="请输入"
addonBefore="¥" :disabled="true"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="其他费用" v-if="judgeShow('cwpaymentsummary-otherType')" prop="otherType" align="center" width="200">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('cwpaymentsummaryList-otherType')">*</span>
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.otherExpenses"
@change="otherTypeChange(scope.row,scope.$index)" placeholder="请输入"
:disabled="true"
addonBefore="¥" clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="结算合计(含税)" v-if="judgeShow('cwpaymentsummary-settlementTotal')"
prop="settlementTotal" align="center" width="200">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('cwpaymentsummaryList-settlementTotal')">*</span>结算合计含税
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.settlementTotal"
@change="changeData('cwpaymentsummary-settlementTotal',scope.$index)" placeholder="请输入"
addonBefore="¥" :disabled="true"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="结算合计(不含税)" v-if="judgeShow('cwpaymentsummary-settlementTotalNo')"
prop="settlementTotalNo" align="center" width="200">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('cwpaymentsummaryList-settlementTotalNo')">*</span>结算合计不含税
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.settlementTotalNo"
@change="changeData('cwpaymentsummary-settlementTotalNo',scope.$index)" placeholder="请输入"
addonBefore="¥" :disabled="true"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
</el-table>
<!-- <div class="table-actions" @click="addcwpaymentsummaryList()" v-if="!judgeWrite('cwpaymentsummaryList')">
<el-button type="text" icon="el-icon-plus">加载票据</el-button>
</div> -->
</jnpf-form-tip-item>
</el-col>
<!-- 表单结束 -->
</template>
<SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm" ref="selectDialog"
@select="addForSelect" @close="selectDialogVisible=false" />
</el-form>
</el-row>
<UserBox v-if="userBoxVisible" ref="userBox" @submit="submit" />
</div>
</template>
<script>
import request from '@/utils/request'
import {
mapGetters
} from "vuex";
import {
getFormById
} from '@/api/workFlow/FormDesign'
import comMixin from '@/views/workFlow/workFlowForm/mixin';
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
import {
getDefaultCurrentValueUserId
} from '@/api/permission/user'
import {
getDefaultCurrentValueDepartmentId
} from '@/api/permission/organize'
import {
getDateDay,
getLaterData,
getBeforeData,
getBeforeTime,
getLaterTime
} from '@/components/Generator/utils/index.js'
import {
thousandsFormat
} from "@/components/Generator/utils/index"
export default {
mixins: [comMixin],
components: {},
props: [],
data() {
return {
dataFormSubmitType: 0,
continueBtnLoading: false,
index: 0,
prevDis: false,
nextDis: false,
allList: [],
visible: false,
loading: false,
btnLoading: false,
formRef: 'formRef',
setting: {},
eventType: '',
userBoxVisible: false,
selectDialogVisible: false,
currTableConf: {},
dataValueAll: {},
addTableConf: {
cwpaymentsummaryList: {
"popupType": "dialog",
"hasPage": true,
"popupTitle": "选择数据",
"pageSize": 20,
"columnOptions": [],
"interfaceId": "",
"interfaceName": "",
"relationOptions": [],
"templateJson": [],
"popupWidth": "800px"
},
},
//
ableAll: {},
tableRows: {
cwpaymentsummaryList: {
productId: '',
productIdOptions: [],
spec: '',
specOptions: [],
settlementUnit: '',
settlementUnitOptions: [],
settlementSum: '',
settlementSumOptions: [],
settlementPrice: '',
settlementPriceOptions: [],
settlementSubtotal: '',
settlementSubtotalOptions: [],
settlementPriceNo: '',
settlementPriceNoOptions: [],
settlementSubtotalNo: '',
settlementSubtotalNoOptions: [],
otherType: '',
otherTypeOptions: [],
otherExpenses: '',
otherExpensesOptions: [],
settlementTotal: '',
settlementTotalOptions: [],
settlementTotalNo: '',
settlementTotalNoOptions: [],
remark: '',
remarkOptions: [],
enabledmark: undefined
},
},
Vmodel: "",
currVmodel: "",
dataForm: {
type: "1",
creatorUserId: undefined,
creatorTime: undefined,
lastModifyTime: undefined,
lastModifyUserId: undefined,
code: undefined,
settlementId: undefined,
payee: undefined,
payer: undefined,
payDate: undefined,
settlableAmount: undefined,
applyAmount: undefined,
paymentAmount: undefined,
remark: undefined,
cwpaymentsummaryList: [],
version: 0,
},
tableRequiredData: {},
dataRule: {
type: [{
required: true,
message: '请至少选择一个',
trigger: 'change'
}, ],
settlableAmount: [{
pattern: /^([1-9][\d]*|0)(\.[\d]+)?$/,
message: '请输入正确的金额',
trigger: 'blur'
}, ],
applyAmount: [{
pattern: /^([1-9][\d]*|0)(\.[\d]+)?$/,
message: '请输入正确的金额',
trigger: 'blur'
}, ],
paymentAmount: [{
pattern: /^([1-9][\d]*|0)(\.[\d]+)?$/,
message: '请输入正确的金额',
trigger: 'blur'
}, ],
},
voucherproductproductIdcolumnOptions: [{ "label": "商品编码", "value": "code" }, { "label": "商品名称", "value": "name" }, { "label": "规格", "value": "spec" },],
typeOptions: [{
"fullName": "采购付款",
"id": "1"
}, {
"fullName": "销售付款",
"id": "2"
}, {
"fullName": "其他付款",
"id": "3"
}],
typeProps: {
"label": "fullName",
"value": "id"
},
settlementIdcolumnOptions: [{
"label": "结算单号",
"value": "code"
}, {
"label": "类型",
"value": "type"
}, {
"label": "应结金额",
"value": "payable_amount"
}, {
"label": "已结金额",
"value": "settled_amount"
}, {
"label": "可结金额",
"value": "settlable_amount"
}, ],
childIndex: -1,
isEdit: false,
interfaceRes: {
type: [],
creatorUserId: [],
creatorTime: [],
lastModifyTime: [],
lastModifyUserId: [],
code: [],
settlementId: [],
voucherproductproductId: [],
payee: [],
payer: [],
payDate: [],
settlableAmount: [],
applyAmount: [],
paymentAmount: [],
remark: [],
cwpaymentsummaryproductId: [],
cwpaymentsummaryspec: [],
cwpaymentsummarysettlementUnit: [],
cwpaymentsummarysettlementSum: [],
cwpaymentsummarysettlementPrice: [],
cwpaymentsummarysettlementSubtotal: [],
cwpaymentsummarysettlementPriceNo: [],
cwpaymentsummarysettlementSubtotalNo: [],
cwpaymentsummaryotherType: [],
cwpaymentsummaryotherExpenses: [],
cwpaymentsummarysettlementTotal: [],
cwpaymentsummarysettlementTotalNo: [],
cwpaymentsummaryremark: [],
},
}
},
computed: {
formOperates() {
return this.setting.formOperates
}
},
watch: {},
created() {
this.getFormById()
if (this.dataForm.id == null || this.dataForm.id == '' && this.dataForm.id == undefined || this.dataForm.id ==
0) {
this.initDefaultData()
}
this.dataValueAll = JSON.parse(JSON.stringify(this.dataForm))
},
mounted() {
this.initCwpaymentreceiptData();
},
methods: {
changeData(model, index) {
this.isEdit = false
this.childIndex = index
let modelAll = model.split("-");
let faceMode = "";
for (let i = 0; i < modelAll.length; i++) {
faceMode += modelAll[i];
}
for (let key in this.interfaceRes) {
if (key != faceMode) {
let faceReList = this.interfaceRes[key]
for (let i = 0; i < faceReList.length; i++) {
if (faceReList[i].relationField == model) {
let options = 'get' + key + 'Options';
if (this[options]) {
this[options]()
}
this.changeData(key, index)
}
}
}
}
},
changeDataFormData(type, data, model, index, defaultValue) {
if (!this.isEdit) {
if (type == 2) {
for (let i = 0; i < this.dataForm[data].length; i++) {
if (index == -1) {
this.dataForm[data][i][model] = defaultValue
} else if (index == i) {
this.dataForm[data][i][model] = defaultValue
}
}
} else {
this.dataForm[data] = defaultValue
}
}
},
dataAll() {},
selfGetInfo(dataForm) {
this.dataInfo(dataForm)
},
beforeSubmit() {
const _data = this.dataList()
return _data
},
selfInit() {
this.dataAll()
},
getFormById() {
getFormById("547733293450172677").then(res => {
this.dataForm.flowId = res.data && res.data.flowId
// this.encode = res.data&&res.data.encode
})
},
exist() {
let isOk = true
for (let key in this.tableRequiredData) {
if (this.dataForm[key] && Array.isArray(this.dataForm[key])) {
for (let i = 0; i < this.dataForm[key].length; i++) {
let item = this.dataForm[key][i]
inner: for (let id in item) {
let arr = this.tableRequiredData[key].filter(o => o.id === id) || []
if (!arr.length) continue inner
if (arr[0].required) {
let msg = `${arr[0].name}不能为空`
let boo = true
if (arr[0].dataType === 'array') {
boo = !this.jnpf.isEmptyArray(item[id])
} else {
boo = !this.jnpf.isEmpty(item[id])
}
if (!boo) {
this.$message({
message: msg,
type: 'error',
duration: 1000
})
isOk = false
break
}
}
}
}
}
}
if (!this.cwpaymentsummaryExist()) return
return isOk
},
cwpaymentsummaryExist() {
let isOk = true;
for (let i = 0; i < this.dataForm.cwpaymentsummaryList.length; i++) {
const e = this.dataForm.cwpaymentsummaryList[i];
}
return isOk;
},
clearData() {
this.dataForm = JSON.parse(JSON.stringify(this.dataValueAll))
},
//
initDefaultData() {
},
addcwpaymentsummaryList() {
let item = {
productId: undefined,
spec: undefined,
settlementUnit: undefined,
settlementSum: undefined,
settlementPrice: undefined,
settlementSubtotal: undefined,
settlementPriceNo: undefined,
settlementSubtotalNo: undefined,
otherType: undefined,
otherExpenses: undefined,
settlementTotal: undefined,
settlementTotalNo: undefined,
remark: undefined,
}
this.getcwpaymentsummaryList(item)
},
delcwpaymentsummaryList(index) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
this.dataForm.cwpaymentsummaryList.splice(index, 1);
}).catch(() => {});
},
getcwpaymentsummaryList(value) {
let item = {
...this.tableRows.cwpaymentsummaryList,
...value
}
this.dataForm.cwpaymentsummaryList.push(item)
this.childIndex = this.dataForm.cwpaymentsummaryList.length - 1
this.isEdit = true
this.isEdit = false
this.childIndex = -1
},
openSelectDialog(key) {
this.currTableConf = this.addTableConf[key]
this.currVmodel = key
this.selectDialogVisible = true
this.$nextTick(() => {
this.$refs.selectDialog.init()
})
},
addForSelect(data) {
for (let i = 0; i < data.length; i++) {
let t = data[i]
if (this['get' + this.currVmodel]) {
this['get' + this.currVmodel](t)
}
}
},
dateTime(timeRule, timeType, timeTarget, timeValueData, dataValue) {
let timeDataValue = null;
let timeValue = Number(timeValueData)
if (timeRule) {
if (timeType == 1) {
timeDataValue = timeValue
} else if (timeType == 2) {
timeDataValue = dataValue
} else if (timeType == 3) {
timeDataValue = new Date().getTime()
} else if (timeType == 4) {
let previousDate = '';
if (timeTarget == 1 || timeTarget == 2) {
previousDate = getDateDay(timeTarget, timeType, timeValue)
timeDataValue = new Date(previousDate).getTime()
} else if (timeTarget == 3) {
previousDate = getBeforeData(timeValue)
timeDataValue = new Date(previousDate).getTime()
} else {
timeDataValue = getBeforeTime(timeTarget, timeValue).getTime()
}
} else if (timeType == 5) {
let previousDate = '';
if (timeTarget == 1 || timeTarget == 2) {
previousDate = getDateDay(timeTarget, timeType, timeValue)
timeDataValue = new Date(previousDate).getTime()
} else if (timeTarget == 3) {
previousDate = getLaterData(timeValue)
timeDataValue = new Date(previousDate).getTime()
} else {
timeDataValue = getLaterTime(timeTarget, timeValue).getTime()
}
}
}
return timeDataValue;
},
time(timeRule, timeType, timeTarget, timeValue, formatType, dataValue) {
let format = formatType == 'HH:mm' ? 'HH:mm:00' : formatType
let timeDataValue = null
if (timeRule) {
if (timeType == 1) {
timeDataValue = timeValue || '00:00:00'
if (timeDataValue.split(':').length == 3) {
timeDataValue = timeDataValue
} else {
timeDataValue = timeDataValue + ':00'
}
} else if (timeType == 2) {
timeDataValue = dataValue
} else if (timeType == 3) {
timeDataValue = this.jnpf.toDate(new Date(), format)
} else if (timeType == 4) {
let previousDate = '';
previousDate = getBeforeTime(timeTarget, timeValue)
timeDataValue = this.jnpf.toDate(previousDate, format)
} else if (timeType == 5) {
let previousDate = '';
previousDate = getLaterTime(timeTarget, timeValue)
timeDataValue = this.jnpf.toDate(previousDate, format)
}
}
return timeDataValue;
},
dataList() {
var _data = this.dataForm;
return _data;
},
dataInfo(dataAll) {
let _dataAll = dataAll
this.dataForm = _dataAll
this.isEdit = true
this.dataAll()
for (let i = 0; i < _dataAll.cwpaymentsummaryList.length; i++) {
this.childIndex = i
}
this.childIndex = -1
},
initCwpaymentreceiptData(){
const data = this.setting.selectData
if(data){
request({
url: `/api/scm/Cwsettlement/${data.id}`,
method: 'GET'
}).then(res => {
this.dataForm.settlementId = res.data.id;
this.dataForm.settlementCode = res.data.code;
this.dataForm.type = res.data.type;
this.dataForm.settlableAmount = res.data.settlableAmount;
this.dataForm.paymentAmount = res.data.settlableAmount;
this.dataForm.payee = res.data.cwsettlementpaymentreceiptList[1].name;
this.dataForm.payer = res.data.cwsettlementpaymentreceiptList[0].name;
this.dataForm.cwpaymentsummaryList = res.data.cwsettlementsummaryList;
/* this.dataForm.cwpaymentsummaryList.forEach(item => {
`settlement_sum` decimal(32,6) DEFAULT NULL COMMENT '结算数量',
`settlement_price` decimal(32,6) DEFAULT NULL COMMENT '结算单价(含税)',
`settlement_subtotal` decimal(32,6) DEFAULT NULL COMMENT '结算小计(含税)',
`rate` varchar(255) DEFAULT NULL COMMENT '税率',
`settlement_price_no` decimal(32,6) DEFAULT NULL COMMENT '结算单价(不含税)',
`settlement_subtotal_no` decimal(32,6) DEFAULT NULL COMMENT '结算小计(不含税)',
`other_type` char(1) DEFAULT NULL COMMENT '其他费用类型1增加+ 2减少-',
`other_expenses` decimal(32,6) DEFAULT NULL COMMENT '其他费用',
`settlement_total` decimal(32,6) DEFAULT NULL COMMENT '结算合计(含税)',
`settlement_total_no` decimal(32,6) DEFAULT NULL COMMENT '结算合计(不含税)',
/// = ()
item.settlementPrice = this.jnpf.floatAdd(item.settlementPrice, this.jnpf.floatDiv(costAmount, summarySettlementSum));//
//()=*
item.settlementSubtotal = this.jnpf.floatMul(item.settlementPrice, item.settlementSum)
//= +
item.settlementTotal = item.settlementSubtotal + item.otherExpenses
//()
item.settlementPriceNo = this.jnpf.floatDiv(Number(item.settlementPrice), this.jnpf.floatDiv(this.jnpf.floatAdd(100 + Number(item.rate)), 100));
//()
item.settlementSubtotalNo = this.jnpf.floatMul(Number(item.settlementSum), Number(item.settlementPriceNo));
///
settlementAmount = this.jnpf.floatAdd(settlementAmount, item.settlementTotal);
}) */
})
}
}
},
}
</script>

@ -0,0 +1,640 @@
<template>
<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.code" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="类型">
<JnpfSelect v-model="query.type" placeholder="请选择" clearable :options="typeOptions" :props="typeProps">
</JnpfSelect>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="收款方">
<el-input v-model="query.payee" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
<template v-if="showAll">
<el-col :span="6">
<el-form-item label="付款方">
<el-input v-model="query.payer" placeholder="请输入" clearable> </el-input>
</el-form-item>
</el-col>
</template>
<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-button type="text" icon="el-icon-arrow-down" @click="showAll=true" v-if="!showAll">
展开
</el-button>
<el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>
收起
</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="icon-ym icon-ym-btn-add" v-has="'btn_add'" @click="addOrUpdateHandle()">
</el-button>
<el-button type="text" icon="icon-ym icon-ym-btn-download" @click="exportData()" v-has="'btn_download'">
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip content="高级查询" placement="top" v-if="true">
<el-link icon="icon-ym icon-ym-filter JNPF-common-head-icon" :underline="false"
@click="openSuperQuery()" />
</el-tooltip>
<el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" @click="initData()" />
</el-tooltip>
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' :span-method="arraySpanMethod"
show-summary :summary-method="getTableSummaries" border>
<el-table-column label="类型" prop="type" align="center" width="150" fixed="left">
<template slot-scope="scope">
{{ scope.row.type}}
</template>
</el-table-column>
<el-table-column prop="code" label="单据编号" align="center" width="200" fixed="left">
</el-table-column>
<el-table-column prop="settlementId" label="结算单号" align="center" width="200" fixed="left">
</el-table-column>
<el-table-column prop="payee" label="收款方" align="center" width="250">
</el-table-column>
<el-table-column prop="payer" label="付款方" align="center" width="250">
</el-table-column>
<el-table-column prop="creatorTime" label="收付款时间" align="center" width="150">
</el-table-column>
<el-table-column prop="paymentAmount" label="收付款金额" align="center" width="150">
</el-table-column>
<el-table-column prop="settlableAmount" label="可结金额" align="center" width="150">
</el-table-column>
<el-table-column prop="creatorUserId" label="创建用户" align="center" width="150">
</el-table-column>
<el-table-column prop="creatorTime" label="创建时间" align="center" width="150">
</el-table-column>
<el-table-column prop="lastModifyTime" label="修改时间" align="center" width="150">
</el-table-column>
<el-table-column prop="lastModifyUserId" label="修改用户" align="center" width="150">
</el-table-column>
<el-table-column prop="flowState" label="状态" width="100" align="center">
<template slot-scope="scope" v-if="!scope.row.top">
<el-tag v-if="scope.row.flowState==1"></el-tag>
<el-tag type="success" v-else-if="scope.row.flowState==2">审核通过</el-tag>
<el-tag type="danger" v-else-if="scope.row.flowState==3">审核驳回</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState==4">流程撤回</el-tag>
<el-tag type="info" v-else-if="scope.row.flowState==5">审核终止</el-tag>
<el-tag type="warning" v-else></el-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="150" align="center">
<template slot-scope="scope">
<el-button type="text" :disabled="[1,2,4,5].indexOf(scope.row.flowState)>-1"
@click="updateHandle(scope.row)" v-has="'btn_edit'">编辑
</el-button>
<!-- <el-button type="text" class="JNPF-table-delBtn" :disabled="[1,2,3,5].indexOf(scope.row.flowState)>-1"
v-has="'btn_remove'" @click="handleDel(scope.row.id)">删除
</el-button> -->
<el-button size="mini" type="text" :disabled="!scope.row.flowState"
@click="updateHandle(scope.row,scope.row.flowState)">详情</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" />
<FlowBox v-if="flowVisible" ref="FlowBox" @close="colseFlow" />
<el-dialog title="请选择流程" :close-on-click-modal="false" append-to-body :visible.sync="flowListVisible"
class="JNPF-dialog template-dialog JNPF-dialog_center" lock-scroll width="400px">
<el-scrollbar class="template-list">
<div class="template-item" v-for="item in flowList" :key="item.id" @click="selectFlow(item)">{{item.fullName}}
</div>
</el-scrollbar>
</el-dialog>
<ImportBox v-if="uploadBoxVisible" ref="UploadBox" @refresh="initData" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
<ToFormDetail v-if="toFormDetailVisible" ref="toFormDetail" @close="toFormDetailVisible = false" />
<SuperQuery v-if="superQueryVisible" ref="SuperQuery" :columnOptions="superQueryJson" @superQuery="superQuery" />
</div>
</template>
<script>
import request from '@/utils/request'
import {
mapGetters
} from "vuex";
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
import {
getFormById
} from '@/api/workFlow/FormDesign'
import {
getFlowList
} from '@/api/workFlow/FlowEngine'
import FlowBox from '@/views/workFlow/components/FlowBox'
import ExportBox from '@/components/ExportBox'
import ToFormDetail from '@/views/basic/dynamicModel/list/detail'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import {
getConfigData
} from '@/api/onlineDev/visualDev'
import {
getDefaultCurrentValueUserIdAsync
} from '@/api/permission/user'
import {
getDefaultCurrentValueDepartmentIdAsync
} from '@/api/permission/organize'
import columnList from './columnList'
import {
thousandsFormat
} from "@/components/Generator/utils/index"
import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson'
export default {
components: {
FlowBox,
ExportBox,
ToFormDetail,
SuperQuery
},
data() {
return {
keyword: '',
expandsTree: true,
refreshTree: true,
toFormDetailVisible: false,
expandObj: {},
columnOptions: [],
mergeList: [],
exportList: [],
columnList,
showAll: false,
superQueryVisible: false,
superQueryJson,
uploadBoxVisible: false,
detailVisible: false,
query: {
code: undefined,
type: undefined,
payee: undefined,
payer: undefined,
},
treeProps: {
children: 'children',
label: 'fullName',
value: 'id',
isLeaf: 'isLeaf'
},
list: [],
listLoading: true,
total: 0,
queryData: {},
listQuery: {
superQueryJson: '',
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "",
},
formVisible: false,
flowVisible: false,
flowListVisible: false,
flowList: [],
exportBoxVisible: false,
typeOptions: [{
"fullName": "采购付款",
"id": "1"
}, {
"fullName": "销售付款",
"id": "2"
}, {
"fullName": "其他付款",
"id": "3"
}],
typeProps: {
"label": "fullName",
"value": "id"
},
interfaceRes: {
settlementId: [],
},
}
},
computed: {
...mapGetters(['userInfo']),
menuId() {
return this.$route.meta.modelId || ''
}
},
created() {
getFormById("547733293450172677").then(res1 => {
let flowId = res1.data && res1.data.id
getFlowList(flowId, '1').then(res2 => {
this.flowList = res2.data
this.getColumnList(),
this.initSearchDataAndListData()
this.queryData = JSON.parse(JSON.stringify(this.query))
}).catch((e) => {
this.$message({
type: 'error',
message: e.message
});
this.$router.push('/404');
})
})
},
methods: {
toDetail(defaultValue, modelId) {
if (!defaultValue) return
getConfigData(modelId).then(res => {
if (!res.data || !res.data.formData) return
let formData = JSON.parse(res.data.formData)
formData.popupType = 'general'
this.toFormDetailVisible = true
this.$nextTick(() => {
this.$refs.toFormDetail.init(formData, modelId, defaultValue)
})
})
},
toggleTreeExpand(expands) {
this.refreshTree = false
this.expandsTree = expands
this.$nextTick(() => {
this.refreshTree = true
this.$nextTick(() => {
this.$refs.treeBox.setCurrentKey(null)
})
})
},
filterNode(value, data) {
if (!value) return true;
return data[this.treeProps.label].indexOf(value) !== -1;
},
loadNode(node, resolve) {
const nodeData = node.data
const config = {
treeInterfaceId: "",
treeTemplateJson: []
}
if (config.treeInterfaceId) {
//
if (config.treeTemplateJson && config.treeTemplateJson.length) {
for (let i = 0; i < config.treeTemplateJson.length; i++) {
const element = config.treeTemplateJson[i];
element.defaultValue = nodeData[element.relationField] || ''
}
}
//
let query = {
paramList: config.treeTemplateJson || [],
}
//
getDataInterfaceRes(config.treeInterfaceId, query).then(res => {
let data = res.data
if (Array.isArray(data)) {
resolve(data);
} else {
resolve([]);
}
})
}
},
getTableSummaries(param) {
const {
columns,
data
} = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计';
return;
} else if ([].includes(column.property)) {
const values = data.map(item => {
if (column.property.includes('.')) {
const [attr1, attr2] = column.property.split('.')
return Number(item[attr1][attr2])
}
return Number(item[column.property])
});
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0).toFixed(2);
if ([].includes(column.property)) {
sums[index] = thousandsFormat(sums[index]);
}
} else {
sums[index] = '';
}
}
})
return sums;
},
getColumnList() {
//
this.columnOptions = this.transformColumnList(this.columnList)
},
transformColumnList(columnList) {
let list = []
for (let i = 0; i < columnList.length; i++) {
const e = columnList[i];
if (!e.prop.includes('-')) {
list.push(e)
} else {
let prop = e.prop.split('-')[0]
let label = e.label.split('-')[0]
let vModel = e.prop.split('-')[1]
let newItem = {
align: "center",
jnpfKey: "table",
prop,
label,
children: []
}
e.vModel = vModel
if (!this.expandObj.hasOwnProperty(`${prop}Expand`)) this.$set(this.expandObj, `${prop}Expand`, false)
if (!list.some(o => o.prop === prop)) list.push(newItem)
for (let i = 0; i < list.length; i++) {
if (list[i].prop === prop) {
list[i].children.push(e)
break
}
}
}
}
this.getMergeList(list)
this.getExportList(list)
return list
},
arraySpanMethod({
column
}) {
for (let i = 0; i < this.mergeList.length; i++) {
if (column.property == this.mergeList[i].prop) {
return [this.mergeList[i].rowspan, this.mergeList[i].colspan]
}
}
},
getMergeList(list) {
let newList = JSON.parse(JSON.stringify(list))
newList.forEach(item => {
if (item.children && item.children.length) {
let child = {
prop: item.prop + '-child-first'
}
item.children.unshift(child)
}
})
newList.forEach(item => {
if (item.children && item.children.length) {
item.children.forEach((child, index) => {
if (index == 0) {
this.mergeList.push({
prop: child.prop,
rowspan: 1,
colspan: item.children.length
})
} else {
this.mergeList.push({
prop: child.prop,
rowspan: 0,
colspan: 0
})
}
})
} else {
this.mergeList.push({
prop: item.prop,
rowspan: 1,
colspan: 1
})
}
})
},
getExportList(list) {
let exportList = []
for (let i = 0; i < list.length; i++) {
if (list[i].jnpfKey === 'table') {
for (let j = 0; j < list[i].children.length; j++) {
exportList.push(list[i].children[j])
}
} else {
exportList.push(list[i])
}
}
this.exportList = exportList
},
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()
},
async initSearchDataAndListData() {
await this.initSearchData()
this.initData()
},
//
async initSearchData() {},
initData() {
this.listLoading = true;
let _query = {
...this.listQuery,
...this.query,
keyword: this.keyword,
dataType: 0,
menuId: this.menuId,
moduleId: '547733293450172677',
type: 1,
};
request({
url: `/api/scm/Cwpaymentreceipt/getList`,
method: 'post',
data: _query
}).then(res => {
var _list = res.data.list;
this.list = _list.map(o => ({
...o,
...this.expandObj,
}))
this.total = res.data.pagination.total
this.listLoading = false
})
},
handleDel(id) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
request({
url: `/api/scm/Cwpaymentreceipt/${id}`,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
}).catch(() => {});
},
handelUpload() {
this.uploadBoxVisible = true
this.$nextTick(() => {
this.$refs.UploadBox.init("", "scm/Cwpaymentreceipt")
})
},
openSuperQuery() {
this.superQueryVisible = true
this.$nextTick(() => {
this.$refs.SuperQuery.init()
})
},
superQuery(queryJson) {
this.listQuery.superQueryJson = queryJson
this.listQuery.currentPage = 1
this.initData()
},
addOrUpdateHandle(row, flowState) {
if (!row) {
this.addHandle();
} else {
this.updateHandle(row, flowState)
}
},
exportData() {
this.exportBoxVisible = true
this.$nextTick(() => {
this.$refs.ExportBox.init(this.exportList)
})
},
download(data) {
let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId
}
request({
url: `/api/scm/Cwpaymentreceipt/Actions/Export`,
method: 'post',
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
this.listQuery.pageSize = 20
this.listQuery.sort = "desc"
this.listQuery.sidx = ""
this.initData()
},
//
updateHandle(row, flowState) {
let data = {
id: row.id,
flowId: row.flowId || this.flowList[0].id,
opType: flowState ? 0 : '-1',
status: flowState
}
this.flowVisible = true
this.$nextTick(() => {
this.$refs.FlowBox.init(data)
})
},
toApprovalDetail(row) {
let data = {
id: row.id,
flowId: row.flowId,
opType: 0,
status: row.currentState
}
this.formVisible = true
this.$nextTick(() => {
this.$refs.FlowBox.init(data)
})
},
addHandle() {
if (!this.flowList.length) {
this.$message({
type: 'error',
message: '流程不存在'
});
} else if (this.flowList.length === 1) {
this.selectFlow(this.flowList[0])
} else {
this.flowListVisible = true
}
},
//
selectFlow(item) {
let data = {
id: '',
formType: 1,
flowId: item.id,
opType: '-1'
}
this.flowListVisible = false
this.flowVisible = true
this.$nextTick(() => {
this.$refs.FlowBox.init(data)
})
},
refresh(isrRefresh) {
this.formVisible = false
if (isrRefresh) this.reset()
},
reset() {
this.query = JSON.parse(JSON.stringify(this.queryData))
this.search()
},
colseFlow(isrRefresh) {
this.flowVisible = false
if (isrRefresh) this.reset()
},
}
}
</script>

File diff suppressed because one or more lines are too long

@ -1139,13 +1139,13 @@
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('returnAmount')">
<!-- <el-col :span="8" v-if="judgeShow('returnAmount')">
<jnpf-form-tip-item label="退回金额" v-if="judgeShow('returnAmount')" prop="returnAmount">
<JnpfInput v-model="dataForm.returnAmount" @change="changeData('returnAmount',-1)" placeholder="请输入"
:disabled="true" addonAfter="元" clearable :style='{"width":"100%"}'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
</el-col> -->
<el-col :span="8" v-if="judgeShow('marginAmount')">
<jnpf-form-tip-item label="抵扣保证金金额" v-if="judgeShow('marginAmount')" prop="marginAmount">
<JnpfInput v-model="dataForm.marginAmount" @change="changeData('marginAmount',-1)" placeholder="请输入"
@ -1175,8 +1175,8 @@
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('currentMarginAmount')">
<jnpf-form-tip-item label="本次抵扣保证金金额" v-if="judgeShow('currentMarginAmount')" prop="currentMarginAmount">
<!-- <el-col :span="8" v-if="judgeShow('currentMarginAmount')">
<jnpf-form-tip-item label="本次保证金金额" v-if="judgeShow('currentMarginAmount')" prop="currentMarginAmount">
<JnpfInput v-model="dataForm.currentMarginAmount" @change="changeData('currentMarginAmount',-1)"
placeholder="请输入" :disabled="true" addonAfter="元" clearable
:style='{"width":"100%"}'>
@ -1184,14 +1184,14 @@
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('currentUnderpaymentAmount')">
<jnpf-form-tip-item label="本次抵扣压款金额" v-if="judgeShow('currentUnderpaymentAmount')"
<jnpf-form-tip-item label="本次压款金额" v-if="judgeShow('currentUnderpaymentAmount')"
prop="currentUnderpaymentAmount">
<JnpfInput v-model="dataForm.currentUnderpaymentAmount"
@change="changeData('currentUnderpaymentAmount',-1)" placeholder="请输入"
:disabled="true" addonAfter="元" clearable :style='{"width":"100%"}'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
</el-col> -->
<el-col :span="8" v-if="judgeShow('settlableAmount')">
<jnpf-form-tip-item label="可结金额" v-if="judgeShow('settlableAmount')" prop="settlableAmount">
<JnpfInput v-model="dataForm.settlableAmount" @change="changeData('settlableAmount',-1)" placeholder="请输入"
@ -1273,7 +1273,7 @@
</template>
</el-table-column>
<el-table-column label="结算单价(含税)" v-if="judgeShow('cwsettlementsummary-settlementPrice')"
prop="settlementPrice" align="center" width="200">
prop="settlementPrice" align="center" width="250">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('cwsettlementsummaryList-settlementPrice')">*</span>结算单价含税
@ -1345,7 +1345,7 @@
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="其他费用" v-if="judgeShow('cwsettlementsummary-otherType')" prop="otherType" align="center" width="200">
<!-- <el-table-column label="其他费用" v-if="judgeShow('cwsettlementsummary-otherType')" prop="otherType" align="center" width="200">
<template slot="header">
<span class="required-sign" v-if="judgeRequired('cwsettlementsummaryList-otherType')">*</span>
</template>
@ -1356,7 +1356,7 @@
addonBefore="¥" clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="结算合计(含税)" v-if="judgeShow('cwsettlementsummary-settlementTotal')"
prop="settlementTotal" align="center" width="200">
<template slot="header">
@ -1850,7 +1850,16 @@
cwsettlementsubjectsubjectIdcolumnOptions: [{
"label": "名称",
"value": "name"
}, ],
}, {
"label": "分类",
"value": "calssifyName"
}, {
"label": "星级",
"value": "customerStarRatingName"
}, {
"label": "归属人员",
"value": "belongPeopleName"
}],
cwsettlementcontractcontractIdcolumnOptions: [{
"label": "合同编码",
"value": "contract_number"
@ -1938,7 +1947,16 @@
cwaccountsubjectsubjectIdcolumnOptions: [{
"label": "名称",
"value": "name"
}, ],
}, {
"label": "分类",
"value": "calssifyName"
}, {
"label": "星级",
"value": "customerStarRatingName"
}, {
"label": "归属人员",
"value": "belongPeopleName"
}],
cwsettlementcontractsubjectcolumnOptions: [{
"label": "主体名称",
"value": "name"
@ -2784,9 +2802,10 @@
this.dataForm.settlementAmount = settlementAmount;///
this.dataForm.returnAmount = this.jnpf.floatSub(this.dataForm.settlementAmount, this.dataForm.prepaidDeductionAmount);//退
//
this.dataForm.payableAmount = this.jnpf.floatSub(this.jnpf.floatSub(this.jnpf.floatSub(this.jnpf.floatSub(this.dataForm.returnAmount, this.dataForm.prepaidDeductionAmount), this.dataForm.underpaymentAmount), this.dataForm.marginAmount), this.dataForm.overdueAmount)
//this.dataForm.payableAmount = this.jnpf.floatSub(this.jnpf.floatSub(this.jnpf.floatSub(this.jnpf.floatSub(this.dataForm.returnAmount, this.dataForm.prepaidDeductionAmount), this.dataForm.underpaymentAmount), this.dataForm.marginAmount), this.dataForm.overdueAmount)
this.dataForm.payableAmount = this.dataForm.settlementAmount
//,
this.dataForm.cwsettlementsubjectList.forEach(item => {
/* this.dataForm.cwsettlementsubjectList.forEach(item => {
if(item.underpaymentMethod.includes('按金额')){
this.dataForm.currentUnderpaymentAmount = Number(item.underpaymentMethod.slice(4, -2));
}else if(item.underpaymentMethod.includes('按比例')){
@ -2797,7 +2816,7 @@
}else if(item.marginMethod.includes('按比例')){
this.dataForm.currentMarginAmount = this.jnpf.floatDiv(this.jnpf.floatMul(this.dataForm.payableAmount, Number(item.marginMethod.slice(4, -2))), 100)
}
})
}) */
//
this.dataForm.settlableAmount = this.jnpf.floatSub(this.jnpf.floatSub(this.dataForm.payableAmount, this.dataForm.currentUnderpaymentAmount), this.dataForm.currentMarginAmount)
})

@ -56,7 +56,7 @@
</el-table-column>
<el-table-column prop="settlementSubjectName" label="结算主体名称" align="center" width="250" fixed="left">
</el-table-column>
<el-table-column prop="flowState" label="状态" width="100" align="center" fixed="left">
<el-table-column prop="flowState" label="状态" width="100" align="center">
<template slot-scope="scope" v-if="!scope.row.top">
<el-tag v-if="scope.row.flowState==1"></el-tag>
<el-tag type="success" v-else-if="scope.row.flowState==2">审核通过</el-tag>
@ -66,7 +66,7 @@
<el-tag type="warning" v-else></el-tag>
</template>
</el-table-column>
<el-table-column prop="paymentState" label="付款状态" width="100" align="center" fixed="left">
<el-table-column prop="paymentState" label="付款状态" width="100" align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.paymentState==1"></el-tag>
<el-tag type="success" v-else-if="scope.row.flowState==2">部分付款</el-tag>
@ -78,12 +78,12 @@
</el-table-column>
<el-table-column prop="settlementAmount" label="应收/应付合计(含税)" align="center" width="150">
</el-table-column>
<el-table-column prop="paymentAmount" label="已付金额" align="center" width="150">
<!-- <el-table-column prop="paymentAmount" label="已付金额" align="center" width="150">
</el-table-column>
<el-table-column prop="prepaidDeductionAmount" label="预付抵扣" align="center" width="150">
</el-table-column>
<el-table-column prop="returnAmount" label="退回金额" align="center" width="150">
</el-table-column>
</el-table-column> -->
<el-table-column prop="payableAmount" label="应结金额" align="center" width="150">
</el-table-column>
<el-table-column prop="settledAmount" label="已结金额" align="center" width="150">
@ -110,7 +110,7 @@
</el-button> -->
<el-button size="mini" type="text" :disabled="!scope.row.flowState"
@click="updateHandle(scope.row,scope.row.flowState)">详情</el-button>
<el-button size="mini" type="text" v-if="scope.row.settlableAmount > 0"
<el-button size="mini" type="text" v-if="scope.row.settlableAmount > 0 && scope.row.flowState==2"
@click="shoufukuanHandle(scope.row)">收付款</el-button>
</template>
</el-table-column>

@ -22,7 +22,7 @@
</el-col>
<el-col :span="6">
<el-form-item label="数据类型">
<el-select v-model="query.searchDateType">
<el-select v-model="query.searchDateType" @change="searchDateTypeChange">
<el-option label="展示批次" value="1"></el-option>
<el-option label="展示货区" value="2"></el-option>
<el-option label="展示仓库" value="3"></el-option>
@ -76,11 +76,11 @@
</el-table-column>
<el-table-column prop="inventoryNumberSum" label="库存数量" align="center" width="150">
</el-table-column>
<el-table-column prop="occupyInventorySum" label="占用库存" align="center" width="150">
<el-table-column prop="occupyInventorySum" label="占用库存" align="center" width="150" v-if="query.searchDateType != 1">
</el-table-column>
<el-table-column prop="availableInventorySum" label="可用库存" align="center" width="150">
<el-table-column prop="availableInventorySum" label="可用库存" align="center" width="150" v-if="query.searchDateType != 1">
</el-table-column>
<el-table-column prop="transitInventorySum" label="在途库存" align="center" width="150">
<el-table-column prop="transitInventorySum" label="在途库存" align="center" width="150" v-if="query.searchDateType != 1">
</el-table-column>
<el-table-column prop="purchasePrice" label="平均采购单价" align="center" width="150">
</el-table-column>
@ -547,6 +547,9 @@
this.listQuery.sidx = ""
this.initData()
},
searchDateTypeChange(){
this.search();
},
getTableSummaries(param) {
const { columns, data } = param;
const sums = [];

Loading…
Cancel
Save