Commit 5b22c989 authored by duxinyuan's avatar duxinyuan

1

parent 1e34e5fe
...@@ -1059,6 +1059,88 @@ ...@@ -1059,6 +1059,88 @@
<!-- /.modal --> <!-- /.modal -->
</div> </div>
<link href="https://unpkg.com/bootstrap-table/dist/bootstrap-table.min.css" rel="stylesheet">
<script src="https://unpkg.com/bootstrap-table/dist/bootstrap-table.min.js"></script>
<!--状态==详情-->
<div class="modal fade" id="modal-status" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-body-width">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">收款状态详情 </h4>
</div>
<div class="modal-body modal-body-height">
<div class="col-xs-12">
<table class="table table-striped table-bordered table-hover table-condensed">
<thead>
<tr>
<th class="text-center">提交时间</th>
<th class="text-center">收款ID</th>
<th class="text-center">订单ID</th>
<th class="text-center">成交报告ID</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">类型</th>
<th class="text-center">收款金额</th>
<th class="text-center">实付金额</th>
<th class="text-center">来源</th>
</tr>
</thead>
<tbody class="text-center" id="statusBody1">
</table>
<table class="table table-striped table-bordered table-hover table-condensed">
<thead>
<tr>
<th class="text-center">提交时间</th>
<th class="text-center">调整ID</th>
<th class="text-center">调整前带看ID</th>
<th class="text-center">调整前商铺ID</th>
<th class="text-center">调整前收款ID</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">提交人</th>
</tr>
</thead>
<tbody class="text-center" id="statusBody2">
</table>
<table class="table table-striped table-bordered table-hover table-condensed">
<thead>
<tr>
<th class="text-center">提交时间</th>
<th class="text-center">退款ID</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">入账日期</th>
<th class="text-center">退款类型</th>
<th class="text-center">提交人</th>
<th class="text-center">提交时间</th>
<th class="text-center">商铺地址</th>
</tr>
</thead>
<tbody class="text-center" id="statusBody3">
</table>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary submit_edit" id="back_saveChangeBtn"> 提交 </button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
......
...@@ -349,6 +349,13 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css', ...@@ -349,6 +349,13 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
// that.changeType(order_id); // that.changeType(order_id);
}); });
//操作----删除
$(document).on('click','.add-status',function(e){
var id = e.target.dataset.id;
// that.deleteId = id ;
that.getStatusList(1);
});
//操作----删除 //操作----删除
$(document).on('click','.list_delete',function(e){ $(document).on('click','.list_delete',function(e){
var id = e.target.dataset.id; var id = e.target.dataset.id;
...@@ -379,6 +386,11 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css', ...@@ -379,6 +386,11 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
$("#modal-addPic").on("shown.bs.modal", function(event){ $("#modal-addPic").on("shown.bs.modal", function(event){
}); });
$("#modal-status").on("shown.bs.modal", function(event){
});
$('#savePayBtn').click(function(){ $('#savePayBtn').click(function(){
that.saveRecervables(); that.saveRecervables();
}) })
...@@ -1591,6 +1603,61 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css', ...@@ -1591,6 +1603,61 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
}, },
/**
* 获取表格数据
* @param {Object} no
*/
getStatusList : function(no){
var that = receiv;
that.pageNo = no;
var params = that.buildSearchParams(false);
params.pageNo = that.pageNo;
params.pageSize = that.pageSize ;
$.ajax({
type: 'GET',
url: '/index/getCollection',
data: params,
timeout: 30000,
dataType: 'json',
beforeSend: function() {},
success: function(data) {
if(typeof data === 'object') {
if(data.code == 200) {
that.listData = data.data.list;
console.log("123123123-----------------------------------------");
console.log(data.data.list);
var doTtmpl1 = doT.template(document.getElementById('status_body_1').innerHTML);
$("#statusBody1").html(doTtmpl1(data.data.list));
var doTtmpl2 = doT.template(document.getElementById('status_body_2').innerHTML);
$("#statusBody2").html(doTtmpl2(data.data.list));
var doTtmpl3 = doT.template(document.getElementById('status_body_3').innerHTML);
$("#statusBody3").html(doTtmpl3(data.data.list));
/*分页代码*/
// add_page(data.data.total, no, that.pageSize, that.getList);
} else {
alert(data['msg']);
};
} else {
alert('数据错误');
};
},
error: function() {
alert('error');
},
complete: function(xhr, textStatus) {
if(textStatus === 'timeout') {
alert('请求超时');
};
}
});
},
}; };
return receiv; return receiv;
}); });
\ No newline at end of file
...@@ -16,15 +16,15 @@ ...@@ -16,15 +16,15 @@
[% if(it[item]['is_refund'] == 1){ %] [% if(it[item]['is_refund'] == 1){ %]
[% if(it[item]['source'] == 0) { %] [% if(it[item]['source'] == 0) { %]
<td>正常收款,被退款</td> <td>正常收款,被退款</td>
<td>正常,被退款</td> <td>正常,被退款 <a class="btn1 btn-success add-status" href="#modal-status" data-toggle="modal" data-id='[%= it[item]["id"] %]'>详情</a></td>
[% } else if ( it[item]['source'] == 1 ) { %] [% } else if ( it[item]['source'] == 1 ) { %]
<td>正常收款,被退款</td> <td>正常收款,被退款</td>
<td>正常,被退款</td> <td>正常,被退款 <a class="btn1 btn-success add-status" href="#modal-status" data-toggle="modal" data-id='[%= it[item]["id"] %]'>详情</a></td>
[% } else if ( it[item]['source'] == 2) { %] [% } else if ( it[item]['source'] == 2) { %]
<td>被调整收款(调整ID:[%= it[item]['source_id'] %],被退款)</td> <td>被调整收款(调整ID:[%= it[item]['source_id'] %],被退款)</td>
<td>被调整+被退款</td> <td>被调整+被退款 <a class="btn1 btn-success add-status" href="#modal-status" data-toggle="modal" data-id='[%= it[item]["id"] %]'>详情</a></td>
[% } else{%] [% } else{%]
<td>被退款</td> <td>被退款 <a class="btn1 btn-success add-status" href="#modal-status" data-toggle="modal" data-id='[%= it[item]["id"] %]'>详情</a></td>
[% } %] [% } %]
[% }else{ %] [% }else{ %]
[% if(it[item]['source'] == 0) { %] [% if(it[item]['source'] == 0) { %]
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<td>正常</td> <td>正常</td>
[% } else if ( it[item]['source'] == 2) { %] [% } else if ( it[item]['source'] == 2) { %]
<td>被调整收款(调整ID:[%= it[item]['source_id'] %])</td> <td>被调整收款(调整ID:[%= it[item]['source_id'] %])</td>
<td>被调整</td> <td>被调整 <a class="btn1 btn-success add-status" href="#modal-status" data-toggle="modal" data-id='[%= it[item]["id"] %]'>详情</a> </td>
[% } else{%] [% } else{%]
<td>--</td> <td>--</td>
[% } %] [% } %]
...@@ -83,6 +83,88 @@ ...@@ -83,6 +83,88 @@
<script id="status_body_1" type="text/template">
[% if(it&&it.length!=0) { %]
[% for(var item in it){ %]
<tr class="text-center">
<td>[%= it[item]['create_time'] %]</td>
<td>[%= it[item]['id'] %]</td>
<td>[%= it[item]['order_id'] %]</td>
<td>[%= it[item]['bargain_id'] %]</td>
<td>[%= it[item]['income_time'] %]</td>
<td>[%= it[item]['name'] %]</td>
<td>[%= it[item]['current_agent_name'] %]</td>
<td>[%= it[item]['store_name'] %]</td>
<td>[%= it[item]['type'] %]</td>
<td>[%= it[item]['money'] %]</td>
<td>[%= it[item]['real_money'] %]</td>
<td>[%= it[item]['real_money'] %]</td>
</tr>
[% } %]
[% }else{ %]
<tr>
<td colspan="14" style="text-align:center;"> 暂无数据</td>
</tr>
[% } %]
</script>
<script id="status_body_2" type="text/template">
[% if(it&&it.length!=0) { %]
[% for(var item in it){ %]
<tr class="text-center">
<td>[%= it[item]['create_time'] %]</td>
<td>[%= it[item]['id'] %]</td>
<td>[%= it[item]['order_id'] %]</td>
<td>[%= it[item]['bargain_id'] %]</td>
<td>[%= it[item]['income_time'] %]</td>
<td>[%= it[item]['name'] %]</td>
<td>[%= it[item]['current_agent_name'] %]</td>
<td>[%= it[item]['store_name'] %]</td>
<td>[%= it[item]['type'] %]</td>
<td>[%= it[item]['money'] %]</td>
<td>[%= it[item]['real_money'] %]</td>
</tr>
[% } %]
[% }else{ %]
<tr>
<td colspan="14" style="text-align:center;"> 暂无数据</td>
</tr>
[% } %]
</script>
<script id="status_body_3" type="text/template">
[% if(it&&it.length!=0) { %]
[% for(var item in it){ %]
<tr class="text-center">
<td>[%= it[item]['create_time'] %]</td>
<td>[%= it[item]['id'] %]</td>
<td>[%= it[item]['order_id'] %]</td>
<td>[%= it[item]['bargain_id'] %]</td>
<td>[%= it[item]['income_time'] %]</td>
<td>[%= it[item]['name'] %]</td>
<td>[%= it[item]['current_agent_name'] %]</td>
<td>[%= it[item]['store_name'] %]</td>
<td>[%= it[item]['type'] %]</td>
<td>[%= it[item]['money'] %]</td>
<td>[%= it[item]['real_money'] %]</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