Commit bad816ea authored by agping's avatar agping

财务修改

parent 078a0ca2
...@@ -60,6 +60,21 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', ' ...@@ -60,6 +60,21 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
follow.house_id = $ (this).attr ("data-id"); follow.house_id = $ (this).attr ("data-id");
follow.Submit_follow(); follow.Submit_follow();
}); });
//专员审核 总监审核 经理审核 出纳审核
$ (document).delegate ("#commissioner", "click", function () {//点击操作跟进详情
follow.Commissioner();
});
$ (document).delegate ("#manager", "click", function () {//点击操作跟进详情
follow.Manager();
});
$ (document).delegate ("#director", "click", function () {//点击操作跟进详情
follow.Director();
});
$ (document).delegate ("#cashier", "click", function () {//提交
follow.Cashier();
});
//专员审核 总监审核 经理审核 出纳审核
$ (document).on ("input","#cus_fang", function () {//手机号搜索客方2 $ (document).on ("input","#cus_fang", function () {//手机号搜索客方2
if($("#cus_fang").val()==''){ if($("#cus_fang").val()==''){
$(".user-ul2").html(''); $(".user-ul2").html('');
...@@ -215,8 +230,6 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', ' ...@@ -215,8 +230,6 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
} }
}); });
}, },
// 新增分佣提成
// table切换 // table切换
Information:function(){ Information:function(){
...@@ -275,21 +288,207 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', ' ...@@ -275,21 +288,207 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
} }
}); });
}, },
// 提交新增分佣提成 //专员审核
Commissioner: function(pageNo) {
$("#commissioner").removeClass("btn-default");
$("#commissioner").addClass("btn-info");
$("#manager").removeClass("btn-info");
$("#manager").addClass("btn-default");
$("#director").removeClass("btn-info");
$("#director").addClass("btn-default");
$("#cashier").removeClass("btn-info");
$("#cashier").addClass("btn-default");
follow.pageNo = pageNo;
var params = {};
params.pageNo = follow.pageNo;
params.pageSize = follow.pageSize;
$.ajax({
type: 'GET',
url: '/index/reportListAttache/0',
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('reportList_list_tpl').innerHTML);
$("#follow_list").html(doTtmpl(data.data.list));
/*分页代码*/
add_page(data.data.total,pageNo,follow.pageSize,follow.getList);
}else {
alert(data['msg']);
};
}else{
alert('数据错误');
};
},
error: function() {
alert('error');
},
complete: function(xhr, textStatus){
if(textStatus === 'timeout'){
alert('请求超时');
};
}
});
},
//专员审核
//经理审核
Manager: function(pageNo) {
$("#commissioner").removeClass("btn-info");
$("#commissioner").addClass("btn-default");
$("#manager").removeClass("btn-default");
$("#manager").addClass("btn-info");
$("#director").removeClass("btn-info");
$("#director").addClass("btn-default");
$("#cashier").removeClass("btn-info");
$("#cashier").addClass("btn-default");
follow.pageNo = pageNo;
var params = {};
params.pageNo = follow.pageNo;
params.pageSize = follow.pageSize;
$.ajax({
type: 'GET',
url: '/index/reportListManager/1',
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('reportList_list_tpl').innerHTML);
$("#follow_list").html(doTtmpl(data.data.list));
/*分页代码*/
add_page(data.data.total,pageNo,follow.pageSize,follow.getList);
}else {
alert(data['msg']);
};
}else{
alert('数据错误');
};
},
error: function() {
alert('error');
},
complete: function(xhr, textStatus){
if(textStatus === 'timeout'){
alert('请求超时');
};
}
});
},
//经理审核
//总监审核
Director: function(pageNo) {
$("#commissioner").removeClass("btn-info");
$("#commissioner").addClass("btn-default");
$("#manager").removeClass("btn-info");
$("#manager").addClass("btn-default");
$("#director").removeClass("btn-default");
$("#director").addClass("btn-info");
$("#cashier").removeClass("btn-info");
$("#cashier").addClass("btn-default");
follow.pageNo = pageNo;
var params = {};
params.pageNo = follow.pageNo;
params.pageSize = follow.pageSize;
$.ajax({
type: 'GET',
url: '/index/reportListMajordomo/2',
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('reportList_list_tpl').innerHTML);
$("#follow_list").html(doTtmpl(data.data.list));
/*分页代码*/
add_page(data.data.total,pageNo,follow.pageSize,follow.getList);
}else {
alert(data['msg']);
};
}else{
alert('数据错误');
};
},
error: function() {
alert('error');
},
complete: function(xhr, textStatus){
if(textStatus === 'timeout'){
alert('请求超时');
};
}
});
},
//总监审核
//出纳审核
Cashier: function(pageNo) {
$("#commissioner").removeClass("btn-info");
$("#commissioner").addClass("btn-default");
$("#manager").removeClass("btn-info");
$("#manager").addClass("btn-default");
$("#director").removeClass("btn-info");
$("#director").addClass("btn-default");
$("#cashier").removeClass("btn-default");
$("#cashier").addClass("btn-info");
follow.pageNo = pageNo;
var params = {};
params.pageNo = follow.pageNo;
params.pageSize = follow.pageSize;
$.ajax({
type: 'GET',
url: '/index/reportListCashier/3',
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('reportList_list_tpl').innerHTML);
$("#follow_list").html(doTtmpl(data.data.list));
/*分页代码*/
add_page(data.data.total,pageNo,follow.pageSize,follow.getList);
}else {
alert(data['msg']);
};
}else{
alert('数据错误');
};
},
error: function() {
alert('error');
},
complete: function(xhr, textStatus){
if(textStatus === 'timeout'){
alert('请求超时');
};
}
});
},
//出纳审核
//提交新增分佣提成
getList: function(pageNo) { getList: function(pageNo) {
follow.pageNo = pageNo; follow.pageNo = pageNo;
var params = {}; var params = {};
params.user_name =$('#customer_name').val();
params.start_time =$('#start_date').val();
params.end_time =$('#end_date').val();
params.internal_title =$('#shop_name').val();
params.user_phone =$('#customer_phone').val();
params.id =$('#shop_num').val()*1;
params.store_name =$('#store_name').val();
params.report_phone =$('#applicant_phone').val();
params.report_name =$('#applicant_name').val();
params.pageNo = follow.pageNo; params.pageNo = follow.pageNo;
params.pageSize = follow.pageSize; params.pageSize = follow.pageSize;
...@@ -301,22 +500,13 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', ' ...@@ -301,22 +500,13 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
dataType: 'json', dataType: 'json',
beforeSend: function() {}, beforeSend: function() {},
success: function(data) { success: function(data) {
// console.log(data,666)
if(typeof data === 'object') { if(typeof data === 'object') {
if (data.code == 200) { if (data.code == 200) {
var doTtmpl = doT.template(document.getElementById('reportList_list_tpl').innerHTML); var doTtmpl = doT.template(document.getElementById('reportList_list_tpl').innerHTML);
$("#follow_list").html(doTtmpl(data.data.list)); $("#follow_list").html(doTtmpl(data.data.list));
/*分页代码*/ /*分页代码*/
add_page(data.data.total,pageNo,follow.pageSize,follow.getList); add_page(data.data.total,pageNo,follow.pageSize,follow.getList);
/* $("#pagediv").pagination({
length:data.data.total,
current: pageNo,
every: follow.pageSize,
onClick: function(el) {
follow.getList(el.num.current);
}
});*/
}else { }else {
alert(data['msg']); alert(data['msg']);
}; };
......
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