Commit 69a323fb by liuyang

2024-09-20

1、结算单添加选择租赁合同
2、结算单添加选择租赁合同清单
parent 569a388e
package com.baosight.hggp.hg.cw.domain; package com.baosight.hggp.hg.cw.domain;
import com.baosight.hggp.util.DateUtils;
import com.baosight.iplat4j.core.util.NumberUtils; import com.baosight.iplat4j.core.util.NumberUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import com.baosight.iplat4j.core.ei.EiColumn; import com.baosight.iplat4j.core.ei.EiColumn;
...@@ -182,56 +183,56 @@ public class HGCW008 extends DaoEPBase { ...@@ -182,56 +183,56 @@ public class HGCW008 extends DaoEPBase {
eiColumn = new EiColumn(FIELD_THIS_SETTLEMENT_AMOUNT); eiColumn = new EiColumn(FIELD_THIS_SETTLEMENT_AMOUNT);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(3); eiColumn.setScaleLength(2);
eiColumn.setFieldLength(15); eiColumn.setFieldLength(15);
eiColumn.setDescName("本次结算金额"); eiColumn.setDescName("本次结算金额");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_THIS_SETTLEMENT_TAX); eiColumn = new EiColumn(FIELD_THIS_SETTLEMENT_TAX);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(3); eiColumn.setScaleLength(2);
eiColumn.setFieldLength(15); eiColumn.setFieldLength(15);
eiColumn.setDescName("本次结算税金"); eiColumn.setDescName("本次结算税金");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_THIS_PRICE_TAX); eiColumn = new EiColumn(FIELD_THIS_PRICE_TAX);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(3); eiColumn.setScaleLength(2);
eiColumn.setFieldLength(15); eiColumn.setFieldLength(15);
eiColumn.setDescName("本次结算价税合计金额"); eiColumn.setDescName("本次结算价税合计金额");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_TOTAL_CONTRACT_PRICE); eiColumn = new EiColumn(FIELD_TOTAL_CONTRACT_PRICE);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(3); eiColumn.setScaleLength(2);
eiColumn.setFieldLength(15); eiColumn.setFieldLength(15);
eiColumn.setDescName("合同金额(元)"); eiColumn.setDescName("合同金额(元)");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CUMULATIVE_SETTLEMENT_AMOUNT); eiColumn = new EiColumn(FIELD_CUMULATIVE_SETTLEMENT_AMOUNT);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(3); eiColumn.setScaleLength(2);
eiColumn.setFieldLength(15); eiColumn.setFieldLength(15);
eiColumn.setDescName("累计结算金额"); eiColumn.setDescName("累计结算金额");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CUMULATIVE_SETTLEMENT_TAX); eiColumn = new EiColumn(FIELD_CUMULATIVE_SETTLEMENT_TAX);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(3); eiColumn.setScaleLength(2);
eiColumn.setFieldLength(15); eiColumn.setFieldLength(15);
eiColumn.setDescName("累计结算税金"); eiColumn.setDescName("累计结算税金");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CUMULATIVE_PRICE_TAX); eiColumn = new EiColumn(FIELD_CUMULATIVE_PRICE_TAX);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(3); eiColumn.setScaleLength(2);
eiColumn.setFieldLength(15); eiColumn.setFieldLength(15);
eiColumn.setDescName("累计结算价税合计金额"); eiColumn.setDescName("累计结算价税合计金额");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REMAINING_AMOUNT); eiColumn = new EiColumn(FIELD_REMAINING_AMOUNT);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(3); eiColumn.setScaleLength(2);
eiColumn.setFieldLength(15); eiColumn.setFieldLength(15);
eiColumn.setDescName("剩余开票/收票金额"); eiColumn.setDescName("剩余开票/收票金额");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
...@@ -752,7 +753,7 @@ public class HGCW008 extends DaoEPBase { ...@@ -752,7 +753,7 @@ public class HGCW008 extends DaoEPBase {
setContractName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_NAME)), contractName)); setContractName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_NAME)), contractName));
setSettlementNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SETTLEMENT_NUMBER)), settlementNumber)); setSettlementNumber(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SETTLEMENT_NUMBER)), settlementNumber));
setSettlementType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_SETTLEMENT_TYPE)), settlementType)); setSettlementType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_SETTLEMENT_TYPE)), settlementType));
setContractDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CONTRACT_DATE)), contractDate)); setContractDate(StringUtils.defaultIfEmpty(StringUtils.toString(DateUtils.formatShort(map.get(FIELD_CONTRACT_DATE))), contractDate));
setTaxPoints(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_TAX_POINTS)), taxPoints)); setTaxPoints(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_TAX_POINTS)), taxPoints));
setPriceTaxSeparation(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PRICE_TAX_SEPARATION)), priceTaxSeparation)); setPriceTaxSeparation(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PRICE_TAX_SEPARATION)), priceTaxSeparation));
setThisSettlementAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_THIS_SETTLEMENT_AMOUNT)), thisSettlementAmount)); setThisSettlementAmount(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_THIS_SETTLEMENT_AMOUNT)), thisSettlementAmount));
......
...@@ -164,7 +164,7 @@ public class HGCW009 extends DaoEPBase { ...@@ -164,7 +164,7 @@ public class HGCW009 extends DaoEPBase {
eiColumn = new EiColumn(FIELD_TOTAL_PRICE); eiColumn = new EiColumn(FIELD_TOTAL_PRICE);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(3); eiColumn.setScaleLength(2);
eiColumn.setFieldLength(15); eiColumn.setFieldLength(15);
eiColumn.setDescName("总价"); eiColumn.setDescName("总价");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
......
...@@ -2,13 +2,11 @@ package com.baosight.hggp.hg.cw.service; ...@@ -2,13 +2,11 @@ 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.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils; import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant; import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.cw.domain.HGCW001; import com.baosight.hggp.hg.cw.domain.*;
import com.baosight.hggp.hg.cw.domain.HGCW002;
import com.baosight.hggp.hg.cw.domain.HGCW003;
import com.baosight.hggp.hg.cw.domain.HGCW999;
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.pz.domain.HGPZ002; import com.baosight.hggp.hg.pz.domain.HGPZ002;
...@@ -499,6 +497,10 @@ public class ServiceHGCW002 extends ServiceBase { ...@@ -499,6 +497,10 @@ public class ServiceHGCW002 extends ServiceBase {
public EiInfo queryContractByNumber(EiInfo inInfo) { public EiInfo queryContractByNumber(EiInfo inInfo) {
HGCW002 hgcw002 = HGCWTools.HgCw002.getContractNumber(inInfo.getString("contractNumber")); HGCW002 hgcw002 = HGCWTools.HgCw002.getContractNumber(inInfo.getString("contractNumber"));
inInfo.set("hgcw002", hgcw002); inInfo.set("hgcw002", hgcw002);
if (hgcw002 == null){
HGCW006 hgcw006 = (HGCW006) DaoBase.getInstance().get(HGCW006.QUERY, "contractNumber", inInfo.getString("contractNumber"));
inInfo.set("hgcw002", hgcw006);
}
return inInfo; return inInfo;
} }
} }
...@@ -98,6 +98,9 @@ public class ServiceHGCW008 extends ServiceBase { ...@@ -98,6 +98,9 @@ public class ServiceHGCW008 extends ServiceBase {
if (CollectionUtils.isNotEmpty(resultRows)) { if (CollectionUtils.isNotEmpty(resultRows)) {
HGCW008 hgcw008 = new HGCW008(); HGCW008 hgcw008 = new HGCW008();
hgcw008.fromMap(resultRows.get(0)); hgcw008.fromMap(resultRows.get(0));
List<HGCW006> hgcw006s = DaoBase.getInstance().query(HGCW006.QUERY,new HashMap<String,Object>(){
{put("contractNumber",hgcw008.getContractNumber());}
});
if (hgcw008.getId() == null || hgcw008.getId() == 0) { if (hgcw008.getId() == null || hgcw008.getId() == 0) {
//UserVO userVO = HGCWTools.HgCw002.getUserCompany(); //UserVO userVO = HGCWTools.HgCw002.getUserCompany();
HGSC001 project = HGSCTools.Hgsc001.queryByCode(hgcw008.getProjCode()); HGSC001 project = HGSCTools.Hgsc001.queryByCode(hgcw008.getProjCode());
...@@ -108,8 +111,14 @@ public class ServiceHGCW008 extends ServiceBase { ...@@ -108,8 +111,14 @@ public class ServiceHGCW008 extends ServiceBase {
hgcw008.setReviewStatus(2); hgcw008.setReviewStatus(2);
hgcw008.setContractDate(DateUtils.formatShort(hgcw008.getContractDate())); hgcw008.setContractDate(DateUtils.formatShort(hgcw008.getContractDate()));
hgcw008.setRemainingAmount(hgcw008.getThisPriceTax()); hgcw008.setRemainingAmount(hgcw008.getThisPriceTax());
if (hgcw006s.size()>0){
// 反写租赁剩余金额
HGCWTools.HgCw006.deductionAmount(hgcw008.getContractNumber(), hgcw008.getThisPriceTax());
}else {
// 反写剩余金额 // 反写剩余金额
HGCWTools.HgCw008.remainingAmount(hgcw008.getContractNumber(), hgcw008.getThisPriceTax()); HGCWTools.HgCw008.remainingAmount(hgcw008.getContractNumber(), hgcw008.getThisPriceTax());
}
this.add(hgcw008); this.add(hgcw008);
// 写入其他数据 // 写入其他数据
HGCWTools.HgCw009.save(detail1Rows,settlementNumber,hgcw008); HGCWTools.HgCw009.save(detail1Rows,settlementNumber,hgcw008);
...@@ -117,15 +126,23 @@ public class ServiceHGCW008 extends ServiceBase { ...@@ -117,15 +126,23 @@ public class ServiceHGCW008 extends ServiceBase {
hgcw008.setContractDate(DateUtils.formatShort(hgcw008.getContractDate())); hgcw008.setContractDate(DateUtils.formatShort(hgcw008.getContractDate()));
HGCW008 hgcw008Db = HGCWTools.HgCw008.getId(hgcw008.getId().toString()); HGCW008 hgcw008Db = HGCWTools.HgCw008.getId(hgcw008.getId().toString());
BigDecimal thisPriceTax = hgcw008.getThisPriceTax().subtract(hgcw008Db.getThisPriceTax()); BigDecimal thisPriceTax = hgcw008.getThisPriceTax().subtract(hgcw008Db.getThisPriceTax());
// 反写金额 if (hgcw006s.size()>0){
// 反写租赁剩余金额
HGCWTools.HgCw006.deductionAmount(hgcw008.getContractNumber(), thisPriceTax);
}else {
// 反写剩余金额
HGCWTools.HgCw008.remainingAmount(hgcw008.getContractNumber(), thisPriceTax); HGCWTools.HgCw008.remainingAmount(hgcw008.getContractNumber(), thisPriceTax);
}
this.modify(hgcw008); this.modify(hgcw008);
HGCWTools.HgCw009.update(detail1Rows); HGCWTools.HgCw009.update(detail1Rows);
} }
// 更新合同结算状态 // 更新合同结算状态
HGCWTools.HgCw002.updateBalanceStatus(hgcw008.getContractNumber(),hgcw008.getSettlementType() + 1); HGCWTools.HgCw002.updateBalanceStatus(hgcw008.getContractNumber(),hgcw008.getSettlementType() + 1);
if (hgcw006s.size() == 0){
//更新金额 //更新金额
HGCWTools.HgCw009.calculateAmount(hgcw008.getSettlementNumber()); HGCWTools.HgCw009.calculateAmount(hgcw008.getSettlementNumber());
}
// 更新累计金额 // 更新累计金额
HGCWTools.HgCw008.updateCumulativeSettlement(hgcw008.getContractNumber()); HGCWTools.HgCw008.updateCumulativeSettlement(hgcw008.getContractNumber());
} }
......
package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.hg.cw.domain.HGCW003;
import com.baosight.hggp.hg.cw.domain.HGCW007;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.StringUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.ArrayList;
import java.util.List;
/**
* @author LiuYang
* @version 1.0 2024/9/19
* @description 租赁合同清单
*/
public class ServiceHGCW008F extends ServiceEPBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "租赁合同清单",operType = "查询",operDesc = "初始化")
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW007().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "租赁合同清单",operType = "查询",operDesc = "查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
List<String> ids = new ArrayList<>();
String inventoryIds = inInfo.getString("inqu_status-0-inventoryIds");
if (StringUtils.isNotEmpty(inventoryIds)) {
String[] inventoryIdsArr = inventoryIds.split(",");
for (String id : inventoryIdsArr) {
ids.add(id);
}
inInfo.set("inqu_status-0-ids", ids);
}
inInfo = super.query(inInfo, HGCW007.QUERY, new HGCW007());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
}
...@@ -128,10 +128,10 @@ public class ServiceHGCW009 extends ServiceBase { ...@@ -128,10 +128,10 @@ public class ServiceHGCW009 extends ServiceBase {
String settlementNumber = ""; String settlementNumber = "";
// 写入数据 // 写入数据
for (int i = 0; i < resultRows.size(); i++) { for (int i = 0; i < resultRows.size(); i++) {
HGCW009 HGCW009 = new HGCW009(); HGCW009 hgcw009 = new HGCW009();
HGCW009.fromMap(resultRows.get(i)); hgcw009.fromMap(resultRows.get(i));
settlementNumber = HGCW009.getSettlementNumber(); settlementNumber = hgcw009.getSettlementNumber();
this.deleteEntity(HGCW009); this.deleteEntity(hgcw009);
} }
List<HGCW009> HGCW009List = HGCWTools.HgCw009.queryBySettlementNumber(settlementNumber); List<HGCW009> HGCW009List = HGCWTools.HgCw009.queryBySettlementNumber(settlementNumber);
eiInfo.addBlock("detail1").addRows(HGCW009List); eiInfo.addBlock("detail1").addRows(HGCW009List);
...@@ -147,7 +147,9 @@ public class ServiceHGCW009 extends ServiceBase { ...@@ -147,7 +147,9 @@ public class ServiceHGCW009 extends ServiceBase {
try { try {
Map map = new HashMap(); Map map = new HashMap();
String inventoryId = inInfo.getString("inventoryId"); String inventoryId = inInfo.getString("inventoryId");
String contractNumber = inInfo.getString("contractNumber");
map.put("inventoryId", inventoryId); map.put("inventoryId", inventoryId);
map.put("contractNumber", contractNumber);
List result = dao.query("HGCW009.queryEngineeringQuantity", map); List result = dao.query("HGCW009.queryEngineeringQuantity", map);
inInfo.set("result", result.get(0)); inInfo.set("result", result.get(0));
} catch (Exception e) { } catch (Exception e) {
......
...@@ -628,49 +628,61 @@ ...@@ -628,49 +628,61 @@
a.REMAINING_AMOUNT as "remainingAmount", a.REMAINING_AMOUNT as "remainingAmount",
a.CONTRACT_TYPE as "contractType", a.CONTRACT_TYPE as "contractType",
(SELECT ITEM_CNAME FROM ${platSchema}.tedcm01 WHERE CODESET_CODE = 'hggp.cw.contractType' AND ITEM_CODE = a.CONTRACT_TYPE) AS "contractTypeStr", (SELECT ITEM_CNAME FROM ${platSchema}.tedcm01 WHERE CODESET_CODE = 'hggp.cw.contractType' AND ITEM_CODE = a.CONTRACT_TYPE) AS "contractTypeStr",
a.PARTY_A as "partyA", <!-- 甲方名称 --> a.PARTY_A as "partyA",
a.PARTY_B as "partyB" <!-- 乙方名称 --> a.PARTY_B as "partyB"
FROM ${hggpSchema}.HGCW002 a FROM (
SELECT
COMPANY_CODE,
PROJ_CODE,
PROJ_NAME,
CONTRACT_NUMBER,
CONTRACT_NAME,
TOTAL_CONTRACT_PRICE_EXCLUDING,
TOTAL_CONTRACT_PRICE_INCLUDING,
REMAINING_AMOUNT,
CONTRACT_TYPE,
PARTY_A,
PARTY_B,
DEP_CODE
FROM ${hggpSchema}.HGCW002 WHERE REMAINING_AMOUNT > 0 AND REVIEW_STATUS = '3'
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
UNION ALL
SELECT
COMPANY_CODE,
PROJ_CODE,
PROJ_NAME,
CONTRACT_NUMBER,
CONTRACT_NAME,
TOTAL_CONTRACT_PRICE_EXCLUDING,
TOTAL_CONTRACT_PRICE_INCLUDING,
REMAINING_AMOUNT,
CONTRACT_TYPE,
PARTY_A,
PARTY_B,
DEP_CODE
FROM ${hggpSchema}.HGCW006 WHERE REMAINING_AMOUNT > 0 AND REVIEW_STATUS = '3'
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
) a
LEFT JOIN ${hggpSchema}.HGSC001 b on a.PROJ_CODE = b.PROJ_CODE LEFT JOIN ${hggpSchema}.HGSC001 b on a.PROJ_CODE = b.PROJ_CODE
WHERE 1=1 WHERE 1=1
AND a.REVIEW_STATUS= #reviewStatus# AND b.approval_status = 2
AND b.approval_status = #approvalStatus#
AND b.proj_status = 0 AND b.proj_status = 0
AND a.REMAINING_AMOUNT > 0
<isNotEmpty prepend=" AND " property="contractType"> <isNotEmpty prepend=" AND " property="contractType">
a.CONTRACT_TYPE = #contractType# a.CONTRACT_TYPE = #contractType#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="contractTyps"> <isNotEmpty prepend=" AND " property="contractTyps">
a.CONTRACT_TYPE IN <iterate close=")" open="(" conjunction="," property="contractTyps">#contractTyps[]#</iterate> a.CONTRACT_TYPE IN <iterate close=")" open="(" conjunction="," property="contractTyps">#contractTyps[]#</iterate>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
a.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
a.COMPANY_CODE = #companyCode# a.COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCodes"> <isNotEmpty prepend=" AND " property="companyCodes">
a.COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate> a.COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate>
</isNotEmpty> </isNotEmpty>
<!-- 无权限时使用 -->
<isNotEmpty prepend=" AND " property="authDepCode">
b.DEP_CODE = #authDepCode#
</isNotEmpty>
<!-- 仅本人和部门组合 -->
<isEqual prepend=" AND " property="authCombination" compareValue="1">
(b.CREATED_BY = #authOnlyPeople# OR b.DEP_CODE IN <iterate close=")" open="(" conjunction=","
property="authDepCodes">#authDepCodes[]#</iterate>)
</isEqual>
<!-- 仅本人或部门 -->
<isNotEqual prepend=" AND " property="authCombination" compareValue="1">
<isNotEmpty property="authOnlyPeople">
b.CREATED_BY = #authOnlyPeople#
</isNotEmpty>
<isNotEmpty property="authDepCodes">
b.DEP_CODE IN
<iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>
</isNotEmpty>
</isNotEqual>
<isNotEmpty prepend=" AND " property="projCode"> <isNotEmpty prepend=" AND " property="projCode">
a.PROJ_CODE like concat('%',#projCode#,'%') a.PROJ_CODE like concat('%',#projCode#,'%')
</isNotEmpty> </isNotEmpty>
...@@ -683,6 +695,12 @@ ...@@ -683,6 +695,12 @@
<isNotEmpty prepend=" AND " property="contractName"> <isNotEmpty prepend=" AND " property="contractName">
a.CONTRACT_NAME like concat('%',#contractName#,'%') a.CONTRACT_NAME like concat('%',#contractName#,'%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="partyA">
a.PARTY_A like concat('%',#partyA#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyB">
a.PARTY_B like concat('%',#partyB#,'%')
</isNotEmpty>
ORDER BY a.CONTRACT_NUMBER ORDER BY a.CONTRACT_NUMBER
</select> </select>
......
...@@ -86,6 +86,9 @@ ...@@ -86,6 +86,9 @@
<isNotEmpty prepend=" AND " property="companyCodes"> <isNotEmpty prepend=" AND " property="companyCodes">
COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate> COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="ids">
ID NOT IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty>
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
......
...@@ -275,6 +275,9 @@ ...@@ -275,6 +275,9 @@
<select id="queryEngineeringQuantity" resultClass="int"> <select id="queryEngineeringQuantity" resultClass="int">
SELECT IFNULL(SUM( THIS_ENGINEERING_QUANTITY ),0) as "sumEngineeringQuantity" FROM ${hggpSchema}.HGCW009 WHERE 1=1 SELECT IFNULL(SUM( THIS_ENGINEERING_QUANTITY ),0) as "sumEngineeringQuantity" FROM ${hggpSchema}.HGCW009 WHERE 1=1
AND SETTLEMENT_NUMBER IN (
SELECT SETTLEMENT_NUMBER FROM ${hggpSchema}.HGCW008 WHERE CONTRACT_NUMBER = #contractNumber#
)
<include refid="condition" /> <include refid="condition" />
</select> </select>
</sqlMap> </sqlMap>
...@@ -307,7 +307,7 @@ public class HGCWTools { ...@@ -307,7 +307,7 @@ public class HGCWTools {
List<HGCW002> results = DaoBase.getInstance().query(HGCW002.QUERY,new HashMap<String,Object>(){ List<HGCW002> results = DaoBase.getInstance().query(HGCW002.QUERY,new HashMap<String,Object>(){
{put("contractNumber",contractNumber);} {put("contractNumber",contractNumber);}
}); });
return results.get(0); return CollectionUtils.isEmpty(results)? null :results.get(0);
} }
public static void deductionAmount(String contractNumber, BigDecimal deductionAmount) { public static void deductionAmount(String contractNumber, BigDecimal deductionAmount) {
...@@ -546,13 +546,11 @@ public class HGCWTools { ...@@ -546,13 +546,11 @@ public class HGCWTools {
List<HGCW002> hgcw002s = DaoBase.getInstance().query(HGCW002.QUERY,new HashMap<String,Object>(){ List<HGCW002> hgcw002s = DaoBase.getInstance().query(HGCW002.QUERY,new HashMap<String,Object>(){
{put("contractNumber",contractNumber);} {put("contractNumber",contractNumber);}
}); });
AssertUtils.isEmpty(hgcw002s,"找不到对应的合同!");
//获取销售合同金额和补充协议金额 //获取销售合同金额和补充协议金额
List<HGCW002> hgcw002List = DaoBase.getInstance().query("HGCW010D.sumContractPrice", List<HGCW002> hgcw002List = DaoBase.getInstance().query("HGCW010D.sumContractPrice",
new HashMap<String,Object>(){{ new HashMap<String,Object>(){{
put("contractNumber",contractNumber); put("contractNumber",contractNumber);
}}); }});
//计算销售合同金额的20%的总金额 总金额=合同金额+合同金额的20% //计算销售合同金额的20%的总金额 总金额=合同金额+合同金额的20%
BigDecimal remaining = hgcw002List.get(0).getTotalContractPriceIncluding().add(hgcw002List.get(0).getTotalContractPriceIncluding().multiply(new BigDecimal("0.2"))); BigDecimal remaining = hgcw002List.get(0).getTotalContractPriceIncluding().add(hgcw002List.get(0).getTotalContractPriceIncluding().multiply(new BigDecimal("0.2")));
//获取当期项目所有的结算单 //获取当期项目所有的结算单
......
...@@ -21,9 +21,9 @@ $(function() { ...@@ -21,9 +21,9 @@ $(function() {
let thisEngineeringQuantity = item.thisEngineeringQuantity; let thisEngineeringQuantity = item.thisEngineeringQuantity;
let unitPrice = item.unitPrice; let unitPrice = item.unitPrice;
if(!isBlank(thisEngineeringQuantity) && !isBlank(unitPrice)){ if(!isBlank(thisEngineeringQuantity) && !isBlank(unitPrice)){
return parseFloat(thisEngineeringQuantity) * parseFloat(unitPrice); return (parseFloat(thisEngineeringQuantity) * parseFloat(unitPrice)).toFixed(2);
} }
return isBlank(item.totalPrice) ? "" : item.totalPrice; return isBlank(item.totalPrice) ? "" : parseFloat(item.totalPrice);
} }
}], }],
loadComplete: function (grid) { loadComplete: function (grid) {
...@@ -37,7 +37,7 @@ $(function() { ...@@ -37,7 +37,7 @@ $(function() {
var thisEngineeringQuantity = parseFloat(item.thisEngineeringQuantity) || 0; // 工程量 var thisEngineeringQuantity = parseFloat(item.thisEngineeringQuantity) || 0; // 工程量
var unitPrice = parseFloat(item.unitPrice) || 0; // 单价 var unitPrice = parseFloat(item.unitPrice) || 0; // 单价
var totalPrice = thisEngineeringQuantity * unitPrice; // 总价 var totalPrice = thisEngineeringQuantity * unitPrice; // 总价
detail1Grid.setCellValue(item, 'totalPrice', parseFloat(totalPrice)); detail1Grid.setCellValue(item, 'totalPrice', parseFloat(totalPrice.toFixed(2)));
queryCumulativeEngineeringQuantity(inventoryId, item); queryCumulativeEngineeringQuantity(inventoryId, item);
// 计算总金额 // 计算总金额
setTimeout(function () { setTimeout(function () {
...@@ -52,7 +52,7 @@ $(function() { ...@@ -52,7 +52,7 @@ $(function() {
var thisEngineeringQuantity = parseFloat(item.thisEngineeringQuantity) || 0; // 工程量 var thisEngineeringQuantity = parseFloat(item.thisEngineeringQuantity) || 0; // 工程量
var unitPrice = parseFloat(item.unitPrice) || 0; // 单价 var unitPrice = parseFloat(item.unitPrice) || 0; // 单价
var totalPrice = thisEngineeringQuantity * unitPrice; // 总价 var totalPrice = thisEngineeringQuantity * unitPrice; // 总价
detail1Grid.setCellValue(item, 'totalPrice', parseFloat(totalPrice)); detail1Grid.setCellValue(item, 'totalPrice', parseFloat(totalPrice.toFixed(2)));
// 计算总金额 // 计算总金额
calculateAmount(detail1Grid.getDataItems()); calculateAmount(detail1Grid.getDataItems());
} }
...@@ -215,7 +215,7 @@ function choiceFunc() { ...@@ -215,7 +215,7 @@ function choiceFunc() {
}) })
} }
if (contractType == "1" || contractType == "3") { if (contractType == "1" || contractType == "3" || contractType == "5") {
JSColorbox.open({ JSColorbox.open({
href: "HGCW008D?methodName=initLoad&inqu_status-0-contractNumber=" + contractNumber + href: "HGCW008D?methodName=initLoad&inqu_status-0-contractNumber=" + contractNumber +
"&inqu_status-0-inventoryIds=" + inventoryIds.join(",")+ "&inqu_status-0-inventoryIds=" + inventoryIds.join(",")+
...@@ -227,7 +227,18 @@ function choiceFunc() { ...@@ -227,7 +227,18 @@ function choiceFunc() {
callbackName: choiceCallbackFunc callbackName: choiceCallbackFunc
}); });
$("#JSColorboxWin").css({"height": "100%"}) $("#JSColorboxWin").css({"height": "100%"})
} else { }else if (contractType == "6" || contractType == "7") {
JSColorbox.open({
href: "HGCW008F?methodName=initLoad&inqu_status-0-contractNumber=" + contractNumber +
"&inqu_status-0-inventoryIds=" + inventoryIds.join(","),
title: "<div style='text-align: center;'>租赁合同清单</div>",
width: "80%",
height: "90%",
dispaly: "flex",
callbackName: choiceCallbackFunc
});
$("#JSColorboxWin").css({"height": "100%"})
}else {
JSColorbox.open({ JSColorbox.open({
href: "HGCW008E?methodName=initLoad&inqu_status-0-contractNumber=" + contractNumber + href: "HGCW008E?methodName=initLoad&inqu_status-0-contractNumber=" + contractNumber +
"&inqu_status-0-inventoryIds=" + inventoryIds.join(",") + "&inqu_status-0-inventoryIds=" + inventoryIds.join(",") +
...@@ -249,7 +260,7 @@ function choiceFunc() { ...@@ -249,7 +260,7 @@ function choiceFunc() {
function choiceCallbackFunc(result1, result2, result3) { function choiceCallbackFunc(result1, result2, result3) {
var contractType = $("#contractType").val(); var contractType = $("#contractType").val();
if (contractType == "1" || contractType == "3") { if (contractType == "1" || contractType == "3" || contractType == "5") {
$.each(result1, function(index, item) { $.each(result1, function(index, item) {
detail1Grid.dataSource.insert(); detail1Grid.dataSource.insert();
detail1Grid.setCellValue(0, "rowNo", 0); detail1Grid.setCellValue(0, "rowNo", 0);
...@@ -274,7 +285,20 @@ function choiceCallbackFunc(result1, result2, result3) { ...@@ -274,7 +285,20 @@ function choiceCallbackFunc(result1, result2, result3) {
detail1Grid.setCellValue(0, "inventoryId", item.id); detail1Grid.setCellValue(0, "inventoryId", item.id);
detail1Grid.refresh(); detail1Grid.refresh();
}) })
} else { }else if (contractType == "6" || contractType == "7") {
$.each(result1, function(index, item) {
detail1Grid.dataSource.insert();
detail1Grid.setCellValue(0, "rowNo", 0);
detail1Grid.setCellValue(0, "settlementBasis", "合同内");
detail1Grid.setCellValue(0, "thisEngineeringQuantity", item.deviceNumber);
detail1Grid.setCellValue(0, "taskName", item.deviceName);
detail1Grid.setCellValue(0, "unit", item.unit);
detail1Grid.setCellValue(0, "unitPrice", item.unitPrice * item.dayNumber);
detail1Grid.setCellValue(0, "totalPrice", item.totalPrice.toFixed(2));
detail1Grid.setCellValue(0, "inventoryId", item.id);
detail1Grid.refresh();
})
}else {
$.each(result1, function(index, item) { $.each(result1, function(index, item) {
detail1Grid.dataSource.insert(); detail1Grid.dataSource.insert();
detail1Grid.setCellValue(0, "rowNo", 0); detail1Grid.setCellValue(0, "rowNo", 0);
...@@ -325,11 +349,12 @@ function btnSaveFunc() { ...@@ -325,11 +349,12 @@ function btnSaveFunc() {
fieldValidation(); fieldValidation();
JSUtils.confirm("确定对数据做\"保存\"操作? ", { JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () { ok: function () {
JSUtils.submitGridsData("detail1", "HGCW008", "save", false, JSUtils.submitGrid("detail1", "HGCW008", "save", {isAlldata:true,onSuccessCallback:parent.windowNewCallback});
/*JSUtils.submitGridsData("detail1", "HGCW008", "save", false,
function (res) { function (res) {
parent.windowNewCallback(res); parent.windowNewCallback(res);
} }
); );*/
} }
}); });
} }
...@@ -418,12 +443,12 @@ function calculateAmount(rows) { ...@@ -418,12 +443,12 @@ function calculateAmount(rows) {
//累计价税合计=累计结算金额+累计结算税金 //累计价税合计=累计结算金额+累计结算税金
var cumulativePriceTax = parseFloat(cumulativeSettlementAmount) + parseFloat(cumulativeSettlementTax); var cumulativePriceTax = parseFloat(cumulativeSettlementAmount) + parseFloat(cumulativeSettlementTax);
$("#result-0-thisSettlementAmount").val(parseFloat(thisSettlementAmount).toFixed(3)); $("#result-0-thisSettlementAmount").val(parseFloat(thisSettlementAmount).toFixed(2));
$("#result-0-cumulativeSettlementAmount").val(parseFloat(cumulativeSettlementAmount).toFixed(3)); $("#result-0-cumulativeSettlementAmount").val(parseFloat(cumulativeSettlementAmount).toFixed(2));
$("#result-0-thisSettlementTax").val(parseFloat(thisSettlementTax).toFixed(3)); $("#result-0-thisSettlementTax").val(parseFloat(thisSettlementTax).toFixed(2));
$("#result-0-cumulativeSettlementTax").val(parseFloat(cumulativeSettlementTax).toFixed(3)); $("#result-0-cumulativeSettlementTax").val(parseFloat(cumulativeSettlementTax).toFixed(2));
$("#result-0-thisPriceTax").val(parseFloat(thisPriceTax).toFixed(3)); $("#result-0-thisPriceTax").val(parseFloat(thisPriceTax).toFixed(2));
$("#result-0-cumulativePriceTax").val(parseFloat(cumulativePriceTax).toFixed(3)); $("#result-0-cumulativePriceTax").val(parseFloat(cumulativePriceTax).toFixed(2));
} }
function fieldValidation() { function fieldValidation() {
var projCode = $("#result-0-projCode").val(); var projCode = $("#result-0-projCode").val();
...@@ -460,16 +485,16 @@ function calculateAmount2(taxPoints) { ...@@ -460,16 +485,16 @@ function calculateAmount2(taxPoints) {
} }
//本次价税合计=本次结算金额+本次结算税金 //本次价税合计=本次结算金额+本次结算税金
var thisPriceTax = parseFloat(thisSettlementAmount) + parseFloat(thisSettlementTax); var thisPriceTax = parseFloat(thisSettlementAmount) + parseFloat(thisSettlementTax);
$("#result-0-thisSettlementTax").val(parseFloat(thisSettlementTax).toFixed(3)) $("#result-0-thisSettlementTax").val(parseFloat(thisSettlementTax).toFixed(2))
$("#result-0-thisPriceTax").val(parseFloat(thisPriceTax).toFixed(3)) $("#result-0-thisPriceTax").val(parseFloat(thisPriceTax).toFixed(2))
//累计结算金额 //累计结算金额
var cumulativeSettlementAmount = parseFloat(sumCumulativeSettlementAmount) + parseFloat(thisSettlementAmount); var cumulativeSettlementAmount = parseFloat(sumCumulativeSettlementAmount) + parseFloat(thisSettlementAmount);
//累计结算税金 //累计结算税金
var cumulativeSettlementTax = parseFloat(sumCumulativeSettlementTax) + parseFloat(thisSettlementTax); var cumulativeSettlementTax = parseFloat(sumCumulativeSettlementTax) + parseFloat(thisSettlementTax);
//累计价税合计=累计结算金额+累计结算税金 //累计价税合计=累计结算金额+累计结算税金
var cumulativePriceTax = parseFloat(cumulativeSettlementAmount) + parseFloat(cumulativeSettlementTax); var cumulativePriceTax = parseFloat(cumulativeSettlementAmount) + parseFloat(cumulativeSettlementTax);
$("#result-0-cumulativeSettlementTax").val(parseFloat(cumulativeSettlementTax).toFixed(3)) $("#result-0-cumulativeSettlementTax").val(parseFloat(cumulativeSettlementTax).toFixed(2))
$("#result-0-cumulativePriceTax").val(parseFloat(cumulativePriceTax).toFixed(3)) $("#result-0-cumulativePriceTax").val(parseFloat(cumulativePriceTax).toFixed(2))
} }
......
...@@ -4,6 +4,9 @@ ...@@ -4,6 +4,9 @@
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %> <%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/> <c:set var="ctx" value="${pageContext.request.contextPath}"/>
<script>
var ctx = "${ctx}";
</script>
<head> <head>
</head> </head>
<EF:EFPage title="新增结算单"> <EF:EFPage title="新增结算单">
...@@ -74,7 +77,7 @@ ...@@ -74,7 +77,7 @@
enable="false"/> enable="false"/>
<EF:EFColumn ename="unit" cname="单位" align="center"/> <EF:EFColumn ename="unit" cname="单位" align="center"/>
<EF:EFColumn ename="unitPrice" cname="单价" format="{0:N3}" align="right"/> <EF:EFColumn ename="unitPrice" cname="单价" format="{0:N3}" align="right"/>
<EF:EFColumn ename="totalPrice" cname="合价" format="{0:N3}" align="right"/> <EF:EFColumn ename="totalPrice" cname="合价" format="{0:N2}" align="right"/>
<EF:EFColumn ename="remarks" cname="备注" align="center"/> <EF:EFColumn ename="remarks" cname="备注" align="center"/>
<EF:EFColumn ename="inventoryId" cname="清单id" hidden="true"/> <EF:EFColumn ename="inventoryId" cname="清单id" hidden="true"/>
</EF:EFGrid> </EF:EFGrid>
......
...@@ -21,9 +21,9 @@ $(function() { ...@@ -21,9 +21,9 @@ $(function() {
let thisEngineeringQuantity = item.thisEngineeringQuantity; let thisEngineeringQuantity = item.thisEngineeringQuantity;
let unitPrice = item.unitPrice; let unitPrice = item.unitPrice;
if (!isBlank(thisEngineeringQuantity) && !isBlank(unitPrice)) { if (!isBlank(thisEngineeringQuantity) && !isBlank(unitPrice)) {
return parseFloat(thisEngineeringQuantity) * parseFloat(unitPrice); return (parseFloat(thisEngineeringQuantity) * parseFloat(unitPrice)).toFixed(2);
} }
return isBlank(item.totalPrice) ? "" : item.totalPrice; return isBlank(item.totalPrice) ? "" : parseFloat(item.totalPrice);
} }
}], }],
loadComplete: function (grid) { loadComplete: function (grid) {
...@@ -222,7 +222,7 @@ function choiceFunc() { ...@@ -222,7 +222,7 @@ function choiceFunc() {
}) })
} }
if (contractType == "1" || contractType == "3") { if (contractType == "1" || contractType == "3" || contractType == "5") {
JSColorbox.open({ JSColorbox.open({
href: "HGCW008D?methodName=initLoad&inqu_status-0-contractNumber=" + contractNumber + href: "HGCW008D?methodName=initLoad&inqu_status-0-contractNumber=" + contractNumber +
"&inqu_status-0-inventoryIds=" + inventoryIds.join(",") + "&inqu_status-0-inventoryIds=" + inventoryIds.join(",") +
...@@ -234,6 +234,17 @@ function choiceFunc() { ...@@ -234,6 +234,17 @@ function choiceFunc() {
callbackName: choiceCallbackFunc callbackName: choiceCallbackFunc
}); });
$("#JSColorboxWin").css({"height": "100%"}) $("#JSColorboxWin").css({"height": "100%"})
}else if (contractType == "6" || contractType == "7") {
JSColorbox.open({
href: "HGCW008F?methodName=initLoad&inqu_status-0-contractNumber=" + contractNumber +
"&inqu_status-0-inventoryIds=" + inventoryIds.join(","),
title: "<div style='text-align: center;'>租赁合同清单</div>",
width: "80%",
height: "90%",
dispaly: "flex",
callbackName: choiceCallbackFunc
});
$("#JSColorboxWin").css({"height": "100%"})
} else { } else {
JSColorbox.open({ JSColorbox.open({
href: "HGCW008E?methodName=initLoad&inqu_status-0-contractNumber=" + contractNumber + href: "HGCW008E?methodName=initLoad&inqu_status-0-contractNumber=" + contractNumber +
...@@ -279,6 +290,19 @@ function choiceCallbackFunc(result1, result2) { ...@@ -279,6 +290,19 @@ function choiceCallbackFunc(result1, result2) {
detail1Grid.setCellValue(0, "inventoryId", item.id); detail1Grid.setCellValue(0, "inventoryId", item.id);
detail1Grid.refresh(); detail1Grid.refresh();
}) })
}else if (contractType == "6" || contractType == "7") {
$.each(result1, function(index, item) {
detail1Grid.dataSource.insert();
detail1Grid.setCellValue(0, "rowNo", 0);
detail1Grid.setCellValue(0, "settlementBasis", "合同内");
detail1Grid.setCellValue(0, "thisEngineeringQuantity", item.deviceNumber);
detail1Grid.setCellValue(0, "taskName", item.deviceName);
detail1Grid.setCellValue(0, "unit", item.unit);
detail1Grid.setCellValue(0, "unitPrice", item.unitPrice * item.dayNumber);
detail1Grid.setCellValue(0, "totalPrice", item.totalPrice.toFixed(2));
detail1Grid.setCellValue(0, "inventoryId", item.id);
detail1Grid.refresh();
})
} else { } else {
$.each(result1, function(index, item) { $.each(result1, function(index, item) {
detail1Grid.dataSource.insert(); detail1Grid.dataSource.insert();
...@@ -333,6 +357,7 @@ function queryCumulativeEngineeringQuantity(inventoryId,item) { ...@@ -333,6 +357,7 @@ function queryCumulativeEngineeringQuantity(inventoryId,item) {
if (inventoryId) { if (inventoryId) {
var thisEngineeringQuantity = parseFloat(item.thisEngineeringQuantity) || 0; // 工程量 var thisEngineeringQuantity = parseFloat(item.thisEngineeringQuantity) || 0; // 工程量
var info = new EiInfo(); var info = new EiInfo();
info.set("contractNumber", $("#result-0-contractNumber").val());
info.set("inventoryId", inventoryId); info.set("inventoryId", inventoryId);
EiCommunicator.send("HGCW009", "queryEngineeringQuantity", info, { EiCommunicator.send("HGCW009", "queryEngineeringQuantity", info, {
onSuccess: function (ei) { onSuccess: function (ei) {
...@@ -394,12 +419,12 @@ function calculateAmount(rows) { ...@@ -394,12 +419,12 @@ function calculateAmount(rows) {
//累计价税合计=累计结算金额+累计结算税金 //累计价税合计=累计结算金额+累计结算税金
var cumulativePriceTax = parseFloat(cumulativeSettlementAmount) + parseFloat(cumulativeSettlementTax); var cumulativePriceTax = parseFloat(cumulativeSettlementAmount) + parseFloat(cumulativeSettlementTax);
$("#result-0-thisSettlementAmount").val(parseFloat(thisSettlementAmount).toFixed(3)) $("#result-0-thisSettlementAmount").val(parseFloat(thisSettlementAmount).toFixed(2))
$("#result-0-cumulativeSettlementAmount").val(parseFloat(cumulativeSettlementAmount).toFixed(3)) $("#result-0-cumulativeSettlementAmount").val(parseFloat(cumulativeSettlementAmount).toFixed(2))
$("#result-0-thisSettlementTax").val(parseFloat(thisSettlementTax).toFixed(3)) $("#result-0-thisSettlementTax").val(parseFloat(thisSettlementTax).toFixed(2))
$("#result-0-cumulativeSettlementTax").val(parseFloat(cumulativeSettlementTax).toFixed(3)) $("#result-0-cumulativeSettlementTax").val(parseFloat(cumulativeSettlementTax).toFixed(2))
$("#result-0-thisPriceTax").val(parseFloat(thisPriceTax).toFixed(3)) $("#result-0-thisPriceTax").val(parseFloat(thisPriceTax).toFixed(2))
$("#result-0-cumulativePriceTax").val(parseFloat(cumulativePriceTax).toFixed(3)) $("#result-0-cumulativePriceTax").val(parseFloat(cumulativePriceTax).toFixed(2))
} }
function calculateAmount2(taxPoints) { function calculateAmount2(taxPoints) {
var rows = detail1Grid.getDataItems(); var rows = detail1Grid.getDataItems();
...@@ -424,16 +449,16 @@ function calculateAmount2(taxPoints) { ...@@ -424,16 +449,16 @@ function calculateAmount2(taxPoints) {
} }
//本次价税合计=本次结算金额+本次结算税金 //本次价税合计=本次结算金额+本次结算税金
var thisPriceTax = parseFloat(thisSettlementAmount) + parseFloat(thisSettlementTax); var thisPriceTax = parseFloat(thisSettlementAmount) + parseFloat(thisSettlementTax);
$("#result-0-thisSettlementTax").val(parseFloat(thisSettlementTax).toFixed(3)) $("#result-0-thisSettlementTax").val(parseFloat(thisSettlementTax).toFixed(2))
$("#result-0-thisPriceTax").val(parseFloat(thisPriceTax).toFixed(3)) $("#result-0-thisPriceTax").val(parseFloat(thisPriceTax).toFixed(2))
//累计结算金额 //累计结算金额
var cumulativeSettlementAmount = parseFloat(sumCumulativeSettlementAmount) + parseFloat(thisSettlementAmount); var cumulativeSettlementAmount = parseFloat(sumCumulativeSettlementAmount) + parseFloat(thisSettlementAmount);
//累计结算税金 //累计结算税金
var cumulativeSettlementTax = parseFloat(sumCumulativeSettlementTax) + parseFloat(thisSettlementTax); var cumulativeSettlementTax = parseFloat(sumCumulativeSettlementTax) + parseFloat(thisSettlementTax);
//累计价税合计=累计结算金额+累计结算税金 //累计价税合计=累计结算金额+累计结算税金
var cumulativePriceTax = parseFloat(cumulativeSettlementAmount) + parseFloat(cumulativeSettlementTax); var cumulativePriceTax = parseFloat(cumulativeSettlementAmount) + parseFloat(cumulativeSettlementTax);
$("#result-0-cumulativeSettlementTax").val(parseFloat(cumulativeSettlementTax).toFixed(3)) $("#result-0-cumulativeSettlementTax").val(parseFloat(cumulativeSettlementTax).toFixed(2))
$("#result-0-cumulativePriceTax").val(parseFloat(cumulativePriceTax).toFixed(3)) $("#result-0-cumulativePriceTax").val(parseFloat(cumulativePriceTax).toFixed(2))
} }
function initDate() { function initDate() {
......
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
<EF:EFColumn ename="cumulativeEngineeringQuantity" cname="至本次累计结算工程量" format="{0:N3}" align="right" enable="false"/> <EF:EFColumn ename="cumulativeEngineeringQuantity" cname="至本次累计结算工程量" format="{0:N3}" align="right" enable="false"/>
<EF:EFColumn ename="unit" cname="单位" align="center" /> <EF:EFColumn ename="unit" cname="单位" align="center" />
<EF:EFColumn ename="unitPrice" cname="单价" format="{0:N3}" align="right"/> <EF:EFColumn ename="unitPrice" cname="单价" format="{0:N3}" align="right"/>
<EF:EFColumn ename="totalPrice" cname="合价" format="{0:N3}" align="right"/> <EF:EFColumn ename="totalPrice" cname="合价" format="{0:N2}" align="right"/>
<EF:EFColumn ename="remarks" cname="备注" align="center" /> <EF:EFColumn ename="remarks" cname="备注" align="center" />
<EF:EFColumn ename="inventoryId" cname="清单id" hidden="true"/> <EF:EFColumn ename="inventoryId" cname="清单id" hidden="true"/>
</EF:EFGrid> </EF:EFGrid>
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<EF:EFColumn ename="cumulativeEngineeringQuantity" cname="至本次累计结算工程量" format="{0:N3}" align="right" readonly="true" enable="false"/> <EF:EFColumn ename="cumulativeEngineeringQuantity" cname="至本次累计结算工程量" format="{0:N3}" align="right" readonly="true" enable="false"/>
<EF:EFColumn ename="unit" cname="单位" align="center" readonly="true" enable="false"/> <EF:EFColumn ename="unit" cname="单位" align="center" readonly="true" enable="false"/>
<EF:EFColumn ename="unitPrice" cname="单价" format="{0:N3}" align="right" readonly="true" enable="false"/> <EF:EFColumn ename="unitPrice" cname="单价" format="{0:N3}" align="right" readonly="true" enable="false"/>
<EF:EFColumn ename="totalPrice" cname="合价" format="{0:N3}" align="right" readonly="true" enable="false"/> <EF:EFColumn ename="totalPrice" cname="合价" format="{0:N2}" align="right" readonly="true" enable="false"/>
<EF:EFColumn ename="remarks" cname="备注" align="center" readonly="true" enable="false"/> <EF:EFColumn ename="remarks" cname="备注" align="center" readonly="true" enable="false"/>
<EF:EFColumn ename="inventoryId" cname="清单id" hidden="true"/> <EF:EFColumn ename="inventoryId" cname="清单id" hidden="true"/>
</EF:EFGrid> </EF:EFGrid>
......
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
<EF:EFColumn ename="measurementMethod" cname="计量方式" align="center" enable="false"/> <EF:EFColumn ename="measurementMethod" cname="计量方式" align="center" enable="false"/>
<EF:EFColumn ename="supplyMethod" cname="材料供应方式" align="center" enable="false"/> <EF:EFColumn ename="supplyMethod" cname="材料供应方式" align="center" enable="false"/>
<EF:EFColumn ename="unitPriceExcludingTax" cname="除税单价/元" format="{0:N3}" align="center" enable="false"/> <EF:EFColumn ename="unitPriceExcludingTax" cname="除税单价/元" format="{0:N3}" align="center" enable="false"/>
<EF:EFColumn ename="totalPriceExcluding" cname="不含税总价" enable="false" format="{0:N3}" align="center"/> <EF:EFColumn ename="totalPriceExcluding" cname="不含税总价" enable="false" format="{0:N2}" align="center"/>
<EF:EFColumn ename="totalPriceIncluding" cname="含税总价" enable="false" format="{0:N3}" align="center"/> <EF:EFColumn ename="totalPriceIncluding" cname="含税总价" enable="false" format="{0:N2}" align="center"/>
<EF:EFColumn ename="laborCosts" cname="其中人工费、元" format="{0:N3}" align="center" enable="false"/> <EF:EFColumn ename="laborCosts" cname="其中人工费、元" format="{0:N3}" align="center" enable="false"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
......
...@@ -52,9 +52,9 @@ ...@@ -52,9 +52,9 @@
<EF:EFColumn ename="signingDate" cname="扣款日期" align="center" enable="false"/> <EF:EFColumn ename="signingDate" cname="扣款日期" align="center" enable="false"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
<div class="row"> <div class="row" style="display:flex;justify-content:center;">
<EF:EFButton ename="cancel" cname="取消" type="button" class="btn-align-right"/> <EF:EFButton ename="cancel" cname="取消" type="button" class="btn-center"/>
<EF:EFButton ename="confirm" cname="确认" type="button" class="btn-align-right"/> <EF:EFButton ename="confirm" cname="确认" type="button" class="btn-center"/>
</div> </div>
</EF:EFPage> </EF:EFPage>
$(function () {
IPLATUI.EFGrid = {
"result": {
toolbarConfig: {
hidden: true, // true时,不显示功能按钮,但保留setting导出按钮
},
columns: []
}
}
/**
* 取消
*/
$('#CANCEL').on('click', function () {
// 关闭弹窗
parent.JSColorbox.close();
})
/**
* 确认
*/
$('#CONFIRM').on('click', function () {
let allRows = new Array();
let result3Row = new Array();
allRows = resultGrid.getCheckedRows();
//result3Row = result3Grid.getCheckedRows();
if (allRows.length > 0) {
parent.JSColorbox.setValueCallback(allRows);
} else {
message("请选择至少一条合同清单!");
return;
}
})
});
/**
* 查询
*/
function query() {
resultGrid.dataSource.page(1);
//result3Grid.dataSource.page(1);
}
$(window).load(function () {
// 查
query();
});
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/9/19
Time: 22:15
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="租赁合同清单">
<EF:EFInput cname="合同号" ename="contractNumber" blockId="inqu_status" row="0" type="hidden" />
<EF:EFInput cname="IDS" ename="inventoryIds" blockId="inqu_status" row="0" type="hidden" />
<EF:EFInput cname="DIDS" ename="deductionIds" blockId="inqu_status" row="0" type="hidden" />
<EF:EFInput cname="AIDS" ename="appentIds" blockId="inqu_status" row="0" type="hidden" />
<EF:EFRegion id="result" title="租赁合同清单">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="rowNo" cname="行号" hidden="true"/>
<EF:EFColumn ename="deviceName" cname="设备名称" align="center" />
<EF:EFColumn ename="deviceNumber" cname="数量" format="{0:N0}" align="center"/>
<EF:EFColumn ename="unitPrice" cname="单价" format="{0:N3}" align="center"/>
<EF:EFColumn ename="dayNumber" cname="天数" format="{0:N0}" align="center"/>
<EF:EFColumn ename="totalPrice" cname="总价" format="{0:N2}" align="center"/>
<EF:EFColumn ename="taxAmount" cname="税额" enable="false" format="{0:N2}" align="center"/>
<EF:EFColumn ename="totalPriceIncluding" cname="含税总价" enable="false" format="{0:N2}" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
<div class="row" style="display:flex;justify-content:center;">
<EF:EFButton ename="CANCEL" cname="取消" type="button" class="btn-center"/>
<EF:EFButton ename="CONFIRM" cname="确认" type="button" class="btn-center"/>
</div>
</EF:EFPage>
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