Authored by weiqingting

优惠码

@@ -3,7 +3,16 @@ var edit=require('../common/edit'); @@ -3,7 +3,16 @@ var edit=require('../common/edit');
3 exports.init = function() { 3 exports.init = function() {
4 4
5 var e=new edit("#basicForm"); 5 var e=new edit("#basicForm");
6 - 6 + //brandTonality
  7 + e.on("validate",function(){
  8 + var num=$("#brandTonality").val();
  9 + if(!!num){
  10 + if(!(/^\d[0-100]$/g.test(num))){
  11 + return "调性指数(范围:1-100)";
  12 + }
  13 + }
  14 + return true;
  15 + });
7 e.init(); 16 e.init();
8 $("#save_brand").click(function(){ 17 $("#save_brand").click(function(){
9 e.submit($("#basicForm").attr("action"),function(option){ 18 e.submit($("#basicForm").attr("action"),function(option){
@@ -44,7 +44,7 @@ exports.init = function() { @@ -44,7 +44,7 @@ exports.init = function() {
44 }, 44 },
45 columns: [ 45 columns: [
46 {display: "LOGO", name: "brandIco",render:function(item){ 46 {display: "LOGO", name: "brandIco",render:function(item){
47 - return '<img src="'+item.brandIco+'"/>' 47 + return '<img src="'+item.brandIco+'" width="100" height="60"/>'
48 }}, 48 }},
49 {display: '品牌名称', name: "brandName"}, 49 {display: '品牌名称', name: "brandName"},
50 {display: '英文名称', name: "brandNameEn"}, 50 {display: '英文名称', name: "brandNameEn"},
@@ -76,15 +76,10 @@ exports.init = function() { @@ -76,15 +76,10 @@ exports.init = function() {
76 76
77 $("#filter-btn").click(function(){ 77 $("#filter-btn").click(function(){
78 location.hash = ''; 78 location.hash = '';
79 - g.reload({  
80 - page: 1  
81 - });  
82 - });  
83 -  
84 - /*$(window).on('hashchange', function() {  
85 g.reload(); 79 g.reload();
86 }); 80 });
87 - */ 81 +
  82 +
88 function operateAjax(options, callback) { 83 function operateAjax(options, callback) {
89 $.ajax({ 84 $.ajax({
90 type: 'POST', 85 type: 'POST',
@@ -5,87 +5,16 @@ var grid=require('./grid'), @@ -5,87 +5,16 @@ var grid=require('./grid'),
5 edit = require('./edit'), 5 edit = require('./edit'),
6 dropDown = require('./dropDown'), 6 dropDown = require('./dropDown'),
7 dialog=require('./dialog'); 7 dialog=require('./dialog');
  8 +tab=require('./tab'),
  9 +util=require('./util');
8 10
9 var common={ 11 var common={
10 grid:grid, 12 grid:grid,
11 dialog:dialog, 13 dialog:dialog,
  14 + tab:tab,
12 dropDown:dropDown, 15 dropDown:dropDown,
13 edit:edit, 16 edit:edit,
14 - util:{  
15 - __ajax:function(options,callback){  
16 - if(typeof options.data=="string"){  
17 - common.util.__tip(options.data,"danger");  
18 - }else{  
19 - $.ajax({  
20 - type: 'POST',  
21 - url: options.url,  
22 - dataType: 'json',  
23 - data:options.data||{},  
24 - success: function(res) {  
25 - res=res.data;  
26 - if (("" + res.code) === "200") {  
27 - common.util.__tip(res.message,"success",callback.bind(this,res));  
28 - } else {  
29 - common.util.__tip(res.message,"danger");  
30 - }  
31 - }  
32 - });  
33 - }  
34 - },  
35 - __tip:function(message,callback){  
36 - //danger  
37 - var options={};  
38 - if (arguments.length > 1) {  
39 - options.title=arguments[0];  
40 - if (typeof (arguments[1]) === "string") {  
41 - options.class_name="growl-"+arguments[1];  
42 - }else{  
43 - options.class_name="growl-success";  
44 - }  
45 - var lastargs = Array.prototype.slice.call(arguments, arguments.length-1);  
46 - lastargs=lastargs[0];  
47 - if(typeof lastargs==="function"){  
48 - options.after_open=setTimeout(function() {  
49 - lastargs&&lastargs();  
50 - },100)  
51 - }  
52 - } else {  
53 - console.log("__tip error");  
54 - return false;  
55 - };  
56 - options.sticky=false;  
57 - options.time=1000;  
58 -  
59 - $.gritter.add(options);  
60 - },  
61 - __template: function () {  
62 - var args = arguments, result;  
63 - if (args.length > 0) {  
64 - if (typeof args[0]==="string") {  
65 - result = args[0];  
66 - if (args.length == 2 && typeof args[1]=="object") {  
67 - for (var key in args[1]) {  
68 - if (args[1][key] != undefined) {  
69 - var reg = new RegExp("({" + key + "})", "g");  
70 - result = result.replace(reg, args[1][key]);  
71 - }  
72 - }  
73 - } else {  
74 - for (var i = 1; i < args.length; i++) {  
75 - if (args[i] != undefined) {  
76 - var reg = new RegExp("({[" + (i - 1) + "]})", "g");  
77 - result = result.replace(reg, args[i]);  
78 - }  
79 - }  
80 - }  
81 - }  
82 - }  
83 - return result;  
84 - },  
85 - __input:function(id){  
86 - return !!~$.trim($('#'+id).val())?$('#'+id).val():""  
87 - }  
88 - } 17 + util:util
89 } 18 }
90 19
91 module.exports=common; 20 module.exports=common;
@@ -191,11 +191,12 @@ edit.prototype={ @@ -191,11 +191,12 @@ edit.prototype={
191 191
192 $("input:text",that.el) 192 $("input:text",that.el)
193 .add("input[type=number]",that.el) 193 .add("input[type=number]",that.el)
  194 + .add("input[type=file]",that.el)
194 .add("input:hidden",that.el) 195 .add("input:hidden",that.el)
195 .add("textarea",that.el) 196 .add("textarea",that.el)
196 .each(function() { 197 .each(function() {
197 var id = $(this).attr("id"); 198 var id = $(this).attr("id");
198 - var value = $(this).val(); 199 + var value =$.trim($(this).val());
199 var name=$(this).attr("placeholder")&&!(/^\d+$/.test($(this).attr("placeholder")))?$(this).attr("placeholder").replace(/请填写/g,''):$(this).parents(".form-group").find("label").text().replace(/\*/g,''); 200 var name=$(this).attr("placeholder")&&!(/^\d+$/.test($(this).attr("placeholder")))?$(this).attr("placeholder").replace(/请填写/g,''):$(this).parents(".form-group").find("label").text().replace(/\*/g,'');
200 var rule = []; 201 var rule = [];
201 202
@@ -260,7 +261,7 @@ edit.prototype={ @@ -260,7 +261,7 @@ edit.prototype={
260 .add("textarea",that.el) 261 .add("textarea",that.el)
261 .each(function(){ 262 .each(function(){
262 var name=$(this).attr("id"); 263 var name=$(this).attr("id");
263 - var value=$(this).val(); 264 + var value=$.trim($(this).val());
264 data[name]=value; 265 data[name]=value;
265 }); 266 });
266 $("input[type=file]",that.el).each(function(){ 267 $("input[type=file]",that.el).each(function(){
@@ -51,44 +51,7 @@ grid.prototype={ @@ -51,44 +51,7 @@ grid.prototype={
51 g.clear(); 51 g.clear();
52 g.renderHead(); 52 g.renderHead();
53 g.renderBody(); 53 g.renderBody();
54 - g.renderTab();  
55 - },  
56 - renderTab: function() {  
57 - var g = this,  
58 - p = this.options,  
59 - $tab = $('<ul class="nav nav-pills"></ul>');  
60 -  
61 - if (!p.tabUrl) return;  
62 - $('#table-tabs').empty().append($tab);  
63 -  
64 - setTimeout(function() {  
65 - $.ajax({  
66 - type: 'POST',  
67 - dataType: 'json',  
68 - url: '/getCodeCount',  
69 - data: g.__getparams()  
70 - }).then(function(res) {  
71 - var data = res.data.data,  
72 - _s = g.__getparams().status;  
73 -  
74 - $tab.empty();  
75 - $.each(data, function(key, value) {  
76 - $tab.append($('<li data-status="' + key + '"><a href="javascript:;">' + p.tabConvert(key) + '(' + value + ')</a></li>'));  
77 - });  
78 - if ($('#table-tabs').find('[data-status="' + _s + '"]').size() < 1) {  
79 - $('#table-tabs').find('[data-status="all"]').addClass('active').siblings().removeClass('active');  
80 - } else {  
81 - $('#table-tabs').find('[data-status="' + _s + '"]').addClass('active').siblings().removeClass('active');  
82 - }  
83 - });  
84 - }, 500);  
85 -  
86 - $('#table-tabs').on('click', 'li', function() {  
87 - $(this).addClass('active').siblings().removeClass('active');  
88 - p.status = parseInt($(this).data('status'));  
89 - p.page = 1;  
90 - g.renderBody();  
91 - }); 54 + // g.renderTab();
92 }, 55 },
93 renderBody:function(){ 56 renderBody:function(){
94 var g = this, p = this.options; 57 var g = this, p = this.options;
@@ -138,12 +101,6 @@ grid.prototype={ @@ -138,12 +101,6 @@ grid.prototype={
138 param.page = urlParam.page; 101 param.page = urlParam.page;
139 } 102 }
140 103
141 - if (param.status !== p.status) {  
142 - param.status = p.status;  
143 - } else {  
144 - param.status = urlParam.status;  
145 - }  
146 -  
147 param.size = p.size; 104 param.size = p.size;
148 105
149 var urlHash = ''; 106 var urlHash = '';
@@ -291,7 +248,7 @@ grid.prototype={ @@ -291,7 +248,7 @@ grid.prototype={
291 reload:function(param){ 248 reload:function(param){
292 var g = this, p = this.options; 249 var g = this, p = this.options;
293 p.page=1; 250 p.page=1;
294 - g.renderTab(); 251 + // g.renderTab();
295 g.__bodyload(); 252 g.__bodyload();
296 }, 253 },
297 254
  1 +var $=require('jquery'),
  2 + util=require('./util');
  3 +
  4 +
  5 +var tab=function(options) {
  6 + var defaults={
  7 + innerHtml:'<ul class="nav nav-pills"></ul>'
  8 + };
  9 + this.options=$.extend({}, defaults, options);
  10 + $(options.el).html(this.options.innerHtml);
  11 + this.tab=$("ul",options.el);
  12 + this.active=undefined;//undefined==void(0)
  13 + return this;
  14 +}
  15 +tab.prototype={
  16 + constructor:tab,
  17 + init:function(data){
  18 + var g = this, p = this.options;
  19 + $(this.tab).html("");
  20 + this.render(data);
  21 + this.bind(p.click);
  22 + return this;
  23 + },
  24 + bind:function(callback){
  25 + var g = this, p = this.options;
  26 + $(p.el).on("click","li",function(){
  27 + $(this).addClass('active').siblings().removeClass('active');
  28 + g.active=$(this).find("a").attr("columnname");
  29 + callback&&callback();
  30 + });
  31 + },
  32 + render:function(data){
  33 + var g = this, p = this.options;
  34 +
  35 + var lis=[];
  36 + $(p.columns).each(function (i, column) {
  37 + var li = $("<li></li>");
  38 + var a=$("<a href='javascript:void(0);'></a>");
  39 +
  40 + if (column.name) a.attr({ columnname: column.name });
  41 + var h_t = column.display || "";
  42 + a.html(h_t);
  43 +
  44 + li.append(a);
  45 + g.tab.append(li);
  46 + });
  47 +
  48 + g.tab.html(util.__template(g.tab.html(),data||{}));
  49 +
  50 + }
  51 +}
  52 +
  53 +
  54 +module.exports=tab;
  1 +var $=require('jquery');
  2 +var util={
  3 + __ajax:function(options,callback,notip){
  4 + if(typeof options.data=="string"){
  5 + util.__tip(options.data,"danger");
  6 + }else{
  7 + $.ajax({
  8 + type: 'POST',
  9 + url: options.url,
  10 + dataType: 'json',
  11 + data:options.data||{},
  12 + success: function(res) {
  13 + res=res.data;
  14 + if (("" + res.code) === "200") {
  15 +
  16 + notip?callback.bind(this,res)():util.__tip(res.message,"success",callback.bind(this,res));
  17 + } else {
  18 + util.__tip(res.message,"danger");
  19 + }
  20 + }
  21 + });
  22 + }
  23 + },
  24 + __tip:function(message,callback){
  25 + //danger
  26 + var options={};
  27 + if (arguments.length > 1) {
  28 + options.title=arguments[0];
  29 + if (typeof (arguments[1]) === "string") {
  30 + options.class_name="growl-"+arguments[1];
  31 + }else{
  32 + options.class_name="growl-success";
  33 + }
  34 + var lastargs = Array.prototype.slice.call(arguments, arguments.length-1);
  35 + lastargs=lastargs[0];
  36 + if(typeof lastargs==="function"){
  37 + options.after_open=setTimeout(function() {
  38 + lastargs&&lastargs();
  39 + },100)
  40 + }
  41 + } else {
  42 + console.log("__tip error");
  43 + return false;
  44 + };
  45 + options.sticky=false;
  46 + options.time=1000;
  47 +
  48 + $.gritter.add(options);
  49 + },
  50 + __template: function () {
  51 + var args = arguments, result;
  52 + if (args.length > 0) {
  53 + if (typeof args[0]==="string") {
  54 + result = args[0];
  55 + if (args.length == 2 && typeof args[1]=="object") {
  56 + for (var key in args[1]) {
  57 + if (args[1][key] != undefined) {
  58 + var regkey=((+key)==(+key))?"["+key+"]":key;
  59 + var reg = new RegExp("({" + regkey + "})", "g");
  60 + result = result.replace(reg, args[1][key]);
  61 + }
  62 + }
  63 + } else {
  64 + for (var i = 1; i < args.length; i++) {
  65 + if (args[i] != undefined) {
  66 + var reg = new RegExp("({[" + (i - 1) + "]})", "g");
  67 + result = result.replace(reg, args[i]);
  68 + }
  69 + }
  70 + }
  71 + }
  72 + }
  73 + return result;
  74 + },
  75 + __input:function(id){
  76 + return !!~$.trim($('#'+id).val())?$('#'+id).val():""
  77 + }
  78 + }
  79 +module.exports=util;
@@ -114,7 +114,7 @@ exports.init = function() { @@ -114,7 +114,7 @@ exports.init = function() {
114 return result; 114 return result;
115 } 115 }
116 } 116 }
117 - result=badcode.join(",")+"重复"; 117 + result=""+badcode.join(",")+"重复";
118 }, function() { 118 }, function() {
119 result="检查优惠码,网络发生异常"; 119 result="检查优惠码,网络发生异常";
120 }); 120 });
@@ -14,17 +14,32 @@ exports.init = function() { @@ -14,17 +14,32 @@ exports.init = function() {
14 //下拉框 14 //下拉框
15 new common.dropDown({el: '#filter-dep'}); 15 new common.dropDown({el: '#filter-dep'});
16 16
  17 + var t = new common.tab({
  18 + el:"#basicTab",
  19 + click:function(){
  20 + g.reload();
  21 + },
  22 + columns:[
  23 + {name:"0",display:"待审核({0})"},
  24 + {name:"1",display:"审核通过({1})"},
  25 + {name:"2",display:"驳回({2})"},
  26 + {name:"3",display:"过期({3})"},
  27 + {name:"4",display:"作废({4})"},
  28 + {name:"all",display:"全部({all})"}
  29 + ]}).init({"0":0,"1":0,"2":0,"3":0,"4":0,"all":0});
  30 +
  31 + //grid
17 var g = new common.grid({ 32 var g = new common.grid({
18 el: '#basicTable', 33 el: '#basicTable',
19 // tabUrl: $('#tabUrl').val(), 34 // tabUrl: $('#tabUrl').val(),
20 // tabConvert: statusConvert, 35 // tabConvert: statusConvert,
21 // size: 10, 36 // size: 10,
22 parms:function(){ 37 parms:function(){
23 -  
24 return { 38 return {
25 batchNo: common.util.__input("filter-id"), 39 batchNo: common.util.__input("filter-id"),
26 name: common.util.__input("filter-name"), 40 name: common.util.__input("filter-name"),
27 - reqDepartment:common.util.__input("filter-dep") 41 + reqDepartment:common.util.__input("filter-dep"),
  42 + status:t.active
28 }; 43 };
29 }, 44 },
30 columns:[ 45 columns:[
@@ -64,15 +79,35 @@ exports.init = function() { @@ -64,15 +79,35 @@ exports.init = function() {
64 }} 79 }}
65 ] 80 ]
66 }) 81 })
  82 +
  83 +
  84 + //tab
  85 +
  86 + var loadtab=function(){
  87 + setTimeout(function(){
  88 + common.util.__ajax({
  89 + url:'/coupon/ajax/getCodeCount',
  90 + data:g.options.parms()
  91 +
  92 + },function(res){
  93 + t.init(res.data);
  94 + },true);
  95 + },400);
  96 + }
  97 +
67 g.init($("#gridurl").val()); 98 g.init($("#gridurl").val());
  99 + loadtab();
  100 +
68 101
69 $("#filter-btn").click(function(){ 102 $("#filter-btn").click(function(){
70 g.reload(); 103 g.reload();
  104 + loadtab();
71 }); 105 });
72 $("#all-btn").click(function(){ 106 $("#all-btn").click(function(){
73 $("#filter-id").add("#filter-name").val(''); 107 $("#filter-id").add("#filter-name").val('');
74 $('#filter-dep').val("-1").trigger("change"); 108 $('#filter-dep').val("-1").trigger("change");
75 g.reload(); 109 g.reload();
  110 + loadtab();
76 }); 111 });
77 112
78 var Bll={ 113 var Bll={
@@ -32,34 +32,13 @@ exports.res = [ @@ -32,34 +32,13 @@ exports.res = [
32 url: '/erpproduct/brands/index', 32 url: '/erpproduct/brands/index',
33 isJsonRaw: true, 33 isJsonRaw: true,
34 params: [ 34 params: [
35 - {  
36 - name: 'brandId',  
37 - type: 'Number'  
38 - },  
39 - {  
40 - name: 'status',  
41 - type: 'Number'  
42 - },  
43 - {  
44 - name: 'brandLevel',  
45 - type: 'string'  
46 - },  
47 - {  
48 - name: 'startTime',  
49 - type: 'string'  
50 - },  
51 - {  
52 - name: 'endTime',  
53 - type: 'string'  
54 - },  
55 - {  
56 - name: 'page',  
57 - type: 'string'  
58 - },  
59 - {  
60 - name: 'size',  
61 - type: 'Number'  
62 - } 35 + {name: 'brandId',type: 'Number'},
  36 + {name: 'status', type: 'Number'},
  37 + {name: 'brandLevel',type: 'string'},
  38 + {name: 'startTime',type: 'string'},
  39 + {name: 'endTime',type: 'string'},
  40 + {name: 'page',type: 'Number'},
  41 + {name: 'size',type: 'Number'}
63 ] 42 ]
64 }, { 43 }, {
65 //品牌管理 -> 编辑/关闭/开启品牌ajax 44 //品牌管理 -> 编辑/关闭/开启品牌ajax
@@ -68,78 +47,24 @@ exports.res = [ @@ -68,78 +47,24 @@ exports.res = [
68 url: '/erpproduct/brands/editBrand', 47 url: '/erpproduct/brands/editBrand',
69 isJsonRaw: true, 48 isJsonRaw: true,
70 params: [ 49 params: [
71 - {  
72 - name: 'id',  
73 - type: 'Number'  
74 - },  
75 - {  
76 - name: 'status',  
77 - type: 'Number'  
78 - },  
79 - {  
80 - name: 'brandName',  
81 - type: 'string'  
82 - },  
83 - {  
84 - name: 'brandNameEn',  
85 - type: 'string'  
86 - },  
87 - {  
88 - name: 'brandDomain',  
89 - type: 'string'  
90 - },  
91 - {  
92 - name: 'brandIco',  
93 - type: 'string'  
94 - },  
95 - {  
96 - name: 'brandLevel',  
97 - type: 'string'  
98 - },  
99 - {  
100 - name: 'promotionLevel',  
101 - type: 'Number'  
102 - },  
103 - {  
104 - name: 'mainCategory',  
105 - type: 'Number'  
106 - },  
107 - {  
108 - name: 'brandHeadstream',  
109 - type: 'Number'  
110 - },  
111 - {  
112 - name: 'brandTypes',  
113 - type: 'Number'  
114 - },  
115 - {  
116 - name: 'brandUrl',  
117 - type: 'string'  
118 - },  
119 - {  
120 - name: 'brandIntro',  
121 - type: 'string'  
122 - },  
123 - {  
124 - name: 'brandOutline',  
125 - type: 'string'  
126 - },  
127 - {  
128 - name: 'brandFounder',  
129 - type: 'string'  
130 - },  
131 - {  
132 - name: 'brandStyle',  
133 - type: 'string'  
134 - },  
135 - {  
136 - name: 'brandNature',  
137 - type: 'Number'  
138 - },  
139 - {  
140 - name: 'brandTonality',  
141 - type: 'string'  
142 - } 50 + {name: 'id',type: 'Number'},
  51 + {name: 'status',type: 'Number'},
  52 + {name: 'brandName',type: 'string'},
  53 + {name: 'brandNameEn',type: 'string'},
  54 + {name: 'brandDomain',type: 'string'},
  55 + {name: 'brandIco',type: 'string'},
  56 + {name: 'brandLevel',type: 'string'},
  57 + {name: 'promotionLevel',type: 'Number'},
  58 + {name: 'mainCategory',type: 'Number'},
  59 + {name: 'brandHeadstream',type: 'Number'},
  60 + {name: 'brandTypes',type: 'Number'},
  61 + {name: 'brandUrl',type: 'string'},
  62 + {name: 'brandIntro',type: 'string'},
  63 + {name: 'brandOutline',type: 'string'},
  64 + {name: 'brandFounder',type: 'string'},
  65 + {name: 'brandStyle',type: 'string'},
  66 + {name: 'brandNature',type: 'Number'},
  67 + {name: 'brandTonality',type: 'string'}
143 ] 68 ]
144 }, { 69 }, {
145 route: '/erpproduct/brands/edit/:brandId', 70 route: '/erpproduct/brands/edit/:brandId',
@@ -164,79 +89,31 @@ exports.res = [ @@ -164,79 +89,31 @@ exports.res = [
164 src:'/brand/edit', 89 src:'/brand/edit',
165 noApi:true, 90 noApi:true,
166 data:{ 91 data:{
167 - action:'/erpproduct/brand/add', 92 + action:'/erpproduct/ajax/brands/add',
168 data:{} 93 data:{}
169 } 94 }
170 }, { 95 }, {
171 - route: '/erpproduct/brand/add', 96 + route: '/erpproduct/ajax/brands/add',
172 method: 'POST', 97 method: 'POST',
173 url: '/erpproduct/brands/addBrand', 98 url: '/erpproduct/brands/addBrand',
174 isJsonRaw: true, 99 isJsonRaw: true,
175 params:[ 100 params:[
176 - {  
177 - name: 'brandName',  
178 - type: 'string'  
179 - },  
180 - {  
181 - name: 'brandNameEn',  
182 - type: 'string'  
183 - },  
184 - {  
185 - name: 'brandDomain',  
186 - type: 'string'  
187 - },  
188 - {  
189 - name: 'brandIco',  
190 - type: 'string'  
191 - },  
192 - {  
193 - name: 'brandLevel',  
194 - type: 'string'  
195 - },  
196 - {  
197 - name: 'promotionLevel',  
198 - type: 'Number'  
199 - },  
200 - {  
201 - name: 'mainCategory',  
202 - type: 'Number'  
203 - },  
204 - {  
205 - name: 'brandHeadstream',  
206 - type: 'Number'  
207 - },  
208 - {  
209 - name: 'brandTypes',  
210 - type: 'Number'  
211 - },  
212 - {  
213 - name: 'brandUrl',  
214 - type: 'string'  
215 - },  
216 - {  
217 - name: 'brandIntro',  
218 - type: 'string'  
219 - },  
220 - {  
221 - name: 'brandOutline',  
222 - type: 'string'  
223 - },  
224 - {  
225 - name: 'brandFounder',  
226 - type: 'string'  
227 - },  
228 - {  
229 - name: 'brandStyle',  
230 - type: 'string'  
231 - },  
232 - {  
233 - name: 'brandNature',  
234 - type: 'Number'  
235 - },  
236 - {  
237 - name: 'brandTonality',  
238 - type: 'string'  
239 - } 101 + {name: 'brandName',type: 'string'},
  102 + {name: 'brandNameEn',type: 'string'},
  103 + {name: 'brandDomain',type: 'string'},
  104 + {name: 'brandIco',type: 'string'},
  105 + {name: 'brandLevel',type: 'string'},
  106 + {name: 'promotionLevel',type: 'Number'},
  107 + {name: 'mainCategory',type: 'Number'},
  108 + {name: 'brandHeadstream',type: 'Number'},
  109 + {name: 'brandTypes',type: 'Number'},
  110 + {name: 'brandUrl',type: 'string'},
  111 + {name: 'brandIntro',type: 'string'},
  112 + {name: 'brandOutline',type: 'string'},
  113 + {name: 'brandFounder',type: 'string'},
  114 + {name: 'brandStyle',type: 'string'},
  115 + {name: 'brandNature',type: 'Number'},
  116 + {name: 'brandTonality',type: 'string'}
240 ] 117 ]
241 } 118 }
242 ] 119 ]
@@ -12,7 +12,7 @@ exports.res = [ @@ -12,7 +12,7 @@ exports.res = [
12 data: { 12 data: {
13 pageTitle: '优惠码列表', 13 pageTitle: '优惠码列表',
14 createUrl: '/coupon/add', 14 createUrl: '/coupon/add',
15 - gridurl:'/coupon/getPromotion', 15 + gridurl:'/coupon/ajax/getPromotion',
16 // tabUrl: '/getCodeCount', 16 // tabUrl: '/getCodeCount',
17 // sendUrl: '/sendPromotion', 17 // sendUrl: '/sendPromotion',
18 // auditUrl: '/auditPromotion' 18 // auditUrl: '/auditPromotion'
@@ -30,7 +30,7 @@ exports.res = [ @@ -30,7 +30,7 @@ exports.res = [
30 }] 30 }]
31 }, 31 },
32 { 32 {
33 - route: '/coupon/getPromotion', 33 + route: '/coupon/ajax/getPromotion',
34 method: 'POST', 34 method: 'POST',
35 url: '/promotioncode/getPromotionCodeList', 35 url: '/promotioncode/getPromotionCodeList',
36 isJsonRaw: true, 36 isJsonRaw: true,
@@ -81,7 +81,7 @@ exports.res = [ @@ -81,7 +81,7 @@ exports.res = [
81 ] 81 ]
82 }, 82 },
83 { 83 {
84 - route: '/getCodeCount', 84 + route: '/coupon/ajax/getCodeCount',
85 method: 'POST', 85 method: 'POST',
86 url: '/promotioncode/getPromotionCodeCountByStatus', 86 url: '/promotioncode/getPromotionCodeCountByStatus',
87 isJsonRaw: true, 87 isJsonRaw: true,
@@ -35,7 +35,7 @@ @@ -35,7 +35,7 @@
35 <div class="form-group"> 35 <div class="form-group">
36 <label class="col-sm-2 control-label">品牌logo <span class="red">*</span></label> 36 <label class="col-sm-2 control-label">品牌logo <span class="red">*</span></label>
37 <div class="col-sm-8"> 37 <div class="col-sm-8">
38 - <input type="file" id="brandIco" name="brandIco" value="{{brandIco}}" /> 38 + <input type="file" id="brandIco" name="brandIco" value="{{brandIco}}" required placeholder="品牌logo" />
39 </div> 39 </div>
40 </div> 40 </div>
41 <div class="form-group"> 41 <div class="form-group">
@@ -102,7 +102,7 @@ @@ -102,7 +102,7 @@
102 <label class="radio-inline"> 102 <label class="radio-inline">
103 <input type="radio" name="brandHeadstream" value="8" />美国 </label> 103 <input type="radio" name="brandHeadstream" value="8" />美国 </label>
104 </div> 104 </div>
105 - <input type="hidden" id="brandHeadstream" value="{{brandHeadstream}}" for="radio"> 105 + <input type="hidden" id="brandHeadstream" value="{{brandHeadstream}}" required for="radio">
106 </div> 106 </div>
107 107
108 <div class="form-group"> 108 <div class="form-group">
@@ -51,14 +51,9 @@ @@ -51,14 +51,9 @@
51 </div> 51 </div>
52 </div> 52 </div>
53 <div class="panel panel-primary-head"> 53 <div class="panel panel-primary-head">
54 - <div id="basicTable_wrapper" class="dataTables_wrapper no-footer">  
55 - <div id="table-tabs" class="list-tabs"> 54 + <div class="dataTab_wrapper" id="basicTab">
56 </div> 55 </div>
57 - <div class="dataTables_length" id="basicTable">  
58 - </div>  
59 - <nav>  
60 - <ul id="pagination" class="pagination pagination-lg" data-page="{{pagination}}"></ul>  
61 - </nav> 56 + <div class="basicTable_wrapper" id="basicTable">
62 </div> 57 </div>
63 </div> 58 </div>
64 </div> 59 </div>
@@ -30,7 +30,7 @@ @@ -30,7 +30,7 @@
30 <form id="new-class-form" class="form-horizontal form-bordered" method="post" action="/product/sort/addProductSort"> 30 <form id="new-class-form" class="form-horizontal form-bordered" method="post" action="/product/sort/addProductSort">
31 <div class="form-group"> 31 <div class="form-group">
32 <label class="col-md-1 control-label"> 32 <label class="col-md-1 control-label">
33 - 物理类目<i>*</i> 33 + 物理类目<span class="red">*</span>
34 </label> 34 </label>
35 35
36 <div class="col-md-5"> 36 <div class="col-md-5">
@@ -40,7 +40,7 @@ @@ -40,7 +40,7 @@
40 40
41 <div class="form-group"> 41 <div class="form-group">
42 <label class="col-md-1 control-label"> 42 <label class="col-md-1 control-label">
43 - 品类缩写<i>*</i> 43 + 品类缩写<span class="red">*</span>
44 </label> 44 </label>
45 45
46 <div class="col-md-5"> 46 <div class="col-md-5">
@@ -85,7 +85,9 @@ @@ -85,7 +85,9 @@
85 </div>--> 85 </div>-->
86 86
87 <div class="form-group"> 87 <div class="form-group">
88 - <label class="col-md-1 control-label">排序</label> 88 + <label class="col-md-1 control-label">排序
  89 + <span class="red">*</span>
  90 + </label>
89 91
90 <div class="col-md-5"> 92 <div class="col-md-5">
91 <input id="orderBy" class="form-control" required value="{{data.orderBy}}" type="text" placeholder=""> 93 <input id="orderBy" class="form-control" required value="{{data.orderBy}}" type="text" placeholder="">
@@ -67,7 +67,8 @@ @@ -67,7 +67,8 @@
67 </div> 67 </div>
68 </div> 68 </div>
69 <div class="panel panel-primary-head"> 69 <div class="panel panel-primary-head">
70 - <div class="dataTables_wrapper no-footer" id="basicTable"> 70 +
  71 + <div class="dataTables_wrapper" id="basicTable">
71 </div> 72 </div>
72 </div> 73 </div>
73 </div> 74 </div>