...
|
...
|
@@ -34,8 +34,8 @@ $("#basicInfo").html(common.util.__template2($("#template2").html(),RESPONSEDATA |
|
|
var Bll={
|
|
|
validateSort:function(){
|
|
|
var select=tabTree.getAddress();
|
|
|
if(select[2]&&select[2].id){
|
|
|
return select[2].id;
|
|
|
if(select[select.length-1]&&select[select.length-1].id){
|
|
|
return select[select.length-1].id;
|
|
|
}
|
|
|
return false;
|
|
|
},
|
...
|
...
|
@@ -54,7 +54,8 @@ var SORTDATA={ |
|
|
datas:[
|
|
|
{id:RESPONSEDATA.maxSortId,sortName:RESPONSEDATA.maxSortName},
|
|
|
{id:RESPONSEDATA.middleSortId,sortName:RESPONSEDATA.middleSortName},
|
|
|
{id:RESPONSEDATA.smallSortId,sortName:RESPONSEDATA.smallSortName}
|
|
|
{id:RESPONSEDATA.smallSortId,sortName:RESPONSEDATA.smallSortName},
|
|
|
{id:RESPONSEDATA.sortId,sortName:RESPONSEDATA.sortName}
|
|
|
],
|
|
|
complete:function(data){
|
|
|
if(data.length>2){
|
...
|
...
|
@@ -127,7 +128,6 @@ var g=new common.grid({ |
|
|
item.goodsSizeList=item.goodsSizeList||[$.extend({},ENUM.goodsSizeList)];
|
|
|
|
|
|
var ISXIANGO=common.util.__input("isLimitbuy")=="Y"?true:false;
|
|
|
console.log(item.goodsSizeList);
|
|
|
html.push(common.util.__template2($("#template").html(),{index:item.__index,ISXIANGO:ISXIANGO,goodsSizeList:item.goodsSizeList}));
|
|
|
html.push('</div>');
|
|
|
return html.join('');
|
...
|
...
|
@@ -155,7 +155,6 @@ g.init(g.__rows); |
|
|
|
|
|
|
|
|
g.__e.on("callback", function(obj) {
|
|
|
console.log(obj);
|
|
|
if(/^file_onComplete/.test(obj.key)){
|
|
|
var _index=obj.key.replace(/^file_onComplete_file__/,'');
|
|
|
g.__rows[_index].goodsColorImage=obj.data;
|
...
|
...
|
@@ -221,6 +220,7 @@ $(document).on("change",".btn-sort-chima",function(){ |
|
|
var _eq=$(this).data("eq");
|
|
|
var item=g.__rows[_index].goodsSizeList[_eq];
|
|
|
item.sizeId=$(this).val();
|
|
|
item.sizeName=$(this).find("option[value='"+item.sizeId+"']").text();
|
|
|
});
|
|
|
$(document).on("change",".btn-sort-xiaoshou",function(){
|
|
|
var _index=$(this).data("index");
|
...
|
...
|
@@ -249,8 +249,6 @@ $(document).on("change",".btn-sort-kucun",function(){ |
|
|
$(document).on("change",".w-goods-text",function(){
|
|
|
var item=g.__rows[$(this).data("index")];
|
|
|
item.factoryGoodsName=$(this).val();
|
|
|
console.log(item);
|
|
|
|
|
|
});
|
|
|
$(document).on("change",":checkbox[name=ageLevel]",function(){
|
|
|
var value=$(this).val();
|
...
|
...
|
@@ -283,6 +281,23 @@ e.on("validate",function(){ |
|
|
if(g.__rows.length==0){
|
|
|
return "请添加销售属性";
|
|
|
}
|
|
|
var map={},_count=0;
|
|
|
if(g.__rows.length>0){
|
|
|
$.each(g.__rows,function(index,item){
|
|
|
var gname= item.factoryGoodsName;
|
|
|
$.each(item.goodsSizeList,function(index,item1){
|
|
|
var key=gname+"_"+item1.sizeId;
|
|
|
if(map.hasOwnProperty(key)){
|
|
|
_count++;
|
|
|
return;
|
|
|
}
|
|
|
map[gname+"_"+item1.sizeId]="";
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
if(_count>0){
|
|
|
return "同一颜色包含两组相同尺码";
|
|
|
}
|
|
|
});
|
|
|
e.on("validate",function(){
|
|
|
if((+$("#salesPriceStr").val())>(+$("#retailPriceStr").val())){
|
...
|
...
|
@@ -305,6 +320,7 @@ $(document).on("click","#btnReview",function(){ |
|
|
option.data.maxSortId=select[0]?select[0].id:"";
|
|
|
option.data.middleSortId=select[1]?select[1].id:"";
|
|
|
option.data.smallSortId=select[2]?select[2].id:"";
|
|
|
option.data.sortId=select[3]?select[3].id:"";
|
|
|
|
|
|
// option.data.shopId=$("#shopId").val();
|
|
|
option.data.brandId=$("#brandId").val();
|
...
|
...
|
|