作者 刘朕
1 个管道 的构建 通过 耗费 1 秒

合并分支 'Branch_liuzhen' 到 'master'

商品留言调试



查看合并请求 !271
... ... @@ -35,7 +35,7 @@ class GoodsMsg extends Backend
/**
* 查看
*/
public function index()
public function index($ids = null)
{
//当前是否为关联查询
$this->relationSearch = true;
... ... @@ -48,15 +48,20 @@ class GoodsMsg extends Backend
{
return $this->selectpage();
}
$where_g = [
'goods_id' => $ids
];
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
$total = $this->model
->with(['user'])
->where($where_g)
->where($where)
->order($sort, $order)
->count();
$list = $this->model
->with(['user'])
->where($where_g)
->where($where)
->order($sort, $order)
->limit($offset, $limit)
... ... @@ -71,6 +76,7 @@ class GoodsMsg extends Backend
return json($result);
}
$this->assignconfig('ids',$ids);
return $this->view->fetch();
}
}
... ...
... ... @@ -7,18 +7,18 @@
<div class="widget-body no-padding">
<div id="toolbar" class="toolbar">
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
<!-- <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('goods_msg/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>-->
<!-- <a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('goods_msg/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>-->
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('goods_msg/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('goods_msg/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('goods_msg/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
<!-- <a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('goods_msg/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>-->
<a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('goods_msg/import')?'':'hide'}" title="{:__('Import')}" id="btn-import-file" data-url="ajax/upload" data-mimetype="csv,xls,xlsx" data-multiple="false"><i class="fa fa-upload"></i> {:__('Import')}</a>
<!-- <div class="dropdown btn-group {:$auth->check('goods_msg/multi')?'':'hide'}">-->
<!-- <a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>-->
<!-- <ul class="dropdown-menu text-left" role="menu">-->
<!-- <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>-->
<!-- <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>-->
<!-- </ul>-->
<!-- </div>-->
<div class="dropdown btn-group {:$auth->check('goods_msg/multi')?'':'hide'}">
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
<ul class="dropdown-menu text-left" role="menu">
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>
</ul>
</div>
</div>
... ...
... ... @@ -5,7 +5,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'goods_msg/index' + location.search,
index_url: 'goods_msg/index/ids/' + Config.ids + location.search,
// add_url: 'goods_msg/add',
// edit_url: 'goods_msg/edit',
del_url: 'goods_msg/del',
... ... @@ -25,14 +25,10 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'user_id', title: __('User_id')},
{field: 'goods_id', title: __('Goods_id')},
{field: 'store_id', title: __('Store_id')},
{field: 'user.nickname', title: __('User.nickname')},
{field: 'content', title: __('Content')},
{field: 'mobile', title: __('Mobile')},
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
{field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
{field: 'user.nickname', title: __('User.nickname')},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
]
]
... ... @@ -41,12 +37,12 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
// 为表格绑定事件
Table.api.bindevent(table);
},
// add: function () {
// Controller.api.bindevent();
// },
// edit: function () {
// Controller.api.bindevent();
// },
add: function () {
Controller.api.bindevent();
},
edit: function () {
Controller.api.bindevent();
},
api: {
bindevent: function () {
Form.api.bindevent($("form[role=form]"));
... ...
... ... @@ -11,6 +11,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form','template','litestoreg
edit_url: 'litestoregoods/edit',
del_url: 'litestoregoods/del',
multi_url: 'litestoregoods/multi',
msg_url: 'goods_msg/index',
table: 'litestore_goods',
}
});
... ... @@ -42,7 +43,18 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form','template','litestoreg
{field: 'is_delete', title: __('Is_delete'), searchList: {"0":__('Is_delete 0'),"1":__('Is_delete 1')}, formatter: Table.api.formatter.normal},
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
{field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate,
buttons: [
{
name: 'msg',
text: '留言列表',
title: '留言列表',
classname: 'btn btn-xs btn-primary btn-dialog',
icon: '',
url: $.fn.bootstrapTable.defaults.extend.msg_url,
extend:"data-area='[\"60%\",\"65%\"]'",
}
], formatter: Table.api.formatter.operate}
]
]
});
... ...