Authored by weiqingting

基础商品修改

... ... @@ -84,6 +84,9 @@ var SORTDATA={
{id:RESPONSEDATA.smallSortId,sortName:RESPONSEDATA.smallSortName},
{id:RESPONSEDATA.sortId,sortName:RESPONSEDATA.sortName}
],
otherParam:function(){
return {brandId:928}
},
complete:function(data){
if(data.length>2){
Bll.productNameArr[2]=data[data.length-1].sortName;
... ... @@ -94,7 +97,7 @@ var SORTDATA={
common.util.__ajax({
url:'/base/goods/queryAllProductAttr',
data:{
categoryId:sorid,
categoryId:$("#brandId").val(),
displayPosition:1
}
},function(res){
... ... @@ -110,7 +113,8 @@ var SORTDATA={
var tabTree=new common.tabTree("#tree",SORTDATA);
tabTree.init();
// tabTree.isfeeze=true;
var ENUM={
/*
... ... @@ -138,7 +142,7 @@ e.init();
if(RESPONSEDATA.isAuditing!=200){
new common.dropDown({el:"#brandId",ajax:"queryBrand"});
new common.dropDown({el:"#brandId",ajax:"brand"});
new common.dropDown({el:"#shopId",ajax:"sortbybrand",params:function(){
return {brandId:$("#brandId").val()}
... ... @@ -148,7 +152,9 @@ if(RESPONSEDATA.isAuditing!=200){
return {brandId:$("#brandId").val()}
}});
}else{
tabTree.isfeeze=true;
if(tabTree){
tabTree.isfeeze=true;
}
}
//attributeTable
... ... @@ -253,6 +259,7 @@ $(document).on("click",".sortadd",function(){
// g.__e.init();
}
});
$(document).on("keydown","#productName",function(){
Bll.IsEnter=true;
});
... ... @@ -260,6 +267,7 @@ $(document).on("change","#brandId",function(){
var id=$(this).val();
Bll.productNameArr[0]=$(this).find("option[value='"+id+"']").text();
Bll.setProductName();
tabTree.init();
});
$(document).on("change",":radio[name=gender]",function(){
Bll.productNameArr[1]=["男","女","通用"][+$(this).val()-1];
... ...
... ... @@ -18,6 +18,7 @@ var urlObj = {
'sortsize2':'/erpproduct/sortsize/ajax/querySizeListBySortId4Html',//尺码
'sortbybrand':'/goods/query/queryShopsByBrandId',
'getjitSup':'/goods/query/getJitSupplierByBrandld',
// 'getsort':'/goods/query/querySortBySmallSort',
'sortlist': '/product/class/queryAllProductSortList',
'productPool': '/runManage/subjectManage/queryBaseProductPoolListByName',
... ...
... ... @@ -54,6 +54,7 @@ tabTree.prototype= {
init: function(datas) {
var g = this,
p = this.options;
// g.element.html('');
g.element.addClass("citySelect");
g.dom = g.dom || g._dom();
g.selected = [], g.records = [], g.rows = [];
... ... @@ -153,7 +154,8 @@ tabTree.prototype= {
$("p", g.dom["chooseArea"]).eq(i).addClass("disable")
}
}
_param.param=_param.selectId;
_param.param=_param.sortId;
console.log(_param.param);
g.getAjax(_param)
},
getAjax: function(param) {
... ... @@ -161,7 +163,7 @@ tabTree.prototype= {
p = this.options;
var ajaxOptions = {
type: "POST",
url: param.state=="prov"?"/product/class/queryAllProductSortList":"/product/class/queryProductSortList",
url: "/goods/query/querySortBySmallSort",
data: param,
dataType: 'json',
beforeSend: function(msg) {
... ... @@ -299,7 +301,8 @@ tabTree.prototype= {
p = this.options;
var defaults = {
state: p.columns[rp].state,
selectId: rp - 1 > -1 ? g.selected[rp - 1].id : 0
// brandId:928,
sortId: rp - 1 > -1 ? g.selected[rp - 1].id : ""
};
var setting = {};
if (p.otherParam) {
... ...
// exports.domain =require('../config/common.js').domain;
exports.domain="http://172.16.6.240:8088/platform";
// exports.domain="http://172.16.6.240:8088/platform";
exports.domain = "http://172.16.6.227:8088/platform";
exports.res = [
{//基础商品列表
route:'/supplier/baseproduct/index',
... ... @@ -276,5 +277,13 @@ exports.res = [
// 1:基础商品-非销售属性 2:网销信息-上架后补全信息 3:网销信息-商品参数
{name:'displayPosition',type:'Number'}
]
}
},{
route:'/goods/query/querySortBySmallSort',
method:'POST',
url:'/product/querySortBySmallSort',
params:[
{name:"brandId",type:"Number"},
{name:"sortId",type:"Number"}
]
}
];
\ No newline at end of file
... ...
exports.domain = require('../config/common.js').domain;
// exports.domain = "http://172.16.6.252:9080";
exports.domain =require('../config/common.js').domain;
exports.res = [
//原 supplier
... ...