判断工艺卡与技术协议审批附件中下载,附件上移下移只刷新附件组件

master
孙亮 5 months ago
parent 138fc3a8ac
commit 293242cf3c

@ -369,8 +369,8 @@ function FileShowWayTable(athDesc, dbs, uploadUrl) {
//⑦操作列的增加.
_html += "<td style='text-align: center;'class='operate'>";
if (athDesc.IsIdx == 1 && athDesc.IsReadonly != 1) {
_html += "<a href=\"javascript:GFDoUp('" + db.MyPK + "' )\">上移</a >";
_html += "<a href=\"javascript:GFDoDown('" + db.MyPK + "');\">下移</a >";
_html += "<a href=\"javascript:GFDoUp('" + db.MyPK + "','" + athDesc.MyPK + "' )\">上移</a >";
_html += "<a href=\"javascript:GFDoDown('" + db.MyPK + "','" + athDesc.MyPK + "');\">下移</a >";
}
if (athDesc.IsChangeFileName == 1 && athDesc.IsReadonly != 1) {
_html += "<a href=\"javascript:ChangeFileName('" + db.MyPK + "' )\">修改文件名</a >";
@ -473,23 +473,25 @@ function FileShowWayTable(athDesc, dbs, uploadUrl) {
}
// 向上移动.
function GFDoUp(mypk) {
function GFDoUp(mypk, fk_framAttachment) {
var en = new Entity("BP.Sys.FrmAttachmentDB", mypk);
var data = en.DoMethodReturnString("DoUpTabIdx");
if (data.indexOf('err@') != -1)
alert(data);
Reload();
InitAthPage("Div_" + fk_framAttachment);
AthTable_Init(fk_framAttachment, "Div_" + fk_framAttachment, pageData.WorkID);
//Reload();
}
//向下移动.
function GFDoDown(mypk) {
function GFDoDown(mypk, fk_framAttachment) {
var en = new Entity("BP.Sys.FrmAttachmentDB", mypk);
var data = en.DoMethodReturnString("DoDownTabIdx");
if (data.indexOf('err@') != -1)
alert(data);
Reload();
InitAthPage("Div_" + fk_framAttachment);
AthTable_Init(fk_framAttachment, "Div_" + fk_framAttachment, pageData.WorkID);
//Reload();
}
// 修改文件名.
@ -579,8 +581,6 @@ function GetFileStream(mypk, FK_FrmAttachment) {
* @param MyPK 上传附件数据的信息主键
*/
function Down2018(mypk) {
debugger
var nodeID = GetQueryString("FK_Node");
var workID = GetQueryString("WorkID");
@ -591,8 +591,9 @@ function Down2018(mypk) {
handler.AddPara("FK_Node", nodeID);
handler.AddPara("MyPK", mypk);
var fileUrl = handler.DoMethodReturnString("AttachmentUpload_Down");
if (typeof fileUrl === "string" && fileUrl.startsWith("/DataUser/")) {
window.open(window.location.origin + fileUrl);
if (typeof fileUrl === "string" && fileUrl.indexOf("/DataUser/") !=-1 && fileUrl.indexOf("url@") == 0) {
var url = fileUrl.replace("url@", "");
window.open(window.location.origin + url);
return;
}
SetHref(basePath + "/WF/Comm/ProcessRequest?DoType=HttpHandler&DoMethod=AttachmentUpload_Down&HttpHandlerName=BP.WF.HttpHandler.WF_CCForm&WorkID=" + workID + "&FK_Node=" + nodeID + "&MyPK=" + mypk);

@ -247,6 +247,9 @@
<remove name="ChartImageHandler" />
<add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</handlers>
<security>
<requestFiltering allowDoubleEscaping="true" />
</security>
</system.webServer>
<!--禁用Mime嗅探-->
<system.webServer>

@ -4947,18 +4947,18 @@ namespace BP.WF.HttpHandler
char[] c = input.ToCharArray();
for (int i = 0; i < c.Length; i++)
{
if (c[i] == 12288)
{
c[i] = (char)32;
continue;
}
//if (c[i] == 12288)
//{
// c[i] = (char)32;
// continue;
//}
if (c[i] == 160)
{
c[i] = (char)32;
continue;
}
if (c[i] > 65280 && c[i] < 65375)
c[i] = (char)(c[i] - 65248);
//if (c[i] > 65280 && c[i] < 65375)
// c[i] = (char)(c[i] - 65248);
}
string s = new string(c);
return s;
@ -5705,13 +5705,22 @@ namespace BP.WF.HttpHandler
}
else
{
filepath = downDB.FileFullName;
//表单类别区别打印@BKGY
MapData mp = new MapData(downDB.FrmID);
string[] flowAttr = { "37f23552-7", "a25d959b-7", "b12f75b4-b" };
if (Array.IndexOf(flowAttr, mp.FormTreeNo) >= 0)
{
int splitStartIndex = filepath.IndexOf("DataUser/");
string filePath = filepath.Substring(0, filepath.LastIndexOf('/') + 1);
filepath = filePath + downDB.FileName;
if (splitStartIndex > -1)
{
return "/" + filepath.Substring(splitStartIndex);
return "url@/" + filepath.Substring(splitStartIndex);
}
//return filepath;
return filepath;
}
filepath = downDB.FileFullName;
}
#endregion
}

Loading…
Cancel
Save