|
@@ -9,9 +9,24 @@
|
|
//$("#name").focus();
|
|
//$("#name").focus();
|
|
$("#inputForm").validate({
|
|
$("#inputForm").validate({
|
|
submitHandler: function (form) {
|
|
submitHandler: function (form) {
|
|
- var places = $(".input-xlarge").val();
|
|
|
|
- if (!(/(^[1-9]\d*$)/.test(places))) {
|
|
|
|
- alert("金额应为正整数,如 100");
|
|
|
|
|
|
+ var places1 = $(".input-xlarge1").val();
|
|
|
|
+ if (!(/(^[1-9]\d*$)/.test(places1))) {
|
|
|
|
+ alert("套裁1售价应为正整数且不能为0,如100");
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ var places2 = $(".input-xlarge2").val();
|
|
|
|
+ if (!(/(^[1-9]\d*$)/.test(places2))) {
|
|
|
|
+ alert("套裁2售价应为正整数且不能为0,如100");
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ var places3 = $(".input-xlarge3").val();
|
|
|
|
+ if (!(/(^[1-9]\d*$)/.test(places3))) {
|
|
|
|
+ alert("套裁3售价应为正整数且不能为0,如100");
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ var places4 = $(".input-xlarge4").val();
|
|
|
|
+ if (!(/(^[1-9]\d*$)/.test(places4))) {
|
|
|
|
+ alert("美豆比例应为正整数且不能为0,如100");
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
loading('正在提交,请稍等...');
|
|
loading('正在提交,请稍等...');
|
|
@@ -29,7 +44,28 @@
|
|
});
|
|
});
|
|
});
|
|
});
|
|
|
|
|
|
-
|
|
|
|
|
|
+ function checkNum(){
|
|
|
|
+ var places1 = $(".input-xlarge1").val();
|
|
|
|
+ if (!(/(^[1-9]\d*$)/.test(places1))) {
|
|
|
|
+ alert("套裁1售价应为正整数且不能为0,如100");
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ var places2 = $(".input-xlarge2").val();
|
|
|
|
+ if (!(/(^[1-9]\d*$)/.test(places2))) {
|
|
|
|
+ alert("套裁2售价应为正整数且不能为0,如100");
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ var places3 = $(".input-xlarge3").val();
|
|
|
|
+ if (!(/(^[1-9]\d*$)/.test(places3))) {
|
|
|
|
+ alert("套裁3售价应为正整数且不能为0,如100");
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ var places4 = $(".input-xlarge4").val();
|
|
|
|
+ if (!(/(^[1-9]\d*$)/.test(places4))) {
|
|
|
|
+ alert("美豆比例应为正整数且不能为0,如100");
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
</script>
|
|
</script>
|
|
</head>
|
|
</head>
|
|
<body>
|
|
<body>
|
|
@@ -41,40 +77,40 @@
|
|
class="form-horizontal">
|
|
class="form-horizontal">
|
|
<form:hidden path="id"/>
|
|
<form:hidden path="id"/>
|
|
<sys:message content="${message}"/>
|
|
<sys:message content="${message}"/>
|
|
-<%-- <div class="control-group">--%>
|
|
|
|
-<%-- <label class="control-label">套餐名称:</label>--%>
|
|
|
|
-<%-- <div class="controls">--%>
|
|
|
|
-<%-- <form:input path="name" htmlEscape="false" maxlength="50" class="input-lab"/>--%>
|
|
|
|
-<%-- </div>--%>
|
|
|
|
-<%-- </div>--%>
|
|
|
|
|
|
+ <%-- <div class="control-group">--%>
|
|
|
|
+ <%-- <label class="control-label">套餐名称:</label>--%>
|
|
|
|
+ <%-- <div class="controls">--%>
|
|
|
|
+ <%-- <form:input path="name" htmlEscape="false" maxlength="50" class="input-lab"/>--%>
|
|
|
|
+ <%-- </div>--%>
|
|
|
|
+ <%-- </div>--%>
|
|
<div class="control-group">
|
|
<div class="control-group">
|
|
<label class="control-label"><span class="help-inline"><font color="red">*</font> </span>套餐1:</label>
|
|
<label class="control-label"><span class="help-inline"><font color="red">*</font> </span>套餐1:</label>
|
|
<div class="controls">
|
|
<div class="controls">
|
|
- 12个月超级会员,售价:<form:input path="price1" htmlEscape="false" class="input-xlarge" style="width: 60px"/>
|
|
|
|
|
|
+ 12个月超级会员,售价:
|
|
|
|
+ <form:input path="price1" htmlEscape="false" class="input-xlarge1" style="width: 60px" onblur="checkNum()"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="control-group">
|
|
<div class="control-group">
|
|
<label class="control-label"><span class="help-inline"><font color="red">*</font> </span>套餐2:</label>
|
|
<label class="control-label"><span class="help-inline"><font color="red">*</font> </span>套餐2:</label>
|
|
<div class="controls">
|
|
<div class="controls">
|
|
- 3个月超级会员,售价:<form:input path="price2" htmlEscape="false" class="input-xlarge" style="width: 60px"/>
|
|
|
|
|
|
+ 3个月超级会员,售价:<form:input path="price2" htmlEscape="false" class="input-xlarge2" style="width: 60px" onblur="checkNum()"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="control-group">
|
|
<div class="control-group">
|
|
<label class="control-label"><span class="help-inline"><font color="red">*</font> </span>套餐3:</label>
|
|
<label class="control-label"><span class="help-inline"><font color="red">*</font> </span>套餐3:</label>
|
|
<div class="controls">
|
|
<div class="controls">
|
|
- 1个月超级会员,售价:<form:input path="price3" htmlEscape="false" class="input-xlarge" style="width: 60px"/>
|
|
|
|
|
|
+ 1个月超级会员,售价:<form:input path="price3" htmlEscape="false" class="input-xlarge3" style="width: 60px" onblur="checkNum()"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="control-group">
|
|
<div class="control-group">
|
|
<label class="control-label"><span class="help-inline"><font color="red">*</font> </span>采美豆兑换套餐:</label>
|
|
<label class="control-label"><span class="help-inline"><font color="red">*</font> </span>采美豆兑换套餐:</label>
|
|
<div class="controls">
|
|
<div class="controls">
|
|
- 采美豆兑换超会员套餐比例为<form:input path="proportion" htmlEscape="false" class="input-xlarge" style="width: 30px"/>:1
|
|
|
|
|
|
+ 采美豆兑换超会员套餐比例为<form:input path="proportion" htmlEscape="false" class="input-xlarge4" style="width: 30px" onblur="checkNum()"/>:1
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-actions">
|
|
<div class="form-actions">
|
|
<input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>
|
|
<input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>
|
|
- <input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
|
|
|
|
</div>
|
|
</div>
|
|
</form:form>
|
|
</form:form>
|
|
</body>
|
|
</body>
|