function Running_InitPage(doType) { var _drafhtml = ""; var _runhtml = ""; var _comhtml = ""; //获取我发起的流程的草稿、在途、已完成数据 var handler = new HttpHandler("BP.Cloud.HttpHandler.CCMobilePortal"); var data = handler.DoMethodReturnString("GetMyStartGenerWorks"); var pushData = cceval('(' + data + ')'); //草稿数据 var Draflist = pushData.Draflist; //处理中数据 var Running = pushData.Running; //已完成数据 var Complete = pushData.Complete; if (Running.length <= 0) { _runhtml += "
"; _runhtml += ""; _runhtml += "暂无数据"; _runhtml += "
"; $("#item_my_runningData").html(_runhtml); } else { //填充在途信息 $.each(Running, function (i, t) { _runhtml += "
"; _runhtml += "
"+t.FlowName+"
"; _runhtml += "
"; _runhtml += "
"; _runhtml += "
"; _runhtml += t.Title + "
"; _runhtml += "
"; _runhtml += "
"; _runhtml += "
发起人:" + t.StarterName + "
"; _runhtml += "
发起时间:" + t.RDT + "
"; _runhtml += "
"; }); $("#item_my_runningData").html(_runhtml); } if (Complete.length <= 0) { _comhtml += "
"; _comhtml += ""; _comhtml += "暂无数据"; _comhtml += "
"; $("#item_my_completeData").html(_comhtml); } else { //填充已完成信息 $.each(Complete, function (i, t) { _comhtml += "
"; _comhtml += "
" + t.FlowName +"
"; _comhtml += "
"; _comhtml += "
"; _comhtml += "
"; _comhtml += t.Title + "
"; _comhtml += "
"; _comhtml += "
"; _comhtml += "
发起人:" + t.StarterName + "
"; _comhtml += "
发起时间:" + t.RDT + "
"; _comhtml += "
"; }); $("#item_my_completeData").html(_comhtml); } if (Draflist.length <= 0) { _drafhtml += "
"; _drafhtml += ""; _drafhtml += "暂无数据"; _drafhtml += "
"; $("#item_my_draflistData").html(_drafhtml); } else { //填充草稿信息 $.each(Draflist, function (i, t) { _drafhtml += "
"; _drafhtml += "
" + t.FlowName +"
"; _drafhtml += "
"; _drafhtml += "
"; _drafhtml += "
"; _drafhtml += t.Title + "
"; _drafhtml += "
"; _drafhtml += "
"; // _drafhtml += "
发起人:" + t.StarterName + "
"; _drafhtml += "
申请时间:" + t.RDT + "
"; _drafhtml += "
"; }); $("#item_my_draflistData").html(_drafhtml); } //如果是在途 if (doType == "Running") { //设置选中 $("#myRunning").addClass("mui-active"); //显示在途相关item $("#item_my_running").addClass("mui-active"); //隐藏其他内容 $("#draflist").removeClass("mui-active"); $("#item_my_draflist").removeClass("mui-active") $("#myComplete").removeClass("mui-active"); $("#item_my_complete").removeClass("mui-active"); }//如果是已完成 else if (doType == "Complete") { //隐藏待办、在途 $("#myRunning").removeClass("mui-active"); $("#item_my_running").removeClass("mui-active"); $("#draflist").removeClass("mui-active"); $("#item_my_draflist").removeClass("mui-active"); //显示已完成 $("#myComplete").addClass("mui-active"); //显示已完成内容 $("#item_my_complete").addClass("mui-active"); } else {//如果是待办 $("#myRunning").removeClass("mui-active"); $("#item_my_running").removeClass("mui-active"); //显示草稿 $("#draflist").addClass("mui-active"); //显示草稿内容 $("#item_my_draflist").addClass("mui-active"); $("#myComplete").removeClass("mui-active"); $("#item_my_complete").removeClass("mui-active"); } //绑定点击事件 var boxs = $(".box"); $.each(boxs, function (i, box) { var divId = $(box).attr("id"); //将ID值进行分解 var vals = divId.split('_'); //WorkID var oid = vals[0]; //流程编号 var fk_flow = vals[1]; //流程处理状态 var type = vals[2]; //节点编号 var fk_node = vals[3]; //fid var fid = vals[4]; if (type == "Draf") { $("#" + divId).on("tap", function () { var url = "../CCMobile/MyFlow.htm?FK_Flow=" + fk_flow + "&WorkID=" + oid + "&FK_Node=" + fk_node + "&FID=" + fid + "&MyFlowFrom=Draf" + "&m=" + Math.random(); SetHref(url); }); } else { $("#" + divId).on("tap", function () { var url = "../CCMobile/MyView.htm?FK_Flow=" + fk_flow + "&WorkID=" + oid + "&FK_Node=" + fk_node + "&FID=" + fid + "&MyViewFrom=" + type + "&IsReadonly=1&m=" + Math.random(); SetHref(url); }); } }); }