Commit 43b35f93 by 梁建民

js

parent b9fb0596
......@@ -32,14 +32,14 @@
<span class="input_title lineBlock">*型号:</span>
<div class="input_parent">
<input type="text" name="goods_name" placeholder="请输入商品型号" class="input boxsiz"
lay-verify="required|limitLength">
lay-verify="required|limitLength|limitLengthThree">
</div>
</div>
<div class="brand input_div ">
<span class="input_title lineBlock">*品牌:</span>
<div class="input_parent">
<input type="text" name="brand_name" placeholder="请输入品牌" class="input boxsiz"
lay-verify="required">
lay-verify="required|limitLengthTwo">
</div>
</div>
<div class="fz input_div ">
......@@ -77,7 +77,7 @@
title="期货" checked id="daytext">
<div class="lineBlock" id="day">
<input type="text" placeholder="输入时间" class="boxsiz day_input input"
lay-verify="required" name="day">
lay-verify="required|limitLengthLgThree" name="day">
<i class="day"></i>
</div>
</div>
......@@ -128,7 +128,7 @@
<script src="__PUBLIC__/js/goodmanage/uploadsingle.js"></script>
<script type="text/html" id="deliveryHtml">
{{# if (d=='期货') { }}
<input type="text" placeholder="输入时间" class="boxsiz day_input input" lay-verify="required|number"
<input type="text" placeholder="输入时间" class="boxsiz day_input input" lay-verify="required|number|limitLengthLgThree"
name="day">
<i class="day"></i>
{{# } }}
......
......@@ -41,14 +41,14 @@
<span class="input_title lineBlock">*型号:</span>
<div class="input_parent">
<input type="text" name="goods_name" placeholder="请输入商品型号" class="input boxsiz"
lay-verify="required|limitLength">
lay-verify="required|limitLengthThree">
</div>
</div>
<div class="brand input_div ">
<span class="input_title lineBlock">*品牌:</span>
<div class="input_parent">
<input type="text" name="brand_name" placeholder="请输入品牌" class="input boxsiz"
lay-verify="required">
lay-verify="required|limitLengthTwo">
</div>
</div>
......@@ -86,7 +86,7 @@
id="daytext">
<div class="lineBlock" id="day">
<input type="text" placeholder="输入时间" class="boxsiz day_input input"
lay-verify="required|number" name="day">
lay-verify="required|number|limitLengthLgThree" name="day">
<i class="day"></i>
</div>
</div>
......@@ -235,7 +235,7 @@
</script>
<script type="text/html" id="deliveryHtml">
{{# if (d=='期货') { }}
<input type="text" placeholder="输入时间" class="boxsiz day_input input" lay-verify="required|number" name="day">
<input type="text" placeholder="输入时间" class="boxsiz day_input input" lay-verify="required|number|limitLengthLgThree" name="day">
<i class="day"></i>
{{# } }}
</script>
......
......@@ -29,14 +29,14 @@
<span class="input_title lineBlock">*型号:</span>
<div class="input_parent">
<input type="text" name="goods_name" placeholder="请输入商品型号"
class="input boxsiz" lay-verify="required|limitLength">
class="input boxsiz" lay-verify="required|limitLengthThree">
</div>
</div>
<div class="brand input_div ">
<span class="input_title lineBlock">*品牌:</span>
<div class="input_parent">
<input type="text" name="brand_name" placeholder="请输入品牌"
class="input boxsiz" lay-verify="required">
class="input boxsiz" lay-verify="required|limitLengthTwo">
</div>
</div>
<div class="fz input_div ">
......@@ -68,13 +68,10 @@
<div class="hq input_div">
<span class="input_title lineBlock">*货期:</span>
<div class="input_parent" id="delivery">
<input type="radio" name="delivery_time" lay-filter="delivery" value="现货"
title="现货">
<input type="radio" name="delivery_time" lay-filter="delivery" value="期货"
title="期货" checked id="daytext">
<input type="radio" name="delivery_time" lay-filter="delivery" value="现货" title="现货"/>
<input type="radio" name="delivery_time" lay-filter="delivery" value="期货" title="期货" checked id="daytext"/>
<div class="lineBlock" id="day">
<input type="text" placeholder="输入时间" class="boxsiz day_input input"
lay-verify="required|number" name="day">
<input type="text" placeholder="输入时间" class="boxsiz day_input input" lay-verify="required|number|limitLengthLgThree" name="day" />
<i class="day"></i>
</div>
</div>
......@@ -135,7 +132,7 @@
<script src="__PUBLIC__/js/quoteprice/releaseinquiry.js"></script>
<script type="text/html" id="deliveryHtml">
{{# if (d=='期货') { }}
<input type="text" placeholder="输入时间" class="boxsiz day_input input" lay-verify="required|number" name="day">
<input type="text" placeholder="输入时间" class="boxsiz day_input input" lay-verify="required|number|limitLengthLgThree" name="day">
<i class="day"></i>
{{# } }}
</script>
......
......@@ -297,9 +297,19 @@
});
layui.form.verify({
limitLength: function(value, item){
if(value.length < 3){
return '型号长度必须大于三'
limitLengthThree: function (value, item) {
if (value.length < 3) {
return '型号不能小于3个字符'
}
},
limitLengthTwo: function (value, item) {
if (value.length < 3) {
return '品牌不能小于2个字符'
}
},
limitLengthLgThree: function (value, item) {
if (value.length > 3) {
return '货期不能大于3个字符'
}
}
});
......
......@@ -195,9 +195,19 @@ $(function () {
});
layui.form.verify({
limitLength: function(value, item){
if(value.length < 3){
return '型号长度必须大于三'
limitLengthThree: function (value, item) {
if (value.length < 3) {
return '型号不能小于3个字符'
}
},
limitLengthTwo: function (value, item) {
if (value.length < 3) {
return '品牌不能小于2个字符'
}
},
limitLengthLgThree: function (value, item) {
if (value.length > 3) {
return '货期不能大于3个字符'
}
}
});
......
......@@ -201,9 +201,19 @@
layui.form.verify({
limitLength: function(value, item){
if(value.length < 3){
return '型号长度必须大于三'
limitLengthThree: function (value, item) {
if (value.length < 3) {
return '型号不能小于3个字符'
}
},
limitLengthTwo: function (value, item) {
if (value.length < 3) {
return '品牌不能小于2个字符'
}
},
limitLengthLgThree: function (value, item) {
if (value.length > 3) {
return '货期不能大于3个字符'
}
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment