Commit a69d7b85 by liuyang

1.修复文档库批量上传出现文件路径不一致bug

parent 4bf77a0a
...@@ -733,9 +733,11 @@ function uploadFile() { ...@@ -733,9 +733,11 @@ function uploadFile() {
message("当前节点不可上传附件!"); message("当前节点不可上传附件!");
return; return;
} }
let filePath = IPLATUI.EFTree.categoryTree.selectTreeNode.filePath;
JSColorbox.open({ JSColorbox.open({
href: "HGWD099A?methodName=initLoad&inqu_status-0-bizType=WD" + href: "HGWD099A?methodName=initLoad&inqu_status-0-bizType=WD" +
"&inqu_status-0-bizId="+$("#inqu_status-0-parentId").val()+"" + "&inqu_status-0-bizId="+$("#inqu_status-0-parentId").val()+"" +
"&inqu_status-0-filePath="+filePath+"" +
"&inqu_status-0-operType=add" + "&inqu_status-0-operType=add" +
"&efParentFormEname=HGWD001", "&efParentFormEname=HGWD001",
title: "<div style='text-align: center;'>附件上传</div>", title: "<div style='text-align: center;'>附件上传</div>",
...@@ -798,26 +800,25 @@ function uploadFileCallback(data) { ...@@ -798,26 +800,25 @@ function uploadFileCallback(data) {
inEiInfo.set("result-0-ndocId", data.ndocId); inEiInfo.set("result-0-ndocId", data.ndocId);
inEiInfo.set("inqu_status-0-fileId", data.bizId); inEiInfo.set("inqu_status-0-fileId", data.bizId);
inEiInfo.set("result-0-changeContent", data.changeContent); inEiInfo.set("result-0-changeContent", data.changeContent);
inEiInfo.set("result-0-filePath", IPLATUI.EFTree.categoryTree.selectTreeNode.filePath); inEiInfo.set("result-0-filePath", data.filePath);
let serviceName = data.operType == "add" ? "HGWD099" : "HGWD001"; let serviceName = data.operType == "add" ? "HGWD099" : "HGWD001";
let methodName = data.operType == "add" ? "insert" : "updateFile"; let methodName = data.operType == "add" ? "insert" : "updateFile";
EiCommunicator.send(serviceName, methodName, inEiInfo, { EiCommunicator.send(serviceName, methodName, inEiInfo, {
onSuccess(response) { onSuccess(response) {
if (response.getStatus() == 1){ if (response.getStatus() == -1){
NotificationUtil(ei, "error"); NotificationUtil(response, "error");
}else { }else {
JSColorbox.close(); JSColorbox.close();
resultGrid.dataSource.page(1); resultGrid.dataSource.page(1);
editCallback(); editCallback(data.bizId);
} }
}, },
onFail(errorMessage, status, e) { onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error"); NotificationUtil("执行失败!", "error");
} }
}, { }, {
async: false async: true
}); });
} }
......
...@@ -9,11 +9,12 @@ $(function () { ...@@ -9,11 +9,12 @@ $(function () {
return; return;
} }
$("#fileDocId").val(docId); $("#fileDocId").val(docId);
NotificationUtil("附件上传成功"); //NotificationUtil("附件上传成功");
var matId = $("#inqu_status-0-bizId").val(); var matId = $("#inqu_status-0-bizId").val();
var bizType = $("#inqu_status-0-bizType").val(); var bizType = $("#inqu_status-0-bizType").val();
var operType = $("#inqu_status-0-operType").val(); var operType = $("#inqu_status-0-operType").val();
var ndocId = $("#inqu_status-0-ndocId").val(); var ndocId = $("#inqu_status-0-ndocId").val();
var filePath = $("#inqu_status-0-filePath").val();
var typeIndex = e.response.docName.lastIndexOf("."); var typeIndex = e.response.docName.lastIndexOf(".");
var type = typeIndex == -1 ? e.response.docType : e.response.docName.substring(typeIndex); var type = typeIndex == -1 ? e.response.docType : e.response.docName.substring(typeIndex);
var data = { var data = {
...@@ -23,7 +24,8 @@ $(function () { ...@@ -23,7 +24,8 @@ $(function () {
bizId: matId, bizId: matId,
bizType: bizType, bizType: bizType,
operType: operType, operType: operType,
ndocId: ndocId ndocId: ndocId,
filePath: filePath
} }
// saveTemp(e); // saveTemp(e);
try { try {
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
<EF:EFInput cname="文件ID" ename="ndocId" blockId="inqu_status" row="0" type="hidden"/> <EF:EFInput cname="文件ID" ename="ndocId" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFInput cname="操作类型" ename="operType" blockId="inqu_status" row="0" type="hidden"/> <EF:EFInput cname="操作类型" ename="operType" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFInput cname="业务类型" ename="bizType" blockId="inqu_status" row="0" type="hidden"/> <EF:EFInput cname="业务类型" ename="bizType" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFInput cname="文件路径" ename="filePath" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFRegion id="result"> <EF:EFRegion id="result">
<EF:EFUpload blockId="result" ename="uploadFile" docTag="wd_file" path="upload"/> <EF:EFUpload blockId="result" ename="uploadFile" docTag="wd_file" path="upload"/>
</EF:EFRegion> </EF:EFRegion>
......
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