Commit c4b98103 by liuyang

2024-06-21 修改采购收票bug

parent 566e9512
...@@ -48,6 +48,7 @@ public class HGCW012 extends DaoEPBase { ...@@ -48,6 +48,7 @@ public class HGCW012 extends DaoEPBase {
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/ public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码*/
public static final String FIELD_REMAINING_AMOUNT = "remainingAmount"; /* 剩余开票/收票金额*/ public static final String FIELD_REMAINING_AMOUNT = "remainingAmount"; /* 剩余开票/收票金额*/
public static final String FIELD_RECEIVE_DATE = "receiveDate"; /* 收票日期*/ public static final String FIELD_RECEIVE_DATE = "receiveDate"; /* 收票日期*/
public static final String FIELD_CONTRACT_TYPE = "contractType"; /* 部门编码*/
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/ public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 企业编码*/
...@@ -85,12 +86,12 @@ public class HGCW012 extends DaoEPBase { ...@@ -85,12 +86,12 @@ public class HGCW012 extends DaoEPBase {
private String companyCode = " "; /* 公司编码*/ private String companyCode = " "; /* 公司编码*/
private String companyName = " "; /* 公司名称*/ private String companyName = " "; /* 公司名称*/
private String settlementNumber = " "; /* 来源单号*/ private String settlementNumber = " "; /* 来源单号*/
private Integer billTybe = new Integer(0); /* 票据类型*/ private Integer billTybe = new Integer(1); /* 票据类型*/
private String billNumber = " "; /* 发票号*/ private String billNumber = " "; /* 发票号*/
private Integer billState = new Integer(0); /* 开票状态*/ private Integer billState = new Integer(0); /* 开票状态*/
private String signingDate = " "; /* 开票日期*/ private String signingDate = " "; /* 开票日期*/
private String partyA = " "; /* 供应商名称*/ private String partyA = " "; /* 供应商名称*/
private Boolean reviewStatus; /* 审批状态*/ private Integer reviewStatus = 0; /* 审批状态*/
private Integer taxPoints = new Integer(0); /* 税率*/ private Integer taxPoints = new Integer(0); /* 税率*/
private String thisSettlementTax = " "; /* 税额*/ private String thisSettlementTax = " "; /* 税额*/
private String thisSettlementAmount = " "; /* 不含税金额*/ private String thisSettlementAmount = " "; /* 不含税金额*/
...@@ -104,6 +105,7 @@ public class HGCW012 extends DaoEPBase { ...@@ -104,6 +105,7 @@ public class HGCW012 extends DaoEPBase {
private String depCode = " "; /* 部门编码*/ private String depCode = " "; /* 部门编码*/
private BigDecimal remainingAmount = new BigDecimal("0"); /* 剩余开票/收票金额*/ private BigDecimal remainingAmount = new BigDecimal("0"); /* 剩余开票/收票金额*/
private String receiveDate = " "; /* 收票日期*/ private String receiveDate = " "; /* 收票日期*/
private Integer contractType;
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -214,6 +216,10 @@ public class HGCW012 extends DaoEPBase { ...@@ -214,6 +216,10 @@ public class HGCW012 extends DaoEPBase {
eiColumn.setDescName("收票日期"); eiColumn.setDescName("收票日期");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CONTRACT_TYPE);
eiColumn.setDescName("合同类型");
eiMetadata.addMeta(eiColumn);
} }
...@@ -388,7 +394,7 @@ public class HGCW012 extends DaoEPBase { ...@@ -388,7 +394,7 @@ public class HGCW012 extends DaoEPBase {
* get the reviewStatus - 审批状态. * get the reviewStatus - 审批状态.
* @return the reviewStatus * @return the reviewStatus
*/ */
public Boolean getReviewStatus() { public Integer getReviewStatus() {
return this.reviewStatus; return this.reviewStatus;
} }
...@@ -397,7 +403,7 @@ public class HGCW012 extends DaoEPBase { ...@@ -397,7 +403,7 @@ public class HGCW012 extends DaoEPBase {
* *
* @param reviewStatus - 审批状态 * @param reviewStatus - 审批状态
*/ */
public void setReviewStatus(Boolean reviewStatus) { public void setReviewStatus(Integer reviewStatus) {
this.reviewStatus = reviewStatus; this.reviewStatus = reviewStatus;
} }
/** /**
...@@ -608,6 +614,14 @@ public class HGCW012 extends DaoEPBase { ...@@ -608,6 +614,14 @@ public class HGCW012 extends DaoEPBase {
public void setReceiveDate(String receiveDate) { public void setReceiveDate(String receiveDate) {
this.receiveDate = receiveDate; this.receiveDate = receiveDate;
} }
public Integer getContractType() {
return contractType;
}
public void setContractType(Integer contractType) {
this.contractType = contractType;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -626,7 +640,7 @@ public class HGCW012 extends DaoEPBase { ...@@ -626,7 +640,7 @@ public class HGCW012 extends DaoEPBase {
setBillState(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_BILL_STATE)), billState)); setBillState(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_BILL_STATE)), billState));
setSigningDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SIGNING_DATE)), signingDate)); setSigningDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SIGNING_DATE)), signingDate));
setPartyA(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARTY_A)), partyA)); setPartyA(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PARTY_A)), partyA));
setReviewStatus(NumberUtils.toBoolean(StringUtils.toString(map.get(FIELD_REVIEW_STATUS)), reviewStatus)); setReviewStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_REVIEW_STATUS)), reviewStatus));
setTaxPoints(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_TAX_POINTS)), taxPoints)); setTaxPoints(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_TAX_POINTS)), taxPoints));
setThisSettlementTax(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_THIS_SETTLEMENT_TAX)), thisSettlementTax)); setThisSettlementTax(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_THIS_SETTLEMENT_TAX)), thisSettlementTax));
setThisSettlementAmount(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_THIS_SETTLEMENT_AMOUNT)), thisSettlementAmount)); setThisSettlementAmount(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_THIS_SETTLEMENT_AMOUNT)), thisSettlementAmount));
...@@ -640,6 +654,7 @@ public class HGCW012 extends DaoEPBase { ...@@ -640,6 +654,7 @@ public class HGCW012 extends DaoEPBase {
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode)); setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setRemainingAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_REMAINING_AMOUNT)), remainingAmount)); setRemainingAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_REMAINING_AMOUNT)), remainingAmount));
setReceiveDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RECEIVE_DATE)), receiveDate)); setReceiveDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RECEIVE_DATE)), receiveDate));
setContractType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_CONTRACT_TYPE)), contractType));
} }
/** /**
...@@ -673,6 +688,7 @@ public class HGCW012 extends DaoEPBase { ...@@ -673,6 +688,7 @@ public class HGCW012 extends DaoEPBase {
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE))); map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_REMAINING_AMOUNT, StringUtils.toString(remainingAmount, eiMetadata.getMeta(FIELD_REMAINING_AMOUNT))); map.put(FIELD_REMAINING_AMOUNT, StringUtils.toString(remainingAmount, eiMetadata.getMeta(FIELD_REMAINING_AMOUNT)));
map.put(FIELD_RECEIVE_DATE, StringUtils.toString(receiveDate, eiMetadata.getMeta(FIELD_RECEIVE_DATE))); map.put(FIELD_RECEIVE_DATE, StringUtils.toString(receiveDate, eiMetadata.getMeta(FIELD_RECEIVE_DATE)));
map.put(FIELD_CONTRACT_TYPE, StringUtils.toString(contractType, eiMetadata.getMeta(FIELD_CONTRACT_TYPE)));
return map; return map;
} }
......
...@@ -85,11 +85,13 @@ public class HGCW012A extends DaoEPBase { ...@@ -85,11 +85,13 @@ public class HGCW012A extends DaoEPBase {
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 记录修改时间*/ public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 记录修改时间*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/ public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码*/
public static final String QUERY = "HGCW008.query"; public static final String QUERY = "HGCW012A.query";
public static final String COUNT = "HGCW008.count"; public static final String QUERY_A = "HGCW012A.queryA";
public static final String INSERT = "HGCW008.insert"; public static final String QUERY_B = "HGCW012A.queryB";
public static final String UPDATE = "HGCW008.update"; public static final String COUNT = "HGCW012A.count";
public static final String DELETE = "HGCW008.delete"; public static final String INSERT = "HGCW012A.insert";
public static final String UPDATE = "HGCW012A.update";
public static final String DELETE = "HGCW012A.delete";
private Long id = new Long(0); private Long id = new Long(0);
private String accountCode = " "; /* 企业编码*/ private String accountCode = " "; /* 企业编码*/
......
...@@ -490,6 +490,7 @@ public class HGCW013 extends DaoEPBase { ...@@ -490,6 +490,7 @@ public class HGCW013 extends DaoEPBase {
public void setDepCode(String depCode) { public void setDepCode(String depCode) {
this.depCode = depCode; this.depCode = depCode;
} }
/** /**
* get the value from Map. * get the value from Map.
* *
......
...@@ -5,13 +5,13 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; ...@@ -5,13 +5,13 @@ import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.cw.domain.HGCW010; import com.baosight.hggp.hg.cw.domain.HGCW010;
import com.baosight.hggp.hg.cw.domain.HGCW011; import com.baosight.hggp.hg.cw.domain.HGCW012;
import com.baosight.hggp.hg.cw.domain.HGCW013;
import com.baosight.hggp.hg.cw.tools.HGCWTools; import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO; import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.DateUtils; import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils; import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
...@@ -39,12 +39,13 @@ public class ServiceHGCW012 extends ServiceBase { ...@@ -39,12 +39,13 @@ public class ServiceHGCW012 extends ServiceBase {
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "销售开票",operType = "查询",operDesc = "初始化") @OperationLogAnnotation(operModul = "采购收票",operType = "查询",operDesc = "初始化")
@Override
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SUP_RECORD_BLOCK_ID, CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SUP_RECORD_BLOCK_ID,
DdynamicEnum.PROJ_RECORD_BLOCK_ID), null, false); DdynamicEnum.PROJ_RECORD_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW010().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW012().eiMetadata);
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
} }
...@@ -57,11 +58,11 @@ public class ServiceHGCW012 extends ServiceBase { ...@@ -57,11 +58,11 @@ public class ServiceHGCW012 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "销售开票",operType = "查询",operDesc = "查询") @OperationLogAnnotation(operModul = "采购收票",operType = "查询",operDesc = "查询")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
inInfo = super.query(inInfo, HGCW010.QUERY, new HGCW010()); inInfo = super.query(inInfo, HGCW012.QUERY, new HGCW012());
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
} }
...@@ -74,30 +75,29 @@ public class ServiceHGCW012 extends ServiceBase { ...@@ -74,30 +75,29 @@ public class ServiceHGCW012 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "收款单",operType = "保存",operDesc = "保存") @OperationLogAnnotation(operModul = "采购收票",operType = "保存",operDesc = "保存")
public EiInfo save(EiInfo inInfo) { public EiInfo save(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据 // 写入数据
for (int i = 0; i < resultRows.size(); i++) { for (int i = 0; i < resultRows.size(); i++) {
HGCW010 HGCW010 = new HGCW010(); HGCW012 HGCW012 = new HGCW012();
HGCW010.fromMap(resultRows.get(i)); HGCW012.fromMap(resultRows.get(i));
UserVO userVO = HGCWTools.HgCw002.getUserCompany(); UserVO userVO = HGCWTools.HgCw002.getUserCompany();
HGCW010.setCompanyCode(userVO.getUsercode()); HGCW012.setCompanyCode(userVO.getUsercode());
HGCW010.setCompanyName(userVO.getUsername()); HGCW012.setCompanyName(userVO.getUsername());
HGCW010.setBillState(1); HGCW012.setBillState(1);
HGCW010.setReviewStatus(0); HGCW012.setReviewStatus(0);
HGCW010.setSigningDate(DateUtils.formatShort(HGCW010.getSigningDate())); HGCW012.setSigningDate(DateUtils.formatShort(HGCW012.getSigningDate()));
// 获取项目名称 // 获取项目名称
HGSC001 HGSC001 = HGSCTools.Hgsc001.queryByCode(HGCW010.getProjCode()); //HGSC001 HGSC001 = HGSCTools.Hgsc001.queryByCode(HGCW012.getProjCode());
HGCW010.setProjName(HGSC001.getProjName()); //HGCW012.setProjName(HGSC001.getProjName());
if (HGCW010.getId() == null || HGCW010.getId() == 0) { if (HGCW012.getId() == null || HGCW012.getId() == 0) {
this.add(HGCW010); this.add(HGCW012);
} else { } else {
this.modify(HGCW010); this.modify(HGCW012);
} }
} }
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) { } catch (Exception e) {
...@@ -109,21 +109,21 @@ public class ServiceHGCW012 extends ServiceBase { ...@@ -109,21 +109,21 @@ public class ServiceHGCW012 extends ServiceBase {
/** /**
* 新增操作 * 新增操作
* *
* @param HGCW010 * @param hgcw012
* @return * @return
*/ */
public void add(HGCW010 HGCW010) { public void add(HGCW012 hgcw012) {
DaoUtils.insert("HGCW010.insert", HGCW010); DaoUtils.insert(HGCW012.INSERT, hgcw012);
} }
/** /**
* 修改操作 * 修改操作
* *
* @param HGCW010 * @param hgcw012
* @return * @return
*/ */
public void modify(HGCW010 HGCW010) { public void modify(HGCW012 hgcw012) {
DaoUtils.update("HGCW010.update", HGCW010); DaoUtils.update(HGCW012.UPDATE, hgcw012);
} }
/** /**
...@@ -132,15 +132,14 @@ public class ServiceHGCW012 extends ServiceBase { ...@@ -132,15 +132,14 @@ public class ServiceHGCW012 extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "收款单",operType = "删除",operDesc = "删除") @OperationLogAnnotation(operModul = "采购收票",operType = "删除",operDesc = "删除")
@Override @Override
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) { for (int i = 0; i < resultRows.size(); i++) {
DaoUtils.update("HGCW010.delete", resultRows.get(i)); DaoUtils.update(HGCW012.DELETE, resultRows.get(i));
} }
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) { } catch (Exception e) {
...@@ -149,68 +148,110 @@ public class ServiceHGCW012 extends ServiceBase { ...@@ -149,68 +148,110 @@ public class ServiceHGCW012 extends ServiceBase {
return inInfo; return inInfo;
} }
@OperationLogAnnotation(operModul = "收款单",operType = "插入",operDesc = "生成收款单") @OperationLogAnnotation(operModul = "采购收票",operType = "插入",operDesc = "生成采购收票")
public EiInfo select(EiInfo inInfo) { public EiInfo select(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); Map queryRows = EiInfoUtils.getFirstRow(inInfo);
List<Map> queryRows = inInfo.getBlock(EiConstant.queryBlock).getRows(); String typeBlockId = queryRows.get("type").toString();
List<Map> resultRows = inInfo.getBlock(typeBlockId).getRows();
String mainId = ""; String mainId = "";
if (CollectionUtils.isNotEmpty(queryRows)) { if (queryRows.get("mainId")!=null){
mainId = queryRows.get(0).get("mainId").toString(); mainId = queryRows.get("mainId").toString();
} }
Integer contractType = getContractTypeStr(queryRows.get("type").toString());
//获取相应的数据 //获取相应的数据
List<HGCW011> hgcw011List = HGCWTools.HgCw011.mapToList(resultRows, NumberUtils.toLong(mainId)); List<HGCW013> hgcw013List = HGCWTools.HgCw013.mapToList(resultRows, NumberUtils.toLong(mainId));
DecimalFormat decimalFormat = new DecimalFormat("#.000"); DecimalFormat decimalFormat = new DecimalFormat("#.000");
if (CollectionUtils.isNotEmpty(hgcw011List)) { if (CollectionUtils.isNotEmpty(hgcw013List)) {
if (StringUtils.isEmpty(mainId)) { if (StringUtils.isEmpty(mainId)) {
//先生成主表 //先生成主表
HGCW010 HGCW010 = new HGCW010(); HGCW012 hgcw012 = new HGCW012();
hgcw012.fromMap(resultRows.get(0));
UserVO userVO = HGCWTools.HgCw002.getUserCompany(); UserVO userVO = HGCWTools.HgCw002.getUserCompany();
HGCW010.setCompanyCode(userVO.getUsercode()); hgcw012.setCompanyCode(userVO.getUsercode());
HGCW010.setCompanyName(userVO.getUsername()); hgcw012.setCompanyName(userVO.getUsername());
HGCW010.setBillState(1); hgcw012.setBillState(1);
HGCW010.setReviewStatus(0); hgcw012.setSigningDate(DateUtils.shortDate());
HGCW010.setSigningDate(DateUtils.shortDate()); hgcw012.setReceiveDate(DateUtils.shortDate());
BigDecimal totalContractPriceIncluding = BigDecimal.ZERO; BigDecimal totalContractPriceIncluding = BigDecimal.ZERO;
StringBuffer contractNumber = new StringBuffer(); StringBuffer contractNumber = new StringBuffer();
for (HGCW011 hgcw011 : hgcw011List) { for (HGCW013 hgcw013 : hgcw013List) {
totalContractPriceIncluding = totalContractPriceIncluding.add(hgcw011.getTotalContractPriceIncluding()); totalContractPriceIncluding = totalContractPriceIncluding.add(hgcw013.getTotalContractPriceIncluding());
} }
HGCW010.setTotalContractPriceIncluding(new BigDecimal(decimalFormat.format(totalContractPriceIncluding))); hgcw012.setTotalContractPriceIncluding(new BigDecimal(decimalFormat.format(totalContractPriceIncluding)));
HGCW010.setPartyA(hgcw011List.get(0).getPartyA()); hgcw012.setContractType(contractType);
this.add(HGCW010); this.add(hgcw012);
//生成明细表 //生成明细表
for (HGCW011 hgcw011 : hgcw011List) { for (HGCW013 hgcw013 : hgcw013List) {
hgcw011.setMainId(HGCW010.getId()); hgcw013.setMainId(hgcw012.getId());
DaoUtils.insert(HGCW011.INSERT, hgcw011); DaoUtils.insert(HGCW013.INSERT, hgcw013);
} }
} else { } else {
// 更新主表 // 更新主表
HGCW010 HGCW010 = HGCWTools.HgCw010.getId(mainId); HGCW012 HGCW012 = HGCWTools.HgCw012.getId(mainId);
BigDecimal totalContractPriceIncluding = BigDecimal.ZERO; BigDecimal totalContractPriceIncluding = BigDecimal.ZERO;
StringBuffer contractNumber = new StringBuffer(); StringBuffer contractNumber = new StringBuffer();
for (HGCW011 hgcw011 : hgcw011List) { for (HGCW013 hgcw013 : hgcw013List) {
totalContractPriceIncluding = totalContractPriceIncluding.add(hgcw011.getTotalContractPriceIncluding()); totalContractPriceIncluding = totalContractPriceIncluding.add(hgcw013.getTotalContractPriceIncluding());
} }
HGCW010.setTotalContractPriceIncluding(new BigDecimal(decimalFormat.format(totalContractPriceIncluding))); HGCW012.setTotalContractPriceIncluding(new BigDecimal(decimalFormat.format(totalContractPriceIncluding)));
this.modify(HGCW010); this.modify(HGCW012);
// 生成明细表 // 生成明细表
for (HGCW011 hgcw011 : hgcw011List) { for (HGCW013 hgcw013 : hgcw013List) {
hgcw011.setMainId(HGCW010.getId()); hgcw013.setMainId(HGCW012.getId());
DaoUtils.insert(HGCW011.INSERT, hgcw011); DaoUtils.insert(HGCW013.INSERT, hgcw013);
} }
} }
} }
} catch (Exception e) { } catch (Exception e) {
LogUtils.setMsg(inInfo, e, "生成收款单失败"); LogUtils.setMsg(inInfo, e, "生成采购收票失败");
} }
return inInfo; return inInfo;
} }
/**
* 提交操作
* @param inInfo
* @return
*/
public EiInfo submit(EiInfo inInfo){
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HGCW012 hgcw012 = new HGCW012();
hgcw012.fromMap(resultRows.get(i));
hgcw012.setReviewStatus(1);
DaoUtils.update("HGCW012.submit", hgcw012);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据提交成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "审核失败,发票类型未选!");
}
return inInfo;
}
public Integer getContractTypeStr(String contractType) {
Integer contractType1 = new Integer(0);
switch (contractType) {
case "result":
contractType1 = 1;
break;
case "resultA":
contractType1 = 2;
break;
case "resultB":
contractType1 = 3;
break;
default:
}
return contractType1;
}
} }
......
package com.baosight.hggp.hg.cw.service; package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.hg.cw.domain.HGCW002;
import com.baosight.hggp.hg.cw.domain.HGCW006;
import com.baosight.hggp.hg.cw.domain.HGCW010A; import com.baosight.hggp.hg.cw.domain.HGCW010A;
import com.baosight.hggp.hg.cw.domain.HGCW012A;
import com.baosight.hggp.util.LogUtils; import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
...@@ -21,10 +25,10 @@ public class ServiceHGCW012A extends ServiceBase { ...@@ -21,10 +25,10 @@ public class ServiceHGCW012A extends ServiceBase {
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "初始化") @OperationLogAnnotation(operModul = "采购开票",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW010A().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW012A().eiMetadata);
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
} }
...@@ -38,17 +42,38 @@ public class ServiceHGCW012A extends ServiceBase { ...@@ -38,17 +42,38 @@ public class ServiceHGCW012A extends ServiceBase {
* @param inInfo * @param inInfo
* @return * @return
*/ */
@OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "查询") @OperationLogAnnotation(operModul = "采购开票",operType = "查询",operDesc = "查询采购开票")
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
inInfo = super.query(inInfo, HGCW010A.QUERY, new HGCW010A()); inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGCW002.FIELD_CONTRACT_TYPE, 2);
inInfo = super.query(inInfo, HGCW012A.QUERY, new HGCW012A());
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
} }
return inInfo; return inInfo;
} }
@OperationLogAnnotation(operModul = "采购开票",operType = "查询",operDesc = "查询劳务")
public EiInfo queryA(EiInfo inInfo) {
try {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGCW002.FIELD_CONTRACT_TYPE, 2);
inInfo = super.query(inInfo, HGCW012A.QUERY, new HGCW012A(),false,new HGCW012A().eiMetadata,EiConstant.queryBlock,"resultA","resultA");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "采购开票",operType = "查询",operDesc = "查询租赁")
public EiInfo queryB(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGCW012A.QUERY_B, new HGCW012A(),false,new HGCW012A().eiMetadata,EiConstant.queryBlock,"resultB","resultB");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
} }
......
...@@ -31,7 +31,35 @@ ...@@ -31,7 +31,35 @@
--> -->
<sqlMap namespace="HGCW012"> <sqlMap namespace="HGCW012">
<sql id="column">
ID as "id",
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
SETTLEMENT_NUMBER as "settlementNumber", <!-- 来源单号 -->
BILL_TYBE as "billTybe", <!-- 票据类型 -->
BILL_NUMBER as "billNumber", <!-- 发票号 -->
BILL_STATE as "billState", <!-- 开票状态 -->
SIGNING_DATE as "signingDate", <!-- 开票日期 -->
PARTY_A as "partyA", <!-- 供应商名称 -->
REVIEW_STATUS as "reviewStatus", <!-- 审批状态 -->
TAX_POINTS as "taxPoints", <!-- 税率 -->
THIS_SETTLEMENT_TAX as "thisSettlementTax", <!-- 税额 -->
THIS_SETTLEMENT_AMOUNT as "thisSettlementAmount", <!-- 不含税金额 -->
TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding", <!-- 发票总额 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
REMAINING_AMOUNT as "remainingAmount", <!-- 剩余开票/收票金额 -->
RECEIVE_DATE as "receiveDate", <!-- 收票日期 -->
CONTRACT_TYPE as "contractType"
</sql>
<sql id="condition"> <sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
...@@ -109,30 +137,7 @@ ...@@ -109,30 +137,7 @@
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.cw.domain.HGCW012"> resultClass="com.baosight.hggp.hg.cw.domain.HGCW012">
SELECT SELECT
ID as "id", <include refid="column" />
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
SETTLEMENT_NUMBER as "settlementNumber", <!-- 来源单号 -->
BILL_TYBE as "billTybe", <!-- 票据类型 -->
BILL_NUMBER as "billNumber", <!-- 发票号 -->
BILL_STATE as "billState", <!-- 开票状态 -->
SIGNING_DATE as "signingDate", <!-- 开票日期 -->
PARTY_A as "partyA", <!-- 供应商名称 -->
REVIEW_STATUS as "reviewStatus", <!-- 审批状态 -->
TAX_POINTS as "taxPoints", <!-- 税率 -->
THIS_SETTLEMENT_TAX as "thisSettlementTax", <!-- 税额 -->
THIS_SETTLEMENT_AMOUNT as "thisSettlementAmount", <!-- 不含税金额 -->
TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding", <!-- 发票总额 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
REMAINING_AMOUNT as "remainingAmount", <!-- 剩余开票/收票金额 -->
RECEIVE_DATE as "receiveDate" <!-- 收票日期 -->
FROM ${hggpSchema}.HGCW012 WHERE 1=1 FROM ${hggpSchema}.HGCW012 WHERE 1=1
<include refid="condition" /> <include refid="condition" />
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
...@@ -140,7 +145,7 @@ ...@@ -140,7 +145,7 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
ID asc ID desc
</isEmpty> </isEmpty>
</dynamic> </dynamic>
...@@ -250,9 +255,13 @@ ...@@ -250,9 +255,13 @@
UPDATED_TIME, <!-- 记录修改时间 --> UPDATED_TIME, <!-- 记录修改时间 -->
DEP_CODE, <!-- 部门编码 --> DEP_CODE, <!-- 部门编码 -->
REMAINING_AMOUNT, <!-- 剩余开票/收票金额 --> REMAINING_AMOUNT, <!-- 剩余开票/收票金额 -->
RECEIVE_DATE <!-- 收票日期 --> RECEIVE_DATE, <!-- 收票日期 -->
CONTRACT_TYPE
) )
VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #settlementNumber#, #billTybe#, #billNumber#, #billState#, #signingDate#, #partyA#, #reviewStatus#, #taxPoints#, #thisSettlementTax#, #thisSettlementAmount#, #totalContractPriceIncluding#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#, #remainingAmount#, #receiveDate#) VALUES (#id#, #accountCode#, #companyCode#, #companyName#, #settlementNumber#, #billTybe#, #billNumber#, #billState#, #signingDate#, #partyA#, #reviewStatus#, #taxPoints#, #thisSettlementTax#, #thisSettlementAmount#, #totalContractPriceIncluding#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #depCode#, #remainingAmount#, #receiveDate#,#contractType#)
<selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGCW012
</selectKey>
</insert> </insert>
<delete id="delete"> <delete id="delete">
...@@ -285,7 +294,19 @@ ...@@ -285,7 +294,19 @@
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 --> UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DEP_CODE = #depCode#, <!-- 部门编码 --> DEP_CODE = #depCode#, <!-- 部门编码 -->
REMAINING_AMOUNT = #remainingAmount#, <!-- 剩余开票/收票金额 --> REMAINING_AMOUNT = #remainingAmount#, <!-- 剩余开票/收票金额 -->
RECEIVE_DATE = #receiveDate# <!-- 收票日期 --> RECEIVE_DATE = #receiveDate#, <!-- 收票日期 -->
CONTRACT_TYPE = #contractType#
WHERE
ID = #id#
</update>
<update id="submit">
UPDATE ${hggpSchema}.HGCW012
SET
REVIEW_STATUS = #reviewStatus#, <!-- 审核状态 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime# <!-- 记录修改时间 -->
WHERE WHERE
ID = #id# ID = #id#
</update> </update>
......
...@@ -35,8 +35,59 @@ ...@@ -35,8 +35,59 @@
--> -->
<sqlMap namespace="HGCW012A"> <sqlMap namespace="HGCW012A">
<sql id="column">
T1.ID as "id",
T1.ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
T1.COMPANY_CODE as "companyCode", <!-- 公司编码 -->
T1.COMPANY_NAME as "companyName", <!-- 公司名称 -->
T1.PROJ_CODE as "projCode", <!-- 项目编码 -->
T1.PROJ_NAME as "projName", <!-- 项目名称 -->
T1.CONTRACT_NUMBER as "contractNumber", <!-- 合同号 -->
T1.CONTRACT_NAME as "contractName", <!-- 合同名称 -->
T1.SETTLEMENT_NUMBER as "settlementNumber", <!-- 结算编号 -->
T1.SETTLEMENT_TYPE as "settlementType", <!-- 结算类别;1部分结算2最终结算 -->
T1.CONTRACT_DATE as "contractDate", <!-- 结算日期 -->
T1.TAX_POINTS as "taxPoints", <!-- 税点 -->
T1.PRICE_TAX_SEPARATION as "priceTaxSeparation", <!-- 价税分离;1是2否 -->
T1.THIS_SETTLEMENT_AMOUNT as "thisSettlementAmount", <!-- 本次结算金额 -->
T1.THIS_SETTLEMENT_TAX as "thisSettlementTax", <!-- 本次结算税金 -->
T1.THIS_PRICE_TAX as "thisPriceTax", <!-- 本次结算价税合计金额 -->
T1.TOTAL_CONTRACT_PRICE as "totalContractPrice", <!-- 合同金额(元) -->
T1.CUMULATIVE_SETTLEMENT_AMOUNT as "cumulativeSettlementAmount", <!-- 累计结算金额 -->
T1.CUMULATIVE_SETTLEMENT_TAX as "cumulativeSettlementTax", <!-- 累计结算税金 -->
T1.CUMULATIVE_PRICE_TAX as "cumulativePriceTax", <!-- 累计结算价税合计金额 -->
T1.REMAINING_AMOUNT as "remainingAmount", <!-- 累计结算价税合计金额 -->
T1.REVIEW_STATUS as "reviewStatus", <!-- 审核状态 -->
T1.CREATED_BY as "createdBy", <!-- 记录创建者 -->
T1.CREATED_NAME as "createdName", <!-- 记录创建名称 -->
T1.CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
T1.UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
T1.UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
T1.UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
T1.DEP_CODE as "depCode" <!-- 部门编码 -->
</sql>
<sql id="authCondition">
<!-- 无权限时使用 -->
<isNotEmpty prepend=" AND " property="authDepCode">
T1.DEP_CODE = #authDepCode#
</isNotEmpty>
<!-- 仅本人和部门组合 -->
<isEqual prepend=" AND " property="authCombination" compareValue="1">
(T1.CREATED_BY = #authOnlyPeople# OR T1.DEP_CODE IN <iterate close=")" open="(" conjunction=","
property="authDepCodes">#authDepCodes[]#</iterate>)
</isEqual>
<!-- 仅本人或部门 -->
<isNotEqual prepend=" AND " property="authCombination" compareValue="1">
<isNotEmpty property="authOnlyPeople">
T1.CREATED_BY = #authOnlyPeople#
</isNotEmpty>
<isNotEmpty property="authDepCodes">
T1.DEP_CODE IN <iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>
</isNotEmpty>
</isNotEqual>
</sql>
<sql id="condition"> <sql id="condition">
<include refid="HGXSDataAuth.authCondition"/> <include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
T1.ID = #id# T1.ID = #id#
</isNotEmpty> </isNotEmpty>
...@@ -127,46 +178,21 @@ ...@@ -127,46 +178,21 @@
<isNotEmpty prepend=" AND " property="depCode"> <isNotEmpty prepend=" AND " property="depCode">
T1.DEP_CODE = #depCode# T1.DEP_CODE = #depCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="contractType">
B.CONTRACT_TYPE = #contractType#
</isNotEmpty>
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.cw.domain.HGCW008"> resultClass="com.baosight.hggp.hg.cw.domain.HGCW008">
SELECT SELECT
T1.ID as "id", <include refid="column"/>
T1.ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
T1.COMPANY_CODE as "companyCode", <!-- 公司编码 -->
T1.COMPANY_NAME as "companyName", <!-- 公司名称 -->
T1.PROJ_CODE as "projCode", <!-- 项目编码 -->
T1.PROJ_NAME as "projName", <!-- 项目名称 -->
T1.CONTRACT_NUMBER as "contractNumber", <!-- 合同号 -->
T1.CONTRACT_NAME as "contractName", <!-- 合同名称 -->
T1.SETTLEMENT_NUMBER as "settlementNumber", <!-- 结算编号 -->
T1.SETTLEMENT_TYPE as "settlementType", <!-- 结算类别;1部分结算2最终结算 -->
T1.CONTRACT_DATE as "contractDate", <!-- 结算日期 -->
T1.TAX_POINTS as "taxPoints", <!-- 税点 -->
T1.PRICE_TAX_SEPARATION as "priceTaxSeparation", <!-- 价税分离;1是2否 -->
T1.THIS_SETTLEMENT_AMOUNT as "thisSettlementAmount", <!-- 本次结算金额 -->
T1.THIS_SETTLEMENT_TAX as "thisSettlementTax", <!-- 本次结算税金 -->
T1.THIS_PRICE_TAX as "thisPriceTax", <!-- 本次结算价税合计金额 -->
T1.TOTAL_CONTRACT_PRICE as "totalContractPrice", <!-- 合同金额(元) -->
T1.CUMULATIVE_SETTLEMENT_AMOUNT as "cumulativeSettlementAmount", <!-- 累计结算金额 -->
T1.CUMULATIVE_SETTLEMENT_TAX as "cumulativeSettlementTax", <!-- 累计结算税金 -->
T1.CUMULATIVE_PRICE_TAX as "cumulativePriceTax", <!-- 累计结算价税合计金额 -->
T1.REMAINING_AMOUNT as "remainingAmount", <!-- 累计结算价税合计金额 -->
T1.REVIEW_STATUS as "reviewStatus", <!-- 审核状态 -->
T1.CREATED_BY as "createdBy", <!-- 记录创建者 -->
T1.CREATED_NAME as "createdName", <!-- 记录创建名称 -->
T1.CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
T1.UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
T1.UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
T1.UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
T1.DEP_CODE as "depCode" <!-- 部门编码 -->
FROM ${hggpSchema}.HGCW008 T1 LEFT JOIN FROM ${hggpSchema}.HGCW008 T1 LEFT JOIN
${hggpSchema}.HGCW002 B ${hggpSchema}.HGCW002 B
ON T1.PROJ_CODE = B.PROJ_CODE ON T1.PROJ_CODE = B.PROJ_CODE
AND T1.CONTRACT_NUMBER = B.CONTRACT_NUMBER AND T1.CONTRACT_NUMBER = B.CONTRACT_NUMBER
AND T1.COMPANY_CODE = B.COMPANY_CODE AND T1.COMPANY_CODE = B.COMPANY_CODE
WHERE 1=1 AND B.CONTRACT_TYPE = 1 AND T1.SETTLEMENT_TYPE = 2 WHERE 1=1
<include refid="condition" /> <include refid="condition" />
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="orderBy">
...@@ -180,10 +206,30 @@ ...@@ -180,10 +206,30 @@
</select> </select>
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGCW008 WHERE 1=1 SELECT COUNT(*) FROM ${hggpSchema}.HGCW008 WHERE 1=1 AND B.CONTRACT_TYPE = '2'
<include refid="condition" /> <include refid="condition" />
</select> </select>
<select id="queryB" parameterClass="java.util.HashMap" resultClass="com.baosight.hggp.hg.cw.domain.HGCW008">
SELECT
<include refid="column"/>
FROM ${hggpSchema}.HGCW008 T1 LEFT JOIN
${hggpSchema}.HGCW006 B
ON T1.PROJ_CODE = B.PROJ_CODE
AND T1.CONTRACT_NUMBER = B.CONTRACT_NUMBER
AND T1.COMPANY_CODE = B.COMPANY_CODE
WHERE 1=1 AND B.CONTRACT_STATUS = 2
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
T1.ID asc
</isEmpty>
</dynamic>
</select>
<!-- <!--
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
......
...@@ -24,9 +24,31 @@ ...@@ -24,9 +24,31 @@
UPDATED_TIME VARCHAR NOT NULL, UPDATED_TIME VARCHAR NOT NULL,
DEP_CODE VARCHAR DEP_CODE VARCHAR
--> -->
<sqlMap namespace="hgcw013"> <sqlMap namespace="HGCW013">
<sql id="column">
ID as "id",
MAIN_ID as "mainId", <!-- 主表ID -->
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
SETTLEMENT_NUMBER as "settlementNumber", <!-- 来源单号 -->
BILL_NUMBER as "billNumber", <!-- 发票号 -->
PARTY_A as "partyA", <!-- 供应商名称 -->
TAX_POINTS as "taxPoints", <!-- 税率 -->
THIS_SETTLEMENT_TAX as "thisSettlementTax", <!-- 税额 -->
THIS_SETTLEMENT_AMOUNT as "thisSettlementAmount", <!-- 不含税金额 -->
TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding", <!-- 开票总额 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DEP_CODE as "depCode" <!-- 部门编码 -->
</sql>
<sql id="condition"> <sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
...@@ -87,27 +109,9 @@ ...@@ -87,27 +109,9 @@
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.cw.service.Hgcw013"> resultClass="com.baosight.hggp.hg.cw.domain.HGCW013">
SELECT SELECT
ID as "id", <include refid="column" />
MAIN_ID as "mainId", <!-- 主表ID -->
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
SETTLEMENT_NUMBER as "settlementNumber", <!-- 来源单号 -->
BILL_NUMBER as "billNumber", <!-- 发票号 -->
PARTY_A as "partyA", <!-- 供应商名称 -->
TAX_POINTS as "taxPoints", <!-- 税率 -->
THIS_SETTLEMENT_TAX as "thisSettlementTax", <!-- 税额 -->
THIS_SETTLEMENT_AMOUNT as "thisSettlementAmount", <!-- 不含税金额 -->
TOTAL_CONTRACT_PRICE_INCLUDING as "totalContractPriceIncluding", <!-- 开票总额 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DEP_CODE as "depCode" <!-- 部门编码 -->
FROM ${hggpSchema}.HGCW013 WHERE 1=1 FROM ${hggpSchema}.HGCW013 WHERE 1=1
<include refid="condition" /> <include refid="condition" />
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
...@@ -115,7 +119,7 @@ ...@@ -115,7 +119,7 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
ID asc ID DESC
</isEmpty> </isEmpty>
</dynamic> </dynamic>
......
...@@ -389,7 +389,19 @@ public class HGCWTools { ...@@ -389,7 +389,19 @@ public class HGCWTools {
} }
} }
/**
* 采购收票清单
*/
public static class HgCw012 { public static class HgCw012 {
public static HGCW012 getId(String id) {
AssertUtils.isNull(id, "采购收票单ID不能为空!");
List<HGCW012> results = DaoBase.getInstance().query(HGCW012.QUERY,new HashMap<String,Object>(){
{put("id",id);}
});
return results.get(0);
}
public static void cutAmount(String settlementNumber, BigDecimal cutAmount) { public static void cutAmount(String settlementNumber, BigDecimal cutAmount) {
AssertUtils.isNull(settlementNumber, "来源单号不能为空!"); AssertUtils.isNull(settlementNumber, "来源单号不能为空!");
// if (cutAmount.compareTo(new BigDecimal(BigInteger.ZERO)) <= 0) { // if (cutAmount.compareTo(new BigDecimal(BigInteger.ZERO)) <= 0) {
...@@ -413,6 +425,47 @@ public class HGCWTools { ...@@ -413,6 +425,47 @@ public class HGCWTools {
} }
} }
/**
* 采购收票明细清单
*/
public static class HgCw013 {
public static HGCW013 getId(Long id) {
AssertUtils.isNull(id, "销售开票单ID不能为空!");
List<HGCW013> results = DaoBase.getInstance().query(HGCW013.QUERY,new HashMap<String,Object>(){
{put("id",id);}
});
return results.get(0);
}
public static List<HGCW013> mapToList(List<Map> rows, Long mainId) {
List<HGCW013> hgcw013List = new ArrayList<>();
if (CollectionUtils.isNotEmpty(rows)) {
rows.forEach(row -> {
HGCW013 hgcw013 = new HGCW013();
hgcw013.fromMap(row);
String settlementNumber = row.get("settlementNumber").toString();
String remainingAmount = row.get("thisSettlementAmount").toString();
hgcw013.setTotalContractPriceIncluding(new BigDecimal(remainingAmount));
hgcw013.setSettlementNumber(settlementNumber);
if (mainId != null) {
hgcw013.setMainId(mainId);
}
hgcw013List.add(hgcw013);
});
}
return hgcw013List;
}
public static List<HGCW013> getMainId(Long mainId) {
AssertUtils.isNull(mainId, "主表ID不能为空!");
List<HGCW013> results = DaoBase.getInstance().query(HGCW013.QUERY,new HashMap<String,Object>(){
{put("mainId",mainId);}
});
return results;
}
}
public static class HgCw014 { public static class HgCw014 {
public static HGCW014 getId(String id) { public static HGCW014 getId(String id) {
......
...@@ -64,7 +64,8 @@ ...@@ -64,7 +64,8 @@
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW008.xml"/> <sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW008.xml"/>
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW009.xml"/> <sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW009.xml"/>
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW010A.xml"/> <sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW010A.xml"/>
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW012.xml"/>
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW013.xml"/>
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW014.xml"/> <sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW014.xml"/>
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW015.xml"/> <sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW015.xml"/>
<sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW016.xml"/> <sqlMap resource="com/baosight/hggp/hg/cw/sql/HGCW016.xml"/>
......
...@@ -26,7 +26,7 @@ $(function() { ...@@ -26,7 +26,7 @@ $(function() {
loadComplete: function (e) { loadComplete: function (e) {
$("#SELECT_BILL").on("click",addFunc); $("#SELECT_BILL").on("click",addFunc);
$("#BTN_UPDATE").on("click",updateFunc); $("#BTN_UPDATE").on("click",updateFunc);
$("#BTN_SUBMIT").on("click",submitFunc); $("#SUBMIT").on("click",submitFunc);
}, },
onSuccess: function (e) { onSuccess: function (e) {
...@@ -125,6 +125,10 @@ function submitFunc() { ...@@ -125,6 +125,10 @@ function submitFunc() {
} }
var flag = true; var flag = true;
rows.forEach(function (row) { rows.forEach(function (row) {
if (isBlank(row.billTybe)) {
message("勾选的数据中未选择票据类型!");
flag = false;
}
if (row.reviewStatus == "3") { if (row.reviewStatus == "3") {
message("勾选的数据中有已经提交的合同!"); message("勾选的数据中有已经提交的合同!");
flag = false; flag = false;
......
...@@ -30,7 +30,10 @@ ...@@ -30,7 +30,10 @@
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="140" align="center"/> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="140" align="center"/>
<EF:EFColumn ename="partyA" cname="供应商名称" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="partyA" cname="供应商名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="settlementNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="settlementNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="billTybe" cname="票据类型" width="120" enable="false" readonly="true" align="center"/> <EF:EFComboColumn ename="billTybe" cname="票据类型" width="120" align="center" required="true"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="true" >
<EF:EFCodeOption codeName="hggp.cw.billTybe"/>
</EF:EFComboColumn>
<EF:EFColumn ename="receiveDate" cname="收票日期" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="receiveDate" cname="收票日期" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="signingDate" cname="开票日期" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="signingDate" cname="开票日期" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="billNumber" cname="发票号" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="billNumber" cname="发票号" width="120" enable="false" readonly="true" align="center"/>
......
...@@ -45,36 +45,80 @@ function cancelFunc() { ...@@ -45,36 +45,80 @@ function cancelFunc() {
parent.JSColorbox.setValueCallback(); parent.JSColorbox.setValueCallback();
} }
function btnSaveFunc() { function btnSaveFunc(btnNode, gridNode) {
let rows = resultGrid.getCheckedRows(); let rows;
if (gridNode == "result") {
rows = resultGrid.getCheckedRows();
}else if (gridNode == "resultA") {
rows = resultAGrid.getCheckedRows();
}else if (gridNode == "resultB") {
rows = resultBGrid.getCheckedRows();
}
if (rows.length < 1) { if (rows.length < 1) {
message("请选择数据") message("请选择数据")
return; return;
} }
for (let i = 0; i < rows.length; i++) { let flag = true;
let thisAmount = rows[i]['thisAmount']; $.each(rows, function(index, item) {
let remainingAmount = rows[i]['remainingAmount']; let thisAmount = item['thisSettlementAmount'];
let remainingAmount = item['remainingAmount'];
let billNumber = item['billNumber'];
if (!isNumber(thisAmount) && !isPositiveNumber(thisAmount)) { if (!isNumber(thisAmount) && !isPositiveNumber(thisAmount)) {
message("勾选的第" + (i + 1) + "行本次开票金额必须是大于0的数字"); message("勾选的第" + (index + 1) + "行本次开票金额必须是大于0的数字");
return; flag = false;
return false;
} }
if (parseFloat(thisAmount) > parseFloat(remainingAmount)) { if (parseFloat(thisAmount) > parseFloat(remainingAmount)) {
message("第" + (i + 1) + "行本次开票金额不能大于剩余开票金额"); message("第" + (index + 1) + "行本次开票金额不能大于剩余开票金额");
return; flag = false;
return false;
} }
if (isBlank(billNumber)) {
message("第" + (index + 1) + "行发票号不能为空,请填写发票号");
flag = false;
return false;
} }
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据生成销售票据吗? ", { });
if (flag){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据生成票据吗?", {
ok: function () { ok: function () {
JSUtils.submitGridsData("result", "HGCW010", "select", var info = new EiInfo();
true, function (e) { info.addBlock(JSUtils.checkedRows2Block(gridNode));
var status = e.getStatus(); info.set("inqu_status-0-type",gridNode);
if (status !== -1) { info.set("inqu_status-0-mainId", $("#inqu_status-0-mainId").val());
// parent.JSColorbox.setValueCallback(); EiCommunicator.send("HGCW012", "select", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
try {
if (gridNode == "result") {
resultGrid.dataSource.page(1);
}else if (gridNode == "resultA") {
resultAGrid.dataSource.page(1);
}else if (gridNode == "resultB") {
resultBGrid.dataSource.page(1);
} }
} catch (e) {
// TODO: handle exception
} }
); if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
//JSUtils.submitGridsData("result", "HPSC001", "save", true);
} }
}); });
}
} }
$(function () { $(function () {
...@@ -102,65 +146,78 @@ $(function () { ...@@ -102,65 +146,78 @@ $(function () {
{ {
field: "projName", field: "projName",
title: "项目名称", title: "项目名称",
headerTemplate: "<span style='color: '>公司名称 </span>", headerTemplate: "<span style='color: '>项目名称 </span>",
locked: false
},
{
field: "projName",
title: "项目名称",
headerTemplate: "<span style='color: '>公司名称 </span>",
locked: false locked: false
}, },
{ {
field: "settlementNumber", field: "settlementNumber",
title: "结算编号", title: "结算编号",
headerTemplate: "<span style='color: '>公司名称 </span>", headerTemplate: "<span style='color: '>结算编号 </span>",
locked: false locked: false
}, },
{ {
field: "contractDate", field: "contractDate",
title: "结算日期", title: "结算日期",
headerTemplate: "<span style='color: '>公司名称 </span>", headerTemplate: "<span style='color: '>结算日期 </span>",
locked: false locked: false
}, },
{ {
field: "billNumber", field: "billNumber",
title: "发票号", title: "发票号",
headerTemplate: "<span style='color: '>公司名称 </span>", headerTemplate: "<span style='color: '>发票号 </span>",
locked: false locked: false
}, },
{ {
field: "taxPoints", field: "taxPoints",
title: "税率(%)", title: "税率(%)",
headerTemplate: "<span style='color: '>公司名称 </span>", headerTemplate: "<span style='color: '>税率(%) </span>",
locked: false locked: false
}, },
{ {
field: "thisPriceTax", field: "thisPriceTax",
title: "结算价税合计金额", title: "结算价税合计金额",
headerTemplate: "<span style='color: '>公司名称 </span>", headerTemplate: "<span style='color: '>结算价税合计金额 </span>",
locked: false locked: false
}, },
{ {
field: "thisSettlementTax", field: "thisSettlementTax",
title: "结算税金", title: "结算税金",
headerTemplate: "<span style='color: '>公司名称 </span>", headerTemplate: "<span style='color: '>结算税金 </span>",
locked: false locked: false
}, },
{ {
field: "thisSettlementAmount", field: "thisSettlementAmount",
title: "结算金额", title: "结算金额",
headerTemplate: "<span style='color: '>公司名称 </span>", headerTemplate: "<span style='color: '>结算金额 </span>",
locked: false locked: false
},{ },{
field: "remainingAmount", field: "remainingAmount",
title: "剩余收票金额", title: "剩余付款金额",
headerTemplate: "<span style='color: '>公司名称 </span>", headerTemplate: "<span style='color: '>剩余付款金额 </span>",
locked: false locked: false
}], }],
loadComplete: function(grid) {
// 此 grid 对象
$("#info-tab-1").on("click", function () {
grid.dataSource.page(1);
});
},
dataBound: function (e) { dataBound: function (e) {
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
btnSaveFunc(btnNode,"result");
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
} }
}, },
},
"resultA": { "resultA": {
columns: [ columns: [
{ {
...@@ -173,65 +230,79 @@ $(function () { ...@@ -173,65 +230,79 @@ $(function () {
{ {
field: "projName", field: "projName",
title: "项目名称", title: "项目名称",
headerTemplate: "<span style='color: '>公司名称 </span>", headerTemplate: "<span style='color: '>项目名称 </span>",
locked: false
},
{
field: "projName",
title: "项目名称",
headerTemplate: "<span style='color: '>公司名称 </span>",
locked: false locked: false
}, },
{ {
field: "settlementNumber", field: "settlementNumber",
title: "结算编号", title: "结算编号",
headerTemplate: "<span style='color: '>公司名称 </span>", headerTemplate: "<span style='color: '>结算编号 </span>",
locked: false locked: false
}, },
{ {
field: "contractDate", field: "contractDate",
title: "结算日期", title: "结算日期",
headerTemplate: "<span style='color: '>公司名称 </span>", headerTemplate: "<span style='color: '>结算日期 </span>",
locked: false locked: false
}, },
{ {
field: "billNumber", field: "billNumber",
title: "发票号", title: "发票号",
headerTemplate: "<span style='color: '>公司名称 </span>", headerTemplate: "<span style='color: '>发票号 </span>",
locked: false locked: false
}, },
{ {
field: "taxPoints", field: "taxPoints",
title: "税率(%)", title: "税率(%)",
headerTemplate: "<span style='color: '>公司名称 </span>", headerTemplate: "<span style='color: '>税率(%) </span>",
locked: false locked: false
}, },
{ {
field: "thisPriceTax", field: "thisPriceTax",
title: "结算价税合计金额", title: "结算价税合计金额",
headerTemplate: "<span style='color: '>公司名称 </span>", headerTemplate: "<span style='color: '>结算价税合计金额 </span>",
locked: false locked: false
}, },
{ {
field: "thisSettlementTax", field: "thisSettlementTax",
title: "结算税金", title: "结算税金",
headerTemplate: "<span style='color: '>公司名称 </span>", headerTemplate: "<span style='color: '>结算税金 </span>",
locked: false locked: false
}, },
{ {
field: "thisSettlementAmount", field: "thisSettlementAmount",
title: "结算金额", title: "结算金额",
headerTemplate: "<span style='color: '>公司名称 </span>", headerTemplate: "<span style='color: '>结算金额 </span>",
locked: false locked: false
},{ },{
field: "remainingAmount", field: "remainingAmount",
title: "剩余收票金额", title: "剩余付款金额",
headerTemplate: "<span style='color: '>公司名称 </span>", headerTemplate: "<span style='color: '>剩余付款金额 </span>",
locked: false locked: false
}], }],
loadComplete: function(grid) {
// 此 grid 对象
$("#info-tab-2").on("click", function () {
grid.dataSource.page(1);
});
},
dataBound: function (e) { dataBound: function (e) {
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
btnSaveFunc(btnNode,"resultA");
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
} }
}, "resultB": { },
},
"resultB": {
columns: [ columns: [
{ {
field: "projCode", field: "projCode",
...@@ -243,68 +314,89 @@ $(function () { ...@@ -243,68 +314,89 @@ $(function () {
{ {
field: "projName", field: "projName",
title: "项目名称", title: "项目名称",
headerTemplate: "<span style='color: '>公司名称 </span>", headerTemplate: "<span style='color: '>项目名称 </span>",
locked: false
},
{
field: "projName",
title: "项目名称",
headerTemplate: "<span style='color: '>公司名称 </span>",
locked: false locked: false
}, },
{ {
field: "settlementNumber", field: "settlementNumber",
title: "结算编号", title: "结算编号",
headerTemplate: "<span style='color: '>公司名称 </span>", headerTemplate: "<span style='color: '>结算编号 </span>",
locked: false locked: false
}, },
{ {
field: "contractDate", field: "contractDate",
title: "结算日期", title: "结算日期",
headerTemplate: "<span style='color: '>公司名称 </span>", headerTemplate: "<span style='color: '>结算日期 </span>",
locked: false locked: false
}, },
{ {
field: "billNumber", field: "billNumber",
title: "发票号", title: "发票号",
headerTemplate: "<span style='color: '>公司名称 </span>", headerTemplate: "<span style='color: '>发票号 </span>",
locked: false locked: false
}, },
{ {
field: "taxPoints", field: "taxPoints",
title: "税率(%)", title: "税率(%)",
headerTemplate: "<span style='color: '>公司名称 </span>", headerTemplate: "<span style='color: '>税率(%) </span>",
locked: false locked: false
}, },
{ {
field: "thisPriceTax", field: "thisPriceTax",
title: "结算价税合计金额", title: "结算价税合计金额",
headerTemplate: "<span style='color: '>公司名称 </span>", headerTemplate: "<span style='color: '>结算价税合计金额 </span>",
locked: false locked: false
}, },
{ {
field: "thisSettlementTax", field: "thisSettlementTax",
title: "结算税金", title: "结算税金",
headerTemplate: "<span style='color: '>公司名称 </span>", headerTemplate: "<span style='color: '>结算税金 </span>",
locked: false locked: false
}, },
{ {
field: "thisSettlementAmount", field: "thisSettlementAmount",
title: "结算金额", title: "结算金额",
headerTemplate: "<span style='color: '>公司名称 </span>", headerTemplate: "<span style='color: '>结算金额 </span>",
locked: false locked: false
},{ },{
field: "remainingAmount", field: "remainingAmount",
title: "剩余收票金额", title: "剩余付款金额",
headerTemplate: "<span style='color: '>公司名称 </span>", headerTemplate: "<span style='color: '>剩余付款金额 </span>",
locked: false locked: false
}], }],
loadComplete: function(grid) {
// 此 grid 对象
$("#info-tab-3").on("click", function () {
grid.dataSource.page(1);
});
},
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
let btnNode = $(this);
//禁用按钮
btnNode.attr("disabled", true);
btnSaveFunc(btnNode,"resultB");
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
}
},
} }
}; };
IPLATUI.EFTab = { IPLATUI.EFTab = {
"info": { "info": {
show: function (e) { show: function (e) {
$(e.contentElement).find("div[data-role='grid']").data("kendoGrid").refresh() $(e.contentElement).find("div[data-role='grid']").data("kendoGrid").refresh();
let grid = $(e.contentElement).find("div[data-role='grid']").data("kendoGrid");
grid.dataSource.page(1)
/*if (e.name == "info-tab-1") {
} else if (e.name == "info-tab-2") {
$("#info-tab-2").click();
} else if (e.name == "info-tab-3") {
$("#info-tab-3").click();
}*/
} }
} }
} }
......
...@@ -6,13 +6,10 @@ ...@@ -6,13 +6,10 @@
<c:set var="ctx" value="${pageContext.request.contextPath}"/> <c:set var="ctx" value="${pageContext.request.contextPath}"/>
<head> <head>
</head> </head>
<EF:EFPage title="结算单"> <EF:EFPage title="结算单">
<EF:EFRegion id="inqu"> <EF:EFRegion id="inqu">
<div class="row"> <div class="row">
<EF:EFInput cname="隐藏条件" ename="mainId" blockId="inqu_status" row="0" type="hidden"> <EF:EFInput cname="隐藏条件" ename="mainId" blockId="inqu_status" row="0" type="hidden" />
</EF:EFInput>
<EF:EFDateSpan startCname="结算日期(从)" endCname="至" blockId="inqu_status" <EF:EFDateSpan startCname="结算日期(从)" endCname="至" blockId="inqu_status"
startName="signingDateFrom" endName="signingDateTo" row="0" role="date" startName="signingDateFrom" endName="signingDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true"> format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
...@@ -24,18 +21,18 @@ ...@@ -24,18 +21,18 @@
</EF:EFRegion> </EF:EFRegion>
<EF:EFTab id="info"> <EF:EFTab id="info">
<div title="采购收货"> <div title="采购收货">
<EF:EFGrid blockId="result" autoBind="false"> <EF:EFGrid blockId="result" autoDraw="override" autoBind="false">
</EF:EFGrid> </EF:EFGrid>
</div> </div>
<div title="劳务"> <div title="劳务">
<EF:EFGrid blockId="resultA" autoBind="false"> <EF:EFGrid blockId="resultA" autoDraw="override" autoBind="false" queryMethod="queryA">
</EF:EFGrid> </EF:EFGrid>
</div> </div>
<div title="租赁"> <div title="租赁">
<EF:EFGrid blockId="resultB" autoBind="false"> <EF:EFGrid blockId="resultB" autoDraw="override" autoBind="false" queryMethod="queryB">
</EF:EFGrid> </EF:EFGrid>
</div> </div>
</EF:EFTab> </EF:EFTab>
</EF:EFPage> </EF:EFPage>
<script> <script>
var ctx = "${ctx}"; var ctx = "${ctx}";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment