Commit 7f725784 by liuyang

Merge branch 'dev' of http://git.pseer.com:8800/platform/hg-smart into dev-ly

parents 61c814cc e92f2072
...@@ -123,6 +123,9 @@ public class ServiceHGCG003A extends ServiceBase { ...@@ -123,6 +123,9 @@ public class ServiceHGCG003A extends ServiceBase {
AssertUtils.isTrue(!(HGConstant.CgContractStatus.S_2.equals(cg001.getStatus()) AssertUtils.isTrue(!(HGConstant.CgContractStatus.S_2.equals(cg001.getStatus())
|| HGConstant.CgContractStatus.S_4.equals(cg001.getStatus())), || HGConstant.CgContractStatus.S_4.equals(cg001.getStatus())),
String.format("合同[%s]状态不是\"审核通过\"或\"收货中\",不允许操作", cg001.getContractNo())); String.format("合同[%s]状态不是\"审核通过\"或\"收货中\",不允许操作", cg001.getContractNo()));
AssertUtils.isGe(BigDecimal.ZERO, fCg002B.getBcReceiveQty(),
String.format("合同[%s]本次收货数量(%s)必须大于0", cg001.getContractNo(),
fCg002B.getBcReceiveQty(), fCg002B.getBcMaxReceiveQty()));
AssertUtils.isGt(fCg002B.getBcReceiveQty(), fCg002B.getBcMaxReceiveQty(), AssertUtils.isGt(fCg002B.getBcReceiveQty(), fCg002B.getBcMaxReceiveQty(),
String.format("合同[%s]本次收货数量(%s)不能大于本次最大收货数量(%s)", cg001.getContractNo(), String.format("合同[%s]本次收货数量(%s)不能大于本次最大收货数量(%s)", cg001.getContractNo(),
fCg002B.getBcReceiveQty(), fCg002B.getBcMaxReceiveQty())); fCg002B.getBcReceiveQty(), fCg002B.getBcMaxReceiveQty()));
......
...@@ -108,9 +108,8 @@ public class ServiceHGCW008 extends ServiceBase { ...@@ -108,9 +108,8 @@ 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());
// 反写金额 // 反写剩余金额
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);
...@@ -127,6 +126,8 @@ public class ServiceHGCW008 extends ServiceBase { ...@@ -127,6 +126,8 @@ public class ServiceHGCW008 extends ServiceBase {
HGCWTools.HgCw002.updateBalanceStatus(hgcw008.getContractNumber(),hgcw008.getSettlementType() + 1); HGCWTools.HgCw002.updateBalanceStatus(hgcw008.getContractNumber(),hgcw008.getSettlementType() + 1);
//更新金额 //更新金额
HGCWTools.HgCw009.calculateAmount(hgcw008.getSettlementNumber()); HGCWTools.HgCw009.calculateAmount(hgcw008.getSettlementNumber());
// 更新累计金额
HGCWTools.HgCw008.updateCumulativeSettlement(hgcw008.getContractNumber());
} }
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
...@@ -178,6 +179,8 @@ public class ServiceHGCW008 extends ServiceBase { ...@@ -178,6 +179,8 @@ public class ServiceHGCW008 extends ServiceBase {
// 反写金额 // 反写金额
HGCWTools.HgCw008.remainingAmount(hgcw008.getContractNumber(), hgcw008.getThisPriceTax().negate()); HGCWTools.HgCw008.remainingAmount(hgcw008.getContractNumber(), hgcw008.getThisPriceTax().negate());
DaoUtils.update(HGCW008.DELETE, hgcw008); DaoUtils.update(HGCW008.DELETE, hgcw008);
// 更新累计金额
HGCWTools.HgCw008.updateCumulativeSettlement(hgcw008.getContractNumber());
} }
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information <!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
Generate time : 2024-05-22 13:50:20
Version : 1.0
schema : hggp
tableName : HGCW008
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
PROJ_CODE VARCHAR,
PROJ_NAME VARCHAR,
CONTRACT_NUMBER VARCHAR,
CONTRACT_NAME VARCHAR,
SETTLEMENT_NUMBER VARCHAR,
SETTLEMENT_TYPE TINYINT,
CONTRACT_DATE VARCHAR,
TAX_POINTS INTEGER,
PRICE_TAX_SEPARATION INTEGER,
THIS_SETTLEMENT_AMOUNT DECIMAL,
THIS_SETTLEMENT_TAX DECIMAL,
THIS_PRICE_TAX DECIMAL,
TOTAL_CONTRACT_PRICE DECIMAL,
CUMULATIVE_SETTLEMENT_AMOUNT DECIMAL,
CUMULATIVE_SETTLEMENT_TAX DECIMAL,
CUMULATIVE_PRICE_TAX DECIMAL,
REVIEW_STATUS TINYINT,
CREATED_BY VARCHAR NOT NULL,
CREATED_NAME VARCHAR NOT NULL,
CREATED_TIME VARCHAR NOT NULL,
UPDATED_BY VARCHAR NOT NULL,
UPDATED_NAME VARCHAR NOT NULL,
UPDATED_TIME VARCHAR NOT NULL,
DEP_CODE VARCHAR
-->
<sqlMap namespace="HGCW008"> <sqlMap namespace="HGCW008">
<sql id="condition"> <sql id="condition">
<include refid="HGXSDataAuth.authCondition"/> <include refid="HGXSDataAuth.authCondition"/>
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
...@@ -182,93 +149,6 @@ ...@@ -182,93 +149,6 @@
<include refid="condition" /> <include refid="condition" />
</select> </select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNumber">
CONTRACT_NUMBER = #contractNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractName">
CONTRACT_NAME = #contractName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="settlementNumber">
SETTLEMENT_NUMBER = #settlementNumber#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="settlementType">
SETTLEMENT_TYPE = #settlementType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractDate">
CONTRACT_DATE = #contractDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="taxPoints">
TAX_POINTS = #taxPoints#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="priceTaxSeparation">
PRICE_TAX_SEPARATION = #priceTaxSeparation#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thisSettlementAmount">
THIS_SETTLEMENT_AMOUNT = #thisSettlementAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thisSettlementTax">
THIS_SETTLEMENT_TAX = #thisSettlementTax#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thisPriceTax">
THIS_PRICE_TAX = #thisPriceTax#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="totalContractPrice">
TOTAL_CONTRACT_PRICE = #totalContractPrice#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="cumulativeSettlementAmount">
CUMULATIVE_SETTLEMENT_AMOUNT = #cumulativeSettlementAmount#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="cumulativeSettlementTax">
CUMULATIVE_SETTLEMENT_TAX = #cumulativeSettlementTax#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="cumulativePriceTax">
CUMULATIVE_PRICE_TAX = #cumulativePriceTax#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="reviewStatus">
REVIEW_STATUS = #reviewStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
-->
<insert id="insert"> <insert id="insert">
INSERT INTO ${hggpSchema}.HGCW008 (ID, INSERT INTO ${hggpSchema}.HGCW008 (ID,
ACCOUNT_CODE, <!-- 企业编码 --> ACCOUNT_CODE, <!-- 企业编码 -->
...@@ -337,13 +217,15 @@ ...@@ -337,13 +217,15 @@
ID = #id# ID = #id#
</update> </update>
<select id="queryCalculateAmount" resultClass="java.util.HashMap"> <select id="queryCalculateAmount" resultClass="java.util.HashMap">
SELECT SELECT
IFNULL(SUM( CUMULATIVE_SETTLEMENT_AMOUNT ),0) as "sumCumulativeSettlementAmount", IFNULL(SUM(THIS_SETTLEMENT_AMOUNT), 0) as "thisSettlementAmount",
IFNULL(SUM( CUMULATIVE_SETTLEMENT_TAX ),0) as "sumCumulativeSettlementTax" IFNULL(SUM(THIS_SETTLEMENT_TAX), 0) as "thisSettlementTax",
FROM ${hggpSchema}.HGCW008 WHERE 1=1 IFNULL(SUM(THIS_PRICE_TAX), 0) as "thisPriceTax",
<include refid="condition" /> IFNULL(SUM(CUMULATIVE_SETTLEMENT_AMOUNT), 0) as "sumCumulativeSettlementAmount",
IFNULL(SUM(CUMULATIVE_SETTLEMENT_TAX), 0) as "sumCumulativeSettlementTax"
FROM ${hggpSchema}.HGCW008 WHERE 1=1
<include refid="condition"/>
</select> </select>
<update id="submit"> <update id="submit">
...@@ -368,4 +250,19 @@ ...@@ -368,4 +250,19 @@
WHERE WHERE
ID = #id# ID = #id#
</update> </update>
<!-- 更新累计结算金额 -->
<update id="updateCumulativeSettlement">
UPDATE ${hggpSchema}.HGCW008
SET
CUMULATIVE_SETTLEMENT_AMOUNT = #cumulativeSettlementAmount#,
CUMULATIVE_SETTLEMENT_TAX = #cumulativeSettlementTax#,
CUMULATIVE_PRICE_TAX = #cumulativePriceTax#,
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime# <!-- 记录修改时间 -->
WHERE CONTRACT_NUMBER = #contractNumber#
</update>
</sqlMap> </sqlMap>
...@@ -433,8 +433,28 @@ public class HGCWTools { ...@@ -433,8 +433,28 @@ public class HGCWTools {
} }
} }
/**
* 结算单
*
* @author:songx
* @date:2024/9/19,17:16
*/
public static class HgCw008 { public static class HgCw008 {
/**
* 查询统计金额
*
* @param contractNumber
* @return
*/
public static Map queryCalculateAmount(String contractNumber) {
AssertUtils.isEmpty(contractNumber, "合同号不能为空");
Map paramMap = new HashMap();
paramMap.put("contractNumber", contractNumber);
List<Map> results = DaoBase.getInstance().query("HGCW008.queryCalculateAmount", paramMap);
return CollectionUtils.isEmpty(results) ? null : results.get(0);
}
public static HGCW008 getId(String id) { public static HGCW008 getId(String id) {
AssertUtils.isNull(id, "结算单ID不能为空!"); AssertUtils.isNull(id, "结算单ID不能为空!");
List<HGCW008> results = DaoBase.getInstance().query(HGCW008.QUERY,new HashMap<String,Object>(){ List<HGCW008> results = DaoBase.getInstance().query(HGCW008.QUERY,new HashMap<String,Object>(){
...@@ -555,12 +575,36 @@ public class HGCWTools { ...@@ -555,12 +575,36 @@ public class HGCWTools {
if (remainingAmount.compareTo(new BigDecimal(BigInteger.ZERO)) < 0) { if (remainingAmount.compareTo(new BigDecimal(BigInteger.ZERO)) < 0) {
throw new PlatException("本次开票金额加累计开票金额超出销售合同金额20%,超出20%需要业务新增补充协议!"); throw new PlatException("本次开票金额加累计开票金额超出销售合同金额20%,超出20%需要业务新增补充协议!");
} }
HGCW002 hgcw002 = hgcw002s.get(0);
HGCW002 hgcw002 = hgcw002s.get(0); BigDecimal remainingAmountTemp = hgcw002.getRemainingAmount() == null
BigDecimal remainingCount = new BigDecimal(decimalFormat.format(hgcw002.getRemainingAmount().subtract(deductionAmount))); ? BigDecimal.ZERO : hgcw002.getRemainingAmount();
hgcw002.setRemainingAmount(remainingCount); BigDecimal remainingCount = remainingAmountTemp.subtract(deductionAmount)
DaoUtils.update("HGCW002.updateDeductionAmount", hgcw002); .setScale(3, RoundingMode.HALF_UP);
hgcw002.setRemainingAmount(remainingCount);
DaoUtils.update("HGCW002.updateDeductionAmount", hgcw002);
} }
/**
* 更新累计金额
*
* @param contractNumber
*/
public static void updateCumulativeSettlement(String contractNumber) {
Map calcAmountMap = queryCalculateAmount(contractNumber);
Map paramMap = new HashMap();
paramMap.put("contractNumber", contractNumber);
if (MapUtils.isEmpty(calcAmountMap)) {
paramMap.put("cumulativeSettlementAmount", BigDecimal.ZERO);
paramMap.put("cumulativeSettlementTax", BigDecimal.ZERO);
paramMap.put("cumulativePriceTax", BigDecimal.ZERO);
} else {
paramMap.put("cumulativeSettlementAmount", calcAmountMap.get("thisSettlementAmount"));
paramMap.put("cumulativeSettlementTax", calcAmountMap.get("thisSettlementTax"));
paramMap.put("cumulativePriceTax", calcAmountMap.get("thisPriceTax"));
}
DaoUtils.update("HGCW008.updateCumulativeSettlement", paramMap);
}
} }
public static class HgCw009 { public static class HgCw009 {
......
...@@ -30,6 +30,8 @@ public class HgWdSqlConstant { ...@@ -30,6 +30,8 @@ public class HgWdSqlConstant {
public static final String MODULE = "HGWD003."; public static final String MODULE = "HGWD003.";
// 修改信息 // 修改信息
public static final String UPDATE_INFO = MODULE + "updateInfo"; public static final String UPDATE_INFO = MODULE + "updateInfo";
// 批量写入
public static final String BATCH_INSERT = MODULE + "batchInsert";
} }
/** /**
......
...@@ -2,20 +2,18 @@ package com.baosight.hggp.hg.wd.service; ...@@ -2,20 +2,18 @@ package com.baosight.hggp.hg.wd.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.wd.constant.HgWdSqlConstant;
import com.baosight.hggp.hg.wd.domain.HGWD001; import com.baosight.hggp.hg.wd.domain.HGWD001;
import com.baosight.hggp.hg.wd.domain.HGWD003; import com.baosight.hggp.hg.wd.domain.HGWD003;
import com.baosight.hggp.hg.wd.tools.HGWDTools; import com.baosight.hggp.hg.wd.tools.HGWDTools;
import com.baosight.hggp.hg.xs.domain.User;
import com.baosight.hggp.util.AssertUtils; import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.EiInfoUtils; import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils; import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.MapUtils; import com.baosight.hggp.util.MapUtils;
import com.baosight.hggp.util.ObjectUtils; import com.baosight.hggp.util.ObjectUtils;
import com.baosight.iplat4j.core.ei.EiBlockMeta;
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.service.impl.ServiceEPBase; import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -24,13 +22,13 @@ import java.util.Map; ...@@ -24,13 +22,13 @@ import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
* 复制授权用户
*
* @author:songx * @author:songx
* @date:2024/5/9,11:04 * @date:2024/5/9,11:04
*/ */
public class ServiceHGWD003B extends ServiceEPBase { public class ServiceHGWD003B extends ServiceEPBase {
private EiBlockMeta eiMetadata = null;
/** /**
* 画面初始化 * 画面初始化
* *
...@@ -80,7 +78,7 @@ public class ServiceHGWD003B extends ServiceEPBase { ...@@ -80,7 +78,7 @@ public class ServiceHGWD003B extends ServiceEPBase {
AssertUtils.isNull(dbWd001, String.format("【%s】文档目录不存在", mainFileId)); AssertUtils.isNull(dbWd001, String.format("【%s】文档目录不存在", mainFileId));
// 获取FILE_ID授权信息 // 获取FILE_ID授权信息
List<HGWD003> dbMainWd003s = HGWDTools.HgWd003.listByFile(mainFileId); List<HGWD003> dbMainWd003s = HGWDTools.HgWd003.listByFile(mainFileId);
AssertUtils.isEmpty(dbMainWd003s, String.format("文档目录【%s】还未进行授权,请授权后再进行复制", dbWd001.getFileName())); AssertUtils.isEmpty(dbMainWd003s, String.format("文档目录【%s】还未授权用户,请授权后再进行复制", dbWd001.getFileName()));
// 复制授权信息 // 复制授权信息
List<HGWD001> fWd001s = MapUtils.toDaoEPBases(inInfo, HGWD001.class); List<HGWD001> fWd001s = MapUtils.toDaoEPBases(inInfo, HGWD001.class);
this.copyAuthUser(fWd001s, dbMainWd003s); this.copyAuthUser(fWd001s, dbMainWd003s);
...@@ -116,7 +114,7 @@ public class ServiceHGWD003B extends ServiceEPBase { ...@@ -116,7 +114,7 @@ public class ServiceHGWD003B extends ServiceEPBase {
return dbMainWd003; return dbMainWd003;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(filterWd003s)) { if (CollectionUtils.isNotEmpty(filterWd003s)) {
DaoUtils.insertBatch(HGWD003.INSERT, filterWd003s); DaoUtils.batchInsert(HgWdSqlConstant.HgWd003.BATCH_INSERT, filterWd003s);
} }
} }
} }
......
...@@ -116,6 +116,19 @@ ...@@ -116,6 +116,19 @@
) )
</insert> </insert>
<!-- 批量写入 -->
<insert id="batchInsert">
INSERT INTO ${hggpSchema}.HGWD003 (
ACCOUNT_CODE, DEP_CODE, CREATED_BY, CREATED_NAME, CREATED_TIME,
FILE_ID, USER_ID, REMARK, EXT_ID, IS_PROJECT_MANAGER
) VALUES
<iterate open="(" conjunction="), (" close=")" property="rows">
#rows[].accountCode#, #rows[].depCode#, #rows[].createdBy#, #rows[].createdName#,
#rows[].createdTime#, #rows[].fileId#, #rows[].userId#, #rows[].remark#, #rows[].extId#,
#rows[].isProjectManager#
</iterate>
</insert>
<!-- 逻辑删除 --> <!-- 逻辑删除 -->
<delete id="delete"> <delete id="delete">
UPDATE ${hggpSchema}.HGWD003 SET DELETE_FLAG = 1 WHERE ID = #id# UPDATE ${hggpSchema}.HGWD003 SET DELETE_FLAG = 1 WHERE ID = #id#
......
...@@ -3,6 +3,8 @@ package com.baosight.xservices.xs.service; ...@@ -3,6 +3,8 @@ package com.baosight.xservices.xs.service;
import com.baosight.hggp.core.security.UserSessionUtils; import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.pz.domain.HGPZ009; import com.baosight.hggp.hg.pz.domain.HGPZ009;
import com.baosight.hggp.hg.pz.tools.HGPZTools; import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.MapUtils;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
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;
...@@ -231,6 +233,7 @@ public class ServiceXS40 extends ServiceEPBase { ...@@ -231,6 +233,7 @@ public class ServiceXS40 extends ServiceEPBase {
final String companyPrefix = dbPz009 == null ? "" : dbPz009.getLoginPrefix() + "_"; final String companyPrefix = dbPz009 == null ? "" : dbPz009.getLoginPrefix() + "_";
for (int i = 0; i < eiBlock.getRowCount(); ++i) { for (int i = 0; i < eiBlock.getRowCount(); ++i) {
Map<String, Object> inInfoRowMap = eiBlock.getRow(i); Map<String, Object> inInfoRowMap = eiBlock.getRow(i);
AssertUtils.isEmpty(MapUtils.getString(inInfoRowMap, "groupEname"), "角色英文名不能为空");
inInfoRowMap.remove("groupId"); inInfoRowMap.remove("groupId");
inInfoRowMap.put("groupEname", companyPrefix + inInfoRowMap.get("groupEname")); inInfoRowMap.put("groupEname", companyPrefix + inInfoRowMap.get("groupEname"));
inInfoRowMap.put("accountCode", accountCode); inInfoRowMap.put("accountCode", accountCode);
......
...@@ -98,6 +98,21 @@ function windowCallback() { ...@@ -98,6 +98,21 @@ function windowCallback() {
JSColorbox.close(); JSColorbox.close();
} }
/**
* 回调
*
* @param res
*/
function windowNewCallback(res) {
if (res.status < 0) {
return;
}
// 刷新列表
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
}
function contractDetailFunc(id) { function contractDetailFunc(id) {
JSColorbox.open({ JSColorbox.open({
href: "HGCW008C?methodName=initLoad&id=" + id + "&efParentFormEname=HGCW008", href: "HGCW008C?methodName=initLoad&id=" + id + "&efParentFormEname=HGCW008",
......
...@@ -37,6 +37,10 @@ ...@@ -37,6 +37,10 @@
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false" checkMode="single row"> <EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false" checkMode="single row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="170" align="center"/> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="170" align="center"/>
<EF:EFComboColumn ename="reviewStatus" cname="审批状态" width="100" align="center"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false" >
<EF:EFCodeOption codeName="hggp.cw.reviewStatus"/>
</EF:EFComboColumn>
<EF:EFColumn ename="companyName" cname="所属公司" align="center" enable="false"/> <EF:EFColumn ename="companyName" cname="所属公司" align="center" enable="false"/>
<EF:EFColumn ename="projCode" cname="项目编号" align="center" enable="false"/> <EF:EFColumn ename="projCode" cname="项目编号" align="center" enable="false"/>
<EF:EFColumn ename="projName" cname="项目名称" align="center" enable="false"/> <EF:EFColumn ename="projName" cname="项目名称" align="center" enable="false"/>
...@@ -51,10 +55,6 @@ ...@@ -51,10 +55,6 @@
<EF:EFColumn ename="thisSettlementTax" cname="本次结算税金" align="right" enable="false" format="{0:C3}"/> <EF:EFColumn ename="thisSettlementTax" cname="本次结算税金" align="right" enable="false" format="{0:C3}"/>
<EF:EFColumn ename="thisPriceTax" cname="本次结算含税金额" align="right" enable="false" format="{0:C3}"/> <EF:EFColumn ename="thisPriceTax" cname="本次结算含税金额" align="right" enable="false" format="{0:C3}"/>
<EF:EFColumn ename="contractDate" cname="结算日期" align="center" enable="false" editType="date" parseFormats="['yyyyMMdd']" parseFormat="yyyy-MM-dd"/> <EF:EFColumn ename="contractDate" cname="结算日期" align="center" enable="false" editType="date" parseFormats="['yyyyMMdd']" parseFormat="yyyy-MM-dd"/>
<EF:EFComboColumn ename="reviewStatus" cname="审批状态" width="100" align="center"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false" >
<EF:EFCodeOption codeName="hggp.cw.reviewStatus"/>
</EF:EFComboColumn>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
</EF:EFPage> </EF:EFPage>
......
...@@ -15,40 +15,59 @@ $(function() { ...@@ -15,40 +15,59 @@ $(function() {
pageSize: 20, pageSize: 20,
pageSizes: [10,20,30,50,100,200], pageSizes: [10,20,30,50,100,200],
}, },
columns: [ columns: [{
], field: "totalPrice",
template: function (item) {
let thisEngineeringQuantity = item.thisEngineeringQuantity;
let unitPrice = item.unitPrice;
if(!isBlank(thisEngineeringQuantity) && !isBlank(unitPrice)){
return parseFloat(thisEngineeringQuantity) * parseFloat(unitPrice);
}
return isBlank(item.totalPrice) ? "" : item.totalPrice;
}
}],
loadComplete: function (grid) { loadComplete: function (grid) {
$("#BTN_CHOICE").on("click",choiceFunc); $("#BTN_CHOICE").on("click",choiceFunc);
grid.dataSource.bind("change", function(e) { grid.dataSource.bind("change", function(e) {
if (e.field == "thisEngineeringQuantity") { if (e.field == "thisEngineeringQuantity") {
var tr,index; var tr, index;
// 获取此model元素信息 // 获取此model元素信息
var item = e.items[0]; var item = e.items[0];
var inventoryId = item.inventoryId; var inventoryId = item.inventoryId;
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));
queryCumulativeEngineeringQuantity(inventoryId,item); queryCumulativeEngineeringQuantity(inventoryId, item);
// 计算总金额 // 计算总金额
setTimeout(function () { setTimeout(function () {
calculateAmount(detail1Grid.getDataItems()); calculateAmount(detail1Grid.getDataItems());
}, 200); }, 200);
} }
}); if (e.field == "unitPrice") {
grid.dataSource.bind("change", function(e) { var tr,index;
if (e.field == "unitPrice") { // 获取此model元素信息
var tr,index; var item = e.items[0];
// 获取此model元素信息 var inventoryId = item.inventoryId;
var item = e.items[0]; var thisEngineeringQuantity = parseFloat(item.thisEngineeringQuantity) || 0; // 工程量
var inventoryId = item.inventoryId; var unitPrice = parseFloat(item.unitPrice) || 0; // 单价
var thisEngineeringQuantity = parseFloat(item.thisEngineeringQuantity) || 0; // 工程量 var totalPrice = thisEngineeringQuantity * unitPrice; // 总价
var unitPrice = parseFloat(item.unitPrice) || 0; // 单价 detail1Grid.setCellValue(item, 'totalPrice', parseFloat(totalPrice));
var totalPrice = thisEngineeringQuantity * unitPrice; // 总价 // 计算总金额
detail1Grid.setCellValue(item, 'totalPrice', parseFloat(totalPrice)); calculateAmount(detail1Grid.getDataItems());
// 计算总金额 }
calculateAmount(detail1Grid.getDataItems());
} if (e.field == "totalPrice") {
var tr, index;
// 获取此model元素信息
var item = e.items[0];
var totalPrice = parseFloat(item.totalPrice) || 0; // 总价
var unitPrice = parseFloat(item.unitPrice) || 0; // 单价
var thisEngineeringQuantity = totalPrice / unitPrice; // 工程量
detail1Grid.setCellValue(item, 'thisEngineeringQuantity', parseFloat(thisEngineeringQuantity));
// 计算总金额
calculateAmount(detail1Grid.getDataItems());
}
}); });
}, },
beforeAdd :function (e) { beforeAdd :function (e) {
...@@ -203,7 +222,7 @@ function choiceFunc() { ...@@ -203,7 +222,7 @@ function choiceFunc() {
"&inqu_status-0-appentIds=" + appentIds.join(","), "&inqu_status-0-appentIds=" + appentIds.join(","),
title: "<div style='text-align: center;'>合同清单</div>", title: "<div style='text-align: center;'>合同清单</div>",
width: "80%", width: "80%",
height: "80%", height: "90%",
dispaly: "flex", dispaly: "flex",
callbackName: choiceCallbackFunc callbackName: choiceCallbackFunc
}); });
...@@ -304,10 +323,14 @@ function cancelFunc() { ...@@ -304,10 +323,14 @@ function cancelFunc() {
function btnSaveFunc() { function btnSaveFunc() {
fieldValidation(); fieldValidation();
JSUtils.confirm("确定对数据做\"保存\"操作? ", { JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () { ok: function () {
JSUtils.submitGrid("detail1", "HGCW008", "save", {isAlldata:true,onSuccessCallback:parent.windowCallback}); JSUtils.submitGridsData("detail1", "HGCW008", "save", false,
} function (res) {
parent.windowNewCallback(res);
}
);
}
}); });
} }
function deleteResult1Func() { function deleteResult1Func() {
......
...@@ -64,18 +64,19 @@ ...@@ -64,18 +64,19 @@
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="detail1" title="合同清单"> <EF:EFRegion id="detail1" title="合同清单">
<EF:EFGrid blockId="detail1" autoDraw="override" checkMode="row" isFloat="true" copyToAdd="false"> <EF:EFGrid blockId="detail1" autoDraw="override" checkMode="row" isFloat="true" copyToAdd="false">
<EF:EFColumn ename="rowNo" cname="行号" hidden="true"/> <EF:EFColumn ename="rowNo" cname="行号" hidden="true"/>
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="settlementBasis" cname="结算依据" align="center" /> <EF:EFColumn ename="settlementBasis" cname="结算依据" align="center"/>
<EF:EFColumn ename="taskName" cname="任务名称" align="center" /> <EF:EFColumn ename="taskName" cname="任务名称" align="center"/>
<EF:EFColumn ename="engineeringContent" cname="工程内容" align="center" /> <EF:EFColumn ename="engineeringContent" cname="工程内容" align="center"/>
<EF:EFColumn ename="thisEngineeringQuantity" cname="本次结算工程量" format="{0:N3}" align="right"/> <EF:EFColumn ename="thisEngineeringQuantity" cname="本次结算工程量" format="{0:N3}" align="right"/>
<EF:EFColumn ename="cumulativeEngineeringQuantity" cname="至本次累计结算工程量" format="{0:N3}" align="right" enable="false"/> <EF:EFColumn ename="cumulativeEngineeringQuantity" cname="至本次累计结算工程量" format="{0:N3}" align="right"
<EF:EFColumn ename="unit" cname="单位" align="center" /> enable="false"/>
<EF:EFColumn ename="unitPrice" cname="单价" format="{0:N3}" align="right"/> <EF:EFColumn ename="unit" cname="单位" align="center"/>
<EF:EFColumn ename="totalPrice" cname="合价" enable="false" format="{0:N3}" align="right"/> <EF:EFColumn ename="unitPrice" cname="单价" format="{0:N3}" align="right"/>
<EF:EFColumn ename="remarks" cname="备注" align="center" /> <EF:EFColumn ename="totalPrice" cname="合价" format="{0:N3}" align="right"/>
<EF:EFColumn ename="inventoryId" cname="清单id" hidden="true"/> <EF:EFColumn ename="remarks" cname="备注" align="center"/>
<EF:EFColumn ename="inventoryId" cname="清单id" hidden="true"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
<div class="row" style="display:flex;justify-content:center;"> <div class="row" style="display:flex;justify-content:center;">
......
...@@ -11,45 +11,63 @@ $(function() { ...@@ -11,45 +11,63 @@ $(function() {
}); });
IPLATUI.EFGrid.detail1 = { IPLATUI.EFGrid.detail1 = {
pageable: { pageable: {
pageSize: 20, pageSize: 20,
pageSizes: [10,20,30,50,100,200], pageSizes: [10, 20, 30, 50, 100, 200],
}, },
columns: [ columns: [{
], field: "totalPrice",
loadComplete: function (grid) { template: function (item) {
$("#BTN_CHOICE").on("click",choiceFunc); let thisEngineeringQuantity = item.thisEngineeringQuantity;
grid.dataSource.bind("change", function(e) { let unitPrice = item.unitPrice;
if (e.field == "thisEngineeringQuantity") { if (!isBlank(thisEngineeringQuantity) && !isBlank(unitPrice)) {
var tr,index; return parseFloat(thisEngineeringQuantity) * parseFloat(unitPrice);
// 获取此model元素信息 }
var item = e.items[0]; return isBlank(item.totalPrice) ? "" : item.totalPrice;
var inventoryId = item.inventoryId; }
var thisEngineeringQuantity = parseFloat(item.thisEngineeringQuantity) || 0; // 工程量 }],
var unitPrice = parseFloat(item.unitPrice) || 0; // 单价 loadComplete: function (grid) {
var totalPrice = thisEngineeringQuantity * unitPrice; // 总价 $("#BTN_CHOICE").on("click", choiceFunc);
detail1Grid.setCellValue(item, 'totalPrice', parseFloat(totalPrice)); grid.dataSource.bind("change", function (e) {
queryCumulativeEngineeringQuantity(inventoryId,item); if (e.field == "thisEngineeringQuantity") {
// 计算总金额 var tr, index;
setTimeout(function () { // 获取此model元素信息
calculateAmount(detail1Grid.getDataItems()); var item = e.items[0];
}, 200); var inventoryId = item.inventoryId;
} var thisEngineeringQuantity = parseFloat(item.thisEngineeringQuantity) || 0; // 工程量
}); var unitPrice = parseFloat(item.unitPrice) || 0; // 单价
grid.dataSource.bind("change", function(e) { var totalPrice = thisEngineeringQuantity * unitPrice; // 总价
if (e.field == "unitPrice") { detail1Grid.setCellValue(item, 'totalPrice', parseFloat(totalPrice));
var tr,index; queryCumulativeEngineeringQuantity(inventoryId, item);
// 获取此model元素信息 // 计算总金额
var item = e.items[0]; setTimeout(function () {
var inventoryId = item.inventoryId; calculateAmount(detail1Grid.getDataItems());
var thisEngineeringQuantity = parseFloat(item.thisEngineeringQuantity) || 0; // 工程量 }, 200);
var unitPrice = parseFloat(item.unitPrice) || 0; // 单价 }
var totalPrice = thisEngineeringQuantity * unitPrice; // 总价 if (e.field == "unitPrice") {
detail1Grid.setCellValue(item, 'totalPrice', parseFloat(totalPrice)); var tr, index;
// 计算总金额 // 获取此model元素信息
calculateAmount(detail1Grid.getDataItems()); var item = e.items[0];
} var inventoryId = item.inventoryId;
}); var thisEngineeringQuantity = parseFloat(item.thisEngineeringQuantity) || 0; // 工程量
var unitPrice = parseFloat(item.unitPrice) || 0; // 单价
var totalPrice = thisEngineeringQuantity * unitPrice; // 总价
detail1Grid.setCellValue(item, 'totalPrice', parseFloat(totalPrice));
// 计算总金额
calculateAmount(detail1Grid.getDataItems());
}
if (e.field == "totalPrice") {
var tr, index;
// 获取此model元素信息
var item = e.items[0];
var totalPrice = parseFloat(item.totalPrice) || 0; // 总价
var unitPrice = parseFloat(item.unitPrice) || 0; // 单价
var thisEngineeringQuantity = totalPrice / unitPrice; // 工程量
detail1Grid.setCellValue(item, 'thisEngineeringQuantity', parseFloat(thisEngineeringQuantity));
// 计算总金额
calculateAmount(detail1Grid.getDataItems());
}
});
setTimeout(function() { setTimeout(function() {
initDate(); initDate();
}, 1000); }, 1000);
...@@ -206,14 +224,14 @@ function choiceFunc() { ...@@ -206,14 +224,14 @@ function choiceFunc() {
if (contractType == "1" || contractType == "3") { if (contractType == "1" || contractType == "3") {
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(",") +
"&inqu_status-0-appentIds=" + appentIds.join(","), "&inqu_status-0-appentIds=" + appentIds.join(","),
title: "<div style='text-align: center;'>合同清单</div>", title: "<div style='text-align: center;'>合同清单</div>",
width: "80%", width: "80%",
height: "80%", height: "90%",
dispaly: "flex", dispaly: "flex",
callbackName: choiceCallbackFunc callbackName: choiceCallbackFunc
}); });
$("#JSColorboxWin").css({"height": "100%"}) $("#JSColorboxWin").css({"height": "100%"})
} else { } else {
...@@ -246,8 +264,9 @@ function choiceCallbackFunc(result1, result2) { ...@@ -246,8 +264,9 @@ function choiceCallbackFunc(result1, result2) {
detail1Grid.setCellValue(0, "thisEngineeringQuantity", item.provisionalQuantity); detail1Grid.setCellValue(0, "thisEngineeringQuantity", item.provisionalQuantity);
detail1Grid.setCellValue(0, "taskName", item.inventory); detail1Grid.setCellValue(0, "taskName", item.inventory);
detail1Grid.setCellValue(0, "unit", item.unit); detail1Grid.setCellValue(0, "unit", item.unit);
detail1Grid.setCellValue(0, "unitPrice", item.unitPriceExcludingTax); detail1Grid.setCellValue(0, "unitPrice", item.unitPriceExcludingTax);
detail1Grid.setCellValue(0, "inventoryId", item.id); detail1Grid.setCellValue(0, "totalPrice", item.provisionalQuantity * item.unitPriceExcludingTax);
detail1Grid.setCellValue(0, "inventoryId", item.id);
detail1Grid.refresh(); detail1Grid.refresh();
}) })
$.each(result2, function(index, item) { $.each(result2, function(index, item) {
......
...@@ -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="合价" enable="false" format="{0:N3}" align="right"/> <EF:EFColumn ename="totalPrice" cname="合价" format="{0:N3}" 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>
......
...@@ -43,13 +43,13 @@ ...@@ -43,13 +43,13 @@
<EF:EFInput ename="result-0-thisPriceTax" cname="本次结算价税合计金额(元)" colWidth="4" readonly="true"/> <EF:EFInput ename="result-0-thisPriceTax" cname="本次结算价税合计金额(元)" colWidth="4" readonly="true"/>
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput ename="result-0-totalContractPrice" cname="合同金额(元)" colWidth="4" readonly="true"/> <EF:EFInput ename="result-0-cumulativeSettlementAmount" cname="累计结算金额(元)" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-cumulativeSettlementAmount" cname="累计结算金额(元)" colWidth="4" readonly="true"/> <EF:EFInput ename="result-0-cumulativeSettlementTax" cname="累计结算税金(元)" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-cumulativeSettlementTax" cname="累计结算税金(元)" colWidth="4" readonly="true"/> <EF:EFInput ename="result-0-cumulativePriceTax" cname="累计结算价税合计金额(元)" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="result-0-cumulativePriceTax" cname="累计结算价税合计金额(元)" colWidth="4" readonly="true"/>
</div> </div>
<div class="row">
<EF:EFInput ename="result-0-totalContractPrice" cname="合同金额(元)" colWidth="4" readonly="true"/>
</div>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="detail1" title="合同清单"> <EF:EFRegion id="detail1" title="合同清单">
...@@ -75,4 +75,4 @@ ...@@ -75,4 +75,4 @@
<script> <script>
var ctx = "${ctx}"; var ctx = "${ctx}";
</script> </script>
<script src="${ctx}/HG/CW/HGCW008B.js"></script> <script src="${ctx}/HG/CW/HGCW008B.js"></script>
\ No newline at end of file
...@@ -19,7 +19,7 @@ $(function () { ...@@ -19,7 +19,7 @@ $(function () {
/** /**
* 取消 * 取消
*/ */
$('#cancel').on('click', function () { $('#CANCEL').on('click', function () {
// 关闭弹窗 // 关闭弹窗
parent.JSColorbox.close(); parent.JSColorbox.close();
}) })
...@@ -27,7 +27,7 @@ $(function () { ...@@ -27,7 +27,7 @@ $(function () {
/** /**
* 确认 * 确认
*/ */
$('#confirm').on('click', function () { $('#CONFIRM').on('click', function () {
let allRows = new Array(); let allRows = new Array();
let result3Row = new Array(); let result3Row = new Array();
allRows = resultGrid.getCheckedRows(); allRows = resultGrid.getCheckedRows();
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<EF:EFInput cname="IDS" ename="inventoryIds" blockId="inqu_status" row="0" type="hidden" /> <EF:EFInput cname="IDS" ename="inventoryIds" blockId="inqu_status" row="0" type="hidden" />
<EF:EFInput cname="AIDS" ename="appentIds" 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:EFRegion id="result" title="合同清单">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true"> <EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" height="35vh">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="inventory" cname="清单" align="center" enable="false"/> <EF:EFColumn ename="inventory" cname="清单" align="center" enable="false"/>
<EF:EFColumn ename="unit" cname="单位" align="center" enable="false"/> <EF:EFColumn ename="unit" cname="单位" align="center" enable="false"/>
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
<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>
<EF:EFRegion id="result3" title="签证单"> <EF:EFRegion id="result3" title="签证单" fitHeight="true">
<EF:EFGrid blockId="result3" autoDraw="override" isFloat="true" queryMethod="query3"> <EF:EFGrid blockId="result3" autoDraw="override" isFloat="true" checkMode="row" queryMethod="query3">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="projCode" cname="项目编号" align="center" enable="false"/> <EF:EFColumn ename="projCode" cname="项目编号" align="center" enable="false"/>
<EF:EFColumn ename="projName" cname="项目名称" align="center" enable="false"/> <EF:EFColumn ename="projName" cname="项目名称" align="center" enable="false"/>
...@@ -37,9 +37,5 @@ ...@@ -37,9 +37,5 @@
<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">
<EF:EFButton ename="cancel" cname="取消" type="button" class="btn-align-right"/>
<EF:EFButton ename="confirm" cname="确认" type="button" class="btn-align-right"/>
</div>
</EF:EFPage> </EF:EFPage>
...@@ -258,17 +258,18 @@ let showDownloadRecord = function (fileId, docId) { ...@@ -258,17 +258,18 @@ let showDownloadRecord = function (fileId, docId) {
* 预览 * 预览
*/ */
let preview = function () { let preview = function () {
let params = { let url = "HGWD002A?inqu_status-0-fileId" + $("#inqu_status-0-fileId").val();
"inqu_status-0-fileId": $("#inqu_status-0-fileId").val() window.open(url, '_blank');
} // let params = {
JSColorbox.open({ // "inqu_status-0-fileId": $("#inqu_status-0-fileId").val()
href: "HGWD002A", // }
title: "<div style='text-align: center;'>文件预览</div>", // JSColorbox.open({
width: "90%", // href: "HGWD002A",
height: "95%", // title: "<div style='text-align: center;'>文件预览</div>",
params: params // width: "90%",
}); // height: "95%",
// params: params
// });
// let rows = resultGrid.getCheckedRows(); // let rows = resultGrid.getCheckedRows();
// if (rows.length < 1) { // if (rows.length < 1) {
// message("请选择数据"); // message("请选择数据");
......
...@@ -240,6 +240,7 @@ let copyUser = function () { ...@@ -240,6 +240,7 @@ let copyUser = function () {
* 授权回调 * 授权回调
*/ */
let copyUserCallback = function (res) { let copyUserCallback = function (res) {
} }
/** /**
......
...@@ -47,7 +47,6 @@ let copyUser = function () { ...@@ -47,7 +47,6 @@ let copyUser = function () {
ok: function () { ok: function () {
JSUtils.submitGridsData("result", "HGWD003B", "copyUser", JSUtils.submitGridsData("result", "HGWD003B", "copyUser",
false, function (res) { false, function (res) {
message(res.msg);
if (res.status !== -1) { if (res.status !== -1) {
parent.JSColorbox.setValueCallback(res); parent.JSColorbox.setValueCallback(res);
} }
......
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