作者 何书鹏
1 个管道 的构建 通过 耗费 29 秒

数据统计

正在显示 48 个修改的文件 包含 2430 行增加4 行删除
... ... @@ -49,15 +49,12 @@ class Statistic extends Backend
switch ($type){
case 'day':
$date = "DATE_FORMAT(today,'%y年%m月%d日')";
$order = "DATE_FORMAT(today,'%y%m%d')";
break;
case 'week':
$date = "DATE_FORMAT(today,'%y年%u周')";
$order = "DATE_FORMAT(today,'%y%u')";
break;
case 'month':
$date = "DATE_FORMAT(today,'%y年%m月')";
$order = "DATE_FORMAT(today,'%y%m')";
break;
}
$total = $this->model
... ... @@ -67,7 +64,7 @@ class Statistic extends Backend
$list = $this->model
->field("*,{$date} date")
->order($order)
->order("today desc")
->group('date')
->select();
... ...
<?php
namespace app\admin\controller\mobile\course;
use app\common\controller\Backend;
/**
* 课程订单管理
*
* @icon fa fa-circle-o
*/
class CourseOrder extends Backend
{
/**
* CourseOrder模型对象
* @var \app\admin\model\mobile\course\CourseOrder
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\mobile\course\CourseOrder;
$this->view->assign("payTypeList", $this->model->getPayTypeList());
$this->view->assign("payStatusList", $this->model->getPayStatusList());
$this->view->assign("isTopList", $this->model->getIsTopList());
}
/**
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
*/
/**
* 查看
*/
public function index()
{
//当前是否为关联查询
$this->relationSearch = true;
//设置过滤方法
$this->request->filter(['strip_tags', 'trim']);
if ($this->request->isAjax())
{
//如果发送的来源是Selectpage,则转发到Selectpage
if ($this->request->request('keyField'))
{
return $this->selectpage();
}
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
$total = $this->model
->with(['mobilecompany','user','mobilecourse','mobilecoursespec'])
->where($where)
->order($sort, $order)
->count();
$list = $this->model
->with(['mobilecompany','user','mobilecourse','mobilecoursespec'])
->where($where)
->order($sort, $order)
->limit($offset, $limit)
->select();
foreach ($list as $row) {
$row->visible(['id','order_sn','pay_price','pay_type','pay_status','pay_time','course_price','score','score_price','people_num','is_top']);
$row->visible(['mobilecompany']);
$row->getRelation('mobilecompany')->visible(['name']);
$row->visible(['user']);
$row->getRelation('user')->visible(['nickname']);
$row->visible(['mobilecourse']);
$row->getRelation('mobilecourse')->visible(['title']);
$row->visible(['mobilecoursespec']);
$row->getRelation('mobilecoursespec')->visible(['name']);
}
$list = collection($list)->toArray();
$result = array("total" => $total, "rows" => $list);
return json($result);
}
return $this->view->fetch();
}
}
... ...
<?php
namespace app\admin\controller\mobile\package;
use app\common\controller\Backend;
/**
* 企业套餐订单管理
*
* @icon fa fa-circle-o
*/
class PackageOrder extends Backend
{
/**
* PackageOrder模型对象
* @var \app\admin\model\mobile\package\PackageOrder
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\mobile\package\PackageOrder;
$this->view->assign("payTypeList", $this->model->getPayTypeList());
$this->view->assign("payStatusList", $this->model->getPayStatusList());
}
/**
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
*/
/**
* 查看
*/
public function index()
{
//当前是否为关联查询
$this->relationSearch = true;
//设置过滤方法
$this->request->filter(['strip_tags', 'trim']);
if ($this->request->isAjax())
{
//如果发送的来源是Selectpage,则转发到Selectpage
if ($this->request->request('keyField'))
{
return $this->selectpage();
}
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
$total = $this->model
->with(['mobilecompany','user'])
->where($where)
->order($sort, $order)
->count();
$list = $this->model
->with(['mobilecompany','user'])
->where($where)
->order($sort, $order)
->limit($offset, $limit)
->select();
foreach ($list as $row) {
$row->visible(['id','order_sn','pay_price','pay_type','pay_status','pay_time']);
$row->visible(['mobilecompany']);
$row->getRelation('mobilecompany')->visible(['name']);
$row->visible(['user']);
$row->getRelation('user')->visible(['nickname']);
}
$list = collection($list)->toArray();
$result = array("total" => $total, "rows" => $list);
return json($result);
}
return $this->view->fetch();
}
}
... ...
<?php
namespace app\admin\controller\mobile\score;
use app\common\controller\Backend;
/**
* 积分充值管理
*
* @icon fa fa-circle-o
*/
class ScoreOrder extends Backend
{
/**
* ScoreOrder模型对象
* @var \app\admin\model\mobile\score\ScoreOrder
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\mobile\score\ScoreOrder;
$this->view->assign("payTypeList", $this->model->getPayTypeList());
$this->view->assign("payStatusList", $this->model->getPayStatusList());
}
/**
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
*/
/**
* 查看
*/
public function index()
{
//当前是否为关联查询
$this->relationSearch = true;
//设置过滤方法
$this->request->filter(['strip_tags', 'trim']);
if ($this->request->isAjax())
{
//如果发送的来源是Selectpage,则转发到Selectpage
if ($this->request->request('keyField'))
{
return $this->selectpage();
}
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
$total = $this->model
->with(['user','mobilescorespec'])
->where($where)
->order($sort, $order)
->count();
$list = $this->model
->with(['user','mobilescorespec'])
->where($where)
->order($sort, $order)
->limit($offset, $limit)
->select();
foreach ($list as $row) {
$row->visible(['id','order_sn','pay_price','pay_type','pay_status','pay_time','score']);
$row->visible(['user']);
$row->getRelation('user')->visible(['nickname']);
$row->visible(['mobilescorespec']);
$row->getRelation('mobilescorespec')->visible(['spec_score']);
}
$list = collection($list)->toArray();
$result = array("total" => $total, "rows" => $list);
return json($result);
}
return $this->view->fetch();
}
}
... ...
<?php
namespace app\admin\controller\mobile\score;
use app\common\controller\Backend;
/**
* 充值积分套餐管理
*
* @icon fa fa-circle-o
*/
class ScoreSpec extends Backend
{
/**
* ScoreSpec模型对象
* @var \app\admin\model\mobile\score\ScoreSpec
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\mobile\score\ScoreSpec;
}
/**
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
*/
/**
* 查看
*/
public function index()
{
//当前是否为关联查询
$this->relationSearch = false;
//设置过滤方法
$this->request->filter(['strip_tags', 'trim']);
if ($this->request->isAjax())
{
//如果发送的来源是Selectpage,则转发到Selectpage
if ($this->request->request('keyField'))
{
return $this->selectpage();
}
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
$total = $this->model
->where($where)
->order($sort, $order)
->count();
$list = $this->model
->where($where)
->order($sort, $order)
->limit($offset, $limit)
->select();
foreach ($list as $row) {
$row->visible(['id','spec_score','give_score']);
}
$list = collection($list)->toArray();
$result = array("total" => $total, "rows" => $list);
return json($result);
}
return $this->view->fetch();
}
}
... ...
<?php
namespace app\admin\controller\mobile\secret;
use app\common\controller\Backend;
/**
* 密卷订单管理
*
* @icon fa fa-circle-o
*/
class SecretOrder extends Backend
{
/**
* SecretOrder模型对象
* @var \app\admin\model\mobile\secret\SecretOrder
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\mobile\secret\SecretOrder;
$this->view->assign("payTypeList", $this->model->getPayTypeList());
$this->view->assign("payStatusList", $this->model->getPayStatusList());
$this->view->assign("isTopList", $this->model->getIsTopList());
}
/**
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
*/
/**
* 查看
*/
public function index()
{
//当前是否为关联查询
$this->relationSearch = true;
//设置过滤方法
$this->request->filter(['strip_tags', 'trim']);
if ($this->request->isAjax())
{
//如果发送的来源是Selectpage,则转发到Selectpage
if ($this->request->request('keyField'))
{
return $this->selectpage();
}
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
$total = $this->model
->with(['mobilecompany','user','mobilesecret','mobilesecretspec'])
->where($where)
->order($sort, $order)
->count();
$list = $this->model
->with(['mobilecompany','user','mobilesecret','mobilesecretspec'])
->where($where)
->order($sort, $order)
->limit($offset, $limit)
->select();
foreach ($list as $row) {
$row->visible(['id','order_sn','pay_price','pay_type','pay_status','pay_time','secret_price','score','score_price','people_num','is_top']);
$row->visible(['mobilecompany']);
$row->getRelation('mobilecompany')->visible(['name']);
$row->visible(['user']);
$row->getRelation('user')->visible(['nickname']);
$row->visible(['mobilesecret']);
$row->getRelation('mobilesecret')->visible(['title']);
$row->visible(['mobilesecretspec']);
$row->getRelation('mobilesecretspec')->visible(['name']);
}
$list = collection($list)->toArray();
$result = array("total" => $total, "rows" => $list);
return json($result);
}
return $this->view->fetch();
}
}
... ...
<?php
return [
'Id' => 'ID',
'Company_id' => '企业ID',
'User_id' => '用户ID',
'Course_id' => '密卷ID',
'Course_spec_id' => '课程规格ID',
'Order_sn' => '订单号',
'Pay_price' => '实际支付金额',
'Pay_type' => '支付方式',
'Pay_type wechat' => '微信',
'Pay_type alipay' => '支付宝',
'Pay_status' => '支付状态',
'Pay_status 0' => '未支付',
'Pay_status 1' => '已支付',
'Pay_time' => '支付时间',
'Course_price' => '密卷金额',
'Score' => '抵扣积分',
'Score_price' => '积分抵扣金额',
'People_num' => '套餐限制人数',
'Is_top' => '是否顶配',
'Is_top 0' => '否',
'Is_top 1' => '是',
'Createtime' => '创建时间',
'Updatetime' => '更新时间',
'Mobilecompany.name' => '公司名称',
'User.nickname' => '昵称',
'Mobilecourse.title' => '标题',
'Mobilecoursespec.name' => '规格名称'
];
... ...
<?php
return [
'Id' => 'ID',
'Company_id' => '企业ID',
'User_id' => '用户ID',
'Order_sn' => '订单号',
'Pay_price' => '实际支付金额',
'Pay_type' => '支付方式',
'Pay_type wechat' => '微信',
'Pay_type alipay' => '支付宝',
'Pay_status' => '支付状态',
'Pay_status 0' => '未支付',
'Pay_status 1' => '已支付',
'Pay_time' => '支付时间',
'Createtime' => '创建时间',
'Updatetime' => '更新时间',
'Mobilecompany.name' => '公司名称',
'User.nickname' => '昵称'
];
... ...
<?php
return [
'Id' => 'ID',
'User_id' => '用户ID',
'Score_spec_id' => '套餐ID',
'Order_sn' => '订单号',
'Pay_price' => '实际支付金额',
'Pay_type' => '支付方式',
'Pay_type wechat' => '微信',
'Pay_type alipay' => '支付宝',
'Pay_status' => '支付状态',
'Pay_status 0' => '未支付',
'Pay_status 1' => '已支付',
'Pay_time' => '支付时间',
'Score' => '充值积分',
'Createtime' => '创建时间',
'Updatetime' => '更新时间',
'User.nickname' => '昵称',
'Mobilescorespec.spec_score' => '套餐积分'
];
... ...
<?php
return [
'Id' => 'ID',
'Spec_score' => '套餐积分',
'Give_score' => '赠送积分',
'Createtime' => '创建时间',
'Updatetime' => '更新时间'
];
... ...
<?php
return [
'Id' => 'ID',
'Company_id' => '企业ID',
'User_id' => '用户ID',
'Secret_id' => '密卷ID',
'Secret_spec_id' => '密卷规格ID',
'Order_sn' => '订单号',
'Pay_price' => '实际支付金额',
'Pay_type' => '支付方式',
'Pay_type wechat' => '微信',
'Pay_type alipay' => '支付宝',
'Pay_status' => '支付状态',
'Pay_status 0' => '未支付',
'Pay_status 1' => '已支付',
'Pay_time' => '支付时间',
'Secret_price' => '密卷金额',
'Score' => '抵扣积分',
'Score_price' => '积分抵扣金额',
'People_num' => '套餐限制人数',
'Is_top' => '是否顶配',
'Is_top 0' => '否',
'Is_top 1' => '是',
'Createtime' => '创建时间',
'Updatetime' => '更新时间',
'Mobilecompany.name' => '公司名称',
'User.nickname' => '昵称',
'Mobilesecret.title' => '试卷标题',
'Mobilesecretspec.name' => '规格名称'
];
... ...
<?php
namespace app\admin\model\mobile\course;
use think\Model;
class MobileCourse extends Model
{
// 表名
protected $name = 'mobile_course';
}
... ...
<?php
namespace app\admin\model\mobile\course;
use think\Model;
class MobileCourseSpec extends Model
{
// 表名
protected $name = 'mobile_course_spec';
}
... ...
<?php
namespace app\admin\model\mobile\score;
use think\Model;
class MobileScoreSpec extends Model
{
// 表名
protected $name = 'mobile_score_spec';
}
... ...
<?php
namespace app\admin\model\mobile\secret;
use think\Model;
class MobileSecret extends Model
{
// 表名
protected $name = 'mobile_secret';
}
... ...
<?php
namespace app\admin\model\mobile\secret;
use think\Model;
class MobileSecretSpec extends Model
{
// 表名
protected $name = 'mobile_secret_spec';
}
... ...
<?php
namespace app\admin\model\mobile\course;
use think\Model;
class CourseOrder extends Model
{
// 表名
protected $name = 'mobile_course_order';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = false;
// 追加属性
protected $append = [
'pay_type_text',
'pay_status_text',
'pay_time_text',
'is_top_text'
];
public function getPayTypeList()
{
return ['wechat' => __('Pay_type wechat'), 'alipay' => __('Pay_type alipay')];
}
public function getPayStatusList()
{
return ['0' => __('Pay_status 0'), '1' => __('Pay_status 1')];
}
public function getIsTopList()
{
return ['0' => __('Is_top 0'), '1' => __('Is_top 1')];
}
public function getPayTypeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['pay_type']) ? $data['pay_type'] : '');
$list = $this->getPayTypeList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getPayStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['pay_status']) ? $data['pay_status'] : '');
$list = $this->getPayStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getPayTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['pay_time']) ? $data['pay_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getIsTopTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['is_top']) ? $data['is_top'] : '');
$list = $this->getIsTopList();
return isset($list[$value]) ? $list[$value] : '';
}
protected function setPayTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
public function mobilecompany()
{
return $this->belongsTo('app\admin\model\mobile\Company', 'company_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function user()
{
return $this->belongsTo('app\admin\model\User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function mobilecourse()
{
return $this->belongsTo('app\admin\model\mobile\course\Course', 'course_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function mobilecoursespec()
{
return $this->belongsTo('app\admin\model\mobile\course\CourseSpec', 'course_spec_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}
... ...
<?php
namespace app\admin\model\mobile\package;
use think\Model;
class PackageOrder extends Model
{
// 表名
protected $name = 'mobile_package_order';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = false;
// 追加属性
protected $append = [
'pay_type_text',
'pay_status_text',
'pay_time_text'
];
public function getPayTypeList()
{
return ['wechat' => __('Pay_type wechat'), 'alipay' => __('Pay_type alipay')];
}
public function getPayStatusList()
{
return ['0' => __('Pay_status 0'), '1' => __('Pay_status 1')];
}
public function getPayTypeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['pay_type']) ? $data['pay_type'] : '');
$list = $this->getPayTypeList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getPayStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['pay_status']) ? $data['pay_status'] : '');
$list = $this->getPayStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getPayTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['pay_time']) ? $data['pay_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
protected function setPayTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
public function mobilecompany()
{
return $this->belongsTo('app\admin\model\mobile\Company', 'company_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function user()
{
return $this->belongsTo('app\admin\model\User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}
... ...
<?php
namespace app\admin\model\mobile\score;
use think\Model;
class ScoreOrder extends Model
{
// 表名
protected $name = 'mobile_score_order';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = false;
// 追加属性
protected $append = [
'pay_type_text',
'pay_status_text',
'pay_time_text'
];
public function getPayTypeList()
{
return ['wechat' => __('Pay_type wechat'), 'alipay' => __('Pay_type alipay')];
}
public function getPayStatusList()
{
return ['0' => __('Pay_status 0'), '1' => __('Pay_status 1')];
}
public function getPayTypeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['pay_type']) ? $data['pay_type'] : '');
$list = $this->getPayTypeList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getPayStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['pay_status']) ? $data['pay_status'] : '');
$list = $this->getPayStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getPayTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['pay_time']) ? $data['pay_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
protected function setPayTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
public function user()
{
return $this->belongsTo('app\admin\model\User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function mobilescorespec()
{
return $this->belongsTo('app\admin\model\mobile\ScoreSpec', 'score_spec_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}
... ...
<?php
namespace app\admin\model\mobile\score;
use think\Model;
class ScoreSpec extends Model
{
// 表名
protected $name = 'mobile_score_spec';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = false;
// 追加属性
protected $append = [
];
}
... ...
<?php
namespace app\admin\model\mobile\secret;
use think\Model;
class SecretOrder extends Model
{
// 表名
protected $name = 'mobile_secret_order';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = false;
// 追加属性
protected $append = [
'pay_type_text',
'pay_status_text',
'pay_time_text',
'is_top_text'
];
public function getPayTypeList()
{
return ['wechat' => __('Pay_type wechat'), 'alipay' => __('Pay_type alipay')];
}
public function getPayStatusList()
{
return ['0' => __('Pay_status 0'), '1' => __('Pay_status 1')];
}
public function getIsTopList()
{
return ['0' => __('Is_top 0'), '1' => __('Is_top 1')];
}
public function getPayTypeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['pay_type']) ? $data['pay_type'] : '');
$list = $this->getPayTypeList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getPayStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['pay_status']) ? $data['pay_status'] : '');
$list = $this->getPayStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getPayTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['pay_time']) ? $data['pay_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getIsTopTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['is_top']) ? $data['is_top'] : '');
$list = $this->getIsTopList();
return isset($list[$value]) ? $list[$value] : '';
}
protected function setPayTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
public function mobilecompany()
{
return $this->belongsTo('app\admin\model\mobile\Company', 'company_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function user()
{
return $this->belongsTo('app\admin\model\User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function mobilesecret()
{
return $this->belongsTo('app\admin\model\mobile\secret\Secret', 'secret_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function mobilesecretspec()
{
return $this->belongsTo('app\admin\model\mobile\secret\SecretSpec', 'secret_spec_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}
... ...
<?php
namespace app\admin\validate\mobile\course;
use think\Validate;
class CourseOrder extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}
... ...
<?php
namespace app\admin\validate\mobile\package;
use think\Validate;
class PackageOrder extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}
... ...
<?php
namespace app\admin\validate\mobile\score;
use think\Validate;
class ScoreOrder extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}
... ...
<?php
namespace app\admin\validate\mobile\score;
use think\Validate;
class ScoreSpec extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}
... ...
<?php
namespace app\admin\validate\mobile\secret;
use think\Validate;
class SecretOrder extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}
... ...
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Company_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-company_id" data-rule="required" data-source="company/index" class="form-control selectpage" name="row[company_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Course_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-course_id" data-rule="required" data-source="course/index" class="form-control selectpage" name="row[course_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Course_spec_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-course_spec_id" data-rule="required" data-source="course/spec/index" class="form-control selectpage" name="row[course_spec_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Order_sn')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-order_sn" data-rule="required" class="form-control" name="row[order_sn]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-pay_price" data-rule="required" class="form-control" step="0.01" name="row[pay_price]" type="number" value="0.00">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_type')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-pay_type" data-rule="required" class="form-control selectpicker" name="row[pay_type]">
{foreach name="payTypeList" item="vo"}
<option value="{$key}" {in name="key" value=""}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="payStatusList" item="vo"}
<label for="row[pay_status]-{$key}"><input id="row[pay_status]-{$key}" name="row[pay_status]" type="radio" value="{$key}" {in name="key" value="0"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-pay_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[pay_time]" type="text" value="{:date('Y-m-d H:i:s')}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Course_price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-course_price" data-rule="required" class="form-control" step="0.01" name="row[course_price]" type="number" value="0.00">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Score')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-score" data-rule="required" class="form-control" name="row[score]" type="number" value="0">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Score_price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-score_price" data-rule="required" class="form-control" step="0.01" name="row[score_price]" type="number" value="0.00">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('People_num')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-people_num" data-rule="required" class="form-control" name="row[people_num]" type="number" value="0">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Is_top')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-is_top" data-rule="required" class="form-control selectpicker" name="row[is_top]">
{foreach name="isTopList" item="vo"}
<option value="{$key}" {in name="key" value="0"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</form>
... ...
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Company_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-company_id" data-rule="required" data-source="company/index" class="form-control selectpage" name="row[company_id]" type="text" value="{$row.company_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="{$row.user_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Course_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-course_id" data-rule="required" data-source="course/index" class="form-control selectpage" name="row[course_id]" type="text" value="{$row.course_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Course_spec_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-course_spec_id" data-rule="required" data-source="course/spec/index" class="form-control selectpage" name="row[course_spec_id]" type="text" value="{$row.course_spec_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Order_sn')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-order_sn" data-rule="required" class="form-control" name="row[order_sn]" type="text" value="{$row.order_sn|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-pay_price" data-rule="required" class="form-control" step="0.01" name="row[pay_price]" type="number" value="{$row.pay_price|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_type')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-pay_type" data-rule="required" class="form-control selectpicker" name="row[pay_type]">
{foreach name="payTypeList" item="vo"}
<option value="{$key}" {in name="key" value="$row.pay_type"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="payStatusList" item="vo"}
<label for="row[pay_status]-{$key}"><input id="row[pay_status]-{$key}" name="row[pay_status]" type="radio" value="{$key}" {in name="key" value="$row.pay_status"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-pay_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[pay_time]" type="text" value="{:$row.pay_time?datetime($row.pay_time):''}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Course_price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-course_price" data-rule="required" class="form-control" step="0.01" name="row[course_price]" type="number" value="{$row.course_price|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Score')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-score" data-rule="required" class="form-control" name="row[score]" type="number" value="{$row.score|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Score_price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-score_price" data-rule="required" class="form-control" step="0.01" name="row[score_price]" type="number" value="{$row.score_price|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('People_num')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-people_num" data-rule="required" class="form-control" name="row[people_num]" type="number" value="{$row.people_num|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Is_top')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-is_top" data-rule="required" class="form-control selectpicker" name="row[is_top]">
{foreach name="isTopList" item="vo"}
<option value="{$key}" {in name="key" value="$row.is_top"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</form>
... ...
<div class="panel panel-default panel-intro">
{:build_heading()}
<div class="panel-body">
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade active in" id="one">
<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('mobile/course/course_order/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('mobile/course/course_order/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('mobile/course/course_order/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
</div>
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
data-operate-edit="{:$auth->check('mobile/course/course_order/edit')}"
data-operate-del="{:$auth->check('mobile/course/course_order/del')}"
width="100%">
</table>
</div>
</div>
</div>
</div>
</div>
... ...
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Company_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-company_id" data-rule="required" data-source="company/index" class="form-control selectpage" name="row[company_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Order_sn')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-order_sn" data-rule="required" class="form-control" name="row[order_sn]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-pay_price" data-rule="required" class="form-control" step="0.01" name="row[pay_price]" type="number" value="0.00">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_type')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-pay_type" data-rule="required" class="form-control selectpicker" name="row[pay_type]">
{foreach name="payTypeList" item="vo"}
<option value="{$key}" {in name="key" value=""}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="payStatusList" item="vo"}
<label for="row[pay_status]-{$key}"><input id="row[pay_status]-{$key}" name="row[pay_status]" type="radio" value="{$key}" {in name="key" value="0"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-pay_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[pay_time]" type="text" value="{:date('Y-m-d H:i:s')}">
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</form>
... ...
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Company_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-company_id" data-rule="required" data-source="company/index" class="form-control selectpage" name="row[company_id]" type="text" value="{$row.company_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="{$row.user_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Order_sn')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-order_sn" data-rule="required" class="form-control" name="row[order_sn]" type="text" value="{$row.order_sn|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-pay_price" data-rule="required" class="form-control" step="0.01" name="row[pay_price]" type="number" value="{$row.pay_price|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_type')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-pay_type" data-rule="required" class="form-control selectpicker" name="row[pay_type]">
{foreach name="payTypeList" item="vo"}
<option value="{$key}" {in name="key" value="$row.pay_type"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="payStatusList" item="vo"}
<label for="row[pay_status]-{$key}"><input id="row[pay_status]-{$key}" name="row[pay_status]" type="radio" value="{$key}" {in name="key" value="$row.pay_status"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-pay_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[pay_time]" type="text" value="{:$row.pay_time?datetime($row.pay_time):''}">
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</form>
... ...
<div class="panel panel-default panel-intro">
{:build_heading()}
<div class="panel-body">
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade active in" id="one">
<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('mobile/package/package_order/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('mobile/package/package_order/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('mobile/package/package_order/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
</div>
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
data-operate-edit="{:$auth->check('mobile/package/package_order/edit')}"
data-operate-del="{:$auth->check('mobile/package/package_order/del')}"
width="100%">
</table>
</div>
</div>
</div>
</div>
</div>
... ...
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Score_spec_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-score_spec_id" data-rule="required" data-source="score/spec/index" class="form-control selectpage" name="row[score_spec_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Order_sn')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-order_sn" data-rule="required" class="form-control" name="row[order_sn]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-pay_price" data-rule="required" class="form-control" step="0.01" name="row[pay_price]" type="number" value="0.00">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_type')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-pay_type" data-rule="required" class="form-control selectpicker" name="row[pay_type]">
{foreach name="payTypeList" item="vo"}
<option value="{$key}" {in name="key" value=""}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="payStatusList" item="vo"}
<label for="row[pay_status]-{$key}"><input id="row[pay_status]-{$key}" name="row[pay_status]" type="radio" value="{$key}" {in name="key" value="0"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-pay_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[pay_time]" type="text" value="{:date('Y-m-d H:i:s')}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Score')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-score" data-rule="required" class="form-control" name="row[score]" type="number" value="0">
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</form>
... ...
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="{$row.user_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Score_spec_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-score_spec_id" data-rule="required" data-source="score/spec/index" class="form-control selectpage" name="row[score_spec_id]" type="text" value="{$row.score_spec_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Order_sn')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-order_sn" data-rule="required" class="form-control" name="row[order_sn]" type="text" value="{$row.order_sn|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-pay_price" data-rule="required" class="form-control" step="0.01" name="row[pay_price]" type="number" value="{$row.pay_price|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_type')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-pay_type" data-rule="required" class="form-control selectpicker" name="row[pay_type]">
{foreach name="payTypeList" item="vo"}
<option value="{$key}" {in name="key" value="$row.pay_type"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="payStatusList" item="vo"}
<label for="row[pay_status]-{$key}"><input id="row[pay_status]-{$key}" name="row[pay_status]" type="radio" value="{$key}" {in name="key" value="$row.pay_status"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-pay_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[pay_time]" type="text" value="{:$row.pay_time?datetime($row.pay_time):''}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Score')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-score" data-rule="required" class="form-control" name="row[score]" type="number" value="{$row.score|htmlentities}">
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</form>
... ...
<div class="panel panel-default panel-intro">
{:build_heading()}
<div class="panel-body">
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade active in" id="one">
<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('mobile/score/score_order/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('mobile/score/score_order/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('mobile/score/score_order/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
<a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('mobile/score/score_order/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('mobile/score/score_order/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>
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
data-operate-edit="{:$auth->check('mobile/score/score_order/edit')}"
data-operate-del="{:$auth->check('mobile/score/score_order/del')}"
width="100%">
</table>
</div>
</div>
</div>
</div>
</div>
... ...
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Spec_score')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-spec_score" data-rule="required" class="form-control" name="row[spec_score]" type="number" value="0">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Give_score')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-give_score" data-rule="required" class="form-control" name="row[give_score]" type="number" value="0">
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</form>
... ...
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Spec_score')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-spec_score" data-rule="required" class="form-control" name="row[spec_score]" type="number" value="{$row.spec_score|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Give_score')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-give_score" data-rule="required" class="form-control" name="row[give_score]" type="number" value="{$row.give_score|htmlentities}">
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</form>
... ...
<div class="panel panel-default panel-intro">
{:build_heading()}
<div class="panel-body">
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade active in" id="one">
<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('mobile/score/score_spec/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('mobile/score/score_spec/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('mobile/score/score_spec/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
<a href="javascript:;" class="btn btn-danger btn-import {:$auth->check('mobile/score/score_spec/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('mobile/score/score_spec/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>
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
data-operate-edit="{:$auth->check('mobile/score/score_spec/edit')}"
data-operate-del="{:$auth->check('mobile/score/score_spec/del')}"
width="100%">
</table>
</div>
</div>
</div>
</div>
</div>
... ...
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Company_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-company_id" data-rule="required" data-source="company/index" class="form-control selectpage" name="row[company_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Secret_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-secret_id" data-rule="required" data-source="secret/index" class="form-control selectpage" name="row[secret_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Secret_spec_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-secret_spec_id" data-rule="required" data-source="secret/spec/index" class="form-control selectpage" name="row[secret_spec_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Order_sn')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-order_sn" data-rule="required" class="form-control" name="row[order_sn]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-pay_price" data-rule="required" class="form-control" step="0.01" name="row[pay_price]" type="number" value="0.00">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_type')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-pay_type" data-rule="required" class="form-control selectpicker" name="row[pay_type]">
{foreach name="payTypeList" item="vo"}
<option value="{$key}" {in name="key" value=""}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="payStatusList" item="vo"}
<label for="row[pay_status]-{$key}"><input id="row[pay_status]-{$key}" name="row[pay_status]" type="radio" value="{$key}" {in name="key" value="0"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-pay_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[pay_time]" type="text" value="{:date('Y-m-d H:i:s')}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Secret_price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-secret_price" data-rule="required" class="form-control" step="0.01" name="row[secret_price]" type="number" value="0.00">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Score')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-score" data-rule="required" class="form-control" name="row[score]" type="number" value="0">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Score_price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-score_price" data-rule="required" class="form-control" step="0.01" name="row[score_price]" type="number" value="0.00">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('People_num')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-people_num" data-rule="required" class="form-control" name="row[people_num]" type="number" value="0">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Is_top')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-is_top" data-rule="required" class="form-control selectpicker" name="row[is_top]">
{foreach name="isTopList" item="vo"}
<option value="{$key}" {in name="key" value="0"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</form>
... ...
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Company_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-company_id" data-rule="required" data-source="company/index" class="form-control selectpage" name="row[company_id]" type="text" value="{$row.company_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="{$row.user_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Secret_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-secret_id" data-rule="required" data-source="secret/index" class="form-control selectpage" name="row[secret_id]" type="text" value="{$row.secret_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Secret_spec_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-secret_spec_id" data-rule="required" data-source="secret/spec/index" class="form-control selectpage" name="row[secret_spec_id]" type="text" value="{$row.secret_spec_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Order_sn')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-order_sn" data-rule="required" class="form-control" name="row[order_sn]" type="text" value="{$row.order_sn|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-pay_price" data-rule="required" class="form-control" step="0.01" name="row[pay_price]" type="number" value="{$row.pay_price|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_type')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-pay_type" data-rule="required" class="form-control selectpicker" name="row[pay_type]">
{foreach name="payTypeList" item="vo"}
<option value="{$key}" {in name="key" value="$row.pay_type"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="payStatusList" item="vo"}
<label for="row[pay_status]-{$key}"><input id="row[pay_status]-{$key}" name="row[pay_status]" type="radio" value="{$key}" {in name="key" value="$row.pay_status"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-pay_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[pay_time]" type="text" value="{:$row.pay_time?datetime($row.pay_time):''}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Secret_price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-secret_price" data-rule="required" class="form-control" step="0.01" name="row[secret_price]" type="number" value="{$row.secret_price|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Score')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-score" data-rule="required" class="form-control" name="row[score]" type="number" value="{$row.score|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Score_price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-score_price" data-rule="required" class="form-control" step="0.01" name="row[score_price]" type="number" value="{$row.score_price|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('People_num')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-people_num" data-rule="required" class="form-control" name="row[people_num]" type="number" value="{$row.people_num|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Is_top')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-is_top" data-rule="required" class="form-control selectpicker" name="row[is_top]">
{foreach name="isTopList" item="vo"}
<option value="{$key}" {in name="key" value="$row.is_top"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</form>
... ...
<div class="panel panel-default panel-intro">
{:build_heading()}
<div class="panel-body">
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade active in" id="one">
<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('mobile/secret/secret_order/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('mobile/secret/secret_order/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('mobile/secret/secret_order/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
</div>
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
data-operate-edit="{:$auth->check('mobile/secret/secret_order/edit')}"
data-operate-del="{:$auth->check('mobile/secret/secret_order/del')}"
width="100%">
</table>
</div>
</div>
</div>
</div>
</div>
... ...
<div class="panel panel-default panel-intro">
<div class="panel-heading">
{:build_heading(null,FALSE)}
<ul class="nav nav-tabs" data-field="type">
{foreach name="typeList" item="vo"}
<li><a href="#{$key}" data-value="{$key}" data-toggle="tab">{$vo}</a></li>
{/foreach}
</ul>
</div>
<div class="panel-body">
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade active in" id="one">
<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>
</div>
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
data-operate-edit="{:$auth->check('mobile/old/edit')}"
data-operate-del="{:$auth->check('mobile/old/del')}"
width="100%">
</table>
</div>
</div>
</div>
</div>
</div>
... ...
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
var Controller = {
index: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'mobile/course/course_order/index' + location.search,
add_url: 'mobile/course/course_order/add',
edit_url: 'mobile/course/course_order/edit',
del_url: 'mobile/course/course_order/del',
multi_url: 'mobile/course/course_order/multi',
table: 'mobile_course_order',
}
});
var table = $("#table");
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id',
sortName: 'id',
columns: [
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'order_sn', title: __('Order_sn')},
{field: 'pay_price', title: __('Pay_price'), operate:'BETWEEN'},
{field: 'pay_type', title: __('Pay_type'), searchList: {"wechat":__('Pay_type wechat'),"alipay":__('Pay_type alipay')}, formatter: Table.api.formatter.normal},
{field: 'pay_status', title: __('Pay_status'), searchList: {"0":__('Pay_status 0'),"1":__('Pay_status 1')}, formatter: Table.api.formatter.status},
{field: 'pay_time', title: __('Pay_time'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
{field: 'course_price', title: __('Course_price'), operate:'BETWEEN'},
{field: 'score', title: __('Score')},
{field: 'score_price', title: __('Score_price'), operate:'BETWEEN'},
{field: 'people_num', title: __('People_num')},
{field: 'is_top', title: __('Is_top'), searchList: {"0":__('Is_top 0'),"1":__('Is_top 1')}, formatter: Table.api.formatter.normal},
{field: 'mobilecompany.name', title: __('Mobilecompany.name')},
{field: 'user.nickname', title: __('User.nickname')},
{field: 'mobilecourse.title', title: __('Mobilecourse.title')},
{field: 'mobilecoursespec.name', title: __('Mobilecoursespec.name')},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
]
]
});
// 为表格绑定事件
Table.api.bindevent(table);
},
add: function () {
Controller.api.bindevent();
},
edit: function () {
Controller.api.bindevent();
},
api: {
bindevent: function () {
Form.api.bindevent($("form[role=form]"));
}
}
};
return Controller;
});
\ No newline at end of file
... ...
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
var Controller = {
index: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'mobile/package/package_order/index' + location.search,
add_url: 'mobile/package/package_order/add',
edit_url: 'mobile/package/package_order/edit',
del_url: 'mobile/package/package_order/del',
multi_url: 'mobile/package/package_order/multi',
table: 'mobile_package_order',
}
});
var table = $("#table");
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id',
sortName: 'id',
columns: [
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'order_sn', title: __('Order_sn')},
{field: 'pay_price', title: __('Pay_price'), operate:'BETWEEN'},
{field: 'pay_type', title: __('Pay_type'), searchList: {"wechat":__('Pay_type wechat'),"alipay":__('Pay_type alipay')}, formatter: Table.api.formatter.normal},
{field: 'pay_status', title: __('Pay_status'), searchList: {"0":__('Pay_status 0'),"1":__('Pay_status 1')}, formatter: Table.api.formatter.status},
{field: 'pay_time', title: __('Pay_time'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
{field: 'mobilecompany.name', title: __('Mobilecompany.name')},
{field: 'user.nickname', title: __('User.nickname')},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
]
]
});
// 为表格绑定事件
Table.api.bindevent(table);
},
add: function () {
Controller.api.bindevent();
},
edit: function () {
Controller.api.bindevent();
},
api: {
bindevent: function () {
Form.api.bindevent($("form[role=form]"));
}
}
};
return Controller;
});
\ No newline at end of file
... ...
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
var Controller = {
index: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'mobile/score/score_order/index' + location.search,
add_url: 'mobile/score/score_order/add',
edit_url: 'mobile/score/score_order/edit',
del_url: 'mobile/score/score_order/del',
multi_url: 'mobile/score/score_order/multi',
table: 'mobile_score_order',
}
});
var table = $("#table");
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id',
sortName: 'id',
columns: [
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'order_sn', title: __('Order_sn')},
{field: 'pay_price', title: __('Pay_price'), operate:'BETWEEN'},
{field: 'pay_type', title: __('Pay_type'), searchList: {"wechat":__('Pay_type wechat'),"alipay":__('Pay_type alipay')}, formatter: Table.api.formatter.normal},
{field: 'pay_status', title: __('Pay_status'), searchList: {"0":__('Pay_status 0'),"1":__('Pay_status 1')}, formatter: Table.api.formatter.status},
{field: 'pay_time', title: __('Pay_time'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
{field: 'score', title: __('Score')},
{field: 'user.nickname', title: __('User.nickname')},
{field: 'mobilescorespec.spec_score', title: __('Mobilescorespec.spec_score')},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
]
]
});
// 为表格绑定事件
Table.api.bindevent(table);
},
add: function () {
Controller.api.bindevent();
},
edit: function () {
Controller.api.bindevent();
},
api: {
bindevent: function () {
Form.api.bindevent($("form[role=form]"));
}
}
};
return Controller;
});
\ No newline at end of file
... ...
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
var Controller = {
index: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'mobile/score/score_spec/index' + location.search,
add_url: 'mobile/score/score_spec/add',
edit_url: 'mobile/score/score_spec/edit',
del_url: 'mobile/score/score_spec/del',
multi_url: 'mobile/score/score_spec/multi',
table: 'mobile_score_spec',
}
});
var table = $("#table");
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id',
sortName: 'id',
columns: [
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'spec_score', title: __('Spec_score')},
{field: 'give_score', title: __('Give_score')},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
]
]
});
// 为表格绑定事件
Table.api.bindevent(table);
},
add: function () {
Controller.api.bindevent();
},
edit: function () {
Controller.api.bindevent();
},
api: {
bindevent: function () {
Form.api.bindevent($("form[role=form]"));
}
}
};
return Controller;
});
\ No newline at end of file
... ...
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
var Controller = {
index: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'mobile/secret/secret_order/index' + location.search,
add_url: 'mobile/secret/secret_order/add',
edit_url: 'mobile/secret/secret_order/edit',
del_url: 'mobile/secret/secret_order/del',
multi_url: 'mobile/secret/secret_order/multi',
table: 'mobile_secret_order',
}
});
var table = $("#table");
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id',
sortName: 'id',
columns: [
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'order_sn', title: __('Order_sn')},
{field: 'pay_price', title: __('Pay_price'), operate:'BETWEEN'},
{field: 'pay_type', title: __('Pay_type'), searchList: {"wechat":__('Pay_type wechat'),"alipay":__('Pay_type alipay')}, formatter: Table.api.formatter.normal},
{field: 'pay_status', title: __('Pay_status'), searchList: {"0":__('Pay_status 0'),"1":__('Pay_status 1')}, formatter: Table.api.formatter.status},
{field: 'pay_time', title: __('Pay_time'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
{field: 'secret_price', title: __('Secret_price'), operate:'BETWEEN'},
{field: 'score', title: __('Score')},
{field: 'score_price', title: __('Score_price'), operate:'BETWEEN'},
{field: 'people_num', title: __('People_num')},
{field: 'is_top', title: __('Is_top'), searchList: {"0":__('Is_top 0'),"1":__('Is_top 1')}, formatter: Table.api.formatter.normal},
{field: 'mobilecompany.name', title: __('Mobilecompany.name')},
{field: 'user.nickname', title: __('User.nickname')},
{field: 'mobilesecret.title', title: __('Mobilesecret.title')},
{field: 'mobilesecretspec.name', title: __('Mobilesecretspec.name')},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
]
]
});
// 为表格绑定事件
Table.api.bindevent(table);
},
add: function () {
Controller.api.bindevent();
},
edit: function () {
Controller.api.bindevent();
},
api: {
bindevent: function () {
Form.api.bindevent($("form[role=form]"));
}
}
};
return Controller;
});
\ No newline at end of file
... ...
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
var Controller = {
index: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'mobile/statistic/index' + location.search,
table: 'mobile_old',
}
});
var table = $("#table");
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id',
sortName: 'id',
commonSearch: false,
search: false,
columns: [
[
{checkbox: true},
{field: 'date', title: __('时间'), operate: false},
{field: 'register_times', title: __('注册次数'), operate: false},
{field: 'active_times', title: __('日活跃用户'), operate: false},
{field: 'startup_times', title: __('启动次数'), operate: false},
]
]
});
// 为表格绑定事件
Table.api.bindevent(table);
//绑定TAB事件
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
// var options = table.bootstrapTable(tableOptions);
var typeStr = $(this).attr("href").replace('#', '');
var options = table.bootstrapTable('getOptions');
options.pageNumber = 1;
options.queryParams = function (params) {
// params.filter = JSON.stringify({type: typeStr});
params.type = typeStr;
return params;
};
table.bootstrapTable('refresh', {});
return false;
});
},
api: {
bindevent: function () {
Form.api.bindevent($("form[role=form]"));
}
}
};
return Controller;
});
\ No newline at end of file
... ...