Commit 4346e24e by 宋祥

1.增加项目管理页面

parent 1e3904d7
package com.baosight.hggp.hg.sc.constant;
/**
* @author:songx
* @date:2024/8/22,10:09
*/
public class HgScSqlConstant {
/**
* 项目管理
*
* @author:songx
* @date:2024/5/7,16:36
*/
public static class HgSc001 {
// 德诚修改
public static final String UPDATE_FOR_DC = "HGSC001.updateForDc";
}
}
package com.baosight.hggp.hg.sc.service;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.MapUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.List;
import java.util.Map;
/**
* 项目管理
*
* @author:songx
* @date:2022/7/11,11:08
*/
public class ServiceHGSC101 extends ServiceEPBase {
/**
* 初始化
*
* @param inInfo
* @return
*/
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC001().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询数据列表
*
* @param inInfo
* @return
*/
@Override
public EiInfo query(EiInfo inInfo) {
try {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
inInfo = super.query(inInfo, HGSC001.QUERY, new HGSC001());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 删除
*
* @param inInfo
* @return
*/
public EiInfo remove(EiInfo inInfo) {
try {
List<HGSC001> fSc001s = MapUtils.toDaoEPBases(inInfo, HGSC001.class);
for (HGSC001 fSc001 : fSc001s) {
DaoUtils.update(HGSC001.DELETE, fSc001);
}
inInfo = this.query(inInfo);
inInfo.setMsg("操作成功!本次对[" + fSc001s.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
}
package com.baosight.hggp.hg.sc.service;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.sc.constant.HgScSqlConstant;
import com.baosight.hggp.hg.sc.domain.HGSC001;
import com.baosight.hggp.hg.sc.tools.HGSCTools;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.MapUtils;
import com.baosight.hggp.util.StringUtils;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.Arrays;
import java.util.Map;
/**
* 新增修改项目
*
* @author:songx
* @date:2022/7/11,11:08
*/
public class ServiceHGSC101A extends ServiceEPBase {
/**
* 初始化
*
* @param inInfo
* @return
*/
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_CODE_BLOCK_ID));
this.setProjectInfo(inInfo);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 保存
*
* @param inInfo
* @return
*/
public EiInfo save(EiInfo inInfo) {
try {
HGSC001 fSc001 = MapUtils.toDaoEPBase(inInfo, HGSC001.class);
// 数据校验
this.checkData(fSc001);
// 设置基础信息
// 判断是新增还是修改
if (StringUtils.isBlank(fSc001.getProjCode())) {
addData(fSc001);
} else {
modifyData(fSc001);
}
inInfo.setMsg("保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 数据校验
*
* @param fSc001
*/
private void checkData(HGSC001 fSc001) {
AssertUtils.isEmpty(fSc001.getProjName(), "项目名称不能为空!");
}
/**
* 新增数据
*
* @param fSc001
*/
private void addData(HGSC001 fSc001) {
// 校验编号是否存在
fSc001.setProjCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.PROJ_NUMBER));
DaoUtils.insert(HGSC001.INSERT, fSc001);
}
/**
* 修改数据
*
* @param fSc001
*/
private void modifyData(HGSC001 fSc001) {
Map map = fSc001.toMap();
DaoUtils.update(HgScSqlConstant.HgSc001.UPDATE_FOR_DC, map);
}
/**
* 设置项目信息
*
* @param inInfo
*/
public void setProjectInfo(EiInfo inInfo) {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
String projCode = MapUtils.getString(queryRow, HGSC001.FIELD_proj_code);
if (StringUtils.isBlank(projCode)) {
return;
}
EiBlock resultBlock = new EiBlock(EiConstant.resultBlock);
resultBlock.addRow(HGSCTools.Hgsc001.queryByCode(projCode));
resultBlock.addBlockMeta(new HGSC001().eiMetadata);
inInfo.setBlock(resultBlock);
}
}
<?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-07 17:23:17
Version : 1.0
schema : hggp
tableName : HGSC001
id BIGINT NOT NULL primarykey,
company_code VARCHAR NOT NULL,
company_name VARCHAR NOT NULL,
dep_code VARCHAR,
dep_name VARCHAR,
subcontract_code VARCHAR NOT NULL,
subcontract_name VARCHAR NOT NULL,
genral_contract_code VARCHAR NOT NULL,
genral_contract_name VARCHAR NOT NULL,
party_pm_name VARCHAR,
party_pm_hpone VARCHAR,
contract_name VARCHAR,
contract_work_txt VARCHAR,
proj_code VARCHAR,
proj_name VARCHAR,
proj_type VARCHAR,
proj_status TINYINT,
approval_status TINYINT,
permiss_start_date VARCHAR,
start_date VARCHAR,
end_date VARCHAR,
account_code VARCHAR NOT NULL,
created_by VARCHAR,
created_name VARCHAR,
created_time VARCHAR,
updated_by VARCHAR,
updated_name VARCHAR,
updated_time VARCHAR
-->
<sqlMap namespace="HGSC001"> <sqlMap namespace="HGSC001">
<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#
</isNotEmpty> </isNotEmpty>
...@@ -124,8 +90,7 @@ ...@@ -124,8 +90,7 @@
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" resultClass="com.baosight.hggp.hg.sc.domain.HGSC001">
resultClass="com.baosight.hggp.hg.sc.domain.HGSC001">
SELECT SELECT
id as "id", id as "id",
company_code as "companyCode", <!-- 公司编码 --> company_code as "companyCode", <!-- 公司编码 -->
...@@ -170,96 +135,9 @@ ...@@ -170,96 +135,9 @@
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGSC001 WHERE 1=1 SELECT COUNT(*) FROM ${hggpSchema}.HGSC001 WHERE 1=1
<include refid="condition" /> <include refid="condition"/>
</select> </select>
<!--
<isNotEmpty prepend=" AND " property="id">
id = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
company_code = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
company_name = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
dep_code = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depName">
dep_name = #depName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="subcontractCode">
subcontract_code = #subcontractCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="subcontractName">
subcontract_name = #subcontractName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="genralContractCode">
genral_contract_code = #genralContractCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="genralContractName">
genral_contract_name = #genralContractName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyPmName">
party_pm_name = #partyPmName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyPmHpone">
party_pm_hpone = #partyPmHpone#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractName">
contract_name = #contractName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractWorkTxt">
contract_work_txt = #contractWorkTxt#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
proj_code = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
proj_name = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projType">
proj_type = #projType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projStatus">
proj_status = #projStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="approvalStatus">
approval_status = #approvalStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="permissStartDate">
permiss_start_date = #permissStartDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="startDate">
start_date = #startDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="endDate">
end_date = #endDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
account_code = #accountCode#
</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>
-->
<insert id="insert"> <insert id="insert">
INSERT INTO ${hggpSchema}.HGSC001 (id, INSERT INTO ${hggpSchema}.HGSC001 (id,
company_code, <!-- 公司编码 --> company_code, <!-- 公司编码 -->
...@@ -411,4 +289,15 @@ ...@@ -411,4 +289,15 @@
<include refid="condition" /> <include refid="condition" />
ORDER BY PROJ_CODE desc ORDER BY PROJ_CODE desc
</select> </select>
<!-- 德诚修改 -->
<update id="updateForDc">
UPDATE ${hggpSchema}.HGSC001
SET
COMPANY_CODE = #companyCode#,
COMPANY_NAME = #companyName#,
PROJ_NAME = #projName#
WHERE PROJ_CODE = #projCode#
</update>
</sqlMap> </sqlMap>
...@@ -189,6 +189,7 @@ public class HGSCTools { ...@@ -189,6 +189,7 @@ public class HGSCTools {
} }
public static class Hgsc001 { public static class Hgsc001 {
public static HGSC001 queryByCode(String code) { public static HGSC001 queryByCode(String code) {
AssertUtils.isNull(code, "项目Code不能为空!"); AssertUtils.isNull(code, "项目Code不能为空!");
List<HGSC001> results = DaoBase.getInstance().query(HGSC001.QUERY, new HashMap<String,Object>(){ List<HGSC001> results = DaoBase.getInstance().query(HGSC001.QUERY, new HashMap<String,Object>(){
......
...@@ -6,15 +6,15 @@ import com.baosight.hggp.core.constant.CommonConstant; ...@@ -6,15 +6,15 @@ import com.baosight.hggp.core.constant.CommonConstant;
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.sb.domain.HGSB001;
import com.baosight.hggp.hg.sj.domain.HGSJ001; import com.baosight.hggp.hg.sj.domain.HGSJ001;
import com.baosight.hggp.hg.sj.domain.HGSJ002;
import com.baosight.hggp.hg.sj.domain.HGSJ002A;
import com.baosight.hggp.hg.xs.domain.Company; import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.domain.Org; import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.hg.xs.domain.User;
import com.baosight.hggp.hg.xs.tools.HGXSTools; import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.util.*; import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.ErrorCodeUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.contants.ACConstants; import com.baosight.hggp.util.contants.ACConstants;
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;
...@@ -25,7 +25,12 @@ import com.baosight.iplat4j.core.service.impl.ServiceEPBase; ...@@ -25,7 +25,12 @@ import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import java.util.*; import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
/** /**
* @author LiuYang * @author LiuYang
...@@ -168,13 +173,13 @@ public class ServiceHGSJ001 extends ServiceEPBase { ...@@ -168,13 +173,13 @@ public class ServiceHGSJ001 extends ServiceEPBase {
public List<String> getOrgId(){ public List<String> getOrgId(){
Map<String, Object> orgMap = new HashMap(); Map<String, Object> orgMap = new HashMap();
List<Org> orgList = HGXSTools.XsOrg.queryByUser(); List<Org> orgList = HGXSTools.XsOrg.queryByUser();
if (CollectionUtils.isNotEmpty(orgList)){ if (CollectionUtils.isNotEmpty(orgList)) {
Org org = orgList.get(0); Org org = orgList.get(0);
if (!org.getOrgType().equals("company")) { if (!org.getOrgType().equals("company")) {
//如果不是公司公司,则找到上一级 //如果不是公司公司,则找到上一级
Org org1 = HGXSTools.XsOrg.queryCompany(org.getOrgId()); Org org1 = HGXSTools.XsOrg.queryCompany(org.getOrgId());
orgMap.put("orgId",org1.getParentOrgId()); orgMap.put("orgId", org1.getParentOrgId());
}else { } else {
orgMap.put("orgId", org.getParentOrgId()); orgMap.put("orgId", org.getParentOrgId());
} }
} }
...@@ -188,4 +193,5 @@ public class ServiceHGSJ001 extends ServiceEPBase { ...@@ -188,4 +193,5 @@ public class ServiceHGSJ001 extends ServiceEPBase {
} }
return strList; return strList;
} }
} }
$(function () {
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
columns: [{
field: "operator",
template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="modify(\'' + item.projCode + '\')" >修改</a>';
return template;
}
}],
loadComplete: function (grid) {
// 新增
$("#ADD").on("click", add);
//删除
$("#REMOVE").on("click", remove);
},
onAdd: function (e) {
e.preventDefault();
},
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'save' || e.eiInfo.extAttr.methodName == 'delete') {
query();
}
}
}
$("#QUERY").on("click", query);
});
$(window).load(function () {
// 查
query();
});
/**
* 查询
*/
function query() {
resultGrid.dataSource.page(1);
}
/**
* 新增
*/
let add = function () {
addOrUpdate("");
}
/**
* 修改
*/
let modify = function (projCode) {
let params = "&inqu_status-0-projCode=" + projCode;
addOrUpdate(params);
}
/**
* 新增
*/
let addOrUpdate = function (params) {
JSColorbox.open({
href: "HGSC101A?methodName=initLoad" + params,
title: "<div style='text-align: center;'>" + (isBlank(params) ? "新增项目" : "修改项目") + "</div>",
width: "60%",
height: "70%",
params: params,
callbackName: addOrUpdateCallback
});
}
/**
* 新增成功后回调
*/
let addOrUpdateCallback = function () {
// 刷新列表
query();
// 关闭弹窗
JSColorbox.close();
}
/**
* 删除
*/
let remove = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGSC101", "remove", true);
}
});
}
<!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" %>
<EF:EFPage title="项目管理">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput ename="inqu_status-0-companyName" cname="公司名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-projName" cname="项目名称" placeholder="模糊查询" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" copyToAdd="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/>
<EF:EFColumn ename="companyName" cname="公司名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="projCode" cname="项目编码" enable="false" width="120" align="center"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="createdBy" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"/>
<EF:EFColumn ename="updatedBy" cname="修改人姓名" enable="false" width="110" align="center"/>
<EF:EFColumn ename="updatedTime" cname="修改时间" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function () {
IPLATUI.EFSelect = {
"result-0-companyCode": {
change: function (e) {
setCompanyName(this.value());
}
}
}
// 保存
$("#SAVE").on("click", save);
});
/**
* 页面加载时执行
*/
$(window).load(function () {
});
/**
* 设置公司名称
*/
let setCompanyName = function (companyCode) {
if (isBlank(companyCode)) {
$("#result-0-companyName").val("");
} else {
$("#result-0-companyName").val($("#result-0-companyCode").data("kendoDropDownList").text());
}
}
/**
* 新增
*/
let save = function () {
let msg = checkParams();
if (msg != null) {
message(msg);
return;
}
JSUtils.confirm("确定\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("", "HGSC101A", "save", true,
function (e) {
if (e.getStatus() !== -1) {
parent.JSColorbox.setValueCallback();
}
}
);
}
});
}
/**
* 参数校验
*/
let checkParams = function () {
let projName = $("#result-0-projName").val();
if (isBlank(projName)) {
return "项目名称不能为空";
}
let companyCode = $("#result-0-companyCode").val();
if (isBlank(companyCode)) {
return "请选择公司";
}
return null;
}
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="新增项目">
<EF:EFRegion id="result" title="数据区域">
<EF:EFInput cname="UID" blockId="result" ename="internalCode" row="0" type="hidden"/>
<div class="row">
<EF:EFInput cname="项目号" blockId="result" ename="projCode" row="0" colWidth="6" ratio="2:10" required="true"
readonly="true"/>
</div>
<div class="row">
<EF:EFSelect cname="公司" blockId="result" ename="companyCode" row="0" colWidth="6" ratio="2:10"
filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="company_code_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput cname="公司名称" blockId="result" ename="companyName" row="0" colWidth="6" ratio="2:10"
type="hidden"/>
</div>
<div class="row">
<EF:EFInput cname="项目名称" blockId="result" ename="projName" row="0" colWidth="6" required="true"
ratio="2:10" maxLength="200"/>
</div>
<br/>
<span style="color: red; ">说明:项目号由系统自动生成</span><br>
</EF:EFRegion>
</EF:EFPage>
...@@ -74,9 +74,15 @@ $(function () { ...@@ -74,9 +74,15 @@ $(function () {
for (let i = 0; i < projCodeBox.length; i++) { for (let i = 0; i < projCodeBox.length; i++) {
if (projCodeBox[i]["valueField"] === item["projCode"]) { if (projCodeBox[i]["valueField"] === item["projCode"]) {
resultGrid.setCellValue(item, 'projName', projCodeBox[i]["textField"]); resultGrid.setCellValue(item, 'projName', projCodeBox[i]["textField"]);
if (isBlank(item["companyCode"])){ if (isBlank(item["companyCode"])) {
resultGrid.setCellValue(item, 'companyCode', projCodeBox[i]["param1Field"] == "null" ? "" : projCodeBox[i]["param1Field"]); resultGrid.setCellValue(item, 'companyCode',
resultGrid.setCellValue(item, 'companyName', projCodeBox[i]["param2Field"] == "null" ? "" : projCodeBox[i]["param2Field"]); projCodeBox[i]["param1Field"] == "null"
? "" : projCodeBox[i]["param1Field"]
);
resultGrid.setCellValue(item, 'companyName',
projCodeBox[i]["param2Field"] == "null"
? "" : projCodeBox[i]["param2Field"]
);
} }
break; break;
} }
...@@ -172,16 +178,23 @@ let save = function (btnNode) { ...@@ -172,16 +178,23 @@ let save = function (btnNode) {
} }
} }
/**
* 发布
*/
function updateRelease() { function updateRelease() {
let inEiInfo = new EiInfo();
let rows = resultGrid.getCheckedRows(); let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let inEiInfo = new EiInfo();
inEiInfo.addBlock(JSUtils.checkedRows2Block("result")) inEiInfo.addBlock(JSUtils.checkedRows2Block("result"))
EiCommunicator.send('HGWD001', 'updateRelease', inEiInfo, { EiCommunicator.send('HGWD001', 'updateRelease', inEiInfo, {
onSuccess(response) { onSuccess(response) {
if (response.status != -1){ if (response.status != -1) {
NotificationUtil(response.msg); NotificationUtil(response.msg);
query(); query();
}else{ } else {
NotificationUtil(response.msg, "error"); NotificationUtil(response.msg, "error");
} }
}, },
......
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/5/9
Time: 15:01
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html> <!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
...@@ -36,9 +29,12 @@ ...@@ -36,9 +29,12 @@
</EF:EFRegion> </EF:EFRegion>
<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">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/> <EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="160" align="center"/> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="160" align="center"/>
<EF:EFComboColumn ename="status" cname="状态" enable="false" width="80" align="center" defaultValue="0">
<EF:EFCodeOption codeName="hggp.hgwd.status"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="companyCode" cname="公司名称" <EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" textField="textField" valueField="valueField"
...@@ -46,25 +42,28 @@ ...@@ -46,25 +42,28 @@
align="center" filter="contains" sort="true"> align="center" filter="contains" sort="true">
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="projName" cname="所属项目" width="160" enable="true" readonly="true" align="center" required="true"/> <EF:EFColumn ename="companyName" cname="所属项目" width="160" enable="true" readonly="true" align="center"
<%--<EF:EFComboColumn ename="projCode" cname="所属项目" blockName="proj_record_block_id" required="true" hidden="true"/>
<EF:EFComboColumn ename="projCode" cname="所属项目" blockName="proj_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="200" required="true" maxLength="16" readonly="true" width="200" required="true"
align="center" filter="contains" sort="true" />--%> align="center" filter="contains" sort="true"/>
<EF:EFComboColumn ename="fileType" cname="文件类型" width="100" align="center" readonly="false" required="true" defaultValue="20"> <EF:EFColumn ename="projName" cname="所属项目" width="160" enable="true" readonly="true" align="center"
required="true" hidden="true"/>
<EF:EFComboColumn ename="fileType" cname="文件类型" width="100" align="center" readonly="false" required="true"
defaultValue="20">
<EF:EFCodeOption codeName="hggp.hgwd.fileType"/> <EF:EFCodeOption codeName="hggp.hgwd.fileType"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="fileName" cname="文件名称" width="160" enable="true" readonly="false" align="center" required="true"/> <EF:EFColumn ename="fileName" cname="文件名称" width="160" enable="true" readonly="false" align="center"
<EF:EFColumn ename="fileId" cname="文件号" width="100" enable="true" readonly="true" align="center" required="false"/> required="true"/>
<EF:EFColumn ename="fileId" cname="文件号" width="100" enable="false" readonly="true" align="center"
required="false"/>
<EF:EFColumn ename="createdName" cname="创建人" align="center" width="100" readonly="true" required="false" <EF:EFColumn ename="createdName" cname="创建人" align="center" width="100" readonly="true" required="false"
enable="false"/> enable="false"/>
<EF:EFColumn ename="createdTime" cname="创建时间" parseFormats="['yyyyMMddHHmmss']" editType="datetime" <EF:EFColumn ename="createdTime" cname="创建时间" parseFormats="['yyyyMMddHHmmss']" editType="datetime"
dateFormat="yyyy-MM-dd HH:mm:ss" align="center" width="120" readonly="true" required="false" dateFormat="yyyy-MM-dd HH:mm:ss" align="center" width="120" readonly="true" required="false"
enable="false"/> enable="false"/>
<EF:EFComboColumn ename="status" cname="状态" width="80" align="center" readonly="false" required="true" defaultValue="0">
<EF:EFCodeOption codeName="hggp.hgwd.status"/>
</EF:EFComboColumn>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
</EF:EFPage> </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