...
|
...
|
@@ -2,7 +2,8 @@ var $ = require('jquery'), |
|
|
common = require('../../common/common');
|
|
|
|
|
|
|
|
|
var e = new common.edit('#brandWrap');
|
|
|
var e = new common.edit('#brandWrap'),
|
|
|
brandSelectArr = [];
|
|
|
common.util.__ajax({
|
|
|
url: '/goods/brands/queryBrandsByStatus'
|
|
|
}, function(res) {
|
...
|
...
|
@@ -30,16 +31,15 @@ common.util.__ajax({ |
|
|
|
|
|
if (NETSALEDATA.brandRelationList) {
|
|
|
$('#brandWrap').html(common.util.__template2($('#brandWrap').html(), {
|
|
|
brandRelation: NETSALEDATA.brandRelationList.join('|')
|
|
|
brandRelationList: NETSALEDATA.brandRelationList,
|
|
|
brandRelation: brandSelectArr.join('|')
|
|
|
}));
|
|
|
};
|
|
|
e.init();
|
|
|
}, true);
|
|
|
|
|
|
|
|
|
var brandSelectArr = NETSALEDATA.brandRelationList;
|
|
|
$.each(NETSALEDATA.relationBrandNameList, function(i, value) {
|
|
|
$('<div class="col-sm-2" data-id="' + NETSALEDATA.brandRelationList[i] + '">' + NETSALEDATA.relationBrandNameList[i] + '</div>').appendTo($('.selected-brand'));
|
|
|
$.each(NETSALEDATA.brandRelationList, function(index, value) {
|
|
|
brandSelectArr.push(value.brandId);
|
|
|
});
|
|
|
|
|
|
$('#brandWrap').on('change', 'input[name="brandRelationList"]', function() {
|
...
|
...
|
|