|
|
|
@ -11,6 +11,11 @@ use User\Api\UserApi as UserApi;
|
|
|
|
|
class SpendController extends ThinkController
|
|
|
|
|
{
|
|
|
|
|
const model_name = 'Spend';
|
|
|
|
|
const IsCheckStr=[
|
|
|
|
|
"1"=>"是",
|
|
|
|
|
"2"=>"否"
|
|
|
|
|
];
|
|
|
|
|
public $OpAuthList;
|
|
|
|
|
|
|
|
|
|
public function lists()
|
|
|
|
|
{
|
|
|
|
@ -24,6 +29,10 @@ class SpendController extends ThinkController
|
|
|
|
|
unset($_REQUEST['timestart']);
|
|
|
|
|
unset($_REQUEST['timeend']);
|
|
|
|
|
|
|
|
|
|
if (isset($_REQUEST['is_check'])) {
|
|
|
|
|
$map['is_check'] = (int)($_REQUEST['is_check']);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (isset($_REQUEST['user_account'])) {
|
|
|
|
|
$map['user_account'] = array('like', trim($_REQUEST['user_account']));
|
|
|
|
|
unset($_REQUEST['user_account']);
|
|
|
|
@ -142,13 +151,13 @@ class SpendController extends ThinkController
|
|
|
|
|
$this->assign('commonset', M('Kuaijieicon')->where(['url' => 'Spend/lists', 'status' => 1])->find());
|
|
|
|
|
|
|
|
|
|
$data = D(self::model_name)->lists($_GET["p"], $map, $order);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$adminUsernameList = getAdminUsernameList(array_column($data['data'], 'market_admin_id'));
|
|
|
|
|
foreach ($data['data'] as $key=>&$value ) {
|
|
|
|
|
($value['promote_account']=='官方渠道')?($value['promote_account']=C('OFFICIEL_CHANNEL')):'';
|
|
|
|
|
$value['market_admin_username'] = $adminUsernameList[$value['market_admin_id']] ?? '无';
|
|
|
|
|
$value['is_check_str'] = self::IsCheckStr[$value['is_check']];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$this->assign('showMarketAdmin', session('user_auth')['show_market_admin']);
|
|
|
|
|
$this->assign('showPromote', session('user_auth')['show_promote']);
|
|
|
|
|
$this->assign('isMarketAdmin', $isMarketAdmin);
|
|
|
|
@ -159,8 +168,33 @@ class SpendController extends ThinkController
|
|
|
|
|
$this->assign('_page', $data['page']);
|
|
|
|
|
$show_data_power = (is_administrator()|| session('user_auth')['show_data']);
|
|
|
|
|
$this->assign('show_data_power', $show_data_power);
|
|
|
|
|
|
|
|
|
|
if(!IS_ROOT){
|
|
|
|
|
$this->OpAuthList= getModuleControllerAuth();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$this->assign('menubtn',$this->menuAuth());
|
|
|
|
|
$this->display();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected function menuAuth()
|
|
|
|
|
{
|
|
|
|
|
$mentBtn = [
|
|
|
|
|
"addStatement"=>"<a class='butn' id='addStatement'>参与结算</a>",
|
|
|
|
|
"removeStatement"=>"<a class='butn' id='removeStatement' style='background-color: red;'>移出结算</a>",
|
|
|
|
|
];
|
|
|
|
|
$resarr = [];
|
|
|
|
|
foreach ($mentBtn as $k => $v) {
|
|
|
|
|
if(IS_ROOT){
|
|
|
|
|
$resarr[] = $v;
|
|
|
|
|
}else{
|
|
|
|
|
if(in_array($k,$this->OpAuthList)){
|
|
|
|
|
$resarr[] = $v;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return $resarr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 充值补单功能
|
|
|
|
|