Commit 8d357f27 authored by hujun's avatar hujun

edit

parent 99df1817
......@@ -864,7 +864,16 @@ class Finance extends Basic
$m_bargain = new OBargainModel();
if (!empty($this->params['excel']) && $this->params['excel'] == 1) {
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(c.service_charge) as service_charge,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);
$data['data']['total'] = $m_bargain->getCommissionTotalListTotal($where, $whereOr);
} 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,';
$fields .= 'd.name,d.phone,sum(c.charity_fund) as charity_fund, sum(should_commission) as should_commission';
......@@ -903,12 +912,6 @@ class Finance extends Basic
$title = ['收佣日期/开票日期','成交日期/开票日期','所属部门/门店','业务员','应分佣金(元)','手续费(元)','现金奖(元)','慈善基金(元)','实收佣金(元)','税费(元)','最终实收(元)'];
$export->exportTable('分佣提成汇总表',$excel_data, 11, '分佣提成汇总表', $title);
return ;
} else {
$fields = 'a.id,a.agent_id,sum(b.fee) as fee,sum(c.practical_fee) as practical_fee,sum(c.cash) as cash,';
$fields .= 'sum(c.service_charge) as service_charge,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);
$data['data']['total'] = $m_bargain->getCommissionTotalListTotal($where, $whereOr);
}
return $this->response($data['code'], $data['msg'], $data['data']);
......
......@@ -306,6 +306,7 @@ class OBargainModel extends Model
$save_data['audit_name'] = $data['audit_name'];
$return = 0;
$audit_level = $data['audit_level']-1;
//是否有审核记录,只做一次审核。
if (isset($audit_data['id'])) {
//第二、三审核
......@@ -315,7 +316,7 @@ class OBargainModel extends Model
}
} else {
//第一步审核
if ($data['audit_level'] === "0") {
if ($data['audit_level'] == "0") {
$save_data['audit_level'] = 0;
$return = $audit->addAudit($save_data);
}
......@@ -639,7 +640,7 @@ class OBargainModel extends Model
$data[$k]['district_store'] = $district_store['district_name'] .'-'. $district_store['store_name'];
}
$data[$k]['tax_fee'] = $m_fee->where('bargain_id', $v['id'])->sum('fee');
// $data[$k]['tax_fee'] = $m_fee->where('bargain_id', $v['id'])->sum('fee');
}
return $data;
......
......@@ -199,10 +199,9 @@ Route::group('index', [
'refundListMajordomo/:check_status' => [ 'index/Finance/refundList', [ 'method' => 'get|post' ], [ 'check_status' => 2 ] ], //退款列表-总监审核
'refundListCashier/:check_status' => [ 'index/Finance/refundList', [ 'method' => 'get|post' ], [ 'check_status' => 3 ] ], //退款列表-出纳审核
'refundOrderList' => [ 'index/Finance/refundOrderList', [ 'method' => 'get' ] ], //财务 已退款
'checkReportAttache/:check_status' => [ 'index/Finance/checkReport', [ 'method' => 'post' ], [ 'check_status' => 0 ] ], //审核成交报告-专员审核
'checkReportManager/:check_status' => [ 'index/Finance/checkReport', [ 'method' => 'post' ], [ 'check_status' => 1 ] ], //审核成交报告-经理审核
'checkReportMajordomo/:check_status' => [ 'index/Finance/checkReport', [ 'method' => 'post' ], [ 'check_status' => 2 ] ], //审核成交报告-总监审核
'checkReportCashier/:check_status' => [ 'index/Finance/checkReport', [ 'method' => 'post' ], [ 'check_status' => 3 ] ], //审核成交报告-出纳审核
'checkReportAttache/:check_status' => [ 'index/Finance/checkReport', [ 'method' => 'post' ], [ 'check_status' => 0 ] ], //审核成交报告-专员审核-第一级审核
'checkReportManager/:check_status' => [ 'index/Finance/checkReport', [ 'method' => 'post' ], [ 'check_status' => 1 ] ], //审核成交报告-经理审核-第二级审核
'checkReportMajordomo/:check_status' => [ 'index/Finance/checkReport', [ 'method' => 'post' ], [ 'check_status' => 2 ] ], //审核成交报告-总监审核-第三级审核
'overRuleAttache/:check_status' => [ 'index/Finance/overRule', [ 'method' => 'post' ], [ 'check_status' => 0 ] ], //退款审核-驳回-专员审核
'overRuleManager/:check_status' => [ 'index/Finance/overRule', [ 'method' => 'post' ], [ 'check_status' => 1 ] ], //退款审核-驳回-经理审核
'overRuleMajordomo/:check_status' => [ 'index/Finance/overRule', [ 'method' => 'post' ], [ 'check_status' => 2 ] ], //退款审核-驳回-总监审核
......
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