Commit eb59d8bb authored by agping's avatar agping

1

parent 92c64f4e
...@@ -221,10 +221,10 @@ define(['doT', 'text!temp/cost_office_template_tpl.html','text!temp/storeBinding ...@@ -221,10 +221,10 @@ define(['doT', 'text!temp/cost_office_template_tpl.html','text!temp/storeBinding
getList : function(no){ getList : function(no){
var that = cost; var that = cost;
that.pageNo = no; that.pageNo = no;
var params = that.buildSearchParams(0); var params={};
params.pageNo = that.pageNo; params.pageNo = that.pageNo;
params.pageSize = that.pageSize ; params.pageSize = that.pageSize ;
$.get('/index/refundList',params,function(data){ $.post('/index/getOfficeList',params,function(data){
if(typeof data === 'object') { if(typeof data === 'object') {
if(data.code == 200) { if(data.code == 200) {
that.listData = data.data.list; that.listData = data.data.list;
...@@ -268,116 +268,8 @@ define(['doT', 'text!temp/cost_office_template_tpl.html','text!temp/storeBinding ...@@ -268,116 +268,8 @@ define(['doT', 'text!temp/cost_office_template_tpl.html','text!temp/storeBinding
$('#back_id_money').val(""); $('#back_id_money').val("");
that.agent_id_phone=""; that.agent_id_phone="";
}, },
//退款 审核
exportExcel: function() {
var _url = '/index/costListExcel?';
window.open(_url + cost.buildSearchParams(1));
},
/**
* 获取查询参数
*/
buildSearchParams : function(is_excel){
var that = cost;
var commite_time_start = $('#comit_time_start').val();
var commite_time_end = $('#comit_time_end').val();
var into_time_start = $('#into_time_start').val();
var into_time_end = $('#into_time_end').val();
var changed_type = $('#changed_type').val();
var changed_id = $('#changed_id').val();
var back_id_money = $('#back_id_money').val();
var shoped_id = $('#shoped_id').val();
var shoped_addr = $('#shoped_addr').val();
var commit_home = $('#commit_home').val();
var commit_shop = $('#commit_shop').val();
var comit_name = that.agent_id_phone;//$('#comit_name').val();
var comit_phone = $('#comit_phone').val();
// var choose_type = $('.btn-group').find('.btn-info').html();
var is_selt = $('#is_type').val();
var get_id = $('#get_id').val();
var is_open = $('#is_open').val();
var params = {};
var paramsStr = "" ;
if ( get_id) {
params.pay_log_id = get_id ;
paramsStr += "pay_log_id=" + get_id +'&';
}
if ( commite_time_start ) {
params.start_time = commite_time_start;
paramsStr += "start_time=" + commite_time_start +'&';
}
if ( commite_time_end ) {
params.end_time = commite_time_end;
paramsStr += "end_time=" + commite_time_end +'&';
}
if ( into_time_start ) {
params.income_start_time = into_time_start;
paramsStr += "income_start_time=" + into_time_start +'&';
}
if ( into_time_end ) {
params.income_end_time = into_time_end;
paramsStr += "income_end_time=" + into_time_end +'&';
}
if ( changed_type ) {
params.type = changed_type;
paramsStr += "type=" + changed_type +'&';
}
if ( changed_id ) {
params.order_id = changed_id;
paramsStr += "order_id=" + changed_id +'&';
}
if ( back_id_money ) {
params.id = back_id_money;
paramsStr += "id=" + back_id_money +'&';
}
if ( shoped_id ) {
params.house_id = shoped_id;
paramsStr += "house_id=" + shoped_id +'&';
}
if ( shoped_addr) {
params.address = shoped_addr;
paramsStr += "address=" + shoped_addr +'&';
}
if ( commit_home ) {
params.district_id = commit_home;
paramsStr += "district_id=" + commit_home +'&';
}
if ( commit_shop ) {
params.store_id = commit_shop;
paramsStr += "store_id=" + commit_shop +'&';
}
if ( comit_name ) {
params.agent_id = comit_name;
paramsStr += "agent_id=" + comit_name +'&';
}
if ( comit_phone ) {
if ( comit_phone[0] == "1" && comit_phone.length == 11) {
params.phone = comit_phone;
paramsStr += "phone=" + comit_phone +'&';
}else {
alert("请输入正确的手机号码")
}
}
if ( is_selt ){
params.is_self = is_selt;
paramsStr += "is_self=" + is_selt +'&';
}
if ( is_open > -1) {
params.is_open = is_open;
paramsStr += "is_open=" + is_open +'&';
}
params.status = that.check_status;
paramsStr += "status=" + that.check_status;
if (is_excel) {
return paramsStr;
} else {
return params;
}
},
}; };
return cost; return cost;
}); });
\ No newline at end of file
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