...
|
...
|
@@ -25,6 +25,8 @@ console.log(RESPONSEDATA); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*审核*/
|
|
|
|
|
|
$("#basicInfo").html(common.util.__template2($("#template2").html(),RESPONSEDATA));
|
...
|
...
|
@@ -32,11 +34,17 @@ $("#basicInfo").html(common.util.__template2($("#template2").html(),RESPONSEDATA |
|
|
/*商品名称*/
|
|
|
var Bll={
|
|
|
validateSort:function(){
|
|
|
var id=false;
|
|
|
var select=tabTree.getAddress();
|
|
|
if(select.length>2&&select[select.length-1]&&select[select.length-1].id){
|
|
|
return select[select.length-1].id;
|
|
|
if(select.length>2){
|
|
|
if(select[2]&&select[2].id){
|
|
|
id=select[2].id;
|
|
|
}
|
|
|
if(select[3]&&select[3].id){
|
|
|
id=select[3].id;
|
|
|
}
|
|
|
}
|
|
|
return false;
|
|
|
return id;
|
|
|
},
|
|
|
productNameArr:['','',''],
|
|
|
setProductName:function(){
|
...
|
...
|
@@ -60,6 +68,20 @@ var SORTDATA={ |
|
|
if(data.length>2){
|
|
|
Bll.productNameArr[2]=data[data.length-1].sortName;
|
|
|
Bll.setProductName();
|
|
|
/*查出非销售属性*/
|
|
|
var sorid=Bll.validateSort();
|
|
|
if(sorid){
|
|
|
common.util.__ajax({
|
|
|
url:'/base/goods/queryAllProductAttr',
|
|
|
data:{
|
|
|
categoryId:454,
|
|
|
displayPosition:1
|
|
|
}
|
|
|
},function(res){
|
|
|
console.log(res);
|
|
|
},true);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
};
|
...
|
...
|
@@ -90,7 +112,7 @@ var ENUM={ |
|
|
/*下拉选择*/
|
|
|
new common.dropDown({el:"#brandId",ajax:"queryBrand"});
|
|
|
|
|
|
new common.dropDown({el:"#shopId",ajax:"queryShopPass",param:function(){
|
|
|
new common.dropDown({el:"#shopId",ajax:"sortbybrand",param:function(){
|
|
|
return {brandId:$("#brandId").val()}
|
|
|
}});
|
|
|
|
...
|
...
|
@@ -99,6 +121,46 @@ new common.dropDown({el:"#supplierId",ajax:"querySupplier"}); |
|
|
var e=new common.edit("#basicInfo");
|
|
|
e.init();
|
|
|
|
|
|
|
|
|
|
|
|
//attributeTable
|
|
|
|
|
|
var ag=new common.grid({
|
|
|
el:"#attributeTable",
|
|
|
columns:[
|
|
|
{display:"名称",name:"attributeName"},
|
|
|
{display:"属性",render:function(item){
|
|
|
item.required=item.isMust=="Y"?"required":"";
|
|
|
item.attributeValues=item.attributeValues.split(',').map(function(elem, index, arr){
|
|
|
return {name:elem}
|
|
|
});
|
|
|
// item.attributeValues={name:};
|
|
|
return common.util.__template2($("#template3").html(),item);
|
|
|
}},
|
|
|
{display:"备注",name:"remark"}
|
|
|
]
|
|
|
});
|
|
|
ag.init([{
|
|
|
attributeId: 15,
|
|
|
attributeName: "防风外套属性",
|
|
|
attributeType: 2,
|
|
|
attributeValues: "11,22",
|
|
|
belong: 1,
|
|
|
categoryId: 454,
|
|
|
createTime: 1453951139,
|
|
|
displayPosition: 1,
|
|
|
inputType: "checkbox",
|
|
|
isAllowAlias: "Y",
|
|
|
isColor: "N",
|
|
|
isMust: "Y",
|
|
|
isSearch: "Y",
|
|
|
maxValueLen: 50,
|
|
|
orderBy: 0,
|
|
|
remark: "备注",
|
|
|
saleType: 0,
|
|
|
state: 0
|
|
|
}]);
|
|
|
|
|
|
//baseTable
|
|
|
|
|
|
var g=new common.grid({
|
...
|
...
|
@@ -137,7 +199,7 @@ var g=new common.grid({ |
|
|
if(sort){
|
|
|
new common.dropDown({
|
|
|
el: ".btn-sort-chima",
|
|
|
ajax: "sortsize",
|
|
|
ajax: "sortsize2",
|
|
|
params: {
|
|
|
"sortId" : sort
|
|
|
}
|
...
|
...
|
|