Commit eae72b7f by liuyang

2024-07-18

1.合同类型为补充协议,主合同号选择后没有显示
2.合同类型为合同外用工,可以选择主合同号这劳务合同
parent 508d4c0e
......@@ -55,7 +55,7 @@ public class ServiceHGCW002 extends ServiceBase {
outInfo = super.query(inInfo, HGCW002.QUERY, new HGCW002());
Map<String,Object> qarma = new HashMap<>();
EiInfoUtils.addBlock(outInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.GROUP_RECORD_BLOCK_ID));
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.GROUP_RECORD_BLOCK_ID,DdynamicEnum.CONTRACT_BLOCK_ID));
//角色公司
List<String> roleCompanyCode = HGSBTools.getRoleCompanyCode();
qarma.put(Org.FIELD_ORG_ID,roleCompanyCode);
......@@ -224,14 +224,21 @@ public class ServiceHGCW002 extends ServiceBase {
}
public EiInfo contractComboBox(EiInfo inInfo){
Map<String, Object> map = new HashMap<>();
if (StringUtils.isNotEmpty(inInfo.getString("reviewStatus"))) {
map.put("reviewStatus", inInfo.getString("reviewStatus"));
Map<String,String> params = EiInfoUtils.getFirstRow(inInfo, EiConstant.queryBlock);
Map<String, Object> paramMap = new HashMap<>();
if (StringUtils.isNotEmpty(inInfo.getString(HGCW002.FIELD_REVIEW_STATUS))) {
paramMap.put(HGCW002.FIELD_REVIEW_STATUS, inInfo.getString(HGCW002.FIELD_REVIEW_STATUS));
}
if (StringUtils.isNotEmpty(inInfo.getString("contractType"))) {
map.put("contractType", inInfo.getString("contractType"));
if (StringUtils.isNotEmpty(inInfo.getString(HGCW002.FIELD_CONTRACT_TYPE))) {
paramMap.put(HGCW002.FIELD_CONTRACT_TYPE, inInfo.getString(HGCW002.FIELD_CONTRACT_TYPE));
}
if (StringUtils.isNotEmpty(params.get(ACConstants.FIELD_VALUE))) {
paramMap.put(HGCW002.FIELD_CONTRACT_NUMBER, params.get(ACConstants.FIELD_VALUE));
}
if (StringUtils.isNotEmpty(params.get(ACConstants.FIELD_TEXT))) {
paramMap.put(HGCW002.FIELD_CONTRACT_NAME, params.get(ACConstants.FIELD_TEXT));
}
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CONTRACT_BLOCK_ID), map, false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CONTRACT_BLOCK_ID), paramMap, false);
return inInfo;
}
......
......@@ -484,6 +484,12 @@
<isNotEmpty prepend=" AND " property="contractType">
CONTRACT_TYPE = #contractType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNumber">
CONTRACT_NUMBER LIKE CONCAT('%', #contractNumber#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractName">
CONTRACT_NAME LIKE CONCAT('%', #contractName#, '%')
</isNotEmpty>
ORDER BY CONTRACT_NUMBER
</select>
......
......@@ -4,8 +4,7 @@
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<head>
</head>
<EF:EFPage title="合同管理">
<EF:EFRegion id="inqu" title="查询条件">
......@@ -49,7 +48,7 @@
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false" autoFit="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="200" align="center"/>
<EF:EFColumn ename="companyName" cname="所属公司" align="center" enable="false"/>
......@@ -61,7 +60,11 @@
<EF:EFColumn ename="partyA" cname="甲方名称" align="center" enable="false"/>
<EF:EFColumn ename="partyB" cname="乙方名称" align="center" enable="false"/>
<EF:EFColumn ename="mainContractNumber" cname="主合同号" align="center" enable="false"/>
<EF:EFColumn ename="mainContractName" cname="主合同名称" align="center" enable="false"/>
<EF:EFComboColumn ename="mainContractNumber" cname="主合同名称" enable="false" width="160" align="center" required="false"
blockName="contract_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="contractType" cname="合同类型" width="100" align="center"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false" >
<EF:EFCodeOption codeName="hggp.cw.contractType"/>
......@@ -85,9 +88,8 @@
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<%--
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/HG/CW/HGCW002.js"></script>
\ No newline at end of file
<script src="${ctx}/HG/CW/HGCW002.js"></script>--%>
......@@ -294,16 +294,21 @@ $(function() {
// 将自定义div中的字段构造成查询条件 EiInfo
// var queryInfo = EiInfo.build("#result-0-contractCategory");
var contractType = $("#result-0-contractType").val();
let contractVal = 0;
if (!contractType) {
message("请先选择合同类型!");
// 阻止弹窗
e.preventDefault();
} else if (contractType != "3") {
message("只有合同类型为补充协议时,才需要填写主合同号!");
} else if (contractType == "1" || contractType == "2") {
message("只有合同类型为补充协议和合同外用工时,才需要填写主合同号!");
e.preventDefault();
}else if (contractType == "3"){
contractVal = "1"
}else if (contractType == "4"){
contractVal = "2"
}
var info = new EiInfo();
info.set("contractType","1")
info.set("contractType",contractVal)
return info;
},
/**
......@@ -314,13 +319,12 @@ $(function() {
* e.model 选中的数据行model
*/
backFill: function (e) {
console.log("Step" + (++i) + ": ----backFill----");
// 回填数据
var model = e.model;
// var data = model.toJSON();
console.log(model);
var contractNumber = model.contractNumber;
var contractName = model.contractName;
var contractNumber = model.valueField;
var contractName = model.textField;
$("#result-0-mainContractNumber").val(contractNumber);
IPLAT.EFPopupInput.text( $("#popupInputMainContractNumber") , contractName)
e.preventDefault(); // 不使用默认的回填逻辑
......
......@@ -4,8 +4,7 @@
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<head>
</head>
<EF:EFPage title="新增合同">
<EF:EFRegion id="inqu1" title="基本信息">
<div class="row">
......@@ -81,7 +80,7 @@
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFInput ename="result-0-mainContractNumber" cname="主合同号" type="hidden"/>
<EF:EFPopupInput ename="popupInputMainContractNumber" cname="主合同号" colWidth="8" ratio="2:10"
serviceName="HGCW002" methodName="contractComboBox"
serviceName="HGCW002" methodName="contractComboBox" filterPopupGrid="false"
resultId="contract_block_id"
save="false" popupType="ServiceGrid"
valueField="result-0-mainContractNumber" textField="popupInputMainContractNumber"
......@@ -151,7 +150,8 @@
</EF:EFPage>
<%--
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/HG/CW/HGCW002A.js"></script>
\ No newline at end of file
<script src="${ctx}/HG/CW/HGCW002A.js"></script>--%>
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