Commit b741da2a authored by clone's avatar clone

Merge branch 'test'

parents 26a7f3fb ea714aa3
......@@ -51,5 +51,14 @@
<arguments>1.0-name-matches-false-false-node_modules</arguments>
</matcher>
</filter>
<filter>
<id>1530191912321</id>
<name></name>
<type>26</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-node_modules</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
......@@ -24,6 +24,25 @@ class UploadFileService
*/
public function upload($_upload_file, $type, $size = 1000000, $ext = [ 'jpg' ])
{
/**
*
upload($_FILE['file'])
array(2) {
[0] => array(3) {
["code"] => int(200)
["img_path"] => string(19) "201807021804140.jpg"
["img_ext"] => string(3) "jpg"
}
[1] => array(3) {
["code"] => int(200)
["img_path"] => string(20) "2018070218041401.jpg"
["img_ext"] => string(3) "jpg"
}
}
*/
$check = $this->checkUploadFile($_upload_file, $size, $ext);
if ($check['code'] == 101) {
......@@ -45,6 +64,7 @@ class UploadFileService
break;
case 'house_img':
$path .= 'resource/lib/Attachments/images/';
break;
default :
$path .= 'static/';
}
......
......@@ -77,22 +77,25 @@ class Agent extends Basic
$pageNo = empty($params['pageNo']) ? 1 : $params['pageNo'];
$pageSize = empty($params['pageSize']) ? 15 : $params['pageSize'];
//条件
$where = 'a.status in(0,1)';
$where = 'a.id != 1';
$search = $params['search'];
$where['a.status'] = ['IN',['0,1']];
$where['a.id'] = ['<>', 1];
if (!empty($search)) {
$where .= " and a.id='$search' or a.name like '%$search%' or a.phone like '%$search%' ";
$data['search'] = $search;
if (!empty($params['search'])) {
$where[] = ['EXP', "a.name like '%{$params['search']}%' OR a.phone like '%{$params['search']}%'"];
}
if (!empty($params['groupname'])) {
$where .= " and g.title like '%{$params['groupname']}%' ";
$data['groupname'] = $params['groupname'];
if (!empty($params['group_name'])) {
$where['g.title'] = ['LIKE', "%{$params['group_name']}%"];
}
if (!empty($params['store_name'])) {
$where .= " and s.store_name like '%{$params['store_name']}%' ";
$data['store_name'] = $params['store_name'];
if (!empty($params['store_id'])) {
$where['a.store_id'] = $params['store_id'];
}
if (!empty($params['district_id'])) {
$where['a.district_id'] = $params['district_id'];
}
$field = "a.id,a.store_id,a.img,a.district_id,a.`level`,a.`name`,a.phone,a.`status`,a.inviter_id,a.create_time,
ifnull(s.store_name,'')store_name,ifnull(d.district_name,'')district_name,ifnull(g.title,'无')groupname";
$order = 'a.id DESC';
......
......@@ -47,7 +47,7 @@ class Collection extends Basic
}
if (!empty($this->params['internal_title'])) {
$where['d.internal_title'] = ['like', '%'.$where['internal_title'].'%'];
$where['d.internal_title'] = ['like', '%'.$this->params['internal_title'].'%'];
}
if (!empty($this->params['user_name'])) {
......
......@@ -1016,47 +1016,57 @@ class Finance extends Basic
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$pageSize = empty($this->params['pageSize']) ? 15 : $this->params['pageSize'];
$where['c.is_del'] = 0; //订单状态
$where['a.status'] = ['in', '10,11,13']; //10已提交 11审核成功
$where['b.father_id'] = ['<>', 0]; //去除税费总佣金
$where['c.confirm_status'] = 1; //确认分佣
$where['b.status'] = ['in', '10,11,13']; //10已提交 11审核成功
$where['a.confirm_status'] = 1; //确认分佣
$income_date = $operation_date = '';
$operation_start_data = $operation_end_data = $income_date = $operation_date = '';
/**收佣日期 start**/
if (!empty($this->params['income_start_date']) && empty($this->params['income_end_date'])) {
$where[] = [ 'EXP', " f.income_time > {$this->params['income_start_date']} or b.operation_date > {$this->params['income_start_date']}"];
$where[] = [ 'EXP', " f.income_time > {$this->params['income_start_date']} or c.operation_date > {$this->params['income_start_date']}"];
$income_date = date('Y.m.d', strtotime($this->params['income_start_date']));
$operation_start_data = $this->params['income_start_date'];
}
if (!empty($this->params['income_end_date']) && empty($this->params['income_start_date'])) {
$where[] = [ 'EXP', " f.income_time < {$this->params['income_end_date']} or b.operation_date < {$this->params['income_start_date']}"];
$where[] = [ 'EXP', " f.income_time < {$this->params['income_end_date']} or c.operation_date < {$this->params['income_start_date']}"];
$income_date = '-'. date('Y.m.d', strtotime($this->params['income_end_date']));
$operation_end_data = $this->params['income_end_date'];
}
if (!empty($this->params['income_start_date']) && !empty($this->params['income_end_date'])){
$where[] = [ 'EXP', "(f.income_time > {$this->params['income_start_date']} and f.income_time < {$this->params['income_end_date']}) or
(b.operation_date > {$this->params['income_start_date']} or b.operation_date < {$this->params['income_end_date']})"];
$where[] = ['EXP', "(f.income_time BETWEEN '{$this->params['income_start_date']}' and '{$this->params['income_end_date']}')"];
$income_date = date('Y.m.d', strtotime($this->params['income_start_date'])) .'-'. date('Y.m.d', strtotime($this->params['income_end_date']));
$operation_start_data = $this->params['income_start_date'];
$operation_end_data = $this->params['income_end_date'];
}
/**收佣日期 end**/
/**提交成交报告日期 start**/
if (!empty($this->params['bargain_start_date']) && empty($this->params['bargain_end_date'])) {
$where[] = [ 'EXP', "a.create_time > {$this->params['bargain_start_date']} . ' 00:00:00' or b.operation_date > {$this->params['bargain_start_date']}"];
$where[] = [ 'EXP', "a.create_time > {$this->params['bargain_start_date']} . ' 00:00:00' OR c.operation_date > {$this->params['bargain_start_date']}"];
$operation_date = date('Y.m.d', strtotime($this->params['bargain_start_date']));
$operation_start_data = $this->params['bargain_start_date'];
}
if (!empty($this->params['bargain_end_date']) && empty($this->params['bargain_start_date'])) {
$where[] = [ 'EXP', "a.create_time < {$this->params['bargain_end_date']} . ' 23:59:59' or b.operation_date < {$this->params['bargain_end_date']}"];
$where[] = [ 'EXP', "a.create_time < {$this->params['bargain_end_date']} . ' 23:59:59' OR c.operation_date < {$this->params['bargain_end_date']}"];
$operation_date = date('Y.m.d', strtotime($this->params['bargain_end_date']));
$operation_end_data = $this->params['bargain_end_date'];
}
if (!empty($this->params['bargain_start_date']) && !empty($this->params['bargain_end_date'])) {
$where[] = [ 'EXP', "(a.create_time > '{$this->params['bargain_start_date']} 00:00:00' and a.create_time < '{$this->params['bargain_end_date']} 23:59:59') or
(b.operation_date > {$this->params['bargain_start_date']} and b.operation_date < {$this->params['bargain_end_date']})"];
$where[] = ['EXP', "(a.create_time BETWEEN '{$this->params['bargain_start_date']} 00:00:00' and '{$this->params['bargain_end_date']} 23:59:59')"];
$operation_date = date('Y.m.d', strtotime($this->params['bargain_start_date'])) .'-'. date('Y.m.d', strtotime($this->params['bargain_end_date']));
$operation_start_data = $this->params['bargain_start_date'];
$operation_end_data = $this->params['bargain_end_date'];
}
/**部门id**/
......@@ -1071,7 +1081,7 @@ class Finance extends Basic
/**经纪人手机号**/
if (!empty($this->params['phone'])) {
$where['b.phone'] = [ 'like', '%' . $this->params['phone'] . '%' ];
$where['d.phone'] = [ 'like', '%' . $this->params['phone'] . '%' ];
}
/**经纪人姓名**/
......@@ -1079,14 +1089,12 @@ class Finance extends Basic
$where['d.name'] = [ 'like', '%' . $this->params['name'] . '%' ];
}
$m_bargain = new OBargainModel();
$m_bargain = new OPartialCommission();
if (empty($this->params['excel']) && $this->params['excel'] != 1) {
$fields = 'f.income_time,a.create_time,a.id,a.agent_id,sum(b.fee) as fee,sum(c.practical_fee) as practical_fee,sum(c.cash) as cash,';
$fields .= 'sum(b.fee) as fee,sum(c.real_fee) as real_fee,';
$fields .= 'd.name,d.phone';
$data['data']['list'] = $m_bargain->getCommissionTotalList($pageNo, $pageSize, 'a.id desc', $fields, $where, $whereOr);
$fields = 'f.income_time,b.create_time,b.id,b.agent_id,sum(a.practical_fee) as practical_fee,sum(a.cash) as cash,';
$fields .= 'sum(a.real_fee) as real_fee,d.name,d.phone';
$data['data']['list'] = $m_bargain->getCommissionTotalList($pageNo, $pageSize, 'a.id desc', $fields, $where, $operation_start_data, $operation_end_data);
foreach ($data['data']['list'] as $k=>$v) {
$data['data']['list'][$k]['income_date'] = $income_date;
......@@ -1094,17 +1102,17 @@ class Finance extends Basic
$data['data']['list'][$k]['over_fee'] = $v['practical_fee'] - $v['fee'];
}
$data['data']['total'] = $m_bargain->getCommissionTotalListTotal($where, $whereOr);
$data['data']['total'] = $m_bargain->getCommissionTotalListTotal($where);
} else {
//导出Excel
$fields = 'f.income_time,a.create_time,sum(b.fee) as fee,sum(f.money) as money,sum(c.cash) as cash,';
$fields .= 'sum(c.service_charge) as service_charge,a.agent_id,sum(c.practical_fee) as practical_fee,';
$fields .= 'd.name,d.phone,sum(c.charity_fund) as charity_fund, sum(should_commission) as should_commission';
$fields = 'f.income_time,b.create_time,sum(f.money) as money,sum(a.cash) as cash,';
$fields .= 'sum(a.service_charge) as service_charge,a.agent_id,sum(a.practical_fee) as practical_fee,';
$fields .= 'd.name,d.phone,sum(a.charity_fund) as charity_fund, sum(a.should_commission) as should_commission';
$pageSize = 25000;
$data = $m_bargain->getCommissionTotalList($pageNo, $pageSize, 'a.id desc', $fields, $where, $whereOr);
$data = $m_bargain->getCommissionTotalList($pageNo, $pageSize, 'a.id desc', $fields, $where, $operation_start_data, $operation_end_data);
foreach ($data as $k => $v) {
$excel_data[$k]['income_date'] = $income_date; //收佣日期
......
......@@ -2,240 +2,240 @@
<input type="hidden" class="page-load" id="agent" />
<!--关联经纪人列表liudanjs文件-->
<style>
.J_preview{
.J_preview {
width: 30px;
height: 30px;
border-radius: 15px;
}
</style>
<div id="page-content-wrapper">
<div class="container">
<div class="row">
<div class="col-lg-10 col-lg-offset-0">
<div class="panel panel-default">
<div class="panel-heading breadcrumb">
<li>
<a href="#">经纪人管理</a>
</li>
<li class="active">经纪人列表</li>
<div class="pull-right">
<ul class="bread_btn">
<li>
<a href="#modal-edit" data-toggle="modal" class="btn btn-default agent_add">
<i class="icon-plus"></i>
新增</a>
</li>
</ul>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-lg-10 col-lg-offset-0">
<div class="panel panel-default">
<div class="panel-heading breadcrumb">
<li>
<a href="#">经纪人管理</a>
</li>
<li class="active">经纪人列表</li>
<div class="pull-right">
<ul class="bread_btn">
<li>
<a href="#modal-edit" data-toggle="modal" class="btn btn-default agent_add">
<i class="icon-plus"></i> 新增
</a>
</li>
</ul>
</div>
</div>
<div class="panel-body">
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover table-condensed">
<thead>
<tr>
<td colspan="11">
<form id="form_search">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="industry_type" placeholder="角色"
type="text" value="" name="groupname">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="dish" placeholder="门店"
type="text" value="" name="store_name">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="id" placeholder="姓名/手机号"
name="search" type="text" value="">
<div class="panel-body">
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover table-condensed">
<thead>
<tr>
<td colspan="11">
<form id="form_search">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="industry_type" placeholder="角色" type="text" value="" name="groupname">
<!--<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="dish" placeholder="门店"
type="text" value="" name="store_name">-->
<select class="form-control btn2 input ld-Marheight" name="" id="district_id">
<option value="">部门</option>
</select>
<span class="btn btn-default btn3 ld-Marheight" id="search">搜索</span>
<span class="btn btn-default btn3 ld-Marheight" id="reset">重置</span>
<!--变更角色-->
<select class="form-control btn2 input ld-Marheight" name="" id="guest_stores">
</select>
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="id" placeholder="姓名/手机号" name="search" type="text" value="">
</form>
</td>
</tr>
<tr>
<th>注册时间</th>
<th>用户ID</th>
<th>用户头像</th>
<th>姓名</th>
<th>手机号</th>
<th>角色</th>
<!--2.2版本 -->
<!--<th>评价次数</th>
<th>分数</th>-->
<th>操作</th>
</tr>
</thead>
<tbody id="agentlist">
<span class="btn btn-default btn3 ld-Marheight" id="search">搜索</span>
<span class="btn btn-default btn3 ld-Marheight" id="reset">重置</span>
<!--变更角色-->
</tbody>
</table>
<!-- 列表底部按钮 -->
<div class="paginations text-right" id="pagediv">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</td>
</tr>
<tr>
<th>注册时间</th>
<th>用户ID</th>
<th>用户头像</th>
<th>姓名</th>
<th>手机号</th>
<th>角色</th>
<!--2.2版本 -->
<!--<th>评价次数</th>-->
<!--<th>分数</th>-->
<th>操作</th>
</tr>
</thead>
<tbody id="agentlist">
</tbody>
</table>
<!-- 列表底部按钮 -->
<div class="paginations text-right" id="pagediv">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--编辑-->
<div class="modal fade" id="modal-edit" 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">
<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" id="title">
<h4 class="modal-title" id="title">
经纪人编辑
</h4>
</div>
<div class="modal-body">
<form class="form-horizontal">
<div class="form-group">
<label class="col-sm-3 control-label">用户名:</label>
<input class="form-control btn6" data-rule-buga="false" data-rule-required="true" name="name" placeholder="登录账户所用名称" type="text"
value="" id="title">
</div>
<div class="form-group">
<label class="col-sm-3 control-label">电话(登录账号):</label>
<input type="number" class="form-control btn6" name="phone" value="" placeholder="填写手机号">
</div>
<div class="form-group hide">
<label class="col-sm-3 control-label">密码:</label>
<input type="text" class="form-control btn6" name="password" id="password" value="44444" placeholder="填写密码">
</div>
<div class="form-group">
<label class="col-sm-3 control-label">所属部门:</label>
<select name="district_id" class="form-control btn6">
<option value="">选择所属部门</option>
</select>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">所属门店:</label>
<select name="store_id" class="form-control btn6">
</select>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">性别:</label>
<div class="radio radio-primary btn4 mr-10">
<label for="sex0" class="radio-label1">
</div>
<div class="modal-body">
<form class="form-horizontal">
<div class="form-group">
<label class="col-sm-3 control-label">用户名:</label>
<input class="form-control btn6" data-rule-buga="false" data-rule-required="true" name="name" placeholder="登录账户所用名称" type="text" value="" id="title">
</div>
<div class="form-group">
<label class="col-sm-3 control-label">电话(登录账号):</label>
<input type="number" class="form-control btn6" name="phone" value="" placeholder="填写手机号">
</div>
<div class="form-group hide">
<label class="col-sm-3 control-label">密码:</label>
<input type="text" class="form-control btn6" name="password" id="password" value="44444" placeholder="填写密码">
</div>
<div class="form-group">
<label class="col-sm-3 control-label">所属部门:</label>
<select name="district_id" class="form-control btn6">
<option value="">选择所属部门</option>
</select>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">所属门店:</label>
<select name="store_id" class="form-control btn6">
</select>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">性别:</label>
<div class="radio radio-primary btn4 mr-10">
<label for="sex0" class="radio-label1">
<div class="iradio_minimal-blue" aria-checked="false" aria-disabled="false" style="">
<input type="radio" name="sex" id="sex0" value="0" checked="">
</div>保密
</label>
</div>
</div>
<div class="radio radio-primary btn4 mr-10">
<label for="sex0" class="radio-label1">
<div class="radio radio-primary btn4 mr-10">
<label for="sex0" class="radio-label1">
<div class="iradio_minimal-blue" aria-checked="false" aria-disabled="false" style="">
<input type="radio" name="sex" id="sex1" value="1">
</div>
</label>
</div>
</div>
<div class="radio radio-primary btn4 mr-10">
<label for="sex0" class="radio-label1">
<div class="radio radio-primary btn4 mr-10">
<label for="sex0" class="radio-label1">
<div class="iradio_minimal-blue" aria-checked="false" aria-disabled="false" style="">
<input type="radio" name="sex" id="sex2" value="2">
</div>
</label>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否允许访问后台:</label>
<select name="admin_off" id="admin_off" class="form-control btn6">
<option value="0">允许</option>
<option value="1">不允许</option>
</select>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">个人说明:</label>
<textarea name="remarks" id="remarks" class="form-control btn6" length="120" rows="5" placeholder="请填写个人说明"></textarea>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">是否允许访问后台:</label>
<select name="admin_off" id="admin_off" class="form-control btn6">
<option value="0">允许</option>
<option value="1">不允许</option>
</select>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">个人说明:</label>
<textarea name="remarks" id="remarks" class="form-control btn6" length="120" rows="5" placeholder="请填写个人说明"></textarea>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭
</button>
<button type="button" class="btn btn-primary submit_edit">
<button type="button" class="btn btn-primary submit_edit">
提交
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!--变更角色-->
<div class="modal fade" id="modal-user" 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">
<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 class="modal-title">
角色设置
</h4>
</div>
<div class="modal-body">
<form class="form-horizontal">
<div class="form-group">
<label class="col-sm-3 control-label">权限角色:</label>
<select name="status" class="form-control btn6" id="edit_role">
</select>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭
</div>
<div class="modal-body">
<form class="form-horizontal">
<div class="form-group">
<label class="col-sm-3 control-label">权限角色:</label>
<select name="status" class="form-control btn6" id="edit_role">
</select>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭
</button>
<button type="button" class="btn btn-primary submit_user" data-dismiss="modal">
<button type="button" class="btn btn-primary submit_user" data-dismiss="modal">
提交
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!--绑定手机 2.2版本-->
<div class="modal fade" id="modal-unbundling" 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">
<div class="modal fade" id="modal-unbundling" 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 class="modal-title">
角色设置
</h4>
</div>
<div class="modal-body">
<form class="form-horizontal">
<div class="form-group">
绑定手机
<!--<label class="col-sm-3 control-label">权限角色:</label>
</div>
<div class="modal-body">
<form class="form-horizontal">
<div class="form-group">
绑定手机
<!--<label class="col-sm-3 control-label">权限角色:</label>
<select name="status" class="form-control btn6" id="edit_role">
</select>-->
</div>
</form>
</div>
<div class="modal-footer">
<!--<button type="button" class="btn btn-default" data-dismiss="modal">关闭
</div>
</form>
</div>
<div class="modal-footer">
<!--<button type="button" class="btn btn-default" data-dismiss="modal">关闭
</button>
<button type="button" class="btn btn-primary submit_user" data-dismiss="modal">
提交
</button>-->
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
\ No newline at end of file
......@@ -272,7 +272,7 @@
<div class="modal-footer">
<!--<button type="button" class="btn btn-default" data-dismiss="modal">关闭
</button>-->
<button type="button" class="btn btn-primary submit_edit" id=" " data-dismiss="modal">
<button type="button" class="btn btn-primary" id="saveBtn" data-dismiss="modal">
保存
</button>
</div>
......
......@@ -312,7 +312,7 @@
&times;
</button>
<h4 class="modal-title" >
批量修改
批量修改
</h4>
</div>
<div class="modal-body modal-body-one">
......
......@@ -207,7 +207,7 @@
</select>
<select class="form-control btn2 margin-top-ld input" name="" id="district_id" title="
客方所属部门、客方所属门店 与邀请人所属部门、邀请人所属门店 不作为并列筛选项">
<option value="">客方所属部门</option>
<option value="0">客方所属部门</option>
</select>
......@@ -219,7 +219,7 @@
<!--邀请人-->
<select class="form-control btn2 margin-top-ld input" name="" id="district_id2" title="
客方所属部门、客方所属门店 与邀请人所属部门、邀请人所属门店 不作为并列筛选项">
<option value="">邀请人所属部门</option>
<option value="0">邀请人所属部门</option>
</select>
......@@ -242,7 +242,7 @@
<span class="btn btn-info btn3 margin-top-ld" class="reset_1">重置</span> -->
<span class="btn btn-info btn3 margin-top-ld" id="search">搜索</span>
<span class="btn btn-info btn3 margin-top-ld" id="reset">重置</span>
<a href="#modal_modify_user" data-toggle="modal" class="btn btn-info btn3 margin-top-ld"><i class="icon-plus"></i> 批量修改
<a href="#modal_modify_user" data-toggle="modal" class="btn btn-info btn3 margin-top-ld"><i class="icon-plus"></i> 批量修改
</a>
<!-- <span class="btn btn-info btn3 margin-top-ld" id="modify">批量修改客方</span> -->
......@@ -565,7 +565,7 @@
&times;
</button>
<h4 class="modal-title">
批量修改
批量修改
</h4>
</div>
<div class="modal-body modal-body-one">
......
......@@ -12,6 +12,7 @@ namespace app\model;
class OPartialCommission extends BaseModel
{
protected $table = "o_partial_commission";
/**
* 成交报告分佣表
*
......@@ -25,13 +26,14 @@ class OPartialCommission extends BaseModel
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getCommissionBargainList($pageNo, $pageSize, $order_ = 'id desc', $fields, $where) {
$data = $this->field($fields)
public function getCommissionBargainList($pageNo, $pageSize, $order_ = 'id desc', $fields, $where)
{
$data = $this->field($fields)
->alias('a')
->join('o_bargain b', 'a.bargain_id = b.id', 'left')
->join('o_order c', 'b.order_id = c.id', 'left')
->join('g_houses d', 'c.house_id = d.id', 'left')
->join('a_agents e', 'b.agent_id = e.id','left')
->join('a_agents e', 'b.agent_id = e.id', 'left')
->where($where)
->order($order_)
->limit($pageSize)
......@@ -39,30 +41,35 @@ class OPartialCommission extends BaseModel
->select();
$result = [];
$m_agent = new AAgents();
$m_bargain = new OBargainModel();
$m_agent = new AAgents();
$m_bargain = new OBargainModel();
$fields_str = 'a.id,a.name,a.phone,b.store_name,c.district_name';
foreach ($data as $k => $v) {
$result[$k] = $v;
if (isset($v['agent_id'])) {
$agent_data = $m_agent->getStoreDistrict($fields_str, ['a.id'=>$v['agent_id']]);
$result[$k]['agent'] = $agent_data['name'].'-'.$agent_data['phone'];
$result[$k]['district_store'] = $agent_data['district_name'] .'-'.$agent_data['store_name'];
$agent_data = $m_agent->getStoreDistrict($fields_str, [ 'a.id' => $v['agent_id'] ]);
$result[$k]['agent'] = $agent_data['name'] . '-' . $agent_data['phone'];
$result[$k]['district_store'] = $agent_data['district_name'] . '-' . $agent_data['store_name'];
}
if (isset($v['role'])) {
switch ($v['role']) {
case 1 :
$data[$k]['role_name'] = '盘方';break;
$data[$k]['role_name'] = '盘方';
break;
case 2 :
$data[$k]['role_name'] = '客方';break;
$data[$k]['role_name'] = '客方';
break;
case 3 :
$data[$k]['role_name'] = '反签';break;
$data[$k]['role_name'] = '反签';
break;
case 4 :
$data[$k]['role_name'] = '独家';break;
$data[$k]['role_name'] = '独家';
break;
case 5 :
$data[$k]['role_name'] = '合作方';break;
$data[$k]['role_name'] = '合作方';
break;
default :
$data[$k]['role_name'] = '无';
}
......@@ -84,12 +91,13 @@ class OPartialCommission extends BaseModel
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getCommissionBargainColumn($pageNo, $pageSize, $order_ = 'id desc', $fields, $where) {
public function getCommissionBargainColumn($pageNo, $pageSize, $order_ = 'id desc', $fields, $where)
{
$data = $this->alias('a')
->join('o_bargain b', 'a.bargain_id = b.id', 'left')
->join('o_order c', 'b.order_id = c.id', 'left')
->join('g_houses d', 'c.house_id = d.id', 'left')
->join('a_agents e', 'b.agent_id = e.id','left')
->join('a_agents e', 'b.agent_id = e.id', 'left')
->where($where)
->order($order_)
->limit($pageSize)
......@@ -98,22 +106,22 @@ class OPartialCommission extends BaseModel
$result = [];
$m_agent = new AAgents();
$m_agent = new AAgents();
$fields_str = 'a.id,a.name,a.phone,b.store_name,c.district_name';
foreach ($data as $k => $v) {
$result[$k]['confirm_date'] = $v['confirm_date'];
if ($v['agent_id']) {
$agent_data = $m_agent->getStoreDistrict($fields_str, ['a.id'=>$v['agent_id']]);
$result[$k]['district_store'] = $agent_data['store_name'] .'-'.$agent_data['store_name'];
$result[$k]['agent'] = $agent_data['name'].'-'.$agent_data['phone'];
$agent_data = $m_agent->getStoreDistrict($fields_str, [ 'a.id' => $v['agent_id'] ]);
$result[$k]['district_store'] = $agent_data['store_name'] . '-' . $agent_data['store_name'];
$result[$k]['agent'] = $agent_data['name'] . '-' . $agent_data['phone'];
}
$result[$k]['practical_fee'] = $v['practical_fee'];
$result[$k]['scale_fee'] = $v['scale_fee'];
$result[$k]['practical_fee'] = $v['practical_fee'];
$result[$k]['scale_fee'] = $v['scale_fee'];
$result[$k]['service_charge'] = $v['service_charge'];
$result[$k]['charity_fund'] = $v['charity_fund'];
$result[$k]['practical_fee'] = $v['practical_fee'];
$result[$k]['cash'] = $v['cash'];
$result[$k]['real_fee'] = $v['real_fee'];
$result[$k]['charity_fund'] = $v['charity_fund'];
$result[$k]['practical_fee'] = $v['practical_fee'];
$result[$k]['cash'] = $v['cash'];
$result[$k]['real_fee'] = $v['real_fee'];
}
return $result;
}
......@@ -122,12 +130,13 @@ class OPartialCommission extends BaseModel
* @param $where
* @return int|string
*/
public function getCommissionBargainListTotal($where) {
public function getCommissionBargainListTotal($where)
{
return $this->alias('a')
->join('o_bargain b', 'a.bargain_id = b.id', 'left')
->join('o_order c', 'b.order_id = c.id', 'left')
->join('g_houses d', 'c.house_id = d.id', 'left')
->join('a_agents e', 'b.agent_id = e.id','left')
->join('a_agents e', 'b.agent_id = e.id', 'left')
->where($where)
->count();
}
......@@ -138,30 +147,31 @@ class OPartialCommission extends BaseModel
* @param $data
* @return int|string
*/
public function addCommission($data) {
/* $insert_data['id'] = $data['id'];
$insert_data['bargain_id'] = $data['bargain_id']; //成交报告id
$insert_data['practical_fee'] = $data['practical_fee']; //实收佣金
$insert_data['cash'] = $data['cash']; //现金奖
$insert_data['service_charge'] = $data['service_charge']; //手续费
$insert_data['charity_fund'] = $data['charity_fund']; //慈善基金
$insert_data['real_fee'] = $data['real_fee']; //实分佣金
$insert_data['operation_id'] = $agent_id; //操作人id
$insert_data['should_commission'] = $data['should_commission']; //应分佣金
$insert_data['scale'] = $data['scale']; //分佣比例
$insert_data['role'] = $data['role']; //分佣方 1盘方 2客方 3 反签 4独家 5合作方
$insert_data['agent_id'] = $data['agent_id']; //分佣方经纪人
//确认分佣加时间 否则 只是保存分佣数据
if ($data['confirm_date']) {
$insert_data['confirm_date'] = $data['confirm_date'];
$insert_data['confirm_status'] = 1;
}
public function addCommission($data)
{
/* $insert_data['id'] = $data['id'];
$insert_data['bargain_id'] = $data['bargain_id']; //成交报告id
$insert_data['practical_fee'] = $data['practical_fee']; //实收佣金
$insert_data['cash'] = $data['cash']; //现金奖
$insert_data['service_charge'] = $data['service_charge']; //手续费
$insert_data['charity_fund'] = $data['charity_fund']; //慈善基金
$insert_data['real_fee'] = $data['real_fee']; //实分佣金
$insert_data['operation_id'] = $agent_id; //操作人id
$insert_data['should_commission'] = $data['should_commission']; //应分佣金
$insert_data['scale'] = $data['scale']; //分佣比例
$insert_data['role'] = $data['role']; //分佣方 1盘方 2客方 3 反签 4独家 5合作方
$insert_data['agent_id'] = $data['agent_id']; //分佣方经纪人
//确认分佣加时间 否则 只是保存分佣数据
if ($data['confirm_date']) {
$insert_data['confirm_date'] = $data['confirm_date'];
$insert_data['confirm_status'] = 1;
}
if (empty($insert_data['id'])) {
return $this->insert($insert_data);
} else {
return $this->update($insert_data);
}*/
if (empty($insert_data['id'])) {
return $this->insert($insert_data);
} else {
return $this->update($insert_data);
}*/
return $this->saveAll($data);
}
......@@ -175,17 +185,18 @@ class OPartialCommission extends BaseModel
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getCommissionListByBargainId($field,$params){
public function getCommissionListByBargainId($field, $params)
{
$params["a.is_del"] = 0;
$result = $this->field($field)
$result = $this->field($field)
->alias("a")
->join("a_agents b","a.agent_id=b.id","left")
->join("o_bargain c","a.bargain_id=c.id or a.bargain_id = c.father_id","left")
->join("a_agents b", "a.agent_id=b.id", "left")
->join("o_bargain c", "a.bargain_id=c.id or a.bargain_id = c.father_id", "left")
->where($params)
->order("a.create_time desc")
->select();
echo $this->getLastSql();
return $result ;
return $result;
}
......@@ -197,10 +208,72 @@ class OPartialCommission extends BaseModel
* @throws \think\db\exception\BindParamException
* @throws \think\exception\PDOException
*/
public function getBragainScale(int $bargain_id) {
public function getBragainScale(int $bargain_id)
{
$sql = 'SELECT a.bargain_id,a.scale,b.scale_fee,a.agent_id,a.role,substring_index(group_concat(a.id ORDER BY a.id DESC),",",1) AS id
FROM o_partial_commission a LEFT JOIN o_bargain b on a.bargain_id=b.id WHERE a.bargain_id = '.$bargain_id.'
and b.id= '.$bargain_id.' OR b.father_id='.$bargain_id.' GROUP BY role';
FROM o_partial_commission a LEFT JOIN o_bargain b on a.bargain_id=b.id WHERE a.bargain_id = ' . $bargain_id . '
and b.id= ' . $bargain_id . ' OR b.father_id=' . $bargain_id . ' GROUP BY role';
return $this->query($sql);
}
/**
* 分佣提成汇总表
*
* @param int $pageNo
* @param int $pageSize
* @param string $order_
* @param string $field
* @param string $params
* @param $operation_start_data
* @param $operation_end_data
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function getCommissionTotalList($pageNo = 1, $pageSize = 15, $order_ = 'a.id desc', $field = '', $params = '', $operation_start_data, $operation_end_data)
{
$data = $this->alias('a')
->field($field)
->join('o_bargain b', 'a.bargain_id = b.id', 'left')
->join('o_real_income f', 'b.id = f.bargain_id', 'left')
->join('a_agents d', 'a.agent_id = d.id', 'left')
->where($params)
->order($order_)
->limit($pageSize)
->page($pageNo)
->group('a.agent_id')
->select();
$m_agent = new AAgents();
$m_tax = new OTaxes();
foreach ($data as $k => $v) {
if (isset($v['agent_id'])) {
$district_store = $m_agent->getStoreDistrict('store_name,district_name', [ 'a.id' => $v['agent_id'] ]);
$data[$k]['district_store'] = $district_store['district_name'] . '-' . $district_store['store_name'];
//税费
$data[$k]['fee'] = $m_tax->where('operation_date', 'between time', [$operation_start_data, $operation_end_data])
->where('agent_id', $v['agent_id'])->sum('fee');
}
}
return $data;
}
/**
* @param $params
* @return int|string
*/
public function getCommissionTotalListTotal($params)
{
return $this->alias('a')
->join('o_bargain b', 'a.bargain_id = b.id', 'left')
->join('o_real_income f', 'b.id = f.bargain_id', 'left')
->join('a_agents d', 'a.agent_id = d.id', 'left')
->where($params)
->group('a.agent_id')
->count();
}
}
\ No newline at end of file
......@@ -23,4 +23,4 @@
if(!doc.addEventListener) return;
win.addEventListener(resizeEvt, recalc, false);
doc.addEventListener('DOMContentLoaded', recalc, false);
})(document, window);</script><script type=text/javascript src=./vconsole.min.js></script><script type=text/javascript>if(~location.origin.indexOf('api.tonglianjituan.com')){console.log('正式服')}else{var vConsole=new VConsole()};</script><link href=./static/css/app.65a7482b65465b468cd50d083c6b13f2.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.94d51f6620cb57f6116c.js></script><script type=text/javascript src=./static/js/app.ae212a464103491b75e1.js></script></body></html>
\ No newline at end of file
})(document, window);</script><script type=text/javascript src=./vconsole.min.js></script><script type=text/javascript>if(~location.origin.indexOf('api.tonglianjituan.com')){console.log('正式服')}else{var vConsole=new VConsole()};</script><link href=./static/css/app.2c71066ef70dbce04427e0ec71aee085.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.94d51f6620cb57f6116c.js></script><script type=text/javascript src=./static/js/app.db402c74b35141cf046c.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
{"version":3,"sources":["webpack:///webpack/bootstrap c055640458e0b8ef7c39"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","p","oe","err","console","error"],"mappings":"aACA,IAAAA,EAAAC,OAAA,aACAA,OAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAN,EAAAQ,OAAoBF,IAC5BF,EAAAJ,EAAAM,GACAG,EAAAL,IACAG,EAAAG,KAAAD,EAAAL,GAAA,IAEAK,EAAAL,GAAA,EAEA,IAAAD,KAAAF,EACAU,OAAAC,UAAAC,eAAAC,KAAAb,EAAAE,KACAY,EAAAZ,GAAAF,EAAAE,IAIA,IADAL,KAAAE,EAAAC,EAAAC,GACAK,EAAAC,QACAD,EAAAS,OAAAT,GAEA,GAAAL,EACA,IAAAI,EAAA,EAAYA,EAAAJ,EAAAM,OAA2BF,IACvCD,EAAAY,IAAAC,EAAAhB,EAAAI,IAGA,OAAAD,GAIA,IAAAc,KAGAV,GACAW,EAAA,GAIA,SAAAH,EAAAd,GAGA,GAAAgB,EAAAhB,GACA,OAAAgB,EAAAhB,GAAAkB,QAGA,IAAAC,EAAAH,EAAAhB,IACAG,EAAAH,EACAoB,GAAA,EACAF,YAUA,OANAN,EAAAZ,GAAAW,KAAAQ,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACAhB,OAAAmB,eAAAT,EAAAM,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMAX,EAAAiB,EAAA,SAAAZ,GACA,IAAAM,EAAAN,KAAAa,WACA,WAA2B,OAAAb,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAO,EAAAC,GAAsD,OAAA1B,OAAAC,UAAAC,eAAAC,KAAAsB,EAAAC,IAGtDpB,EAAAqB,EAAA,KAGArB,EAAAsB,GAAA,SAAAC,GAA8D,MAApBC,QAAAC,MAAAF,GAAoBA","file":"static/js/manifest.3ad1d5771e9b13dbdad2.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t2: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"./\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap c055640458e0b8ef7c39"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap 7befbe63d01516c8269f"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","p","oe","err","console","error"],"mappings":"aACA,IAAAA,EAAAC,OAAA,aACAA,OAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAN,EAAAQ,OAAoBF,IAC5BF,EAAAJ,EAAAM,GACAG,EAAAL,IACAG,EAAAG,KAAAD,EAAAL,GAAA,IAEAK,EAAAL,GAAA,EAEA,IAAAD,KAAAF,EACAU,OAAAC,UAAAC,eAAAC,KAAAb,EAAAE,KACAY,EAAAZ,GAAAF,EAAAE,IAIA,IADAL,KAAAE,EAAAC,EAAAC,GACAK,EAAAC,QACAD,EAAAS,OAAAT,GAEA,GAAAL,EACA,IAAAI,EAAA,EAAYA,EAAAJ,EAAAM,OAA2BF,IACvCD,EAAAY,IAAAC,EAAAhB,EAAAI,IAGA,OAAAD,GAIA,IAAAc,KAGAV,GACAW,EAAA,GAIA,SAAAH,EAAAd,GAGA,GAAAgB,EAAAhB,GACA,OAAAgB,EAAAhB,GAAAkB,QAGA,IAAAC,EAAAH,EAAAhB,IACAG,EAAAH,EACAoB,GAAA,EACAF,YAUA,OANAN,EAAAZ,GAAAW,KAAAQ,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACAhB,OAAAmB,eAAAT,EAAAM,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMAX,EAAAiB,EAAA,SAAAZ,GACA,IAAAM,EAAAN,KAAAa,WACA,WAA2B,OAAAb,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAO,EAAAC,GAAsD,OAAA1B,OAAAC,UAAAC,eAAAC,KAAAsB,EAAAC,IAGtDpB,EAAAqB,EAAA,KAGArB,EAAAsB,GAAA,SAAAC,GAA8D,MAApBC,QAAAC,MAAAF,GAAoBA","file":"static/js/manifest.3ad1d5771e9b13dbdad2.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t2: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"./\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 7befbe63d01516c8269f"],"sourceRoot":""}
\ No newline at end of file
......@@ -181,11 +181,12 @@ function loadMain(){
});
});
if(data['data']['user_info']['user_status'] == 0 || data['data']['user_info']['user_status'] == 1 || data['data']['user_info']['user_status'] == -1 ){
_markAreaObj.find('a[data-markid="'+data['data']['user_info']['user_status']+'"]').addClass('genjin-mark-active').siblings().removeClass('genjin-mark-active');
}else{
layerTipsX('状态标签返回有误');
}
//标签没有默认状态了
// if(data['data']['user_info']['user_status'] == 0 || data['data']['user_info']['user_status'] == 1 || data['data']['user_info']['user_status'] == -1 ){
// _markAreaObj.find('a[data-markid="'+data['data']['user_info']['user_status']+'"]').addClass('genjin-mark-active').siblings().removeClass('genjin-mark-active');
// }else{
// layerTipsX('状态标签返回有误');
// }
}else {
layerTipsX(data['msg']);
......@@ -324,51 +325,61 @@ function loadMain(){
}
};
$.ajax({
type: 'POST',
url: ServerHostTempC + '/broker/add_phone_follow_up',
data: _data,
timeout: 30000,
dataType: 'json',
beforeSend: function() {
_btnSave.hide();
_btnSaveTemp.css('display','block');
},
success: function(data) {
if(typeof data === 'object') {
if (data.code == 200) {
if(isCallFlag&&_isFreeFlag){
//释放
freePhone();
}else{
layer.open({
content: '提交成功',
btn: ['确定'],
yes: function(_index){
location.reload();
layer.close(_index);
}
});
};
}else {
layerTipsX(data['msg']);
};
}else{
layerTipsX('数据错误');
};
},
error: function() {
layerTipsX('error');
},
complete: function(xhr, textStatus){
_btnSaveTemp.hide();
_btnSave.css('display','block');
if(textStatus === 'timeout'){
layerTipsX('请求超时');
};
}
});
if(isCallFlag && ((_genjinMarkOBj2.attr('data-markid') == '1') || (_genjinMarkOBj2.attr('data-markid') == '4'))){
if(_isFreeFlag) {
freePhone();
};
layer.close(_index);
return false;
//如果是电话跟进,选择了没打通或者取消拨打,则关掉不进行提交
}else{
$.ajax({
type: 'POST',
url: ServerHostTempC + '/broker/add_phone_follow_up',
data: _data,
timeout: 30000,
dataType: 'json',
beforeSend: function() {
_btnSave.hide();
_btnSaveTemp.css('display','block');
},
success: function(data) {
if(typeof data === 'object') {
if (data.code == 200) {
if(isCallFlag&&_isFreeFlag){
//释放
freePhone();
}else{
layer.open({
content: '提交成功',
btn: ['确定'],
yes: function(_index){
location.reload();
layer.close(_index);
}
});
};
}else {
layerTipsX(data['msg']);
};
}else{
layerTipsX('数据错误');
};
},
error: function() {
layerTipsX('error');
},
complete: function(xhr, textStatus){
_btnSaveTemp.hide();
_btnSave.css('display','block');
if(textStatus === 'timeout'){
layerTipsX('请求超时');
};
}
});
}
});
function freePhone(obj){
......
......@@ -187,6 +187,7 @@
</script>
<style scoped>
/*注释部分*/
nav>.nav-main {
display: flex;
box-sizing: border-box;
......
......@@ -6,7 +6,7 @@
<span>{{data.name}}</span>
<span>{{data.district_name+data.store_name}}</span>
</p>
<p>ID:{{data.create_time}}</p>
<p>{{data.create_time}}</p>
</div>
<div class="flex-center">{{isreceipt?data.practical_fee:data.scale_fee}}</div>
</div>
......
......@@ -12,11 +12,10 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
event: function () {
var _doc = $(document);
agent.getDistrict(function(){
_doc.on('input', '[name=district_id]', function(){
_doc.on('input', '#district_id', function(){
var _this = $(this);
var _id = _this.val();
var _objTemp = _this.parent().next().find('select');
_objTemp.html('');//先清空
_this.next().html('');//先清空
if(_id && _id != '0'){
agent.getDistrictStoreList(_id, function(_data){
// var _str = '';
......@@ -24,12 +23,12 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
$.each(_data, function(i,item) {
_str += '<option value="'+item.id+'">'+item.store_name+'</option>';
});
_objTemp.html(_str);
_this.next().html(_str);//先清空
});
}else{
};
});
})
});
$('#search').click(function (pageNo) {
agent.getList(1);
});
......@@ -243,8 +242,11 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
params.pageNo = agent.pageNo;
params.pageSize = agent.pageSize;
params.search = $("input[name='search']").val();
params.groupname = $("input[name='groupname']").val();
params.group_name = $("input[name='groupname']").val();
params.store_name = $("input[name='store_name']").val();
//后端加入两个字段搜索
params.district_id=$("#district_id").val();
params.store_id=$("#guest_stores").val();
$.ajax({
url: '/index/AgentList',
type: 'GET',
......@@ -298,7 +300,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
$.each(data.data, function(i,item) {
str += '<option value="'+item.id+'">'+item.district_name+'</option>';
});
$('[name=district_id]').append(str);
$('#district_id').append(str);
fn && fn();
}
}
......
......@@ -21,7 +21,7 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
event: function() {
var _doc = $(document);
var _imgMaskObj = $('#img_mask_area'); //预览大图的mask
var _imgUploadLunbo = $('#xiangqing_pic_ul'); //详情页轮播图ul
_doc.on('click', 'a[href="#modal-time"]', function(e){
follow.house_id = $ (this).attr ("data-id");
e.preventDefault();
......@@ -32,6 +32,20 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
$("#search").click(function() {
follow.getList(1);
});
//点击收款图片 2.2版本
// $(".add-pic").click(function() {
// follow.getaddPicList();
// });
_doc.on('click', '.add-pic', function(){
follow.getaddPicList();
});
$("#reset").click(function() { //重置
document.getElementById("form_search").reset();
});
......@@ -109,7 +123,7 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
url: '/index/delHouseFile',
data: {
'id': _imgId,
'house_id': _id
'house_id': 3104,
},
timeout: 30000,
dataType: 'json',
......@@ -140,17 +154,55 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
}
};
});
//图片预览点击放大事件
_doc.on('click', '.img-pre-ul>li>img', function(e) {
_imgMaskObj.show().find('img').attr('src', this.src);
});
_imgMaskObj.click(function(e) {
this.style.display = 'none';
});
//图片上传 2.2版本
});
//保存上传的图片
_doc.on('click', '#saveBtn', function(e) {
var _this = $(this);
var _data={
id:3104,
};
e.preventDefault();
e.stopPropagation();
var _imgUploadLunbo = $('#xiangqing_pic_ul'); //详情页轮播图ul
var _xiangqingPicObj = _imgUploadLunbo.find('li>img');
var _urlCut = location.origin + '/resource/lib/Attachments/images/';//要截取的部分url
$.each(_xiangqingPicObj, function(i, item) {
_data['slide_show[' + i + ']'] = item.src.replace(_urlCut, '');
});
var _imgId = _this.parent().attr('data-imgid');
$.ajax({
type: 'POST',
url: '/index/houseEdit',
data: _data,
// timeout: 30000,
dataType: 'json',
beforeSend: function() {},
success: function(_data) {
if(typeof _data === 'object') {
} else {
alert('数据错误');
};
},
error: function() {
alert('enter error');
},
complete: function(xhr, textStatus){
if(textStatus === 'timeout') {
//处理超时的逻辑
alert('请求超时,请重试');
};
}
});
});
//图片上传 2.2版本
},
addphone2:function(obj){
......@@ -202,6 +254,34 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
}
});
},
//点击收款图片 调用的接口
getaddPicList: function() { //提交
var _imgUploadLunbo = $('#xiangqing_pic_ul'); //详情页轮播图ul
var _urlCut = location.origin + '/resource/lib/Attachments/images/';//要截取的部分url
_imgUploadLunbo.empty();
$.ajax({
'type': 'GET',
'url': '/index/houseEdit',
data: {
"id": 3104,
},
dataType: "json",
success: function(data) {
if(data.code == 200) {
var _data = data['data'];
for(var i in _data['slide_show']) {
_imgUploadLunbo.append('<li data-imgid="{id}"><img title="点击查看大图" src="{0}" /><a href="javascript:;" class="delet-pic-btn">删除</a></li>'.stringFormatObj({
'0': _urlCut + _data['slide_show'][i]['img_name'],
'id': _data['slide_show'][i]['id']
}));
};
// follow.getList(0);
} else {
}
}
});
},
// 导出列表
exportList: function(pageNo) {
console.log(2);
......
......@@ -592,6 +592,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
dataType: 'json',
success: function(data) {
if(data.code == 200) {
business.getList(1);
console.log(666);
}
}
......
......@@ -397,6 +397,21 @@ define (['doT', 'text!temp/user_template_tpl.html','ckfinder','ckfinderStart', '
getList: function (pageNo) {
user.pageNo = pageNo;
var params = {};
// 并列搜索
// if($("#district_id").val()!=0){
// $("#district_id2").val('0');
// $("#guest_stores2").val('');
// console.log($("#district_id2").val());
// console.log($("#guest_stores2").val());
// };
// if($("#district_id2").val()!=0){
// $("#district_id1").val('0');
// $("#guest_stores1").val('');
// console.log($("#district_id").val());
// console.log($("#guest_stores").val());
// };
// 输入 name
// params.name = $("input[name='user']").val();
......
......@@ -9,7 +9,11 @@
<td>[%= it[item]['practical_fee'] %]</td>
<td>[%= it[item]['cash'] %]</td>
<td>[%= it[item]['practical_fee'] %]</td>
<td>[%= it[item]['fee'] %]</td>
<td>
[% if (it[item]['fee']){ %]
[%= it[item]['fee'] %]
[% } %]
</td>
<td>[%= it[item]['over_fee'] %]</td>
</tr>
[% } %]
......
......@@ -13,7 +13,7 @@
<td>[%= it[item]['house_number'] %]</td>
<td>
<!--增加收款图片 2.2版本-->
<!--<a class="btn1 btn-info add-pic" href="#modal-addPic" data-toggle="modal" data-id='[%= it[item]["order_id"] %]'>收款图片</a>-->
<a class="btn1 btn-info add-pic" href="#modal-addPic" data-toggle="modal" data-id='[%= it[item]["order_id"] %]'>收款图片</a>
<a class="btn1 btn-info timeline" href="#modal-time" data-toggle="modal" data-id='[%= it[item]["order_id"] %]'>时间轴</a>
<a class="btn1 btn-info submit_edit2" href="#modal-linetime" data-toggle="modal" data-id='[%= it[item]["id"]%]' data-money='[%= it[item]["real_money"] %]'>编辑</a>
</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