Commit 66cb79a3 by liuyang

2024-09-05 发布变更逻辑调整

parent ae61af53
...@@ -35,5 +35,15 @@ public class HgWdConstant { ...@@ -35,5 +35,15 @@ public class HgWdConstant {
// 目录 // 目录
public static final String C = "C"; public static final String C = "C";
} }
/**
* 操作状态
*/
public static class OperStatus {
//新增
public static final Integer S_0 = 0;
//变更
public static final Integer S_1 = 1;
}
} }
...@@ -37,6 +37,7 @@ public class HGWD099 extends DaoEPBase { ...@@ -37,6 +37,7 @@ public class HGWD099 extends DaoEPBase {
public static final String FIELD_RELEASE_DATE = "releaseDate"; /* 发布时间*/ public static final String FIELD_RELEASE_DATE = "releaseDate"; /* 发布时间*/
public static final String FIELD_DOC_VERSION = "docVersion"; /* 文件版本号*/ public static final String FIELD_DOC_VERSION = "docVersion"; /* 文件版本号*/
public static final String FIELD_DOC_TYPE = "docType"; /* 文件类型*/ public static final String FIELD_DOC_TYPE = "docType"; /* 文件类型*/
public static final String FIELD_OPER_STATUS = "operStatus"; /* 是否变更 0-否 1-是*/
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/ public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
...@@ -85,6 +86,7 @@ public class HGWD099 extends DaoEPBase { ...@@ -85,6 +86,7 @@ public class HGWD099 extends DaoEPBase {
private String releaseDate = " "; /* 发布时间*/ private String releaseDate = " "; /* 发布时间*/
private Integer docVersion = new Integer(0); /* 文件版本号*/ private Integer docVersion = new Integer(0); /* 文件版本号*/
private String docType = " "; /* 文件类型*/ private String docType = " "; /* 文件类型*/
private Integer operStatus = new Integer(0);
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -172,6 +174,10 @@ public class HGWD099 extends DaoEPBase { ...@@ -172,6 +174,10 @@ public class HGWD099 extends DaoEPBase {
eiColumn = new EiColumn(FIELD_DOC_TYPE); eiColumn = new EiColumn(FIELD_DOC_TYPE);
eiColumn.setDescName("文件类型"); eiColumn.setDescName("文件类型");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_OPER_STATUS);
eiColumn.setDescName("操作状态");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -471,6 +477,14 @@ public class HGWD099 extends DaoEPBase { ...@@ -471,6 +477,14 @@ public class HGWD099 extends DaoEPBase {
this.docType = docType; this.docType = docType;
} }
public Integer getOperStatus() {
return operStatus;
}
public void setOperStatus(Integer operStatus) {
this.operStatus = operStatus;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -499,6 +513,7 @@ public class HGWD099 extends DaoEPBase { ...@@ -499,6 +513,7 @@ public class HGWD099 extends DaoEPBase {
setDocVersion(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DOC_VERSION)), docVersion)); setDocVersion(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DOC_VERSION)), docVersion));
setReleaseDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RELEASE_DATE)), releaseDate)); setReleaseDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RELEASE_DATE)), releaseDate));
setDocType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_TYPE)), docType)); setDocType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_TYPE)), docType));
setOperStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_OPER_STATUS)), operStatus));
} }
/** /**
...@@ -528,6 +543,7 @@ public class HGWD099 extends DaoEPBase { ...@@ -528,6 +543,7 @@ public class HGWD099 extends DaoEPBase {
map.put(FIELD_DOC_VERSION, StringUtils.toString(docVersion, eiMetadata.getMeta(FIELD_DOC_VERSION))); map.put(FIELD_DOC_VERSION, StringUtils.toString(docVersion, eiMetadata.getMeta(FIELD_DOC_VERSION)));
map.put(FIELD_RELEASE_DATE, StringUtils.toString(releaseDate, eiMetadata.getMeta(FIELD_RELEASE_DATE))); map.put(FIELD_RELEASE_DATE, StringUtils.toString(releaseDate, eiMetadata.getMeta(FIELD_RELEASE_DATE)));
map.put(FIELD_DOC_TYPE, StringUtils.toString(docType, eiMetadata.getMeta(FIELD_DOC_TYPE))); map.put(FIELD_DOC_TYPE, StringUtils.toString(docType, eiMetadata.getMeta(FIELD_DOC_TYPE)));
map.put(FIELD_OPER_STATUS, StringUtils.toString(operStatus, eiMetadata.getMeta(FIELD_OPER_STATUS)));
return map; return map;
} }
......
...@@ -203,6 +203,7 @@ public class ServiceHGWD001 extends ServiceEPBase { ...@@ -203,6 +203,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
hgwd099.fromMap(map); hgwd099.fromMap(map);
hgwd099.setStatus(HgWdConstant.FileStatus.S_1); hgwd099.setStatus(HgWdConstant.FileStatus.S_1);
hgwd099.setReleaseDate(DateUtils.shortDateTime()); hgwd099.setReleaseDate(DateUtils.shortDateTime());
hgwd099.setOperStatus(HgWdConstant.OperStatus.S_0);
List<HGWD003> listByFile = HGWDTools.HgWd003.listByFile(hgwd099.getBizId()); List<HGWD003> listByFile = HGWDTools.HgWd003.listByFile(hgwd099.getBizId());
List hgwd003s = listByFile.stream().map(HGWD003::getUserId).distinct().collect(Collectors.toList()); List hgwd003s = listByFile.stream().map(HGWD003::getUserId).distinct().collect(Collectors.toList());
AssertUtils.isTrue(hgwd003s.size() <= 1, "文件未分配人员,请先分配人员!"); AssertUtils.isTrue(hgwd003s.size() <= 1, "文件未分配人员,请先分配人员!");
...@@ -221,7 +222,10 @@ public class ServiceHGWD001 extends ServiceEPBase { ...@@ -221,7 +222,10 @@ public class ServiceHGWD001 extends ServiceEPBase {
hgwd001.setRemark(changeContent.trim().length()==0?"附件发布":changeContent); hgwd001.setRemark(changeContent.trim().length()==0?"附件发布":changeContent);
DaoUtils.update(HGWD001.RELEASE_DATE, hgwd001); DaoUtils.update(HGWD001.RELEASE_DATE, hgwd001);
} }
HGWDTools.interaction(hgwd001,strFileName.append("变更内容:").append(changeContent).toString()); if (StringUtils.isNotEmpty(changeContent)) {
strFileName.append("变更内容:").append(changeContent);
}
HGWDTools.interaction(hgwd001,strFileName.toString());
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.update", "发布成功")}); inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.update", "发布成功")});
...@@ -263,6 +267,7 @@ public class ServiceHGWD001 extends ServiceEPBase { ...@@ -263,6 +267,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
hgwd099.setDocName(resultRow.get(HGWD099.FIELD_DOC_NAME).toString()); hgwd099.setDocName(resultRow.get(HGWD099.FIELD_DOC_NAME).toString());
hgwd099.setDocType(resultRow.get(HGWD099.FIELD_DOC_TYPE).toString()); hgwd099.setDocType(resultRow.get(HGWD099.FIELD_DOC_TYPE).toString());
hgwd099.setStatus(HgWdConstant.FileStatus.S_0); hgwd099.setStatus(HgWdConstant.FileStatus.S_0);
hgwd099.setOperStatus(HgWdConstant.OperStatus.S_1);
DaoUtils.insert(HGWD099.UPDATE, hgwd099); DaoUtils.insert(HGWD099.UPDATE, hgwd099);
} }
HGWDTools.interaction(hgwd001,strFileName.substring(0,strFileName.length()-1)); HGWDTools.interaction(hgwd001,strFileName.substring(0,strFileName.length()-1));
...@@ -296,6 +301,7 @@ public class ServiceHGWD001 extends ServiceEPBase { ...@@ -296,6 +301,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
hgwd001a.setChangeStartCode(hgwd099.getDocId()); hgwd001a.setChangeStartCode(hgwd099.getDocId());
hgwd001a.setChangeStart(hgwd099.getDocName()); hgwd001a.setChangeStart(hgwd099.getDocName());
}else if (ChangeTypeEnum.RELEASE.getCode().equals(type)){ }else if (ChangeTypeEnum.RELEASE.getCode().equals(type)){
hgwd001a.setChangeType(ChangeTypeEnum.RELEASE.getCode());
hgwd001a.setChangeContent(hgwd001.getRemark().trim().length()==0?"附件发布":hgwd001.getRemark().trim()); hgwd001a.setChangeContent(hgwd001.getRemark().trim().length()==0?"附件发布":hgwd001.getRemark().trim());
hgwd001a.setChangeStart("V".concat(hgwd001.getDocVersion()+"")); hgwd001a.setChangeStart("V".concat(hgwd001.getDocVersion()+""));
hgwd001a.setChangeEnd("V".concat(hgwd001.getDocVersion()+1+"")); hgwd001a.setChangeEnd("V".concat(hgwd001.getDocVersion()+1+""));
......
...@@ -21,7 +21,8 @@ ...@@ -21,7 +21,8 @@
PREVIEW_NUM as "previewNum", <!-- 预览次数 --> PREVIEW_NUM as "previewNum", <!-- 预览次数 -->
DOWNLOAD_NUM as "downloadNum", <!-- 下载次数 --> DOWNLOAD_NUM as "downloadNum", <!-- 下载次数 -->
DOC_VERSION as "docVersion", <!-- 文件版本号 --> DOC_VERSION as "docVersion", <!-- 文件版本号 -->
RELEASE_DATE as "releaseDate" <!-- 发布时间 --> RELEASE_DATE as "releaseDate", <!-- 发布时间 -->
OPER_STATUS as "operStatus"
</sql> </sql>
<sql id="condition"> <sql id="condition">
...@@ -62,6 +63,9 @@ ...@@ -62,6 +63,9 @@
<isNotEmpty prepend=" AND " property="deleteFlag"> <isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG in <iterate close=")" open="(" conjunction="," property="deleteFlag">#deleteFlag[]#</iterate> DELETE_FLAG in <iterate close=")" open="(" conjunction="," property="deleteFlag">#deleteFlag[]#</iterate>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="operStatus">
OPER_STATUS = #operStatus#
</isNotEmpty>
</sql> </sql>
<sql id="customCondition"> <sql id="customCondition">
...@@ -119,10 +123,11 @@ ...@@ -119,10 +123,11 @@
DOC_TYPE, <!-- 文件名称 --> DOC_TYPE, <!-- 文件名称 -->
STATUS, STATUS,
DOC_VERSION, DOC_VERSION,
RELEASE_DATE RELEASE_DATE,
OPER_STATUS
) VALUES ( ) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #bizType#, #bizId#, #docId#, #docName#, #docType#, #status#, #docVersion#, #releaseDate# #deleteFlag#, #bizType#, #bizId#, #docId#, #docName#, #docType#, #status#, #docVersion#, #releaseDate#, #operStatus#
) )
</insert> </insert>
...@@ -155,6 +160,7 @@ ...@@ -155,6 +160,7 @@
STATUS = #status#, STATUS = #status#,
DOC_VERSION = DOC_VERSION + 1, <!--版本号--> DOC_VERSION = DOC_VERSION + 1, <!--版本号-->
RELEASE_DATE = #releaseDate#, <!--发布时间--> RELEASE_DATE = #releaseDate#, <!--发布时间-->
OPER_STATUS = #operStatus#,
UPDATED_BY = #updatedBy#, <!-- 修改人 --> UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 --> UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime# <!-- 修改时间 --> UPDATED_TIME = #updatedTime# <!-- 修改时间 -->
...@@ -177,6 +183,7 @@ ...@@ -177,6 +183,7 @@
RELEASE_DATE = #releaseDate#, <!--发布时间--> RELEASE_DATE = #releaseDate#, <!--发布时间-->
DOC_VERSION = DOC_VERSION + 1, <!--版本号--> DOC_VERSION = DOC_VERSION + 1, <!--版本号-->
STATUS = #status#, <!-- 状态 --> STATUS = #status#, <!-- 状态 -->
OPER_STATUS = #operStatus#,
<include refid="SqlBase.updateRevise"/> <include refid="SqlBase.updateRevise"/>
WHERE ID = #id# WHERE ID = #id#
</update> </update>
......
...@@ -271,7 +271,7 @@ public class HGWDTools { ...@@ -271,7 +271,7 @@ public class HGWDTools {
if (Objects.nonNull(hgwd001)){ if (Objects.nonNull(hgwd001)){
List<HGWD003> listByFile = HGWDTools.HgWd003.listByFile(hgwd001.getFileId()); //获取文件下的权限人员 List<HGWD003> listByFile = HGWDTools.HgWd003.listByFile(hgwd001.getFileId()); //获取文件下的权限人员
HGPZ009 hgpz009 = HGPZTools.HgPz009.getByCode(hgwd001.getAccountCode()); //HGPZ009 hgpz009 = HGPZTools.HgPz009.getByCode(hgwd001.getAccountCode());
List<String> userIds = listByFile.stream().filter(item -> !item.getUserId().equals(UserSessionUtils.getUserId()) && item.getIsProjectManager() == 1) List<String> userIds = listByFile.stream().filter(item -> !item.getUserId().equals(UserSessionUtils.getUserId()) && item.getIsProjectManager() == 1)
.map(HGWD003::getExtId) .map(HGWD003::getExtId)
......
...@@ -403,60 +403,7 @@ $(function () { ...@@ -403,60 +403,7 @@ $(function () {
pageable: { pageable: {
pageSize: 20 pageSize: 20
}, },
dataBinding: function (e) {
var treeEname = $("#inqu_status-0-parentId").val();
for (let i = 0, length = e.items.length; i < length; i++) {
const model = e.items[i];
if (model.isNew()) {
e.preventDefault();
const orgId = $("#inqu_status-0-parentId").val();
if (orgId === "root" || orgId === "" || orgId == null) {
IPLAT.alert("请选择左侧组织机构组树节点后再进行新增");
} else {
const orgCnameValue = $("#inqu_status-0-fileName").val();
// 打开新增用户的弹窗
result1Grid.dataSource.page(1)
$("#insertUser").data("kendoWindow").open();
$("#insertUser_wnd_title").css({
"text-align": "justify",
"font-size": "14px",
"color": "#FFF"
});
$("#insertUser_wnd_title").html("正在为: [" + orgCnameValue + "] 添加成员用户");
}
model.parentId = treeEname;
}
}
},
loadComplete: function (grid) { loadComplete: function (grid) {
/**
* 为组织所属人员增加grid拖动至组织机构树事件
*/
grid.table.kendoDraggable({
filter: "tbody > tr",
group: "grid-tree",
hint: function (e) {
movedUser = resultGrid.dataSource.getByUid(e.data("uid"))
const text = e.context.innerText;
const attrs = text.split("\t");
let td =
"<td align='center' role='gridcell' id='fa fa-user'>" +
" <span class='fa fa-user'></span>" +
"</td>"
for (let attr of attrs) {
if (attr) {
let regex = new RegExp('\n', 'g');
let formattedAttr = attr.replace(regex, '');
td = td +
`<td align='center' role='gridcell'>` +
` <div className='i-validate-helper'>${formattedAttr}</div>` +
`</td>`
}
}
return $(`<div class="k-grid k-widget" style="pointer-events: none;border: #00bcff 1px solid"><table><tbody><tr>${td}</tr></tbody></table></div>`);
}
});
grid.dataSource.bind("requestEnd", function (e) { grid.dataSource.bind("requestEnd", function (e) {
if (e.type === "create" || e.type === "update" || e.type === "destroy") { if (e.type === "create" || e.type === "update" || e.type === "destroy") {
...@@ -481,40 +428,46 @@ $(function () { ...@@ -481,40 +428,46 @@ $(function () {
message("请先勾选要发布的数据!"); message("请先勾选要发布的数据!");
return; return;
} }
$.each(rows, function (i, row){ let status = rows.filter( row => row.status == 1);
if (row.status == 1){ if (status.length > 0){
message("选中的第"+(i+1)+"行\"已发布\",不能重复发布!"); message("选中的行\"已发布\",不能重复发布!");
flat = 0; flat = 0;
return; return;
} }
})
if (flat){ if (flat){
let parentId = IPLATUI.EFTree.categoryTree.selectTreeNode.fileId; let operStatus = rows.filter( row => row.operStatus == 1);
let inEiInfo = new EiInfo(); if (operStatus.length == 0){
inEiInfo.set("inqu_status-0-fileId", parentId); updateRelease(0);
$("#inqu_status-0-changeContent").val(''); }else {
//inEiInfo.set("inqu_status-0-isProjectManager", "1"); let parentId = IPLATUI.EFTree.categoryTree.selectTreeNode.fileId;
//inEiInfo.set("inqu_status-0-userId", $("#inqu_status-0-userId").val()); let inEiInfo = new EiInfo();
EiCommunicator.send("HGWD003", "query", inEiInfo, { inEiInfo.set("inqu_status-0-fileId", parentId);
onSuccess(ei) { $("#inqu_status-0-changeContent").val('');
if (!isBlank(ei.getBlock("result"))){ //inEiInfo.set("inqu_status-0-isProjectManager", "1");
let rows = ei.getBlock("result").getMappedRows(); //inEiInfo.set("inqu_status-0-userId", $("#inqu_status-0-userId").val());
if (rows.length <= 1){ EiCommunicator.send("HGWD003", "query", inEiInfo, {
message("文件未分配人员,请先分配人员!"); onSuccess(ei) {
return; if (!isBlank(ei.getBlock("result"))){
}else { let rows = ei.getBlock("result").getMappedRows();
$("#releaseWindow").data("kendoWindow").center() if (rows.length <= 1){
$("#releaseWindow").data("kendoWindow").open(); message("文件未分配人员,请先分配人员!");
return;
}else {
$("#releaseWindow").data("kendoWindow").center()
$("#releaseWindow").data("kendoWindow").open();
}
} }
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
} }
}, {
async: false
});
}
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
} }
}); });
//变更记录 //变更记录
...@@ -613,57 +566,6 @@ let refreshTree = function () { ...@@ -613,57 +566,6 @@ let refreshTree = function () {
selectTreeNode(tree, treeOrgId); selectTreeNode(tree, treeOrgId);
}, 500); }, 500);
} }
let movedUser;
let splitter;
/**
* 扩展信息查看
* @param e
*/
const user_ex_btn_func = (e) => {
const model = resultGrid.dataItem(e.closest("tr"));
const userId = model.id;
splitter.collapse(".k-pane:first")
splitter.expand(".k-pane:first")
const getNum = (str) => {
return parseFloat(str.slice(0, str.lastIndexOf('px')));
}
let leftPaneWidth = getNum($("#left-pane").css('width'))
const splitterWidth = 8;
let splitterLeft = getNum($(".k-splitbar").css('left'))
let rightPaneWidth = getNum($("#right-pane").css('width'))
let rightPaneLeft = getNum($("#right-pane").css('left'))
const totalWidth = leftPaneWidth + splitterWidth + rightPaneWidth;
const offset = totalWidth * 0.45 - leftPaneWidth;
leftPaneWidth += offset;
splitterLeft += offset;
rightPaneWidth -= offset;
rightPaneLeft += offset;
$("#left-pane").css('width', leftPaneWidth)
$(".k-splitbar").css('left', splitterLeft)
$("#right-pane").css('width', rightPaneWidth)
$("#right-pane").css('left', rightPaneLeft)
resultGrid.resize();
showUC(userId)
}
/**
* 显示抽屉组件
* @param uuid
*/
function showUC(uuid) {
var url = IPLATUI.CONTEXT_PATH + "/web/XS4100";
window.openDrawer(url, uuid);
}
/** /**
* 展开对应的树节点 * 展开对应的树节点
* @param tree * @param tree
...@@ -743,129 +645,6 @@ let setTreeNodeValue = function (nodeData) { ...@@ -743,129 +645,6 @@ let setTreeNodeValue = function (nodeData) {
} }
/** /**
* 非对称加密
* @param str
* @returns {string}
* @constructor
*/
function RSAEncrypt(str) {
// Encrypt with the public key...
var encrypt = new JSEncrypt();
encrypt.setPublicKey($('#__LOGIN_PUBLICKEY__').val());
return encrypt.encrypt(str);
}
/**
* 展示XS4100中的图片
* @param url
*/
function showXS4100Image(url) {
$("#showXS4100Image").attr("src", url);
$("#showXS4100ImageWindow").data("kendoWindow").center()
$("#showXS4100ImageWindow").data("kendoWindow").open()
return true;
}
/**
* 生成表头预览
*/
let tableHeader = [];
function showPreview() {
// 查询表头
let eiInfo = new EiInfo();
EiCommunicator.send("XSOG0801", "queryUserTableHeader", eiInfo, {
onSuccess: function (response) {
if (response.status > -1) {
// draw(response.get("cnameList"));
draw(response);
} else {
IPLAT.alert(response.getMsg());
}
}, onFail: function (errorMsg, status, e) { /* errorMsg 是平台格式化后的异常消息, status, e的含义和$.ajax的含义相同,请参考jQuery文档 */
console.log(errorMsg);
}
});
function draw(response) {
const currentTableHeader = response.get("cnameList");
const basicCount = response.get("basicCount");
const orgLevel = response.get("orgLevel");
if (JSON.stringify(tableHeader) === JSON.stringify(currentTableHeader)) {
return;
}
tableHeader = currentTableHeader;
let div = document.getElementById("excelTable");
div.innerHTML = "";
// 创建 table 元素并添加到 div 中
let table = document.createElement("table");
table.style.border = "1px solid black"; // 设置表格边框样式
div.appendChild(table);
// 创建表头行
let theadRow1 = document.createElement("tr");
table.appendChild(theadRow1);
for (let i = 0; i < currentTableHeader.length; i++) {
let th = document.createElement("th");
if (i < basicCount) {
th.textContent = '基础信息';
th.style.backgroundColor = "#99CCFF"; // 设置表头单元格边框样式
} else if (i < basicCount + 2 * orgLevel) {
th.textContent = '组织机构';
th.style.backgroundColor = "#CCFFCC"; // 设置表头单元格边框样式
} else {
th.textContent = '扩展信息';
th.style.backgroundColor = "#FFFF99"; // 设置表头单元格边框样式
}
th.style.border = "1px solid black"; // 设置表头单元格边框样式
th.style.padding = "4px";
theadRow1.appendChild(th);
}
// 创建表头行
let theadRow = document.createElement("tr");
table.appendChild(theadRow);
for (let i = 0; i < currentTableHeader.length; i++) {
let th = document.createElement("th");
th.textContent = `${currentTableHeader[i]}`;
th.style.border = "1px solid black"; // 设置表头单元格边框样式
th.style.padding = "4px";
theadRow.appendChild(th);
}
// 创建数据行
let rowData = [[], [], []];
for (let i = 0; i < currentTableHeader.length; i++) {
rowData[0].push(`数据1-${i + 1}`);
rowData[1].push(`数据2-${i + 1}`);
rowData[2].push(`数据3-${i + 1}`);
}
for (let i = 0; i < rowData.length; i++) {
let tr = document.createElement("tr"); // 创建行
table.appendChild(tr);
for (let j = 0; j < rowData[i].length; j++) {
let td = document.createElement("td"); // 创建单元格
td.textContent = rowData[i][j]; // 设置单元格内容
td.style.border = "1px solid black"; // 设置单元格边框样式
td.style.padding = "4px";
tr.appendChild(td);
}
}
}
}
/**
* 文件上传 * 文件上传
*/ */
function uploadFile() { function uploadFile() {
...@@ -963,17 +742,18 @@ function deleteFunc() { ...@@ -963,17 +742,18 @@ function deleteFunc() {
/** /**
* 发布 * 发布
*/ */
function updateRelease() { function updateRelease(operStatus) {
let rows = resultGrid.getCheckedRows(); let rows = resultGrid.getCheckedRows();
if (rows.length < 1) { if (rows.length < 1) {
message("请选择数据"); message("请选择数据");
return; return;
} }
let changeContent = $("#inqu_status-0-changeContent").val(); let changeContent = $("#inqu_status-0-changeContent").val();
if (isBlank(changeContent)){ if (isBlank(operStatus) && isBlank(changeContent)){
message("请输入变更内容"); message("请输入变更内容");
return; return;
} }
let inEiInfo = new EiInfo(); let inEiInfo = new EiInfo();
inEiInfo.addBlock(JSUtils.checkedRows2Block("result")); inEiInfo.addBlock(JSUtils.checkedRows2Block("result"));
inEiInfo.set("inqu_status-0-changeContent", changeContent); inEiInfo.set("inqu_status-0-changeContent", changeContent);
...@@ -1050,12 +830,10 @@ function changeResord() { ...@@ -1050,12 +830,10 @@ function changeResord() {
} }
JSColorbox.open({ JSColorbox.open({
href: "HGWD001A?methodName=initLoad&inqu_status-0-bizType=WD" + href: "HGWD001A?methodName=initLoad&inqu_status-0-bizType=WD" +
"&inqu_status-0-projCode=" + $("#inqu_status-0-parentId").val()+"" + "&inqu_status-0-projCode=" + $("#inqu_status-0-parentId").val()+"&efParentFormEname=HGWD001",
"&inqu_status-0-projName=" + $("#inqu_status-0-fileName").val() +
"&efParentFormEname=HGWD001",
title: "<div style='text-align: center;'>变更记录</div>", title: "<div style='text-align: center;'>变更记录</div>",
width: "80%", width: "80%",
height: "80%" height: "80%",
}); });
} }
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
<EF:EFColumn ename="docId" cname="文件ID" enable="false" width="180" hidden="true"/> <EF:EFColumn ename="docId" cname="文件ID" enable="false" width="180" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" enable="false" width="140" align="center"/> <EF:EFColumn ename="operator" cname="操作" enable="false" width="140" align="center"/>
<EF:EFColumn ename="docName" cname="文件名称" enable="false" width="180"/> <EF:EFColumn ename="docName" cname="文件名称" enable="false" width="180"/>
<EF:EFColumn ename="docType" cname="文件类型" enable="false" width="110"/> <EF:EFColumn ename="docType" cname="文件类型" enable="false" width="110" align="center"/>
<EF:EFComboColumn ename="status" cname="状态" enable="false" width="100" align="center" <EF:EFComboColumn ename="status" cname="状态" enable="false" width="100" align="center"
defaultValue="0" hidden="false"> defaultValue="0" hidden="false">
<EF:EFCodeOption codeName="hggp.hgwd.status"/> <EF:EFCodeOption codeName="hggp.hgwd.status"/>
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
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="companyName" cname="项目名称" width="160" enable="true" readonly="true" align="center" <EF:EFColumn ename="companyName" cname="公司名称" width="160" enable="true" readonly="true" align="center"
required="true" hidden="true"/> required="true" hidden="true"/>
<EF:EFComboColumn ename="projCode" cname="项目名称" blockName="proj_record_block_id" <EF:EFComboColumn ename="projCode" cname="项目名称" blockName="proj_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#" columnTemplate="#=textField#" itemTemplate="#=textField#"
......
...@@ -24,8 +24,10 @@ ...@@ -24,8 +24,10 @@
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="projCode" cname="项目编码" type="hidden" colWidth="3"/> <EF:EFSelect blockId="inqu_status" row="0" ename="projCode" cname="项目名称" colWidth="3" filter="contains" readonly="true">
<EF:EFInput blockId="inqu_status" row="0" ename="projName" cname="项目名称" placeholder="模糊查询" colWidth="3" readonly="true"/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="proj_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect blockId="inqu_status" row="0" ename="changeType" cname="变更类型" colWidth="3" filter="contains"> <EF:EFSelect blockId="inqu_status" row="0" ename="changeType" cname="变更类型" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hgwd.changeType"/> <EF:EFCodeOption codeName="hggp.hgwd.changeType"/>
......
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