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; //收佣日期
......
This diff is collapsed.
......@@ -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">
......
This diff is collapsed.
......@@ -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 diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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