Authored by leo

Merge branch 'dev_优惠券优化'

... ... @@ -6,89 +6,7 @@
<div class="panel panel-default" style="margin-bottom:10px;">
<div class="panel-body">
<div class="row">
<div class="panel-col">
<select id="filter-department" tabindex="-1" class="select2-offscreen brandBtn-group">
<option value="-1">申请部门</option>
<option value="20"> 资源发展部</option>
<option value="21"> 广告部</option>
<option value="22"> 招商部</option>
<option value="23"> 男生媒体部</option>
<option value="24"> 女生媒体部</option>
<option value="25"> 流程运营部</option>
<option value="26"> 发行设计部</option>
<option value="27"> 设计部</option>
<option value="28"> 商品一部(羊头+轻奢)</option>
<option value="29"> 商品二部(男装)</option>
<option value="30"> 商品三部(女装)</option>
<option value="31"> 商品四部(户外运动)</option>
<option value="32"> 商品五部(自主)</option>
<option value="33"> 商品六部(明星/KOL)</option>
<option value="34"> 商品七部(童装)</option>
<option value="35"> 商品八部(创意生活+玩具)</option>
<option value="36"> 商品九部(彩妆)</option>
<option value="37"> 商品十部(全球购)</option>
<option value="38"> 运营支持部</option>
<option value="39"> 类目及活动运营部</option>
<option value="40"> 内容运营部</option>
<option value="41"> 营销策划部</option>
<option value="42"> 设计部</option>
<option value="43"> 售后服务部</option>
<option value="44"> 客户关系部</option>
<option value="45"> 运营部</option>
<option value="46"> 泛渠道部</option>
<option value="47"> 运营统筹部</option>
<option value="48"> 南京艾尚店</option>
<option value="49"> 仓储部</option>
<option value="50"> 物流部</option>
<option value="51"> 运营部</option>
<option value="52"> 公关部</option>
<option value="53"> 运营部</option>
<option value="54"> 生产部</option>
<option value="55"> 商品部</option>
<option value="56"> 销售部</option>
<option value="57"> 市场部</option>
<option value="58"> 运营部</option>
<option value="59"> 人事部</option>
<option value="60"> 财务部</option>
<option value="61"> 陈列部</option>
<option value="62"> 会员数据部</option>
<option value="63"> 会员营销部</option>
<option value="64"> 会员运营部</option>
<option value="65"> 品牌营销部</option>
<option value="66"> 效果营销部</option>
<option value="67"> PR营销部</option>
<option value="68"> 设计部</option>
<option value="69"> 零售产品部</option>
<option value="70"> 媒体产品部</option>
<option value="71"> 设计部</option>
<option value="72"> 前端系统部</option>
<option value="73"> 核心系统部</option>
<option value="74"> 后台系统部</option>
<option value="75"> 测试部</option>
<option value="76"> 研究发展部</option>
<option value="77"> 大数据部</option>
<option value="78"> 运维部</option>
<option value="79"> 财务部</option>
<option value="80"> 内审部</option>
<option value="81"> 行政部</option>
<option value="82"> 数据部</option>
<option value="83"> 公共关系部</option>
<option value="84"> 人力资源部</option>
<option value="85"> 总裁办</option>
<option value="86"> 火星项目部</option>
<option value="1">渠道二部</option>
<option value="2">渠道一部</option>
<option value="3">零售部</option>
<option value="4">品牌资源部</option>
<option value="5">店铺运营部</option>
<option value="6">类目运营部</option>
<option value="7">营销部</option>
<option value="8">市场部</option>
<option value="9">会员部</option>
<option value="10">客服部</option>
<option value="11">内容营销部</option>
</select>
<div class="panel-col" id="departments">
</div>
<div class="panel-col">
<select id="filter-couponType" tabindex="-1" class="select2-offscreen brandBtn-group">
... ... @@ -125,4 +43,13 @@
</div>
</div>
<script type="text/template" id="search-department">
<select id="choose-department" title="" class=" select2-offscreen form-control">
<option value="-1">申请部门</option>
[[each data as item index]]
<option value="[[item.department]]">[[item.departmentName]]</option>
[[/each]]
</select>
</script>
<%include '../../../common/views/__ui/footer'%>
\ No newline at end of file
... ...
... ... @@ -5,18 +5,6 @@
var $ = require('jquery'),
common=require('../../../common/common');
var departments =[
"渠道二部", "渠道一部", "零售部", "品牌资源部", "店铺运营部", "类目运营部", "营销部", "市场部", "会员部 ", "客服部", "内容营销部",
"", "", "", "", "", "", "", "",
"资源发展部", "广告部", "招商部", "男生媒体部", "女生媒体部 ", "流程运营部", "发行设计部", "设计部", "商品一部(羊头+轻奢)",
"商品二部(男装)", "商品三部(女装)", "商品四部(户外运动)", "商品五部(自主)", "商品六部(明星/KOL)",
"商品七部(童装)", "商品八部(创意生活+玩具)", "商品九部(彩妆", "商品十部(全球购", "运营支持部", "类目及活动运营部",
"内容运营部", "营销策划部", "设计部", "售后服务部", "客户关系部 ", "运营部", "泛渠道部", "运营统筹部", "南京艾尚店",
"仓储部", "物流部", "运营部 ", "公关部", "运营部", "生产部", "商品部", "销售部", "市场部", "运营部", "人事部", "财务部",
"陈列部", "会员数据部", "会员营销部", "会员运营部", "品牌营销部", "效果营销部", "PR营销部", "设计部", "零售产品部",
"媒体产品部", "设计部", "前端系统部", "核心系统部", "后台系统部", "测试部", "研究发展部", "大数据部", "运维部", "财务部",
"内审部", "行政部", "数据部", "公共关系部", "人力资源部", "总裁办", "火星项目部 "
];
var couponTypes = ["A券", "B券", "公开券", "生日券", "免邮券"];
var startTimeObj;
var endTimeObj;
... ... @@ -30,7 +18,23 @@ endTimeObj = $("#filter-endTimeStr").fdatepicker({
}).data("datepicker");
//下拉框
new common.dropDown({el: '#filter-couponType'});
new common.dropDown({el: '#filter-department'});
new common.dropDown({el: '#choose-department'});
common.util.__ajax({
url: "/coupon/getAllDepartment",//获取所有部门
data: {size: 1000}
}, function (res) {
var data=res.data;
var newData=data.filter(function(v,i){
if(v.status==1){
return v;
}
});
res.data=newData;
console.log(res);
$("#departments").html(common.util.__template2($("#search-department").html(), res));
new common.dropDown({el: "#choose-department"});
}, true);
//grid
var g = new common.grid({
... ... @@ -40,7 +44,7 @@ var g = new common.grid({
couponType: common.util.__input("filter-couponType"),
couponId: common.util.__input("filter-couponId"),
couponName:common.util.__input("filter-couponName"),
department:common.util.__input("filter-department"),
department:common.util.__input("choose-department"),
startTimeStr:common.util.__input("filter-startTimeStr"),
endTimeStr:common.util.__input("filter-endTimeStr")
};
... ... @@ -49,10 +53,18 @@ var g = new common.grid({
{display:"优惠券ID", name:"id"},
{display:"优惠券名称",name:"couponName"},
{display: '申请部门', render: function(item) {
return '<p class="audit-time">' + departments[item.department-1] + '</p>';
var deptName = item.departmentName;
if(deptName === undefined) {
deptName = '';
}
return '<p class="audit-time">' + deptName + '</p>';
}},
{display: '优惠券类型', render: function(item) {
return '<p class="audit-time">' + couponTypes[item.couponType-1] + '</p>';
var couponType = couponTypes[item.couponType-1];
if(couponType === undefined) {
couponType = '';
}
return '<p class="audit-time">' + couponType + '</p>';
}},
{display: '数量', name: "couponNum"},
{display: '面额', name: "couponAmount"},
... ...