提交1
This commit is contained in:
parent
4056810d0e
commit
d1795b0e12
67
app/admin/controller/nk/Merchant.php
Normal file
67
app/admin/controller/nk/Merchant.php
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\admin\controller\nk;
|
||||||
|
|
||||||
|
use app\admin\BaseController;
|
||||||
|
use think\facade\Db;
|
||||||
|
use think\facade\View;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 区域订单手续费(佣金)管理
|
||||||
|
*
|
||||||
|
* @icon fa fa-circle-o
|
||||||
|
*/
|
||||||
|
class Merchant extends BaseController
|
||||||
|
{
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->adminInfo = get_login_admin();
|
||||||
|
$this->url=[
|
||||||
|
'/admin/nk.merchant/index',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 查看
|
||||||
|
*/
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$total=0;
|
||||||
|
$list=[];
|
||||||
|
$brokerage_price=0;
|
||||||
|
$find=Db::table('fa_szxc_information_useraddress')->where('user_id',$this->adminInfo['id'])->value('street_id');
|
||||||
|
if (request()->isAjax()) {
|
||||||
|
$params= get_params();
|
||||||
|
if ($find!=0){
|
||||||
|
$total=Db::connect('shop')->name('merchant_address')->where('street_id',$find)
|
||||||
|
->where('status',1)->count();
|
||||||
|
$merchant_id=Db::connect('shop')->name('merchant_address')->where('street_id',$find)
|
||||||
|
->where('status',1)
|
||||||
|
->page($params['page'])
|
||||||
|
->limit($params['limit'])
|
||||||
|
->field('mer_id')->select();
|
||||||
|
$arr=[];
|
||||||
|
foreach ($merchant_id as $k=>$v){
|
||||||
|
$arr[]=$v['mer_id'];
|
||||||
|
}
|
||||||
|
$list=Db::connect('shop')->name('merchant')->where('mer_id','in',$arr)->select();
|
||||||
|
}
|
||||||
|
$result = ['total' => $total, 'data' => $list];
|
||||||
|
return table_assign(0, '', $result);
|
||||||
|
}
|
||||||
|
View::assign('brokerage_price', $brokerage_price);
|
||||||
|
|
||||||
|
return view('',['url'=>$this->url]);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 查看信息
|
||||||
|
*/
|
||||||
|
public function read()
|
||||||
|
{
|
||||||
|
$params = get_params();
|
||||||
|
|
||||||
|
return view('',['url'=>$this->url]);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
62
app/admin/controller/nk/RegionCommission.php
Normal file
62
app/admin/controller/nk/RegionCommission.php
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\admin\controller\nk;
|
||||||
|
|
||||||
|
use app\admin\BaseController;
|
||||||
|
use think\facade\Db;
|
||||||
|
use think\facade\View;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 区域订单手续费(佣金)管理
|
||||||
|
*
|
||||||
|
* @icon fa fa-circle-o
|
||||||
|
*/
|
||||||
|
class RegionCommission extends BaseController
|
||||||
|
{
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->adminInfo = get_login_admin();
|
||||||
|
$this->url=[
|
||||||
|
'/admin/nk.regioncommission/index',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 查看
|
||||||
|
*/
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$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('',['url'=>$this->url]);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 查看信息
|
||||||
|
*/
|
||||||
|
public function read()
|
||||||
|
{
|
||||||
|
$params = get_params();
|
||||||
|
|
||||||
|
return view('',['url'=>$this->url]);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
65
app/admin/controller/nk/Spread.php
Normal file
65
app/admin/controller/nk/Spread.php
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\admin\controller\nk;
|
||||||
|
|
||||||
|
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 Spread extends BaseController
|
||||||
|
{
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->adminInfo = get_login_admin();
|
||||||
|
$this->category_id=309;
|
||||||
|
$this->url=[
|
||||||
|
'/admin/nk.spread/index',
|
||||||
|
'/admin/nk.spread/read',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 查看
|
||||||
|
*/
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$nk_user=Db::connect('shop')->name('nk_user')->where('n_user_id',$this->adminInfo['id'])->value('user_id');
|
||||||
|
$total=0;
|
||||||
|
$list=[];
|
||||||
|
$brokerage_price=Db::connect('shop')->name('user')->where('uid',$nk_user)->value('brokerage_price');
|
||||||
|
|
||||||
|
if (request()->isAjax()) {
|
||||||
|
$params= get_params();
|
||||||
|
if ($nk_user!=0){
|
||||||
|
$list=Db::connect('shop')->name('store_order')->where('spread_uid',$nk_user)
|
||||||
|
->where('status',3)
|
||||||
|
->field('uid,order_sn,pay_time,extension_one,extension_two,is_selfbuy')
|
||||||
|
->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('',['url'=>$this->url]);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 查看信息
|
||||||
|
*/
|
||||||
|
public function read()
|
||||||
|
{
|
||||||
|
$params = get_params();
|
||||||
|
|
||||||
|
return view('',['url'=>$this->url]);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
90
app/admin/view/nk/merchant/index.html
Normal file
90
app/admin/view/nk/merchant/index.html
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
{extend name="common/base"/}
|
||||||
|
<!-- 主体 -->
|
||||||
|
{block name="body"}
|
||||||
|
<style>
|
||||||
|
.sm-st {
|
||||||
|
background: #fff;
|
||||||
|
padding: 20px;
|
||||||
|
border-radius: 3px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
box-shadow: 0 1px 0px rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sm-st-icon {
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
display: inline-block;
|
||||||
|
line-height: 60px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 30px;
|
||||||
|
background: #eee;
|
||||||
|
border-radius: 5px;
|
||||||
|
float: left;
|
||||||
|
margin-right: 10px;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sm-st-info {
|
||||||
|
font-size: 12px;
|
||||||
|
padding-top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sm-st-info span {
|
||||||
|
display: block;
|
||||||
|
font-size: 24px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.col-sm-2{
|
||||||
|
width: 16%;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
.panel{
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script type="text/html" id="barDemo">
|
||||||
|
<div class="layui-btn-group">
|
||||||
|
<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="read">查看</a>
|
||||||
|
{/if}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{/block}
|
||||||
|
<!-- /主体 -->
|
||||||
|
|
||||||
|
<!-- 脚本 -->
|
||||||
|
{block name="script"}
|
||||||
|
<script>
|
||||||
|
const moduleInit = ['tool'];
|
||||||
|
function gouguInit() {
|
||||||
|
var table = layui.table,tool = layui.tool, form = layui.form;
|
||||||
|
layui.pageTable = table.render({
|
||||||
|
elem: '#article',
|
||||||
|
title: '文章表列表',
|
||||||
|
toolbar: '#toolbarDemo',
|
||||||
|
url: '{$url[0]}',
|
||||||
|
page: true,
|
||||||
|
limit: 20,
|
||||||
|
cellMinWidth: 300,
|
||||||
|
cols: [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
fixed: 'left',
|
||||||
|
field: 'id',
|
||||||
|
title: '编号',
|
||||||
|
align: 'center',
|
||||||
|
},{
|
||||||
|
field: 'order_sn',
|
||||||
|
title: '订单号',
|
||||||
|
},{
|
||||||
|
field: 'commission_rate',
|
||||||
|
title: '订单手机费',
|
||||||
|
align: 'center',
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
{/block}
|
||||||
|
<!-- /脚本 -->
|
104
app/admin/view/nk/regioncommission/index.html
Normal file
104
app/admin/view/nk/regioncommission/index.html
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
{extend name="common/base"/}
|
||||||
|
<!-- 主体 -->
|
||||||
|
{block name="body"}
|
||||||
|
<style>
|
||||||
|
.sm-st {
|
||||||
|
background: #fff;
|
||||||
|
padding: 20px;
|
||||||
|
border-radius: 3px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
box-shadow: 0 1px 0px rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sm-st-icon {
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
display: inline-block;
|
||||||
|
line-height: 60px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 30px;
|
||||||
|
background: #eee;
|
||||||
|
border-radius: 5px;
|
||||||
|
float: left;
|
||||||
|
margin-right: 10px;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sm-st-info {
|
||||||
|
font-size: 12px;
|
||||||
|
padding-top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sm-st-info span {
|
||||||
|
display: block;
|
||||||
|
font-size: 24px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.col-sm-2{
|
||||||
|
width: 16%;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
.panel{
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div class="p-3 panel">
|
||||||
|
<div class="panel" id="search_box">
|
||||||
|
<div style="text-align: center;">
|
||||||
|
<div class="sm-st clearfix">
|
||||||
|
<div class="sm-st-info">
|
||||||
|
<span id="old_num">{$brokerage_price}</span>
|
||||||
|
总佣金
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<table class="layui-hide" id="article" lay-filter="article"></table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type="text/html" id="barDemo">
|
||||||
|
<div class="layui-btn-group">
|
||||||
|
<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="read">查看</a>
|
||||||
|
{/if}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{/block}
|
||||||
|
<!-- /主体 -->
|
||||||
|
|
||||||
|
<!-- 脚本 -->
|
||||||
|
{block name="script"}
|
||||||
|
<script>
|
||||||
|
const moduleInit = ['tool'];
|
||||||
|
function gouguInit() {
|
||||||
|
var table = layui.table,tool = layui.tool, form = layui.form;
|
||||||
|
layui.pageTable = table.render({
|
||||||
|
elem: '#article',
|
||||||
|
title: '文章表列表',
|
||||||
|
toolbar: '#toolbarDemo',
|
||||||
|
url: '{$url[0]}',
|
||||||
|
page: true,
|
||||||
|
limit: 20,
|
||||||
|
cellMinWidth: 300,
|
||||||
|
cols: [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
fixed: 'left',
|
||||||
|
field: 'id',
|
||||||
|
title: '编号',
|
||||||
|
align: 'center',
|
||||||
|
},{
|
||||||
|
field: 'order_sn',
|
||||||
|
title: '订单号',
|
||||||
|
},{
|
||||||
|
field: 'commission_rate',
|
||||||
|
title: '订单手机费',
|
||||||
|
align: 'center',
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
{/block}
|
||||||
|
<!-- /脚本 -->
|
131
app/admin/view/nk/spread/index.html
Normal file
131
app/admin/view/nk/spread/index.html
Normal file
@ -0,0 +1,131 @@
|
|||||||
|
{extend name="common/base"/}
|
||||||
|
<!-- 主体 -->
|
||||||
|
{block name="body"}
|
||||||
|
<style>
|
||||||
|
.sm-st {
|
||||||
|
background: #fff;
|
||||||
|
padding: 20px;
|
||||||
|
border-radius: 3px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
box-shadow: 0 1px 0px rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
.sm-st-icon {
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
display: inline-block;
|
||||||
|
line-height: 60px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 30px;
|
||||||
|
background: #eee;
|
||||||
|
border-radius: 5px;
|
||||||
|
float: left;
|
||||||
|
margin-right: 10px;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sm-st-info {
|
||||||
|
font-size: 12px;
|
||||||
|
padding-top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sm-st-info span {
|
||||||
|
display: block;
|
||||||
|
font-size: 24px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.col-sm-2{
|
||||||
|
width: 16%;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
.panel{
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div class="p-3 panel">
|
||||||
|
<div class="panel" id="search_box">
|
||||||
|
<div style="text-align: center;">
|
||||||
|
<div class="sm-st clearfix">
|
||||||
|
<div class="sm-st-info">
|
||||||
|
<span id="old_num">{$brokerage_price}</span>
|
||||||
|
总佣金
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<table class="layui-hide" id="article" lay-filter="article"></table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type="text/html" id="barDemo">
|
||||||
|
<div class="layui-btn-group">
|
||||||
|
<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="read">查看</a>
|
||||||
|
{/if}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{/block}
|
||||||
|
<!-- /主体 -->
|
||||||
|
|
||||||
|
<!-- 脚本 -->
|
||||||
|
{block name="script"}
|
||||||
|
<script>
|
||||||
|
const moduleInit = ['tool'];
|
||||||
|
function gouguInit() {
|
||||||
|
var table = layui.table,tool = layui.tool, form = layui.form;
|
||||||
|
layui.pageTable = table.render({
|
||||||
|
elem: '#article',
|
||||||
|
title: '文章表列表',
|
||||||
|
toolbar: '#toolbarDemo',
|
||||||
|
url: '{$url[0]}',
|
||||||
|
page: true,
|
||||||
|
limit: 20,
|
||||||
|
cellMinWidth: 300,
|
||||||
|
cols: [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
fixed: 'left',
|
||||||
|
field: 'id',
|
||||||
|
title: '编号',
|
||||||
|
align: 'center',
|
||||||
|
},{
|
||||||
|
field: 'order_sn',
|
||||||
|
title: '订单号',
|
||||||
|
},{
|
||||||
|
field: 'extension_one',
|
||||||
|
title: '一级佣金',
|
||||||
|
align: 'center',
|
||||||
|
},{
|
||||||
|
field: 'extension_two',
|
||||||
|
title: '一级佣金',
|
||||||
|
align: 'center',
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
});
|
||||||
|
//监听表格行工具事件
|
||||||
|
table.on('tool(article)', function(obj) {
|
||||||
|
var data = obj.data;
|
||||||
|
if (obj.event === 'read') {
|
||||||
|
tool.side('{$url[1]}?id='+obj.data.id);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
//监听搜索提交
|
||||||
|
form.on('submit(searchform)', function(data) {
|
||||||
|
layui.pageTable.reload({
|
||||||
|
where: {
|
||||||
|
keywords: data.field.keywords,
|
||||||
|
cate_id: data.field.cate_id,
|
||||||
|
phone:data.field.phone
|
||||||
|
},
|
||||||
|
page: {
|
||||||
|
curr: 1
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
{/block}
|
||||||
|
<!-- /脚本 -->
|
@ -52,6 +52,7 @@ abstract class BaseController
|
|||||||
$this->app = $app;
|
$this->app = $app;
|
||||||
$this->request = $this->app->request;
|
$this->request = $this->app->request;
|
||||||
// 控制器初始化
|
// 控制器初始化
|
||||||
|
return redirect('/admin');
|
||||||
$this->initialize();
|
$this->initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,7 +16,6 @@ class Index extends BaseController
|
|||||||
{
|
{
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
return redirect('/admin');
|
|
||||||
add_user_log('view', '首页');
|
add_user_log('view', '首页');
|
||||||
$count = \think\facade\Db::name('UserLog')->where(array('type' => 'down'))->count();
|
$count = \think\facade\Db::name('UserLog')->where(array('type' => 'down'))->count();
|
||||||
return View('',['count'=>$count]);
|
return View('',['count'=>$count]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user