增加财务相关模块
This commit is contained in:
parent
b9b72a967a
commit
0f6bc586d2
51
app/admin/controller/accounts/Accounts.php
Normal file
51
app/admin/controller/accounts/Accounts.php
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\admin\controller\accounts;
|
||||||
|
|
||||||
|
use app\admin\BaseController;
|
||||||
|
use think\exception\ValidateException;
|
||||||
|
use think\facade\Db;
|
||||||
|
use app\admin\controller\nk\Article;
|
||||||
|
use think\facade\View;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 财务相关控制器
|
||||||
|
*
|
||||||
|
* @icon fa fa-circle-o
|
||||||
|
*/
|
||||||
|
class Accounts extends BaseController
|
||||||
|
{
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->adminInfo = get_login_admin();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提现管理
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function extract()
|
||||||
|
{
|
||||||
|
$total=0;
|
||||||
|
$list=[];
|
||||||
|
$brokerage_price=0;
|
||||||
|
$find=Db::table('fa_szxc_information_useraddress')->where('user_id',$this->adminInfo['id'])->value('street_id');
|
||||||
|
if ($find!=0) {
|
||||||
|
$brokerage_price=Db::connect('shop')->name('store_order_region_commission')->where('street_id',$find)->sum('commission_rate');
|
||||||
|
}
|
||||||
|
if (request()->isAjax()) {
|
||||||
|
$params= get_params();
|
||||||
|
if ($find!=0){
|
||||||
|
$list=Db::connect('shop')->name('store_order_region_commission')->where('street_id',$find)
|
||||||
|
->page($params['page'])
|
||||||
|
->limit($params['limit'])
|
||||||
|
->select();
|
||||||
|
}
|
||||||
|
$result = ['total' => $total, 'data' => $list];
|
||||||
|
return table_assign(0, '', $result);
|
||||||
|
}
|
||||||
|
View::assign('brokerage_price', $brokerage_price);
|
||||||
|
|
||||||
|
return view();
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user