Ext.Ajax请求

js:

var Department = document . getElementById ( "Department" ) . value ;
// alert(Department);
var url = "/bpm/app.nsf/WF_RunRule?openagent&RuleNum=RUC0003_01&Department=" + Department ;


Ext . onReady ( function ( ) {

Ext . Ajax . request ( {
method : 'POST' ,
url : url ,
success : function ( reps ) {


var data = Ext . util . JSON . decode ( reps . responseText ) ;

var EBS_Department = document . getElementById ( "EBS_Department" ) ;
var EBS_ID = document . getElementById ( "EBS_ID" ) ;
var EBS_OU_ID = document . getElementById ( "EBS_OU_ID" ) ;


EBS_Department . value = data [ 0 ] . EBS_Department_Name ;
EBS_ID . value = data [ 0 ] . EBS_Department_ID ;
EBS_OU_ID . value = data [ 0 ] . EBS_OU_ID ;

}

} ) ;

});

-----------------------------------------------------------------------------------------------------------------------------------------------------------------

规则:

Sub Initialize
    On Error Goto errormsg
           '表单最后保存时执行LotusScript代码  
         msgbox "连接上了..."
          dim  sql as string,fldLst as new lcfieldList  
          dim doc  as notesdocument  
         
          dim EBS_Department_Name  as string
          dim EBS_Department_ID as string
          dim EBS_OU_NAME as string
          dim Department as string
          dim EBS_OU_ID as string
         Department=WF_Document.Department(0)
         msgbox "Department="+Department
          sql=|select EBS_Department_Name,EBS_Department_ID,EBS_OU_NAME,EBS_OU_ID from OA_EBS_Department where OA_Department_Name='|+Department+|'|
        
         msgbox "SQL="+sql
         call rdb.connect()  
          
         call WF_Con.Execute(sql,fldLst)  
                 
     while WF_Con.fetch(fldLst)>0
                 EBS_Department_Name=fldLst.lookup("EBS_Department_Name").text(0)
                 EBS_Department_ID=fldLst.lookup("EBS_Department_ID").text(0)
                 EBS_OU_NAME=fldLst.lookup("EBS_OU_NAME").text(0)
                 EBS_OU_ID=fldLst.lookup("EBS_OU_ID").text(0)
             
      msgbox "EBS_OU_NAME="+EBS_OU_NAME
      msgbox "EBS_Department_Name="+ EBS_Department_Name
     msgbox "EBS_Department_ID="+EBS_Department_ID
      
                 
        'json = json + |{"serialno":"|+fldLst.lookup("bm).text(0)+|"},|
 
      
          
    '  json = json + "{'serialno':'"+fldLst.lookup("bm").text(0)+"'},"
     ' json = json + "{'serialno':'"+bb+"'},"
     
     ' json = json + "{'serialno':'["+bb+"'},]"+"{'Sponsors':'"+ee+"'},"
         
      
     ' json = json + "{'serialno':'["+bb+"'},]"+"{'Sponsors':'"+ee+"'},"
 
       json = json + |{"EBS_Department_Name":"|+EBS_Department_Name+|",|
       
        json = json + |"EBS_Department_ID":"|+EBS_Department_ID+|",|
        
        json = json + |"EBS_OU_ID":"|+EBS_OU_ID+|",|        
        json = json + |"EBS_OU_NAME":"|+EBS_OU_NAME+|"},|
        
            
     
        
         
     wend
            
       json = |[|+left(json,len(json)-1) +|]|
    
    print "content-type:application/text;charset=utf-8"   
       msgbox "lsy="+json
        
           print json
        Exit Sub
errormsg:
    Msgbox "Rule Error:" & Str(Erl) & "  " & Error
End Sub

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值