Authored by weiqingting

Merge branch 'develop' of http://git.dev.yoho.cn/platform/yohobuy-portal-fe into develop

... ... @@ -4,10 +4,7 @@ var $ = require('jquery'),
common=require('../common/common');
var e = new common.edit("#activityForm");
e.on("render", function() {
});
// e.on("render", function() {
var bgStyle = $("#backgroundStyle").val();
var prizeList = $("#prizeList").val();
if (bgStyle) {
... ... @@ -23,23 +20,9 @@ e.on("render", function() {
$("#realUserNum").val(prizeObj.realUserNum);
$("#sockUserNum").val(prizeObj.sockUserNum);
}
// });
function dealTotalHours() {
var beginTimeStr = $("#beginTimeStr").val();
var endTimeStr = $("#endTimeStr").val();
if (beginTimeStr != "" && endTimeStr != "") {
var bDate = new Date(beginTimeStr);
var eDate = new Date(endTimeStr);
var hours = eDate.getTime() - bDate.getTime();
$("#totalHours").html("总计时间:" + parseInt(hours / (1000 * 60 * 60)) + " 小时");
} else {
$("#totalHours").html("");
}
}
dealTotalHours();
$("#beginTimeStr,#endTimeStr").change(function() {
dealTotalHours();
});
//
e.init();
... ...
... ... @@ -61,7 +61,6 @@
} else if (item.status == 1) {
HtmArr.push('<a data-index="'+item.__index+'" href="javascript:void(0);" class="closeshops btn btn-danger btn-xs">关闭</a>');
}
HtmArr.push('<a href="/activity/drawline/data/'+item.activityId+'" href="javascript:void(0);" class="btn btn-info btn-xs">数据</a>');
return HtmArr.join('');
}}
]
... ...
... ... @@ -24,7 +24,7 @@ new common.dropDown({
});
new common.dropDown({
el: '#supplier',
ajax: 'supplier'
ajax: 'querySupplier'
});
new common.dropDown({
el: '#brand',
... ...
//帮助分类
var $ = require('jquery');
common = require('../common/common');
var g = new common.grid({
el: '#help_list',
columns: [
{display: "编号", name: "name"},
{display: "分类名称", name: "category"},
{display: "显示平台", name: "paltform"},
{display: "时间", name: "time"},
{
display: "操作", name: "", render: function (item) {
var arr = [];
arr.push('<a class="btn btn-info add2" data-index="' + item.__index + '">编辑</a>');
arr.push('<a class="btn btn-info delbtn" data-index="' + item.__index + '">删除</a>');
return arr.join('');
}
}
]
});
g.init("/operations111/helpcategory/index111");
var Bll = {
onClick:function(arg1, arg2, arg3) {
var e = new common.edit("#baseform");
console.log(arg2);
common.dialog.confirm(arg3,
common.util.__template($("#template").html(), arg2),
function() {
e.submit(arg1,function(option){
// option.data.category=option.data.category_name_value+"--uoho";
// console.log(option.data);
option.success=function(){
alert("suc");
g.reload();
};
option.error=function(){
alert("fail");
}
});
});
e.init();
new common.dropDown({el: "#xxx"});
}
};
$('#add-category').on('click', function () {
var item={};
Bll.onClick("/operations111/helpcategory/index222",item,"添加分类");
});
$('#help_list').on('click', '.add2', function () {
var item=g.rows[$(this).data("index")];
Bll.onClick("/operations111/helpcategory/indexModify",item, "修改分类");
});
$('#help_list').on('click', '.delbtn', function() {
var e = new common.edit("baseform");
common.dialog.confirm("是否确认删除",
"",
function() {
e.submit("/operations111/helpcategory/indexDelete", function(option) {
option.success=function() {
alert("删除成功");
g.reload();
};
option.error=function() {
alert("删除失败");
};
})
});
e.init();
});
... ...
... ... @@ -208,10 +208,10 @@ $('#export-btn').on('click', function() {
var selectedArr = tableGird.selected,
len = selectedArr.length,
queryConf = '';
if (len <= 0) {
/*if (len <= 0) {
common.util.__tip('请选择要导出的商品', 'warning');
return;
}
}*/
$.each(selectedArr, function(i, value) {
queryConf += value['limitProductCode'];
if (i < len - 1) {
... ... @@ -222,7 +222,7 @@ $('#export-btn').on('click', function() {
common.util.__ajax({
url: '/limit/batch/export',
data: {
queryConf: queryConf,
queryConf: '2016022517335568',
type: 'limitProductReminder'
}
}, function(res) {
... ...
... ... @@ -107,16 +107,5 @@ exports.res = [
{name: 'activityDesc',type: 'string'},
{name: 'prizeList',type: 'string'}
]
}, {
// 数据查询页面渲染
route: '/activity/drawline/data/:activityId',
method: 'GET',
view: 'pages/activity/data',
url : "/DrawlineActivityRest/getPrizeDetailInfo",
params:[{
name:'activityId',
type:'Number'
}],
src:'/activity/data'
}
];
... ...
... ... @@ -51,8 +51,8 @@ exports.res = [
//网销信息 -> 网销信息页面渲染
route: '/goods/netsale/index',
method: 'GET',
view: 'pages/goods/net-sale',
src: '/goods/net-sale',
view: 'pages/goods/netsale',
src: '/goods/netsale',
data: {
pageTitle: '网销信息',
filter: {
... ...
exports.domain = 'http://localhost:30012';
exports.res = [
{
route:'/operations111/helpcategory/index',
method: 'GET',
view: 'pages/help/help',
src: '/help/helpCategory'
},{
route: '/operations111/helpcategory/index111',
method: 'POST',
url:'/paltform/helpcategory/getReviewList',
params: [
{name: 'page', type: 'Number'},
{name: 'size', type: 'Number',def:10}
]
},{
route: '/operations111/helpcategory/index222',
method: 'POST',
url: '/goods',
params: [
{name: 'name', type: 'String'},
{name: 'category', type: 'String'},
{name: 'paltform', type: 'String'}
]
},{
route: '/operations111/helpcategory/indexModify',
method: 'POST',
url: '/goods',
params: [
{name: 'id', type: 'Number'},
{name: 'name', type: 'String'},
{name: 'category', type: 'String'},
{name: 'paltform', type: 'String'}
]
},{
route: '/operations111/helpcategory/indexDelete',
method: 'POST',
url: '/goods',
params: [
{name: 'name', type: 'String'}
]
}]
\ No newline at end of file
... ...
/**
* 桩数据
* @author h1bomb
*/
module.exports = {
'/paltform/helpcategory/getReviewList': function(req, res) {
res.json({
code: 200,
data: {
list: [{
name: '51197205',
category: 'http://img10.static.yhbimg.com/goodsimg/2016/02/01/07/019d377b10ce778c4938b3c7e2c63a229a.jpg?imageMogr2/thumbnail/60x60/extent/60x60/background/d2hpdGU=/position/center/quality/90',
paltform: 'ceshiproductwss01',
time: '100.00',
status: 0
}, {
name: '51197204',
category: 'ceshiproductwss01',
paltform: '长袖',
time: '16/02/03 16:57',
status: 1
}, {
name: '51197204',
category: 'ceshiproductwss01',
paltform: '长袖',
time: '16/02/03 16:57',
status: 1
}, {
name: '51197204',
category: 'ceshiproductwss01',
paltform: '长袖',
time: '16/02/03 16:57',
status: 1
}, {
name: '51197204',
category: 'ceshiproductwss01',
paltform: '长袖',
time: '16/02/03 16:57',
status: 1
}],
page: 1,
size: 10,
totalPage: 1
}
});
}
}
\ No newline at end of file
... ...
... ... @@ -47,9 +47,6 @@
<div class="col-sm-3">
<input type="text" class="form-control" jsaction="time:start:beginTimeStr" id="endTimeStr" required placeholder="活动结束时间" value="{{endTimeStr}}" readonly >
</div>
<div class="col-sm-3">
<label class="control-label" id="totalHours"></label>
</div>
<!-- readonly require-->
</div>
... ... @@ -91,12 +88,12 @@
<label class="">顶部banner:<span class="red">*</span></label>
</div>
<div class="col-sm-7">
<input type="file" id="topBanner" name="topBanner" value="{{topBanner}}" placeholder="顶部banner" required />
<input type="file" id="topBanner" name="topBanner" value="{{topBanner}}" placeholder="顶部banner" />
</div>
</div>
<div class="input-group col-sm-12">
<div class="col-sm-1">
<label class="">背景样式:</label>
<div class="input-group col-sm-10">
<div class="col-sm-2">
<label class="">背景样式:<span class="red">*</span></label>
</div>
<div class="col-sm-1">
<input type="file" id="backgroundStyle1" name="backgroundStyle1" placeholder="背景样式" />
... ... @@ -129,7 +126,7 @@
<div class="form-group">
<label class="col-sm-2 control-label">活动说明:</label>
<div class="col-sm-8">
<input type="text" id="activityDesc" placeholder="请输入链接" class="form-control" value="{{activityDesc}}">
<input type="text" id="activityDesc" placeholder="活动说明" class="form-control" value="{{activityDesc}}">
</div>
</div>
... ...
<div class="pageheader">
<div class="media">
<div class="pageicon pull-left">
<i class="fa fa-th-list"></i>
</div>
<div class="media-body">
<div>
<div style="width: 30%;float: left;">
<h4>帮助分类</h4>
</div>
</div>
</div>
</div>
</div>
<div class="contentpanel">
<div class="panel panel-default" style="margin-bottom: 10px;">
<div class="panel-body">
<div class="row">
<a class="btn btn-info" id="add-category">添加帮助分类</a>
</div>
</div>
<div id="help_list"></div>
</div>
</div>
<script type="text/template" id="template">
<div class="rows" id="baseform">
<div class="form-group">
<label for="category_name_value" class="col-sm-2 control-label">分类名称</label>
<div class="col-sm-10">
<input type="hidden" value="{id}" id="id" />
<input type="text" value="{name}" id="category" class="form-control" required="required" />
<label>注:分类名称必填</label>
</div>
</div>
<div class="form-group">
<label for="fir_category_value" class="col-sm-2 control-label">一级分类</label>
<div class="col-sm-10">
<select id="xxx" style="width: 280px;">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="opel">Opel</option>
<option value="audi">Audi</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">品牌风格</label>
<div class="col-sm-8">
<label style="cursor: pointer;"><input type="checkbox" name="paltform" value="运动"> 运动</label>
<label style="cursor: pointer;"><input type="checkbox" name="paltform" value="户外"> 户外</label>
<label style="cursor: pointer;"><input type="checkbox" name="paltform" value="街头"> 街头</label>
<label style="cursor: pointer;"><input type="checkbox" name="paltform" value="暗黑"> 暗黑</label>
<label style="cursor: pointer;"><input type="checkbox" name="paltform" value="军事"> 军事</label>
</div>
<input type="hidden" id="paltform" value="{paltform}" for="checkbox">
</div>
</div>
</script>
\ No newline at end of file
... ...