推广员与合作公司只能看到自己的公司的对账记录

master
liuweiwen 5 years ago
parent 33397aceb3
commit 49e0e19cc8

@ -92,6 +92,7 @@ class PublicController extends \Think\Controller
'mobile_phone' => $promote['mobile_phone'], 'mobile_phone' => $promote['mobile_phone'],
'nickname' => $promote['nickname'], 'nickname' => $promote['nickname'],
'username' => $promote['nickname'] ?: $promote['account'], 'username' => $promote['nickname'] ?: $promote['account'],
'company_id' => $promote['company_id'],
); );
$session_name = 'cp_user_auth'; $session_name = 'cp_user_auth';
if (I('auto_login')) { if (I('auto_login')) {
@ -111,6 +112,7 @@ class PublicController extends \Think\Controller
'account' => $partner['link_phone'], 'account' => $partner['link_phone'],
'mobile_phone' => $partner['link_phone'], 'mobile_phone' => $partner['link_phone'],
'nickname' => $partner['link_man'], 'nickname' => $partner['link_man'],
'company_id' => $partner['id'],
'username' => $partner['link_man'] ?: $partner['account'], 'username' => $partner['link_man'] ?: $partner['account'],
); );
$session_name = 'cp_user_auth'; $session_name = 'cp_user_auth';

@ -32,7 +32,10 @@ class VerifyBillController extends Controller {
*/ */
public function index(){ public function index(){
$m_title = '对账单管理'; $m_title = '对账单管理';
$list_data = DM('statement')->order('create_time desc')->select(); $list_data = DM('statement')
->where(['company_id' => session('cp_user_auth.company_id')])
->order('create_time desc')
->select();
foreach ($list_data as $key => $value) { foreach ($list_data as $key => $value) {
$list_data[$key]['statement_type_str'] = $value['statement_type'] ? '工会对账单' : 'cp对账单'; $list_data[$key]['statement_type_str'] = $value['statement_type'] ? '工会对账单' : 'cp对账单';
} }

Loading…
Cancel
Save