Merge branch 'yohobuy_portal_dev_v4.4_20160525' into feature/yohobuy_portal_dev_v4.4_shops_20160527
Showing
6 changed files
with
30 additions
and
33 deletions
@@ -872,7 +872,10 @@ $(document).on("click", "#submit", function () { | @@ -872,7 +872,10 @@ $(document).on("click", "#submit", function () { | ||
872 | data.push(item1); | 872 | data.push(item1); |
873 | }); | 873 | }); |
874 | } | 874 | } |
875 | + if(data.length!=0){ | ||
875 | item.contentData.data=data; | 876 | item.contentData.data=data; |
877 | + } | ||
878 | + | ||
876 | item.contentData = common.util.__ArrayToObj(item.contentData); | 879 | item.contentData = common.util.__ArrayToObj(item.contentData); |
877 | return item; | 880 | return item; |
878 | }); | 881 | }); |
@@ -21,8 +21,8 @@ var g = new common.grid({ | @@ -21,8 +21,8 @@ var g = new common.grid({ | ||
21 | modelName: common.util.__input('content-filter1'), | 21 | modelName: common.util.__input('content-filter1'), |
22 | beginTime:((new Date($('#beginTime').val())).getTime())/1000||"", | 22 | beginTime:((new Date($('#beginTime').val())).getTime())/1000||"", |
23 | endTime: ((new Date($('#endTime').val())).getTime())/1000||"", | 23 | endTime: ((new Date($('#endTime').val())).getTime())/1000||"", |
24 | - modelType:parseInt($("#aa").val()), | ||
25 | - status: parseInt($("#bb").val()) | 24 | + modelType:parseInt($("#aa").val()) |
25 | + // status: parseInt($("#bb").val()) | ||
26 | }; | 26 | }; |
27 | }, | 27 | }, |
28 | //列表显示 | 28 | //列表显示 |
@@ -244,12 +244,14 @@ function attributeOp(prefix, url, item) { | @@ -244,12 +244,14 @@ function attributeOp(prefix, url, item) { | ||
244 | } else { | 244 | } else { |
245 | // 显示属性列表 | 245 | // 显示属性列表 |
246 | if (propVlaueArr) { | 246 | if (propVlaueArr) { |
247 | + var count=0; | ||
247 | propVlaueArr.forEach(function (pv) { | 248 | propVlaueArr.forEach(function (pv) { |
248 | if (!pv.name) { | 249 | if (!pv.name) { |
249 | - a.$tip('属性值不能为空'); | ||
250 | - return false; | ||
251 | - } | 250 | + count++; |
252 | 251 | ||
252 | + } | ||
253 | + }); | ||
254 | + if(!count){ | ||
253 | a.submit(url+"?_datetime_="+Date.now(), function (option) { | 255 | a.submit(url+"?_datetime_="+Date.now(), function (option) { |
254 | option.data.categoryId = item.categoryId; | 256 | option.data.categoryId = item.categoryId; |
255 | option.data.attributeId = item.attributeId; | 257 | option.data.attributeId = item.attributeId; |
@@ -283,7 +285,11 @@ function attributeOp(prefix, url, item) { | @@ -283,7 +285,11 @@ function attributeOp(prefix, url, item) { | ||
283 | a.$tip(res.message); | 285 | a.$tip(res.message); |
284 | } | 286 | } |
285 | }); | 287 | }); |
286 | - }); | 288 | + }else { |
289 | + a.$tip('属性值不能为空'); | ||
290 | + return false; | ||
291 | + } | ||
292 | + | ||
287 | } else { | 293 | } else { |
288 | a.$tip('属性值不能为空'); | 294 | a.$tip('属性值不能为空'); |
289 | return false; | 295 | return false; |
@@ -161,29 +161,6 @@ function _makeMenu (data) { | @@ -161,29 +161,6 @@ function _makeMenu (data) { | ||
161 | } | 161 | } |
162 | menu.push(item); | 162 | menu.push(item); |
163 | } | 163 | } |
164 | - // _.forEach(data,function(v){ | ||
165 | - // var item = { | ||
166 | - // title:v.menu_name, | ||
167 | - // } | ||
168 | - // if(v.parent_id === "0") { | ||
169 | - // item.parent = 'menu-template'; | ||
170 | - // var itemSubs = []; | ||
171 | - // _.forEach(v.sub,function(val) { | ||
172 | - // console.log(v.sub); | ||
173 | - // var sub = { | ||
174 | - // title:val.menu_name, | ||
175 | - // href:val.menu_url, | ||
176 | - // icon: 'list-alt' | ||
177 | - // } | ||
178 | - // right[val.menu_url] = true; | ||
179 | - // itemSubs.push(sub); | ||
180 | - // }); | ||
181 | - | ||
182 | - // item.menu = itemSubs; | ||
183 | - // } | ||
184 | - // menu.push(item); | ||
185 | - // }); | ||
186 | - | ||
187 | return { | 164 | return { |
188 | menu:menu, | 165 | menu:menu, |
189 | right:right | 166 | right:right |
@@ -137,15 +137,15 @@ | @@ -137,15 +137,15 @@ | ||
137 | <input type="file" value="[[modelCard]]" class="form-control modelCard" id="modelCard" name="modelCard" placeholder="模特卡" required="required"/> | 137 | <input type="file" value="[[modelCard]]" class="form-control modelCard" id="modelCard" name="modelCard" placeholder="模特卡" required="required"/> |
138 | </div> | 138 | </div> |
139 | </div> | 139 | </div> |
140 | - [[if __state=='update']] | 140 | + |
141 | <div class="form-group"> | 141 | <div class="form-group"> |
142 | <label class="col-sm-2 control-label">状态</label> | 142 | <label class="col-sm-2 control-label">状态</label> |
143 | <div class="col-sm-8"> | 143 | <div class="col-sm-8"> |
144 | - <label style="cursor: pointer;"><input type="radio" name="status" value="1">启用</label> | 144 | + <label style="cursor: pointer;"><input type="radio" name="status" checked value="1">启用</label> |
145 | <label style="cursor: pointer;"><input type="radio" name="status" value="0">禁用</label> | 145 | <label style="cursor: pointer;"><input type="radio" name="status" value="0">禁用</label> |
146 | </div> | 146 | </div> |
147 | - <input type="hidden" id="status" value="[[status]]" for="radio"> | 147 | + <input type="hidden" id="status" value="[[status||1]]" for="radio" required> |
148 | </div> | 148 | </div> |
149 | - [[/if]] | 149 | + |
150 | </div> | 150 | </div> |
151 | </script> | 151 | </script> |
@@ -12,6 +12,16 @@ | @@ -12,6 +12,16 @@ | ||
12 | <i class="fa fa-suitcase"></i> | 12 | <i class="fa fa-suitcase"></i> |
13 | <span>{{title}}</span> | 13 | <span>{{title}}</span> |
14 | </a> | 14 | </a> |
15 | + {{#if sub}} | ||
16 | + {{#sub}} | ||
17 | + <li style="margin-left: 20px;"> | ||
18 | + <a {{#if module_url}}href="{{module_url}}"{{/if}}> | ||
19 | + <i class="fa fa-suitcase"></i> | ||
20 | + <span>{{resource_name}}</span> | ||
21 | + </a> | ||
22 | + </li> | ||
23 | + {{/sub}} | ||
24 | + {{/if}} | ||
15 | </li> | 25 | </li> |
16 | {{/menu}} | 26 | {{/menu}} |
17 | </ul> | 27 | </ul> |
@@ -19,3 +29,4 @@ | @@ -19,3 +29,4 @@ | ||
19 | </a> | 29 | </a> |
20 | </li> | 30 | </li> |
21 | {{/menu}} | 31 | {{/menu}} |
32 | + |
-
Please register or login to post a comment