...
|
...
|
@@ -74,8 +74,12 @@ var ag=new common.grid({ |
|
|
return common.util.__template2($("#template3").html(),item);
|
|
|
}},
|
|
|
{display:"备注",name:"remark"}
|
|
|
]
|
|
|
],
|
|
|
complete:function(){
|
|
|
ag.__edit.init();
|
|
|
}
|
|
|
});
|
|
|
ag.__edit=new common.edit("#attributeTable");
|
|
|
|
|
|
|
|
|
var SORTDATA={
|
...
|
...
|
@@ -86,7 +90,7 @@ var SORTDATA={ |
|
|
{id:RESPONSEDATA.sortId,sortName:RESPONSEDATA.sortName}
|
|
|
],
|
|
|
otherParam:function(){
|
|
|
return {brandId:$("#brandId").val()}//$("#brandId").val()
|
|
|
return {brandId:928}//$("#brandId").val()
|
|
|
},
|
|
|
complete:function(data){
|
|
|
if(data.length>2){
|
...
|
...
|
@@ -98,7 +102,7 @@ var SORTDATA={ |
|
|
common.util.__ajax({
|
|
|
url:'/base/goods/queryAllProductAttr',
|
|
|
data:{
|
|
|
categoryId:$("#brandId").val(),
|
|
|
categoryId:sorid,
|
|
|
displayPosition:1
|
|
|
}
|
|
|
},function(res){
|
...
|
...
|
@@ -115,7 +119,7 @@ var SORTDATA={ |
|
|
|
|
|
var tabTree=new common.tabTree("#tree",SORTDATA);
|
|
|
tabTree.init(SORTDATA.datas);
|
|
|
tabTree.isfeeze=true;
|
|
|
// tabTree.isfeeze=true;
|
|
|
|
|
|
var ENUM={
|
|
|
/*
|
...
|
...
|
@@ -264,8 +268,8 @@ $(document).on("change","#brandId",function(){ |
|
|
var id=$(this).val();
|
|
|
Bll.productNameArr[0]=$(this).find("option[value='"+id+"']").text();
|
|
|
Bll.setProductName();
|
|
|
tabTree.isfeeze=false;
|
|
|
tabTree.init([{id:"",sortName:""},{id:"",sortName:""},{id:"",sortName:""},{id:"",sortName:""}]);
|
|
|
// tabTree.isfeeze=false;
|
|
|
// tabTree.init([{id:"",sortName:""},{id:"",sortName:""},{id:"",sortName:""},{id:"",sortName:""}]);
|
|
|
});
|
|
|
$(document).on("change",":radio[name=gender]",function(){
|
|
|
Bll.productNameArr[1]=["男","女","通用"][+$(this).val()-1];
|
...
|
...
|
@@ -364,6 +368,16 @@ $(document).on("change",":checkbox[name=ageLevel]",function(){ |
|
|
});
|
|
|
$("#ageLevel").val(arr.join('|'));
|
|
|
});
|
|
|
|
|
|
$(document).on("change",".attr_input",function(){
|
|
|
var item=ag.rows[$(this).data("index")];
|
|
|
item.val=$(this).val();
|
|
|
});
|
|
|
$(document).on("change",".attr_checkobx_class",function(){
|
|
|
var item=ag.rows[$(this).data("index")];
|
|
|
item.val=$("#attr_"+$(this).data("index")).val();
|
|
|
})
|
|
|
|
|
|
var e=new common.edit("#basicInfo");
|
|
|
e.on("validate",function(){
|
|
|
return g.__e.validate();
|
...
|
...
|
@@ -412,6 +426,8 @@ e.on("validate",function(){ |
|
|
//
|
|
|
|
|
|
$(document).on("click","#btnReview",function(){
|
|
|
console.log(ag.rows);
|
|
|
|
|
|
|
|
|
if(e.validate()){
|
|
|
common.dialog.confirm("温馨提示","<p>若是JIT商品,请务必选择供应商!</p><p>你确定提交吗?</p>",function(){
|
...
|
...
|
@@ -436,6 +452,20 @@ $(document).on("click","#btnReview",function(){ |
|
|
// option.data=new Date(expectShelfTime).getTime();
|
|
|
|
|
|
option.data.baseGoodInfoStr=JSON.stringify(g.__rows);
|
|
|
|
|
|
option.data.productStandardRelationStr=[];
|
|
|
if(ag.rows.length>0){
|
|
|
for(var i in ag.rows){
|
|
|
if(ag.rows[i]){
|
|
|
option.data.productStandardRelationStr.push({
|
|
|
standardId:ag.rows[i].attributeId,
|
|
|
standardVal:ag.rows[i].val
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
option.data.productStandardRelationStr=JSON.stringify(option.data.productStandardRelationStr);
|
|
|
|
|
|
// option.debug=true;
|
|
|
console.log(option.data);
|
|
|
option.success=function(res){
|
...
|
...
|
|