提交 12e03e4a authored 作者: LTSC-20210524KK\Administrator's avatar LTSC-20210524KK\Administrator

Merge branch 'develop' of http://120.27.146.32:8888/lida/taote into develop

# Conflicts:
#	application/common/model/TtEx.php
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
namespace app\admin\controller; namespace app\admin\controller;
use app\common\controller\Backend; use app\common\controller\Backend;
use app\common\model\User;
/** /**
* 邀请码 * 邀请码
...@@ -72,8 +73,8 @@ class TtCode extends Backend ...@@ -72,8 +73,8 @@ class TtCode extends Backend
* 搜索下拉框 * 搜索下拉框
*/ */
public function admin_user() public function admin_user()
{ {
$user = \app\admin\model\User::select(); $user = User::where('status',User::STATUS_FALSE)->where('type',User::TYPE_TT)->select();
$user = collection($user)->toArray(); $user = collection($user)->toArray();
foreach ($user as $key => $value) { foreach ($user as $key => $value) {
$user[$key]['name'] = $value['nickname']; $user[$key]['name'] = $value['nickname'];
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
namespace app\admin\controller; namespace app\admin\controller;
use app\common\controller\Backend; use app\common\controller\Backend;
use app\common\model\TtEx as TtExModel;
/** /**
* 订单管理 * 订单管理
* *
...@@ -36,5 +36,9 @@ class TtEx extends Backend ...@@ -36,5 +36,9 @@ class TtEx extends Backend
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改 * 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
*/ */
public function ex_class()
{
$className = TtExModel::getClassName();
return $className;
}
} }
...@@ -565,6 +565,9 @@ trait Backend ...@@ -565,6 +565,9 @@ trait Backend
if($currentColumn == 1){ if($currentColumn == 1){
$val = decimalNotation($val); $val = decimalNotation($val);
} }
if($currentColumn == 3 || $currentColumn == 4){
$val = floatTimeChange($val);
}
$values[] = is_null($val) ? '' : $val; $values[] = is_null($val) ? '' : $val;
} }
$row = []; $row = [];
...@@ -575,6 +578,7 @@ trait Backend ...@@ -575,6 +578,7 @@ trait Backend
} }
} }
if ($row) { if ($row) {
$row['add_time'] = time();
$insert[] = $row; $insert[] = $row;
} }
} }
......
...@@ -7,18 +7,14 @@ ...@@ -7,18 +7,14 @@
<div class="widget-body no-padding"> <div class="widget-body no-padding">
<div id="toolbar" class="toolbar"> <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-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('tt_ex/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('tt_ex/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('tt_ex/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
<a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('tt_ex/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('tt_ex/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('tt_ex/multi')?'':'hide'}"> <!-- <div class="dropdown btn-group {:$auth->check('tt_ex/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">-->
<ul class="dropdown-menu text-left" role="menu"> <!--&lt;!&ndash; <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>&ndash;&gt;-->
<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>-->
<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>-->
</ul> <!-- </div>-->
</div>
</div> </div>
......
...@@ -494,4 +494,14 @@ if (!function_exists('decimalNotation')){ ...@@ -494,4 +494,14 @@ if (!function_exists('decimalNotation')){
return rtrim($decimal, '.'); return rtrim($decimal, '.');
} }
} }
\ No newline at end of file
if (!function_exists('floatTimeChange')){
/*还原excel导入时间浮点数*/
function floatTimeChange($date)
{
$d = 25569;
$t = 24 * 60 * 60;
return gmdate('Y-m-d H:i:s',($date - $d) * $t);
}
}
...@@ -30,6 +30,7 @@ class TtEx Extends Model ...@@ -30,6 +30,7 @@ class TtEx Extends Model
{ {
//通过code_id查询用户所有订单 //通过code_id查询用户所有订单
$info = self::where('code_id',$code_id)->field('real_money')->select(); $info = self::where('code_id',$code_id)->field('real_money')->select();
// 对象转成数组 // 对象转成数组
$info = collection($info)->toArray(); $info = collection($info)->toArray();
if($info){ if($info){
...@@ -62,4 +63,13 @@ class TtEx Extends Model ...@@ -62,4 +63,13 @@ class TtEx Extends Model
return false; return false;
} }
} }
/**
* 获取订单分类
* @return array|bool|string
*/
public static function getClassName()
{
return self::group('class_name')->column('class_name');
}
} }
...@@ -22,14 +22,26 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin ...@@ -22,14 +22,26 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
url: $.fn.bootstrapTable.defaults.extend.index_url, url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id', pk: 'id',
sortName: 'id', sortName: 'id',
// 搜索按钮框展开
searchFormVisible: true,
// 隐藏搜索按钮
showSearch: false,
//隐藏搜索框
search:false,
//隐藏切换按钮
showToggle: false,
//隐藏列按钮
showColumns: false,
//隐藏导出按钮
showExport: false,
columns: [ columns: [
[ [
{checkbox: true}, // {checkbox: true},
{field: 'id', title: __('Id')}, {field: 'id', title: __('Id')},
{field: 'order_id', title: __('Order_id')}, {field: 'order_id', title: __('Order_id')},
{field: 'enddate', title: __('Enddate')}, {field: 'enddate', title: __('Enddate')},
{field: 'create_time', title: __('Create_time')}, {field: 'create_time', title: __('Create_time'), formatter: Table.api.formatter.datetime},
{field: 'pay_time', title: __('Pay_time')}, {field: 'pay_time', title: __('Pay_time'), formatter: Table.api.formatter.datetime},
{field: 'refund_time', title: __('Refund_time')}, {field: 'refund_time', title: __('Refund_time')},
{field: 'channel_id', title: __('Channel_id')}, {field: 'channel_id', title: __('Channel_id')},
{field: 'channel_name', title: __('Channel_name')}, {field: 'channel_name', title: __('Channel_name')},
...@@ -41,7 +53,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin ...@@ -41,7 +53,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
{field: 'shop_quantity', title: __('Shop_quantity')}, {field: 'shop_quantity', title: __('Shop_quantity')},
{field: 'class_three_name', title: __('Class_three_name')}, {field: 'class_three_name', title: __('Class_three_name')},
{field: 'class_two_name', title: __('Class_two_name')}, {field: 'class_two_name', title: __('Class_two_name')},
{field: 'class_name', title: __('Class_name')}, {field: 'add_time', title: '导入时间', operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'class_name', title: __('Class_name'), searchList: $.getJSON('tt_ex/ex_class')},
{field: 'name', title: __('Name')}, {field: 'name', title: __('Name')},
// {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, formatter: Table.api.formatter.operate}
] ]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论