This commit is contained in:
zhouyahui 2018-07-27 20:12:42 +08:00
commit bd03cffbc4
14 changed files with 431 additions and 321 deletions

View File

@ -1,196 +1,204 @@
<%@page import="com.amarsoft.are.jbo.ql.Parser"%>
<%@page import="com.amarsoft.biz.workflow.*"%>
<%@page import="com.amarsoft.app.flow.*"%>
<%@page import="com.tenwa.flow.task.*"%>
<%@page import="com.amarsoft.are.lang.StringX"%>
<%@include file="/Frame/resources/include/include_begin.jspf"%>
<%@include file="/Tenwa/Core/FlowManager/BaseFunction/BaseFlowListFunction.jspf" %>
<%@page contentType="text/html; charset=GBK"%>
<%
String taskNo = CurPage.getParameter("TaskNo");
String applyType = CurPage.getParameter("applyType");
String phasename = CurPage.getParameter("phasename");
if(StringX.isSpace(taskNo)) taskNo = "";
if(StringX.isSpace(applyType)) applyType = "";
if(StringX.isSpace(phasename)) phasename = "";
String userID = CurUser.getUserID();
JBOTransaction tx = JBOFactory.createJBOTransaction();
TenwaFlowTask ft = new TenwaFlowTask(taskNo, tx);//使用jboTrans
String routeInfo=ft.getFlowRebackInfo();
String flowNo = ft.FlowNo;
String phaseNo=ft.PhaseNo;
String objectNo=ft.ObjectNo;
String flowState = ft.FlowState;
//会签历史纪录阶段号问题
tx.commit();
%>
<style>
.opinion-style{
width:100%;
overflow:hidden;
display:inline-block;
margin-bottom:2px;
outline:none;
}
.opinion-style2{
overflow:hidden;
display:inline-block;
margin-bottom:2px;
outline:none;
}
a.opinion-style:hover{
background-color:A8CAE5;
outline:none;
}
.opinion-focus{
background-color:A8CAE5;
}
</style>
<div>
<table>
<tr>
<td width="50%" align="right"><%=new Button("提交","确认提交","javascript:backMethod();","","btn_icon_Submit","").getHtmlText()%></td>
<td width="50%" align="center"><%=new Button("放弃","放弃提交","javascript:doCancel();","","btn_icon_delete","").getHtmlText()%></td>
</tr>
</table>
</div>
<div id="opinionset">
<div style="margin-top:10px;margin-left:15px;font-size:12px;">
<font color="#000000"><b>请选择退回后提交方式:</b></font>
</div>
<div style="margin-top:10px;margin-left:10px;font-size:12px;border:1px solid lightgray;padding:10px;">
<input id="directsubmit" type="radio" name="backmethod" value="1"/>直接提交退回步骤
<input id="stepapprove" type="radio" name="backmethod" value="2" />逐级审批
</div>
<div style="margin-top:10px;margin-left:15px;font-size:12px;">
<font color="#000000"><b>请选择退回路径:</b></font>
</div>
<div id="stepInfo" style="margin-top:10px;margin-left:10px;font-size:12px;border:1px solid lightgray;padding:10px;">
</div>
<div style="height:300px; overflow:auto">
<div id="actionset">
</div>
<div id="actionreadset">
</div>
</div>
<div>
<table width="100%" align="center">
<tr>
<td align="center"><b><span id="phaseinfo" style="color: #FF0000" ></span></b></td>
</tr>
</table>
</div>
<script type="text/javascript">
var strRouteJson='<%=routeInfo%>';
var routeJson= JSON.parse(strRouteJson);
var taskNo = "<%=taskNo%>";
var applyType = "<%=applyType%>";
var phasename = "<%=phasename%>";
var userID = "<%=userID%>";
var objectNo = "<%=objectNo%>";
$(function(){initRouteInfo();});
function initRouteInfo(){
//初始请选择退回后提交方式
var backnexttype=routeJson.backnexttype;
if(backnexttype.length==0){
$("#stepapprove").attr("checked",true);
}else{
if(backnexttype=="backnextperson"){
$("#directsubmit").attr("checked",true);
$("#stepapprove").attr("disabled",true);
$("#directsubmit").attr("disabled",true);
}else if(backnexttype=="backnextstep"){
$("#stepapprove").attr("checked",true);
$("#stepapprove").attr("disabled",true);
$("#directsubmit").attr("disabled",true);
}
}
var stepInfo=$("#stepInfo");
if(routeJson.backstept.length>0){
for(var i=0;i<routeJson.backstept.length;i++){
var phaseNo=routeJson.backstept[i].phaseNo;
var phaseName=routeJson.backstept[i].phaseName;
stepInfo.append("<a class='opinion-style2' href='javascript:void(0)' ><input type='radio' name='phaseopinion' onclick='initFlowUserInfo(\""+phaseNo+"\")' value='" +phaseNo+ "' >" + phaseName+ "("+phaseNo+")</input></a><br>");
}
if(routeJson.backstept.length==1){
$("input[name='phaseopinion']:first").attr("checked",true);
initFlowUserInfo(routeJson.backstept[0].phaseNo);
}
}else{
stepInfo.append("没有可退回的步骤");
}
}
//初始化路由下面的用户
function initFlowUserInfo(tempphaseno){
var backUserInfo = AsControl.RunJavaMethodTrans("com.amarsoft.app.flow.FlowAction", "getBackStepTaskInfo", "objectNo=<%=objectNo%>,phaseNo="+tempphaseno);
var actionSet = $("#actionset");
var cindex=0;
var selectUser=$('#phaseaction'+cindex).text()||"";
if(selectUser.length==0){
actionSet.append("<div style='margin-top:10px;margin-left:15px;font-size:12px;'><font color='#000000'><b>退回的用户:</b></font></div><div id='phaseaction"+cindex+"' style='margin-top:10px;margin-left:10px;font-size:12px;border:1px solid lightgray;padding:5px;'></div>");
}else{
$('#phaseaction'+cindex).html("");
}
var phaseAction = $("#phaseaction"+cindex);
if(backUserInfo!=null){
var userJson= backUserInfo;
var username= userJson.userName||"";
if(username.length>0){
phaseAction.append("<a class='opinion-style' style='width:100' href='javascript:void(0)' ><input type='radio' name='phaseaction"+cindex+"' checked value='"+userJson.taskNo+"'>"+userJson.userName+"</input></a>");
}else{
phaseAction.append("无用户");
}
}
}
function doCancel(){
if(confirm("您确定要放弃此次提交吗?")){
parent.AsDialog.ClosePage("_CANCEL_");
}
}
function backMethod(){
if(document.getElementById("stepapprove").checked){
commitAction();
}else if(document.getElementById("directsubmit").checked){
commitAction('recommit');
}else{
alert("请选择退回后提交方式!");
}
}
//提交动作
function commitAction(isRecommit){
var isCommited = AsControl.RunJavaMethodTrans("com.amarsoft.app.flow.FlowAction", "isCommited", "TaskNo=<%=taskNo%>");
if(isCommited=='yes'){
alert("此流程任务已提交!");
return;
}
var sTaskNo = $("input[name='phaseaction0']:checked").val()||"";
var returnUser = $("input[name='phaseaction0']:checked")[0].nextSibling.nodeValue||"";
if(typeof(sTaskNo)=="undefined" || sTaskNo.length==0){
alert(getMessageText('AWEW1001'));//请选择一条信息!
return;
}
if(confirm("确定退回吗?")){
var para="";
if(typeof(isRecommit)!=undefined && isRecommit=="recommit"){
para = ",Recommit=Y";
}
var msg = RunJavaMethodTrans("com.amarsoft.app.flow.FlowAction","returnTask","TaskNo=<%=taskNo%>,ReturnPoint="+sTaskNo+para);
var sFlowLogContent="<%=CurUser.getUserName()%>在@退回流程给"+returnUser;
insertFlowLog(objectNo,taskNo,sFlowLogContent);
alert("操作成功")
parent.AsDialog.ClosePage("_SUCCESS_");
}
}
</script>
<%@include file="/Frame/resources/include/include_end.jspf"%>
<%@page import="com.amarsoft.are.jbo.ql.Parser"%>
<%@page import="com.amarsoft.biz.workflow.*"%>
<%@page import="com.amarsoft.app.flow.*"%>
<%@page import="com.tenwa.flow.task.*"%>
<%@page import="com.amarsoft.are.lang.StringX"%>
<%@include file="/Frame/resources/include/include_begin.jspf"%>
<%@include file="/Tenwa/Core/FlowManager/BaseFunction/BaseFlowListFunction.jspf" %>
<%@page contentType="text/html; charset=GBK"%>
<%
String taskNo = CurPage.getParameter("TaskNo");
String applyType = CurPage.getParameter("applyType");
String phasename = CurPage.getParameter("phasename");
if(StringX.isSpace(taskNo)) taskNo = "";
if(StringX.isSpace(applyType)) applyType = "";
if(StringX.isSpace(phasename)) phasename = "";
String userID = CurUser.getUserID();
JBOTransaction tx = JBOFactory.createJBOTransaction();
TenwaFlowTask ft = new TenwaFlowTask(taskNo, tx);//使用jboTrans
String routeInfo=ft.getFlowRebackInfo();
String flowNo = ft.FlowNo;
String phaseNo=ft.PhaseNo;
String objectNo=ft.ObjectNo;
String flowState = ft.FlowState;
//会签历史纪录阶段号问题
tx.commit();
%>
<style>
.opinion-style{
width:100%;
overflow:hidden;
display:inline-block;
margin-bottom:2px;
outline:none;
}
.opinion-style2{
overflow:hidden;
display:inline-block;
margin-bottom:2px;
outline:none;
}
a.opinion-style:hover{
background-color:A8CAE5;
outline:none;
}
.opinion-focus{
background-color:A8CAE5;
}
</style>
<div>
<table>
<tr>
<td width="50%" align="right"><%=new Button("提交","确认提交","javascript:backMethod();","","btn_icon_Submit","").getHtmlText()%></td>
<td width="50%" align="center"><%=new Button("放弃","放弃提交","javascript:doCancel();","","btn_icon_delete","").getHtmlText()%></td>
</tr>
</table>
</div>
<div id="opinionset">
<div style="margin-top:10px;margin-left:15px;font-size:12px;">
<font color="#000000"><b>请选择退回后提交方式:</b></font>
</div>
<div style="margin-top:10px;margin-left:10px;font-size:12px;border:1px solid lightgray;padding:10px;">
<input id="directsubmit" type="radio" name="backmethod" value="1"/>直接提交退回步骤
<input id="stepapprove" type="radio" name="backmethod" value="2" />逐级审批
</div>
<div style="margin-top:10px;margin-left:15px;font-size:12px;">
<font color="#000000"><b>请选择退回路径:</b></font>
</div>
<div id="stepInfo" style="margin-top:10px;margin-left:10px;font-size:12px;border:1px solid lightgray;padding:10px;">
</div>
<div style="height:300px; overflow:auto">
<div id="actionset">
</div>
<div id="actionreadset">
</div>
</div>
<div>
<table width="100%" align="center">
<tr>
<td align="center"><b><span id="phaseinfo" style="color: #FF0000" ></span></b></td>
</tr>
</table>
</div>
<script type="text/javascript">
var strRouteJson='<%=routeInfo%>';
var routeJson= JSON.parse(strRouteJson);
var taskNo = "<%=taskNo%>";
var applyType = "<%=applyType%>";
var phasename = "<%=phasename%>";
var userID = "<%=userID%>";
var objectNo = "<%=objectNo%>";
$(function(){initRouteInfo();});
function initRouteInfo(){
//初始请选择退回后提交方式
var backnexttype=routeJson.backnexttype;
if(backnexttype.length==0){
$("#stepapprove").attr("checked",true);
}else{
if(backnexttype=="backnextperson"){
$("#directsubmit").attr("checked",true);
$("#stepapprove").attr("disabled",true);
$("#directsubmit").attr("disabled",true);
}else if(backnexttype=="backnextstep"){
$("#stepapprove").attr("checked",true);
$("#stepapprove").attr("disabled",true);
$("#directsubmit").attr("disabled",true);
}
}
var stepInfo=$("#stepInfo");
if(routeJson.backstept.length>0){
stepInfo.append("<table>");
for(var i=0;i<routeJson.backstept.length;i++){
var phaseNo=routeJson.backstept[i].phaseNo;
var phaseName=routeJson.backstept[i].phaseName;
if(i==0){stepInfo.append("<tr>");}else{if(i%3==0){stepInfo.append("</tr><tr>");}}
stepInfo.append("<td><a class='opinion-style2' href='javascript:void(0)' ><input type='radio' name='phaseopinion' onclick='initFlowUserInfo(\""+phaseNo+"\")' value='" +phaseNo+ "' >" + phaseName+ "("+phaseNo+")</input></a></td>");
if(i==(routeJson.backstept.length-1)){stepInfo.append("</tr>");}
}
stepInfo.append("</table>");
if(routeJson.backstept.length==1){
$("input[name='phaseopinion']:first").attr("checked",true);
initFlowUserInfo(routeJson.backstept[0].phaseNo);
}
}else{
stepInfo.append("没有可退回的步骤");
}
}
//初始化路由下面的用户
function initFlowUserInfo(tempphaseno){
var backUserInfo = AsControl.RunJavaMethodTrans("com.amarsoft.app.flow.FlowAction", "getBackStepTaskInfo", "objectNo=<%=objectNo%>,phaseNo="+tempphaseno);
var actionSet = $("#actionset");
var cindex=0;
var selectUser=$('#phaseaction'+cindex).text()||"";
if(selectUser.length==0){
actionSet.append("<div style='margin-top:10px;margin-left:15px;font-size:12px;'><font color='#000000'><b>退回的用户:</b></font></div><div id='phaseaction"+cindex+"' style='margin-top:10px;margin-left:10px;font-size:12px;border:1px solid lightgray;padding:5px;'></div>");
}else{
$('#phaseaction'+cindex).html("");
}
var phaseAction = $("#phaseaction"+cindex);
if(backUserInfo!=null){
var userJson= backUserInfo;
var username= userJson.userName||"";
if(username.length>0){
phaseAction.append("<a class='opinion-style' style='width:100' href='javascript:void(0)' ><input type='radio' name='phaseaction"+cindex+"' checked value='"+userJson.taskNo+"'>"+userJson.userName+"</input></a>");
}else{
phaseAction.append("无用户");
}
}
}
function doCancel(){
if(confirm("您确定要放弃此次提交吗?")){
parent.AsDialog.ClosePage("_CANCEL_");
}
}
function backMethod(){
if(document.getElementById("stepapprove").checked){
commitAction();
}else if(document.getElementById("directsubmit").checked){
commitAction('recommit');
}else{
alert("请选择退回后提交方式!");
}
}
//提交动作
function commitAction(isRecommit){
var isCommited = AsControl.RunJavaMethodTrans("com.amarsoft.app.flow.FlowAction", "isCommited", "TaskNo=<%=taskNo%>");
if(isCommited=='yes'){
var message = AsControl.RunJavaMethodTrans("com.amarsoft.app.flow.FlowAction","getTaskAutoColseInfo","taskNo=<%=taskNo%>");
if(message!=""){
alert("操作失败:"+message+"!");
}else{
alert("此流程任务已提交!");
}
}
var sTaskNo = $("input[name='phaseaction0']:checked").val()||"";
var returnUser = $("input[name='phaseaction0']:checked")[0].nextSibling.nodeValue||"";
if(typeof(sTaskNo)=="undefined" || sTaskNo.length==0){
alert(getMessageText('AWEW1001'));//请选择一条信息!
return;
}
if(confirm("确定退回吗?")){
var para="";
if(typeof(isRecommit)!=undefined && isRecommit=="recommit"){
para = ",Recommit=Y";
}
var msg = RunJavaMethodTrans("com.amarsoft.app.flow.FlowAction","returnTask","TaskNo=<%=taskNo%>,ReturnPoint="+sTaskNo+para);
var sFlowLogContent="<%=CurUser.getUserName()%>在@退回流程给"+returnUser;
insertFlowLog(objectNo,taskNo,sFlowLogContent);
alert("操作成功")
parent.AsDialog.ClosePage("_SUCCESS_");
}
}
</script>
<%@include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -167,7 +167,7 @@
if(vUser.length==1&&type=="radio"){
$("input[name=phaseaction"+cindex+"]:first").attr("checked",true);
}
if(phase=="0010"&&flowNo=="FundPaymentCarFlow"){
if((phase=="0010"&&flowNo=="FundPaymentCarFlow")||(phase=="0020"&&flowNo=="BusinessApplyFlow")){
actionSet.hide();
}
}

View File

@ -9,95 +9,84 @@
String sPrevUrl = CurPage.getParameter("ID");
String ProjectName = CurPage.getParameter("ProjectName");
String DistributorNo = CurPage.getParameter("DistributorNo");
/* if(sPrevUrl == null) sPrevUrl = ""; */
BizObject flow=JBOFactory.createBizObjectQuery("jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT","flow_unid=:flowunid").setParameter("flowunid", sFlowUnid).getSingleResult(false);
String DISTRIBUTOR_NO=flow.getAttribute("Flow_Key").getString();
//String CAUTION_MONEY=flow.getAttribute("Flow_Key").getString();
String RightType = CurPage.getParameter("RightType");
String sTempletNo = "DDepositReturn_TempInfo";//--模板号--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
doTemp.setDefaultValue("DISTRIBUTOR_ID", DistributorNo);
/* doTemp.setColTips("", "测试"); */
doTemp.setHtmlEvent("CAUTION_MONEY", "onblur", "selectBalance");
doTemp.setHtmlEvent("CAUTION_MONEY", "onchange", "selectBalance");
if("ReadOnly".equals(RightType)){
doTemp.setColInnerBtEvent("REFUND_NUMBER,LOCAL_ACCOUNT", "");
}
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
//dwTemp.ReadOnly = "-2";//只读模式
String disno="";
List<BizObject> nolist=JBOFactory.getBizObjectManager("jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT").createQuery("select di.distributor_no from O ,jbo.app.tenwa.customer.DISTRIBUTOR_INFO di where di.id=O.flow_key and flow_unid=:flowunid")
.setParameter("flowunid",sFlowUnid).getResultList(false);
if(nolist.size()>0){
disno=nolist.get(0).getAttribute("distributor_no").getString();
}
dwTemp.genHTMLObjectWindow(CurPage.getParameter("ID"));
dwTemp.genHTMLObjectWindow(sFlowUnid);
String acc_number = Sqlca.getString("select acc_number from OWN_ACCOUNT limit 0,1");
String acc_bank = Sqlca.getString("select acc_bank from OWN_ACCOUNT limit 0,1");
//String acc = Sqlca.getString("select acc_number from DISTRIBUTOR_ACCOUNT where distributor_id="+"'"+DistributorNo+"'"+" limit 0,1");
String acc = Sqlca.getString("select acc_number from DISTRIBUTOR_ACCOUNT where distributor_id='"+DistributorNo+"' limit 0,1");
String sButtons[][] = {
{"true","All","Button","保存","保存所有修改","save()","","","",""},
{String.valueOf(!com.amarsoft.are.lang.StringX.isSpace(sPrevUrl)),"All","Button","返回","返回列表","returnList()","","","",""}
{"true","All","Button","保存","保存所有修改","save()","","","",""}
};
/* sButtonPosition = "south"; */
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
window.onload=function(){
setItemValue(0,0,"LOCAL_ACCOUNT",'<%=acc_number%>');
setItemValue(0,0,"LOCAL_BANK",'<%=acc_bank%>');
<%-- setItemValue(0,0,"refund_number",'<%=acc%>'); --%>
if("ReadOnly"!='<%=RightType%>'){
setItemValue(0,0,"LOCAL_ACCOUNT",'<%=acc_number%>');
setItemValue(0,0,"LOCAL_BANK",'<%=acc_bank%>');
setItemValue(0,0,"refund_number",'<%=acc%>');
setItemValue(0,0,"REFUND_PERSON","<%=ProjectName%>");
setItemValue(0,0,"InputUserID","<%=CurUser.getUserName()%>");
setItemValue(0,0,"InputOrgID","<%=CurUser.getOrgName()%>");
setItemValue(0,0,"InputTime","<%=StringFunction.getTodayNow()%>");
setItemValue(0,0,"UpdateUserID","<%=CurUser.getUserName()%>");
setItemValue(0,0,"UpdateOrgID","<%=CurUser.getOrgName()%>");
setItemValue(0,0,"UpdateTime","<%=StringFunction.getTodayNow()%>");
setItemValue(0,getRow(),'FlowUnid',"<%=sFlowUnid%>");
}
}
var sFlowUnid = "<%=sFlowUnid%>";
setItemValue(0,0,"MONEY_TYPE","保证金退款");
setItemValue(0,0,"REFUND_PERSON","<%=ProjectName%>");
setItemValue(0,0,"InputUserID","<%=CurUser.getUserName()%>");
setItemValue(0,0,"InputOrgID","<%=CurUser.getOrgName()%>");
setItemValue(0,0,"InputTime","<%=StringFunction.getTodayNow()%>");
setItemValue(0,0,"UpdateUserID","<%=CurUser.getUserName()%>");
setItemValue(0,0,"UpdateOrgID","<%=CurUser.getOrgName()%>");
setItemValue(0,0,"UpdateTime","<%=StringFunction.getTodayNow()%>");
function save(){
var sFlowUnid = "<%=sFlowUnid%>";
setItemValue(0,getRow(),'FlowUnid',sFlowUnid);
var returnValue = getItemValue(0,0,'ACCOUNT_BALANCE');
//alert(returnValue);
as_save("myiframe0","returnList()");
as_save("myiframe0");
}
function returnList(){
AsControl.OpenView("/DealerDeposit/DDepositReturn_TempList.jsp", "FlowUnid="+sFlowUnid,"_self","");
}
function selectBalance(){
var money = getItemValue(0,0,"CAUTION_MONEY");
//alert(" 输入的金额:"+money);
var sReturn=AsControl.RunJavaMethodTrans("com.tenwa.flow.action.comm.SelectBalance","runs","distributor_no=<%=DISTRIBUTOR_NO%>");
//alert(" 总金额:"+sReturn);
setItemValue(0,0,"ACCOUNT_BALANCE",sReturn-money);
var sReturn=AsControl.RunJavaMethodTrans("com.tenwa.flow.action.comm.SelectBalance","runs","distributor_no=<%=DistributorNo%>,caution_money="+money);
sReturn = sReturn.split("@");
if("SUCCESS"==sReturn[0]){
setItemValue(0,0,"ACCOUNT_BALANCE",sReturn[1]);
setErrorTips('ACCOUNT_BALANCE','');
}else{
setErrorTips('ACCOUNT_BALANCE',sReturn[1]);
setItemValue(0,0,'CAUTION_MONEY','');
}
}
function selectaccount(){
var disno = getItemValue(0, 0, "disno");
// alert(id);
AsDialog.OpenSelector("SelectReturn","distributorid,"+"<%=disno%>","dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
AsDialog.OpenSelector("SelectReturn","distributorid,"+"<%=DistributorNo%>","dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"){
//alert(getHtmlMessage('1'));//请选择一条信息!
return;
}
sReturn = sReturn.split("@");//"@"表示了向页面添加数据时的连续性
setItemValue(0,getRow(),"refund_number",sReturn[0]);//向页面的框中添加数据
setItemValue(0,getRow(),"ACCOUNT",sReturn[1]);
//setItemValue(0,getRow(),"DISTRIBUTOR_ACCOUNT_TEMP",sReturn[2]);
},"请选择名称");
},"请选择名称");
}
function selectensureS(){
AsDialog.OpenSelector("DepositcollectionS","","dialogWidth=" + parseInt(window.screen.width * 0.4) + "px dialogHeight=" + parseInt(window.screen.height * 0.6) + "px",function(sReturn){
if(!sReturn||sReturn=="_CANCEL_"){
//alert(getHtmlMessage('1'));//请选择一条信息!
return;
}
sReturn = sReturn.split("@");//"@"表示了向页面添加数据时的连续性
setItemValue(0,getRow(),"LOCAL_ACCOUNT",sReturn[0]);//向页面的框中添加数据
setItemValue(0,getRow(),"LOCAL_BANK",sReturn[1]);
},"请选择名称");
},"请选择名称");
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -6,6 +6,7 @@
History Log:
*/
String sFlowUnid = CurPage.getParameter("FlowUnid");
String DistributorNo = CurPage.getParameter("DistributorNo");
String ProjectName = CurPage.getParameter("ProjectName");
String type = CurPage.getParameter("PhaseNo");
ASObjectModel doTemp = new ASObjectModel("DDepositReturn_TempList");
@ -34,7 +35,7 @@
function newRecord(){
var sUrl = "/DealerDeposit/DDepositReturn_TempInfo.jsp";
var param = "<%=ProjectName%>";
AsControl.OpenView(sUrl,'FlowUnid='+'<%=sFlowUnid%>'+'&ProjectName='+param,'_self','');
AsControl.OpenView(sUrl,'FlowUnid='+'<%=sFlowUnid%>'+'&ProjectName='+param+'&DistributorNo=<%=DistributorNo%>','_self','');
}
function viewAndEdit(){
var sUrl = "/DealerDeposit/DDepositReturn_TempInfo.jsp";

View File

@ -15,6 +15,7 @@
String sTempletNo = "DMarginChargeInfo_Temp";//--Ä£°åºÅ--
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
doTemp.setDefaultValue("DISTRIBUTOR_ID", DistributorNo);
doTemp.setDefaultValue("MONEY_TYPE", "bondCollect");
String disno="";
List<BizObject> nolist=JBOFactory.getBizObjectManager("jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT").createQuery("select di.distributor_no from O ,jbo.app.tenwa.customer.DISTRIBUTOR_INFO di where di.id=O.flow_key and flow_unid=:flowunid")
.setParameter("flowunid",sFlowUnid).getResultList(false);
@ -63,9 +64,6 @@
function save(){
var sFlowUnid = "<%=sFlowUnid%>";
setItemValue(0,getRow(),"FlowUnid",sFlowUnid);//³õʼ»¯Á÷³Ì±àºÅ
setItemValue(0,getRow(),"DISTRIBUTOR_ID","<%=sPrevUrl%>");//³õʼ»¯Á÷³Ì±àºÅ
as_save("myiframe0","returnList()");
}
function returnList(){

View File

@ -29,7 +29,7 @@
|| "distributor_status05".equals(distributor_status)
|| "distributor_status06".equals(distributor_status)){
sButtons = new String[][]{
{"true","","Button","ÏêÇé","ÏêÇé","viewAndEdit()","","","","btn_icon_detail",""},
//{"true","","Button","ÏêÇé","ÏêÇé","viewAndEdit()","","","","btn_icon_detail",""},
};
}else{
sButtons = new String[][]{

View File

@ -17,6 +17,7 @@
{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
{"true","","Button","详情","详情","viewAndEdit()","","","","btn_icon_detail",""},
{"true","","Button","删除","删除","if(confirm('确实要删除吗?'))as_delete(0)","","","","btn_icon_delete",""},
{"true","","Button","导出科目信息","导出科目信息","exportExcel()","","","","btn_icon_up",""}
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<script type="text/javascript">
@ -33,5 +34,43 @@
}
AsControl.OpenView(sUrl,'id=' +sPara ,'_self','');
}
//导出excel
function exportExcel(){
var param={};
var tempParam={};
var sparam="";
//模板号
param["templateNo"]="cb0050f219014b948d2bf2f4aae040a7";
//生成文件关联关系
tempParam["OBJECTTYPE"]="凭证科目信息导出";
tempParam["FLOW_UNID"]="<%=new java.util.Date().getTime()%>";
//生成模板固定参数
tempParam["CurUserId"]="<%=CurUser.getUserID()%>";
tempParam["CurOrgId"]="<%=CurUser.getOrgID()%>";
tempParam["fileSavePath"]="<%=CurConfig.getConfigure("FileSavePath")%>";
param["templateParam"]=JSON.stringify(tempParam).replace(/,/g,"@");//生成模板的参数据
for(var key in param){
if(sparam.length>0){sparam+=",";}
sparam+=key+"="+param[key];
}
var result=RunJavaMethodTrans("com.tenwa.officetempalte.action.CreateOfficeAction","createOfficeByTemplate",sparam);
if(result == "success"){
var attributeID = AsControl.RunJsp("/Tenwa/Lease/Flow/Rent/BatchIncome/GetLBDocAttributeID.jsp",
"FLOW_UNID="+tempParam["FLOW_UNID"]+"&OBJECTTYPE="+tempParam["OBJECTTYPE"]);
downloadFile(attributeID);
}else{
alert("导出失败!");
}
}
function downloadFile(id){
if(!frames["downloadTemplate"]) $("<iframe name='downloadTemplate' style='display:none;'></iframe>").appendTo("body");
window.open(sWebRootPath+"/servlet/view/docDownloadServlet?CompClientID=<%=sCompClientID%>&sqlString=save@"+id, "downloadTemplate");
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -100,7 +100,7 @@
setItemValue(0,0,"flowunid","<%=FlowUnid%>");
setItemValue(0,0,"acc_type","Debit");
var res=true;
// RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "getCustIdByFlowunid", "FlowUnid=<%=FlowUnid%>");
res = RunJavaMethodTrans("com.tenwa.comm.customerfilterlist.DebitCardAction", "getCustIdByFlowunid", "FlowUnid=<%=FlowUnid%>");
var strarry=res.split(",");
var customerid=strarry[0];
var projectid=strarry[1];

View File

@ -81,19 +81,29 @@
doTemp.setRequired("ENGINE_NUMBER",true);
doTemp.setRequired("CAR_COLOUR",true);
}
if("合同制作流程".equals(flowName)){
String falg = "false";
if("业务申请流程".equals(flowName)){
falg ="true";
}
if("合同制作流程".equals(flowName)||"合同变更流程".equals(flowName)){
falg ="true";
doTemp.setReadOnly("",true);//设置所有字段都只读。
doTemp.setReadOnly("FRAME_NUMBER",false);
doTemp.setReadOnly("CAR_COLOUR",false);
doTemp.setReadOnly("ENGINE_NUMBER",false);
doTemp.setColInnerBtEvent("BRAND", "");
doTemp.setColInnerBtEvent("CAR_SERIES", "");
doTemp.setColInnerBtEvent("MODEL", "");
doTemp.setColInnerBtEvent("zone", "");
}
ASObjectWindow dwTemp = new ASObjectWindow(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
if(((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true")))&&!("合同变更流程".equals(flowName))){
dwTemp.ReadOnly = "-2";//只读模式
}
dwTemp.genHTMLObjectWindow(FlowUnid);
CurPage.getCurComp().setAttribute("RightType", RightType);
// CurPage.getCurComp().setAttribute("RightType", RightType);
%>
<%/*~END~*/%>
@ -104,7 +114,7 @@
<%
String sButtons[][] = {
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
{"true","All","Button","保存","保存所有修改","saveRecord()","","","","btn_icon_save"},
{falg,"All","Button","保存","保存所有修改","saveRecord()","","","","btn_icon_save"},
//{"true","","Button","返回","返回列表页面","goBack()","","","","btn_icon_return"}
};
sButtonPosition = "north";
@ -133,6 +143,11 @@
$("#A_div_1339").attr("style","display:none;");
$("#A_div_1350").attr("style","display:none;");
}
if("合同制作流程"=="<%=flowName%>"||"合同变更流程"=="<%=flowName%>"){
setItemRequired(0,"FRAME_NUMBER",true);
setItemRequired(0,"CAR_COLOUR",true);
setItemRequired(0,"ENGINE_NUMBER",true);
}
});
//省市
@ -172,7 +187,7 @@
var ApplyType = "<%=ApplyType%>";
if(plate_number!=null&&plate_number!=""){
if(ApplyType=="BContractApproveApply"){
if(ApplyType=="BContractApproveApply"||ApplyType=="BContractChangeApply"){
as_save("myiframe0","");
return;
}else{

View File

@ -57,13 +57,16 @@
ado.setReadOnly("PLAN_DATE", true);
ado.setReadOnly("ACCOUNT", true);
ado.setReadOnly("ACC_NUMBER", true);
ado.setReadOnly("FACT_DATE", true);
ado.setReadOnly("BANK", true);
if("0010".equals(phaseNo)){
ado.setReadOnly("FACT_DATE", true);
ado.setReadOnly("BANK", true);
ado.setReadOnly("ACCOUNTING_DATE", true);
}
if("0020".equals(phaseNo)){
ado.setReadOnly("BANK", true);
ado.setRequired("BANK", false);
ado.setReadOnly("ACCOUNTING_DATE", false);
}
if("0030".equals(phaseNo)){
ado.setReadOnly("ACCOUNTING_DATE", true);
}
ado.setHtmlEvent("FACT_MONEY", "onchange", "checkEquipAmtMoney");
ado.setHtmlEvent("FEE_ADJUST", "onchange", "checkEquipAmtMoney");

View File

@ -16,10 +16,32 @@
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String sButtons[][] = {
{"true","All","Button","删除","删除","doDelete()","","","","btn_icon_delete",""},
{"true","","Button","卡扣数据上传","卡扣数据上传","importExcel()","","","","btn_icon_importNew",""}
{"true","","Button","卡扣数据上传","卡扣数据上传","importExcel()","","","","btn_icon_importNew",""},
{"true","","Button","卡扣模版下载","卡扣模版下载","CardDownload()","","","","btn_icon_down",""}
};
%><%@include file="/Frame/resources/include/ui/include_list.jspf"%>
<iframe name="MyAtt" src="<%=com.amarsoft.awe.util.Escape.getBlankJsp(sWebRootPath,"正在下载附件,请稍候...")%>" style="background-color: blue" width=100% height=100% frameborder=0 hspace=0 vspace=0 marginwidth=0 marginheight=0 scrolling="no">
</iframe>
<form name=form1 method=post action="<%=sWebRootPath%>/servlet/view/fileTemplateView?CompClientID=<%=sCompClientID%>" target=MyAtt>
<div style="display:none">
<input id="sqlString" name=sqlString value="">
</div>
</form>
<script type="text/javascript">
function CardDownload(){
var sId="5605a63d456d454a81b368dbc765474f";
if (typeof(sId)=="undefined" || sId.length==0){
return;
}else{
$("#sqlString").val("save@"+sId);
form1.submit();
}
}
$(function(){
TableFactory.afterSearch = function(){
setCheckBoxEvent();//搜索页面和排序后执行

View File

@ -169,6 +169,7 @@ public class CmbToCallbackController extends BaseFlowStartAction {
}
}else {
sql();
map.put("code", "1") ;
map.put("msg", "暂无支付申请发起成功数据,请检查") ;
JSONObject jsonObj = JSONObject.fromObject(map);

View File

@ -1,12 +1,11 @@
package com.tenwa.flow.task;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import jbo.sys.FLOW_MODEL;
import jbo.sys.FLOW_TASK;
import com.alibaba.fastjson.JSON;
import com.amarsoft.amarscript.Any;
import com.amarsoft.amarscript.ELContext;
import com.amarsoft.amarscript.Expression;
@ -19,9 +18,13 @@ import com.amarsoft.are.util.json.JSONDecoder;
import com.amarsoft.are.util.json.JSONObject;
import com.amarsoft.biz.workflow.FlowTask;
import com.amarsoft.context.ASUser;
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
import com.tenwa.flow.service.FlowUserManageServie;
import com.tenwa.flow.service.FlowUserManageServieImp;
import jbo.sys.FLOW_MODEL;
import jbo.sys.FLOW_TASK;
public class TenwaFlowTask extends FlowTask {
public JBOTransaction baseTrans = null;
@ -395,69 +398,92 @@ public class TenwaFlowTask extends FlowTask {
* @throws Exception
*/
public String getFlowRebackInfo() throws Exception {
BizObjectManager bm = JBOFactory.getBizObjectManager(
FLOW_MODEL.CLASS_NAME, this.baseTrans);
BizObject bo = bm.createQuery("flowno=:flowno and phaseno=:phaseno")
.setParameter("flowno", this.FlowNo)
.setParameter("phaseno", this.PhaseNo).getSingleResult(false);
String backnexttype = bo.getAttribute("BACKSTEPNEXTTYPE").getString();
if (backnexttype == "") {
backnexttype = "";
}
String backSteps = bo.getAttribute("BACKSTEPS").getString();
String returnMessage = "{\"backnexttype\":\"" + backnexttype
+ "\",\"backstept\":[";
Map<String, Object> resultJson = new HashMap<String, Object>();
BizObjectManager bm = JBOFactory.getBizObjectManager(FLOW_MODEL.CLASS_NAME, this.baseTrans);
BizObject bo = bm.createQuery("flowno=:flowno and phaseno=:phaseno").setParameter("flowno", this.FlowNo).setParameter("phaseno", this.PhaseNo).getSingleResult(false);
String backnexttype = bo.getAttribute("BACKSTEPNEXTTYPE").getString();// backnextCust
String backSteps = bo.getAttribute("BACKSTEPS").getString();// 01申请人发起(0010)
List<Map<String, String>> backStepList = new ArrayList<Map<String, String>>();
resultJson.put("backnexttype", backnexttype);
resultJson.put("backstept", backStepList);
String fixedSteps = "";
if (backSteps.length() > 1) {
if (backSteps != null && backSteps.length() > 1) {
fixedSteps = this.getBackStepsByConfig(backSteps);
}
String sql = "";
Map<String,String>condition=new HashMap<String,String>();
if (backSteps.length() <= 1) {
sql = " SELECT O.phaseno,O.phasename FROM O left join jbo.sys.FLOW_MODEL fm on o.phaseno=fm.phaseno and o.flowno=fm.flowno WHERE o.flowno=:flowno and o.objectno='"
+ this.ObjectNo + "' ";
sql += "AND O.phaseno<'"
+ this.PhaseNo
+ "' and fm.ATTRIBUTE7='01' order by O.phaseno DESC,begintime desc";
//没有判断退回路径时
if(this.ForkState.equals("INFORK")){
//第一种并行中退回
sql="select o.phaseno,o.phasename from (";
sql=sql+ " SELECT * FROM flow_task START WITH serialno =:serialno CONNECT BY PRIOR relativeserialno = serialno ";
sql=sql+" )o left join FLOW_MODEL fm on o.phaseno=fm.phaseno and o.flowno=fm.flowno where to_number(fm.phaseno)<to_number('" + this.PhaseNo + "') and (nvl(o.forkstate,'e') <>'INFORK' OR (nvl(o.forkstate,'e') ='INFORK' and forkno=:forkno) )and fm.ATTRIBUTE7='01' order by begintime";
condition.put("serialno", this.RelativeSerialNo);
condition.put("forkno", this.ForkNo);
}else{
//第二种一般路径不能退回并行中
sql="select o.phaseno,o.phasename from ( ";
sql=sql+" SELECT * FROM flow_task START WITH serialno =:serialno CONNECT BY PRIOR relativeserialno = serialno ";
sql=sql+" )o left join FLOW_MODEL fm on o.phaseno=fm.phaseno and o.flowno=fm.flowno where to_number(fm.phaseno)<to_number('" + this.PhaseNo + "') and nvl(o.forkstate,'e') <>'INFORK' and fm.ATTRIBUTE7='01' order by begintime";
condition.put("serialno", this.RelativeSerialNo);
}
} else {
sql = " SELECT O.phaseno,O.phasename FROM O WHERE o.flowno=:flowno and o.objectno='"
+ this.ObjectNo + "' ";
sql += "AND O.phaseno in (" + fixedSteps
+ ") order by O.phaseno DESC,begintime desc";
sql = " SELECT O.phaseno,O.phasename FROM flow_task O WHERE o.flowno=:flowno and o.objectno=:objectno ";
sql += "AND O.phaseno in (" + fixedSteps + ") order by O.phaseno DESC,begintime desc";
condition.put("flowno", this.FlowNo);
condition.put("objectno", this.ObjectNo);
}
List<BizObject> bos = JBOFactory
.getBizObjectManager(FLOW_TASK.CLASS_NAME, this.baseTrans)
.createQuery(sql).setParameter("flowno", this.FlowNo)
.getResultList(false);
if (backSteps.length() == 0) {
// ¼ÓÔØÍË»ØÉÏÒ»²½
returnMessage += "{\"phaseNo\":\""
+ bos.get(0).getAttribute("phaseno").getString()
+ "\",\"phaseName\":\""
+ bos.get(0).getAttribute("phasename").getString() + "\"}";
} else {
List<Map<String,String>>bos= DataOperatorUtil.getDataBySql(this.baseTrans,sql,condition);
BizObjectManager taskManages = JBOFactory.getBizObjectManager(FLOW_TASK.CLASS_NAME, this.baseTrans);
if(bos.size() == 0 && this.RelativeSerialNo != null) {
BizObject fromTask = null;
if(this.AssignedTaskNo.length() > 0) {
BizObjectQuery fromQuery = taskManages.createQuery("o.flowno=:flowno and o.objectno=:objectno and o.flowstate in ('START','NORMAL') and o.phaseopinion1=:phaseopinion1");
fromQuery.setParameter("flowno", this.FlowNo);
fromQuery.setParameter("objectno", this.ObjectNo);
fromQuery.setParameter("phaseopinion1", this.PhaseNo);
List<BizObject> result = fromQuery.getResultList(false);
if (result.size() > 0) {
fromTask = result.get(0);
}
}
if(fromTask == null) {
BizObjectQuery fromQuery = taskManages.createQuery("o.SerialNo=:SerialNo and o.objectno=:objectno");
fromQuery.setParameter("SerialNo", this.RelativeSerialNo);
fromQuery.setParameter("objectno", this.ObjectNo);
fromTask = fromQuery.getSingleResult(false);
}
if(fromTask != null) {
Map<String, String> step = new HashMap<String, String>();
step.put("phaseNo", fromTask.getAttribute("phaseno").getString());
step.put("phaseName", fromTask.getAttribute("phasename").getString());
backStepList.add(step);
}
}
// else if (backSteps.length() == 0) {
// // 加载退回上一步
// Map<String, String> step = new HashMap<String, String>();
// step.put("phaseNo", bos.get(0).getAttribute("phaseno").getString());
// step.put("phaseName", bos.get(0).getAttribute("phasename").getString());
// backStepList.add(step);
// }
else {
Map<String, String> tasks = new HashMap<String, String>();
int findex = 0;
for (int i = 0; i < bos.size(); i++) {
if (!tasks.containsKey(bos.get(i).getAttribute("phaseno")
.getString())) {
findex++;
if (findex > 1) {
returnMessage += ",";
}
tasks.put(bos.get(i).getAttribute("phaseno").getString(),
"");
returnMessage += "{\"phaseNo\":\""
+ bos.get(i).getAttribute("phaseno").getString()
+ "\",\"phaseName\":\""
+ bos.get(i).getAttribute("phasename").getString()
+ "\"}";
if (!tasks.containsKey(bos.get(i).get("PHASENO"))) {
tasks.put(bos.get(i).get("PHASENO"), "");
Map<String, String> step = new HashMap<String, String>();
step.put("phaseNo", bos.get(i).get("PHASENO"));
step.put("phaseName", bos.get(i).get("PHASENAME"));
backStepList.add(step);
}
}
}
returnMessage += "]}";
return returnMessage;
return JSON.toJSONString(resultJson);
}

View File

@ -2,6 +2,7 @@ package com.tenwa.flow.action.comm;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -41,14 +42,21 @@ public class SelectBalance {
Map<String,String> params= new HashMap<String,String>();
params.put("distributor_id", distributor_no);
//params.put("caution_money", caution_money);
String sql="SELECT O.distributor_id,O.caution_money AS money "
+ "FROM D_DEPOSITCHARGE_INFO O WHERE "
+ "O.distributor_id=:distributor_id GROUP BY O.distributor_id";
String sql="SELECT O.total AS money "
+ "FROM DISTRIBUTOR_INFO O WHERE "
+ "O.distributor_no=:distributor_id";
List<Map<String,String>> getSql = DataOperatorUtil.getDataBySql(scql, sql, params);
//if(aaa.size()>0){
BigDecimal mm = new BigDecimal("0");
if(getSql.size()>0){
money=getSql.get(0).get("money");
//}
return money;
mm = mm.add(new BigDecimal(money));
if(mm.subtract(new BigDecimal(caution_money)).doubleValue()>=0){
return "SUCCESS@"+mm.subtract(new BigDecimal(caution_money)).doubleValue();
}else{
return "ERROR@剩余额度不足";
}
}
return "ERROR@网络异常……";
}
}