|
@@ -34,8 +34,8 @@ $("#basicInfo").html(common.util.__template2($("#template2").html(),RESPONSEDATA |
|
@@ -34,8 +34,8 @@ $("#basicInfo").html(common.util.__template2($("#template2").html(),RESPONSEDATA |
34
|
var Bll={
|
34
|
var Bll={
|
35
|
validateSort:function(){
|
35
|
validateSort:function(){
|
36
|
var select=tabTree.getAddress();
|
36
|
var select=tabTree.getAddress();
|
37
|
- if(select[2]&&select[2].id){
|
|
|
38
|
- return select[2].id;
|
37
|
+ if(select[select.length-1]&&select[select.length-1].id){
|
|
|
38
|
+ return select[select.length-1].id;
|
39
|
}
|
39
|
}
|
40
|
return false;
|
40
|
return false;
|
41
|
},
|
41
|
},
|
|
@@ -54,7 +54,8 @@ var SORTDATA={ |
|
@@ -54,7 +54,8 @@ var SORTDATA={ |
54
|
datas:[
|
54
|
datas:[
|
55
|
{id:RESPONSEDATA.maxSortId,sortName:RESPONSEDATA.maxSortName},
|
55
|
{id:RESPONSEDATA.maxSortId,sortName:RESPONSEDATA.maxSortName},
|
56
|
{id:RESPONSEDATA.middleSortId,sortName:RESPONSEDATA.middleSortName},
|
56
|
{id:RESPONSEDATA.middleSortId,sortName:RESPONSEDATA.middleSortName},
|
57
|
- {id:RESPONSEDATA.smallSortId,sortName:RESPONSEDATA.smallSortName}
|
57
|
+ {id:RESPONSEDATA.smallSortId,sortName:RESPONSEDATA.smallSortName},
|
|
|
58
|
+ {id:RESPONSEDATA.sortId,sortName:RESPONSEDATA.sortName}
|
58
|
],
|
59
|
],
|
59
|
complete:function(data){
|
60
|
complete:function(data){
|
60
|
if(data.length>2){
|
61
|
if(data.length>2){
|
|
@@ -127,7 +128,6 @@ var g=new common.grid({ |
|
@@ -127,7 +128,6 @@ var g=new common.grid({ |
127
|
item.goodsSizeList=item.goodsSizeList||[$.extend({},ENUM.goodsSizeList)];
|
128
|
item.goodsSizeList=item.goodsSizeList||[$.extend({},ENUM.goodsSizeList)];
|
128
|
|
129
|
|
129
|
var ISXIANGO=common.util.__input("isLimitbuy")=="Y"?true:false;
|
130
|
var ISXIANGO=common.util.__input("isLimitbuy")=="Y"?true:false;
|
130
|
- console.log(item.goodsSizeList);
|
|
|
131
|
html.push(common.util.__template2($("#template").html(),{index:item.__index,ISXIANGO:ISXIANGO,goodsSizeList:item.goodsSizeList}));
|
131
|
html.push(common.util.__template2($("#template").html(),{index:item.__index,ISXIANGO:ISXIANGO,goodsSizeList:item.goodsSizeList}));
|
132
|
html.push('</div>');
|
132
|
html.push('</div>');
|
133
|
return html.join('');
|
133
|
return html.join('');
|
|
@@ -155,7 +155,6 @@ g.init(g.__rows); |
|
@@ -155,7 +155,6 @@ g.init(g.__rows); |
155
|
|
155
|
|
156
|
|
156
|
|
157
|
g.__e.on("callback", function(obj) {
|
157
|
g.__e.on("callback", function(obj) {
|
158
|
- console.log(obj);
|
|
|
159
|
if(/^file_onComplete/.test(obj.key)){
|
158
|
if(/^file_onComplete/.test(obj.key)){
|
160
|
var _index=obj.key.replace(/^file_onComplete_file__/,'');
|
159
|
var _index=obj.key.replace(/^file_onComplete_file__/,'');
|
161
|
g.__rows[_index].goodsColorImage=obj.data;
|
160
|
g.__rows[_index].goodsColorImage=obj.data;
|
|
@@ -221,6 +220,7 @@ $(document).on("change",".btn-sort-chima",function(){ |
|
@@ -221,6 +220,7 @@ $(document).on("change",".btn-sort-chima",function(){ |
221
|
var _eq=$(this).data("eq");
|
220
|
var _eq=$(this).data("eq");
|
222
|
var item=g.__rows[_index].goodsSizeList[_eq];
|
221
|
var item=g.__rows[_index].goodsSizeList[_eq];
|
223
|
item.sizeId=$(this).val();
|
222
|
item.sizeId=$(this).val();
|
|
|
223
|
+ item.sizeName=$(this).find("option[value='"+item.sizeId+"']").text();
|
224
|
});
|
224
|
});
|
225
|
$(document).on("change",".btn-sort-xiaoshou",function(){
|
225
|
$(document).on("change",".btn-sort-xiaoshou",function(){
|
226
|
var _index=$(this).data("index");
|
226
|
var _index=$(this).data("index");
|
|
@@ -249,8 +249,6 @@ $(document).on("change",".btn-sort-kucun",function(){ |
|
@@ -249,8 +249,6 @@ $(document).on("change",".btn-sort-kucun",function(){ |
249
|
$(document).on("change",".w-goods-text",function(){
|
249
|
$(document).on("change",".w-goods-text",function(){
|
250
|
var item=g.__rows[$(this).data("index")];
|
250
|
var item=g.__rows[$(this).data("index")];
|
251
|
item.factoryGoodsName=$(this).val();
|
251
|
item.factoryGoodsName=$(this).val();
|
252
|
- console.log(item);
|
|
|
253
|
-
|
|
|
254
|
});
|
252
|
});
|
255
|
$(document).on("change",":checkbox[name=ageLevel]",function(){
|
253
|
$(document).on("change",":checkbox[name=ageLevel]",function(){
|
256
|
var value=$(this).val();
|
254
|
var value=$(this).val();
|
|
@@ -283,6 +281,23 @@ e.on("validate",function(){ |
|
@@ -283,6 +281,23 @@ e.on("validate",function(){ |
283
|
if(g.__rows.length==0){
|
281
|
if(g.__rows.length==0){
|
284
|
return "请添加销售属性";
|
282
|
return "请添加销售属性";
|
285
|
}
|
283
|
}
|
|
|
284
|
+ var map={},_count=0;
|
|
|
285
|
+ if(g.__rows.length>0){
|
|
|
286
|
+ $.each(g.__rows,function(index,item){
|
|
|
287
|
+ var gname= item.factoryGoodsName;
|
|
|
288
|
+ $.each(item.goodsSizeList,function(index,item1){
|
|
|
289
|
+ var key=gname+"_"+item1.sizeId;
|
|
|
290
|
+ if(map.hasOwnProperty(key)){
|
|
|
291
|
+ _count++;
|
|
|
292
|
+ return;
|
|
|
293
|
+ }
|
|
|
294
|
+ map[gname+"_"+item1.sizeId]="";
|
|
|
295
|
+ });
|
|
|
296
|
+ });
|
|
|
297
|
+ }
|
|
|
298
|
+ if(_count>0){
|
|
|
299
|
+ return "同一颜色包含两组相同尺码";
|
|
|
300
|
+ }
|
286
|
});
|
301
|
});
|
287
|
e.on("validate",function(){
|
302
|
e.on("validate",function(){
|
288
|
if((+$("#salesPriceStr").val())>(+$("#retailPriceStr").val())){
|
303
|
if((+$("#salesPriceStr").val())>(+$("#retailPriceStr").val())){
|
|
@@ -305,6 +320,7 @@ $(document).on("click","#btnReview",function(){ |
|
@@ -305,6 +320,7 @@ $(document).on("click","#btnReview",function(){ |
305
|
option.data.maxSortId=select[0]?select[0].id:"";
|
320
|
option.data.maxSortId=select[0]?select[0].id:"";
|
306
|
option.data.middleSortId=select[1]?select[1].id:"";
|
321
|
option.data.middleSortId=select[1]?select[1].id:"";
|
307
|
option.data.smallSortId=select[2]?select[2].id:"";
|
322
|
option.data.smallSortId=select[2]?select[2].id:"";
|
|
|
323
|
+ option.data.sortId=select[3]?select[3].id:"";
|
308
|
|
324
|
|
309
|
// option.data.shopId=$("#shopId").val();
|
325
|
// option.data.shopId=$("#shopId").val();
|
310
|
option.data.brandId=$("#brandId").val();
|
326
|
option.data.brandId=$("#brandId").val();
|