...
|
...
|
@@ -41,7 +41,6 @@ var Bll={ |
|
|
validateSort:function(){
|
|
|
var id=false;
|
|
|
var select=tabTree.getAddress();
|
|
|
console.log("select",select);
|
|
|
if(select.length>2){
|
|
|
if(select[2]&&select[2].id){
|
|
|
id=select[2].id;
|
...
|
...
|
@@ -87,6 +86,7 @@ var ag=new common.grid({ |
|
|
for(var i in attrs){
|
|
|
if(attrs[i].standardId==item.attributeId){
|
|
|
item.val=attrs[i].standardVal
|
|
|
item.__val=attrs[i].parameterMakeId
|
|
|
}
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -128,7 +128,6 @@ var SORTDATA={ |
|
|
displayPosition:1
|
|
|
}
|
|
|
},function(res){
|
|
|
console.log("分类",res);
|
|
|
ag.init(res.data);
|
|
|
},true);
|
|
|
}
|
...
|
...
|
@@ -214,10 +213,10 @@ var g=new common.grid({ |
|
|
}
|
|
|
g.__e.init();
|
|
|
for(var i in g.__gsm){
|
|
|
var warp=$("#rows__"+i).children(".form-group").slice(0, 1);
|
|
|
var warp=$("#rows__"+i).children(".form-group").slice(0, g.__gsm[i]);
|
|
|
warp.find("input").prop("readonly",true);
|
|
|
warp.find("select").prop("disabled",true);
|
|
|
warp.find("btn-sort-remove").remove();
|
|
|
warp.find(".btn-sort-remove").remove();
|
|
|
warp.find(".btn-sort-kucun").prop("readonly",false);
|
|
|
}
|
|
|
for(var i=0;i<g.__length;i++){
|
...
|
...
|
@@ -310,8 +309,9 @@ $(document).on("change",".salesPriceStr",function(){ |
|
|
ENUM.goodsSizeList.salePrice=$.trim($(this).val());
|
|
|
});
|
|
|
$(document).on("click",".sortdelete",function(){
|
|
|
var that=this;
|
|
|
common.dialog.confirm("温馨提示","你确定删除吗?",function(){
|
|
|
var index=$(this).data("index");
|
|
|
var index=$(that).data("index");
|
|
|
[].splice.call(g.__rows,index,1);
|
|
|
g.reload();
|
|
|
});
|
...
|
...
|
@@ -323,7 +323,9 @@ $(document).on("change",".factoryCode",function(){ |
|
|
});
|
|
|
$(document).on("click",".btn-sort-add",function(){
|
|
|
var item=g.__rows[$(this).data("index")];
|
|
|
item.goodsSizeList.push($.extend({},ENUM.goodsSizeList));
|
|
|
var goodsSizeList=$.extend({},ENUM.goodsSizeList);
|
|
|
goodsSizeList.salePrice=$("#salesPriceStr").val();
|
|
|
item.goodsSizeList.push(goodsSizeList);
|
|
|
g.reload();
|
|
|
// g.__e.init();
|
|
|
});
|
...
|
...
|
@@ -415,7 +417,6 @@ e.on("validate",function(){ |
|
|
return "请选择完整的分类目录";
|
|
|
});
|
|
|
e.on("validate",function(){
|
|
|
console.log(g.__gsm);
|
|
|
if(g.__rows.length==0){
|
|
|
return "请添加销售属性";
|
|
|
}
|
...
|
...
|
@@ -505,17 +506,36 @@ $(document).on("click","#btnReview",function(){ |
|
|
if(ag.rows.length>0){
|
|
|
for(var i in ag.rows){
|
|
|
if(ag.rows[i].val){
|
|
|
|
|
|
if(ag.rows[i].inputType!="text"&&ag.rows[i].inputType!="textarea"){
|
|
|
var arr=ag.rows[i].val.split('|');
|
|
|
var idNameList=ag.rows[i].idNameList;
|
|
|
for(var x in idNameList){
|
|
|
for(var y in arr){
|
|
|
if(arr[y]==idNameList[x].id){
|
|
|
option.data.productStandardRelationStr.push({
|
|
|
standardId:ag.rows[i].attributeId,
|
|
|
standardVal:idNameList[x].text,
|
|
|
parameterMakeId:idNameList[x].id
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}else{
|
|
|
option.data.productStandardRelationStr.push({
|
|
|
standardId:ag.rows[i].attributeId,
|
|
|
standardVal:ag.rows[i].val
|
|
|
standardVal:ag.rows[i].val,
|
|
|
parameterMakeId:ag.rows[i].id
|
|
|
});
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
option.data.productStandardRelationStr=JSON.stringify(option.data.productStandardRelationStr);
|
|
|
|
|
|
// option.debug=true;
|
|
|
console.log(option.data);
|
|
|
// console.log(option.data);
|
|
|
option.success=function(res){
|
|
|
res = res.data;
|
|
|
if(res.code == "200") {
|
...
|
...
|
|