Authored by xuhongyun

build

@@ -11,136 +11,136 @@ webpackJsonp([23],[ @@ -11,136 +11,136 @@ webpackJsonp([23],[
11 var $ = __webpack_require__(1); 11 var $ = __webpack_require__(1);
12 var common=__webpack_require__(2); 12 var common=__webpack_require__(2);
13 13
14 - //下拉框  
15 - new common.dropDown({  
16 - el: "#status"  
17 - });  
18 - var renderHd = false;  
19 -  
20 - var g = new common.grid({  
21 - el: "#basicTable",  
22 - parms: function() {  
23 - return {  
24 - status: common.util.__input('status'), //$.trim($('#status').val()) || '',  
25 - };  
26 - },  
27 - columns: [{  
28 - display: '',  
29 - name: 'foler',  
30 - render: function(item) {  
31 - debugger;  
32 - var html = "", top = true;  
33 -  
34 - if (!renderHd) {  
35 - html += $('#tableHdTemp').html();  
36 - init(item);  
37 - renderHd = true;  
38 - } else {init(item)}  
39 - return html;  
40 -  
41 - function init(item){  
42 - if(top){  
43 - html += "<div id='category_id_"+ item.id +"' class='level-wrap clearfix'>";  
44 - top = false;  
45 - }else{  
46 - html += "<div id='category_id_"+ item.id +"' class='level-wrap clearfix' style='display: none'>"  
47 - }  
48 - html += common.util.__template2($('#tableTemp2').html(), item);  
49 - if(item.subList){  
50 - for(var i=0; i<item.subList.length; i++){  
51 - init(item.subList[i]);  
52 - }  
53 - }  
54 - html += "</div>";  
55 - }  
56 - }  
57 - }  
58 - ]  
59 - });  
60 - g.init($("#gridurl").val());  
61 - //g.init("/erpproduct/sort/index");  
62 - $("#filter-btn").click(function() {  
63 - renderHd = false;  
64 - g.reload();  
65 - });  
66 -  
67 - //打开层级类目  
68 - $(document).on('click', '.folder', function() {  
69 - var $wrap = $(this).parent();  
70 - if (!$(this).hasClass('open')) {  
71 - if ($wrap.find('> .level-wrap').size() > 0) {  
72 - var position = $(this).css("background-position");  
73 - var a = position.substring(0,position.indexOf("px"));  
74 - $wrap.find('> .level-wrap').show().find(".folder").css("background-position", (parseInt(a)+36) + "px");  
75 - $(this).addClass('open');  
76 - }  
77 - } else {  
78 - $(this).removeClass('open');  
79 - if ($wrap.find('.level-wrap').size() > 0) {  
80 - $wrap.find('.level-wrap').hide().find(".folder").removeClass('open').css("background-position", "12px center");  
81 - }  
82 - }  
83 - });  
84 - //删除物理类目  
85 - $(document).on('click', '.del-class-btn', function() {  
86 - var sortId = $(this).parent().data('id'),  
87 - sortName = $(this).parent().data('name');  
88 -  
89 - common.dialog.confirm("温馨提示", "确定&nbsp;&nbsp<b><font color='#ff0000'>删除&nbsp;&nbsp;</font>【" + sortName + "】</b>&nbsp;&nbsp;分类吗?", function() {  
90 - common.util.__ajax2({  
91 - url: '/erpproduct/sorter/del',  
92 - data: {  
93 - param: sortId  
94 - }  
95 - }, function(res){  
96 - if (res.code == 200) {  
97 - // g.reload();  
98 - $("#filter-btn").click();  
99 - common.util.__tip("删除成功!","success");  
100 - }  
101 - })  
102 - });  
103 - event.preventDefault();  
104 - });  
105 -  
106 - $(document).on('click', '.open-close-btn',function() {  
107 -  
108 - var status;  
109 - var id = $(this).parent().data('id');  
110 -  
111 - if ($(this).attr('data-status') === '1') {  
112 - status = 0;  
113 - } else if ($(this).attr('data-status') === '0') {  
114 - status = 1;  
115 - }  
116 -  
117 - console.log(status);  
118 -  
119 - $.ajax({  
120 - type: 'POST',  
121 - dataType: 'json',  
122 - url: status?"/erpproduct/sorter/open":"/erpproduct/sorter/close",  
123 - data: {  
124 - param: id  
125 - }  
126 - }).then(function (data) {  
127 -  
128 - console.log(data);  
129 -  
130 - if (data.code === 200) {  
131 - if ($(this).hasClass('btn-danger')) {  
132 - common.util.__tip("关闭成功!",'success');  
133 - } else {  
134 - common.util.__tip("开启成功!",'success');  
135 - }  
136 - // g.reload();  
137 - $("#filter-btn").click();  
138 - }  
139 - });  
140 -  
141 - event.preventDefault();  
142 - }  
143 - ); 14 + //下拉框
  15 + new common.dropDown({
  16 + el: "#status"
  17 + });
  18 + var renderHd = false;
  19 +
  20 + var g = new common.grid({
  21 + el: "#basicTable",
  22 + parms: function() {
  23 + return {
  24 + status: common.util.__input('status'), //$.trim($('#status').val()) || '',
  25 + };
  26 + },
  27 + columns: [{
  28 + display: '',
  29 + name: 'foler',
  30 + render: function(item) {
  31 + debugger;
  32 + var html = "", top = true;
  33 +
  34 + if (!renderHd) {
  35 + html += $('#tableHdTemp').html();
  36 + init(item);
  37 + renderHd = true;
  38 + } else {init(item)}
  39 + return html;
  40 +
  41 + function init(item){
  42 + if(top){
  43 + html += "<div id='category_id_"+ item.id +"' class='level-wrap clearfix'>";
  44 + top = false;
  45 + }else{
  46 + html += "<div id='category_id_"+ item.id +"' class='level-wrap clearfix' style='display: none'>"
  47 + }
  48 + html += common.util.__template2($('#tableTemp2').html(), item);
  49 + if(item.subList){
  50 + for(var i=0; i<item.subList.length; i++){
  51 + init(item.subList[i]);
  52 + }
  53 + }
  54 + html += "</div>";
  55 + }
  56 + }
  57 + }
  58 + ]
  59 + });
  60 + g.init($("#gridurl").val());
  61 + //g.init("/erpproduct/sort/index");
  62 + $("#filter-btn").click(function() {
  63 + renderHd = false;
  64 + g.reload();
  65 + });
  66 +
  67 + //打开层级类目
  68 + $(document).on('click', '.folder', function() {
  69 + var $wrap = $(this).parent();
  70 + if (!$(this).hasClass('open')) {
  71 + if ($wrap.find('> .level-wrap').size() > 0) {
  72 + var position = $(this).css("background-position");
  73 + var a = position.substring(0,position.indexOf("px"));
  74 + $wrap.find('> .level-wrap').show().find(".folder").css("background-position", (parseInt(a)+36) + "px");
  75 + $(this).addClass('open');
  76 + }
  77 + } else {
  78 + $(this).removeClass('open');
  79 + if ($wrap.find('.level-wrap').size() > 0) {
  80 + $wrap.find('.level-wrap').hide().find(".folder").removeClass('open').css("background-position", "12px center");
  81 + }
  82 + }
  83 + });
  84 + //删除物理类目
  85 + $(document).on('click', '.del-class-btn', function() {
  86 + var sortId = $(this).parent().data('id'),
  87 + sortName = $(this).parent().data('name');
  88 +
  89 + common.dialog.confirm("温馨提示", "确定&nbsp;&nbsp<b><font color='#ff0000'>删除&nbsp;&nbsp;</font>【" + sortName + "】</b>&nbsp;&nbsp;分类吗?", function() {
  90 + common.util.__ajax2({
  91 + url: '/erpproduct/sorter/del',
  92 + data: {
  93 + param: sortId
  94 + }
  95 + }, function(res){
  96 + if (res.code == 200) {
  97 + // g.reload();
  98 + $("#filter-btn").click();
  99 + common.util.__tip("删除成功!","success");
  100 + }
  101 + })
  102 + });
  103 + event.preventDefault();
  104 + });
  105 +
  106 + $(document).on('click', '.open-close-btn',function() {
  107 +
  108 + var status;
  109 + var id = $(this).parent().data('id');
  110 +
  111 + if ($(this).attr('data-status') === '1') {
  112 + status = 0;
  113 + } else if ($(this).attr('data-status') === '0') {
  114 + status = 1;
  115 + }
  116 +
  117 + console.log(status);
  118 +
  119 + $.ajax({
  120 + type: 'POST',
  121 + dataType: 'json',
  122 + url: status?"/erpproduct/sorter/open":"/erpproduct/sorter/close",
  123 + data: {
  124 + param: id
  125 + }
  126 + }).then(function (data) {
  127 +
  128 + console.log(data);
  129 +
  130 + if (data.code === 200) {
  131 + if ($(this).hasClass('btn-danger')) {
  132 + common.util.__tip("关闭成功!",'success');
  133 + } else {
  134 + common.util.__tip("开启成功!",'success');
  135 + }
  136 + // g.reload();
  137 + $("#filter-btn").click();
  138 + }
  139 + });
  140 +
  141 + event.preventDefault();
  142 + }
  143 + );
144 144
145 /***/ } 145 /***/ }
146 ]); 146 ]);
@@ -5,18 +5,19 @@ webpackJsonp([117],[ @@ -5,18 +5,19 @@ webpackJsonp([117],[
5 'use strict'; 5 'use strict';
6 var $ = __webpack_require__(1), 6 var $ = __webpack_require__(1),
7 common = __webpack_require__(2); 7 common = __webpack_require__(2);
  8 +
8 //下拉框 9 //下拉框
9 new common.dropDown({ 10 new common.dropDown({
10 - el: "#state" 11 + el: "#state"
11 }); 12 });
12 var renderHd = false; 13 var renderHd = false;
13 var g = new common.grid({ 14 var g = new common.grid({
14 el: "#basicTable", 15 el: "#basicTable",
15 - parms: function() {  
16 - return {  
17 - state: common.util.__input('state'), //$.trim($('#status').val()) || '',  
18 - };  
19 - }, 16 + parms: function() {
  17 + return {
  18 + state: common.util.__input('state'), //$.trim($('#status').val()) || '',
  19 + };
  20 + },
20 columns: [{ 21 columns: [{
21 display: '', 22 display: '',
22 name: 'foler', 23 name: 'foler',
@@ -52,10 +53,11 @@ webpackJsonp([117],[ @@ -52,10 +53,11 @@ webpackJsonp([117],[
52 53
53 g.init($("#gridurl").val()); 54 g.init($("#gridurl").val());
54 $("#filter-btn").click(function() { 55 $("#filter-btn").click(function() {
55 - renderHd = false;  
56 - g.reload(); 56 + renderHd = false;
  57 + g.reload();
57 }); 58 });
58 59
  60 +
59 //编辑排序 61 //编辑排序
60 $(document).on('change', '.saleCategoryNumInput', function() { 62 $(document).on('change', '.saleCategoryNumInput', function() {
61 if(checkNumInput($(this))){ 63 if(checkNumInput($(this))){
@@ -386,8 +388,9 @@ webpackJsonp([117],[ @@ -386,8 +388,9 @@ webpackJsonp([117],[
386 } 388 }
387 }, function(res){ 389 }, function(res){
388 if (res.code == 200) { 390 if (res.code == 200) {
389 - $("#category_id_" + categoryId).find(".status").html("<b style='color: #449d44'>开启</b>");  
390 - $("#category_id_" + categoryId).find(".openAndClose").html("<a class='btn btn-danger btn-xs close-category' href='javascript:;'>关闭</a>"); 391 + // $("#category_id_" + categoryId).find(".status").html("<b style='color: #449d44'>开启</b>");
  392 + // $("#category_id_" + categoryId).find(".openAndClose").html("<a class='btn btn-danger btn-xs close-category' href='javascript:;'>关闭</a>");
  393 + $("#filter-btn").click();
391 common.util.__tip("开启成功!","success"); 394 common.util.__tip("开启成功!","success");
392 } else{ 395 } else{
393 common.util.__tip(res.data.message); 396 common.util.__tip(res.data.message);
@@ -411,8 +414,7 @@ webpackJsonp([117],[ @@ -411,8 +414,7 @@ webpackJsonp([117],[
411 if (res.code == 200) { 414 if (res.code == 200) {
412 // $("#category_id_" + categoryId).find(".status").html("<b style='color: #d9534f'>关闭</b>"); 415 // $("#category_id_" + categoryId).find(".status").html("<b style='color: #d9534f'>关闭</b>");
413 // $("#category_id_" + categoryId).find(".openAndClose").html("<a class='btn btn-warning btn-xs open-category' href='javascript:;'>开启</a>"); 416 // $("#category_id_" + categoryId).find(".openAndClose").html("<a class='btn btn-warning btn-xs open-category' href='javascript:;'>开启</a>");
414 - // g.reload();  
415 - $("#filter-btn").click(); 417 + $("#filter-btn").click();
416 common.util.__tip("关闭成功!","success"); 418 common.util.__tip("关闭成功!","success");
417 }else{ 419 }else{
418 common.util.__tip(res.data.message); 420 common.util.__tip(res.data.message);
@@ -423,27 +425,27 @@ webpackJsonp([117],[ @@ -423,27 +425,27 @@ webpackJsonp([117],[
423 425
424 //删除销售类目 426 //删除销售类目
425 $(document).on('click', '.del-category', function() { 427 $(document).on('click', '.del-category', function() {
426 - var categoryId = $(this).parent().data('id'),  
427 - categoryName = $(this).parent().data('name'); 428 + var categoryId = $(this).parent().data('id'),
  429 + categoryName = $(this).parent().data('name');
428 430
429 - common.dialog.confirm("温馨提示", "确定&nbsp;&nbsp<b><font color='#ff0000'>删除&nbsp;&nbsp;</font>【" + categoryName + "】</b>&nbsp;&nbsp;分类吗?", function() {  
430 - common.util.__ajax2({  
431 - url: '/sale/salesCategory/delSC',  
432 - data: {  
433 - categoryId: categoryId  
434 - }  
435 - }, function(res){  
436 - if (res.code == 200) {  
437 - // g.reload();  
438 - $("#filter-btn").click();  
439 - common.util.__tip("删除成功!","success");  
440 - }  
441 - })  
442 - }); 431 + common.dialog.confirm("温馨提示", "确定&nbsp;&nbsp<b><font color='#ff0000'>删除&nbsp;&nbsp;</font>【" + categoryName + "】</b>&nbsp;&nbsp;分类吗?", function() {
  432 + common.util.__ajax2({
  433 + url: '/sale/salesCategory/delSC',
  434 + data: {
  435 + categoryId: categoryId
  436 + }
  437 + }, function(res){
  438 + if (res.code == 200) {
  439 + // g.reload();
  440 + $("#filter-btn").click();
  441 + common.util.__tip("删除成功!","success");
  442 + }
  443 + })
  444 + });
443 }) 445 })
444 446
445 447
446 - //切换状态重载列表 448 + //切换状态重载列表
447 $('input[name="state"]').on('change', function() { 449 $('input[name="state"]').on('change', function() {
448 $(this).parent().addClass('current').siblings().removeClass('current'); 450 $(this).parent().addClass('current').siblings().removeClass('current');
449 g.reload(); 451 g.reload();
1 module.exports=function(app) { 1 module.exports=function(app) {
2 /*物理类目管理*/ 2 /*物理类目管理*/
3 - app.get("/erpproduct/sort/index","category.Index","category_queryAllProductSortList",function(plist,req,res){ 3 + app.get("/erpproduct/sort/index","category.Index",function(plist,req,res){
4 this.$extend={ 4 this.$extend={
5 moduleName:'物理类目管理', 5 moduleName:'物理类目管理',
6 pageName:'物理类目管理列表', 6 pageName:'物理类目管理列表',
7 - data:plist.data 7 + gridurl: '/erpproduct/sorter/getlist'
8 } 8 }
9 }); 9 });
10 /*添加物理类目管理*/ 10 /*添加物理类目管理*/
@@ -24,6 +24,9 @@ module.exports=function(app) { @@ -24,6 +24,9 @@ module.exports=function(app) {
24 } 24 }
25 return sort; 25 return sort;
26 }); 26 });
  27 +
  28 + /*列表*/
  29 + app.post("/erpproduct/sorter/getlist","category_queryAllProductSortList");
27 /*【添加品类】ajax请求接口*/ 30 /*【添加品类】ajax请求接口*/
28 app.post("/product/sort/addProductSort","category_addProductSort"); 31 app.post("/product/sort/addProductSort","category_addProductSort");
29 /*【修改品类】ajax请求接口*/ 32 /*【修改品类】ajax请求接口*/
@@ -32,4 +35,6 @@ module.exports=function(app) { @@ -32,4 +35,6 @@ module.exports=function(app) {
32 app.post("/erpproduct/sorter/open","category_publishProductSort"); 35 app.post("/erpproduct/sorter/open","category_publishProductSort");
33 /*关闭*/ 36 /*关闭*/
34 app.post("/erpproduct/sorter/close","category_closeProductSort"); 37 app.post("/erpproduct/sorter/close","category_closeProductSort");
  38 + /*删除*/
  39 + app.post("/erpproduct/sorter/del","category_delProductSort");
35 } 40 }
@@ -43,6 +43,9 @@ module.exports=function(app) { @@ -43,6 +43,9 @@ module.exports=function(app) {
43 /*开关销售类目*/ 43 /*开关销售类目*/
44 app.post("/sale/salesCategory/updateSCStatus","salecategory_updateSCStatus"); 44 app.post("/sale/salesCategory/updateSCStatus","salecategory_updateSCStatus");
45 45
  46 + /*删除销售类目*/
  47 + app.post("/sale/salesCategory/delSC","salecategory_delSC");
  48 +
46 /*批量添加标签接口*/ 49 /*批量添加标签接口*/
47 app.post("/sale/salesCategoryLabel/addSCLabel","salecategory_addSCLabel"); 50 app.post("/sale/salesCategoryLabel/addSCLabel","salecategory_addSCLabel");
48 51
@@ -4,6 +4,9 @@ module.exports={ @@ -4,6 +4,9 @@ module.exports={
4 queryAllProductSortList:{ 4 queryAllProductSortList:{
5 title:'获取所有品类', 5 title:'获取所有品类',
6 url: '/product/queryAllProductSortList', 6 url: '/product/queryAllProductSortList',
  7 + params: [
  8 + {name: 'status', type: 'Number'}
  9 + ]
7 }, 10 },
8 addProductSort:{ 11 addProductSort:{
9 title:'商品管理>【添加品类】ajax请求接口', 12 title:'商品管理>【添加品类】ajax请求接口',
@@ -58,6 +61,13 @@ module.exports={ @@ -58,6 +61,13 @@ module.exports={
58 params: [ 61 params: [
59 {name: 'param', type: 'Number'} 62 {name: 'param', type: 'Number'}
60 ] 63 ]
  64 + },
  65 + delProductSort:{
  66 + title:'delProductSort',
  67 + url: '/product/delProductSort',
  68 + params: [
  69 + {name: 'param', type: 'Number'}
  70 + ]
61 } 71 }
62 } 72 }
63 } 73 }
@@ -82,6 +82,13 @@ module.exports={ @@ -82,6 +82,13 @@ module.exports={
82 {name: 'state', type: 'string'} 82 {name: 'state', type: 'string'}
83 ] 83 ]
84 }, 84 },
  85 + delSC:{
  86 + title: "删除销售类目",
  87 + url: '/salesCategory/delSC',
  88 + params: [
  89 + {name: 'categoryId', type: 'string'}
  90 + ]
  91 + },
85 addSCLabel:{ 92 addSCLabel:{
86 title: "批量添加标签接口", 93 title: "批量添加标签接口",
87 url: '/salesCategoryLabel/addSCLabel', 94 url: '/salesCategoryLabel/addSCLabel',
@@ -2,11 +2,27 @@ @@ -2,11 +2,27 @@
2 <%include '../common/__partail/ListHeader'%> 2 <%include '../common/__partail/ListHeader'%>
3 3
4 <div class="contentpanel"> 4 <div class="contentpanel">
5 - <div style="margin-bottom: 20px"> 5 + <div class="panel-body" >
6 <a href="/product/class/new" class="btn btn-success"><i class="fa fa-plus"></i> 添加品类</a> 6 <a href="/product/class/new" class="btn btn-success"><i class="fa fa-plus"></i> 添加品类</a>
7 </div> 7 </div>
8 8
9 - <div class="panel"> 9 + <div class="panel-body">
  10 + <div class="row">
  11 + <div class="panel-col2">
  12 + <select name="status" id="status" tabindex="-1" title="" class="select2-offscreen brandBtn-group">
  13 + <option value="-1">未选择</option>
  14 + <option value="1">开启</option>
  15 + <option value="0">关闭</option>
  16 + </select>
  17 + </div>
  18 + <div class="panel-col">
  19 + <a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a>
  20 + <a id="filter-all" href="/erpproduct/sort/index" class="btn btn-info">全部</a>
  21 + </div>
  22 + </div>
  23 + </div>
  24 +
  25 + <div class="panel" style="display: none;">
10 <div class="panel-body nopadding"> 26 <div class="panel-body nopadding">
11 <div class="table-responsive"> 27 <div class="table-responsive">
12 <table class="table table-bordered toggle-table"> 28 <table class="table table-bordered toggle-table">
@@ -43,6 +59,10 @@ @@ -43,6 +59,10 @@
43 data-status="<%item.status%>"> 59 data-status="<%item.status%>">
44 <%if item.booleanStatus%>关闭<%else%>开启<%/if%> 60 <%if item.booleanStatus%>关闭<%else%>开启<%/if%>
45 </a> 61 </a>
  62 + <%if item.canDelFlag%>
  63 + <a href="/erpproduct/sorter/del/<%item.id%>"
  64 + class="btn btn-xs del-class-btn btn-danger">删除</a>
  65 + <%/if%>
46 </td> 66 </td>
47 </tr> 67 </tr>
48 <%/each%> 68 <%/each%>
@@ -52,6 +72,46 @@ @@ -52,6 +72,46 @@
52 </div> 72 </div>
53 </div> 73 </div>
54 </div> 74 </div>
  75 + <div class="panel">
  76 + <div class="panel-body nopadding">
  77 +
  78 + <div class="sale-category-table dataTables_wrapper no-footer" id="basicTable"></div>
  79 + </div>
  80 + </div>
55 </div> 81 </div>
56 82
  83 +<input type="hidden" id="gridurl" value="<%gridurl%>">
  84 +<script type="text/template" id="tableHdTemp">
  85 + <div class="level-hd clearfix">
  86 + <span class="folder" style="width: 10%"></span>
  87 + <span style="width: 10%">ID</span>
  88 + <span style="width: 15%">品类名称</span>
  89 + <span style="width: 10%">品类缩写</span>
  90 + <span style="width: 15%">所属分类</span>
  91 + <span class="orderby" style="width: 10%">排序</span>
  92 + <span class="status" style="width: 10%">状态</span>
  93 + <span class="operate" style="width: 20%">操作</span>
  94 + </div>
  95 +</script>
  96 +<script type="text/template" id="tableTemp2">
  97 + <span class="folder" style="width: 10%"></span>
  98 + <span style="font-size: 10px;width: 10%">[[id]]</span>
  99 + <span style="font-size: 10px;width: 15%">[[sortName]]</span>
  100 + <span style="font-size: 10px;width: 10%">[[sortInitials]]</span>
  101 + <span style="font-size: 10px;width: 15%">[[sortLevel]]级分类</span>
  102 + <span class="orderby" style="font-size: 10px;width: 10%">[[orderBy]]</span>
  103 + <span class="status" style="font-size: 10px;width: 10%">[[if status=="1"]]<b style="color: #449d44">开启</b>[[/if]][[if status=="0"]]<b style="color: #d9534f">关闭</b>[[/if]]</span>
  104 + <span class="operate" style="font-size: 10px;width: 20%" data-id="[[id]]" data-name="[[sortName]]">
  105 + <a class="btn btn-info btn-xs edit-class-btn" href="/product/class/edit/[[id]]">编辑</a>
  106 + <b class="openAndClose" data-id="[[id]]" data-name="[[sortName]]">
  107 + [[if status=="1"]]<a class="btn btn-danger open-close-btn btn-xs close-category" data-status="[[status]]" href="javascript:;">关闭</a>[[/if]]
  108 + [[if status=="0"]]<a class="btn btn-warning open-close-btn btn-xs open-category" data-status="[[status]]" href="javascript:;">开启</a>[[/if]]
  109 + </b>
  110 + [[if canDelFlag]]
  111 + <a href="/erpproduct/sorter/del/[[id]]" class="btn btn-xs del-class-btn btn-danger">删除</a>
  112 + [[/if]]
  113 + </span>
  114 +
  115 +</script>
  116 +
57 <%include '../common/__ui/footer'%> 117 <%include '../common/__ui/footer'%>
@@ -3,19 +3,23 @@ @@ -3,19 +3,23 @@
3 3
4 <div class="contentpanel"> 4 <div class="contentpanel">
5 5
6 - <div class="panel panel-default" style="margin:10px 0; display: none">  
7 - <div class="panel-body nopadding">  
8 - <div class="state-select">  
9 - <strong>状态:</strong>  
10 - <label><input type="radio" name="state" value="">全部</label>  
11 - <label class="current"><input type="radio" name="state" value="1">开启</label>  
12 - <label><input type="radio" name="state" value="0">关闭</label> 6 +
  7 + <a href="javascript:;" id="add-root-category" class="btn btn-success" style="margin:10px 0;"><i class="fa fa-plus"></i> 添加根分类</a>
  8 + <div class="panel-body">
  9 + <div class="row">
  10 + <div class="panel-col2">
  11 + <select name="state" id="state" tabindex="-1" title="" class="select2-offscreen brandBtn-group">
  12 + <option value="-1">未选择</option>
  13 + <option value="1">开启</option>
  14 + <option value="0">关闭</option>
  15 + </select>
  16 + </div>
  17 + <div class="panel-col">
  18 + <a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a>
  19 + <a id="filter-all" href="/sale/category/index" class="btn btn-info">全部</a>
13 </div> 20 </div>
14 </div> 21 </div>
15 </div> 22 </div>
16 -  
17 - <a href="javascript:;" id="add-root-category" class="btn btn-success" style="margin:10px 0;"><i class="fa fa-plus"></i> 添加根分类</a>  
18 -  
19 <div class="panel"> 23 <div class="panel">
20 <div class="panel-body nopadding"> 24 <div class="panel-body nopadding">
21 25
@@ -263,7 +267,10 @@ @@ -263,7 +267,10 @@
263 <a class="btn btn-danger btn-xs close-category" href="javascript:;">关闭</a> 267 <a class="btn btn-danger btn-xs close-category" href="javascript:;">关闭</a>
264 [[/if]] 268 [[/if]]
265 [[if b.state=="0"]] 269 [[if b.state=="0"]]
266 - <a class="btn btn-warning btn-xs open-category" href="javascript:;">开启</a> 270 + <a class="btn btn-warning btn-xs open-category" href="javascript:;">开启[[b.canDelFlag]]</a>
  271 + [[/if]]
  272 + [[if b.canDelFlag]]
  273 + <a class="btn btn-warning btn-xs del-category" href="javascript:;">删除</a>
267 [[/if]] 274 [[/if]]
268 </span> 275 </span>
269 </div> 276 </div>
@@ -296,6 +303,7 @@ @@ -296,6 +303,7 @@
296 <b class="openAndClose" data-id="[[categoryId]]" data-name="[[categoryName]]"> 303 <b class="openAndClose" data-id="[[categoryId]]" data-name="[[categoryName]]">
297 [[if state=="1"]]<a class="btn btn-danger btn-xs close-category" href="javascript:;">关闭</a>[[/if]] 304 [[if state=="1"]]<a class="btn btn-danger btn-xs close-category" href="javascript:;">关闭</a>[[/if]]
298 [[if state=="0"]]<a class="btn btn-warning btn-xs open-category" href="javascript:;">开启</a>[[/if]] 305 [[if state=="0"]]<a class="btn btn-warning btn-xs open-category" href="javascript:;">开启</a>[[/if]]
  306 + [[if canDelFlag]]<a class="btn btn-danger btn-xs del-category" href="javascript:;">删除</a>[[/if]]
299 </b> 307 </b>
300 </span> 308 </span>
301 </script> 309 </script>