Authored by 姜敏

添加校验信息

... ... @@ -107,6 +107,7 @@ var getNewLists = function (modelLists, callback) {
//详情模态
var Bll = {
toast: function (url, item) {
getAllInfo(item.productSkn, item.maxSortId,function (data) {
var a = new common.dialog({
title: "试穿信息",
... ...
... ... @@ -82,16 +82,16 @@ var Bll = {
//验证身高
e.on("validate", function () {
var height = $.trim($("#height").val());
if (height>250) {
return "身高值应小于250"
if (height>250||height<100) {
return "身高值范围为100~250"
}
return true;
});
//验证体重
e.on("validate", function () {
var weight = $.trim($("#weight").val());
if (weight>200) {
return "体重值应小于200"
if (weight>200||weight<10) {
return "体重值范围为10~200"
}
return true;
});
... ...
... ... @@ -103,16 +103,16 @@ var Bll = {
//验证身高
e.on("validate", function () {
var height = $.trim($("#height").val());
if (height>250) {
return "身高值应小于250"
if (height>250||height<100) {
return "身高值范围为100~250"
}
return true;
});
//验证体重
e.on("validate", function () {
var weight = $.trim($("#weight").val());
if (weight>200) {
return "体重值应小于200"
if (weight>200||weight<10) {
return "体重值范围为10~200"
}
return true;
});
... ...
... ... @@ -50,45 +50,55 @@
</div>
<script type="text/template" id="template">
<div>
<span>SKN:[[productSkn]]</span>
<span>产品名称:[[productName]]</span>
<br>
<div id="baseform" style="height: 400px;overflow: auto">
<div>
<span class="col-sm-2">SKN:&nbsp;[[productSkn]]</span>
<span class="col-sm-6 pull-left">产品名称:&nbsp;[[productName]]</span>
<br>
</div>
<table class="table table-bordered">
<thead>
<tr>
<th>模特名</th>
<th>试穿尺码</th>
<th>试穿描述</th>
<th>试穿备注</th>
</tr>
</thead>
<tbody>
[[each modelLists as item index]]
<tr>
<th>
<span>[[item.modelName]]</span>
</th>
<th>
<select name="fit_size" data-name="fit_size" data-index="[[index]]" title="" class="select2-offscreen brandBtn-group fit_size tryInfo1">
<option value='[[item.tryInfo.fit_size]]'>[[item.tryInfo.fit_size||'请选择试穿尺码']]</option>
</select>
</th>
<th>
[[if item.tryInfo.feel_id]]
<select name="status" data-name="feel_id" data-index="[[index]]" title="" class="form-controller col-sm-8 tryInfo1">
<option value="[[item.tryInfo.feel_id]]">[[item.tryInfo.fell_name]]</option>
</select>
[[else]]
<select name="status" data-name="feel_id" data-index="[[index]]" title="" class="form-controller col-sm-8 tryInfo1">
<option value="-1">[['请选择试穿描述']]</option>
<option value="1">[['合适']]</option>
<option value="2">[['偏大']]</option>
<option value="3">[['偏小']]</option>
</select>
[[/if]]
</th>
<th>
<input type="text" data-name="fit_remark" data-index="[[index]]" value="[[item.tryInfo.fit_remark]]" name="fit_remark" id="fit_remark" class="tryInfo1 "
placeholder="添加备注,不超过12字">
</th>
</tr>
[[/each]]
</tbody>
</table>
</div>
<table class="table table-bordered">
<tbody>
[[each modelLists as item index]]
<tr>
<th>
<span>[[item.modelName]]</span>
</th>
<th>
<select name="fit_size" data-name="fit_size" data-index="[[index]]" title="" class="select2-offscreen brandBtn-group fit_size tryInfo1">
<option value='[[item.tryInfo.fit_size]]'>[[item.tryInfo.fit_size||'请选择试穿尺码']]</option>
</select>
</th>
<th>
[[if item.tryInfo.feel_id]]
<select name="status" data-name="feel_id" data-index="[[index]]" title="" class="form-controller col-sm-8 tryInfo1">
<option value="[[item.tryInfo.feel_id]]">[[item.tryInfo.fell_name]]</option>
</select>
[[else]]
<select name="status" data-name="feel_id" data-index="[[index]]" title="" class="form-controller col-sm-8 tryInfo1">
<option value="-1">[['请选择试穿描述']]</option>
<option value="1">[['合适']]</option>
<option value="2">[['偏大']]</option>
<option value="3">[['偏小']]</option>
</select>
[[/if]]
</th>
<th>
<input type="text" data-name="fit_remark" data-index="[[index]]" value="[[item.tryInfo.fit_remark]]" name="fit_remark" id="fit_remark" class="tryInfo1 "
placeholder="添加备注,不超过12字">
</th>
</tr>
[[/each]]
</tbody>
</table>
</script>
... ...
... ... @@ -141,7 +141,7 @@
<label class="col-sm-2 control-label">状态</label>
<div class="col-sm-8">
<label style="cursor: pointer;"><input type="radio" name="status" value="1">启用</label>
<label style="cursor: pointer;"><input type="radio" name="status" value="2">禁用</label>
<label style="cursor: pointer;"><input type="radio" name="status" value="0">禁用</label>
</div>
<input type="hidden" id="status" value="[[status]]" for="radio">
</div>
... ...
... ... @@ -61,7 +61,7 @@
<label class="col-sm-2 control-label" for="Sku">SKU</label>
<div class="col-sm-6">
<input type="text" value="[[productSku]]" class="form-control" id="Sku"/>
<input type="text" value="[[productSku]]" class="form-control" id="Sku" placeholder="SKU" required="required"/>
</div>
</div>
[[else]]
... ... @@ -83,7 +83,7 @@
<li class="cover-image-item fileinput-button">
<div class="goods-img">
<a class="fileinput-button-icon" href="javascript:void(0);">+</a>
<input type="file" class="goods-img-upload picfile" name="picfile">
<input type="file" class="goods-img-upload picfile" name="picfile" required="required" placeholder="图片">
</div>
</li>
[[/if]]
... ...