Authored by 陶雨

专题管理添加编辑列表增加频道yhChannel字段

... ... @@ -3,11 +3,13 @@ var $ = require('jquery'),
util = require('../common/util');
new common.dropDown({el: "#subject-type"});
new common.dropDown({el: "#subject-paltform"});
new common.dropDown({el: "#subject-status"});
new common.dropDown({el: "#subject-type"});
new common.dropDown({el: "#subject-paltform"});
new common.dropDown({el: "#subject-status"});
var g = new common.grid({
var yhChannelArr = ["男生", "女生", "儿童", "创意生活"];
var g = new common.grid({
el: "#subject-manage",
parms: function () {
return {
... ... @@ -36,6 +38,11 @@ var $ = require('jquery'),
return temp;
}
}},
{display:"频道", name:"yhChannel", render: function (item) {
if(item.yhChannel) {
return yhChannelArr[item.yhChannel-1];
}
}},
{display: "状态", name: "status", render: function (item) {
if(item.status == 1) return "未定时";
else if(item.status == 2) return "未发布";
... ... @@ -61,11 +68,11 @@ var $ = require('jquery'),
}
]
});
});
g.init('/runManage/subjectManage/subjectList');
g.init('/runManage/subjectManage/subjectList');
var Bll = {
var Bll = {
getLocalTime:function(nS) {
var date = new Date(parseInt(nS) * 1000);
var mm = date.getMonth() + 1;
... ... @@ -166,21 +173,21 @@ var $ = require('jquery'),
}
};
$('#add-subject').on('click', function() {
$('#add-subject').on('click', function() {
var item = {};
Bll.toast('/runManage/subjectManage/addSubject', item, "专题添加");
});
});
$(document).on('click', '.add2', function() {
$(document).on('click', '.add2', function() {
var item = g.rows[$(this).data("index")];
if(typeof item.startTime == "number") {
item.startTime = Bll.getLocalTime(item.startTime);
item.endTime = Bll.getLocalTime(item.endTime);
}
Bll.toast('/runManage/subjectManage/modify', item, "专题编辑");
});
});
$(document).on('click', '.delbtn', function() {
$(document).on('click', '.delbtn', function() {
var item=g.rows[$(this).data("index")];
common.dialog.confirm("警告",
"确认删除?",
... ... @@ -192,8 +199,8 @@ var $ = require('jquery'),
g.reload();
});
});
});
});
$(document).on("click","#filter-btn",function () {
$(document).on("click","#filter-btn",function () {
g.reload(1);
});
\ No newline at end of file
});
\ No newline at end of file
... ...
... ... @@ -3,13 +3,13 @@ exports.domain = require('../config/common.js').domain;
//exports.domain = "http://172.16.6.210:8083/platform";
exports.res = [
{
{
route: '/runManage/subjectManage/index',
method: 'GET',
view: 'pages/product/subjectManage',
src: '/product/subjectManage'
},
{
},
{
route: '/runManage/subjectManage/subjectList',//活动列表
method: 'POST',
isJsonRaw: true,
... ... @@ -22,8 +22,8 @@ exports.res = [
{name: 'plateform', type: 'string'},
{name: 'status', type: 'number'}
]
},
{
},
{
route: '/runManage/subjectManage/addSubject',//添加活动
method: 'POST',
isJsonRaw: true,
... ... @@ -40,10 +40,11 @@ exports.res = [
{name: 'coverUrl', type: 'string'},
{name: 'logoUrl', type: 'string'},
{name: 'webUrl', type: 'string'},
{name: 'orderNum', type: 'number'}
{name: 'orderNum', type: 'number'},
{name: 'yhChannel', type: 'string'}
]
},
{
},
{
route: '/runManage/subjectManage/modify',//修改活动
method: 'POST',
isJsonRaw: true,
... ... @@ -61,10 +62,11 @@ exports.res = [
{name: 'coverUrl', type: 'string'},
{name: 'logoUrl', type: 'string'},
{name: 'webUrl', type: 'string'},
{name: 'orderNum', type: 'number'}
{name: 'orderNum', type: 'number'},
{name: 'yhChannel', type: 'string'}
]
},
{
},
{
route: '/runManage/subjectManage/delSubject',//删除活动
method: 'POST',
isJsonRaw: true,
... ... @@ -72,8 +74,8 @@ exports.res = [
params: [
{name: 'id', type: 'number'}
]
},
{
},
{
route: '/runManage/subjectManage/queryBaseProductPoolListByName',
method: 'POST',
isJsonRaw: true,
... ... @@ -81,8 +83,8 @@ exports.res = [
params: [
{name: 'poolName', type: 'string'}
]
},
{
},
{
route: '/runManage/subjectManage/queryBaseProductPoolListById',
method: 'POST',
isJsonRaw: true,
... ... @@ -90,4 +92,4 @@ exports.res = [
params: [
{name: 'id', type: 'number'}
]
}];
\ No newline at end of file
}];
\ No newline at end of file
... ...
... ... @@ -99,6 +99,16 @@
<input type="hidden" id="plateform" value="{plateform}" for="checkbox">
</div>
<div class="form-group">
<label class="col-sm-2 control-label">频道</label>
<div class="col-sm-8">
<label style="cursor: pointer;"><input type="radio" name="yhChannel" value="1">男生</label>
<label style="cursor: pointer;"><input type="radio" name="yhChannel" value="2">女生</label>
<label style="cursor: pointer;"><input type="radio" name="yhChannel" value="3">儿童</label>
<label style="cursor: pointer;"><input type="radio" name="yhChannel" value="4">创意生活</label>
</div>
<input type="hidden" id="yhChannel" value="{yhChannel}" for="radio">
</div>
<div class="form-group">
<label class="col-sm-2 control-label">促销形式</label>
<div class="col-sm-10">
<input id="promotion1" name="promotionName" type="radio" value="1"/>
... ...