Commit cfbcfbb8 authored by agping's avatar agping

红包列表显示

parent eb6e9b00
...@@ -1290,26 +1290,46 @@ ...@@ -1290,26 +1290,46 @@
</h4> </h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div class="table-responsive"> <div class="isHideEnvelope">
<h5>返现红包</h5>
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover table-condensed">
<thead>
<tr>
<th class="text-center">客户类型</th>
<th class="text-center">返现红包</th>
<th class="text-center">活动名称</th>
<th class="text-center">有效期</th>
<th class="text-center">客户ID</th>
<th class="text-center">客户手机号</th>
</tr>
</thead>
<tbody class="text-center" id="maintable_envelope_list">
</tbody>
</table>
</div>
<div class="envelope-details" style="margin-bottom: 30px;">注:确认分佣后系统会立即返现现金到对应的客户账户上</div>
</div>
<h5>成交评价</h5>
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover table-condensed"> <table class="table table-striped table-bordered table-hover table-condensed">
<thead> <thead>
<tr> <tr>
<th class="text-center">客户类型</th> <th class="text-center">评价时间</th>
<th class="text-center">返现红包</th>
<th class="text-center">活动名称</th>
<th class="text-center">有效期</th>
<th class="text-center">客户ID</th> <th class="text-center">客户ID</th>
<th class="text-center">客户手机号</th> <th class="text-center">订单ID</th>
<th class="text-center">评价分数</th>
<th class="text-center">评价内容</th>
</tr> </tr>
</thead> </thead>
<tbody class="text-center" id="maintable_envelope_list"> <tbody class="text-center" id="maintable_evaluation_list">
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="envelope-details" style="margin-bottom: 30px;">注:确认分佣后系统会立即返现现金到对应的客户账户上</div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button btn2" class="btn btn-primary maid_ok_btn" id="" data-dismiss="modal"> <button type="button btn2" class="btn btn-primary maid_ok_btn" id="" data-dismiss="modal">
......
...@@ -119,7 +119,9 @@ define(['doT', 'text!temp/reportList_shop_template_tpl.html', 'css!style/home.cs ...@@ -119,7 +119,9 @@ define(['doT', 'text!temp/reportList_shop_template_tpl.html', 'css!style/home.cs
}); });
//红包提现 //红包提现
_doc.on("click", ".envelope-list", function() { _doc.on("click", ".envelope-list", function() {
bargain.getEnvelopeList(); bargain.getEnvelopeList();//获取红包
bargain.getEvaluationList();//获取成交评价
}); });
//转到一级审核 //转到一级审核
...@@ -1278,7 +1280,7 @@ define(['doT', 'text!temp/reportList_shop_template_tpl.html', 'css!style/home.cs ...@@ -1278,7 +1280,7 @@ define(['doT', 'text!temp/reportList_shop_template_tpl.html', 'css!style/home.cs
$('.envelope-list').show(); $('.envelope-list').show();
bargain.report_id_show = 1; bargain.report_id_show = 1;
}else{ }else{
$('.envelope-list').hide(); $('.envelope-list').show();
bargain.report_id_show = 0; bargain.report_id_show = 0;
} }
} else { } else {
...@@ -2263,8 +2265,49 @@ define(['doT', 'text!temp/reportList_shop_template_tpl.html', 'css!style/home.cs ...@@ -2263,8 +2265,49 @@ define(['doT', 'text!temp/reportList_shop_template_tpl.html', 'css!style/home.cs
success: function(data) { success: function(data) {
if(typeof data === 'object') { if(typeof data === 'object') {
if(data.code == 200) { if(data.code == 200) {
if(data.data){
$(".isHideEnvelope").show();//红包列表有数据
}else{
$(".isHideEnvelope").hide();
}
var doTtmpl = doT.template(document.getElementById('envelope_template_tpl').innerHTML); var doTtmpl = doT.template(document.getElementById('envelope_template_tpl').innerHTML);
$("#maintable_envelope_list").html(doTtmpl(data.data)); $("#maintable_envelope_list").html(doTtmpl(data.data));
} else {
alert(data['msg']);
};
} else {
alert('数据错误');
};
},
error: function() {
alert('error');
},
complete: function(xhr, textStatus) {
if(textStatus === 'timeout') {
alert('请求超时');
};
}
});
},
// 成交评价
getEvaluationList: function(){
var params = {
'report_id': bargain.report_id_liu
};
$.ajax({
type: 'GET',
url: '/index/getActivityCoupon',
data: params,
timeout: 30000,
dataType: 'json',
beforeSend: function() {
},
success: function(data) {
if(typeof data === 'object') {
if(data.code == 200) {
var doTtmpl = doT.template(document.getElementById('evaluation_template_tpl').innerHTML);
$("#maintable_evaluation_list").html(doTtmpl(data.data));
} else { } else {
alert(data['msg']); alert(data['msg']);
......
...@@ -247,4 +247,22 @@ ...@@ -247,4 +247,22 @@
<td colspan="14" style="text-align:center;"> 暂无数据</td> <td colspan="14" style="text-align:center;"> 暂无数据</td>
</tr> </tr>
[% } %] [% } %]
</script> </script>
\ No newline at end of file <!--成交评价-->
<script id="evaluation_template_tpl" type="text/template">
[% if(it&&it.length!=0) { %]
[% for(var item in it){ %]
<tr class="text-center">
<td>[%= it[item]['user_type'] %]</td>
<td>[%= it[item]['money'] %]</td>
<td>[%= it[item]['title'] %]</td>
<td>[%= it[item]['validity'] %]</td>
<td>[%= it[item]['id'] %]</td>
</tr>
[% } %]
[% }else{ %]
<tr>
<td colspan="14" style="text-align:center;">暂无数据</td>
</tr>
[% } %]
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment