Merge branch 'master' of https://gitee.com/luzhou-lihai-agriculture/nk-lihaink-cn
This commit is contained in:
commit
c83b0ff5cf
@ -30,7 +30,7 @@ class Admin extends BaseController
|
||||
$where[] = ['status','>=',0];
|
||||
$rows = empty($param['limit']) ? get_config('app.page_size') : $param['limit'];
|
||||
$admin = AdminList::where($where)
|
||||
->order('create_time asc')
|
||||
->order('id desc')
|
||||
->paginate($rows, false, ['query' => $param])
|
||||
->each(function ($item, $key) {
|
||||
$groupId = Db::name('AdminGroupAccess')->where(['uid' => $item->id])->column('group_id');
|
||||
|
@ -19,6 +19,7 @@ class Merchant extends BaseController
|
||||
$this->adminInfo = get_login_admin();
|
||||
$this->url=[
|
||||
'/admin/nk.merchant/index',
|
||||
'/admin/nk.merchant/read',
|
||||
];
|
||||
}
|
||||
/**
|
||||
@ -44,13 +45,11 @@ class Merchant extends BaseController
|
||||
foreach ($merchant_id as $k=>$v){
|
||||
$arr[]=$v['mer_id'];
|
||||
}
|
||||
$list=Db::connect('shop')->name('merchant')->where('mer_id','in',$arr)->select();
|
||||
$list=Db::connect('shop')->name('merchant')->where('mer_id','in',$arr)->field('mer_id,mer_name,real_name,mark,create_time')->select();
|
||||
}
|
||||
$result = ['total' => $total, 'data' => $list];
|
||||
return table_assign(0, '', $result);
|
||||
}
|
||||
View::assign('brokerage_price', $brokerage_price);
|
||||
|
||||
return view('',['url'=>$this->url]);
|
||||
}
|
||||
/**
|
||||
@ -59,8 +58,18 @@ class Merchant extends BaseController
|
||||
public function read()
|
||||
{
|
||||
$params = get_params();
|
||||
|
||||
return view('',['url'=>$this->url]);
|
||||
$find=Db::connect('shop')->name('merchant')->where('mer_id',$params['id'])
|
||||
->withAttr('is_trader',function ($value,$data){
|
||||
return $value==1?'自营':'非自营';
|
||||
})
|
||||
->withAttr('category_id',function ($value,$data){
|
||||
return Db::connect('shop')->name('merchant_category')->where('merchant_category_id ',$value)->value('category_name');
|
||||
})
|
||||
->withAttr('type_id',function ($value,$data){
|
||||
return Db::connect('shop')->name('merchant_type')->where('mer_type_id ',$value)->value('type_name');
|
||||
})
|
||||
->find();
|
||||
return view('',['url'=>$this->url,'read'=>$find]);
|
||||
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,11 @@
|
||||
title: 'ID号',
|
||||
align: 'center',
|
||||
width: 80
|
||||
}, {
|
||||
},{
|
||||
field: 'user_id',
|
||||
title: '登录账号',
|
||||
width: 120
|
||||
}, {
|
||||
field: 'username',
|
||||
title: '登录账号',
|
||||
width: 120
|
||||
|
@ -1,51 +1,22 @@
|
||||
{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;
|
||||
}
|
||||
<div class="p-3">
|
||||
|
||||
<table class="layui-hide" id="article" lay-filter="article"></table>
|
||||
</div>
|
||||
|
||||
<script type="text/html" id="status">
|
||||
<i class="layui-icon {{# if(d.status == 1){ }}layui-icon-ok{{# } else { }}layui-icon-close{{# } }}"></i>
|
||||
</script>
|
||||
<script type="text/html" id="is_home">
|
||||
<i class="layui-icon {{# if(d.is_home == 1){ }}layui-icon-ok{{# } else { }}layui-icon-close{{# } }}"></i>
|
||||
</script>
|
||||
|
||||
.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}
|
||||
<div class="layui-btn-group"><a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="read">查看</a></div>
|
||||
</script>
|
||||
|
||||
{/block}
|
||||
@ -59,7 +30,7 @@
|
||||
var table = layui.table,tool = layui.tool, form = layui.form;
|
||||
layui.pageTable = table.render({
|
||||
elem: '#article',
|
||||
title: '文章表列表',
|
||||
title: '列表',
|
||||
toolbar: '#toolbarDemo',
|
||||
url: '{$url[0]}',
|
||||
page: true,
|
||||
@ -69,20 +40,40 @@
|
||||
[
|
||||
{
|
||||
fixed: 'left',
|
||||
field: 'id',
|
||||
field: 'mer_id',
|
||||
title: '编号',
|
||||
align: 'center',
|
||||
},{
|
||||
field: 'order_sn',
|
||||
title: '订单号',
|
||||
},{
|
||||
field: 'commission_rate',
|
||||
title: '订单手机费',
|
||||
field: 'mer_name',
|
||||
title: '商户名称',
|
||||
align: 'center',
|
||||
},{
|
||||
field: 'real_name',
|
||||
title: '商户姓名',
|
||||
align: 'center',
|
||||
},{
|
||||
field: 'create_time',
|
||||
title: '添加时间',
|
||||
align: 'center',
|
||||
},{
|
||||
fixed: 'right',
|
||||
field: 'right',
|
||||
title: '操作',
|
||||
toolbar: '#barDemo',
|
||||
align: 'center'
|
||||
}
|
||||
]
|
||||
]
|
||||
});
|
||||
//监听表格行工具事件
|
||||
table.on('tool(article)', function(obj) {
|
||||
var data = obj.data;
|
||||
if (obj.event === 'read') {
|
||||
tool.side('{$url[1]}?id='+obj.data.mer_id);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
|
52
app/admin/view/nk/merchant/read.html
Normal file
52
app/admin/view/nk/merchant/read.html
Normal file
@ -0,0 +1,52 @@
|
||||
{extend name="common/base"/}
|
||||
{block name="style"}
|
||||
<style>
|
||||
.content-article img {
|
||||
max-width: 88% !important;
|
||||
height: auto !important;
|
||||
margin: 6px 0 !important;
|
||||
border-radius: 4px;
|
||||
}
|
||||
</style>
|
||||
{/block}
|
||||
<!-- 主体 -->
|
||||
{block name="body"}
|
||||
<div class="layui-form p-4">
|
||||
<h3 class="pb-3">用户信息</h3>
|
||||
<div class="layui-tab layui-tab-card">
|
||||
<div class="layui-tab-content">
|
||||
<div class="layui-tab-item layui-show">
|
||||
<table class="layui-table layui-table-form" id="test1">
|
||||
<tr>
|
||||
<td class="layui-td-gray">商户名称</td>
|
||||
<td>{$read.mer_name}</td>
|
||||
<td class="layui-td-gray">店铺类型</td>
|
||||
<td>
|
||||
{$read.type_id}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">商户分类</td>
|
||||
<td>
|
||||
{$read.category_id|default='无'}
|
||||
</td>
|
||||
<td class="layui-td-gray">商户类别</td>
|
||||
<td>
|
||||
{$read.is_trader}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="layui-td-gray">商户负责人姓名</td>
|
||||
<td>{$read.real_name}</td>
|
||||
<td class="layui-td-gray">商户负责人手机号</td>
|
||||
<td>
|
||||
{$read.mer_phone}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
<!-- /主体 -->
|
@ -137,7 +137,6 @@
|
||||
url: '{$url[0]}',
|
||||
page: true,
|
||||
limit: 20,
|
||||
cellMinWidth: 300,
|
||||
cols: [
|
||||
[
|
||||
{
|
||||
|
@ -160,8 +160,6 @@
|
||||
<tr>
|
||||
<td class="layui-td-gray">养殖物</td>
|
||||
<td>{$vo.name}</td>
|
||||
<td class="layui-td-gray">数量</td>
|
||||
<td>{$vo.num}</td>
|
||||
<td class="layui-td-gray">面积</td>
|
||||
<td>{$vo.mianji}</td>
|
||||
</tr>
|
||||
|
@ -41,10 +41,10 @@
|
||||
<td>
|
||||
<div class="layui-upload">
|
||||
<button type="button" class="layui-btn layui-btn-sm" id="upload_btn_thumb">
|
||||
上传缩略图(尺寸:640x360)
|
||||
上传缩略图(尺寸:428x270)
|
||||
</button>
|
||||
<div class="layui-upload-list" id="upload_box_thumb"
|
||||
style="width: 120px; height:66px; overflow: hidden;">
|
||||
style="width: 428px; height:270px; overflow: hidden;">
|
||||
<img src=""
|
||||
onerror="javascript:this.src='{__GOUGU__}/gougu/images/nonepic600x360.jpg';this.onerror=null;"
|
||||
width="100" style="max-width: 100%; height:66px;"/>
|
||||
|
@ -41,10 +41,10 @@
|
||||
<td>
|
||||
<div class="layui-upload">
|
||||
<button type="button" class="layui-btn layui-btn-sm" id="upload_btn_thumb">
|
||||
上传缩略图(尺寸:640x360)
|
||||
上传缩略图(尺寸:428x270)
|
||||
</button>
|
||||
<div class="layui-upload-list" id="upload_box_thumb"
|
||||
style="width: 120px; height:66px; overflow: hidden;">
|
||||
style="width: 428px; height:270px; overflow: hidden;">
|
||||
<img src="{$detail.images}"
|
||||
onerror="javascript:this.src='{__GOUGU__}/gougu/images/nonepic600x360.jpg';this.onerror=null;"
|
||||
width="100" style="max-width: 100%; height:66px;"/>
|
||||
|
@ -33,7 +33,7 @@
|
||||
<div class="layui-upload">
|
||||
|
||||
<div class="layui-upload-list" id="upload_box_thumb"
|
||||
style="width: 120px; height:66px; overflow: hidden;">
|
||||
style="width: 428px; height:270px; overflow: hidden;">
|
||||
<img src="{$detail.images}"
|
||||
width="100" style="max-width: 100%; height:66px;"/>
|
||||
</div>
|
||||
|
@ -52,8 +52,8 @@ abstract class BaseController
|
||||
$this->app = $app;
|
||||
$this->request = $this->app->request;
|
||||
// 控制器初始化
|
||||
return redirect('/admin');
|
||||
$this->initialize();
|
||||
return $this->redirectTo('/admin');
|
||||
// $this->initialize();
|
||||
}
|
||||
|
||||
// 初始化
|
||||
|
Loading…
x
Reference in New Issue
Block a user