123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- <%--
- Created by IntelliJ IDEA.
- User: Administrator
- Date: 2020/4/12
- Time: 12:05
- To change this template use File | Settings | File Templates.
- --%>
- <%@ page contentType="text/html;charset=UTF-8" %>
- <%@ include file="/WEB-INF/views/include/taglib.jsp"%>
- <html>
- <head>
- <title>协销人员管理</title>
- <meta name="decorator" content="default"/>
- <script type="text/javascript">
- $(document).ready(function() {
- //$("#name").focus();
- $("#inputForm").validate({
- submitHandler: function(form){
- loading('正在提交,请稍等...');
- form.submit();
- },
- errorContainer: "#messageBox",
- errorPlacement: function(error, element) {
- $("#messageBox").text("输入有误,请先更正。");
- if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
- error.appendTo(element.parent().parent());
- } else {
- error.insertAfter(element);
- }
- }
- });
- });
- function formSubmit() {
- $.ajax({
- //几个参数需要注意一下
- type: "POST",//方法类型
- dataType: "json",//预期服务器返回的数据类型
- url: "${ctx}/new/user/cmSp/cmSpCreate" ,//url
- data: $('#inputForm').serialize(),
- success: function (result) {
- console.log(result);//打印服务端返回的数据(调试用)
- if (result.success) {
- window.location.href="${ctx}/new/user/cmSp/cmSpList";
- } else {
- alert(result.msg);
- }
- },
- error : function() {
- alert("服务异常!");
- }
- });
- }
- </script>
- </head>
- <body>
- <ul class="nav nav-tabs">
- <li><a href="${ctx}/new/user/cmSp/cmSpList/">协销人员列表</a></li>
- <li class="active"><a href="${ctx}/new/user/cmSp/cmSpForm?id=${cmSp.id}"><shiro:hasPermission name="user:newCmClub:edit">${not empty cmSp.id?'编辑':'添加'}</shiro:hasPermission><shiro:lacksPermission name="user:newCmClub:edit">查看</shiro:lacksPermission>协销人员</a></li>
- <li><a href="${ctx}/serviceteam/cmServiceteamRole/">协销小组</a></li>
- <li><a href="${ctx}/new/user/cmSp/leader/">协销总管理员</a></li>
- </ul><br/>
- <form id="inputForm" onsubmit="return false" action="##" method="post" class="form-horizontal">
- <div class="control-group">
- <label class="control-label"><span class="help-inline"><font color="red">*</font> </span>协销名称</label>
- <div class="controls">
- <input name="linkMan" type="text" htmlEscape="false" maxlength="11" class="input-xlarge required"/>
- </div>
- </div>
- <div class="control-group">
- <label class="control-label"><span class="help-inline"><font color="red">*</font> </span>手机号</label>
- <div class="controls">
- <input name="mobile" type="number" htmlEscape="false" maxlength="11" class="input-xlarge required"/>
- </div>
- </div>
- <div class="control-group">
- <label class="control-label"><span class="help-inline"><font color="red">*</font> </span>登录密码</label>
- <div class="controls">
- <input name="password" type="text" htmlEscape="false" maxlength="11" class="input-xlarge required"/>
- </div>
- </div>
- <div class="control-group">
- <label class="control-label"><span class="help-inline"><font color="red">*</font> </span>确认密码</label>
- <div class="controls">
- <input name="passWordConfirm" type="text" htmlEscape="false" maxlength="11" class="input-xlarge required"/>
- </div>
- </div>
- <div class="control-group">
- <label class="control-label"><span class="help-inline"><font color="red">*</font> </span>职位</label>
- <div class="controls">
- <%--<input name="duty" htmlEscape="false" maxlength="11" class="input-xlarge required"/>--%>
- <select name="duty">
- <option value="0">协销员工</option>
- <c:if test="${hasManager}==0">
- <option value="1">协销经理</option>
- </c:if>
- </select>
- </div>
- </div>
- <div class="form-actions">
- <shiro:hasPermission name="user:newCmClub:edit">
- <input id="btnSubmit" class="btn btn-primary" type="button" onclick="formSubmit()" value="保 存"/>
- </shiro:hasPermission>
- <input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
- </div>
- </form>
- </body>
- </html>
|