Ext调用规则返回json数据到页面
来源:互联网 发布:ocr身份证识别软件 编辑:程序博客网 时间:2024/06/06 04:20
var store,grid;
Ext.onReady(function(){
var url="WF_RunRule?openagent&RuleNum=RUK001_005";
store =new Ext.data.JsonStore({
url:url,
root:'root',
fields:['FEEDBACK_ID','FEEDBACK_NUM','DEPT_NAME','SUBMITED_EMP','STAGE_CODE','SOURCE_CODE','EMERGENCY_LEVEL','CONTACT_EMP','CONTACTER_NUMBER','FEEDBACK_DATE','REQUIRE_COMPLETE_DATE']
});
store.load();
var cm= new Ext.grid.ColumnModel([
new Ext.grid.RowNumberer(),
{header:"反馈单编号",dataIndex:'FEEDBACK_NUM',sortable:true},
{header:"提交部门",dataIndex:'DEPT_NAME',sortable:true},
{header:"提交人",dataIndex:'SUBMITED_EMP',sortable:true},
{header:"产生环节",dataIndex:'STAGE_CODE',sortable:true},
{header:"来源类型",dataIndex:'SOURCE_CODE',sortable:true},
{header:"紧急程度",dataIndex:'EMERGENCY_LEVEL',width:120},
{header:"问题联系人",dataIndex:'CONTACT_EMP',sortable:true,width:120},
{header:"联系电话",dataIndex:'CONTACTER_NUMBER',sortable:true,width:120},
{header:"反馈时间",dataIndex:'FEEDBACK_DATE',sortable:true},
{header:"要求解决时间",dataIndex:'REQUIRE_COMPLETE_DATE',sortable:true},
{header:"headid",dataIndex:'FEEDBACK_ID',sortable:true,hidden:true},
{header:"操作",dataIndex:'',renderer:function(){return"<input type='button' value='启动流程' onclick='redirectToDoingPage()'>";}}
]);
var pagingBar= new Ext.PagingToolbar({displayMsg:'当前显示 {0} - {1} 总计 {2}',emptyMsg:"未找到符合条件的文档",pageSize:30,store:store,displayInfo:true});
grid =new Ext.grid.GridPanel({
store:store,
cm:cm,
bbar:pagingBar,
width:document.body.clientWidth,
height:document.body.clientHeight
});
var vp= new Ext.Viewport({
layout:'border',
items:[{region:'center',items:[grid]}],
renderTo:Ext.getDom("grid")
});
})
function redirectToDoingPage(){
var id=grid.getSelectionModel().getSelected().id;
var kid=store.getById(id).get("FEEDBACK_ID");
var url= "/bpm/linkey_workflow_engine.nsf/workflow_doc?readform&WF_ProcessUNID=01337B82B1F244CE48257C8A002B0C26&kyid="+kid;
window.location.href=url;
//window.location.href="/bpm/linkey_workflow_engine.nsf/workflow_doc?readform&WF_ProcessUNID=FF5978D4F51D6CA348257C89000D707B&kyid="+kid;
// window.open(url,'left=0,top=0,width='+ (screen.availWidth - 10) +',height='+ (screen.availHeight-50) +',scrollbars,resizable=yes,toolbar=no');
}
function params(paras){
var url =location.href;
var paraString = url.substring(url.indexOf("?")+1,url.length).split("&");
var paraObj ={}
for (i=0;j=paraString[i];i++){
paraObj[j.substring(0,j.indexOf("=")).toLowerCase()]= j.substring(j.indexOf("=")+1,j.length);
}
var returnValue = paraObj[paras.toLowerCase()];
if(typeof(returnValue)=="undefined"){
return "";
}else{
return returnValue;
}
}
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
RUK001_005规则
Sub Initialize
On Error Goto errormsg
Dim mycon As Lcconnection
Dim fldLst As New lcfieldList
Dim sql As String
Dim json As String
Set mycon= New LCConnection("oracle")
mycon.server="ERPDEV"
mycon.UserID="apps"
mycon.Password="apps"
mycon.Connect
Dim Parms As New Lcfieldlist
Dim Parm As LCField
sql=|SELECT FEEDBACK_ID,FEEDBACK_NUM,DEPT_NAME,SUBMITED_EMP,STAGE_CODE,SOURCE_CODE,CONTACT_EMP,CONTACTER_NUMBER,FEEDBACK_DATE FROM CUX_SVC_FEEDBACKS_V WHERE (rownum<5) |
Set Parm = Parms.Append ("p_appl_short_name", LCTYPE_TEXT)
Parm.text = "CUX"
mycon.Procedure="mo_global.init"
Call mycon.Call (Parms, 1, Nothing)
mycon.Procedure=""
call mycon.Execute ( sql ,fldLst )
while mycon.fetch(fldLst)
json = json + |{"FEEDBACK_NUM":"|+fldLst.lookup("FEEDBACK_NUM").text(0)+|",|
json = json + |"FEEDBACK_ID":"|+fldLst.lookup("FEEDBACK_ID").text(0)+|",|
json = json + |"DEPT_NAME":"|+fldLst.lookup("DEPT_NAME").text(0)+|",|
json = json + |"SUBMITED_EMP":"|+fldLst.lookup("SUBMITED_EMP").text(0)+|",|
json = json + |"STAGE_CODE":"|+fldLst.lookup("STAGE_CODE").text(0)+|",|
json = json + |"SOURCE_CODE":"|+fldLst.lookup("SOURCE_CODE").text(0)+|",|
'json = json + |"EMERGENCY_LEVEL":"|+fldLst.lookup("EMERGENCY_LEVEL").text(0)+|",|
json = json + |"CONTACT_EMP":"|+fldLst.lookup("CONTACT_EMP").text(0)+|",|
json = json + |"CONTACTER_NUMBER":"|+fldLst.lookup("CONTACTER_NUMBER").text(0)+|",|
json = json + |"FEEDBACK_DATE":"|+fldLst.lookup("FEEDBACK_DATE").text(0)+|"},|
wend
json = |{"root":[|+left(json,len(json)-1) +|]}|
print "content-type:application/text;charset=utf-8"
print json
Call mycon.disconnect()
Exit Sub
errormsg:
Msgbox "Rule Error:" & Str(Erl) & " " & Error
End Sub
- Ext调用规则返回json数据到页面
- extjs 中formPanel提交到action后返回json数据到ext中,但是ext页面不进入sucess也不进入failure
- ssh 中 jquery ajax 调用action返回的json数据并传递到页面
- Ajax调用查看页面的后台返回json格式数据
- jsp通过jQuery返回json数据到页面
- 返回json对象到页面
- JSP页面返回JSON数据
- 如何利用POST数据到web页面接口(包括调用页面发送json数据和页面后台接受json数据)
- 返回JSON数据到客户端
- ajax请求数据,Json返回到页面的数据出现中文乱码问题。
- EXT4提交表单到struts2返回json数据并跳转页面
- 关于页面请求返回json数据问题
- jsp文件返回json数据时ext无法接收
- Ext返回json数据的中文为乱码
- Ext返回json数据的中文为乱码
- jQuery调用WebService返回JSON数据
- jQuery Ajax调用WebService返回JSON数据
- jQuery调用WebService返回JSON数据
- console.log的坑
- 张孝祥整理的JAVA面试题目(五)(每天一更)
- Android 中动态替换string.xml的值
- 入门篇:yum安装Linux+Apache+PHP+MySQL服务器环境(CentOS篇)
- Libjingle综述
- Ext调用规则返回json数据到页面
- 单片机的几种寻址方式
- linux下逐级创建目录
- little-endian与big-endian
- makefile
- Oracle存储过程记录
- 张孝祥整理的JAVA面试题目(六)(每天一更)
- 中星微ZC301P摄像头驱动支持
- 继续理解socekt具体使用--2