|
@@ -6,7 +6,7 @@ $(function () {
|
|
label: 'id', name: 'id', index: 'id', key: true, width: 140,align: 'center'
|
|
label: 'id', name: 'id', index: 'id', key: true, width: 140,align: 'center'
|
|
},
|
|
},
|
|
{label: '所属商户', name: 'merchName', index: 'merchName', width: 180, align: 'center'},
|
|
{label: '所属商户', name: 'merchName', index: 'merchName', width: 180, align: 'center'},
|
|
- {label: '所属门店', name: 'storeName', index: 'storeName', width: 180, align: 'center'},
|
|
|
|
|
|
+ // {label: '所属门店', name: 'storeName', index: 'storeName', width: 180, align: 'center'},
|
|
{label: '所属分类', name: 'categoryName', index: 'categoryName', width: 180, align: 'center'},
|
|
{label: '所属分类', name: 'categoryName', index: 'categoryName', width: 180, align: 'center'},
|
|
{
|
|
{
|
|
label: '品牌名称', name: 'name', index: 'name', width: 300
|
|
label: '品牌名称', name: 'name', index: 'name', width: 300
|
|
@@ -82,6 +82,32 @@ $(function () {
|
|
});
|
|
});
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+
|
|
|
|
+var category_ztree;
|
|
|
|
+var category_setting = {
|
|
|
|
+ data: {
|
|
|
|
+ simpleData: {
|
|
|
|
+ enable: true,
|
|
|
|
+ idKey: "id",
|
|
|
|
+ pIdKey: "parentId",
|
|
|
|
+ rootPId: -1
|
|
|
|
+ },
|
|
|
|
+ key: {
|
|
|
|
+ url: "nourl"
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ check: {
|
|
|
|
+ enable: false,
|
|
|
|
+ nocheckInherit: true
|
|
|
|
+ },
|
|
|
|
+ callback:{
|
|
|
|
+ onClick:function(event, treeId, treeNode){
|
|
|
|
+ console.log("点我干啥:"+event+","+treeId+","+treeNode.name+","+treeNode.id);
|
|
|
|
+ vm.brand.categoryId = treeNode.id;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+};
|
|
|
|
+
|
|
var vm = new Vue({
|
|
var vm = new Vue({
|
|
el: '#rrapp',
|
|
el: '#rrapp',
|
|
data: {
|
|
data: {
|
|
@@ -217,7 +243,7 @@ var vm = new Vue({
|
|
|
|
|
|
vm.getInfo(id);
|
|
vm.getInfo(id);
|
|
vm.getMerchList();
|
|
vm.getMerchList();
|
|
- vm.getStoresByMerch();
|
|
|
|
|
|
+ // vm.getStoresByMerch();
|
|
},
|
|
},
|
|
saveOrUpdate: function (event) {
|
|
saveOrUpdate: function (event) {
|
|
var url = vm.brand.id == null ? "../brand/save" : "../brand/update";
|
|
var url = vm.brand.id == null ? "../brand/save" : "../brand/update";
|
|
@@ -266,26 +292,30 @@ var vm = new Vue({
|
|
vm.brand = r.brand;
|
|
vm.brand = r.brand;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- getStoresByMerch: function (opt) {
|
|
|
|
|
|
+ getCategorysByMerch: function (opt) {
|
|
var value = opt.value;
|
|
var value = opt.value;
|
|
- $.get("../store/getStoresByMerch?merchSn=" + value, function (r) {
|
|
|
|
- vm.storeList = r.list;
|
|
|
|
|
|
+ $.get("../category/getCategorySelect?isShow=1&merchSn=" + value, function (r) {
|
|
|
|
+ vm.categories = r.list;
|
|
});
|
|
});
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ //加载菜单树
|
|
|
|
+ $.get("../category/getCategorySelect?isShow=1&merchSn=" + value, function (r) {
|
|
|
|
+ category_ztree = $.fn.zTree.init($("#categoryTree"), category_setting, r.list);
|
|
|
|
+ //展开所有节点
|
|
|
|
+ category_ztree.expandAll(true);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ });
|
|
|
|
+
|
|
},
|
|
},
|
|
- getCategoryByStore: function (opt) {
|
|
|
|
- var value = opt.value;
|
|
|
|
- vm.getCategories(value);
|
|
|
|
- },
|
|
|
|
|
|
+
|
|
getMerchList: function() {
|
|
getMerchList: function() {
|
|
$.get("../merch/queryAll", function (r) {
|
|
$.get("../merch/queryAll", function (r) {
|
|
vm.merchList = r.list;
|
|
vm.merchList = r.list;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- getCategories: function (storeId) {
|
|
|
|
- $.get("../category/getCategorySelect?isShow=1&storeId=" + storeId, function (r) {
|
|
|
|
- vm.categories = r.list;
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
|
|
+
|
|
reload: function (event) {
|
|
reload: function (event) {
|
|
vm.showViewList = false;
|
|
vm.showViewList = false;
|
|
vm.showList = true;
|
|
vm.showList = true;
|