Commit f8a8eb06 authored by agping's avatar agping

办公室

parent 9ef8287f
......@@ -297,7 +297,7 @@
<div class="pull-right">
<ul class="bread_btn">
<li>
<a href="#modal_add_user" data-toggle="modal" class="btn btn-info add_alert add-user-new"><i class="icon-plus"></i> 新增办公室
<a href="#modal-editOffice" data-toggle="modal" class="btn btn-info add-office"><i class="icon-plus"></i> 新增办公室
</a>
</li>
</ul>
......@@ -311,8 +311,8 @@
<td colspan="15">
<form id="form_search">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="changed_id" placeholder="办公室名称" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="back_id_money" placeholder="办公室地点" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="office_name" placeholder="办公室名称" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="office_adress" placeholder="办公室地点" type="text" value="">
<span class="btn btn-info btn3 ld-Marheight" id="search" style="float:left">搜索</span>
<span class="btn btn-info btn3 ld-Marheight" id="reset" style="float:left">重置</span>
......@@ -345,26 +345,7 @@
</div>
</div>
</div>
<!--时间轴-->
<div class="modal fade" id="modal-time" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<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" class="iframe-div-parent">
<iframe class="iframe-time-line"></iframe>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!-- 新增 编辑办公室 -->
<div class="modal fade" id="modal-editOffice" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="font-size: 16px;">
<div class="modal-dialog">
......@@ -392,26 +373,26 @@
<div class="form-group form-group-bottom">
<label for="inputEmail3" class="col-sm-3 control-label">办公室名称:</label>
<div class="col-sm-9">
<input type="text" class="form-control btn6" name="" autocomplete="off" id="" placeholder="请输入">
<input type="text" class="form-control btn6 officeName" name="" autocomplete="off" id="" placeholder="请输入">
</div>
</div>
<div class="form-group form-group-bottom">
<label for="inputEmail3" class="col-sm-3 control-label">办公室地点:</label>
<div class="col-sm-9">
<input type="text" class="form-control btn6" name="" autocomplete="off" id="" placeholder="请输入">
<input type="text" class="form-control btn6 officeAddr" name="" autocomplete="off" id="" placeholder="请输入">
</div>
</div>
<div class="form-group form-group-bottom">
<label for="inputEmail3" class="col-sm-3 control-label">租金(元/月):</label>
<div class="col-sm-9">
<input type="text" class="form-control btn6" name="" autocomplete="off" id="" placeholder="请输入">
<input type="text" class="form-control btn6 officeRent" name="" autocomplete="off" id="" placeholder="请输入">
</div>
</div>
</form>
</div>
<div class="modal-footer noprint" id="hiddenOr" >
<button type="button" class="btn btn-primary pass" href="#modal_pass" data-toggle="modal">保存</button>
<button type="button" class="btn btn-primary save_office" data-toggle="modal">保存</button>
</div>
</div>
<!-- /.modal-content -->
......@@ -466,117 +447,7 @@
</div>
<!-- /.modal -->
</div>
<!--退款-->
<div class="modal fade" id="tuikuan_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"> &times; </button>
<h4 class="modal-title"> 转到已退款 </h4>
</div>
<div class="modal-body">
<div class="col-xs-12" style="margin-top:20px;">
<label class="col-xs-2">备注</label>
<div class="col-xs-10">
<textarea id="check_past_pict" class="form-control"></textarea>
</div>
<div class="col-xs-12" style="padding-left:30px;">
<label>上传转账图片和退款单手签版图片:</label>
</div>
<div class="col-xs-12">
<div class="file-upload-area p-a-0 ">
<ul class="img-pre-ul" id="fujian_ul"></ul>
<div class="btn-area">
<input class="btn btn-default" type="file" id="file_input3" data-limittop="1" /> <!--修改上传文件的最大数字-->
<button class="btn btn-default" style="margin-left : 144px;">选择图片</button>
</div>
<div class="col-xs-12 p-t-10" id="container_body_img_area3">
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" id="check_back" >确定</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<div class="modal fade" id="modal_pass" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
&times;
</button>
<h4 class="modal-title"> 审核通过 </h4>
</div>
<div class="modal-body" style="overflow:hidden;">
<label class="col-xs-2">备注</label>
<div class="col-xs-10">
<textarea id="check_past" class="form-control"></textarea>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" id="check_yes">确定</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<div class="modal fade" id="modal_false" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header" >
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"> &times; </button>
<h4 class="modal-title"> 驳回 </h4>
</div>
<div class="modal-body" style="overflow:hidden;">
<label class="col-xs-2">备注</label>
<div class="col-xs-10">
<textarea id="check_bohui" class="form-control "></textarea>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" id="check_no">确定</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!--时间轴-->
<div class="modal fade" id="modal-del" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<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" class="iframe-div-parent">
<div style="font-size: 18px;padding: 20px;">确定删除该笔退款!!</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消
</button>
<button type="button" class="btn btn-primary" id="confirm_deleteMoney" data-dismiss="modal">
确定
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<div id="img_mask_area" title="点击任意位置可关闭">
<img />
</div>
......@@ -32,12 +32,9 @@ define(['doT', 'text!temp/cost_office_template_tpl.html','text!temp/storeBinding
$(document).on('click','#reset',function(e){
that.resetAll();
});
//导出报表
$(document).on('click','#export',function(e){
that.exportExcel();
});
//编辑办公室
$(document).on('click','.edit_office',function(e){
$(document).on('click','.save_office',function(e){
that.editOffice();
});
//编辑门店
......@@ -45,115 +42,34 @@ define(['doT', 'text!temp/cost_office_template_tpl.html','text!temp/storeBinding
that.editStore();
});
//二级联动
that.getDistrict(function() {
_doc.on('input', '#commit_home', function() {
var _this = $(this);
var _id = $('#commit_home').val();
$('#commit_shop').html(''); //先清空
if(_id && _id != '0') {
that.getDistrictStoreList(_id, function(_data) {
var _str = '<option value="0">全部</option>';
$.each(_data, function(i, item) {
_str += '<option value="' + item.id + '">' + item.store_name + '</option>';
});
$('#commit_shop').append(_str)
});
} else {};
});
});
//点击li 列表消失
$(document).delegate(".addphone", "click", function() { //list消失新增客户 点击li事件 获取id ul消失
that.addphone(this);
});
//分佣方 姓名下拉式
$(document).on("input", "#comit_name", function() { //手机号新增搜索客方
if($("#comit_name").val() == '') {
that.agent_id_phone='';
$(".user-ul").html('');
} else {
that.search_person();
}
});
_doc.on('click','.choose_btn',function(e){
var befor = that.check_status
$(this).removeClass('btn-default').addClass('btn-info').siblings().removeClass('btn-info').addClass('btn-default');
if ( befor != e.target.dataset.value) {
that.check_status = e.target.dataset.value;
cost.getList(1);
}
})
},
search_person: function() { //手机号新增客户
//编辑门店
editStore: function() {
var params = {};
params.agent_id = 6576;
$.ajax({
url: '/index/getBroker_new',
url: '/index/deviceList',
type: 'GET',
async: true,
data: {
"phone": $("#comit_name").val(),
'all' : 1
},
dataType: 'json',
success: function(data) {
if(data.code == 200) {
var user_ul = "";
$.each(data.data, function(i, item) {
if(item.status == 0 || item.status == 4){
var status=' ';
};
if(item.status == 1){
var status='-长假';
};
if(item.status == 2){
var status='-离职';
};
if(item.status == 3){
var status='-转勤';
}
user_ul += '<li class="addphone" data-id="' + item.id + '">' + item.id + '-' + item.name + '-' + item.phone + status + '</li>';
});
$(".user-ul").html(user_ul);
$(".user-ul").show();
} else {
alert(data.msg);
}
}
});
},
//删除退款
deleteRefund: function(id) {
$.ajax({
url: '/index/delRefund',
type: 'POST',
async: true,
data: {
"refund_id": id
},
data: params,
dataType: 'json',
success: function(data) {
if(data.code == 200) {
cost.getList(cost.pageNo);
alert(data.msg);
} else {
alert(data.msg);
}
var temp = document.getElementById('store_binding_tpl').innerHTML;
var doTempl = doT.template(temp);
$("#agent_phone_binding").html(doTempl(data.data));
/*分页代码*/
}
});
})
},
//手机绑定权限
editStore: function() {
//编辑办公室
editOffice: function() {
var params = {};
params.agent_id = 6576;
$.ajax({
url: '/index/deviceList',
type: 'GET',
url: '/index/addOffice',
type: 'POST',
async: true,
data: params,
dataType: 'json',
......@@ -165,65 +81,20 @@ define(['doT', 'text!temp/cost_office_template_tpl.html','text!temp/storeBinding
}
})
},
//将li里的值 赋给input(分佣方姓名)
addphone: function(obj) {//新增客户 input赋值
var that = cost ;
var user_ht = $(obj).html()+'';
var user_ht_str=user_ht.substring(0,user_ht.length-3);
$("#comit_name").val(user_ht_str);
$(".user-ul").html('');
$(".user-ul").hide();
that.agent_id_phone = $(obj).attr("data-id");
},
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>';
});
$('#commit_home').append(str);
fn && fn();
} else {
alert(data.msg)
}
}
});
},
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);
} else {
alert(data.msg)
}
}
});
},
//获取列表
getList : function(no){
var that = cost;
that.pageNo = no;
var params={};
params.pageNo = that.pageNo;
params.pageSize = that.pageSize ;
params.pageSize = that.pageSize;
if($('#office_name').val()){//办公室名字
params.office_name = $('#office_name').val();
}
if($('#office_adress').val()){//办公室地点
params.office_address = $('#office_adress').val();
}
$.post('/index/getOfficeList',params,function(data){
if(typeof data === 'object') {
if(data.code == 200) {
......@@ -231,7 +102,6 @@ define(['doT', 'text!temp/cost_office_template_tpl.html','text!temp/storeBinding
var temp = document.getElementById('cost_office_template_tpl').innerHTML;
var doTtmpl = doT.template(temp);
$("#order_list").html(doTtmpl(data.data.list));
$('#money_total').text((data.data.total_money-0 > 0) ? (data.data.total_money+"元"): "0元" )
/*分页代码*/
add_page(data.data.total, no, that.pageSize, that.getList);
......@@ -249,24 +119,8 @@ define(['doT', 'text!temp/cost_office_template_tpl.html','text!temp/storeBinding
*/
resetAll : function(){
var that = cost;
$('#comit_time_start').val("");
$('#comit_time_end').val("");
$('#into_time_start').val("");
$('#into_time_end').val("");
$('#changed_type').val("");
$('#changed_id').val("");
$('#back_id').val("");
$('#get_id').val("");
$('#shoped_id').val("");
$('#shoped_addr').val("");
$('#commit_home').val("");
$('#commit_shop').val("");
$('#comit_name').val("");
$('#comit_phone').val("");
$('#is_type').val("");
$('#is_open').val("-1");
$('#back_id_money').val("");
that.agent_id_phone="";
$('#office_name').val("");
$('#office_adress').val("");
},
......
......@@ -7,21 +7,7 @@
<td>[%= it[item]['office_name'] %]</td>
<td>[%= it[item]['office_address'] %]</td>
<td>[%= it[item]['pay_log_id'] %]</td>
[% if(it[item]['type'] == 1) { %]
<td>意向金转定</td>
[% }else if (it[item]['type'] == 2) { %]
<td>退保管金</td>
[% }else if (it[item]['type'] == 3) { %]
<td>保管金转定</td>
[% }else if (it[item]['type'] == 4) { %]
<td>退中介费</td>
[% }else if (it[item]['type'] == 5) { %]
<td>退案场费</td>
[% }else if (it[item]['type'] == 0) { %]
<td>退意向金</td>
[% } else { %]
<td>--</td>
[% } %]
<td>[%= it[item]['store_num'] %]</td>
<td>
<a class="btn1 btn-success edit_office" href="#modal-editOffice" data-toggle="modal" data-id='[%= it[item]["id"] %]'>编辑办公室</a>
......
......@@ -2,41 +2,6 @@
[% if(it) { %]
[% for(var item in it){ %]
<tr class="text-center">
<td>[%= it[item]['create_time'] %]</td>
<td>[%= it[item]['id'] %]</td>
[% if(it[item]['status'] == 0) { %]
<td>审核中</td>
[% }else if (it[item]['status'] == 1) { %]
<td>审核中</td>
[% }else if (it[item]['status'] == 2) { %]
<td>退款成功</td>
[% }else if (it[item]['status'] == 3) { %]
<td>已审核</td>
[% }else if (it[item]['status'] == 4) { %]
<td>驳回</td>
[% } else { %]
<td>--</td>
[% } %]
<td>[%= it[item]['order_id'] %]</td>
<td>[%= it[item]['pay_log_id'] %]</td>
<td>[%= it[item]['refund_money'] %]</td>
<td>[%= it[item]['income_time'] %]</td>
<!--<td>[%= it[item]['type'] %]</td>-->
[% if(it[item]['type'] == 1) { %]
<td>意向金转定</td>
[% }else if (it[item]['type'] == 2) { %]
<td>退保管金</td>
[% }else if (it[item]['type'] == 3) { %]
<td>保管金转定</td>
[% }else if (it[item]['type'] == 4) { %]
<td>退中介费</td>
[% }else if (it[item]['type'] == 5) { %]
<td>退案场费</td>
[% }else if (it[item]['type'] == 0) { %]
<td>退意向金</td>
[% } else { %]
<td>--</td>
[% } %]
<td>[%= it[item]['agent_name'] %]</td>
<td>[%= it[item]['store_name'] %]</td>
<td>
......
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