Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-portal-fe
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
陶雨
9 years ago
Commit
b24ae94858b1ce99e8be2c75918b9d0d761044b4
1 parent
3ad44fe8
发券管理
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
143 additions
and
24 deletions
client/js/common/grid.js
client/js/market/sendHistory.js
client/js/market/useHistory.js
server/interface/market.js
server/views/pages/market/sendHistory.html
server/views/pages/market/useHistory.html
client/js/common/grid.js
View file @
b24ae94
...
...
@@ -222,6 +222,7 @@ grid.prototype = {
var
ajaxOptions
=
{
type
:
'POST'
,
url
:
p
.
url
,
async
:
(
typeof
p
.
async
==
"boolean"
)
?
p
.
async
:
true
,
data
:
param
,
dataType
:
'json'
,
beforeSend
:
function
()
{
...
...
@@ -237,6 +238,7 @@ grid.prototype = {
page
:
data
.
page
});
g
.
__bodyClomun
(
data
.
list
,
p
.
second
);
g
.
total
=
data
.
total
?
data
.
total
:
0
;
},
complete
:
function
(
res
)
{
console
.
log
(
"complete~~"
);
...
...
client/js/market/sendHistory.js
View file @
b24ae94
...
...
@@ -6,15 +6,20 @@
var
$
=
require
(
'jquery'
),
common
=
require
(
'../common/common'
);
var
couponId
=
location
.
href
.
substring
(
location
.
href
.
lastIndexOf
(
"/"
)
+
1
);
$
(
"#filter-couponId"
).
val
(
couponId
);
//下拉框
new
common
.
dropDown
({
el
:
'#filter-status'
});
//grid
var
g
=
new
common
.
grid
({
el
:
'#content-list'
,
hash
:
false
,
async
:
false
,
parms
:
function
(){
return
{
coupon
Type
:
common
.
util
.
__input
(
"filter-status
"
)
coupon
Id
:
common
.
util
.
__input
(
"filter-couponId
"
)
};
},
columns
:[
...
...
@@ -23,25 +28,23 @@ var g = new common.grid({
{
display
:
'状态'
,
render
:
function
(
item
)
{
var
status
=
""
;
if
(
item
.
status
==
0
)
{
status
=
"未发放"
;
}
else
if
(
item
.
status
==
1
)
{
status
=
"已发放"
;
}
return
'<p class="audit-time">'
+
status
+
'</p>'
;
}},
{
display
:
"发放时间"
,
render
:
function
(
item
){
var
status
=
""
;
if
(
item
.
status
==
0
)
{
status
=
"未发放"
;
status
=
"未使用"
;
}
else
if
(
item
.
status
==
1
)
{
status
=
"已
发放
"
;
status
=
"已
使用
"
;
}
return
'<p class="audit-time">'
+
status
+
'</p>'
;
}}
]
});
g
.
init
(
"/couponLogs/queryUserCouponLogsList"
);
$
(
"#count"
).
html
(
g
.
total
);
$
(
document
).
on
(
"click"
,
"#filter-btn"
,
function
()
{
g
.
reload
(
1
);
});
//导出
$
(
document
).
on
(
'click'
,
'#export-btn'
,
function
()
{
var
queryConf
=
JSON
.
stringify
({
couponId
:
couponId
});
window
.
open
(
"/ajax/down?queryConf="
+
queryConf
+
"&type=couponLogsExport"
);
});
...
...
client/js/market/useHistory.js
0 → 100644
View file @
b24ae94
/**
* Created by ty on 2016/5/24.
*/
'use strict'
;
var
$
=
require
(
'jquery'
),
common
=
require
(
'../common/common'
);
var
couponId
=
location
.
href
.
substring
(
location
.
href
.
lastIndexOf
(
"/"
)
+
1
);
$
(
"#filter-couponId"
).
val
(
couponId
);
//下拉框
new
common
.
dropDown
({
el
:
'#filter-status'
});
//grid
var
g
=
new
common
.
grid
({
el
:
'#content-list'
,
hash
:
false
,
async
:
false
,
parms
:
function
(){
return
{
couponId
:
common
.
util
.
__input
(
"filter-couponId"
),
couponCode
:
common
.
util
.
__input
(
"filter-couponCode"
),
orderCode
:
common
.
util
.
__input
(
"filter-orderCode"
),
uid
:
common
.
util
.
__input
(
"filter-uid"
)
};
},
columns
:[
{
display
:
"单券号"
,
name
:
"couponCode"
},
{
display
:
"用户ID"
,
name
:
"uid"
},
{
display
:
"订单号"
,
name
:
"orderCode"
},
{
display
:
'是否使用'
,
render
:
function
(
item
)
{
var
status
=
""
;
if
(
item
.
status
==
0
)
{
status
=
"未使用"
;
}
else
if
(
item
.
status
==
1
)
{
status
=
"已使用"
;
}
return
'<p class="audit-time">'
+
status
+
'</p>'
;
}}
]
});
g
.
init
(
"/couponLogs/queryUserCouponLogsList"
);
$
(
"#count"
).
html
(
g
.
total
);
$
(
document
).
on
(
"click"
,
"#filter-btn"
,
function
()
{
g
.
reload
(
1
);
});
//导出
$
(
document
).
on
(
'click'
,
'#export-btn'
,
function
()
{
var
queryConf
=
JSON
.
stringify
({
couponId
:
couponId
});
window
.
open
(
"/ajax/down?queryConf="
+
queryConf
+
"&type=couponLogsExport"
);
});
\ No newline at end of file
...
...
server/interface/market.js
View file @
b24ae94
...
...
@@ -3,7 +3,8 @@
//exports.domain = 'http://172.16.6.162:8088/platform';
//exports.domain = 'http://172.16.6.108:8088/platform';//谭玲
//exports.domain = 'http://172.16.6.201:8088/platform';//谭玲
exports
.
domain
=
'http://172.16.6.250:2081/platform'
;
//exports.domain = 'http://172.16.6.250:2081/platform';//庞洁
exports
.
domain
=
'http://172.16.6.189:8088/platform'
;
//李建
//营销管理路由配置
exports
.
res
=
[
...
...
@@ -667,7 +668,7 @@ exports.res = [
{
//查询用户券列表
route
:
"/couponLogs/queryUserCouponLogsList"
,
method
:
"
GE
T"
,
method
:
"
POS
T"
,
url
:
"/couponLogs/queryUserCouponLogsList"
,
params
:
[
{
name
:
"page"
,
type
:
"number"
},
...
...
@@ -676,7 +677,15 @@ exports.res = [
{
name
:
"couponCode"
,
type
:
"string"
},
{
name
:
"couponName"
,
type
:
"string"
},
{
name
:
"couponId"
,
type
:
"number"
},
{
name
:
"orderCode"
,
type
:
"number"
}
{
name
:
"orderCode"
,
type
:
"number"
},
{
name
:
"uid"
,
type
:
"number"
}
]
},
{
//优惠券使用历史页面渲染
route
:
"/market/couponSend/useHistory/:param"
,
method
:
"GET"
,
view
:
"pages/market/useHistory"
,
src
:
"/market/useHistory"
}
]
\ No newline at end of file
...
...
server/views/pages/market/sendHistory.html
View file @
b24ae94
...
...
@@ -23,20 +23,24 @@
<div
class=
"panel panel-default"
style=
"margin-bottom:10px;"
>
<div
class=
"panel-body"
>
<div
class=
"row"
>
<div
class=
"panel-col"
>
<select
id=
"filter-status"
tabindex=
"-1"
class=
"select2-offscreen brandBtn-group"
>
<option
value=
"-1"
>
状态
</option>
<option
value=
"1"
>
已发放
</option>
<option
value=
"0"
>
未发放
</option>
</select>
</div>
<a
id=
"filter-btn"
href=
"javascript:;"
class=
"btn btn-info"
>
筛选
</a>
<a
id=
"all-btn"
href=
""
class=
"btn btn-info"
>
全部
</a>
<!--<div class="panel-col">-->
<!--<select id="filter-status" tabindex="-1" class="select2-offscreen brandBtn-group">-->
<!--<option value="-1">状态</option>-->
<!--<option value="1">已使用</option>-->
<!--<option value="0">未使用</option>-->
<!--</select>-->
<input
type=
"hidden"
id=
"filter-couponId"
value=
""
>
<!--</div>-->
<!--<a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a>-->
<a
id=
"export-btn"
href=
""
class=
"btn btn-info"
>
导出
</a>
</div>
</div>
</div>
<div
class=
"panel panel-primary-head"
>
<div
class=
"basicTable_wrapper"
id=
"content-list"
>
</div>
<div>
<label>
总数:
<span
id=
"count"
></span></label>
</div>
</div>
</div>
\ No newline at end of file
...
...
server/views/pages/market/useHistory.html
0 → 100644
View file @
b24ae94
<div
class=
"pageheader"
>
<div
class=
"media"
>
<div
class=
"pageicon pull-left"
>
<i
class=
"fa fa-th-list"
></i>
</div>
<div
class=
"media-body"
>
<ul
class=
"breadcrumb"
>
<li><a
href=
""
><i
class=
"glyphicon glyphicon-home"
></i></a></li>
<li><a
href=
""
>
营销管理
</a></li>
<li>
发券管理
</li>
</ul>
<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"
>
<div
class=
"panel-col"
>
<input
type=
"text"
class=
"form-control"
id=
"filter-couponCode"
placeholder=
"单券号"
>
<input
type=
"hidden"
id=
"filter-couponId"
value=
""
>
</div>
<div
class=
"panel-col"
>
<input
type=
"text"
class=
"form-control"
id=
"filter-uid"
placeholder=
"用户ID"
>
</div>
<div
class=
"panel-col"
>
<input
type=
"text"
class=
"form-control"
id=
"filter-orderCode"
placeholder=
"订单号"
>
</div>
<a
id=
"filter-btn"
href=
"javascript:;"
class=
"btn btn-info"
>
筛选
</a>
<a
id=
"export-btn"
href=
""
class=
"btn btn-info"
>
导出
</a>
</div>
</div>
</div>
<div
class=
"panel panel-primary-head"
>
<div
class=
"basicTable_wrapper"
id=
"content-list"
>
</div>
<div>
<label>
总数:
<span
id=
"count"
></span></label>
</div>
</div>
</div>
\ No newline at end of file
...
...
Please
register
or
login
to post a comment