/***** * 移动端附件信息显示使用的JS方法 */ mui.init(); /** * 附件信息初始化 * @param {any} frmData 主表表单集合 * @param {any} gf 分组信息 * @param {any} isZDMobile 是否折叠 * @param {any} dtlData 从表表单信息 * @param {any} type 类别 0 主表 1从表 * @param {any} refPKVal */ function InitAth(frmData, gf, isZDMobile, dtlData, type, refPKVal) { dtlData = dtlData || {}; type = type || 0; refPKVal = refPKVal || pageData.WorkID; var aths = frmData.Sys_FrmAttachment; var ath; if (type == 0) { $.each(frmData.Sys_FrmAttachment, function (i, item) { if (item.MyPK == gf.CtrlID) { ath = item; return false; } }) } if (type == 1) { $.each(dtlData.Sys_FrmAttachment, function (i, item) { if (item.MyPK == gf.CtrlID) { ath = item; return false; } }) } if (ath == null || ath == undefined) return ""; var isShowMobile = GetPara(ath.AtPara, "IsShowMobile")||"1"; if (isShowMobile == "0") return ""; //判断是否设置了附件权限 var attrMyPK = ath.MyPK; if (frmData.WF_Node != null && frmData.WF_Node != undefined) { var node = frmData.WF_Node[0]; var frmNode = frmData["WF_FrmNode"]; if (frmNode != null && (node.FormType == 11 || node.FormType == 5 || (frmData.WF_Flow != undefined && frmData.WF_Flow[0].FlowDevModel == 1))) { frmNode = frmNode[0]; if (frmNode.FrmSln == 1) { pageData.IsReadOnly = 1; } //自定义权限 if (frmNode.FrmSln == 2) { var myPK = ath.MyPK + "_" + node.NodeID; if (type == 1) myPK = ath.FK_MapData + "_" + node.NodeID + "_AthMDtl"; var nodeAth = new Entity("BP.Sys.FrmAttachment"); nodeAth.SetPKVal(myPK); var count = nodeAth.RetrieveFromDBSources(); if (count != 0) { ath = nodeAth; } } } } var athDBs = []; if (type == 1 || dtlData) athDBs = dtlData.Sys_FrmAttachmentDB; else athDBs = frmData.Sys_FrmAttachmentDB; if (ath.IsVisable == false && type == 0) { if (GetPara(ath.AtPara, "IsShowMobile") == "1") { //说明这是字段附件,根据字段的属性设置 var attr = GetMapAttr(attrMyPK); if (attr != undefined && attr.UIVisible == 0) return ""; } else return ""; } var html = ""; if (isZDMobile == false) { html += "