jg-waiwang-pro
vayne 4 months ago
commit 6e2f609e90

@ -71,7 +71,7 @@
<result column="delivery_type" property="deliveryType"/>
<result column="is_used" property="isUsed"/>
<result column="clear_weight" property="clearWeight"/>
<result column="order_no" property="orderNo"/>
</resultMap>
<resultMap id="purchaseReturn" type="jnpf.entity.WarehousingStoragePoundlistEntity">
<id column="id" property="id"/>
@ -98,6 +98,7 @@
<result column="pound_code" property="poundCode"/>
<result column="document_types" property="documentTypes"/>
<result column="voucher_types" property="voucherTypes"/>
<result column="order_no" property="orderNo"/>
</resultMap>
<resultMap id="saleReturn" type="jnpf.entity.WarehousingOutboundPoundlistEntity">
<id column="id" property="id"/>
@ -124,6 +125,7 @@
<result column="pound_code" property="poundCode"/>
<result column="document_types" property="documentTypes"/>
<result column="voucher_types" property="voucherTypes"/>
<result column="order_no" property="orderNo"/>
</resultMap>
<select id="queryVoucherPopup" resultMap="voucherList">
SELECT
@ -464,6 +466,9 @@
<if test="voucherPagination.sidx != null and voucherPagination.sidx != ''">
ORDER BY ${voucherPagination.sidx} ${voucherPagination.sort}
</if>
<if test="voucherPagination.sidx == null or voucherPagination.sidx == ''">
ORDER BY SUBSTR(a.voucher_code, 1, 15) desc,a.order_no desc,a.voucher_code desc
</if>
</select>

@ -718,7 +718,7 @@ public class AuthorizeServiceImpl extends SuperServiceImpl<AuthorizeMapper, Auth
List<List<String>> orgAllPathList = getOrgAllPathList(new ArrayList() {{
add(userInfo.getOrganizeId());
}});
if(ObjectUtil.equals(fieldItem.getOp(), "==")){
if(item.getEnCode().indexOf("部门") >= 0){
orgAllPathList = getOrgAllPathListDept(new ArrayList() {{
add(userInfo.getOrganizeId());
}});

@ -1,7 +1,12 @@
package jnpf.service.impl;
import com.alibaba.fastjson.JSONObject;
import jnpf.entity.*;
import jnpf.mapper.CwsettlementMapper;
import jnpf.model.yunguan.YunguanSaleSettlementModel;
import jnpf.model.yunguan.YunguanSaleSettlementProductModel;
import jnpf.permission.entity.OrganizeEntity;
import jnpf.permission.service.OrganizeService;
import jnpf.service.*;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jnpf.model.cwsettlement.*;
@ -18,6 +23,7 @@ import java.util.regex.Pattern;
import jnpf.model.QueryModel;
import java.util.stream.Collectors;
import jnpf.base.model.ColumnDataModel;
import jnpf.util.wxutil.HttpUtil;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import jnpf.database.model.superQuery.SuperJsonModel;
@ -58,6 +64,14 @@ public class CwsettlementServiceImpl extends ServiceImpl<CwsettlementMapper, Cws
private CwsettlementpaymentreceiptService cwsettlementpaymentreceiptService;
@Autowired
private CwsettlementsummaryService cwsettlementsummaryService;
@Autowired
private OrganizeService organizeService;
@Autowired
private ContractLService contractLService;
@Autowired
private SubjectbasicService subjectbasicService;
@Autowired
private CwaccountstorageService cwaccountstorageService;
@Override
public List<CwsettlementEntity> getList(CwsettlementPagination cwsettlementPagination){
return getTypeList(cwsettlementPagination,cwsettlementPagination.getDataType());
@ -913,14 +927,122 @@ public class CwsettlementServiceImpl extends ServiceImpl<CwsettlementMapper, Cws
}
if (cwsettlementForm.getCwsettlementsummaryList()!=null){
List<CwsettlementsummaryEntity> tableField207 = JsonUtil.getJsonToList(cwsettlementForm.getCwsettlementsummaryList(),CwsettlementsummaryEntity.class);
for(CwsettlementsummaryEntity entitys : tableField207){
entitys.setId(RandomUtil.uuId());
entitys.setSettlementId(entity.getId());
for (int i=0;i<tableField207.size();i++){
tableField207.get(i).setId(RandomUtil.uuId());
tableField207.get(i).setSettlementId(entity.getId());
tableField207.get(i).setLineNo(String.valueOf(i));
if(isSave){
}else{
}
cwsettlementsummaryService.saveOrUpdate(entitys);
cwsettlementsummaryService.saveOrUpdate(tableField207.get(i));
}
}
//推送结算单到运管
/*if(ObjectUtil.equals(entity.getType(), "2")){
//销售
boolean headFlag = this.pushHeadYunguan(entity, cwsettlementForm);
if(headFlag){
boolean lineFlag = this.pushLineYunguan(entity, cwsettlementForm);
}
}else{
//采购
}*/
}
private boolean pushLineYunguan(CwsettlementEntity cwsettlementEntity, CwsettlementForm cwsettlementForm) {
for(int i=0;i<cwsettlementForm.getCwsettlementsummaryList().size();i++){
YunguanSaleSettlementProductModel yunguanSaleSettlementProductModel = new YunguanSaleSettlementProductModel();
//查询公司代码
OrganizeEntity companyEntity = organizeService.getById(cwsettlementEntity.getCompanyId());
if(companyEntity != null){
yunguanSaleSettlementProductModel.setCOMP_CD(companyEntity.getEnCode());
}
ContractLEntity contractLEntity = contractLService.getById(cwsettlementForm.getCwsettlementcontractList().get(0).getContractId());
yunguanSaleSettlementProductModel.setORG_ID(contractLEntity.getKucunOrgCode());
yunguanSaleSettlementProductModel.setORG_NM(contractLEntity.getKucunOrgName());
OrganizeEntity departmentEntity = organizeService.getById(cwsettlementEntity.getDepartmentId());
if(departmentEntity != null){
yunguanSaleSettlementProductModel.setDEPARTMENT_CD(departmentEntity.getEnCode());
}
yunguanSaleSettlementProductModel.setINVOICE_NO(cwsettlementEntity.getCode());
//明细行
yunguanSaleSettlementProductModel.setINVOICE_STS("C");
if(ObjectUtil.equals(cwsettlementEntity.getBusinessType(), "3")){
yunguanSaleSettlementProductModel.setINVOICE_TYPE("A");
}else{
yunguanSaleSettlementProductModel.setINVOICE_TYPE("T");
}
yunguanSaleSettlementProductModel.setATTRIBUTE4(String.valueOf(i));
}
return false;
}
private boolean pushHeadYunguan(CwsettlementEntity cwsettlementEntity, CwsettlementForm cwsettlementForm) {
YunguanSaleSettlementModel yunguanSaleSettlementModel = new YunguanSaleSettlementModel();
yunguanSaleSettlementModel.setID(cwsettlementEntity.getId());
//查询公司代码
OrganizeEntity companyEntity = organizeService.getById(cwsettlementEntity.getCompanyId());
if(companyEntity != null){
yunguanSaleSettlementModel.setCOMP_CD(companyEntity.getEnCode());
}
ContractLEntity contractLEntity = contractLService.getById(cwsettlementForm.getCwsettlementcontractList().get(0).getContractId());
yunguanSaleSettlementModel.setORG_ID(contractLEntity.getKucunOrgCode());
yunguanSaleSettlementModel.setORG_NM(contractLEntity.getKucunOrgName());
OrganizeEntity departmentEntity = organizeService.getById(cwsettlementEntity.getDepartmentId());
if(departmentEntity != null){
yunguanSaleSettlementModel.setDEPARTMENT_CD(departmentEntity.getEnCode());
}
yunguanSaleSettlementModel.setINVOICE_NO(cwsettlementEntity.getCode());
yunguanSaleSettlementModel.setINVOICE_DTM(cwsettlementEntity.getCreatorTime());
yunguanSaleSettlementModel.setINVOICE_STS("C");
if(ObjectUtil.equals(cwsettlementEntity.getBusinessType(), "3")){
yunguanSaleSettlementModel.setINVOICE_TYPE("A");
yunguanSaleSettlementModel.setINV_FLAG(new BigDecimal("1"));
}else{
yunguanSaleSettlementModel.setINVOICE_TYPE("T");
yunguanSaleSettlementModel.setINV_FLAG(new BigDecimal("-1"));
}
SubjectbasicEntity subjectbasicEntity = subjectbasicService.getById(cwsettlementForm.getCwsettlementsubjectList().get(0).getSubjectId());
yunguanSaleSettlementModel.setCUST_ID(subjectbasicEntity.getId());
yunguanSaleSettlementModel.setCUST_NAME(subjectbasicEntity.getName());
yunguanSaleSettlementModel.setCONTRACT_CD(contractLEntity.getContractNumber());
yunguanSaleSettlementModel.setKH_CONTR_NO(contractLEntity.getContractNo());
yunguanSaleSettlementModel.setBOOK_DATE(cwsettlementEntity.getBookDate());
yunguanSaleSettlementModel.setCUST_TY(cwsettlementEntity.getCustTy());
BigDecimal settlementSum = new BigDecimal("0");
BigDecimal settlementTotal = new BigDecimal("0");
for (CwsettlementsummaryModel cwsettlementsummaryModel : cwsettlementForm.getCwsettlementsummaryList()) {
settlementSum.add(new BigDecimal(cwsettlementsummaryModel.getSettlementSum()));
settlementTotal.add(new BigDecimal(cwsettlementsummaryModel.getSettlementTotal()));
}
yunguanSaleSettlementModel.setQUANTITY(settlementSum);
yunguanSaleSettlementModel.setINV_AMT(settlementTotal);
//查询对账单对应的出库单
BigDecimal storageNum = new BigDecimal("0");
for (CwsettlementaccountModel cwsettlementaccountModel : cwsettlementForm.getCwsettlementaccountList()) {
QueryWrapper<CwaccountstorageEntity> CwaccountstoragequeryWrapper = new QueryWrapper<>();
CwaccountstoragequeryWrapper.lambda().eq(CwaccountstorageEntity::getAccountId, cwsettlementaccountModel.getAccountId());
List<CwaccountstorageEntity> cwaccountstorageEntities = cwaccountstorageService.list(CwaccountstoragequeryWrapper);
for (CwaccountstorageEntity cwaccountstorageEntity : cwaccountstorageEntities) {
storageNum.add(cwaccountstorageEntity.getStorageNum());
}
}
yunguanSaleSettlementModel.setSTO_OUT_WGT(storageNum);
yunguanSaleSettlementModel.setCURRENCY_TY("CNY");
yunguanSaleSettlementModel.setINV_EXCHG_RAT(new BigDecimal("1"));
yunguanSaleSettlementModel.setTAX_RATE("VAT_OUT_" + cwsettlementForm.getCwsettlementsummaryList().get(0).getRate());
yunguanSaleSettlementModel.setCANCLE_YN("0");
yunguanSaleSettlementModel.setSLIT_FLAG("0");
yunguanSaleSettlementModel.setREAD_FLAG("N");
yunguanSaleSettlementModel.setESB_STATUS("N");
JSONObject purchaseCode = HttpUtil.httpRequest("http://172.16.1.50:8020/fggj/pur/ordHead", "POST", JsonUtil.getObjectToString(yunguanSaleSettlementModel));
if (ObjectUtil.isNotEmpty(purchaseCode)){
if (purchaseCode.get("code").equals("200")) {
return true;
}
}
return false;
}
}

@ -417,7 +417,6 @@ public class VoucherServiceImpl extends ServiceImpl<VoucherMapper, VoucherEntity
//排序
if(StringUtil.isEmpty(voucherPagination.getSidx())){
voucherQueryWrapper.orderByDesc("a.f_creator_time");
}else{
try {
String sidx = voucherPagination.getSidx();
@ -983,6 +982,7 @@ public class VoucherServiceImpl extends ServiceImpl<VoucherMapper, VoucherEntity
voucherEntity.setBusinessType(StringUtil.equals(model.getBusinessType(), "采购") ? "1" : "2");//业务类型
voucherEntity.setDocumentType(StringUtil.equals(model.getDocumentType(), "收货凭证") ? "1" : "2");//单据类型
voucherEntity.setVoucherCode(voucherCode + "(" + aa + ")");//'凭证编号
voucherEntity.setOrderNo(model.getOrderNo());//订单序号
//凭证类型
if(StringUtil.equals(model.getVoucherType(), "磅单")){
voucherEntity.setVoucherType("1");

@ -176,12 +176,12 @@ public class FileCopy {
// }
Cell cell111 = row.createCell(21);
Cell cell222 = row.createCell(22);
Cell cell333 = row.createCell(23);
Cell cell444 = row.createCell(24);
Cell celleee = row.createCell(25);
Cell cellfff = row.createCell(26);
Cell cell111 = row.createCell(22);
Cell cell222 = row.createCell(23);
Cell cell333 = row.createCell(24);
Cell cell444 = row.createCell(25);
Cell celleee = row.createCell(26);
Cell cellfff = row.createCell(27);
/*Cell cell6 = row.createCell(25);
Cell cell7 = row.createCell(26);
Cell cell8 = row.createCell(27);*/
@ -199,17 +199,17 @@ public class FileCopy {
if (i1 == 0) {
Row row1 = sheet.getRow(2);
Cell cell11 = row1.createCell(21);
Cell cell11 = row1.createCell(22);
cell11.setCellValue("业务类型");
Cell cell22 = row1.createCell(22);
Cell cell22 = row1.createCell(23);
cell22.setCellValue("单据类型");
Cell cell33 = row1.createCell(23);
Cell cell33 = row1.createCell(24);
cell33.setCellValue("采购合同编码");
Cell cell44 = row1.createCell(24);
Cell cell44 = row1.createCell(25);
cell44.setCellValue("销售合同编码");
Cell cellee = row1.createCell(25);
Cell cellee = row1.createCell(26);
cellee.setCellValue("凭证图片");
Cell cellff = row1.createCell(26);
Cell cellff = row1.createCell(27);
cellff.setCellValue("车辆信息");
}

@ -1479,6 +1479,7 @@ public class VoucherController {
columns.add(new ExcelImFieldModel("saleContractNo","销售合同编码"));
columns.add(new ExcelImFieldModel("voucherPictures","凭证图片"));
columns.add(new ExcelImFieldModel("vehiclePictures","车辆信息"));
columns.add(new ExcelImFieldModel("orderNo","订单序号"));
//tableField111子表对象
/*List<ExcelImFieldModel> tableField111columns = new ArrayList<>();
tableField111columns.add(new ExcelImFieldModel("spec" ,"规格"));

@ -57,6 +57,8 @@ public class YunguanInterfaceController {
@Autowired
private ContractLCommodityService contractLCommodityService;
@Autowired
private ContractLPaymentService contractLPaymentService;
@Autowired
private DictionaryyunguandataService dictionaryyunguandataService;
@Autowired
private ProvinceService provinceService;
@ -311,60 +313,182 @@ public class YunguanInterfaceController {
System.out.println(str);
JSONObject jsonObject = JSON.parseObject(str);
ContractLEntity contractLEntity = new ContractLEntity();
//合同号
if(ObjectUtil.isNotEmpty(jsonObject.get("CONTR_CD"))){
QueryWrapper<ContractLEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(ContractLEntity::getContractNumber, jsonObject.get("CONTR_CD").toString());
List<ContractLEntity> contractLEntityList = contractLService.list(queryWrapper);
if(contractLEntityList != null && contractLEntityList.size() > 0){
contractLEntity = contractLEntityList.get(0);
}
contractLEntity.setContractNumber(jsonObject.get("CONTR_CD").toString());
}
//库存组织编码,库存组织名称
if(ObjectUtil.isNotEmpty(jsonObject.get("ORG_CD"))){
contractLEntity.setKucunOrgCode(jsonObject.get("ORG_CD").toString());
DictionaryyunguandataEntity dictionaryyunguandataEntity = dictionaryyunguandataService.getDateValueInfo("564773000885326917",contractLEntity.getKucunOrgCode());
if (ObjectUtil.isNotEmpty(dictionaryyunguandataEntity)) {
contractLEntity.setKucunOrgName(dictionaryyunguandataEntity.getZhihuiValue());
}
}
//组织,公司,部门,签约主体
if(ObjectUtil.isNotEmpty(jsonObject.get("DEPT_CD"))){
QueryWrapper<OrganizeEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(OrganizeEntity::getEnCode, jsonObject.get("DEPT_CD").toString());
List<OrganizeEntity> orgList = organizeService.list(queryWrapper);
if(orgList != null && orgList.size() > 0){
List<String> conpanyIdList = Arrays.asList(orgList.get(0).getCompanyIdTree().split(","));
String organizeId = JSON.toJSONString(conpanyIdList);
contractLEntity.setDepartmentId(orgList.get(0).getId());
contractLEntity.setCompanyId(orgList.get(0).getParentId());
contractLEntity.setDeptId(contractLEntity.getCompanyId());
contractLEntity.setOrganizeJsonId(organizeId);
}
}
//合同名称
if(ObjectUtil.isNotEmpty(jsonObject.get("CONTR_NM"))){
contractLEntity.setContractName(jsonObject.get("CONTR_NM").toString());
}
//合同类型
if(ObjectUtil.isNotEmpty(jsonObject.get("CONTR_TY"))){
if(ObjectUtil.equal("01", jsonObject.get("CONTR_TY").toString())){
contractLEntity.setContractType("1");
}else if(ObjectUtil.equal("02", jsonObject.get("CONTR_TY").toString())){
contractLEntity.setContractType("2");
}else{
contractLEntity.setContractType("3");//租赁合同
}
}
//对方合同号
if(ObjectUtil.isNotEmpty(jsonObject.get("CONTR_NO"))){
contractLEntity.setContractNo(jsonObject.get("CONTR_NO").toString());
}
contractLEntity.setContractStatus("0");
//供应商
if(ObjectUtil.isNotEmpty(jsonObject.get("SUPPLIER_CD"))){
QueryWrapper<SubjectbasicEntity> subjectbasicQueryWrapper = new QueryWrapper<>();
subjectbasicQueryWrapper.lambda().eq(SubjectbasicEntity::getCode, jsonObject.get("SUPPLIER_CD").toString());
subjectbasicQueryWrapper.lambda().isNull(SubjectbasicEntity::getDeleteMark);
List<SubjectbasicEntity> subjectbasicList = subjectbasicService.list(subjectbasicQueryWrapper);
if(subjectbasicList != null && subjectbasicList.size() > 0){
contractLEntity.setSubject(subjectbasicList.get(0).getId());
}
}
//供应商地点编码,供应商地点名称
contractLEntity.setSupplierSiteId(ObjectUtil.isNotEmpty(jsonObject.get("SUPPLIER_SITE_ID")) ? jsonObject.get("SUPPLIER_SITE_ID").toString() : "");
contractLEntity.setSupplierSiteName(ObjectUtil.isNotEmpty(jsonObject.get("RESERVE17")) ? jsonObject.get("RESERVE17").toString() : "");
//结算方式 A:一票结算、 B:两票结算
if(ObjectUtil.isNotEmpty(jsonObject.get("INV_MTH"))){
if(ObjectUtil.equal("A", jsonObject.get("INV_MTH").toString())){
contractLEntity.setSettlementType("1");
}else if(ObjectUtil.equal("B", jsonObject.get("INV_MTH").toString())){
contractLEntity.setSettlementType("2");
}
}
//签订日期
if(ObjectUtil.isNotEmpty(jsonObject.get("CONTR_DT"))){
contractLEntity.setContractSignedTime(dateFormat.parse(jsonObject.get("CONTR_DT").toString()));
}
contractLEntity.setCurrency("1");//币种
contractLEntity.setContractType(jsonObject.get("CONTR_TY").toString());
if(ObjectUtil.equal("01", jsonObject.get("CONTR_TY").toString())){
contractLEntity.setContractType("1");
}else if(ObjectUtil.equal("02", jsonObject.get("CONTR_TY").toString())){
contractLEntity.setContractType("2");
//交货方式A 自提、 B 送货上门、D快递
if(ObjectUtil.isNotEmpty(jsonObject.get("DELV_MTH"))){
if(ObjectUtil.equal("A", jsonObject.get("DELV_MTH").toString())){
contractLEntity.setDeliveryModel("3");
}else if(ObjectUtil.equal("B", jsonObject.get("DELV_MTH").toString())){
contractLEntity.setDeliveryModel("2");
}else{
contractLEntity.setDeliveryModel("1");
}
}
contractLEntity.setContractNumber(jsonObject.get("CONTR_CD").toString());
contractLEntity.setContractNo(jsonObject.get("CONTR_NO").toString());
contractLEntity.setSupplierSiteId(jsonObject.get("SUPPLIER_SITE_ID").toString());
contractLEntity.setSupplierSiteName(jsonObject.get("RESERVE17").toString());
contractLEntity.setRemark(jsonObject.get("REMARK").toString());
contractLEntity.setContrForm(jsonObject.get("CONTR_FORM").toString());
Date parse = dateFormat.parse(jsonObject.get("DELV_DATE").toString());
contractLEntity.setDeliveryTime(parse);
contractLEntity.setReserve4(jsonObject.get("RESERVE4").toString());
contractLEntity.setReserve5(jsonObject.get("RESERVE5").toString());
contractLEntity.setReserve9(jsonObject.get("RESERVE9").toString());
contractLEntity.setContractName(jsonObject.get("CONTR_NM").toString());
contractLEntity.setReserve2(jsonObject.get("RESERVE2").toString());
contractLEntity.setReserve3(jsonObject.get("RESERVE3").toString());
contractLEntity.setStockType(jsonObject.get("STOCK_TYPE").toString());
contractLEntity.setTotalAmount(new BigDecimal(jsonObject.get("CONTR_PRICE").toString()));
//合同数量
contractLEntity.setContractNum(ObjectUtil.isNotEmpty(jsonObject.get("RESERVE2")) ? new BigDecimal(jsonObject.get("RESERVE2").toString()) : BigDecimal.ZERO);
//合计金额
contractLEntity.setTotalAmount(ObjectUtil.isNotEmpty(jsonObject.get("CONTR_PRICE")) ? new BigDecimal(jsonObject.get("CONTR_PRICE").toString()) : BigDecimal.ZERO);
//运输方式
if(ObjectUtil.isNotEmpty(jsonObject.get("TRS_MTH"))){
if(ObjectUtil.equal("A", jsonObject.get("TRS_MTH").toString())){
contractLEntity.setModeTransport("1");
}else if(ObjectUtil.equal("B", jsonObject.get("TRS_MTH").toString())){
contractLEntity.setModeTransport("2");
}else{
contractLEntity.setModeTransport("3");
}
}
//定价模式
if(ObjectUtil.isNotEmpty(jsonObject.get("PRICE_DCN_MTH"))){
if(ObjectUtil.equal("A", jsonObject.get("PRICE_DCN_MTH").toString())){
contractLEntity.setPricingModel("1");
}else{
contractLEntity.setPricingModel("2");
}
}
//采购模式/销售模式
if(ObjectUtil.isNotEmpty(jsonObject.get("TRADE_TYPE"))){
if(ObjectUtil.equal("A", jsonObject.get("TRADE_TYPE").toString())){
contractLEntity.setProcurementModel("1");
}else{
contractLEntity.setProcurementModel("2");
}
}
//关联合同
if(ObjectUtil.isNotEmpty(jsonObject.get("CONTR_CD_CRSP"))){
QueryWrapper<ContractLEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(ContractLEntity::getContractNumber, jsonObject.get("CONTR_CD_CRSP").toString());
List<ContractLEntity> contractLEntityList = contractLService.list(queryWrapper);
if(contractLEntityList != null && contractLEntityList.size() > 0){
contractLEntity.setRelatedContractId(contractLEntityList.get(0).getId());
}
}
//配送方式(1.仓配2.直送)
if(ObjectUtil.isNotEmpty(jsonObject.get("STOCK_TYPE"))){
if(ObjectUtil.equal("A", jsonObject.get("STOCK_TYPE").toString())){
contractLEntity.setDeliveryMethod("1");
}else{
contractLEntity.setDeliveryMethod("2");
}
}
//预计交货时间
if(ObjectUtil.isNotEmpty(jsonObject.get("DELV_DATE"))){
contractLEntity.setDeliveryTime(dateFormat.parse(jsonObject.get("DELV_DATE").toString()));
contractLEntity.setDeliveryTimeEnd(dateFormat.parse(jsonObject.get("DELV_DATE").toString()));
}
//合同发货天数
contractLEntity.setDelvDays(ObjectUtil.isNotEmpty(jsonObject.get("DELV_DAYS")) ? Integer.parseInt(jsonObject.get("DELV_DAYS").toString()) : 0);
//是否长协
if(ObjectUtil.equal("否", jsonObject.get("RESERVE15").toString())){
contractLEntity.setIsLongAgreement("2");
}else {
contractLEntity.setIsLongAgreement("1");
}
if(ObjectUtil.equal("B", jsonObject.get("TRADE_TYPE").toString())){
contractLEntity.setProcurementModel("2");
}else {
contractLEntity.setProcurementModel("1");
contractLEntity.setIsLongAgreement("2");
}
contractLEntity.setKucunOrgCode(jsonObject.get("ORG_CD").toString());//库存组织编码
DictionaryyunguandataEntity dictionaryyunguandataEntity = dictionaryyunguandataService.getDateValueInfo("564773000885326917",contractLEntity.getKucunOrgCode());
if (ObjectUtil.isNotEmpty(dictionaryyunguandataEntity)) {
contractLEntity.setKucunOrgName(dictionaryyunguandataEntity.getZhihuiValue());
//合同汇率
contractLEntity.setContrExRate(ObjectUtil.isNotEmpty(jsonObject.get("CONTR_EX_RATE")) ? jsonObject.get("CONTR_EX_RATE").toString() : "");
//是否安全协议
if(ObjectUtil.equal("否", jsonObject.get("RESERVE5").toString())){
contractLEntity.setSecurityProtocol("1");
}else {
contractLEntity.setSecurityProtocol("2");
}
QueryWrapper<OrganizeEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(OrganizeEntity::getEnCode, jsonObject.get("DEPT_CD").toString());
List<OrganizeEntity> orgList = organizeService.list(queryWrapper);
if(orgList != null && orgList.size() > 0){
List<String> conpanyIdList = Arrays.asList(orgList.get(0).getCompanyIdTree().split(","));
String organizeId = JSON.toJSONString(conpanyIdList);
contractLEntity.setOrganizeJsonId(organizeId);//分支机构编码
//是否招投标
if(ObjectUtil.equal("否", jsonObject.get("RESERVE3").toString())){
contractLEntity.setBidding("1");
}else {
contractLEntity.setBidding("2");
}
QueryWrapper<SubjectbasicEntity> subjectbasicQueryWrapper = new QueryWrapper<>();
subjectbasicQueryWrapper.lambda().eq(SubjectbasicEntity::getCode, jsonObject.get("SUPPLIER_CD").toString());
subjectbasicQueryWrapper.lambda().isNull(SubjectbasicEntity::getDeleteMark);
List<SubjectbasicEntity> subjectbasicList = subjectbasicService.list(subjectbasicQueryWrapper);
if(subjectbasicList != null && subjectbasicList.size() > 0){
contractLEntity.setSubject(subjectbasicList.get(0).getId());
//保证金
contractLEntity.setMargin(ObjectUtil.isNotEmpty(jsonObject.get("RESERVE11")) ? new BigDecimal(jsonObject.get("RESERVE11").toString()) : BigDecimal.ZERO);
//合同要求
contractLEntity.setContractRequirement(ObjectUtil.isNotEmpty(jsonObject.get("CONTR_REQ")) ? jsonObject.get("CONTR_REQ").toString() : "");
//备注
contractLEntity.setRemark(ObjectUtil.isNotEmpty(jsonObject.get("REMARK")) ? jsonObject.get("REMARK").toString() : "");
//风险提示
contractLEntity.setRiskInfo(ObjectUtil.isNotEmpty(jsonObject.get("RISK_INFO")) ? jsonObject.get("RISK_INFO").toString() : "");
//销售类型
if(ObjectUtil.equal("自产", jsonObject.get("SAL_INV_TYPE").toString())){
contractLEntity.setSalInvType("1");
}else {
contractLEntity.setSalInvType("2");
}
contractLService.save(contractLEntity);
contractLService.saveOrUpdate(contractLEntity);
return ActionResult.success("运管推送合同信息到智慧成功");
}
@ -388,28 +512,152 @@ public class YunguanInterfaceController {
queryWrapper.lambda().eq(ContractLEntity::getContractNumber, jsonObject.get("CONTR_CD").toString());
List<ContractLEntity> contractLEntityList = contractLService.list(queryWrapper);
if(contractLEntityList != null && contractLEntityList.size() > 0){
QueryWrapper<ContractLCommodityEntity> contractLCommodityEntityQueryWrapper = new QueryWrapper<>();
contractLCommodityEntityQueryWrapper.lambda().eq(ContractLCommodityEntity::getContractId, contractLEntityList.get(0).getId());
contractLCommodityEntityQueryWrapper.lambda().eq(ObjectUtil.isNotEmpty(jsonObject.get("CONTR_LINE_ID")), ContractLCommodityEntity::getContrLineId, jsonObject.get("CONTR_LINE_ID").toString());
List<ContractLCommodityEntity> contractLCommodityList = contractLCommodityService.list(contractLCommodityEntityQueryWrapper);
if(contractLCommodityList != null && contractLCommodityList.size() > 0){
contractLCommodityEntity = contractLCommodityList.get(0);
}
//组织部门公司合同ID
contractLCommodityEntity.setContractId(contractLEntityList.get(0).getId());
contractLCommodityEntity.setDepartmentId(contractLEntityList.get(0).getDepartmentId());
contractLCommodityEntity.setCompanyId(contractLEntityList.get(0).getCompanyId());
contractLCommodityEntity.setOrganizeJsonId(contractLEntityList.get(0).getOrganizeJsonId());
//行号
contractLCommodityEntity.setContrLineId(ObjectUtil.isNotEmpty(jsonObject.get("CONTR_LINE_ID")) ? jsonObject.get("CONTR_LINE_ID").toString() : "");
//商品id,编码,名称,图片,规格,单位
if(ObjectUtil.isNotEmpty(jsonObject.get("ITEM_CD"))){
QueryWrapper<ProductWarehouseEntity> productWarehouseEntityWrapper = new QueryWrapper<>();
productWarehouseEntityWrapper.lambda().eq(ProductWarehouseEntity::getCode, jsonObject.get("ITEM_CD").toString());
List<ProductWarehouseEntity> productWarehouseEntityList = productWarehouseService.list(productWarehouseEntityWrapper);
if(productWarehouseEntityList != null && productWarehouseEntityList.size() > 0){
contractLCommodityEntity.setProductId(productWarehouseEntityList.get(0).getId());
contractLCommodityEntity.setCommodityCode(productWarehouseEntityList.get(0).getCode());
contractLCommodityEntity.setCommodityName(productWarehouseEntityList.get(0).getName());
contractLCommodityEntity.setCommodityPhone(productWarehouseEntityList.get(0).getPhoto());
contractLCommodityEntity.setSpecifications(productWarehouseEntityList.get(0).getSpec());
contractLCommodityEntity.setInventoryUnitId(productWarehouseEntityList.get(0).getInventoryUnitId());
contractLCommodityEntity.setProcureUnit(contractLCommodityEntity.getInventoryUnitId());
}
}
//数量
contractLCommodityEntity.setNumber(ObjectUtil.isNotEmpty(jsonObject.get("WEIGHT")) ? new BigDecimal(jsonObject.get("WEIGHT").toString()) : BigDecimal.ZERO);
//不含税单价
contractLCommodityEntity.setPriceRateNo(ObjectUtil.isNotEmpty(jsonObject.get("PRICE")) ? new BigDecimal(jsonObject.get("PRICE").toString()) : BigDecimal.ZERO);
//含税单价
contractLCommodityEntity.setPriceRate(ObjectUtil.isNotEmpty(jsonObject.get("TAX_PRICE")) ? new BigDecimal(jsonObject.get("TAX_PRICE").toString()) : BigDecimal.ZERO);
//ERP税码
contractLCommodityEntity.setTaxRateCode(ObjectUtil.isNotEmpty(jsonObject.get("TAX_RATE_CODE")) ? jsonObject.get("TAX_RATE_CODE").toString() : "");
//税率
contractLCommodityEntity.setTaxRate(ObjectUtil.isNotEmpty(jsonObject.get("TAX_RATE")) ? new BigDecimal(jsonObject.get("TAX_RATE").toString()) : BigDecimal.ZERO);
//不含税总金额
contractLCommodityEntity.setAmount(ObjectUtil.isNotEmpty(jsonObject.get("AMOUNT")) ? new BigDecimal(jsonObject.get("AMOUNT").toString()) : BigDecimal.ZERO);
//含税总金额
contractLCommodityEntity.setTotalRate(ObjectUtil.isNotEmpty(jsonObject.get("TOTAL_AMOUNT")) ? new BigDecimal(jsonObject.get("TOTAL_AMOUNT").toString()) : BigDecimal.ZERO);
//计算方式
if(ObjectUtil.equal("正算", jsonObject.get("RESERVE1").toString())){
contractLCommodityEntity.setCalculationMethod("1");
}else {
contractLCommodityEntity.setCalculationMethod("2");
}
//备注
contractLCommodityEntity.setRemark(ObjectUtil.isNotEmpty(jsonObject.get("REMARK")) ? jsonObject.get("REMARK").toString() : "");
//上下允差
contractLCommodityEntity.setDelvTolMax(ObjectUtil.isNotEmpty(jsonObject.get("DELV_TOL_MAX")) ? new BigDecimal(jsonObject.get("DELV_TOL_MAX").toString()) : BigDecimal.ZERO);
contractLCommodityEntity.setDelvTolMin(ObjectUtil.isNotEmpty(jsonObject.get("DELV_TOL_MIN")) ? new BigDecimal(jsonObject.get("DELV_TOL_MIN").toString()) : BigDecimal.ZERO);
contractLCommodityService.saveOrUpdate(contractLCommodityEntity);
}else{
return ActionResult.fail("运管推送合同信息到智慧失败,未查到合同头信息");
}
QueryWrapper<ProductWarehouseEntity> productWarehouseEntityWrapper = new QueryWrapper<>();
productWarehouseEntityWrapper.lambda().eq(ProductWarehouseEntity::getCode, jsonObject.get("ITEM_CD").toString());
List<ProductWarehouseEntity> productWarehouseEntityList = productWarehouseService.list(productWarehouseEntityWrapper);
if(productWarehouseEntityList != null && productWarehouseEntityList.size() > 0){
contractLCommodityEntity.setProductId(productWarehouseEntityList.get(0).getId());
contractLCommodityEntity.setCommodityCode(jsonObject.get("ITEM_CD").toString());
contractLCommodityEntity.setCommodityName(jsonObject.get("ITEM_NM").toString());
contractLCommodityEntity.setCommodityPhone(productWarehouseEntityList.get(0).getPhoto());
contractLCommodityEntity.setSpecifications(productWarehouseEntityList.get(0).getSpec());
contractLCommodityEntity.setInventoryUnitId(productWarehouseEntityList.get(0).getInventoryUnitId());
}
contractLCommodityEntity.setNumber(new BigDecimal(jsonObject.get("WEIGHT").toString()));
contractLCommodityEntity.setTaxRate(new BigDecimal(jsonObject.get("TAX_RATE").toString()));
contractLCommodityEntity.setPriceRate(new BigDecimal(jsonObject.get("TAX_PRICE").toString()));
contractLCommodityEntity.setTotalRate(new BigDecimal(jsonObject.get("TOTAL_AMOUNT").toString()));
contractLCommodityService.save(contractLCommodityEntity);
return ActionResult.success("运管推送合同信息到智慧成功");
}
/**
*
*
* @param
* @return
*/
@Operation(summary = "运管推送合同收付款节点信息到智慧")
@PostMapping("/syncContractPayment")
public ActionResult syncContractPayment(HttpServletRequest httpRequest) throws IOException {
ServletInputStream inputStream = httpRequest.getInputStream();
byte[] bytes = new byte[httpRequest.getContentLength()];
inputStream.read(bytes);
String str = new String(bytes, StandardCharsets.UTF_8);
System.out.println(str);
JSONObject jsonObject = JSON.parseObject(str);
ContractLPaymentEntity contractLPaymentEntity = new ContractLPaymentEntity();
QueryWrapper<ContractLEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(ContractLEntity::getContractNumber, jsonObject.get("CONTR_CD").toString());
List<ContractLEntity> contractLEntityList = contractLService.list(queryWrapper);
if(contractLEntityList != null && contractLEntityList.size() > 0){
QueryWrapper<ContractLPaymentEntity> contractLPaymentEntityQueryWrapper = new QueryWrapper<>();
contractLPaymentEntityQueryWrapper.lambda().eq(ContractLPaymentEntity::getContractId, contractLEntityList.get(0).getId());
contractLPaymentEntityQueryWrapper.lambda().eq(ObjectUtil.isNotEmpty(jsonObject.get("INDEXS")), ContractLPaymentEntity::getIndexs, jsonObject.get("INDEXS").toString());
List<ContractLPaymentEntity> contractLPaymentEntityList = contractLPaymentService.list(contractLPaymentEntityQueryWrapper);
if(contractLPaymentEntityList != null && contractLPaymentEntityList.size() > 0){
contractLPaymentEntity = contractLPaymentEntityList.get(0);
}
//组织部门公司合同ID
contractLPaymentEntity.setContractId(contractLEntityList.get(0).getId());
contractLPaymentEntity.setDepartmentId(contractLEntityList.get(0).getDepartmentId());
contractLPaymentEntity.setCompanyId(contractLEntityList.get(0).getCompanyId());
contractLPaymentEntity.setOrganizeJsonId(contractLEntityList.get(0).getOrganizeJsonId());
//行号
contractLPaymentEntity.setIndexs(ObjectUtil.isNotEmpty(jsonObject.get("INDEXS")) ? jsonObject.get("INDEXS").toString() : "");
//收付款节点
if(ObjectUtil.isNotEmpty(jsonObject.get("PAY_FLAG"))){
if(ObjectUtil.equal("预付款", jsonObject.get("PAY_FLAG").toString())){
contractLPaymentEntity.setPaymentNode("1");
}else if(ObjectUtil.equal("进度款", jsonObject.get("PAY_FLAG").toString())){
contractLPaymentEntity.setPaymentNode("2");
}else if(ObjectUtil.equal("发货后支付", jsonObject.get("PAY_FLAG").toString())){
contractLPaymentEntity.setPaymentNode("3");
}else if(ObjectUtil.equal("开票后支付", jsonObject.get("PAY_FLAG").toString())){
contractLPaymentEntity.setPaymentNode("4");
}else if(ObjectUtil.equal("质保金", jsonObject.get("PAY_FLAG").toString())){
contractLPaymentEntity.setPaymentNode("5");
}else if(ObjectUtil.equal("保证金", jsonObject.get("PAY_FLAG").toString())){
contractLPaymentEntity.setPaymentNode("6");
}
}
//付款方式
if(ObjectUtil.isNotEmpty(jsonObject.get("PAY_MTH"))){
if(ObjectUtil.equal("电汇", jsonObject.get("PAY_MTH").toString())){
contractLPaymentEntity.setPaymentMethod("1");
}else if(ObjectUtil.equal("承兑", jsonObject.get("PAY_MTH").toString())){
contractLPaymentEntity.setPaymentMethod("2");
}else if(ObjectUtil.equal("信用证", jsonObject.get("PAY_MTH").toString())){
contractLPaymentEntity.setPaymentMethod("3");
}else if(ObjectUtil.equal("现金", jsonObject.get("PAY_MTH").toString())){
contractLPaymentEntity.setPaymentMethod("4");
}else if(ObjectUtil.equal("支票", jsonObject.get("PAY_MTH").toString())){
contractLPaymentEntity.setPaymentMethod("5");
}else if(ObjectUtil.equal("银行承兑", jsonObject.get("PAY_MTH").toString())){
contractLPaymentEntity.setPaymentMethod("6");
}else if(ObjectUtil.equal("商业承兑", jsonObject.get("PAY_MTH").toString())){
contractLPaymentEntity.setPaymentMethod("7");
}
}
//账期
contractLPaymentEntity.setAccountingPeriod(ObjectUtil.isNotEmpty(jsonObject.get("ACCOUNT_PERIOD")) ? jsonObject.get("ACCOUNT_PERIOD").toString() : "");
//收款后付款
contractLPaymentEntity.setPayAfter(ObjectUtil.isNotEmpty(jsonObject.get("PAY_AFTER")) ? jsonObject.get("PAY_AFTER").toString() : "");
//备注
contractLPaymentEntity.setRemark(ObjectUtil.isNotEmpty(jsonObject.get("REMARK")) ? jsonObject.get("REMARK").toString() : "");
//付款比例
contractLPaymentEntity.setPaymentRatio(ObjectUtil.isNotEmpty(jsonObject.get("SCALES")) ? jsonObject.get("SCALES").toString() : "");
//金额
contractLPaymentEntity.setPrice(ObjectUtil.isNotEmpty(jsonObject.get("AMOUNT")) ? new BigDecimal(jsonObject.get("AMOUNT").toString()) : BigDecimal.ZERO);
contractLPaymentService.saveOrUpdate(contractLPaymentEntity);
}else{
return ActionResult.fail("运管推送合同收付款节点信息到智慧,未查到合同头信息");
}
return ActionResult.success("运管推送合同收付款节点信息到智慧成功");
}
/**
*
*

@ -66,4 +66,21 @@ public class ContractLCommodityEntity {
private String organizeJsonId;
@TableField("F_TENANT_ID")
private String tenantId;
@TableField("contr_line_id")
private String contrLineId;
@TableField(value = "price_rate_no" , updateStrategy = FieldStrategy.IGNORED)
private BigDecimal priceRateNo;
@TableField("tax_rate_code")
private String taxRateCode;
@TableField(value = "amount" , updateStrategy = FieldStrategy.IGNORED)
private BigDecimal amount;
@TableField("calculation_method")
private String calculationMethod;
@TableField("remark")
private String remark;
@TableField(value = "delv_tol_max" , updateStrategy = FieldStrategy.IGNORED)
private BigDecimal delvTolMax;
@TableField(value = "delv_tol_min" , updateStrategy = FieldStrategy.IGNORED)
private BigDecimal delvTolMin;
}

@ -183,6 +183,18 @@ public class ContractLEntity {
private String settlementType;
@TableField(value = "CONTRACT_NUM" , updateStrategy = FieldStrategy.IGNORED)
private BigDecimal contractNum;
@TableField(value = "delv_days" , updateStrategy = FieldStrategy.IGNORED)
private int delvDays;
@TableField(value = "contr_ex_rate" , updateStrategy = FieldStrategy.IGNORED)
private String contrExRate;
@TableField(value = "margin" , updateStrategy = FieldStrategy.IGNORED)
private BigDecimal margin;
@TableField("risk_info")
private String riskInfo;
@TableField("sal_inv_type")
private String salInvType;
@TableField("ADVANCE")
private String advance;

@ -51,4 +51,11 @@ public class ContractLPaymentEntity {
private String organizeJsonId;
@TableField("F_TENANT_ID")
private String tenantId;
@TableField("indexs")
private String indexs;
@TableField("accounting_period")
private String accountingPeriod;
@TableField("pay_after")
private String payAfter;
}

@ -105,4 +105,8 @@ public class CwsettlementEntity {
private Integer version;
@TableField(value = "REMARK" , updateStrategy = FieldStrategy.IGNORED)
private String remark;
@TableField(value = "BOOK_DATE" , updateStrategy = FieldStrategy.IGNORED)
private Date bookDate;
@TableField("CUST_TY")
private String custTy;
}

@ -78,4 +78,6 @@ public class CwsettlementsummaryEntity {
private String departmentId;
@TableField("ORGANIZE_JSON_ID")
private String organizeJsonId;
@TableField("line_no")
private String lineNo;
}

@ -217,4 +217,6 @@ public class VoucherEntity {
@TableField(exist = false)
private String businessOrderNo;
@TableField("ORDER_NO")
private String orderNo;
}

@ -1,5 +1,7 @@
package jnpf.model.contractl;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import java.util.List;
import java.util.Date;
@ -49,4 +51,13 @@ public class ContractLCommodityModel {
/** 含税总金额 **/
@JSONField(name = "totalRate")
private String totalRate;
private String contrLineId;
private BigDecimal priceRateNo;
private String taxRateCode;
private BigDecimal amount;
private String calculationMethod;
private String remark;
private BigDecimal delvTolMax;
private BigDecimal delvTolMin;
}

@ -1,6 +1,5 @@
package jnpf.model.contractl;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import java.util.List;
import java.math.BigDecimal;
@ -139,6 +138,12 @@ public class ContractLForm {
@JsonProperty("contractLabel")
private Object contractLabel;
/** 是否垫资 **/
@TableField("advance")
@JsonProperty("advance")
private Object advance;
private int delvDays;
private String contrExRate;
private BigDecimal margin;
private String riskInfo;
private String salInvType;
}

@ -1,5 +1,6 @@
package jnpf.model.contractl;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import java.util.List;
import java.util.Date;
@ -37,4 +38,8 @@ public class ContractLPaymentModel {
/** 备注 **/
@JSONField(name = "remark")
private String remark;
private String indexs;
private String accountingPeriod;
private String payAfter;
}

@ -1,6 +1,10 @@
package jnpf.model.cwsettlement;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import java.util.Date;
import java.util.List;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonProperty;
@ -127,4 +131,6 @@ public class CwsettlementForm {
/** 备注 **/
@JsonProperty("remark")
private String remark;
private Date bookDate;
private String custTy;
}

@ -73,6 +73,8 @@ public class VoucherExcelVO222 {
private String contractNo;
@Excel(name = "销售合同编码" )
private String saleContractNo;
@Excel(name = "订单序号" )
private String orderNo;
private String productId;
private List<VoucherExcelVO222> list;

@ -129,7 +129,8 @@ public class VoucherForm {
/** 关联单据号 **/
@JsonProperty("associatedDocumentNo")
private String associatedDocumentNo;
@JsonProperty("orderNo")
private String orderNo;
/** 业务类型 **/
@JsonProperty("businessType")
private String businessType;

@ -500,6 +500,115 @@
</JnpfSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('deliveryModel')">
<jnpf-form-tip-item
label="配送方式"
v-if="judgeShow('deliveryModel')"
prop="deliveryMethod"
>
<JnpfSelect
v-model="dataForm.deliveryMethod"
@change="changeData('deliveryModel', -1)"
placeholder="请选择"
:disabled="judgeWrite('deliveryModel')"
clearable
:style="{ width: '100%' }"
:options="deliveryMethodOptions"
:props="deliveryMethodProps"
>
</JnpfSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('deliveryLocation')">
<jnpf-form-tip-item
label="合同发货天数 "
v-if="judgeShow('deliveryLocation')"
prop="delvDays"
>
<JnpfInputNumber
v-model="dataForm.delvDays"
@change="changeData('deliveryLocation', -1)"
placeholder="请输入"
:disabled="judgeWrite('deliveryLocation')"
clearable
:style="{ width: '100%' }"
:min="0"
>
</JnpfInputNumber>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('deliveryLocation')">
<jnpf-form-tip-item
label="合同汇率 "
v-if="judgeShow('deliveryLocation')"
prop="contrExRate"
>
<JnpfInputNumber
v-model="dataForm.contrExRate"
@change="changeData('deliveryLocation', -1)"
placeholder="请输入"
:disabled="judgeWrite('deliveryLocation')"
clearable
:style="{ width: '100%' }"
:min="0"
>
</JnpfInputNumber>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('deliveryLocation')">
<jnpf-form-tip-item
label="保证金 "
v-if="judgeShow('deliveryLocation')"
prop="margin"
>
<JnpfInputNumber
v-model="dataForm.margin"
@change="changeData('deliveryLocation', -1)"
placeholder="请输入"
:disabled="judgeWrite('deliveryLocation')"
clearable
:style="{ width: '100%' }"
:min="0"
>
</JnpfInputNumber>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('deliveryModel')">
<jnpf-form-tip-item
label="销售类型"
v-if="judgeShow('deliveryModel')"
prop="salInvType"
>
<JnpfSelect
v-model="dataForm.salInvType"
@change="changeData('deliveryModel', -1)"
placeholder="请选择"
:disabled="judgeWrite('deliveryModel')"
clearable
:style="{ width: '100%' }"
:options="salInvTypeOptions"
:props="salInvTypeProps"
>
</JnpfSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8" v-if="judgeShow('deliveryLocation')">
<jnpf-form-tip-item
label="风险提示 "
v-if="judgeShow('deliveryLocation')"
prop="riskInfo"
>
<JnpfInput
v-model="dataForm.riskInfo"
@change="changeData('deliveryLocation', -1)"
placeholder="请输入"
:disabled="judgeWrite('deliveryLocation')"
clearable
:style="{ width: '100%' }"
>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
@ -536,6 +645,38 @@
<jnpf-form-tip-item label-width="0">
<el-table :data="dataForm.contractLCommodityList" size="mini">
<el-table-column type="index" width="50" label="序号" />
<el-table-column
label="行号"
v-if="judgeShow('contractlcommodity-priceRate')"
prop="contrLineId"
>
<template slot="header">
<span
class="required-sign"
v-if="judgeRequired('contractlcommodityList-priceRate')"
>*</span
>行号
</template>
<template slot-scope="scope">
<JnpfInput
v-model="scope.row.contrLineId"
@change="
changeData(
'contractlcommodityList-priceRate',
scope.$index
)
"
placeholder="请输入"
:disabled="
judgeWrite('contractlcommodityList') ||
judgeWrite('contractlcommodityList-priceRate')
"
clearable
:style="{ width: '100%' }"
>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="商品编码" v-if="judgeShow('contractlcommodity-commodityCode')"
prop="commodityCode">
<template slot="header">
@ -634,38 +775,275 @@
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="含税单价" v-if="judgeShow('contractlcommodity-priceRate')"
prop="priceRate">
<el-table-column
label="含税单价"
v-if="judgeShow('contractlcommodity-priceRate')"
prop="priceRate"
>
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('contractlcommodityList-priceRate')">*</span>含税单价
<span
class="required-sign"
v-if="judgeRequired('contractlcommodityList-priceRate')"
>*</span
>含税单价
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.priceRate" @change="
<JnpfInput
v-model="scope.row.priceRate"
@change="
changeData(
'contractlcommodityList-priceRate',
scope.$index
)
" placeholder="请输入" :disabled="
"
placeholder="请输入"
:disabled="
judgeWrite('contractlcommodityList') ||
judgeWrite('contractlcommodityList-priceRate')
" clearable :style="{ width: '100%' }">
"
clearable
:style="{ width: '100%' }"
>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="含税总金额" v-if="judgeShow('contractlcommodity-totalRate')"
prop="totalRate">
<el-table-column
label="不含税单价"
v-if="judgeShow('contractlcommodity-priceRate')"
prop="priceRateNo"
>
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('contractlcommodityList-totalRate')">*</span>含税总金额
<span
class="required-sign"
v-if="judgeRequired('contractlcommodityList-priceRate')"
>*</span
>不含税单价
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.totalRate" @change="
<JnpfInput
v-model="scope.row.priceRateNo"
@change="
changeData(
'contractlcommodityList-priceRate',
scope.$index
)
"
placeholder="请输入"
:disabled="
judgeWrite('contractlcommodityList') ||
judgeWrite('contractlcommodityList-priceRate')
"
clearable
:style="{ width: '100%' }"
>
</JnpfInput>
</template>
</el-table-column>
<el-table-column
label="含税总金额"
v-if="judgeShow('contractlcommodity-totalRate')"
prop="totalRate"
>
<template slot="header">
<span
class="required-sign"
v-if="judgeRequired('contractlcommodityList-totalRate')"
>*</span
>含税总金额
</template>
<template slot-scope="scope">
<JnpfInput
v-model="scope.row.totalRate"
@change="
changeData('contractlcommodity-totalRate', scope.$index)
" placeholder="请输入" :disabled="
"
placeholder="请输入"
:disabled="
judgeWrite('contractlcommodityList') ||
judgeWrite('contractlcommodityList-totalRate')
" clearable :style="{ width: '100%' }">
"
clearable
:style="{ width: '100%' }"
>
</JnpfInput>
</template>
</el-table-column>
<el-table-column
label="不含税总金额"
v-if="judgeShow('contractlcommodity-totalRate')"
prop="amount"
>
<template slot="header">
<span
class="required-sign"
v-if="judgeRequired('contractlcommodityList-totalRate')"
>*</span
>不含税总金额
</template>
<template slot-scope="scope">
<JnpfInput
v-model="scope.row.amount"
@change="
changeData('contractlcommodity-totalRate', scope.$index)
"
placeholder="请输入"
:disabled="
judgeWrite('contractlcommodityList') ||
judgeWrite('contractlcommodityList-totalRate')
"
clearable
:style="{ width: '100%' }"
>
</JnpfInput>
</template>
</el-table-column>
<el-table-column
label="ERP税码"
v-if="judgeShow('contractlcommodity-totalRate')"
prop="taxRateCode"
>
<template slot="header">
<span
class="required-sign"
v-if="judgeRequired('contractlcommodityList-totalRate')"
>*</span
>ERP税码
</template>
<template slot-scope="scope">
<JnpfInput
v-model="scope.row.taxRateCode"
@change="
changeData('contractlcommodity-totalRate', scope.$index)
"
placeholder="请输入"
:disabled="
judgeWrite('contractlcommodityList') ||
judgeWrite('contractlcommodityList-totalRate')
"
clearable
:style="{ width: '100%' }"
>
</JnpfInput>
</template>
</el-table-column>
<el-table-column
label="上允差"
v-if="judgeShow('contractlcommodity-totalRate')"
prop="delvTolMax"
>
<template slot="header">
<span
class="required-sign"
v-if="judgeRequired('contractlcommodityList-totalRate')"
>*</span
>上允差
</template>
<template slot-scope="scope">
<JnpfInput
v-model="scope.row.delvTolMax"
@change="
changeData('contractlcommodity-totalRate', scope.$index)
"
placeholder="请输入"
:disabled="
judgeWrite('contractlcommodityList') ||
judgeWrite('contractlcommodityList-totalRate')
"
clearable
:style="{ width: '100%' }"
>
</JnpfInput>
</template>
</el-table-column>
<el-table-column
label="下允差"
v-if="judgeShow('contractlcommodity-totalRate')"
prop="delvTolMin"
>
<template slot="header">
<span
class="required-sign"
v-if="judgeRequired('contractlcommodityList-totalRate')"
>*</span
>下允差
</template>
<template slot-scope="scope">
<JnpfInput
v-model="scope.row.delvTolMin"
@change="
changeData('contractlcommodity-totalRate', scope.$index)
"
placeholder="请输入"
:disabled="
judgeWrite('contractlcommodityList') ||
judgeWrite('contractlcommodityList-totalRate')
"
clearable
:style="{ width: '100%' }"
>
</JnpfInput>
</template>
</el-table-column>
<el-table-column
label="计算方式"
v-if="judgeShow('contractlcommodity-procureUnit')"
prop="calculationMethod"
>
<template slot="header">
<span
class="required-sign"
v-if="judgeRequired('contractlcommodityList-procureUnit')"
>*</span
>计算方式
</template>
<template slot-scope="scope">
<JnpfSelect
v-model="scope.row.calculationMethod"
@change="
changeData(
'contractlcommodity-procureUnit',
scope.$index
)
"
placeholder="请选择"
:disabled="
judgeWrite('contractlcommodityList') ||
judgeWrite('contractlcommodityList-procureUnit')
"
clearable
:style="{ width: '100%' }"
:options="contractlcommoditycalculationMethodOptions"
:props="contractlcommoditycalculationMethodProps"
>
</JnpfSelect>
</template>
</el-table-column>
<el-table-column
label="备注"
v-if="judgeShow('contractlcommodity-totalRate')"
prop="remark"
>
<template slot="header">
<span
class="required-sign"
v-if="judgeRequired('contractlcommodityList-totalRate')"
>*</span
>备注
</template>
<template slot-scope="scope">
<JnpfInput
v-model="scope.row.remark"
@change="
changeData('contractlcommodity-totalRate', scope.$index)
"
placeholder="请输入"
:disabled="
judgeWrite('contractlcommodityList') ||
judgeWrite('contractlcommodityList-totalRate')
"
clearable
:style="{ width: '100%' }"
>
</JnpfInput>
</template>
</el-table-column>
@ -769,6 +1147,35 @@
<jnpf-form-tip-item label-width="0">
<el-table :data="dataForm.contractLPaymentList" size="mini">
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column
label="行号"
v-if="judgeShow('contractlpayment-remark')"
prop="indexs"
>
<template slot="header">
<span
class="required-sign"
v-if="judgeRequired('contractlpaymentList-remark')"
>*</span
>行号
</template>
<template slot-scope="scope">
<JnpfInput
v-model="scope.row.indexs"
@change="
changeData('contractlpayment-remark', scope.$index)
"
placeholder="请输入"
:disabled="
judgeWrite('contractlpaymentList') ||
judgeWrite('contractlpaymentList-remark')
"
clearable
:style="{ width: '100%' }"
>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="收付款节点" v-if="judgeShow('contractlpayment-paymentNode')"
prop="paymentNode">
<template slot="header">
@ -858,6 +1265,64 @@
</JnpfInput>
</template>
</el-table-column>
<el-table-column
label="账期"
v-if="judgeShow('contractlpayment-remark')"
prop="accountingPeriod"
>
<template slot="header">
<span
class="required-sign"
v-if="judgeRequired('contractlpaymentList-remark')"
>*</span
>账期
</template>
<template slot-scope="scope">
<JnpfInput
v-model="scope.row.accountingPeriod"
@change="
changeData('contractlpayment-remark', scope.$index)
"
placeholder="请输入"
:disabled="
judgeWrite('contractlpaymentList') ||
judgeWrite('contractlpaymentList-remark')
"
clearable
:style="{ width: '100%' }"
>
</JnpfInput>
</template>
</el-table-column>
<el-table-column
label="收款后付款"
v-if="judgeShow('contractlpayment-remark')"
prop="payAfter"
>
<template slot="header">
<span
class="required-sign"
v-if="judgeRequired('contractlpaymentList-remark')"
>*</span
>收款后付款
</template>
<template slot-scope="scope">
<JnpfInput
v-model="scope.row.payAfter"
@change="
changeData('contractlpayment-remark', scope.$index)
"
placeholder="请输入"
:disabled="
judgeWrite('contractlpaymentList') ||
judgeWrite('contractlpaymentList-remark')
"
clearable
:style="{ width: '100%' }"
>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="操作" width="50" v-if="!judgeWrite('contractlpaymentList')">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@ -1411,6 +1876,44 @@ export default {
{ label: "级别", value: "calssify" },
{ label: "主体名称", value: "name" }
],
deliveryMethodOptions: [
{
"fullName": "仓配",
"id": "1"
}, {
"fullName": "直送",
"id": "2"
}
],
salInvTypeOptions: [
{
"fullName": "自产",
"id": "1"
}, {
"fullName": "贸易",
"id": "2"
}
],
deliveryModelProps: { label: "fullName", value: "enCode" },
deliveryMethodProps: {
"label": "fullName",
"value": "id"
},
salInvTypeProps: {
"label": "fullName",
"value": "id"
},
contractlcommoditycalculationMethodOptions: [{
"fullName": "正算",
"id": "1"
}, {
"fullName": "反算",
"id": "2"
}],
contractlcommoditycalculationMethodProps: {
"label": "fullName",
"value": "id"
},
deliveryModelOptions: [],
deliveryModelProps: { label: "fullName", value: "enCode" },
modeTransportOptions: [],

@ -101,6 +101,8 @@
border>
<el-table-column prop="voucherCode" label="凭证编号" align="center" width="160" fixed="left">
</el-table-column>
<el-table-column prop="orderNo" label="订单序号" align="center" width="100" fixed="left">
</el-table-column>
<el-table-column label="单据类型" prop="documentType" align="center" width="100" fixed="left">
<template slot-scope="scope">
{{ scope.row.documentType1 }}

Loading…
Cancel
Save