将自己新增的lm_SysScript.js 文件放到D:\JINHER\C6\Jhsoft.Web.module\fceform\js 目录,内容如下。
function detail22()
{
var ss="";
var id=dataset1.Fields.Field['mainid'].Value;
var flag='0';
var sql1="select top 1 app_id,appt_id from jhoa_approve where appo_values='"+id+"'order by app_id desc";
var appid="";
var apptid="";
var xmlResult=SelectSql(sql1,1,-1);
var oXml=SetDom(xmlResult);
if(oXml.documentElement.xml!="<root></root>")
{
appid=oXml.documentElement.childNodes(0).childNodes(0).text;
apptid=oXml.documentElement.childNodes(0).childNodes(1).text;
}
var url2="../../fceform/common/djframe.htm?djsn=xjqzklld_e446e2e5-a597-4d33-a83d-fea968472f37&djtype=TT&DjName=新疆气瓶库领料单1&opentype=2&ModuleID=xjqzklld_e446e2e5-a597-4d33-a83d-fea968472f37&IsNew=1&OperatorTypeWFHsh=FS&httpAppID="+appid+"&httpOID=0¶value="+id+"&_FlowTemplateID="+apptid;
window.showModalDialog(url2,ss,"DialogLeft:170px;DialogTop:120px;DialogWidth:850px;DialogHeight:600px;status:no;help:no");
}
function yk_detail()
{
var ss="";
//var id=dataset1.Fields.Field['mainid'].Value;
var id=datasetsub.Fields.Field['ID'].Value;
var flag='0';
var sql1="select top 1 app_id,appt_id from jhoa_approve where appo_values='"+id+"'order by app_id desc";
var appid="";
var apptid="";
var xmlResult=SelectSql(sql1,1,-1);
var oXml=SetDom(xmlResult);
if(oXml.documentElement.xml!="<root></root>")
{
appid=oXml.documentElement.childNodes(0).childNodes(0).text;
apptid=oXml.documentElement.childNodes(0).childNodes(1).text;
}
var url2="../../fceform/common/djframe.htm?djsn=yksqd_b50f2a9b-5338-4675-b855-9129eb246c46&djtype=TT&DjName=用款申请单&opentype=2&ModuleID=yksqd_b50f2a9b-5338-4675-b855-9129eb246c46&IsNew=1&OperatorTypeWFHsh=FS&httpAppID="+appid+"&httpOID=0¶value="+id+"&_FlowTemplateID="+apptid;
window.showModalDialog(url2,ss,"DialogLeft:170px;DialogTop:120px;DialogWidth:850px;DialogHeight:600px;status:no;help:no");
}
//注:grid单元格需可选中。以上用到的是查询页的DS与主键。表单DS中的sql可以是整理后的一张表。