Commit 14fd37e0 authored by clone's avatar clone

Merge branch 'test'

parents 4669ff42 4002251f
This diff is collapsed.
......@@ -207,7 +207,7 @@
<label for="inputEmail3" class="col-sm-3 control-label">标题:</label>
<div class="col-sm-9">
<input type="text" class="form-control btn6" name="user_name" id="announcement_title" placeholder="请输入标题">
<span class="use-span text-danger">20字以内,显示在首页列表)</span>
<span class="use-span text-danger">50字以内,显示在首页列表)</span>
</div>
</div>
......
......@@ -236,7 +236,8 @@ class OPartialCommission extends BaseModel
$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('o_bargain e', 'b.father_id = e.id or b.id=e.id and e.father_id=0', 'left')
->join('o_real_income f', 'e.id = f.bargain_id', 'left')
->join('a_agents d', 'a.agent_id = d.id', 'left')
->where($params)
->order($order_)
......@@ -254,17 +255,29 @@ class OPartialCommission extends BaseModel
$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])
$data[$k]['fee'] = $m_tax->where('operation_date', 'between time', [ $operation_start_data, $operation_end_data ])
->where('agent_id', $v['agent_id'])->sum('fee');
//去除多次应分佣金
$should_commission = $this->where('confirm_date', 'between time', [$operation_start_data, $operation_end_data])
$should_commission = $this->where('confirm_date', 'between time', [ $operation_start_data, $operation_end_data ])
->where('agent_id', $v['agent_id'])->group('bargain_id')->column('should_commission');
$data[$k]['should_commission'] = 0;
foreach ($should_commission as $kk => $vv) {
$data[$k]['should_commission'] += $vv;
}
$field_sum = 'sum(practical_fee) as practical_fee,sum(cash) as cash,sum(real_fee) as real_fee,sum(service_charge) as service_charge,
sum(charity_fund) as charity_fund';
//应分佣金
$partial_commission = $this->field($field_sum)->where('confirm_date', 'between time', [ $operation_start_data, $operation_end_data ])
->where('agent_id', $v['agent_id'])->find();
$data[$k]['practical_fee'] = $partial_commission['practical_fee'];
$data[$k]['cash'] = $partial_commission['cash'];
$data[$k]['real_fee'] = $partial_commission['real_fee'];
$data[$k]['service_charge'] = $partial_commission['service_charge'];
$data[$k]['charity_fund'] = $partial_commission['charity_fund'];
}
}
......
......@@ -319,21 +319,21 @@ define (['doT', 'text!temp/notice_template_tpl.html','ckfinder','ckfinderStart',
$("#announcement_title").focus();
return ;
}
if (params.title.length > 20) {
alert('标题字数20以内');
$("#announcement_title").focus();
return ;
}
// if (params.title.length > 20) {
// alert('标题字数20以内');
// $("#announcement_title").focus();
// return ;
// }
if (params.content == '') {
alert('内容不能为空');
$("#announcement_content").focus();
return ;
}
if (params.content.length > 250) {
alert('公告内容字数250以内');
$("#announcement_content").focus();
return ;
}
// if (params.content.length > 250) {
// alert('公告内容字数250以内');
// $("#announcement_content").focus();
// return ;
// }
$.ajax ({
url: '/index/addNotice',
type: 'POST',
......
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