Authored by 姜敏

添加校验信息

@@ -107,6 +107,7 @@ var getNewLists = function (modelLists, callback) { @@ -107,6 +107,7 @@ var getNewLists = function (modelLists, callback) {
107 //详情模态 107 //详情模态
108 var Bll = { 108 var Bll = {
109 toast: function (url, item) { 109 toast: function (url, item) {
  110 +
110 getAllInfo(item.productSkn, item.maxSortId,function (data) { 111 getAllInfo(item.productSkn, item.maxSortId,function (data) {
111 var a = new common.dialog({ 112 var a = new common.dialog({
112 title: "试穿信息", 113 title: "试穿信息",
@@ -82,16 +82,16 @@ var Bll = { @@ -82,16 +82,16 @@ var Bll = {
82 //验证身高 82 //验证身高
83 e.on("validate", function () { 83 e.on("validate", function () {
84 var height = $.trim($("#height").val()); 84 var height = $.trim($("#height").val());
85 - if (height>250) {  
86 - return "身高值应小于250" 85 + if (height>250||height<100) {
  86 + return "身高值范围为100~250"
87 } 87 }
88 return true; 88 return true;
89 }); 89 });
90 //验证体重 90 //验证体重
91 e.on("validate", function () { 91 e.on("validate", function () {
92 var weight = $.trim($("#weight").val()); 92 var weight = $.trim($("#weight").val());
93 - if (weight>200) {  
94 - return "体重值应小于200" 93 + if (weight>200||weight<10) {
  94 + return "体重值范围为10~200"
95 } 95 }
96 return true; 96 return true;
97 }); 97 });
@@ -103,16 +103,16 @@ var Bll = { @@ -103,16 +103,16 @@ var Bll = {
103 //验证身高 103 //验证身高
104 e.on("validate", function () { 104 e.on("validate", function () {
105 var height = $.trim($("#height").val()); 105 var height = $.trim($("#height").val());
106 - if (height>250) {  
107 - return "身高值应小于250" 106 + if (height>250||height<100) {
  107 + return "身高值范围为100~250"
108 } 108 }
109 return true; 109 return true;
110 }); 110 });
111 //验证体重 111 //验证体重
112 e.on("validate", function () { 112 e.on("validate", function () {
113 var weight = $.trim($("#weight").val()); 113 var weight = $.trim($("#weight").val());
114 - if (weight>200) {  
115 - return "体重值应小于200" 114 + if (weight>200||weight<10) {
  115 + return "体重值范围为10~200"
116 } 116 }
117 return true; 117 return true;
118 }); 118 });
@@ -50,45 +50,55 @@ @@ -50,45 +50,55 @@
50 </div> 50 </div>
51 51
52 <script type="text/template" id="template"> 52 <script type="text/template" id="template">
53 - <div>  
54 - <span>SKN:[[productSkn]]</span>  
55 - <span>产品名称:[[productName]]</span>  
56 - <br> 53 + <div id="baseform" style="height: 400px;overflow: auto">
  54 + <div>
  55 + <span class="col-sm-2">SKN:&nbsp;[[productSkn]]</span>
  56 + <span class="col-sm-6 pull-left">产品名称:&nbsp;[[productName]]</span>
  57 + <br>
  58 + </div>
  59 + <table class="table table-bordered">
  60 + <thead>
  61 + <tr>
  62 + <th>模特名</th>
  63 + <th>试穿尺码</th>
  64 + <th>试穿描述</th>
  65 + <th>试穿备注</th>
  66 + </tr>
  67 + </thead>
  68 + <tbody>
  69 + [[each modelLists as item index]]
  70 + <tr>
  71 + <th>
  72 + <span>[[item.modelName]]</span>
  73 + </th>
  74 + <th>
  75 + <select name="fit_size" data-name="fit_size" data-index="[[index]]" title="" class="select2-offscreen brandBtn-group fit_size tryInfo1">
  76 + <option value='[[item.tryInfo.fit_size]]'>[[item.tryInfo.fit_size||'请选择试穿尺码']]</option>
  77 + </select>
  78 + </th>
  79 + <th>
  80 + [[if item.tryInfo.feel_id]]
  81 + <select name="status" data-name="feel_id" data-index="[[index]]" title="" class="form-controller col-sm-8 tryInfo1">
  82 + <option value="[[item.tryInfo.feel_id]]">[[item.tryInfo.fell_name]]</option>
  83 + </select>
  84 + [[else]]
  85 + <select name="status" data-name="feel_id" data-index="[[index]]" title="" class="form-controller col-sm-8 tryInfo1">
  86 + <option value="-1">[['请选择试穿描述']]</option>
  87 + <option value="1">[['合适']]</option>
  88 + <option value="2">[['偏大']]</option>
  89 + <option value="3">[['偏小']]</option>
  90 + </select>
  91 + [[/if]]
  92 + </th>
  93 + <th>
  94 + <input type="text" data-name="fit_remark" data-index="[[index]]" value="[[item.tryInfo.fit_remark]]" name="fit_remark" id="fit_remark" class="tryInfo1 "
  95 + placeholder="添加备注,不超过12字">
  96 + </th>
  97 + </tr>
  98 + [[/each]]
  99 + </tbody>
  100 + </table>
57 </div> 101 </div>
58 - <table class="table table-bordered">  
59 - <tbody>  
60 - [[each modelLists as item index]]  
61 - <tr>  
62 - <th>  
63 - <span>[[item.modelName]]</span>  
64 - </th>  
65 - <th>  
66 - <select name="fit_size" data-name="fit_size" data-index="[[index]]" title="" class="select2-offscreen brandBtn-group fit_size tryInfo1">  
67 - <option value='[[item.tryInfo.fit_size]]'>[[item.tryInfo.fit_size||'请选择试穿尺码']]</option>  
68 - </select>  
69 - </th>  
70 - <th>  
71 - [[if item.tryInfo.feel_id]]  
72 - <select name="status" data-name="feel_id" data-index="[[index]]" title="" class="form-controller col-sm-8 tryInfo1">  
73 - <option value="[[item.tryInfo.feel_id]]">[[item.tryInfo.fell_name]]</option>  
74 - </select>  
75 - [[else]]  
76 - <select name="status" data-name="feel_id" data-index="[[index]]" title="" class="form-controller col-sm-8 tryInfo1">  
77 - <option value="-1">[['请选择试穿描述']]</option>  
78 - <option value="1">[['合适']]</option>  
79 - <option value="2">[['偏大']]</option>  
80 - <option value="3">[['偏小']]</option>  
81 - </select>  
82 - [[/if]]  
83 - </th>  
84 - <th>  
85 - <input type="text" data-name="fit_remark" data-index="[[index]]" value="[[item.tryInfo.fit_remark]]" name="fit_remark" id="fit_remark" class="tryInfo1 "  
86 - placeholder="添加备注,不超过12字">  
87 - </th>  
88 - </tr>  
89 - [[/each]]  
90 - </tbody>  
91 - </table>  
92 </script> 102 </script>
93 103
94 104
@@ -141,7 +141,7 @@ @@ -141,7 +141,7 @@
141 <label class="col-sm-2 control-label">状态</label> 141 <label class="col-sm-2 control-label">状态</label>
142 <div class="col-sm-8"> 142 <div class="col-sm-8">
143 <label style="cursor: pointer;"><input type="radio" name="status" value="1">启用</label> 143 <label style="cursor: pointer;"><input type="radio" name="status" value="1">启用</label>
144 - <label style="cursor: pointer;"><input type="radio" name="status" value="2">禁用</label> 144 + <label style="cursor: pointer;"><input type="radio" name="status" value="0">禁用</label>
145 </div> 145 </div>
146 <input type="hidden" id="status" value="[[status]]" for="radio"> 146 <input type="hidden" id="status" value="[[status]]" for="radio">
147 </div> 147 </div>
@@ -61,7 +61,7 @@ @@ -61,7 +61,7 @@
61 <label class="col-sm-2 control-label" for="Sku">SKU</label> 61 <label class="col-sm-2 control-label" for="Sku">SKU</label>
62 62
63 <div class="col-sm-6"> 63 <div class="col-sm-6">
64 - <input type="text" value="[[productSku]]" class="form-control" id="Sku"/> 64 + <input type="text" value="[[productSku]]" class="form-control" id="Sku" placeholder="SKU" required="required"/>
65 </div> 65 </div>
66 </div> 66 </div>
67 [[else]] 67 [[else]]
@@ -83,7 +83,7 @@ @@ -83,7 +83,7 @@
83 <li class="cover-image-item fileinput-button"> 83 <li class="cover-image-item fileinput-button">
84 <div class="goods-img"> 84 <div class="goods-img">
85 <a class="fileinput-button-icon" href="javascript:void(0);">+</a> 85 <a class="fileinput-button-icon" href="javascript:void(0);">+</a>
86 - <input type="file" class="goods-img-upload picfile" name="picfile"> 86 + <input type="file" class="goods-img-upload picfile" name="picfile" required="required" placeholder="图片">
87 </div> 87 </div>
88 </li> 88 </li>
89 [[/if]] 89 [[/if]]