专题管理添加编辑列表增加频道yhChannel字段
Showing
3 changed files
with
50 additions
and
31 deletions
@@ -3,11 +3,13 @@ var $ = require('jquery'), | @@ -3,11 +3,13 @@ var $ = require('jquery'), | ||
3 | util = require('../common/util'); | 3 | util = require('../common/util'); |
4 | 4 | ||
5 | 5 | ||
6 | - new common.dropDown({el: "#subject-type"}); | ||
7 | - new common.dropDown({el: "#subject-paltform"}); | ||
8 | - new common.dropDown({el: "#subject-status"}); | 6 | +new common.dropDown({el: "#subject-type"}); |
7 | +new common.dropDown({el: "#subject-paltform"}); | ||
8 | +new common.dropDown({el: "#subject-status"}); | ||
9 | 9 | ||
10 | - var g = new common.grid({ | 10 | +var yhChannelArr = ["男生", "女生", "儿童", "创意生活"]; |
11 | + | ||
12 | +var g = new common.grid({ | ||
11 | el: "#subject-manage", | 13 | el: "#subject-manage", |
12 | parms: function () { | 14 | parms: function () { |
13 | return { | 15 | return { |
@@ -36,6 +38,11 @@ var $ = require('jquery'), | @@ -36,6 +38,11 @@ var $ = require('jquery'), | ||
36 | return temp; | 38 | return temp; |
37 | } | 39 | } |
38 | }}, | 40 | }}, |
41 | + {display:"频道", name:"yhChannel", render: function (item) { | ||
42 | + if(item.yhChannel) { | ||
43 | + return yhChannelArr[item.yhChannel-1]; | ||
44 | + } | ||
45 | + }}, | ||
39 | {display: "状态", name: "status", render: function (item) { | 46 | {display: "状态", name: "status", render: function (item) { |
40 | if(item.status == 1) return "未定时"; | 47 | if(item.status == 1) return "未定时"; |
41 | else if(item.status == 2) return "未发布"; | 48 | else if(item.status == 2) return "未发布"; |
@@ -61,11 +68,11 @@ var $ = require('jquery'), | @@ -61,11 +68,11 @@ var $ = require('jquery'), | ||
61 | } | 68 | } |
62 | 69 | ||
63 | ] | 70 | ] |
64 | - }); | 71 | +}); |
65 | 72 | ||
66 | - g.init('/runManage/subjectManage/subjectList'); | 73 | +g.init('/runManage/subjectManage/subjectList'); |
67 | 74 | ||
68 | - var Bll = { | 75 | +var Bll = { |
69 | getLocalTime:function(nS) { | 76 | getLocalTime:function(nS) { |
70 | var date = new Date(parseInt(nS) * 1000); | 77 | var date = new Date(parseInt(nS) * 1000); |
71 | var mm = date.getMonth() + 1; | 78 | var mm = date.getMonth() + 1; |
@@ -166,21 +173,21 @@ var $ = require('jquery'), | @@ -166,21 +173,21 @@ var $ = require('jquery'), | ||
166 | } | 173 | } |
167 | }; | 174 | }; |
168 | 175 | ||
169 | - $('#add-subject').on('click', function() { | 176 | +$('#add-subject').on('click', function() { |
170 | var item = {}; | 177 | var item = {}; |
171 | Bll.toast('/runManage/subjectManage/addSubject', item, "专题添加"); | 178 | Bll.toast('/runManage/subjectManage/addSubject', item, "专题添加"); |
172 | - }); | 179 | +}); |
173 | 180 | ||
174 | - $(document).on('click', '.add2', function() { | 181 | +$(document).on('click', '.add2', function() { |
175 | var item = g.rows[$(this).data("index")]; | 182 | var item = g.rows[$(this).data("index")]; |
176 | if(typeof item.startTime == "number") { | 183 | if(typeof item.startTime == "number") { |
177 | item.startTime = Bll.getLocalTime(item.startTime); | 184 | item.startTime = Bll.getLocalTime(item.startTime); |
178 | item.endTime = Bll.getLocalTime(item.endTime); | 185 | item.endTime = Bll.getLocalTime(item.endTime); |
179 | } | 186 | } |
180 | Bll.toast('/runManage/subjectManage/modify', item, "专题编辑"); | 187 | Bll.toast('/runManage/subjectManage/modify', item, "专题编辑"); |
181 | - }); | 188 | +}); |
182 | 189 | ||
183 | - $(document).on('click', '.delbtn', function() { | 190 | +$(document).on('click', '.delbtn', function() { |
184 | var item=g.rows[$(this).data("index")]; | 191 | var item=g.rows[$(this).data("index")]; |
185 | common.dialog.confirm("警告", | 192 | common.dialog.confirm("警告", |
186 | "确认删除?", | 193 | "确认删除?", |
@@ -192,8 +199,8 @@ var $ = require('jquery'), | @@ -192,8 +199,8 @@ var $ = require('jquery'), | ||
192 | g.reload(); | 199 | g.reload(); |
193 | }); | 200 | }); |
194 | }); | 201 | }); |
195 | - }); | 202 | +}); |
196 | 203 | ||
197 | - $(document).on("click","#filter-btn",function () { | 204 | +$(document).on("click","#filter-btn",function () { |
198 | g.reload(1); | 205 | g.reload(1); |
199 | - }); | ||
206 | +}); |
@@ -3,13 +3,13 @@ exports.domain = require('../config/common.js').domain; | @@ -3,13 +3,13 @@ exports.domain = require('../config/common.js').domain; | ||
3 | //exports.domain = "http://172.16.6.210:8083/platform"; | 3 | //exports.domain = "http://172.16.6.210:8083/platform"; |
4 | 4 | ||
5 | exports.res = [ | 5 | exports.res = [ |
6 | -{ | 6 | + { |
7 | route: '/runManage/subjectManage/index', | 7 | route: '/runManage/subjectManage/index', |
8 | method: 'GET', | 8 | method: 'GET', |
9 | view: 'pages/product/subjectManage', | 9 | view: 'pages/product/subjectManage', |
10 | src: '/product/subjectManage' | 10 | src: '/product/subjectManage' |
11 | -}, | ||
12 | -{ | 11 | + }, |
12 | + { | ||
13 | route: '/runManage/subjectManage/subjectList',//活动列表 | 13 | route: '/runManage/subjectManage/subjectList',//活动列表 |
14 | method: 'POST', | 14 | method: 'POST', |
15 | isJsonRaw: true, | 15 | isJsonRaw: true, |
@@ -22,8 +22,8 @@ exports.res = [ | @@ -22,8 +22,8 @@ exports.res = [ | ||
22 | {name: 'plateform', type: 'string'}, | 22 | {name: 'plateform', type: 'string'}, |
23 | {name: 'status', type: 'number'} | 23 | {name: 'status', type: 'number'} |
24 | ] | 24 | ] |
25 | -}, | ||
26 | -{ | 25 | + }, |
26 | + { | ||
27 | route: '/runManage/subjectManage/addSubject',//添加活动 | 27 | route: '/runManage/subjectManage/addSubject',//添加活动 |
28 | method: 'POST', | 28 | method: 'POST', |
29 | isJsonRaw: true, | 29 | isJsonRaw: true, |
@@ -40,10 +40,11 @@ exports.res = [ | @@ -40,10 +40,11 @@ exports.res = [ | ||
40 | {name: 'coverUrl', type: 'string'}, | 40 | {name: 'coverUrl', type: 'string'}, |
41 | {name: 'logoUrl', type: 'string'}, | 41 | {name: 'logoUrl', type: 'string'}, |
42 | {name: 'webUrl', type: 'string'}, | 42 | {name: 'webUrl', type: 'string'}, |
43 | - {name: 'orderNum', type: 'number'} | 43 | + {name: 'orderNum', type: 'number'}, |
44 | + {name: 'yhChannel', type: 'string'} | ||
44 | ] | 45 | ] |
45 | -}, | ||
46 | -{ | 46 | + }, |
47 | + { | ||
47 | route: '/runManage/subjectManage/modify',//修改活动 | 48 | route: '/runManage/subjectManage/modify',//修改活动 |
48 | method: 'POST', | 49 | method: 'POST', |
49 | isJsonRaw: true, | 50 | isJsonRaw: true, |
@@ -61,10 +62,11 @@ exports.res = [ | @@ -61,10 +62,11 @@ exports.res = [ | ||
61 | {name: 'coverUrl', type: 'string'}, | 62 | {name: 'coverUrl', type: 'string'}, |
62 | {name: 'logoUrl', type: 'string'}, | 63 | {name: 'logoUrl', type: 'string'}, |
63 | {name: 'webUrl', type: 'string'}, | 64 | {name: 'webUrl', type: 'string'}, |
64 | - {name: 'orderNum', type: 'number'} | 65 | + {name: 'orderNum', type: 'number'}, |
66 | + {name: 'yhChannel', type: 'string'} | ||
65 | ] | 67 | ] |
66 | -}, | ||
67 | -{ | 68 | + }, |
69 | + { | ||
68 | route: '/runManage/subjectManage/delSubject',//删除活动 | 70 | route: '/runManage/subjectManage/delSubject',//删除活动 |
69 | method: 'POST', | 71 | method: 'POST', |
70 | isJsonRaw: true, | 72 | isJsonRaw: true, |
@@ -72,8 +74,8 @@ exports.res = [ | @@ -72,8 +74,8 @@ exports.res = [ | ||
72 | params: [ | 74 | params: [ |
73 | {name: 'id', type: 'number'} | 75 | {name: 'id', type: 'number'} |
74 | ] | 76 | ] |
75 | -}, | ||
76 | -{ | 77 | + }, |
78 | + { | ||
77 | route: '/runManage/subjectManage/queryBaseProductPoolListByName', | 79 | route: '/runManage/subjectManage/queryBaseProductPoolListByName', |
78 | method: 'POST', | 80 | method: 'POST', |
79 | isJsonRaw: true, | 81 | isJsonRaw: true, |
@@ -81,8 +83,8 @@ exports.res = [ | @@ -81,8 +83,8 @@ exports.res = [ | ||
81 | params: [ | 83 | params: [ |
82 | {name: 'poolName', type: 'string'} | 84 | {name: 'poolName', type: 'string'} |
83 | ] | 85 | ] |
84 | -}, | ||
85 | -{ | 86 | + }, |
87 | + { | ||
86 | route: '/runManage/subjectManage/queryBaseProductPoolListById', | 88 | route: '/runManage/subjectManage/queryBaseProductPoolListById', |
87 | method: 'POST', | 89 | method: 'POST', |
88 | isJsonRaw: true, | 90 | isJsonRaw: true, |
@@ -90,4 +92,4 @@ exports.res = [ | @@ -90,4 +92,4 @@ exports.res = [ | ||
90 | params: [ | 92 | params: [ |
91 | {name: 'id', type: 'number'} | 93 | {name: 'id', type: 'number'} |
92 | ] | 94 | ] |
93 | -}]; | ||
95 | + }]; |
@@ -99,6 +99,16 @@ | @@ -99,6 +99,16 @@ | ||
99 | <input type="hidden" id="plateform" value="{plateform}" for="checkbox"> | 99 | <input type="hidden" id="plateform" value="{plateform}" for="checkbox"> |
100 | </div> | 100 | </div> |
101 | <div class="form-group"> | 101 | <div class="form-group"> |
102 | + <label class="col-sm-2 control-label">频道</label> | ||
103 | + <div class="col-sm-8"> | ||
104 | + <label style="cursor: pointer;"><input type="radio" name="yhChannel" value="1">男生</label> | ||
105 | + <label style="cursor: pointer;"><input type="radio" name="yhChannel" value="2">女生</label> | ||
106 | + <label style="cursor: pointer;"><input type="radio" name="yhChannel" value="3">儿童</label> | ||
107 | + <label style="cursor: pointer;"><input type="radio" name="yhChannel" value="4">创意生活</label> | ||
108 | + </div> | ||
109 | + <input type="hidden" id="yhChannel" value="{yhChannel}" for="radio"> | ||
110 | + </div> | ||
111 | + <div class="form-group"> | ||
102 | <label class="col-sm-2 control-label">促销形式</label> | 112 | <label class="col-sm-2 control-label">促销形式</label> |
103 | <div class="col-sm-10"> | 113 | <div class="col-sm-10"> |
104 | <input id="promotion1" name="promotionName" type="radio" value="1"/> | 114 | <input id="promotion1" name="promotionName" type="radio" value="1"/> |
-
Please register or login to post a comment