zoukankan      html  css  js  c++  java
  • JS 获取Button控件的提交类型

     <script type="text/javascript">
    <!--获取button控件的类型--->   
            function isAuditOrCancel(value) {
                document.getElementById("audittype").value = value;
            }
     </script>
    <!--声明变量,到后台接收---> 
    <%: Html.Hidden("audittype")%>
     <li>
    <div class="buttonActive"> <div class="buttonContent"> <button type="submit" onclick="isAuditOrCancel('audit')"> 提交审批
    </button>
    </div> </div> </li> <li> <div class="buttonActive"> <div class="buttonContent"> <button type="submit" onclick="isAuditOrCancel('cancel')"> 撤消
    </button>
    </div> </div> </li> <li> <div class="button"> <div class="buttonContent"> <button type="button" class="close"> 关闭
    </button>
    </div> </div> </li>


    后台获取:

     string audittype = Request.Form["audittype"];
    if (audittype == "cancel")
                {
                    string refreshTab = Request.Form["refreshTab"];
                    WorkflowCancel(BusinessId);
                    return ReutrnSuccessStr("200", "撤销成功", refreshTab, "closeCurrent");
                }
    else if(audittype=="audit" )
    {
                  string taskid = Request["taskid"];
                    string Remark = Request.Form["Remark"] == null ? "" : Request.Form["Remark"];
                    Remark = Maxuni.Util.StringUtil.GetFilerStr(Remark);
                    string tabname = Request.Form["tabname"] == null ? "" : Request.Form["tabname"];
                    string DealwithResult = Request.Form["DealwithResult"] == null ? "1" : Request.Form["DealwithResult"];
                    string jumpWorkflowid = Request.Form["NodeRoleName"] == null ? "" : Request.Form["NodeRoleName"];
                    bool isSendMsg = Request.Form["isSendMsg"] == "on" ? true : false;
                    WorkflowJumpByRole(taskid, DealwithResult, jumpWorkflowid, Remark.Replace("'", """), isSendMsg);
                    string IsHasNextNode = Request.Form["IsHasNextNode"];
                    if (IsHasNextNode == "no" && DealwithResult == "1")//如果审批已完成
                    {
                        AuditCompleteSendMessage(taskid);
                        SaveOProcessRequisitionEmit(BusinessId, 0, mouldNo);
                    }
                    return ReutrnSuccessStr("200", "提交成功", "", "closeCurrent");
                }
    }
  • 相关阅读:
    mysql允许远程访问
    ubuntu pip install MySQL-python mysql_config not found
    ubuntu 阿里云源
    V
    KMP算法之next函数解释(大量的反证法 和数学归纳法来袭)
    日常ACM题目
    F
    J
    中缀表达式求值 ,中缀表达转化为后缀表达式求值,
    数据结构
  • 原文地址:https://www.cnblogs.com/liuwj/p/3421368.html
Copyright © 2011-2022 走看看