Commit 26e05049 authored by agping's avatar agping

后台

parent 82be5577
......@@ -162,7 +162,6 @@
</div>
</div>
<!--黑名单-->
<!--收款图片 2.2版本-->
<div class="modal fade" id="modal-blackList" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-body-width">
<div class="modal-content">
......@@ -171,7 +170,7 @@
×
</button>
<h4 class="modal-title">
收款图片
黑名单详情
</h4>
</div>
<div class="modal-body modal-body-height">
......
......@@ -149,10 +149,10 @@
</select>
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="id" placeholder="姓名/手机号" name="search" type="text" value="">
<select class="form-control btn2 ld-Marheight" name="agent_status" placeholder="经纪人状态">
<option value="-1">经纪人状态</option>
<option value="">经纪人状态</option>
<option value="0">正常</option>
<option value="1">离职</option>
<option value="2">长假</option>
<option value="1">长假</option>
<option value="2">离职</option>
<option value="3">已转勤</option>
<option value="4">黑名单</option>
</select>
......@@ -663,7 +663,6 @@
<!-- /.modal -->
</div>
<!--黑名单-->
<!--收款图片 2.2版本-->
<div class="modal fade" id="modal-blackList" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-body-width">
<div class="modal-content">
......@@ -672,7 +671,7 @@
×
</button>
<h4 class="modal-title">
收款图片
加黑名单
</h4>
</div>
<div class="modal-body modal-body-height">
......
define(['doT', 'text!temp/financial_manager_daily_list_template_tpl.html', 'css!style/home.css', 'css!style/report_list.css', 'ckfinder', 'ckfinderStart', 'pagination', 'bootstrapJs'], function(doT, template, template_tax, template_maid, template_maid_sub1) {
bargain = {
pageNo: 1,
/*第几页*/
pageSize: 10,
/*每页显示多少条*/
mainTabIndex: 0,
detailTabIndex: 0,
bargain_id: '',
order_id: 0,//订单id
maidTotalCommission: 0,//应收总佣金
isBargaininfoSaveIngFlag: false,//成交信息保存是否正在保存
shouyong_date_active_sapn: null,
init: function() {
//初始化dot
$(document.body).append(template);
bargain.getList(1);
bargain.event();
},
event: function() {
var _doc = $(document);
//主页面一级审核,二级审核,三级审核,结单四个tab的点击事件
_doc.on('click', '.maintable-top-sub-tr>a', function(e){
e.preventDefault();
e.stopPropagation();
var _this = $(this);
_this.removeClass('btn-default').addClass('btn-info').siblings().removeClass('btn-info').addClass('btn-default');
bargain.mainTabIndex = _this.index();
console.log(bargain.mainTabIndex);
bargain.getList(1);
});
//搜索按钮的事件
_doc.on('click', '#maintable_search', function(e) {
e.preventDefault();
e.stopPropagation();
bargain.getList(1); //一级审核搜索
});
//点击li 列表消失
$(document).delegate(".addphone", "click", function() { //list消失新增客户 点击li事件 获取id ul消失
bargain.addphone(this);
});
//搜索的重置
$("#maintable_reset").click(function() {
document.getElementById("maintable_form_search").reset();
bargain.agent_id_phone='';
});
var _doc = $(document);
bargain.getDistrict(function() {
_doc.on('input', '[name=district_id],#district_id2', function() {
var _this = $(this);
var _id = _this.val();
_this.next().html(''); //先清空
//新增 编辑
var _objTemp = _this.parent().next().find('select');
_objTemp.html(''); //先清空
if(_id && _id != '0') {
bargain.getDistrictStoreList(_id, function(_data) {
// var _str = '';
var _str = '<option value="0">全部</option>';
$.each(_data, function(i, item) {
_str += '<option value="' + item.id + '">' + item.store_name + '</option>';
});
_objTemp.html(_str);
_this.next().html(_str);
});
} else {};
});
});
},
//获取一级审核,二级审核,三级审核,结单不同的ajax请求url
switchUrl: function(){
switch (Number(this.mainTabIndex)){
case 0:
return '/index/reportListAll/10';
case 1:
return '/index/reportListOne/1';
case 2:
return '/index/reportListTwo/2';
case 3:
return '/index/reportListThree/3';
case 4:
return '/index/reportListStatement/4';
default:
return '';
}
},
//获取一级审核,二级审核,三级审核,结单数据列表共用的方法
getList: function(pageNo){
console.count('bar');
var params = {
'pageNo': pageNo,
'pageSize': bargain.pageSize,
'shop_type': $('#maintable_shop_type').val(),
'create_time': $.trim($('#maintable_create_time').val()),
'end_time': $.trim($('#maintable_end_time').val()),
'internal_address': $.trim($('#maintable_internal_address').val()),
'user_phone': $.trim($('#maintable_user_phone').val()),
'house_number': $.trim($('#maintable_shop_num').val()),
'district_id' : $("select[name='district_id'] option:selected").val(),
'store_id' : $("select[name='store_id'] option:selected").val(),
'agent_name': $.trim($('#agent_name').val()),
'agent_phone': $.trim($('#agent_phone').val()),
'bargain_id' :$.trim($('#bargain_id').val()),
'partial_id': bargain.agent_id_phone,
'user_id': $('#maintable_user_ID').val(),
};
$.ajax({
type: 'GET',
url: bargain.switchUrl(),
data: params,
timeout: 30000,
dataType: 'json',
beforeSend: function() {
$('#main_loading_pic').show();
},
success: function(data) {
if(typeof data === 'object') {
if(data.code == 200) {
var doTtmpl = doT.template(document.getElementById('financial_daily_list_tpl').innerHTML);
$("#maintable_list").html(doTtmpl(data.data.list));
/*分页代码*/
add_page(data.data.total, pageNo, bargain.pageSize, bargain.getList);
} else {
alert(data['msg']);
};
} else {
alert('数据错误');
};
},
error: function() {
alert('error');
},
complete: function(xhr, textStatus) {
$('#main_loading_pic').hide();
if(textStatus === 'timeout') {
alert('请求超时');
};
}
});
},
getDistrict: function(fn) {
$.ajax({
url: '/index/getDistrict',
type: 'GET',
async: true,
data: {
"pageSize": 1000
},
dataType: 'json',
success: function(data) {
if(data.code == 200 && data.data != null) {
var str = '';
$.each(data.data, function(i, item) {
str += '<option value="' + item.id + '">' + item.district_name + '</option>';
});
$('[name=district_id]').append(str);
$('#district_id2').append(str);
fn && fn();
}
}
});
},
getDistrictStoreList: function(id, fn) {
$.ajax({
url: '/index/getDistrictStoreList',
type: 'GET',
async: true,
data: {
'id': id,
"pageSize": 1000
},
dataType: 'json',
success: function(data) {
if(data.code == 200 && data.data != null) {
fn && fn(data.data);
}
}
});
},
};
return bargain;
});
\ No newline at end of file
<script id="financial_daily_list_tpl" type="text/template">
[% if(it.length) { %]
[% for(var item in it){ %]
<tr>
<td>[%= it[item]['create_time'] %]</td>
<td>[%= it[item]['id'] %]</td>
<td>[%= it[item]['name'] %]</td>
<td>[%= it[item]['phone']%]</td>
<td>[%= it[item]['store_name'] %]</td>
<td>
<a class="btn1 btn-info" href="#modal_financial" data-recordid="[%= it[item]['id'] %]" data-toggle="modal">审核</a>
</td>
</tr>
[% } %]
[% }else{ %]
<tr>
<td colspan="8" 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