活动表

This commit is contained in:
15090180611 2024-12-23 18:21:02 +08:00
parent 758e1ffbf2
commit 3f08145276
140 changed files with 15886 additions and 29 deletions

View File

@ -0,0 +1,375 @@
<?php
namespace app\admin\controller\school\classes\activity;
use app\common\controller\Backend;
use app\common\model\school\classes\activity\order\Order;
use think\Db;
use think\db\exception\DataNotFoundException;
use think\db\exception\ModelNotFoundException;
use think\Exception;
use think\exception\DbException;
use think\exception\PDOException;
use think\exception\ValidateException;
/**
* 课程活动
*
* @icon fa fa-circle-o
*/
class Activity extends Backend
{
/**
* Activity模型对象
* @var \app\admin\model\school\classes\activity\Activity
*/
protected $model = null;
protected $itemmodel = null;
protected $qSwitch = true;
protected $qFields = ["user_id","shop_id","manystore_id"];
public function _initialize()
{
$this->model = new \app\admin\model\school\classes\activity\Activity;
$this->itemmodel = new \app\admin\model\school\classes\activity\ActivityItem();
parent::_initialize();
$this->view->assign("addressTypeList", $this->model->getAddressTypeList());
$this->view->assign("statusList", $this->model->getStatusList());
$this->view->assign("recommendList", $this->model->getRecommendList());
$this->view->assign("hotList", $this->model->getHotList());
$this->view->assign("newList", $this->model->getNewList());
$this->view->assign("selfhotList", $this->model->getSelfhotList());
$this->view->assign("expirestatusList", $this->model->getExpirestatusList());
$this->view->assign("addTypeList", $this->model->getAddTypeList());
$this->getCity();
$this->getAuthMsg();
$this->view->assign("itemStatusList", $this->itemmodel->getStatusList());
$this->view->assign("sexList", $this->itemmodel->getSexList());
}
/**
* 默认生成的控制器所继承的父类中有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();
$list = $this->model
->with(['manystore','shop'])
->where($where)
->order($sort, $order)
->paginate($limit);
foreach ($list as $row) {
$row->getRelation('manystore')->visible(['nickname']);
$row->getRelation('shop')->visible(['name','logo']);
}
$result = array("total" => $list->total(), "rows" => $list->items());
return json($result);
}
return $this->view->fetch();
}
protected function update_classes($classes_activity_id){
}
protected function updateCheck($id,$params=[],$row=null){
if($params && $row){
// var_dump($this->no_auth_fields_check($params,$row));
if(!$this->no_auth_fields_check($params,$row)){
return true;
}
}
// 课程存在售后订单则不允许操作
$order = Order::where("classes_activity_item_id",$id)->where("status","not in","-3,6,9")->find();
if($order)throw new \Exception("{$order['name']}存在正在使用中的订单报名学员,规格无法继续操作,如规格有误请下架!");
}
protected function update_check(&$params,$row=null)
{
if($row){
if(empty($params["shop_id"]))$params["shop_id"] = $row["shop_id"];
}
try {
$classesLib = new \app\common\model\school\classes\activity\Activity();
$classesLib->no_auth_fields = $this->no_auth_fields;
$classesLib->need_auth = $this->need_auth;
$classesLib->have_auth = $this->have_auth;
$classesLib->activityCheck($params,null,$row);
$this->need_auth = $classesLib->need_auth;
$this->have_auth = $classesLib->have_auth;
}catch (\Exception $e){
$this->error($e->getMessage());
}
//修改
if($row){
}else{
//新增
//新增
$params["add_type"] = '2';
$params["add_id"] = $this->auth->id;
}
}
/**
* 添加
*
* @return string
* @throws \think\Exception
*/
public function add()
{
if (false === $this->request->isPost()) {
return $this->view->fetch();
}
$params = $this->request->post('row/a');
if (empty($params)) {
$this->error(__('Parameter %s can not be empty', ''));
}
$params = $this->preExcludeFields($params);
if ($this->dataLimit && $this->dataLimitFieldAutoFill) {
$params[$this->dataLimitField] = $this->auth->id;
}
$result = false;
Db::startTrans();
try {
//是否采用模型验证
if ($this->modelValidate) {
$name = str_replace("\\model\\", "\\validate\\", get_class($this->model));
$validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.add' : $name) : $this->modelValidate;
$this->model->validateFailException()->validate($validate);
}
$this->update_check($params,$row=null);
$spec = $params["item_json"];
unset($params["item_json"]);
$result = $this->model->allowField(true)->save($params);
//添加课程规格
foreach ($spec as $k=>$v){
$v["classes_activity_id"] = $this->model["id"];
$v["manystore_id"] = $this->model["manystore_id"];
$v["shop_id"] = $this->model["shop_id"];
unset($v["id"]);
(new \app\common\model\school\classes\activity\ActivityItem())->allowField(true)->save($v);
}
//因为是批量添加,所有规格重新进行检测,防止出现时间重叠
$specss = \app\common\model\school\classes\activity\ActivityItem::where("classes_activity_id",$this->model["id"])->select();
foreach ($specss as $k=>$specs){
$params =$specs;
(new \app\common\model\school\classes\activity\ActivityItem)->specCheck($params,null,$specs);
}
$this->update_classes($this->model["id"]);
Db::commit();
} catch (ValidateException|PDOException|Exception $e) {
Db::rollback();
$this->error($e->getMessage().$e->getFile().$e->getLine());
}
if ($result === false) {
$this->error(__('No rows were inserted'));
}
$this->success();
}
/**
* 编辑
*
* @param $ids
* @return string
* @throws DbException
* @throws \think\Exception
*/
public function edit($ids = null)
{
$row = $this->model->get($ids);
if (!$row) {
$this->error(__('No Results were found'));
}
$adminIds = $this->getDataLimitAdminIds();
if (is_array($adminIds) && !in_array($row[$this->dataLimitField], $adminIds)) {
$this->error(__('You have no permission'));
}
if (false === $this->request->isPost()) {
$spec = \app\common\model\school\classes\activity\ActivityItem::where("classes_activity_id",$row["id"])->field("id,classes_activity_id,name,price,age,sex,limit_num,status,weigh")->order('weigh desc,id desc')->select();
$row["item_json"] = json_encode($spec);
$this->view->assign('row', $row);
return $this->view->fetch();
}
$params = $this->request->post('row/a');
if (empty($params)) {
$this->error(__('Parameter %s can not be empty', ''));
}
$params = $this->preExcludeFields($params);
$result = false;
Db::startTrans();
try {
//是否采用模型验证
if ($this->modelValidate) {
$name = str_replace("\\model\\", "\\validate\\", get_class($this->model));
$validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.edit' : $name) : $this->modelValidate;
$row->validateFailException()->validate($validate);
}
$this->update_check($params,$row);
$spec = $params["item_json"] ?? [];
// var_dump($spec);
$delete_spec_ids = $params["delete_spec_ids"] ?? [];
unset($params["item_json"]);
unset($params["delete_spec_ids"]);
$result = $row->allowField(true)->save($params);
//添加课程规格
foreach ($spec as $k=>$v){
$v["classes_activity_id"] = $row["id"];
$v["manystore_id"] = $row["manystore_id"];
$v["shop_id"] = $row["shop_id"];
//有id更新否则新增
if(isset($v["id"]) && $v["id"]){
\app\common\model\school\classes\activity\ActivityItem::update((new \app\common\model\school\classes\activity\ActivityItem)->checkAssemblyParameters($v));
}else{
\app\common\model\school\classes\activity\ActivityItem::create((new \app\common\model\school\classes\activity\ActivityItem)->checkAssemblyParameters($v));
}
}
//删除规格
foreach ($delete_spec_ids as $k=>$delete_spec){
// (new \app\common\model\school\classes\activity\ActivityItem)->updateCheck($delete_spec["id"]);
$delete_spec->delete();
}
//因为是批量添加,所有规格重新进行检测,防止出现时间重叠
$specss = \app\common\model\school\classes\activity\ActivityItem::where("classes_activity_id",$row["id"])->select();
foreach ($specss as $k=>$specs){
$params =$specs;
(new \app\common\model\school\classes\activity\ActivityItem)->specCheck($params,null,$specs);
}
$this->update_classes($row["id"]);
Db::commit();
} catch (ValidateException|PDOException|Exception $e) {
Db::rollback();
$this->error($e->getMessage());
}
if (false === $result) {
$this->error(__('No rows were updated'));
}
$this->success();
}
/**
* 删除
*
* @param $ids
* @return void
* @throws DbException
* @throws DataNotFoundException
* @throws ModelNotFoundException
*/
public function del($ids = null)
{
if (false === $this->request->isPost()) {
$this->error(__("Invalid parameters"));
}
$ids = $ids ?: $this->request->post("ids");
if (empty($ids)) {
$this->error(__('Parameter %s can not be empty', 'ids'));
}
$pk = $this->model->getPk();
$adminIds = $this->getDataLimitAdminIds();
if (is_array($adminIds)) {
$this->model->where($this->dataLimitField, 'in', $adminIds);
}
$list = $this->model->where($pk, 'in', $ids)->select();
foreach ($list as $item) {
$this->updateCheck($item->id);
}
$count = 0;
Db::startTrans();
try {
foreach ($list as $item) {
//删除课程规格
\app\common\model\school\classes\activity\ActivityItem::where("classes_activity_id",$item->id)->delete();
$count += $item->delete();
}
Db::commit();
} catch (PDOException|Exception $e) {
Db::rollback();
$this->error($e->getMessage());
}
if ($count) {
$this->success();
}
$this->error(__('No rows were deleted'));
}
}

View File

@ -0,0 +1,81 @@
<?php
namespace app\admin\controller\school\classes\activity;
use app\common\controller\Backend;
/**
* 课程活动审核
*
* @icon fa fa-circle-o
*/
class ActivityAuth extends Backend
{
/**
* ActivityAuth模型对象
* @var \app\admin\model\school\classes\activity\ActivityAuth
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\school\classes\activity\ActivityAuth;
$this->view->assign("addressTypeList", $this->model->getAddressTypeList());
$this->view->assign("statusList", $this->model->getStatusList());
$this->view->assign("recommendList", $this->model->getRecommendList());
$this->view->assign("hotList", $this->model->getHotList());
$this->view->assign("newList", $this->model->getNewList());
$this->view->assign("selfhotList", $this->model->getSelfhotList());
$this->view->assign("authStatusList", $this->model->getAuthStatusList());
$this->view->assign("expirestatusList", $this->model->getExpirestatusList());
$this->view->assign("addTypeList", $this->model->getAddTypeList());
}
/**
* 默认生成的控制器所继承的父类中有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();
$list = $this->model
->with(['activity','manystore','shop'])
->where($where)
->order($sort, $order)
->paginate($limit);
foreach ($list as $row) {
$row->getRelation('activity')->visible(['id']);
$row->getRelation('manystore')->visible(['nickname']);
$row->getRelation('shop')->visible(['name','logo']);
}
$result = array("total" => $list->total(), "rows" => $list->items());
return json($result);
}
return $this->view->fetch();
}
}

View File

@ -0,0 +1,74 @@
<?php
namespace app\admin\controller\school\classes\activity;
use app\common\controller\Backend;
/**
* 课程活动项目
*
* @icon fa fa-circle-o
*/
class ActivityItem extends Backend
{
/**
* ActivityItem模型对象
* @var \app\admin\model\school\classes\activity\ActivityItem
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\school\classes\activity\ActivityItem;
$this->view->assign("statusList", $this->model->getStatusList());
$this->view->assign("sexList", $this->model->getSexList());
}
/**
* 默认生成的控制器所继承的父类中有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();
$list = $this->model
->with(['manystore','shop','activity'])
->where($where)
->order($sort, $order)
->paginate($limit);
foreach ($list as $row) {
$row->getRelation('manystore')->visible(['nickname']);
$row->getRelation('shop')->visible(['name','logo']);
$row->getRelation('activity')->visible(['title','headimage']);
}
$result = array("total" => $list->total(), "rows" => $list->items());
return json($result);
}
return $this->view->fetch();
}
}

View File

@ -0,0 +1,74 @@
<?php
namespace app\admin\controller\school\classes\activity;
use app\common\controller\Backend;
/**
* 课程活动项目审核管理
*
* @icon fa fa-circle-o
*/
class ActivityItemAuth extends Backend
{
/**
* ActivityItemAuth模型对象
* @var \app\admin\model\school\classes\activity\ActivityItemAuth
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\school\classes\activity\ActivityItemAuth;
$this->view->assign("statusList", $this->model->getStatusList());
$this->view->assign("sexList", $this->model->getSexList());
}
/**
* 默认生成的控制器所继承的父类中有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();
$list = $this->model
->with(['manystore','shop','activity'])
->where($where)
->order($sort, $order)
->paginate($limit);
foreach ($list as $row) {
$row->getRelation('manystore')->visible(['nickname']);
$row->getRelation('shop')->visible(['name','logo']);
$row->getRelation('activity')->visible(['title','headimage']);
}
$result = array("total" => $list->total(), "rows" => $list->items());
return json($result);
}
return $this->view->fetch();
}
}

View File

@ -0,0 +1,79 @@
<?php
namespace app\admin\controller\school\classes\activity\order;
use app\common\controller\Backend;
/**
* 机构课程活动订单
*
* @icon fa fa-circle-o
*/
class Order extends Backend
{
/**
* Order模型对象
* @var \app\admin\model\school\classes\activity\order\Order
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\school\classes\activity\order\Order;
$this->view->assign("payTypeList", $this->model->getPayTypeList());
$this->view->assign("statusList", $this->model->getStatusList());
$this->view->assign("beforeStatusList", $this->model->getBeforeStatusList());
$this->view->assign("serverStatusList", $this->model->getServerStatusList());
$this->view->assign("authStatusList", $this->model->getAuthStatusList());
}
/**
* 默认生成的控制器所继承的父类中有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();
$list = $this->model
->with(['user','manystore','shop','activity','detail'])
->where($where)
->order($sort, $order)
->paginate($limit);
foreach ($list as $row) {
$row->getRelation('user')->visible(['nickname','realname','mobile','avatar']);
$row->getRelation('manystore')->visible(['nickname']);
$row->getRelation('shop')->visible(['name','logo']);
$row->getRelation('activity')->visible(['title','headimage']);
$row->getRelation('detail')->visible(['title','headimage']);
}
$result = array("total" => $list->total(), "rows" => $list->items());
return json($result);
}
return $this->view->fetch();
}
}

View File

@ -0,0 +1,82 @@
<?php
namespace app\admin\controller\school\classes\activity\order;
use app\common\controller\Backend;
/**
* 课程活动订单详情
*
* @icon fa fa-circle-o
*/
class OrderDetail extends Backend
{
/**
* OrderDetail模型对象
* @var \app\admin\model\school\classes\activity\order\OrderDetail
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\school\classes\activity\order\OrderDetail;
$this->view->assign("addressTypeList", $this->model->getAddressTypeList());
$this->view->assign("statusList", $this->model->getStatusList());
$this->view->assign("recommendList", $this->model->getRecommendList());
$this->view->assign("hotList", $this->model->getHotList());
$this->view->assign("newList", $this->model->getNewList());
$this->view->assign("selfhotList", $this->model->getSelfhotList());
$this->view->assign("expirestatusList", $this->model->getExpirestatusList());
$this->view->assign("addTypeList", $this->model->getAddTypeList());
}
/**
* 默认生成的控制器所继承的父类中有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();
$list = $this->model
->with(['activityorder','activity','manystore','shop','user'])
->where($where)
->order($sort, $order)
->paginate($limit);
foreach ($list as $row) {
$row->getRelation('activityorder')->visible(['order_no','pay_no']);
$row->getRelation('activity')->visible(['title','headimage']);
$row->getRelation('manystore')->visible(['nickname']);
$row->getRelation('shop')->visible(['name','logo']);
$row->getRelation('user')->visible(['nickname','realname','mobile','avatar']);
}
$result = array("total" => $list->total(), "rows" => $list->items());
return json($result);
}
return $this->view->fetch();
}
}

View File

@ -0,0 +1,71 @@
<?php
namespace app\admin\controller\school\classes\activity\order;
use app\common\controller\Backend;
/**
* 机构课程活动订单日志
*
* @icon fa fa-circle-o
*/
class OrderLog extends Backend
{
/**
* OrderLog模型对象
* @var \app\admin\model\school\classes\activity\order\OrderLog
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\school\classes\activity\order\OrderLog;
$this->view->assign("statusList", $this->model->getStatusList());
}
/**
* 默认生成的控制器所继承的父类中有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();
$list = $this->model
->with(['activityorder'])
->where($where)
->order($sort, $order)
->paginate($limit);
foreach ($list as $row) {
$row->getRelation('activityorder')->visible(['order_no','pay_no']);
}
$result = array("total" => $list->total(), "rows" => $list->items());
return json($result);
}
return $this->view->fetch();
}
}

View File

@ -0,0 +1,71 @@
<?php
return [
'Manystore_id' => '机构账号id',
'Shop_id' => '机构店铺id',
'Title' => '标题',
'Headimage' => '头图',
'Images' => '轮播图',
'Address_type' => '地址类型',
'Address_type 1' => '按机构',
'Address_type 2' => '独立位置',
'Address_city' => '城市选择',
'Province' => '省编号',
'City' => '市编号',
'District' => '县区编号',
'Address' => '活动地址',
'Address_detail' => '活动详细地址',
'Longitude' => '经度',
'Latitude' => '纬度',
'Start_time' => '活动开始时间',
'End_time' => '活动结束时间',
'Sign_start_time' => '报名开始时间',
'Sign_end_time' => '报名结束时间',
'Price' => '报名费用',
'People_num' => '活动人数',
'Item' => '活动项目',
'Content' => '活动详情',
'Status' => '状态',
'Status 1' => '上架',
'Set status to 1' => '设为上架',
'Status 2' => '下架',
'Set status to 2' => '设为下架',
'Status 3' => '平台下架',
'Set status to 3' => '设为平台下架',
'Weigh' => '权重',
'Recommend' => '平台推荐',
'Recommend 0' => '否',
'Recommend 1' => '是',
'Hot' => '平台热门',
'Hot 0' => '否',
'Hot 1' => '是',
'New' => '平台最新',
'New 0' => '否',
'New 1' => '是',
'Selfhot' => '机构热门',
'Selfhot 0' => '否',
'Selfhot 1' => '是',
'Sale' => '总销量',
'Stock' => '限制总人数',
'Views' => '浏览量',
'Expirestatus' => '过期状态',
'Expirestatus 1' => '进行中',
'Expirestatus 2' => '已过期',
'Add_type' => '添加人类型',
'Add_type 1' => '机构',
'Add_type 2' => '总后台',
'Add_id' => '添加人id',
'Createtime' => '创建时间',
'Updatetime' => '修改时间',
'Deletetime' => '删除时间',
'Manystore.nickname' => '昵称',
'Shop.name' => '店铺名称',
'Shop.logo' => '品牌LOGO',
'Sex' => '性别限制',
'Sex 1' => '男',
'Sex 2' => '女',
'Sex 3' => '男女不限',
'Limit_num' => '本项目限定人数',
'Age' => '年龄限制描述',
'Item_json' => '活动项目',
];

View File

@ -0,0 +1,72 @@
<?php
return [
'Classes_activity_id' => '课程活动id',
'Manystore_id' => '机构账号id',
'Shop_id' => '机构店铺id',
'Title' => '标题',
'Headimage' => '头图',
'Images' => '轮播图',
'Address_type' => '地址类型',
'Address_type 1' => '按机构',
'Address_type 2' => '独立位置',
'Address_city' => '城市选择',
'Province' => '省编号',
'City' => '市编号',
'District' => '县区编号',
'Address' => '活动地址',
'Address_detail' => '活动详细地址',
'Longitude' => '经度',
'Latitude' => '纬度',
'Start_time' => '活动开始时间',
'End_time' => '活动结束时间',
'Sign_start_time' => '报名开始时间',
'Sign_end_time' => '报名结束时间',
'Price' => '报名费用',
'People_num' => '活动人数',
'Item' => '活动项目',
'Content' => '活动详情',
'Status' => '状态',
'Status 1' => '上架',
'Status 2' => '下架',
'Status 3' => '平台下架',
'Weigh' => '权重',
'Recommend' => '平台推荐',
'Recommend 0' => '否',
'Recommend 1' => '是',
'Hot' => '平台热门',
'Hot 0' => '否',
'Hot 1' => '是',
'New' => '平台最新',
'New 0' => '否',
'New 1' => '是',
'Selfhot' => '机构热门',
'Selfhot 0' => '否',
'Selfhot 1' => '是',
'Auth_status' => '审核状态',
'Auth_status 0' => '待审核',
'Set auth_status to 0'=> '设为待审核',
'Auth_status 1' => '审核通过',
'Set auth_status to 1'=> '设为审核通过',
'Auth_status 2' => '审核不通过',
'Set auth_status to 2'=> '设为审核不通过',
'Reason' => '审核不通过原因',
'Sale' => '总销量',
'Stock' => '限制总人数',
'Views' => '浏览量',
'Expirestatus' => '过期状态',
'Expirestatus 1' => '进行中',
'Expirestatus 2' => '已过期',
'Add_type' => '添加人类型',
'Add_type 1' => '机构',
'Add_type 2' => '总后台',
'Add_id' => '添加人id',
'Admin_id' => '审核管理员id',
'Auth_time' => '审核时间',
'Createtime' => '创建时间',
'Updatetime' => '修改时间',
'Deletetime' => '删除时间',
'Manystore.nickname' => '昵称',
'Shop.name' => '店铺名称',
'Shop.logo' => '品牌LOGO'
];

View File

@ -0,0 +1,31 @@
<?php
return [
'Manystore_id' => '机构账号id',
'Shop_id' => '机构店铺id',
'Classes_activity_id' => '课程活动id',
'Name' => '活动项名称',
'Price' => '项目价格0为免费',
'Limit_num' => '本项目限定人数',
'Age' => '年龄限制描述',
'Status' => '状态',
'Status 1' => '上架',
'Set status to 1' => '设为上架',
'Status 2' => '下架',
'Set status to 2' => '设为下架',
'Sex' => '性别限制',
'Sex 1' => '男',
'Sex 2' => '女',
'Sex 3' => '男女不限',
'Weigh' => '权重',
'Sign_num' => '已报名人数',
'Verification_num' => '已核销人数',
'Createtime' => '创建时间',
'Updatetime' => '修改时间',
'Deletetime' => '删除时间',
'Manystore.nickname' => '昵称',
'Shop.name' => '店铺名称',
'Shop.logo' => '品牌LOGO',
'Activity.title' => '标题',
'Activity.headimage' => '头图'
];

View File

@ -0,0 +1,31 @@
<?php
return [
'Manystore_id' => '机构账号id',
'Shop_id' => '机构店铺id',
'Classes_activity_id' => '课程活动id',
'Name' => '活动项名称',
'Price' => '项目价格0为免费',
'Limit_num' => '本项目限定人数',
'Age' => '年龄限制描述',
'Status' => '状态',
'Status 1' => '上架',
'Set status to 1' => '设为上架',
'Status 2' => '下架',
'Set status to 2' => '设为下架',
'Sex' => '性别限制',
'Sex 1' => '男',
'Sex 2' => '女',
'Sex 3' => '男女不限',
'Weigh' => '权重',
'Sign_num' => '已报名人数',
'Verification_num' => '已核销人数',
'Createtime' => '创建时间',
'Updatetime' => '修改时间',
'Deletetime' => '删除时间',
'Manystore.nickname' => '昵称',
'Shop.name' => '店铺名称',
'Shop.logo' => '品牌LOGO',
'Activity.title' => '标题',
'Activity.headimage' => '头图'
];

View File

@ -0,0 +1,81 @@
<?php
return [
'Order_no' => '订单号',
'Pay_no' => '微信支付单号',
'User_id' => '下单人用户id',
'Manystore_id' => '机构账号id',
'Shop_id' => '机构id',
'Code' => '核销码',
'Codeimage' => '核销二维码图片',
'Codeoneimage' => '核销一维码图片',
'Classes_activity_id' => '课程活动id',
'Activity_order_detail_id' => '订单课程活动id',
'Beforeprice' => '订单优惠前金额',
'Totalprice' => '订单应付金额',
'Payprice' => '订单实付金额',
'Pay_type' => '支付方式',
'Pay_type yue' => '余额',
'Pay_type wechat' => '微信',
'Status' => '订单状态',
'Status -3' => '已取消',
'Set status to -3' => '设为已取消',
'Status 0' => '待支付',
'Set status to 0' => '设为待支付',
'Status 2' => '已报名待审核',
'Set status to 2' => '设为已报名待审核',
'Status 3' => '已预约',
'Set status to 3' => '设为已预约',
'Status 4' => '售后中',
'Set status to 4' => '设为售后中',
'Status 6' => '已退款',
'Set status to 6' => '设为已退款',
'Status 9' => '已完成',
'Set status to 9' => '设为已完成',
'Before_status' => '售后前状态',
'Before_status -3' => '已取消',
'Before_status 0' => '未售后',
'Before_status 2' => '已报名待审核',
'Before_status 3' => '已预约',
'Before_status 4' => '售后中',
'Before_status 6' => '已退款',
'Before_status 9' => '已完成',
'Server_status' => '售后订单状态',
'Server_status 0' => '正常',
'Server_status 3' => '售后中',
'Server_status 6' => '售后完成',
'Canceltime' => '取消时间',
'Paytime' => '支付时间',
'Auth_time' => '审核时间',
'Reservation_time' => '预约时间',
'Finishtime' => '完成时间',
'Refundtime' => '退款时间',
'Total_refundprice' => '应退款金额',
'Real_refundprice' => '实际退款金额',
'Sub_refundprice' => '剩余未退金额',
'Pay_json' => '三方支付信息json',
'Platform' => '支付平台',
'Verification_user_id' => '核销人用户id',
'Verification_type' => '核销用户类型',
'Reason' => '审核不通过原因',
'Auth_status' => '审核状态',
'Auth_status 0' => '待审核',
'Auth_status 1' => '审核通过',
'Auth_status 2' => '审核失败',
'Auth_user_id' => '审核用户id',
'Auth_type' => '审核用户类型',
'Createtime' => '创建时间',
'Updatetime' => '修改时间',
'Deletetime' => '删除时间',
'User.nickname' => '昵称',
'User.realname' => '真实姓名',
'User.mobile' => '手机号',
'User.avatar' => '头像',
'Manystore.nickname' => '昵称',
'Shop.name' => '店铺名称',
'Shop.logo' => '品牌LOGO',
'Activity.title' => '标题',
'Activity.headimage' => '头图',
'Detail.title' => '标题',
'Detail.headimage' => '头图'
];

View File

@ -0,0 +1,75 @@
<?php
return [
'Classes_activity_order_id' => '课程活动订单id',
'Classes_activity_id' => '课程活动id',
'Manystore_id' => '机构账号id',
'Shop_id' => '机构id',
'User_id' => '下单用户id',
'Title' => '标题',
'Headimage' => '头图',
'Images' => '轮播图',
'Address_type' => '地址类型',
'Address_type 1' => '按机构',
'Address_type 2' => '独立位置',
'Address_city' => '城市选择',
'Province' => '省编号',
'City' => '市编号',
'District' => '县区编号',
'Address' => '活动地址',
'Address_detail' => '活动详细地址',
'Longitude' => '经度',
'Latitude' => '纬度',
'Start_time' => '活动开始时间',
'End_time' => '活动结束时间',
'Sign_start_time' => '报名开始时间',
'Sign_end_time' => '报名结束时间',
'Price' => '报名费用',
'People_num' => '活动人数',
'Item' => '活动项目',
'Content' => '活动详情',
'Status' => '状态',
'Status 1' => '上架',
'Set status to 1' => '设为上架',
'Status 2' => '下架',
'Set status to 2' => '设为下架',
'Status 3' => '平台下架',
'Set status to 3' => '设为平台下架',
'Weigh' => '权重',
'Recommend' => '平台推荐',
'Recommend 0' => '否',
'Recommend 1' => '是',
'Hot' => '平台热门',
'Hot 0' => '否',
'Hot 1' => '是',
'New' => '平台最新',
'New 0' => '否',
'New 1' => '是',
'Selfhot' => '机构热门',
'Selfhot 0' => '否',
'Selfhot 1' => '是',
'Sale' => '总销量',
'Stock' => '限制总人数',
'Views' => '浏览量',
'Expirestatus' => '过期状态',
'Expirestatus 1' => '进行中',
'Expirestatus 2' => '已过期',
'Add_type' => '添加人类型',
'Add_type 1' => '机构',
'Add_type 2' => '总后台',
'Add_id' => '添加人id',
'Createtime' => '创建时间',
'Updatetime' => '修改时间',
'Deletetime' => '删除时间',
'Order.order_no' => '订单号',
'Order.pay_no' => '微信支付单号',
'Activity.title' => '标题',
'Activity.headimage' => '头图',
'Manystore.nickname' => '昵称',
'Shop.name' => '店铺名称',
'Shop.logo' => '品牌LOGO',
'User.nickname' => '昵称',
'User.realname' => '真实姓名',
'User.mobile' => '手机号',
'User.avatar' => '头像'
];

View File

@ -0,0 +1,28 @@
<?php
return [
'Classes_activity_order_id' => '课程活动订单id',
'Status' => '订单状态',
'Status -3' => '已取消',
'Set status to -3' => '设为已取消',
'Status 0' => '待支付',
'Set status to 0' => '设为待支付',
'Status 2' => '已报名待审核',
'Set status to 2' => '设为已报名待审核',
'Status 3' => '已预约',
'Set status to 3' => '设为已预约',
'Status 4' => '售后中',
'Set status to 4' => '设为售后中',
'Status 6' => '已退款',
'Set status to 6' => '设为已退款',
'Status 9' => '已完成',
'Set status to 9' => '设为已完成',
'Log_text' => '记录内容',
'Oper_type' => '记录人类型',
'Oper_id' => '记录人id',
'Createtime' => '创建时间',
'Updatetime' => '修改时间',
'Deletetime' => '删除时间',
'Order.order_no' => '订单号',
'Order.pay_no' => '微信支付单号'
];

View File

@ -0,0 +1,219 @@
<?php
namespace app\admin\model\school\classes\activity;
use app\admin\model\manystore\Shop;
use app\manystore\model\Manystore;
use think\Model;
use traits\model\SoftDelete;
class Activity extends Model
{
use SoftDelete;
// 表名
protected $name = 'school_classes_activity';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = 'deletetime';
// 追加属性
protected $append = [
'address_type_text',
'start_time_text',
'end_time_text',
'sign_start_time_text',
'sign_end_time_text',
'status_text',
'recommend_text',
'hot_text',
'new_text',
'selfhot_text',
'expirestatus_text',
'add_type_text'
];
protected static function init()
{
self::afterInsert(function ($row) {
if (!$row['weigh']) {
$pk = $row->getPk();
$row->getQuery()->where($pk, $row[$pk])->update(['weigh' => $row[$pk]]);
}
});
}
public function getAddressTypeList()
{
return ['1' => __('Address_type 1'), '2' => __('Address_type 2')];
}
public function getStatusList()
{
return ['1' => __('Status 1'), '2' => __('Status 2'), '3' => __('Status 3')];
}
public function getRecommendList()
{
return ['0' => __('Recommend 0'), '1' => __('Recommend 1')];
}
public function getHotList()
{
return ['0' => __('Hot 0'), '1' => __('Hot 1')];
}
public function getNewList()
{
return ['0' => __('New 0'), '1' => __('New 1')];
}
public function getSelfhotList()
{
return ['0' => __('Selfhot 0'), '1' => __('Selfhot 1')];
}
public function getExpirestatusList()
{
return ['1' => __('Expirestatus 1'), '2' => __('Expirestatus 2')];
}
public function getAddTypeList()
{
return ['1' => __('Add_type 1'), '2' => __('Add_type 2')];
}
public function getAddressTypeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['address_type']) ? $data['address_type'] : '');
$list = $this->getAddressTypeList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getStartTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['start_time']) ? $data['start_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getEndTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['end_time']) ? $data['end_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getSignStartTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['sign_start_time']) ? $data['sign_start_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getSignEndTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['sign_end_time']) ? $data['sign_end_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
$list = $this->getStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getRecommendTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['recommend']) ? $data['recommend'] : '');
$list = $this->getRecommendList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getHotTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['hot']) ? $data['hot'] : '');
$list = $this->getHotList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getNewTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['new']) ? $data['new'] : '');
$list = $this->getNewList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getSelfhotTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['selfhot']) ? $data['selfhot'] : '');
$list = $this->getSelfhotList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getExpirestatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['expirestatus']) ? $data['expirestatus'] : '');
$list = $this->getExpirestatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getAddTypeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['add_type']) ? $data['add_type'] : '');
$list = $this->getAddTypeList();
return isset($list[$value]) ? $list[$value] : '';
}
protected function setStartTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setEndTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setSignStartTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setSignEndTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
public function manystore()
{
return $this->belongsTo(Manystore::class, 'manystore_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function shop()
{
return $this->belongsTo(Shop::class, 'shop_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}

View File

@ -0,0 +1,252 @@
<?php
namespace app\admin\model\school\classes\activity;
use app\admin\model\manystore\Shop;
use app\manystore\model\Manystore;
use think\Model;
use traits\model\SoftDelete;
class ActivityAuth extends Model
{
use SoftDelete;
// 表名
protected $name = 'school_classes_activity_auth';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = 'deletetime';
// 追加属性
protected $append = [
'address_type_text',
'start_time_text',
'end_time_text',
'sign_start_time_text',
'sign_end_time_text',
'status_text',
'recommend_text',
'hot_text',
'new_text',
'selfhot_text',
'auth_status_text',
'expirestatus_text',
'add_type_text',
'auth_time_text'
];
protected static function init()
{
self::afterInsert(function ($row) {
if (!$row['weigh']) {
$pk = $row->getPk();
$row->getQuery()->where($pk, $row[$pk])->update(['weigh' => $row[$pk]]);
}
});
}
public function getAddressTypeList()
{
return ['1' => __('Address_type 1'), '2' => __('Address_type 2')];
}
public function getStatusList()
{
return ['1' => __('Status 1'), '2' => __('Status 2'), '3' => __('Status 3')];
}
public function getRecommendList()
{
return ['0' => __('Recommend 0'), '1' => __('Recommend 1')];
}
public function getHotList()
{
return ['0' => __('Hot 0'), '1' => __('Hot 1')];
}
public function getNewList()
{
return ['0' => __('New 0'), '1' => __('New 1')];
}
public function getSelfhotList()
{
return ['0' => __('Selfhot 0'), '1' => __('Selfhot 1')];
}
public function getAuthStatusList()
{
return ['0' => __('Auth_status 0'), '1' => __('Auth_status 1'), '2' => __('Auth_status 2')];
}
public function getExpirestatusList()
{
return ['1' => __('Expirestatus 1'), '2' => __('Expirestatus 2')];
}
public function getAddTypeList()
{
return ['1' => __('Add_type 1'), '2' => __('Add_type 2')];
}
public function getAddressTypeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['address_type']) ? $data['address_type'] : '');
$list = $this->getAddressTypeList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getStartTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['start_time']) ? $data['start_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getEndTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['end_time']) ? $data['end_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getSignStartTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['sign_start_time']) ? $data['sign_start_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getSignEndTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['sign_end_time']) ? $data['sign_end_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
$list = $this->getStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getRecommendTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['recommend']) ? $data['recommend'] : '');
$list = $this->getRecommendList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getHotTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['hot']) ? $data['hot'] : '');
$list = $this->getHotList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getNewTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['new']) ? $data['new'] : '');
$list = $this->getNewList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getSelfhotTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['selfhot']) ? $data['selfhot'] : '');
$list = $this->getSelfhotList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getAuthStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['auth_status']) ? $data['auth_status'] : '');
$list = $this->getAuthStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getExpirestatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['expirestatus']) ? $data['expirestatus'] : '');
$list = $this->getExpirestatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getAddTypeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['add_type']) ? $data['add_type'] : '');
$list = $this->getAddTypeList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getAuthTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['auth_time']) ? $data['auth_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
protected function setStartTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setEndTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setSignStartTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setSignEndTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setAuthTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
public function activity()
{
return $this->belongsTo(Activity::class, 'classes_activity_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function manystore()
{
return $this->belongsTo(Manystore::class, 'manystore_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function shop()
{
return $this->belongsTo(Shop::class, 'shop_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}

View File

@ -0,0 +1,91 @@
<?php
namespace app\admin\model\school\classes\activity;
use app\admin\model\manystore\Shop;
use app\manystore\model\Manystore;
use think\Model;
use traits\model\SoftDelete;
class ActivityItem extends Model
{
use SoftDelete;
// 表名
protected $name = 'school_classes_activity_item';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = 'deletetime';
// 追加属性
protected $append = [
'status_text',
'sex_text'
];
protected static function init()
{
self::afterInsert(function ($row) {
if (!$row['weigh']) {
$pk = $row->getPk();
$row->getQuery()->where($pk, $row[$pk])->update(['weigh' => $row[$pk]]);
}
});
}
public function getStatusList()
{
return ['1' => __('Status 1'), '2' => __('Status 2')];
}
public function getSexList()
{
return ['1' => __('Sex 1'), '2' => __('Sex 2'), '3' => __('Sex 3')];
}
public function getStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
$list = $this->getStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getSexTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['sex']) ? $data['sex'] : '');
$list = $this->getSexList();
return isset($list[$value]) ? $list[$value] : '';
}
public function manystore()
{
return $this->belongsTo(Manystore::class, 'manystore_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function shop()
{
return $this->belongsTo(Shop::class, 'shop_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function activity()
{
return $this->belongsTo(Activity::class, 'classes_activity_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}

View File

@ -0,0 +1,91 @@
<?php
namespace app\admin\model\school\classes\activity;
use app\admin\model\manystore\Shop;
use app\manystore\model\Manystore;
use think\Model;
use traits\model\SoftDelete;
class ActivityItemAuth extends Model
{
use SoftDelete;
// 表名
protected $name = 'school_classes_activity_item_auth';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = 'deletetime';
// 追加属性
protected $append = [
'status_text',
'sex_text'
];
protected static function init()
{
self::afterInsert(function ($row) {
if (!$row['weigh']) {
$pk = $row->getPk();
$row->getQuery()->where($pk, $row[$pk])->update(['weigh' => $row[$pk]]);
}
});
}
public function getStatusList()
{
return ['1' => __('Status 1'), '2' => __('Status 2')];
}
public function getSexList()
{
return ['1' => __('Sex 1'), '2' => __('Sex 2'), '3' => __('Sex 3')];
}
public function getStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
$list = $this->getStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getSexTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['sex']) ? $data['sex'] : '');
$list = $this->getSexList();
return isset($list[$value]) ? $list[$value] : '';
}
public function manystore()
{
return $this->belongsTo(Manystore::class, 'manystore_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function shop()
{
return $this->belongsTo(Shop::class, 'shop_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function activity()
{
return $this->belongsTo(Activity::class, 'classes_activity_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}

View File

@ -0,0 +1,12 @@
<?php
namespace app\admin\model\school\classes\activity;
use think\Model;
class Order extends Model
{
// 表名
protected $name = 'school_classes_activity_order';
}

View File

@ -0,0 +1,12 @@
<?php
namespace app\admin\model\school\classes\activity\order;
use think\Model;
class Detail extends Model
{
// 表名
protected $name = 'school_classes_activity_order_detail';
}

View File

@ -0,0 +1,212 @@
<?php
namespace app\admin\model\school\classes\activity\order;
use app\admin\model\manystore\Shop;
use app\admin\model\school\classes\activity\Activity;
use app\manystore\model\Manystore;
use think\Model;
use traits\model\SoftDelete;
class Order extends Model
{
use SoftDelete;
// 表名
protected $name = 'school_classes_activity_order';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = 'deletetime';
// 追加属性
protected $append = [
'pay_type_text',
'status_text',
'before_status_text',
'server_status_text',
'canceltime_text',
'paytime_text',
'auth_time_text',
'reservation_time_text',
'finishtime_text',
'refundtime_text',
'auth_status_text'
];
public function getPayTypeList()
{
return ['yue' => __('Pay_type yue'), 'wechat' => __('Pay_type wechat')];
}
public function getStatusList()
{
return ['-3' => __('Status -3'), '0' => __('Status 0'), '2' => __('Status 2'), '3' => __('Status 3'), '4' => __('Status 4'), '6' => __('Status 6'), '9' => __('Status 9')];
}
public function getBeforeStatusList()
{
return ['-3' => __('Before_status -3'), '0' => __('Before_status 0'), '2' => __('Before_status 2'), '3' => __('Before_status 3'), '4' => __('Before_status 4'), '6' => __('Before_status 6'), '9' => __('Before_status 9')];
}
public function getServerStatusList()
{
return ['0' => __('Server_status 0'), '3' => __('Server_status 3'), '6' => __('Server_status 6')];
}
public function getAuthStatusList()
{
return ['0' => __('Auth_status 0'), '1' => __('Auth_status 1'), '2' => __('Auth_status 2')];
}
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 getStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
$list = $this->getStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getBeforeStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['before_status']) ? $data['before_status'] : '');
$list = $this->getBeforeStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getServerStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['server_status']) ? $data['server_status'] : '');
$list = $this->getServerStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getCanceltimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['canceltime']) ? $data['canceltime'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getPaytimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['paytime']) ? $data['paytime'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getAuthTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['auth_time']) ? $data['auth_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getReservationTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['reservation_time']) ? $data['reservation_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getFinishtimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['finishtime']) ? $data['finishtime'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getRefundtimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['refundtime']) ? $data['refundtime'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getAuthStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['auth_status']) ? $data['auth_status'] : '');
$list = $this->getAuthStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
protected function setCanceltimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setPaytimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setAuthTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setReservationTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setFinishtimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setRefundtimeAttr($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 manystore()
{
return $this->belongsTo(Manystore::class, 'manystore_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function shop()
{
return $this->belongsTo(Shop::class, 'shop_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function activity()
{
return $this->belongsTo(Activity::class, 'classes_activity_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function detail()
{
return $this->belongsTo(OrderDetail::class, 'activity_order_detail_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}

View File

@ -0,0 +1,238 @@
<?php
namespace app\admin\model\school\classes\activity\order;
use app\admin\model\manystore\Shop;
use app\admin\model\school\classes\activity\Activity;
use app\manystore\model\Manystore;
use think\Model;
use traits\model\SoftDelete;
class OrderDetail extends Model
{
use SoftDelete;
// 表名
protected $name = 'school_classes_activity_order_detail';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = 'deletetime';
// 追加属性
protected $append = [
'address_type_text',
'start_time_text',
'end_time_text',
'sign_start_time_text',
'sign_end_time_text',
'status_text',
'recommend_text',
'hot_text',
'new_text',
'selfhot_text',
'expirestatus_text',
'add_type_text'
];
protected static function init()
{
self::afterInsert(function ($row) {
if (!$row['weigh']) {
$pk = $row->getPk();
$row->getQuery()->where($pk, $row[$pk])->update(['weigh' => $row[$pk]]);
}
});
}
public function getAddressTypeList()
{
return ['1' => __('Address_type 1'), '2' => __('Address_type 2')];
}
public function getStatusList()
{
return ['1' => __('Status 1'), '2' => __('Status 2'), '3' => __('Status 3')];
}
public function getRecommendList()
{
return ['0' => __('Recommend 0'), '1' => __('Recommend 1')];
}
public function getHotList()
{
return ['0' => __('Hot 0'), '1' => __('Hot 1')];
}
public function getNewList()
{
return ['0' => __('New 0'), '1' => __('New 1')];
}
public function getSelfhotList()
{
return ['0' => __('Selfhot 0'), '1' => __('Selfhot 1')];
}
public function getExpirestatusList()
{
return ['1' => __('Expirestatus 1'), '2' => __('Expirestatus 2')];
}
public function getAddTypeList()
{
return ['1' => __('Add_type 1'), '2' => __('Add_type 2')];
}
public function getAddressTypeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['address_type']) ? $data['address_type'] : '');
$list = $this->getAddressTypeList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getStartTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['start_time']) ? $data['start_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getEndTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['end_time']) ? $data['end_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getSignStartTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['sign_start_time']) ? $data['sign_start_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getSignEndTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['sign_end_time']) ? $data['sign_end_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
$list = $this->getStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getRecommendTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['recommend']) ? $data['recommend'] : '');
$list = $this->getRecommendList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getHotTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['hot']) ? $data['hot'] : '');
$list = $this->getHotList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getNewTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['new']) ? $data['new'] : '');
$list = $this->getNewList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getSelfhotTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['selfhot']) ? $data['selfhot'] : '');
$list = $this->getSelfhotList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getExpirestatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['expirestatus']) ? $data['expirestatus'] : '');
$list = $this->getExpirestatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getAddTypeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['add_type']) ? $data['add_type'] : '');
$list = $this->getAddTypeList();
return isset($list[$value]) ? $list[$value] : '';
}
protected function setStartTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setEndTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setSignStartTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setSignEndTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
public function activityorder()
{
return $this->belongsTo(Order::class, 'classes_activity_order_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function activity()
{
return $this->belongsTo(Activity::class, 'classes_activity_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function manystore()
{
return $this->belongsTo(Manystore::class, 'manystore_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function shop()
{
return $this->belongsTo(Shop::class, 'shop_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function user()
{
return $this->belongsTo('app\admin\model\User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}

View File

@ -0,0 +1,53 @@
<?php
namespace app\admin\model\school\classes\activity\order;
use think\Model;
use traits\model\SoftDelete;
class OrderLog extends Model
{
use SoftDelete;
// 表名
protected $name = 'school_classes_activity_order_log';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = 'deletetime';
// 追加属性
protected $append = [
'status_text'
];
public function getStatusList()
{
return ['-3' => __('Status -3'), '0' => __('Status 0'), '2' => __('Status 2'), '3' => __('Status 3'), '4' => __('Status 4'), '6' => __('Status 6'), '9' => __('Status 9')];
}
public function getStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
$list = $this->getStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function activityorder()
{
return $this->belongsTo(Order::class, 'classes_activity_order_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}

View File

@ -0,0 +1,27 @@
<?php
namespace app\admin\validate\school\classes\activity;
use think\Validate;
class Activity extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}

View File

@ -0,0 +1,27 @@
<?php
namespace app\admin\validate\school\classes\activity;
use think\Validate;
class ActivityAuth extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}

View File

@ -0,0 +1,27 @@
<?php
namespace app\admin\validate\school\classes\activity;
use think\Validate;
class ActivityItem extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}

View File

@ -0,0 +1,27 @@
<?php
namespace app\admin\validate\school\classes\activity;
use think\Validate;
class ActivityItemAuth extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}

View File

@ -0,0 +1,27 @@
<?php
namespace app\admin\validate\school\classes\activity\order;
use think\Validate;
class Order extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}

View File

@ -0,0 +1,27 @@
<?php
namespace app\admin\validate\school\classes\activity\order;
use think\Validate;
class OrderDetail extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}

View File

@ -0,0 +1,27 @@
<?php
namespace app\admin\validate\school\classes\activity\order;
use think\Validate;
class OrderLog extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}

View File

@ -0,0 +1,302 @@
<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">{:__('Shop_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-shop_id" data-rule="required" data-source="dyqc/manystore_shop/index" class="form-control selectpage" name="row[shop_id]" type="text" value="{$q_shop_id}">
<span style="color: red">
(没找到机构则点击按钮创建机构后重新下拉框选机构)
<a href="javascript:;" data-url="manystore/index/add" class="btn btn-success btn-changeuser {:$auth->check('manystore/index/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
</span>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Headimage')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-headimage" data-rule="required" class="form-control" size="50" name="row[headimage]" type="text">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="faupload-headimage" class="btn btn-danger faupload" data-input-id="c-headimage" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-headimage"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-headimage" class="btn btn-primary fachoose" data-input-id="c-headimage" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-headimage"></span>
</div>
<ul class="row list-inline faupload-preview" id="p-headimage"></ul>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-images" data-rule="required" class="form-control" size="50" name="row[images]" type="text">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-images"></span>
</div>
<ul class="row list-inline faupload-preview" id="p-images"></ul>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Item_json')}:</label>
<div class="col-xs-12 col-sm-8">
<table class="table table-responsive fieldlist" data-name="row[item_json]" data-template="testtpl" data-tag="tr">
<tr>
<td>活动项名</td>
<!-- <td>开始结束时间</td>-->
<td>限定人数</td>
<td>年龄限制</td>
<!-- <td>权重</td>-->
<td>是否上架</td>
<td>男女</td>
<td>价格</td>
<td></td>
</tr>
<tr>
<td colspan="5"><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> 追加</a></td>
</tr>
<textarea name="row[item_json]" id="item_json" class="form-control hide" cols="30" rows="8"></textarea>
</table>
<!-- <span style="color: red">(每个课时规格为当前课程的一节课,课程总共多少节课就需要上多少个课时规格,每个课时的开始和结束时间不能有重叠,单节课开始结束时间必须在同一天,后续有变更将触发审核机制!)</span>-->
<!--定义模板-->
<script type="text/html" id="testtpl">
<tr class="form-inline">
<td><input type="text" name="row[<%=name%>][<%=index%>][name]" data-rule="required" class="form-control" value="<%=row['name']%>" size="15" placeholder="活动项名"></td>
<!-- <td>-->
<!-- <input type="text" name="row[<%=name%>][<%=index%>][time]" data-rule="required" class="form-control datetimerange" data-time-picker="true" data-locale='{"format":"YYYY/MM/DD HH:mm"}' placeholder="指定开始结束时间" value="<%=row['time']%>" size="25" />-->
<!-- &lt;!&ndash;<input type="text" class="form-control datetimerange" name="updatetime" value="" placeholder="修改时间" id="updatetime" data-index="49" autocomplete="off">&ndash;&gt;-->
<!-- </td>-->
<td><input type="text" name="row[<%=name%>][<%=index%>][limit_num]" data-rule="required" class="form-control" value="<%=row['limit_num']%>" placeholder="限制人数" size="2" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')" onafterpaste="this.value=this.value.replace(/[^0-9]/g,'')"></td>
<td><input type="text" name="row[<%=name%>][<%=index%>][age]" data-rule="required" class="form-control" value="<%=row['age']%>" size="5" placeholder="年龄限制"></td>
<!-- <td><input type="text" name="row[<%=name%>][<%=index%>][weigh]" data-rule="required" class="form-control" value="<%=row['weigh']%>" size="2" placeholder="课时排序权重" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')" onafterpaste="this.value=this.value.replace(/[^0-9]/g,'')"></td>-->
<td>
<select class="form-control" name="row[<%=name%>][<%=index%>][status]">
{foreach name="itemStatusList" item="vo"}
<option value="{$key}" {in name="key" value="<%=row['status']%>"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</td>
<td>
<select class="form-control" name="row[<%=name%>][<%=index%>][sex]">
{foreach name="sexList" item="vo"}
<option value="{$key}" {in name="key" value="<%=row['sex']%>"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</td>
<td><input size="10" type="text" name="row[<%=name%>][<%=index%>][price]" data-rule="required" class="form-control" value="<%=row['price']%>" placeholder="价格" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')" onafterpaste="this.value=this.value.replace(/[^0-9]/g,'')"></td>
<td><span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span> <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span></td>
</tr>
</script>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Address_type')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="addressTypeList" item="vo"}
<label for="row[address_type]-{$key}"><input id="row[address_type]-{$key}" name="row[address_type]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label>
{/foreach}
<span style="color: red">( 如果选独立位置需填写具体位置信息! )</span>
</div>
</div>
</div>
<div id="c_position">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Address_city')}:</label>
<div class="col-xs-12 col-sm-8">
<div class='control-relative'>
<input id="c-address_city" class="form-control form-control" data-toggle="city-picker" name="row[address_city]" value="{$q_address_city}" type="text">
</div>
<input type="hidden" id="province" name="row[province]" value="{$q_province_code}" >
<input type="hidden" id="city" name="row[city]" value="{$q_city_code}" >
<input type="hidden" id="district" name="row[district]" value="{$q_area_code}" >
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
<div class="col-xs-12 col-sm-8">
<div class='control-relative'>
<input id="c-address" class="form-control form-control"
data-lat-id="c-latitude" data-lng-id="c-longitude" readonly data-input-id="c-address" data-toggle="addresspicker" name="row[address]" value="" type="text" placeholder="请地图选址。如调起地图失败请检查插件《地图位置(经纬度)选择》是否安装">
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Address_detail')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-address_detail" class="form-control" name="row[address_detail]" type="text" value="" placeholder="请输入{:__('Address_detail')}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Longitude')}:</label>
<div class="col-xs-12 col-sm-3">
<input id="c-longitude" readonly class="form-control" name="row[longitude]" type="text" value="">
</div>
<label class="control-label col-xs-12 col-sm-2">{:__('Latitude')}:</label>
<div class="col-xs-12 col-sm-3">
<input id="c-latitude" readonly class="form-control" name="row[latitude]" type="text" value="">
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('活动开始结束时间')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-time" class="form-control datetimerange" data-rule="required" data-time-picker="true" data-locale='{"format":"YYYY/MM/DD HH:mm"}' placeholder="指定开始结束时间" name="row[time]" type="text" value="{:date('Y-m-d 0:01')} - {:date('Y-m-d H:i')}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('报名开始结束时间')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sign_time" class="form-control datetimerange" data-rule="required" data-time-picker="true" data-locale='{"format":"YYYY/MM/DD HH:mm"}' placeholder="指定开始结束时间" name="row[sign_time]" type="text" value="{:date('Y-m-d 0:01')} - {:date('Y-m-d H:i')}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-price" data-rule="required" class="form-control" step="0.01" name="row[price]" type="number">
</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" 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">{:__('Item')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-item" class="form-control" name="row[item]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-content" data-rule="required" class="form-control editor" rows="5" name="row[content]" cols="50"></textarea>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="statusList" item="vo"}
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-weigh" class="form-control" name="row[weigh]" type="number" value="0">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Recommend')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-recommend" class="form-control selectpicker" name="row[recommend]">
{foreach name="recommendList" item="vo"}
<option value="{$key}" {in name="key" value="0"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Hot')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-hot" class="form-control selectpicker" name="row[hot]">
{foreach name="hotList" item="vo"}
<option value="{$key}" {in name="key" value="0"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('New')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-new" class="form-control selectpicker" name="row[new]">
{foreach name="newList" item="vo"}
<option value="{$key}" {in name="key" value="0"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Selfhot')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-selfhot" class="form-control selectpicker" name="row[selfhot]">
{foreach name="selfhotList" 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-primary btn-embossed disabled">{:__('OK')}</button>
</div>
</div>
</form>

View File

@ -0,0 +1,292 @@
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
{eq name="check_auth_data.address_citys" value="*"}
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Shop_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-shop_id" data-rule="required" data-source="dyqc/manystore_shop/index" class="form-control selectpage" name="row[shop_id]" type="text" value="{$row.shop_id|htmlentities}">
<span style="color: red">
(没找到机构则点击按钮创建机构后重新下拉框选机构)
<a href="javascript:;" data-url="manystore/index/add" class="btn btn-success btn-changeuser {:$auth->check('manystore/index/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
</span>
</div>
</div>
{/eq}
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" value="{$row.title|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Headimage')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-headimage" data-rule="required" class="form-control" size="50" name="row[headimage]" type="text" value="{$row.headimage|htmlentities}">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="faupload-headimage" class="btn btn-danger faupload" data-input-id="c-headimage" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-headimage"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-headimage" class="btn btn-primary fachoose" data-input-id="c-headimage" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-headimage"></span>
</div>
<ul class="row list-inline faupload-preview" id="p-headimage"></ul>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-images" data-rule="required" class="form-control" size="50" name="row[images]" type="text" value="{$row.images|htmlentities}">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-images"></span>
</div>
<ul class="row list-inline faupload-preview" id="p-images"></ul>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Item_json')}:</label>
<div class="col-xs-12 col-sm-8">
<table class="table table-responsive fieldlist" data-name="row[item_json]" data-template="testtpl" data-tag="tr">
<tr>
<td>活动项名</td>
<!-- <td>开始结束时间</td>-->
<td>限定人数</td>
<td>年龄限制</td>
<!-- <td>权重</td>-->
<td>是否上架</td>
<td>男女</td>
<td>价格</td>
<td></td>
</tr>
<tr>
<td colspan="5"><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> 追加</a></td>
</tr>
<textarea name="row[item_json]" id="item_json" class="form-control hide" cols="30" rows="8">{$row.item_json|htmlentities}</textarea>
</table>
<!-- <span style="color: red">(每个课时规格为当前课程的一节课,课程总共多少节课就需要上多少个课时规格,每个课时的开始和结束时间不能有重叠,单节课开始结束时间必须在同一天,后续有变更将触发审核机制!)</span>-->
<!--定义模板-->
<script type="text/html" id="testtpl">
<tr class="form-inline">
<td>
<input type="hidden" name="row[<%=name%>][<%=index%>][id]" class="form-control" value="<%=row['id']%>" size="20" >
<input type="text" name="row[<%=name%>][<%=index%>][name]" data-rule="required" class="form-control" value="<%=row['name']%>" size="15" placeholder="活动项名">
</td>
<!-- <td>-->
<!-- <input type="text" name="row[<%=name%>][<%=index%>][time]" data-rule="required" class="form-control datetimerange" data-time-picker="true" data-locale='{"format":"YYYY/MM/DD HH:mm"}' placeholder="指定开始结束时间" value="<%=row['time']%>" size="25" />-->
<!-- &lt;!&ndash;<input type="text" class="form-control datetimerange" name="updatetime" value="" placeholder="修改时间" id="updatetime" data-index="49" autocomplete="off">&ndash;&gt;-->
<!-- </td>-->
<td><input type="text" name="row[<%=name%>][<%=index%>][limit_num]" data-rule="required" class="form-control" value="<%=row['limit_num']%>" placeholder="限制人数" size="2" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')" onafterpaste="this.value=this.value.replace(/[^0-9]/g,'')"></td>
<td><input type="text" name="row[<%=name%>][<%=index%>][age]" data-rule="required" class="form-control" value="<%=row['age']%>" size="5" placeholder="年龄限制"></td>
<!-- <td><input type="text" name="row[<%=name%>][<%=index%>][weigh]" data-rule="required" class="form-control" value="<%=row['weigh']%>" size="2" placeholder="课时排序权重" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')" onafterpaste="this.value=this.value.replace(/[^0-9]/g,'')"></td>-->
<td>
<select class="form-control" name="row[<%=name%>][<%=index%>][status]">
{foreach name="itemStatusList" item="vo"}
<option value="{$key}" <%if(row.status=={$key}){%> selected <%}%> >{$vo}</option>
{/foreach}
</select>
</td>
<td>
<select class="form-control" name="row[<%=name%>][<%=index%>][sex]">
{foreach name="sexList" item="vo"}
<option value="{$key}" <%if(row.sex=={$key}){%> selected <%}%> >{$vo}</option>
{/foreach}
</select>
</td>
<td><input size="10" type="text" name="row[<%=name%>][<%=index%>][price]" data-rule="required" class="form-control" value="<%=row['price']%>" placeholder="价格" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')" onafterpaste="this.value=this.value.replace(/[^0-9]/g,'')"></td>
<td><span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span> <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span></td>
</tr>
</script>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Address_type')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="addressTypeList" item="vo"}
<label for="row[address_type]-{$key}"><input id="row[address_type]-{$key}" name="row[address_type]" type="radio" value="{$key}" {in name="key" value="$row.address_type"}checked{/in} /> {$vo}</label>
{/foreach}
<span style="color: red">( 如果选独立位置需填写具体位置信息! )</span>
</div>
</div>
</div>
<div id="c_position" {eq name="$row.address_type" value="1"} style="display: none" {/eq} >
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Address_city')}:</label>
<div class="col-xs-12 col-sm-8">
<div class='control-relative'>
<input id="c-address_city" class="form-control form-control" data-toggle="city-picker" name="row[address_city]" value="{$row.address_city}" type="text">
</div>
<input type="hidden" id="province" name="row[province]" value="{$row.province}" >
<input type="hidden" id="city" name="row[city]" value="{$row.city}" >
<input type="hidden" id="district" name="row[district]" value="{$row.district}" >
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
<div class="col-xs-12 col-sm-8">
<div class='control-relative'>
<input id="c-address" class="form-control form-control"
data-lat-id="c-latitude" data-lng-id="c-longitude" readonly data-input-id="c-address" data-toggle="addresspicker" name="row[address]" value="{$row.address}" type="text" placeholder="请地图选址。如调起地图失败请检查插件《地图位置(经纬度)选择》是否安装">
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Address_detail')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-address_detail" class="form-control" name="row[address_detail]" type="text" value="{$row.address_detail}" placeholder="请输入{:__('Address_detail')}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Longitude')}:</label>
<div class="col-xs-12 col-sm-3">
<input id="c-longitude" readonly class="form-control" name="row[longitude]" type="text" value="{$row.longitude}">
</div>
<label class="control-label col-xs-12 col-sm-2">{:__('Latitude')}:</label>
<div class="col-xs-12 col-sm-3">
<input id="c-latitude" readonly class="form-control" name="row[latitude]" type="text" value="{$row.latitude}">
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('活动开始结束时间')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-time" class="form-control datetimerange" data-rule="required" data-time-picker="true" data-locale='{"format":"YYYY/MM/DD HH:mm"}' placeholder="指定开始结束时间" name="row[time]" type="text" value="{:$row.start_time?datetime($row.start_time):''} - {:$row.end_time?datetime($row.end_time):''}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('报名开始结束时间')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sign_time" class="form-control datetimerange" data-rule="required" data-time-picker="true" data-locale='{"format":"YYYY/MM/DD HH:mm"}' placeholder="指定开始结束时间" name="row[sign_time]" type="text" value="{:$row.sign_start_time?datetime($row.sign_start_time):''} - {:$row.sign_end_time?datetime($row.sign_end_time):''}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-price" data-rule="required" class="form-control" step="0.01" name="row[price]" type="number" value="{$row.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" 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">{:__('Item')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-item" class="form-control" name="row[item]" type="text" value="{$row.item|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-content" data-rule="required" class="form-control editor" rows="5" name="row[content]" cols="50">{$row.content|htmlentities}</textarea>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="statusList" item="vo"}
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-weigh" class="form-control" name="row[weigh]" type="number" value="{$row.weigh|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Recommend')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-recommend" class="form-control selectpicker" name="row[recommend]">
{foreach name="recommendList" item="vo"}
<option value="{$key}" {in name="key" value="$row.recommend"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Hot')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-hot" class="form-control selectpicker" name="row[hot]">
{foreach name="hotList" item="vo"}
<option value="{$key}" {in name="key" value="$row.hot"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('New')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-new" class="form-control selectpicker" name="row[new]">
{foreach name="newList" item="vo"}
<option value="{$key}" {in name="key" value="$row.new"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Selfhot')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-selfhot" class="form-control selectpicker" name="row[selfhot]">
{foreach name="selfhotList" item="vo"}
<option value="{$key}" {in name="key" value="$row.selfhot"}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-primary btn-embossed disabled">{:__('OK')}</button>
</div>
</div>
</form>

View File

@ -0,0 +1,46 @@
<div class="panel panel-default panel-intro">
<div class="panel-heading">
{:build_heading(null,FALSE)}
<ul class="nav nav-tabs" data-field="status">
<li class="{:$Think.get.status === null ? 'active' : ''}"><a href="#t-all" data-value="" data-toggle="tab">{:__('All')}</a></li>
{foreach name="statusList" item="vo"}
<li class="{:$Think.get.status === (string)$key ? 'active' : ''}"><a href="#t-{$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>
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('school/classes/activity/activity/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('school/classes/activity/activity/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('school/classes/activity/activity/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
<div class="dropdown btn-group {:$auth->check('school/classes/activity/activity/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">
{foreach name="statusList" item="vo"}
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:" data-params="status={$key}">{:__('Set status to ' . $key)}</a></li>
{/foreach}
</ul>
</div>
<a class="btn btn-success btn-recyclebin btn-dialog {:$auth->check('school/classes/activity/activity/recyclebin')?'':'hide'}" href="school/classes/activity/activity/recyclebin" title="{:__('Recycle bin')}"><i class="fa fa-recycle"></i> {:__('Recycle bin')}</a>
</div>
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
data-operate-edit="{:$auth->check('school/classes/activity/activity/edit')}"
data-operate-del="{:$auth->check('school/classes/activity/activity/del')}"
width="100%">
</table>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,25 @@
<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">
{:build_toolbar('refresh')}
<a class="btn btn-info btn-multi btn-disabled disabled {:$auth->check('school/classes/activity/activity/restore')?'':'hide'}" href="javascript:;" data-url="school/classes/activity/activity/restore" data-action="restore"><i class="fa fa-rotate-left"></i> {:__('Restore')}</a>
<a class="btn btn-danger btn-multi btn-disabled disabled {:$auth->check('school/classes/activity/activity/destroy')?'':'hide'}" href="javascript:;" data-url="school/classes/activity/activity/destroy" data-action="destroy"><i class="fa fa-times"></i> {:__('Destroy')}</a>
<a class="btn btn-success btn-restoreall {:$auth->check('school/classes/activity/activity/restore')?'':'hide'}" href="javascript:;" data-url="school/classes/activity/activity/restore" title="{:__('Restore all')}"><i class="fa fa-rotate-left"></i> {:__('Restore all')}</a>
<a class="btn btn-danger btn-destroyall {:$auth->check('school/classes/activity/activity/destroy')?'':'hide'}" href="javascript:;" data-url="school/classes/activity/activity/destroy" title="{:__('Destroy all')}"><i class="fa fa-times"></i> {:__('Destroy all')}</a>
</div>
<table id="table" class="table table-striped table-bordered table-hover"
data-operate-restore="{:$auth->check('school/classes/activity/activity/restore')}"
data-operate-destroy="{:$auth->check('school/classes/activity/activity/destroy')}"
width="100%">
</table>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,307 @@
<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">{:__('Classes_activity_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-classes_activity_id" data-rule="required" data-source="school/classes/activity/index" class="form-control selectpage" name="row[classes_activity_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Manystore_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-manystore_id" data-rule="required" data-source="manystore/index" class="form-control selectpage" name="row[manystore_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Shop_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-shop_id" data-rule="required" data-source="manystore/shop/index" class="form-control selectpage" name="row[shop_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Headimage')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-headimage" data-rule="required" class="form-control" size="50" name="row[headimage]" type="text">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="faupload-headimage" class="btn btn-danger faupload" data-input-id="c-headimage" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-headimage"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-headimage" class="btn btn-primary fachoose" data-input-id="c-headimage" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-headimage"></span>
</div>
<ul class="row list-inline faupload-preview" id="p-headimage"></ul>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-images" data-rule="required" class="form-control" size="50" name="row[images]" type="text">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-images"></span>
</div>
<ul class="row list-inline faupload-preview" id="p-images"></ul>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Address_type')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-address_type" data-rule="required" class="form-control selectpicker" name="row[address_type]">
{foreach name="addressTypeList" item="vo"}
<option value="{$key}" {in name="key" value="1"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Address_city')}:</label>
<div class="col-xs-12 col-sm-8">
<div class='control-relative'><input id="c-address_city" class="form-control" data-toggle="city-picker" name="row[address_city]" type="text"></div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Province')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-province" class="form-control" name="row[province]" type="number">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('City')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-city" class="form-control" name="row[city]" type="number">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('District')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-district" class="form-control" name="row[district]" type="number">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-address" class="form-control" name="row[address]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Address_detail')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-address_detail" class="form-control" name="row[address_detail]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Longitude')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-longitude" class="form-control" name="row[longitude]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Latitude')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-latitude" class="form-control" name="row[latitude]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Start_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-start_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[start_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">{:__('End_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-end_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[end_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">{:__('Sign_start_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sign_start_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[sign_start_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">{:__('Sign_end_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sign_end_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[sign_end_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">{:__('Price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-price" data-rule="required" class="form-control" step="0.01" name="row[price]" type="number">
</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" 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">{:__('Item')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-item" class="form-control" name="row[item]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-content" data-rule="required" class="form-control editor" rows="5" name="row[content]" cols="50"></textarea>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="statusList" item="vo"}
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-weigh" class="form-control" name="row[weigh]" type="number" value="0">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Recommend')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-recommend" class="form-control selectpicker" name="row[recommend]">
{foreach name="recommendList" item="vo"}
<option value="{$key}" {in name="key" value="0"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Hot')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-hot" class="form-control selectpicker" name="row[hot]">
{foreach name="hotList" item="vo"}
<option value="{$key}" {in name="key" value="0"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('New')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-new" class="form-control selectpicker" name="row[new]">
{foreach name="newList" item="vo"}
<option value="{$key}" {in name="key" value="0"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Selfhot')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-selfhot" class="form-control selectpicker" name="row[selfhot]">
{foreach name="selfhotList" item="vo"}
<option value="{$key}" {in name="key" value="0"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Auth_status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="authStatusList" item="vo"}
<label for="row[auth_status]-{$key}"><input id="row[auth_status]-{$key}" name="row[auth_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">{:__('Reason')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-reason" class="form-control" name="row[reason]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Sale')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sale" class="form-control" name="row[sale]" type="number" value="0">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Stock')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-stock" class="form-control" name="row[stock]" type="number">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Views')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-views" class="form-control" name="row[views]" type="number" value="0">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Expirestatus')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="expirestatusList" item="vo"}
<label for="row[expirestatus]-{$key}"><input id="row[expirestatus]-{$key}" name="row[expirestatus]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Add_type')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-add_type" data-rule="required" class="form-control selectpicker" name="row[add_type]">
{foreach name="addTypeList" item="vo"}
<option value="{$key}" {in name="key" value="2"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Add_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-add_id" data-rule="required" data-source="add/index" class="form-control selectpage" name="row[add_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Auth_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-auth_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[auth_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-primary btn-embossed disabled">{:__('OK')}</button>
</div>
</div>
</form>

View File

@ -0,0 +1,307 @@
<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">{:__('Classes_activity_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-classes_activity_id" data-rule="required" data-source="school/classes/activity/index" class="form-control selectpage" name="row[classes_activity_id]" type="text" value="{$row.classes_activity_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Manystore_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-manystore_id" data-rule="required" data-source="manystore/index" class="form-control selectpage" name="row[manystore_id]" type="text" value="{$row.manystore_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Shop_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-shop_id" data-rule="required" data-source="manystore/shop/index" class="form-control selectpage" name="row[shop_id]" type="text" value="{$row.shop_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" value="{$row.title|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Headimage')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-headimage" data-rule="required" class="form-control" size="50" name="row[headimage]" type="text" value="{$row.headimage|htmlentities}">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="faupload-headimage" class="btn btn-danger faupload" data-input-id="c-headimage" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-headimage"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-headimage" class="btn btn-primary fachoose" data-input-id="c-headimage" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-headimage"></span>
</div>
<ul class="row list-inline faupload-preview" id="p-headimage"></ul>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-images" data-rule="required" class="form-control" size="50" name="row[images]" type="text" value="{$row.images|htmlentities}">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-images"></span>
</div>
<ul class="row list-inline faupload-preview" id="p-images"></ul>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Address_type')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-address_type" data-rule="required" class="form-control selectpicker" name="row[address_type]">
{foreach name="addressTypeList" item="vo"}
<option value="{$key}" {in name="key" value="$row.address_type"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Address_city')}:</label>
<div class="col-xs-12 col-sm-8">
<div class='control-relative'><input id="c-address_city" class="form-control" data-toggle="city-picker" name="row[address_city]" type="text" value="{$row.address_city|htmlentities}"></div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Province')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-province" class="form-control" name="row[province]" type="number" value="{$row.province|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('City')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-city" class="form-control" name="row[city]" type="number" value="{$row.city|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('District')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-district" class="form-control" name="row[district]" type="number" value="{$row.district|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-address" class="form-control" name="row[address]" type="text" value="{$row.address|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Address_detail')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-address_detail" class="form-control" name="row[address_detail]" type="text" value="{$row.address_detail|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Longitude')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-longitude" class="form-control" name="row[longitude]" type="text" value="{$row.longitude|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Latitude')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-latitude" class="form-control" name="row[latitude]" type="text" value="{$row.latitude|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Start_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-start_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[start_time]" type="text" value="{:$row.start_time?datetime($row.start_time):''}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('End_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-end_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[end_time]" type="text" value="{:$row.end_time?datetime($row.end_time):''}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Sign_start_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sign_start_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[sign_start_time]" type="text" value="{:$row.sign_start_time?datetime($row.sign_start_time):''}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Sign_end_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sign_end_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[sign_end_time]" type="text" value="{:$row.sign_end_time?datetime($row.sign_end_time):''}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-price" data-rule="required" class="form-control" step="0.01" name="row[price]" type="number" value="{$row.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" 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">{:__('Item')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-item" class="form-control" name="row[item]" type="text" value="{$row.item|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-content" data-rule="required" class="form-control editor" rows="5" name="row[content]" cols="50">{$row.content|htmlentities}</textarea>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="statusList" item="vo"}
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-weigh" class="form-control" name="row[weigh]" type="number" value="{$row.weigh|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Recommend')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-recommend" class="form-control selectpicker" name="row[recommend]">
{foreach name="recommendList" item="vo"}
<option value="{$key}" {in name="key" value="$row.recommend"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Hot')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-hot" class="form-control selectpicker" name="row[hot]">
{foreach name="hotList" item="vo"}
<option value="{$key}" {in name="key" value="$row.hot"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('New')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-new" class="form-control selectpicker" name="row[new]">
{foreach name="newList" item="vo"}
<option value="{$key}" {in name="key" value="$row.new"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Selfhot')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-selfhot" class="form-control selectpicker" name="row[selfhot]">
{foreach name="selfhotList" item="vo"}
<option value="{$key}" {in name="key" value="$row.selfhot"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Auth_status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="authStatusList" item="vo"}
<label for="row[auth_status]-{$key}"><input id="row[auth_status]-{$key}" name="row[auth_status]" type="radio" value="{$key}" {in name="key" value="$row.auth_status"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Reason')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-reason" class="form-control" name="row[reason]" type="text" value="{$row.reason|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Sale')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sale" class="form-control" name="row[sale]" type="number" value="{$row.sale|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Stock')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-stock" class="form-control" name="row[stock]" type="number" value="{$row.stock|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Views')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-views" class="form-control" name="row[views]" type="number" value="{$row.views|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Expirestatus')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="expirestatusList" item="vo"}
<label for="row[expirestatus]-{$key}"><input id="row[expirestatus]-{$key}" name="row[expirestatus]" type="radio" value="{$key}" {in name="key" value="$row.expirestatus"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Add_type')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-add_type" data-rule="required" class="form-control selectpicker" name="row[add_type]">
{foreach name="addTypeList" item="vo"}
<option value="{$key}" {in name="key" value="$row.add_type"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Add_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-add_id" data-rule="required" data-source="add/index" class="form-control selectpage" name="row[add_id]" type="text" value="{$row.add_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Auth_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-auth_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[auth_time]" type="text" value="{:$row.auth_time?datetime($row.auth_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-primary btn-embossed disabled">{:__('OK')}</button>
</div>
</div>
</form>

View File

@ -0,0 +1,46 @@
<div class="panel panel-default panel-intro">
<div class="panel-heading">
{:build_heading(null,FALSE)}
<ul class="nav nav-tabs" data-field="auth_status">
<li class="{:$Think.get.auth_status === null ? 'active' : ''}"><a href="#t-all" data-value="" data-toggle="tab">{:__('All')}</a></li>
{foreach name="authStatusList" item="vo"}
<li class="{:$Think.get.auth_status === (string)$key ? 'active' : ''}"><a href="#t-{$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>
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('school/classes/activity/activity_auth/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('school/classes/activity/activity_auth/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('school/classes/activity/activity_auth/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
<div class="dropdown btn-group {:$auth->check('school/classes/activity/activity_auth/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">
{foreach name="authStatusList" item="vo"}
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:" data-params="auth_status={$key}">{:__('Set auth_status to ' . $key)}</a></li>
{/foreach}
</ul>
</div>
<a class="btn btn-success btn-recyclebin btn-dialog {:$auth->check('school/classes/activity/activity_auth/recyclebin')?'':'hide'}" href="school/classes/activity/activity_auth/recyclebin" title="{:__('Recycle bin')}"><i class="fa fa-recycle"></i> {:__('Recycle bin')}</a>
</div>
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
data-operate-edit="{:$auth->check('school/classes/activity/activity_auth/edit')}"
data-operate-del="{:$auth->check('school/classes/activity/activity_auth/del')}"
width="100%">
</table>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,25 @@
<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">
{:build_toolbar('refresh')}
<a class="btn btn-info btn-multi btn-disabled disabled {:$auth->check('school/classes/activity/activity_auth/restore')?'':'hide'}" href="javascript:;" data-url="school/classes/activity/activity_auth/restore" data-action="restore"><i class="fa fa-rotate-left"></i> {:__('Restore')}</a>
<a class="btn btn-danger btn-multi btn-disabled disabled {:$auth->check('school/classes/activity/activity_auth/destroy')?'':'hide'}" href="javascript:;" data-url="school/classes/activity/activity_auth/destroy" data-action="destroy"><i class="fa fa-times"></i> {:__('Destroy')}</a>
<a class="btn btn-success btn-restoreall {:$auth->check('school/classes/activity/activity_auth/restore')?'':'hide'}" href="javascript:;" data-url="school/classes/activity/activity_auth/restore" title="{:__('Restore all')}"><i class="fa fa-rotate-left"></i> {:__('Restore all')}</a>
<a class="btn btn-danger btn-destroyall {:$auth->check('school/classes/activity/activity_auth/destroy')?'':'hide'}" href="javascript:;" data-url="school/classes/activity/activity_auth/destroy" title="{:__('Destroy all')}"><i class="fa fa-times"></i> {:__('Destroy all')}</a>
</div>
<table id="table" class="table table-striped table-bordered table-hover"
data-operate-restore="{:$auth->check('school/classes/activity/activity_auth/restore')}"
data-operate-destroy="{:$auth->check('school/classes/activity/activity_auth/destroy')}"
width="100%">
</table>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,93 @@
<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">{:__('Manystore_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-manystore_id" data-rule="required" data-source="manystore/index" class="form-control selectpage" name="row[manystore_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Shop_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-shop_id" data-rule="required" data-source="manystore/shop/index" class="form-control selectpage" name="row[shop_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Classes_activity_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-classes_activity_id" data-rule="required" data-source="school/classes/activity/index" class="form-control selectpage" name="row[classes_activity_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-price" data-rule="required" class="form-control" step="0.01" name="row[price]" type="number">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Limit_num')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-limit_num" class="form-control" name="row[limit_num]" type="number" value="0">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Age')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-age" class="form-control" name="row[age]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="statusList" item="vo"}
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Sex')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-sex" data-rule="required" class="form-control selectpicker" name="row[sex]">
{foreach name="sexList" item="vo"}
<option value="{$key}" {in name="key" value="1"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-weigh" class="form-control" name="row[weigh]" type="number" value="0">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Sign_num')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sign_num" class="form-control" name="row[sign_num]" type="number" value="0">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Verification_num')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-verification_num" class="form-control" name="row[verification_num]" type="number">
</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-primary btn-embossed disabled">{:__('OK')}</button>
</div>
</div>
</form>

View File

@ -0,0 +1,93 @@
<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">{:__('Manystore_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-manystore_id" data-rule="required" data-source="manystore/index" class="form-control selectpage" name="row[manystore_id]" type="text" value="{$row.manystore_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Shop_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-shop_id" data-rule="required" data-source="manystore/shop/index" class="form-control selectpage" name="row[shop_id]" type="text" value="{$row.shop_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Classes_activity_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-classes_activity_id" data-rule="required" data-source="school/classes/activity/index" class="form-control selectpage" name="row[classes_activity_id]" type="text" value="{$row.classes_activity_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-price" data-rule="required" class="form-control" step="0.01" name="row[price]" type="number" value="{$row.price|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Limit_num')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-limit_num" class="form-control" name="row[limit_num]" type="number" value="{$row.limit_num|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Age')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-age" class="form-control" name="row[age]" type="text" value="{$row.age|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="statusList" item="vo"}
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Sex')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-sex" data-rule="required" class="form-control selectpicker" name="row[sex]">
{foreach name="sexList" item="vo"}
<option value="{$key}" {in name="key" value="$row.sex"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-weigh" class="form-control" name="row[weigh]" type="number" value="{$row.weigh|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Sign_num')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sign_num" class="form-control" name="row[sign_num]" type="number" value="{$row.sign_num|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Verification_num')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-verification_num" class="form-control" name="row[verification_num]" type="number" value="{$row.verification_num|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-primary btn-embossed disabled">{:__('OK')}</button>
</div>
</div>
</form>

View File

@ -0,0 +1,46 @@
<div class="panel panel-default panel-intro">
<div class="panel-heading">
{:build_heading(null,FALSE)}
<ul class="nav nav-tabs" data-field="status">
<li class="{:$Think.get.status === null ? 'active' : ''}"><a href="#t-all" data-value="" data-toggle="tab">{:__('All')}</a></li>
{foreach name="statusList" item="vo"}
<li class="{:$Think.get.status === (string)$key ? 'active' : ''}"><a href="#t-{$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>
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('school/classes/activity/activity_item/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('school/classes/activity/activity_item/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('school/classes/activity/activity_item/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
<div class="dropdown btn-group {:$auth->check('school/classes/activity/activity_item/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">
{foreach name="statusList" item="vo"}
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:" data-params="status={$key}">{:__('Set status to ' . $key)}</a></li>
{/foreach}
</ul>
</div>
<a class="btn btn-success btn-recyclebin btn-dialog {:$auth->check('school/classes/activity/activity_item/recyclebin')?'':'hide'}" href="school/classes/activity/activity_item/recyclebin" title="{:__('Recycle bin')}"><i class="fa fa-recycle"></i> {:__('Recycle bin')}</a>
</div>
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
data-operate-edit="{:$auth->check('school/classes/activity/activity_item/edit')}"
data-operate-del="{:$auth->check('school/classes/activity/activity_item/del')}"
width="100%">
</table>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,25 @@
<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">
{:build_toolbar('refresh')}
<a class="btn btn-info btn-multi btn-disabled disabled {:$auth->check('school/classes/activity/activity_item/restore')?'':'hide'}" href="javascript:;" data-url="school/classes/activity/activity_item/restore" data-action="restore"><i class="fa fa-rotate-left"></i> {:__('Restore')}</a>
<a class="btn btn-danger btn-multi btn-disabled disabled {:$auth->check('school/classes/activity/activity_item/destroy')?'':'hide'}" href="javascript:;" data-url="school/classes/activity/activity_item/destroy" data-action="destroy"><i class="fa fa-times"></i> {:__('Destroy')}</a>
<a class="btn btn-success btn-restoreall {:$auth->check('school/classes/activity/activity_item/restore')?'':'hide'}" href="javascript:;" data-url="school/classes/activity/activity_item/restore" title="{:__('Restore all')}"><i class="fa fa-rotate-left"></i> {:__('Restore all')}</a>
<a class="btn btn-danger btn-destroyall {:$auth->check('school/classes/activity/activity_item/destroy')?'':'hide'}" href="javascript:;" data-url="school/classes/activity/activity_item/destroy" title="{:__('Destroy all')}"><i class="fa fa-times"></i> {:__('Destroy all')}</a>
</div>
<table id="table" class="table table-striped table-bordered table-hover"
data-operate-restore="{:$auth->check('school/classes/activity/activity_item/restore')}"
data-operate-destroy="{:$auth->check('school/classes/activity/activity_item/destroy')}"
width="100%">
</table>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,93 @@
<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">{:__('Manystore_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-manystore_id" data-rule="required" data-source="manystore/index" class="form-control selectpage" name="row[manystore_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Shop_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-shop_id" data-rule="required" data-source="manystore/shop/index" class="form-control selectpage" name="row[shop_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Classes_activity_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-classes_activity_id" data-rule="required" data-source="school/classes/activity/index" class="form-control selectpage" name="row[classes_activity_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-price" data-rule="required" class="form-control" step="0.01" name="row[price]" type="number">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Limit_num')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-limit_num" class="form-control" name="row[limit_num]" type="number" value="0">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Age')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-age" class="form-control" name="row[age]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="statusList" item="vo"}
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Sex')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-sex" data-rule="required" class="form-control selectpicker" name="row[sex]">
{foreach name="sexList" item="vo"}
<option value="{$key}" {in name="key" value="1"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-weigh" class="form-control" name="row[weigh]" type="number" value="0">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Sign_num')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sign_num" class="form-control" name="row[sign_num]" type="number" value="0">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Verification_num')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-verification_num" class="form-control" name="row[verification_num]" type="number">
</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-primary btn-embossed disabled">{:__('OK')}</button>
</div>
</div>
</form>

View File

@ -0,0 +1,93 @@
<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">{:__('Manystore_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-manystore_id" data-rule="required" data-source="manystore/index" class="form-control selectpage" name="row[manystore_id]" type="text" value="{$row.manystore_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Shop_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-shop_id" data-rule="required" data-source="manystore/shop/index" class="form-control selectpage" name="row[shop_id]" type="text" value="{$row.shop_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Classes_activity_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-classes_activity_id" data-rule="required" data-source="school/classes/activity/index" class="form-control selectpage" name="row[classes_activity_id]" type="text" value="{$row.classes_activity_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-price" data-rule="required" class="form-control" step="0.01" name="row[price]" type="number" value="{$row.price|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Limit_num')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-limit_num" class="form-control" name="row[limit_num]" type="number" value="{$row.limit_num|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Age')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-age" class="form-control" name="row[age]" type="text" value="{$row.age|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="statusList" item="vo"}
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Sex')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-sex" data-rule="required" class="form-control selectpicker" name="row[sex]">
{foreach name="sexList" item="vo"}
<option value="{$key}" {in name="key" value="$row.sex"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-weigh" class="form-control" name="row[weigh]" type="number" value="{$row.weigh|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Sign_num')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sign_num" class="form-control" name="row[sign_num]" type="number" value="{$row.sign_num|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Verification_num')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-verification_num" class="form-control" name="row[verification_num]" type="number" value="{$row.verification_num|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-primary btn-embossed disabled">{:__('OK')}</button>
</div>
</div>
</form>

View File

@ -0,0 +1,46 @@
<div class="panel panel-default panel-intro">
<div class="panel-heading">
{:build_heading(null,FALSE)}
<ul class="nav nav-tabs" data-field="status">
<li class="{:$Think.get.status === null ? 'active' : ''}"><a href="#t-all" data-value="" data-toggle="tab">{:__('All')}</a></li>
{foreach name="statusList" item="vo"}
<li class="{:$Think.get.status === (string)$key ? 'active' : ''}"><a href="#t-{$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>
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('school/classes/activity/activity_item_auth/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('school/classes/activity/activity_item_auth/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('school/classes/activity/activity_item_auth/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
<div class="dropdown btn-group {:$auth->check('school/classes/activity/activity_item_auth/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">
{foreach name="statusList" item="vo"}
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:" data-params="status={$key}">{:__('Set status to ' . $key)}</a></li>
{/foreach}
</ul>
</div>
<a class="btn btn-success btn-recyclebin btn-dialog {:$auth->check('school/classes/activity/activity_item_auth/recyclebin')?'':'hide'}" href="school/classes/activity/activity_item_auth/recyclebin" title="{:__('Recycle bin')}"><i class="fa fa-recycle"></i> {:__('Recycle bin')}</a>
</div>
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
data-operate-edit="{:$auth->check('school/classes/activity/activity_item_auth/edit')}"
data-operate-del="{:$auth->check('school/classes/activity/activity_item_auth/del')}"
width="100%">
</table>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,25 @@
<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">
{:build_toolbar('refresh')}
<a class="btn btn-info btn-multi btn-disabled disabled {:$auth->check('school/classes/activity/activity_item_auth/restore')?'':'hide'}" href="javascript:;" data-url="school/classes/activity/activity_item_auth/restore" data-action="restore"><i class="fa fa-rotate-left"></i> {:__('Restore')}</a>
<a class="btn btn-danger btn-multi btn-disabled disabled {:$auth->check('school/classes/activity/activity_item_auth/destroy')?'':'hide'}" href="javascript:;" data-url="school/classes/activity/activity_item_auth/destroy" data-action="destroy"><i class="fa fa-times"></i> {:__('Destroy')}</a>
<a class="btn btn-success btn-restoreall {:$auth->check('school/classes/activity/activity_item_auth/restore')?'':'hide'}" href="javascript:;" data-url="school/classes/activity/activity_item_auth/restore" title="{:__('Restore all')}"><i class="fa fa-rotate-left"></i> {:__('Restore all')}</a>
<a class="btn btn-danger btn-destroyall {:$auth->check('school/classes/activity/activity_item_auth/destroy')?'':'hide'}" href="javascript:;" data-url="school/classes/activity/activity_item_auth/destroy" title="{:__('Destroy all')}"><i class="fa fa-times"></i> {:__('Destroy all')}</a>
</div>
<table id="table" class="table table-striped table-bordered table-hover"
data-operate-restore="{:$auth->check('school/classes/activity/activity_item_auth/restore')}"
data-operate-destroy="{:$auth->check('school/classes/activity/activity_item_auth/destroy')}"
width="100%">
</table>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,269 @@
<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">{:__('Order_no')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-order_no" class="form-control" name="row[order_no]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_no')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-pay_no" class="form-control" name="row[pay_no]" type="text">
</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">{:__('Manystore_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-manystore_id" data-rule="required" data-source="manystore/index" class="form-control selectpage" name="row[manystore_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Shop_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-shop_id" data-rule="required" data-source="manystore/shop/index" class="form-control selectpage" name="row[shop_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Code')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-code" class="form-control" name="row[code]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Codeimage')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-codeimage" class="form-control" size="50" name="row[codeimage]" type="text">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="faupload-codeimage" class="btn btn-danger faupload" data-input-id="c-codeimage" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-codeimage"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-codeimage" class="btn btn-primary fachoose" data-input-id="c-codeimage" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-codeimage"></span>
</div>
<ul class="row list-inline faupload-preview" id="p-codeimage"></ul>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Codeoneimage')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-codeoneimage" class="form-control" size="50" name="row[codeoneimage]" type="text">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="faupload-codeoneimage" class="btn btn-danger faupload" data-input-id="c-codeoneimage" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-codeoneimage"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-codeoneimage" class="btn btn-primary fachoose" data-input-id="c-codeoneimage" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-codeoneimage"></span>
</div>
<ul class="row list-inline faupload-preview" id="p-codeoneimage"></ul>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Classes_activity_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-classes_activity_id" data-rule="required" data-source="school/classes/activity/index" class="form-control selectpage" name="row[classes_activity_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Activity_order_detail_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-activity_order_detail_id" data-rule="required" data-source="school/classes/activity/order/detail/index" class="form-control selectpage" name="row[activity_order_detail_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Beforeprice')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-beforeprice" class="form-control" step="0.01" name="row[beforeprice]" type="number">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Totalprice')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-totalprice" class="form-control" step="0.01" name="row[totalprice]" type="number">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Payprice')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-payprice" class="form-control" step="0.01" name="row[payprice]" type="number">
</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" class="form-control selectpicker" name="row[pay_type]">
{foreach name="payTypeList" item="vo"}
<option value="{$key}" {in name="key" value="wechat"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="statusList" item="vo"}
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="-3"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Before_status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="beforeStatusList" item="vo"}
<label for="row[before_status]-{$key}"><input id="row[before_status]-{$key}" name="row[before_status]" type="radio" value="{$key}" {in name="key" value="-3"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Server_status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="serverStatusList" item="vo"}
<label for="row[server_status]-{$key}"><input id="row[server_status]-{$key}" name="row[server_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">{:__('Canceltime')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-canceltime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[canceltime]" 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">{:__('Paytime')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-paytime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[paytime]" 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">{:__('Auth_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-auth_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[auth_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">{:__('Reservation_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-reservation_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[reservation_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">{:__('Finishtime')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-finishtime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[finishtime]" 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">{:__('Refundtime')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-refundtime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[refundtime]" 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">{:__('Total_refundprice')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-total_refundprice" class="form-control" step="0.01" name="row[total_refundprice]" type="number">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Real_refundprice')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-real_refundprice" class="form-control" step="0.01" name="row[real_refundprice]" type="number">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Sub_refundprice')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sub_refundprice" class="form-control" step="0.01" name="row[sub_refundprice]" type="number">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_json')}:</label>
<div class="col-xs-12 col-sm-8">
<dl class="fieldlist" data-name="row[pay_json]">
<dd>
<ins>{:__('Key')}</ins>
<ins>{:__('Value')}</ins>
</dd>
<dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
<textarea name="row[pay_json]" class="form-control hide" cols="30" rows="5"></textarea>
</dl>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Platform')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-platform" class="form-control" name="row[platform]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Verification_user_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-verification_user_id" data-rule="required" data-source="verification/user/index" class="form-control selectpage" name="row[verification_user_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Verification_type')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-verification_type" class="form-control" name="row[verification_type]" type="text" value="0">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Reason')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-reason" class="form-control" name="row[reason]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Auth_status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="authStatusList" item="vo"}
<label for="row[auth_status]-{$key}"><input id="row[auth_status]-{$key}" name="row[auth_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">{:__('Auth_user_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-auth_user_id" data-rule="required" data-source="auth/user/index" class="form-control selectpage" name="row[auth_user_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Auth_type')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-auth_type" class="form-control" name="row[auth_type]" type="text" 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-primary btn-embossed disabled">{:__('OK')}</button>
</div>
</div>
</form>

View File

@ -0,0 +1,269 @@
<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">{:__('Order_no')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-order_no" class="form-control" name="row[order_no]" type="text" value="{$row.order_no|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_no')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-pay_no" class="form-control" name="row[pay_no]" type="text" value="{$row.pay_no|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">{:__('Manystore_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-manystore_id" data-rule="required" data-source="manystore/index" class="form-control selectpage" name="row[manystore_id]" type="text" value="{$row.manystore_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Shop_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-shop_id" data-rule="required" data-source="manystore/shop/index" class="form-control selectpage" name="row[shop_id]" type="text" value="{$row.shop_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Code')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-code" class="form-control" name="row[code]" type="text" value="{$row.code|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Codeimage')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-codeimage" class="form-control" size="50" name="row[codeimage]" type="text" value="{$row.codeimage|htmlentities}">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="faupload-codeimage" class="btn btn-danger faupload" data-input-id="c-codeimage" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-codeimage"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-codeimage" class="btn btn-primary fachoose" data-input-id="c-codeimage" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-codeimage"></span>
</div>
<ul class="row list-inline faupload-preview" id="p-codeimage"></ul>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Codeoneimage')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-codeoneimage" class="form-control" size="50" name="row[codeoneimage]" type="text" value="{$row.codeoneimage|htmlentities}">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="faupload-codeoneimage" class="btn btn-danger faupload" data-input-id="c-codeoneimage" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-codeoneimage"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-codeoneimage" class="btn btn-primary fachoose" data-input-id="c-codeoneimage" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-codeoneimage"></span>
</div>
<ul class="row list-inline faupload-preview" id="p-codeoneimage"></ul>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Classes_activity_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-classes_activity_id" data-rule="required" data-source="school/classes/activity/index" class="form-control selectpage" name="row[classes_activity_id]" type="text" value="{$row.classes_activity_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Activity_order_detail_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-activity_order_detail_id" data-rule="required" data-source="school/classes/activity/order/detail/index" class="form-control selectpage" name="row[activity_order_detail_id]" type="text" value="{$row.activity_order_detail_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Beforeprice')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-beforeprice" class="form-control" step="0.01" name="row[beforeprice]" type="number" value="{$row.beforeprice|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Totalprice')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-totalprice" class="form-control" step="0.01" name="row[totalprice]" type="number" value="{$row.totalprice|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Payprice')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-payprice" class="form-control" step="0.01" name="row[payprice]" type="number" value="{$row.payprice|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" 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">{:__('Status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="statusList" item="vo"}
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Before_status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="beforeStatusList" item="vo"}
<label for="row[before_status]-{$key}"><input id="row[before_status]-{$key}" name="row[before_status]" type="radio" value="{$key}" {in name="key" value="$row.before_status"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Server_status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="serverStatusList" item="vo"}
<label for="row[server_status]-{$key}"><input id="row[server_status]-{$key}" name="row[server_status]" type="radio" value="{$key}" {in name="key" value="$row.server_status"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Canceltime')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-canceltime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[canceltime]" type="text" value="{:$row.canceltime?datetime($row.canceltime):''}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Paytime')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-paytime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[paytime]" type="text" value="{:$row.paytime?datetime($row.paytime):''}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Auth_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-auth_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[auth_time]" type="text" value="{:$row.auth_time?datetime($row.auth_time):''}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Reservation_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-reservation_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[reservation_time]" type="text" value="{:$row.reservation_time?datetime($row.reservation_time):''}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Finishtime')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-finishtime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[finishtime]" type="text" value="{:$row.finishtime?datetime($row.finishtime):''}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Refundtime')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-refundtime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[refundtime]" type="text" value="{:$row.refundtime?datetime($row.refundtime):''}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Total_refundprice')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-total_refundprice" class="form-control" step="0.01" name="row[total_refundprice]" type="number" value="{$row.total_refundprice|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Real_refundprice')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-real_refundprice" class="form-control" step="0.01" name="row[real_refundprice]" type="number" value="{$row.real_refundprice|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Sub_refundprice')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sub_refundprice" class="form-control" step="0.01" name="row[sub_refundprice]" type="number" value="{$row.sub_refundprice|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_json')}:</label>
<div class="col-xs-12 col-sm-8">
<dl class="fieldlist" data-name="row[pay_json]">
<dd>
<ins>{:__('Key')}</ins>
<ins>{:__('Value')}</ins>
</dd>
<dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>
<textarea name="row[pay_json]" class="form-control hide" cols="30" rows="5">{$row.pay_json|htmlentities}</textarea>
</dl>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Platform')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-platform" class="form-control" name="row[platform]" type="text" value="{$row.platform|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Verification_user_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-verification_user_id" data-rule="required" data-source="verification/user/index" class="form-control selectpage" name="row[verification_user_id]" type="text" value="{$row.verification_user_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Verification_type')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-verification_type" class="form-control" name="row[verification_type]" type="text" value="{$row.verification_type|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Reason')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-reason" class="form-control" name="row[reason]" type="text" value="{$row.reason|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Auth_status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="authStatusList" item="vo"}
<label for="row[auth_status]-{$key}"><input id="row[auth_status]-{$key}" name="row[auth_status]" type="radio" value="{$key}" {in name="key" value="$row.auth_status"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Auth_user_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-auth_user_id" data-rule="required" data-source="auth/user/index" class="form-control selectpage" name="row[auth_user_id]" type="text" value="{$row.auth_user_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Auth_type')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-auth_type" class="form-control" name="row[auth_type]" type="text" value="{$row.auth_type|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-primary btn-embossed disabled">{:__('OK')}</button>
</div>
</div>
</form>

View File

@ -0,0 +1,46 @@
<div class="panel panel-default panel-intro">
<div class="panel-heading">
{:build_heading(null,FALSE)}
<ul class="nav nav-tabs" data-field="status">
<li class="{:$Think.get.status === null ? 'active' : ''}"><a href="#t-all" data-value="" data-toggle="tab">{:__('All')}</a></li>
{foreach name="statusList" item="vo"}
<li class="{:$Think.get.status === (string)$key ? 'active' : ''}"><a href="#t-{$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>
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('school/classes/activity/order/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('school/classes/activity/order/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('school/classes/activity/order/order/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
<div class="dropdown btn-group {:$auth->check('school/classes/activity/order/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">
{foreach name="statusList" item="vo"}
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:" data-params="status={$key}">{:__('Set status to ' . $key)}</a></li>
{/foreach}
</ul>
</div>
<a class="btn btn-success btn-recyclebin btn-dialog {:$auth->check('school/classes/activity/order/order/recyclebin')?'':'hide'}" href="school/classes/activity/order/order/recyclebin" title="{:__('Recycle bin')}"><i class="fa fa-recycle"></i> {:__('Recycle bin')}</a>
</div>
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
data-operate-edit="{:$auth->check('school/classes/activity/order/order/edit')}"
data-operate-del="{:$auth->check('school/classes/activity/order/order/del')}"
width="100%">
</table>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,25 @@
<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">
{:build_toolbar('refresh')}
<a class="btn btn-info btn-multi btn-disabled disabled {:$auth->check('school/classes/activity/order/order/restore')?'':'hide'}" href="javascript:;" data-url="school/classes/activity/order/order/restore" data-action="restore"><i class="fa fa-rotate-left"></i> {:__('Restore')}</a>
<a class="btn btn-danger btn-multi btn-disabled disabled {:$auth->check('school/classes/activity/order/order/destroy')?'':'hide'}" href="javascript:;" data-url="school/classes/activity/order/order/destroy" data-action="destroy"><i class="fa fa-times"></i> {:__('Destroy')}</a>
<a class="btn btn-success btn-restoreall {:$auth->check('school/classes/activity/order/order/restore')?'':'hide'}" href="javascript:;" data-url="school/classes/activity/order/order/restore" title="{:__('Restore all')}"><i class="fa fa-rotate-left"></i> {:__('Restore all')}</a>
<a class="btn btn-danger btn-destroyall {:$auth->check('school/classes/activity/order/order/destroy')?'':'hide'}" href="javascript:;" data-url="school/classes/activity/order/order/destroy" title="{:__('Destroy all')}"><i class="fa fa-times"></i> {:__('Destroy all')}</a>
</div>
<table id="table" class="table table-striped table-bordered table-hover"
data-operate-restore="{:$auth->check('school/classes/activity/order/order/restore')}"
data-operate-destroy="{:$auth->check('school/classes/activity/order/order/destroy')}"
width="100%">
</table>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,295 @@
<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">{:__('Classes_activity_order_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-classes_activity_order_id" data-rule="required" data-source="school/classes/activity/order/index" class="form-control selectpage" name="row[classes_activity_order_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Classes_activity_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-classes_activity_id" data-rule="required" data-source="school/classes/activity/index" class="form-control selectpage" name="row[classes_activity_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Manystore_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-manystore_id" data-rule="required" data-source="manystore/index" class="form-control selectpage" name="row[manystore_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Shop_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-shop_id" data-rule="required" data-source="manystore/shop/index" class="form-control selectpage" name="row[shop_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">{:__('Title')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Headimage')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-headimage" data-rule="required" class="form-control" size="50" name="row[headimage]" type="text">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="faupload-headimage" class="btn btn-danger faupload" data-input-id="c-headimage" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-headimage"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-headimage" class="btn btn-primary fachoose" data-input-id="c-headimage" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-headimage"></span>
</div>
<ul class="row list-inline faupload-preview" id="p-headimage"></ul>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-images" data-rule="required" class="form-control" size="50" name="row[images]" type="text">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-images"></span>
</div>
<ul class="row list-inline faupload-preview" id="p-images"></ul>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Address_type')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-address_type" data-rule="required" class="form-control selectpicker" name="row[address_type]">
{foreach name="addressTypeList" item="vo"}
<option value="{$key}" {in name="key" value="1"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Address_city')}:</label>
<div class="col-xs-12 col-sm-8">
<div class='control-relative'><input id="c-address_city" class="form-control" data-toggle="city-picker" name="row[address_city]" type="text"></div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Province')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-province" class="form-control" name="row[province]" type="number">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('City')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-city" class="form-control" name="row[city]" type="number">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('District')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-district" class="form-control" name="row[district]" type="number">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-address" class="form-control" name="row[address]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Address_detail')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-address_detail" class="form-control" name="row[address_detail]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Longitude')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-longitude" class="form-control" name="row[longitude]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Latitude')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-latitude" class="form-control" name="row[latitude]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Start_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-start_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[start_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">{:__('End_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-end_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[end_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">{:__('Sign_start_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sign_start_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[sign_start_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">{:__('Sign_end_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sign_end_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[sign_end_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">{:__('Price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-price" data-rule="required" class="form-control" step="0.01" name="row[price]" type="number">
</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" 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">{:__('Item')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-item" class="form-control" name="row[item]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-content" data-rule="required" class="form-control editor" rows="5" name="row[content]" cols="50"></textarea>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="statusList" item="vo"}
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-weigh" class="form-control" name="row[weigh]" type="number" value="0">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Recommend')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-recommend" class="form-control selectpicker" name="row[recommend]">
{foreach name="recommendList" item="vo"}
<option value="{$key}" {in name="key" value="0"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Hot')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-hot" class="form-control selectpicker" name="row[hot]">
{foreach name="hotList" item="vo"}
<option value="{$key}" {in name="key" value="0"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('New')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-new" class="form-control selectpicker" name="row[new]">
{foreach name="newList" item="vo"}
<option value="{$key}" {in name="key" value="0"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Selfhot')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-selfhot" class="form-control selectpicker" name="row[selfhot]">
{foreach name="selfhotList" item="vo"}
<option value="{$key}" {in name="key" value="0"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Sale')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sale" class="form-control" name="row[sale]" type="number" value="0">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Stock')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-stock" class="form-control" name="row[stock]" type="number">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Views')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-views" class="form-control" name="row[views]" type="number" value="0">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Expirestatus')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="expirestatusList" item="vo"}
<label for="row[expirestatus]-{$key}"><input id="row[expirestatus]-{$key}" name="row[expirestatus]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Add_type')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-add_type" data-rule="required" class="form-control selectpicker" name="row[add_type]">
{foreach name="addTypeList" item="vo"}
<option value="{$key}" {in name="key" value="2"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Add_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-add_id" data-rule="required" data-source="add/index" class="form-control selectpage" name="row[add_id]" type="text" value="">
</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-primary btn-embossed disabled">{:__('OK')}</button>
</div>
</div>
</form>

View File

@ -0,0 +1,295 @@
<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">{:__('Classes_activity_order_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-classes_activity_order_id" data-rule="required" data-source="school/classes/activity/order/index" class="form-control selectpage" name="row[classes_activity_order_id]" type="text" value="{$row.classes_activity_order_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Classes_activity_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-classes_activity_id" data-rule="required" data-source="school/classes/activity/index" class="form-control selectpage" name="row[classes_activity_id]" type="text" value="{$row.classes_activity_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Manystore_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-manystore_id" data-rule="required" data-source="manystore/index" class="form-control selectpage" name="row[manystore_id]" type="text" value="{$row.manystore_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Shop_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-shop_id" data-rule="required" data-source="manystore/shop/index" class="form-control selectpage" name="row[shop_id]" type="text" value="{$row.shop_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">{:__('Title')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" value="{$row.title|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Headimage')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-headimage" data-rule="required" class="form-control" size="50" name="row[headimage]" type="text" value="{$row.headimage|htmlentities}">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="faupload-headimage" class="btn btn-danger faupload" data-input-id="c-headimage" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-headimage"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-headimage" class="btn btn-primary fachoose" data-input-id="c-headimage" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-headimage"></span>
</div>
<ul class="row list-inline faupload-preview" id="p-headimage"></ul>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-images" data-rule="required" class="form-control" size="50" name="row[images]" type="text" value="{$row.images|htmlentities}">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-images"></span>
</div>
<ul class="row list-inline faupload-preview" id="p-images"></ul>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Address_type')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-address_type" data-rule="required" class="form-control selectpicker" name="row[address_type]">
{foreach name="addressTypeList" item="vo"}
<option value="{$key}" {in name="key" value="$row.address_type"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Address_city')}:</label>
<div class="col-xs-12 col-sm-8">
<div class='control-relative'><input id="c-address_city" class="form-control" data-toggle="city-picker" name="row[address_city]" type="text" value="{$row.address_city|htmlentities}"></div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Province')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-province" class="form-control" name="row[province]" type="number" value="{$row.province|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('City')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-city" class="form-control" name="row[city]" type="number" value="{$row.city|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('District')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-district" class="form-control" name="row[district]" type="number" value="{$row.district|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-address" class="form-control" name="row[address]" type="text" value="{$row.address|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Address_detail')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-address_detail" class="form-control" name="row[address_detail]" type="text" value="{$row.address_detail|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Longitude')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-longitude" class="form-control" name="row[longitude]" type="text" value="{$row.longitude|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Latitude')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-latitude" class="form-control" name="row[latitude]" type="text" value="{$row.latitude|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Start_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-start_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[start_time]" type="text" value="{:$row.start_time?datetime($row.start_time):''}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('End_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-end_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[end_time]" type="text" value="{:$row.end_time?datetime($row.end_time):''}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Sign_start_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sign_start_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[sign_start_time]" type="text" value="{:$row.sign_start_time?datetime($row.sign_start_time):''}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Sign_end_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sign_end_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[sign_end_time]" type="text" value="{:$row.sign_end_time?datetime($row.sign_end_time):''}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-price" data-rule="required" class="form-control" step="0.01" name="row[price]" type="number" value="{$row.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" 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">{:__('Item')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-item" class="form-control" name="row[item]" type="text" value="{$row.item|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-content" data-rule="required" class="form-control editor" rows="5" name="row[content]" cols="50">{$row.content|htmlentities}</textarea>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="statusList" item="vo"}
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-weigh" class="form-control" name="row[weigh]" type="number" value="{$row.weigh|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Recommend')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-recommend" class="form-control selectpicker" name="row[recommend]">
{foreach name="recommendList" item="vo"}
<option value="{$key}" {in name="key" value="$row.recommend"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Hot')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-hot" class="form-control selectpicker" name="row[hot]">
{foreach name="hotList" item="vo"}
<option value="{$key}" {in name="key" value="$row.hot"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('New')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-new" class="form-control selectpicker" name="row[new]">
{foreach name="newList" item="vo"}
<option value="{$key}" {in name="key" value="$row.new"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Selfhot')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-selfhot" class="form-control selectpicker" name="row[selfhot]">
{foreach name="selfhotList" item="vo"}
<option value="{$key}" {in name="key" value="$row.selfhot"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Sale')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sale" class="form-control" name="row[sale]" type="number" value="{$row.sale|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Stock')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-stock" class="form-control" name="row[stock]" type="number" value="{$row.stock|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Views')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-views" class="form-control" name="row[views]" type="number" value="{$row.views|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Expirestatus')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="expirestatusList" item="vo"}
<label for="row[expirestatus]-{$key}"><input id="row[expirestatus]-{$key}" name="row[expirestatus]" type="radio" value="{$key}" {in name="key" value="$row.expirestatus"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Add_type')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-add_type" data-rule="required" class="form-control selectpicker" name="row[add_type]">
{foreach name="addTypeList" item="vo"}
<option value="{$key}" {in name="key" value="$row.add_type"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Add_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-add_id" data-rule="required" data-source="add/index" class="form-control selectpage" name="row[add_id]" type="text" value="{$row.add_id|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-primary btn-embossed disabled">{:__('OK')}</button>
</div>
</div>
</form>

View File

@ -0,0 +1,46 @@
<div class="panel panel-default panel-intro">
<div class="panel-heading">
{:build_heading(null,FALSE)}
<ul class="nav nav-tabs" data-field="status">
<li class="{:$Think.get.status === null ? 'active' : ''}"><a href="#t-all" data-value="" data-toggle="tab">{:__('All')}</a></li>
{foreach name="statusList" item="vo"}
<li class="{:$Think.get.status === (string)$key ? 'active' : ''}"><a href="#t-{$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>
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('school/classes/activity/order/order_detail/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('school/classes/activity/order/order_detail/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('school/classes/activity/order/order_detail/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
<div class="dropdown btn-group {:$auth->check('school/classes/activity/order/order_detail/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">
{foreach name="statusList" item="vo"}
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:" data-params="status={$key}">{:__('Set status to ' . $key)}</a></li>
{/foreach}
</ul>
</div>
<a class="btn btn-success btn-recyclebin btn-dialog {:$auth->check('school/classes/activity/order/order_detail/recyclebin')?'':'hide'}" href="school/classes/activity/order/order_detail/recyclebin" title="{:__('Recycle bin')}"><i class="fa fa-recycle"></i> {:__('Recycle bin')}</a>
</div>
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
data-operate-edit="{:$auth->check('school/classes/activity/order/order_detail/edit')}"
data-operate-del="{:$auth->check('school/classes/activity/order/order_detail/del')}"
width="100%">
</table>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,25 @@
<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">
{:build_toolbar('refresh')}
<a class="btn btn-info btn-multi btn-disabled disabled {:$auth->check('school/classes/activity/order/order_detail/restore')?'':'hide'}" href="javascript:;" data-url="school/classes/activity/order/order_detail/restore" data-action="restore"><i class="fa fa-rotate-left"></i> {:__('Restore')}</a>
<a class="btn btn-danger btn-multi btn-disabled disabled {:$auth->check('school/classes/activity/order/order_detail/destroy')?'':'hide'}" href="javascript:;" data-url="school/classes/activity/order/order_detail/destroy" data-action="destroy"><i class="fa fa-times"></i> {:__('Destroy')}</a>
<a class="btn btn-success btn-restoreall {:$auth->check('school/classes/activity/order/order_detail/restore')?'':'hide'}" href="javascript:;" data-url="school/classes/activity/order/order_detail/restore" title="{:__('Restore all')}"><i class="fa fa-rotate-left"></i> {:__('Restore all')}</a>
<a class="btn btn-danger btn-destroyall {:$auth->check('school/classes/activity/order/order_detail/destroy')?'':'hide'}" href="javascript:;" data-url="school/classes/activity/order/order_detail/destroy" title="{:__('Destroy all')}"><i class="fa fa-times"></i> {:__('Destroy all')}</a>
</div>
<table id="table" class="table table-striped table-bordered table-hover"
data-operate-restore="{:$auth->check('school/classes/activity/order/order_detail/restore')}"
data-operate-destroy="{:$auth->check('school/classes/activity/order/order_detail/destroy')}"
width="100%">
</table>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,45 @@
<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">{:__('Classes_activity_order_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-classes_activity_order_id" data-rule="required" data-source="school/classes/activity/order/index" class="form-control selectpage" name="row[classes_activity_order_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="statusList" item="vo"}
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="-3"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Log_text')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-log_text" class="form-control" name="row[log_text]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Oper_type')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-oper_type" class="form-control" name="row[oper_type]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Oper_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-oper_id" data-rule="required" data-source="oper/index" class="form-control selectpage" name="row[oper_id]" type="text" value="">
</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-primary btn-embossed disabled">{:__('OK')}</button>
</div>
</div>
</form>

View File

@ -0,0 +1,45 @@
<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">{:__('Classes_activity_order_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-classes_activity_order_id" data-rule="required" data-source="school/classes/activity/order/index" class="form-control selectpage" name="row[classes_activity_order_id]" type="text" value="{$row.classes_activity_order_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="statusList" item="vo"}
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Log_text')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-log_text" class="form-control" name="row[log_text]" type="text" value="{$row.log_text|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Oper_type')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-oper_type" class="form-control" name="row[oper_type]" type="text" value="{$row.oper_type|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Oper_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-oper_id" data-rule="required" data-source="oper/index" class="form-control selectpage" name="row[oper_id]" type="text" value="{$row.oper_id|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-primary btn-embossed disabled">{:__('OK')}</button>
</div>
</div>
</form>

View File

@ -0,0 +1,46 @@
<div class="panel panel-default panel-intro">
<div class="panel-heading">
{:build_heading(null,FALSE)}
<ul class="nav nav-tabs" data-field="status">
<li class="{:$Think.get.status === null ? 'active' : ''}"><a href="#t-all" data-value="" data-toggle="tab">{:__('All')}</a></li>
{foreach name="statusList" item="vo"}
<li class="{:$Think.get.status === (string)$key ? 'active' : ''}"><a href="#t-{$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>
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('school/classes/activity/order/order_log/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('school/classes/activity/order/order_log/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('school/classes/activity/order/order_log/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
<div class="dropdown btn-group {:$auth->check('school/classes/activity/order/order_log/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">
{foreach name="statusList" item="vo"}
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:" data-params="status={$key}">{:__('Set status to ' . $key)}</a></li>
{/foreach}
</ul>
</div>
<a class="btn btn-success btn-recyclebin btn-dialog {:$auth->check('school/classes/activity/order/order_log/recyclebin')?'':'hide'}" href="school/classes/activity/order/order_log/recyclebin" title="{:__('Recycle bin')}"><i class="fa fa-recycle"></i> {:__('Recycle bin')}</a>
</div>
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
data-operate-edit="{:$auth->check('school/classes/activity/order/order_log/edit')}"
data-operate-del="{:$auth->check('school/classes/activity/order/order_log/del')}"
width="100%">
</table>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,25 @@
<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">
{:build_toolbar('refresh')}
<a class="btn btn-info btn-multi btn-disabled disabled {:$auth->check('school/classes/activity/order/order_log/restore')?'':'hide'}" href="javascript:;" data-url="school/classes/activity/order/order_log/restore" data-action="restore"><i class="fa fa-rotate-left"></i> {:__('Restore')}</a>
<a class="btn btn-danger btn-multi btn-disabled disabled {:$auth->check('school/classes/activity/order/order_log/destroy')?'':'hide'}" href="javascript:;" data-url="school/classes/activity/order/order_log/destroy" data-action="destroy"><i class="fa fa-times"></i> {:__('Destroy')}</a>
<a class="btn btn-success btn-restoreall {:$auth->check('school/classes/activity/order/order_log/restore')?'':'hide'}" href="javascript:;" data-url="school/classes/activity/order/order_log/restore" title="{:__('Restore all')}"><i class="fa fa-rotate-left"></i> {:__('Restore all')}</a>
<a class="btn btn-danger btn-destroyall {:$auth->check('school/classes/activity/order/order_log/destroy')?'':'hide'}" href="javascript:;" data-url="school/classes/activity/order/order_log/destroy" title="{:__('Destroy all')}"><i class="fa fa-times"></i> {:__('Destroy all')}</a>
</div>
<table id="table" class="table table-striped table-bordered table-hover"
data-operate-restore="{:$auth->check('school/classes/activity/order/order_log/restore')}"
data-operate-destroy="{:$auth->check('school/classes/activity/order/order_log/destroy')}"
width="100%">
</table>
</div>
</div>
</div>
</div>
</div>

View File

@ -78,6 +78,7 @@
<label class="control-label col-xs-12 col-sm-2">{:__('Selfmail_template_text')}:</label> <label class="control-label col-xs-12 col-sm-2">{:__('Selfmail_template_text')}:</label>
<div class="col-xs-12 col-sm-8"> <div class="col-xs-12 col-sm-8">
<textarea id="c-selfmail_template_text" class="form-control " rows="5" name="row[selfmail_template_text]" cols="50"></textarea> <textarea id="c-selfmail_template_text" class="form-control " rows="5" name="row[selfmail_template_text]" cols="50"></textarea>
<span style="color: red">( 模板字段变量用“ {{}} ” 双花括号包裹即可在模板中显示,如:{{title}} 。实际发送时会被替换成实际数值 )</span>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">

View File

@ -78,6 +78,7 @@
<label class="control-label col-xs-12 col-sm-2">{:__('Selfmail_template_text')}:</label> <label class="control-label col-xs-12 col-sm-2">{:__('Selfmail_template_text')}:</label>
<div class="col-xs-12 col-sm-8"> <div class="col-xs-12 col-sm-8">
<textarea id="c-selfmail_template_text" class="form-control " rows="5" name="row[selfmail_template_text]" cols="50">{$row.selfmail_template_text|htmlentities}</textarea> <textarea id="c-selfmail_template_text" class="form-control " rows="5" name="row[selfmail_template_text]" cols="50">{$row.selfmail_template_text|htmlentities}</textarea>
<span style="color: red">( 模板字段变量用“ {{}} ” 双花括号包裹即可在模板中显示,如:{{title}} 。实际发送时会被替换成实际数值 )</span>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">

View File

@ -2,6 +2,7 @@
namespace app\common\listener\classesorder; namespace app\common\listener\classesorder;
use app\common\model\school\classes\Evaluate; use app\common\model\school\classes\Evaluate;
use app\common\model\school\Message; use app\common\model\school\Message;
use app\common\model\school\MessageConfig;
class OrderHook class OrderHook
{ {
@ -18,27 +19,34 @@ class OrderHook
{ {
["order"=>$order] = $params; ["order"=>$order] = $params;
$detail = $order->detail; $detail = $order->detail;
$user = $order->user;
//记录订单日志 //记录订单日志
$desc = "课程{$detail["title"]}订单创建成功,等待【学员】支付";
$title = "课程订单创建成功";
$mini_type = "order_notice"; $mini_type = "order_notice";
$to_type="user";
$to_id = $order["user_id"]; $to_id = $order["user_id"];
$status ="classes"; $status ="classes";
$platform="user";
$oper_id=0;
$oper_type="system";
$params=[ $params=[
"event"=>"classes_order_create_after", "event"=>"classes_order_create_after",
"order_id"=>$order["id"], "order_id"=>$order["id"],
"order_no"=>$order["order_no"], "order_no"=>$order["order_no"],
"classes_lib_id"=>$order["classes_lib_id"], "classes_lib_id"=>$order["classes_lib_id"],
]; ];
Message::$event_name = $params["event"]; $param = [
Message::send($title,$desc,$mini_type,$to_id,$to_type,$status,$platform,$params,$oper_id,$oper_type); "title"=>$detail["title"],
"order_no" => $order["order_no"],
"nickname" => $user["nickname"],
"realname" => $user["realname"],
"mobile" => $user["mobile"],
"price" => $order["totalprice"],
];
(new MessageConfig)
->setTemplate($params["event"])
->setTemplateData($param)
->setToUid($to_id)
->setMessageStatus($status)
->setMessageMiniType($mini_type)
->setMessageParams($params)
->sendMessage();
} }
@ -50,25 +58,34 @@ class OrderHook
["order"=>$order] = $params; ["order"=>$order] = $params;
$detail = $order->detail; $detail = $order->detail;
//记录订单日志 //记录订单日志
$user = $order->user;
$desc = "课程{$detail["title"]}订单支付成功,您可以正常约课了";
$title = "课程订单支付成功";
$mini_type = "order_notice"; $mini_type = "order_notice";
$to_type="user";
$to_id = $order["user_id"]; $to_id = $order["user_id"];
$status ="classes"; $status ="classes";
$platform="user";
$oper_id=0;
$oper_type="system";
$params=[ $params=[
"event"=>"classes_order_payed_after", "event"=>"classes_order_payed_after",
"order_id"=>$order["id"], "order_id"=>$order["id"],
"order_no"=>$order["order_no"], "order_no"=>$order["order_no"],
"classes_lib_id"=>$order["classes_lib_id"], "classes_lib_id"=>$order["classes_lib_id"],
]; ];
Message::$event_name = $params["event"];
Message::send($title,$desc,$mini_type,$to_id,$to_type,$status,$platform,$params,$oper_id,$oper_type); $param = [
"title"=>$detail["title"],
"order_no" => $order["order_no"],
"nickname" => $user["nickname"],
"realname" => $user["realname"],
"mobile" => $user["mobile"],
"price" => $order["payprice"],
];
(new MessageConfig)
->setTemplate($params["event"])
->setTemplateData($param)
->setToUid($to_id)
->setMessageStatus($status)
->setMessageMiniType($mini_type)
->setMessageParams($params)
->sendMessage();
} }
@ -79,27 +96,44 @@ class OrderHook
['order' => $order,"user_id"=>$user_id,"oper_type"=>$oper_type,"oper_id"=>$oper_id] = $params; ['order' => $order,"user_id"=>$user_id,"oper_type"=>$oper_type,"oper_id"=>$oper_id] = $params;
$detail = $order->detail; $detail = $order->detail;
$user = $order->user;
if(!$user_id ||$order["user_id"] !=$user_id ){ if(!$user_id ||$order["user_id"] !=$user_id ){
$desc = "[系统操作]课程{$detail["title"]}订单未支付取消成功"; $desc = "[系统操作]";
}else{ }else{
$desc = "课程{$detail["title"]}订单未支付取消成功"; $desc = "";
} }
$title = "课程订单已取消";
$mini_type = "order_notice"; $mini_type = "order_notice";
$to_type="user";
$to_id = $order["user_id"]; $to_id = $order["user_id"];
$status ="classes"; $status ="classes";
$platform="user";
$oper_id=0;
$oper_type="system";
$params=[ $params=[
"event"=>"classes_order_cancel_after", "event"=>"classes_order_cancel_after",
"order_id"=>$order["id"], "order_id"=>$order["id"],
"order_no"=>$order["order_no"], "order_no"=>$order["order_no"],
]; ];
Message::$event_name = $params["event"];
Message::send($title,$desc,$mini_type,$to_id,$to_type,$status,$platform,$params,$oper_id,$oper_type); $param = [
"system"=> $desc,
"title"=> $detail["title"],
"order_no" => $order["order_no"],
"nickname" => $user["nickname"],
"realname" => $user["realname"],
"mobile" => $user["mobile"],
"price" => $order["payprice"],
];
(new MessageConfig)
->setTemplate($params["event"])
->setTemplateData($param)
->setToUid($to_id)
->setMessageStatus($status)
->setMessageMiniType($mini_type)
->setMessageParams($params)
->sendMessage();
} }

View File

@ -2,6 +2,9 @@
namespace app\common\model\school; namespace app\common\model\school;
use bw\Common;
use think\Cache;
use think\Model; use think\Model;
use traits\model\SoftDelete; use traits\model\SoftDelete;
@ -22,6 +25,72 @@ class MessageConfig extends Model
protected $createTime = 'createtime'; protected $createTime = 'createtime';
protected $updateTime = 'updatetime'; protected $updateTime = 'updatetime';
protected $deleteTime = 'deletetime'; protected $deleteTime = 'deletetime';
protected $messageTemplate = null;
protected $templateData = [];
protected $templateString = "";
protected $messageMiniType = "other";
protected $messagePlatform="user";
protected $messageOperId=0;
protected $messageOperType="system";
protected $messageToType="user";
protected $messageStatus = "system";
protected $messageParams = [];
//创建上面变量的get和set方法
public function setMessageMiniType($value){
$this->messageMiniType = $value;
return $this;
}
public function getMessageMiniType(){
return $this->messageMiniType;
}
public function setMessagePlatform($value){
$this->messagePlatform = $value;
return $this;
}
public function getMessagePlatform(){
return $this->messagePlatform;
}
public function setMessageOperId($value){
$this->messageOperId = $value;
return $this;
}
public function getMessageOperId(){
return $this->messageOperId;
}
public function setMessageOperType($value){
$this->messageOperType = $value;
return $this;
}
public function getMessageOperType(){
return $this->messageOperType;
}
public function setMessageToType($value){
$this->messageToType = $value;
return $this;
}
public function getMessageToType(){
return $this->messageToType;
}
public function setMessageStatus($value){
$this->messageStatus = $value;
return $this;
}
public function getMessageStatus(){
return $this->messageStatus;
}
public function setMessageParams($value){
$this->messageParams = $value;
return $this;
}
public function getMessageParams(){
return $this->messageParams;
}
protected $toUid = 0;
// 追加属性 // 追加属性
protected $append = [ protected $append = [
@ -101,7 +170,97 @@ class MessageConfig extends Model
if (!empty($value)) return cdnurl($value, true); if (!empty($value)) return cdnurl($value, true);
} }
public function setTemplate($event_name,$params=[],$to_uid=0){
$this->messageTemplate = MessageConfigItem::where("event_two",$event_name)->find();
if(!$this->messageTemplate) throw new \Exception("消息模板不存在");
//设置模板内容
if($params){
$this->setTemplateData($params);
}
if($to_uid)$this->setToUid($to_uid);
return $this;
}
public function setTemplateData( $params,$expression = '{{KEYWORD}}'){
$this->templateData = $params;
$this->setMessageContent($expression);
return $this;
}
public function getMessageContent(){
return $this->templateString;
}
public function getTemplate(){
return $this->messageTemplate;
}
public function getToUid(){
return $this->toUid;
}
public function setToUid($uid){
$this->toUid = $uid;
return $this;
}
/**
* 得到语音播报内容(讯飞语音)
*/
public function setMessageContent($expression = '{{KEYWORD}}'){
$template = $this->messageTemplate;
$template_content = $template['selfmail_template_text'];
//解析获取文本内容
$this->templateString = Common::parsePrintTemplateString($template_content,$this->templateData,$expression);
return $this;
}
public function sendSelfmail($to_uid=0){
if($to_uid)$this->setToUid($to_uid);
$template = $this->messageTemplate;
if(!$template) return true;
if($template['selfmail'] == '1'){
if(!$this->toUid) throw new \Exception("发送对象不能为空");
$message_content = $this->getMessageContent();
$message_title = $template['selfmail_title'];
if(!$message_content || !$message_title)return false;
Message::$event_name = $template["event"];
Message::send($message_title,$message_content,$this->getMessageMiniType(),$this->toUid,$this->messageToType,$this->messageStatus,$this->messagePlatform,$this->messageParams,$this->messageOperId, $this->messageOperType);
}else{
return true;
}
}
public function sendWechatWap($to_uid=0){
if($to_uid)$this->setToUid($to_uid);
$template = $this->messageTemplate;
if(!$template) return true;
if($template['wechat_wap'] == '1'){
if(!$this->toUid) throw new \Exception("发送对象不能为空");
}else{
return true;
}
}
public function sendMobileMessage($to_uid=0){
if($to_uid)$this->setToUid($to_uid);
$template = $this->messageTemplate;
if(!$template) return true;
if($template['message'] == '1'){
if(!$this->toUid) throw new \Exception("发送对象不能为空");
}else{
return true;
}
}
public function sendMessage($to_uid=0){
$this->sendSelfmail($to_uid);
$this->sendMobileMessage($to_uid);
$this->sendWechatWap($to_uid);
return $this;
}
} }

View File

@ -0,0 +1,91 @@
<?php
namespace app\common\model\school;
use think\Model;
use traits\model\SoftDelete;
class MessageConfigItem extends Model
{
use SoftDelete;
// 表名
protected $name = 'school_message_config_item';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = 'deletetime';
// 追加属性
protected $append = [
'wechat_wap_text',
'message_text',
'selfmail_text'
];
protected static function init()
{
self::afterInsert(function ($row) {
if (!$row['weigh']) {
$pk = $row->getPk();
$row->getQuery()->where($pk, $row[$pk])->update(['weigh' => $row[$pk]]);
}
});
}
public function getWechatWapList()
{
return ['1' => __('Wechat_wap 1'), '2' => __('Wechat_wap 2')];
}
public function getMessageList()
{
return ['1' => __('Message 1'), '2' => __('Message 2')];
}
public function getSelfmailList()
{
return ['1' => __('Selfmail 1'), '2' => __('Selfmail 2')];
}
public function getWechatWapTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['wechat_wap']) ? $data['wechat_wap'] : '');
$list = $this->getWechatWapList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getMessageTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['message']) ? $data['message'] : '');
$list = $this->getMessageList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getSelfmailTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['selfmail']) ? $data['selfmail'] : '');
$list = $this->getSelfmailList();
return isset($list[$value]) ? $list[$value] : '';
}
public function config()
{
return $this->belongsTo(MessageConfig::class, 'event', 'event', [], 'LEFT')->setEagerlyType(0);
}
}

View File

@ -0,0 +1,561 @@
<?php
namespace app\common\model\school\classes\activity;
use app\admin\model\manystore\Shop;
use app\common\model\school\classes\activity\order\Order;
use app\common\model\BaseModel;
use app\common\model\dyqc\ManystoreShop;
use app\common\model\school\Area;
use app\common\model\school\classes\ClassesSpec;
use app\manystore\model\Manystore;
use think\Model;
use traits\model\SoftDelete;
class Activity extends BaseModel
{
use SoftDelete;
// 表名
protected $name = 'school_classes_activity';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = 'deletetime';
// 追加属性
protected $append = [
'address_type_text',
'start_time_text',
'end_time_text',
'sign_start_time_text',
'sign_end_time_text',
'status_text',
'recommend_text',
'hot_text',
'new_text',
'selfhot_text',
'expirestatus_text',
'add_type_text'
];
protected static function init()
{
self::afterInsert(function ($row) {
if (!$row['weigh']) {
$pk = $row->getPk();
$row->getQuery()->where($pk, $row[$pk])->update(['weigh' => $row[$pk]]);
}
});
}
public function getAddressTypeList()
{
return ['1' => __('Address_type 1'), '2' => __('Address_type 2')];
}
public function getStatusList()
{
return ['1' => __('Status 1'), '2' => __('Status 2'), '3' => __('Status 3')];
}
public function getRecommendList()
{
return ['0' => __('Recommend 0'), '1' => __('Recommend 1')];
}
public function getHotList()
{
return ['0' => __('Hot 0'), '1' => __('Hot 1')];
}
public function getNewList()
{
return ['0' => __('New 0'), '1' => __('New 1')];
}
public function getSelfhotList()
{
return ['0' => __('Selfhot 0'), '1' => __('Selfhot 1')];
}
public function getExpirestatusList()
{
return ['1' => __('Expirestatus 1'), '2' => __('Expirestatus 2')];
}
public function getAddTypeList()
{
return ['1' => __('Add_type 1'), '2' => __('Add_type 2')];
}
public function getAddressTypeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['address_type']) ? $data['address_type'] : '');
$list = $this->getAddressTypeList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getStartTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['start_time']) ? $data['start_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getEndTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['end_time']) ? $data['end_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getSignStartTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['sign_start_time']) ? $data['sign_start_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getSignEndTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['sign_end_time']) ? $data['sign_end_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
$list = $this->getStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getRecommendTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['recommend']) ? $data['recommend'] : '');
$list = $this->getRecommendList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getHotTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['hot']) ? $data['hot'] : '');
$list = $this->getHotList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getNewTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['new']) ? $data['new'] : '');
$list = $this->getNewList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getSelfhotTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['selfhot']) ? $data['selfhot'] : '');
$list = $this->getSelfhotList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getExpirestatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['expirestatus']) ? $data['expirestatus'] : '');
$list = $this->getExpirestatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getAddTypeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['add_type']) ? $data['add_type'] : '');
$list = $this->getAddTypeList();
return isset($list[$value]) ? $list[$value] : '';
}
protected function setStartTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setEndTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setSignStartTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setSignEndTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
public function manystore()
{
return $this->belongsTo(Manystore::class, 'manystore_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function shop()
{
return $this->belongsTo(ManystoreShop::class, 'shop_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function activityCheck(&$params,$shop_id=null,$row=null,$oper_type='user',$oper_id=0)
{
$params["status"] = $params["status"] ?? '3';
if(!$shop_id)$shop_id = $params["shop_id"] ?? 0;
if(empty($params["weigh"]))$params["weigh"] = 0;
$manystore = Manystore::where("shop_id",$shop_id)->find();
if(!$manystore){
throw new \Exception("店铺不存在");
}
if(!(new \app\common\model\dyqc\ManystoreShop)->checkFull($shop_id))throw new \Exception("对方的认证信息未完善,请您先去帮忙完善!");
$params["manystore_id"] = $manystore["id"];
//开始和结束时间不能为空
$time = $params["time"];
if(empty($time))throw new \Exception("{$params["title"]}请选择开始和结束时间".$time);
$split_line = " - ";
$time_arr = explode($split_line,$time);
$params["start_time"] = $time_arr[0] ;
$params["end_time"] = $time_arr[1];
unset($params["time"]);
$start_time = $params["start_time"];
$end_time = $params["end_time"];
if(empty($start_time) || empty($end_time)){
throw new \Exception("{$params["title"]}请选择开始和结束时间".$time);
}
//转化时间戳
$start_time = $params["start_time"] && !is_numeric($params["start_time"]) ? strtotime($params["start_time"]) : $params["start_time"];
$end_time = $params["end_time"] && !is_numeric($params["end_time"]) ? strtotime($params["end_time"]) : $params["end_time"];
//结束时间不能小于开始时间
if($end_time<=$start_time){
throw new \Exception("{$params["title"]}结束时间不能小于开始时间");
}
//开始和结束时间不能为空
$time = $params["sign_time"];
if(empty($time))throw new \Exception("{$params["title"]}请选择开始和结束时间".$time);
$split_line = " - ";
$time_arr = explode($split_line,$time);
$params["sign_start_time"] = $time_arr[0] ;
$params["sign_end_time"] = $time_arr[1];
unset($params["sign_time"]);
$start_time = $params["sign_start_time"];
$end_time = $params["sign_end_time"];
if(empty($start_time) || empty($end_time)){
throw new \Exception("{$params["title"]}请选择开始和结束时间".$time);
}
//转化时间戳
$start_time = $params["sign_start_time"] && !is_numeric($params["sign_start_time"]) ? strtotime($params["sign_start_time"]) : $params["sign_start_time"];
$end_time = $params["sign_end_time"] && !is_numeric($params["sign_end_time"]) ? strtotime($params["sign_end_time"]) : $params["sign_end_time"];
//结束时间不能小于开始时间
if($end_time<=$start_time){
throw new \Exception("{$params["title"]}结束时间不能小于开始时间");
}
//课时必须大于等于1
// if($params["classes_num"] < 1) throw new \Exception("课时必须大于等于1");
if($params["price"] < 0) throw new \Exception("售价必须大于0");
//独立地点需传定位信息
if($params["address_type"] == "2"){
if(empty($params["address_city"])
&& !empty($params["province"])
&& !empty($params["city"])
&& !empty($params["district"])){
$province_name = Area::where("id" ,$params['province'])->value("name");
if(!$province_name) throw new \Exception("省份不存在");
$city_name = Area::where("id" ,$params['city'])->value("name");
if(!$city_name) throw new \Exception("市不存在");
$district_name = Area::where("id" ,$params['district'])->value("name");
if(!$district_name) throw new \Exception("区县不存在");
$params['address_city'] = $province_name."/".$city_name."/".$district_name;
}
if(empty($params["address_city"])
|| empty($params["province"])
|| empty($params["city"])
|| empty($params["district"])
|| empty($params["longitude"])
|| empty($params["latitude"])
|| empty($params["address"])
|| empty($params["address_detail"])
) throw new \Exception("独立地点需传定位信息");
}else{
//地址取机构的
$shop = ManystoreShop::where("id",$shop_id)->find();
if(!$shop){
throw new \Exception("店铺不存在");
}
if(empty($shop["address_city"])
|| empty($shop["province"])
|| empty($shop["city"])
|| empty($shop["district"])
|| empty($shop["longitude"])
|| empty($shop["latitude"])
|| empty($shop["address"])
|| empty($shop["address_detail"])
) throw new \Exception("当前机构地址并未完善,请在机构处完善!");
$params["address_city"] = $shop["address_city"];
$params["province"] = $shop["province"];
$params["city"] = $shop["city"];
$params["district"] = $shop["district"];
$params["longitude"] = $shop["longitude"];
$params["latitude"] = $shop["latitude"];
$params["address"] = $shop["address"];
$params["address_detail"] = $shop["address_detail"];
//address
// var_dump($params);
}
;
//收费免费判断
if($params["price"]==0){
$params["feel"] = "1";
}else{
//个人认证无法下付费课程
$shop = ManystoreShop::where("id",$shop_id)->find();
if($shop["type"]=="1"){
throw new \Exception("这个机构属于个人认证,无法发布付费活动!");
}
$params["feel"] = "0";
}
$rule = [
'manystore_id'=>'require',
'shop_id'=>'require',
'headimage' => 'require',
'title' => 'require',
'images' => 'require',
'address' => 'require',
'address_detail' => 'require',
'longitude' => 'require',
'latitude' => 'require',
'province' => 'require',
'city' => 'require',
'district' => 'require',
'address_city' => 'require',
'address_type' => 'require',
'content' => 'require',
'price' => 'require',
];
$rule_msg = [
"manystore_id.require"=>'机构id必填',
"shop_id.require"=>'机构id必填',
"headimage.require"=>'课程活动头图必填',
'title.require' => '活动名称必须填写',
'images.require' => '活动轮播图必须上传',
'address.require' => '地址必填',
'address_detail.require' => '详细地址必填',
'longitude.require' => '经度必填',
'latitude.require' => '纬度必填',
'province.require' => '省编号必填',
'city.require' => '市编号必填',
'district.require' => '县区编号必填',
'address_city.require' => '城市选择必填',
'address_type.require'=> '地址类型必填',
'content.require'=> '活动详情必填',
'price.require'=> '活动售价必填',
];
self::check($params,$rule,$rule_msg);
//更新
if($row){
// $this->have_auth = false;
// if($this->need_auth){
// //判断更新的变动数据
// $this->no_auth_fields_check($params,$row);
// if($this->have_auth){
// $params['status'] = "3";
// }
// }
// $this->updateCheck($row->id,$params,$row);
//名称title不能与其他课程重复
$check_title = self::where('id','<>',$row["id"])->where('title',$params["title"])->find();
if($check_title){
throw new \Exception("活动名称已存在或被其他机构占用,请更改!");
}
//如果存在课程规格,验证每个课时规格的合法性
if(isset($params["item_json"])){
//如果存在&quot;的HTML转义字符先反转义再解析json
$params["item_json"] = html_entity_decode($params["item_json"]);
$spec = json_decode($params["item_json"],true);
if(empty($spec))throw new \Exception("请至少添加一个课时规格");
foreach ($spec as $k=>&$v){
unset($v["limit"]);
unset($v["status_name"]);
unset($v["visible"]);
$v["classes_activity_id"] = $row->id;
$v["manystore_id"] = $params["manystore_id"];
$v["shop_id"] = $shop_id;
//先不进行判定,交给提交后再判定
$classesSpec = new ActivityItem();
$classesSpec->specCheck($v,$shop_id,empty($v["id"])? null : ActivityItem::get($v["id"]),false,$oper_type,$oper_id);
}
$params["item_json"] = $spec;
}
}else{
//新增
//名称title不能重复
$check_title = self::where('title',$params["title"])->find();
if($check_title){
throw new \Exception("活动名称已存在或被其他机构占用,请更改!");
}
//如果存在课程规格,验证每个课时规格的合法性
if(isset($params["item_json"])){
//如果存在&quot;的HTML转义字符先反转义再解析json
$params["item_json"] = html_entity_decode($params["item_json"]);
$spec = json_decode($params["item_json"],true);
if(empty($spec))throw new \Exception("请至少添加一个课时规格");
foreach ($spec as $k=>&$v){
unset($v["limit"]);
unset($v["status_name"]);
unset($v["id"]);
$v["classes_activity_id"] = 0;
$v["manystore_id"] = $params["manystore_id"];
$v["shop_id"] = $shop_id;
(new ActivityItem)->specCheck($v,$shop_id,null,true,$oper_type,$oper_id);
}
$params["item_json"] = $spec;
}
}
$params["delete_spec_ids"] = [];
//按前端顺序分配显示权重
if(isset($params["item_json"]) && $params["item_json"]){
//数组倒过来
$params["item_json"] = array_reverse($params["item_json"]);
$insert_spec = [];
foreach ($params["item_json"] as $k=>&$v){
$v["weigh"] = $k + 1;
if(!empty($v["id"]))$insert_spec[] = $v["id"];
}
if($insert_spec && $row){
$params["delete_spec_ids"] = ActivityItem::where("classes_activity_id",$row->id)->where("id","not in",$insert_spec)->column("id");
}
}
//存在需要删除的规格则判断规格是否能删除
if($params["delete_spec_ids"] && $row){
$check_spec = ActivityItem::where("classes_activity_id",$row->id)->where("id","in",$params["delete_spec_ids"])->select();
foreach ($check_spec as $k=>$vv){
(new ActivityItem)->updateCheck($vv->id);
}
$params["delete_spec_ids"] = $check_spec;
}
//如果是上架,判断是否拥有课时规格,没有则无法上架
if(empty($params["item_json"])){
if(!$row)throw new \Exception("新添加的活动请先至少添加一个活动规格后再上架!");
//判断是否拥有课时规格,没有则无法上架
$check_spec = ActivityItem::where("classes_activity_id",$row->id)->count();
if(!$check_spec)throw new \Exception("新添加的活动请先至少添加一个活动规格后再上架!");
}
}
public function updateCheck($id,$params=[],$row=null){
if($params && $row){
// var_dump($this->no_auth_fields_check($params,$row));
if(!$this->no_auth_fields_check($params,$row)){
return true;
}
}
// 课程存在售后订单则不允许操作
$order = Order::where("classes_activity_item_id",$id)->where("status","not in","-3,6,9")->find();
if($order)throw new \Exception("{$order['name']}存在正在使用中的订单报名学员,规格无法继续操作,如规格有误请下架!");
}
}

View File

@ -0,0 +1,253 @@
<?php
namespace app\common\model\school\classes\activity;
use app\admin\model\manystore\Shop;
use app\common\model\dyqc\ManystoreShop;
use app\manystore\model\Manystore;
use think\Model;
use traits\model\SoftDelete;
class ActivityAuth extends Model
{
use SoftDelete;
// 表名
protected $name = 'school_classes_activity_auth';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = 'deletetime';
// 追加属性
protected $append = [
'address_type_text',
'start_time_text',
'end_time_text',
'sign_start_time_text',
'sign_end_time_text',
'status_text',
'recommend_text',
'hot_text',
'new_text',
'selfhot_text',
'auth_status_text',
'expirestatus_text',
'add_type_text',
'auth_time_text'
];
protected static function init()
{
self::afterInsert(function ($row) {
if (!$row['weigh']) {
$pk = $row->getPk();
$row->getQuery()->where($pk, $row[$pk])->update(['weigh' => $row[$pk]]);
}
});
}
public function getAddressTypeList()
{
return ['1' => __('Address_type 1'), '2' => __('Address_type 2')];
}
public function getStatusList()
{
return ['1' => __('Status 1'), '2' => __('Status 2'), '3' => __('Status 3')];
}
public function getRecommendList()
{
return ['0' => __('Recommend 0'), '1' => __('Recommend 1')];
}
public function getHotList()
{
return ['0' => __('Hot 0'), '1' => __('Hot 1')];
}
public function getNewList()
{
return ['0' => __('New 0'), '1' => __('New 1')];
}
public function getSelfhotList()
{
return ['0' => __('Selfhot 0'), '1' => __('Selfhot 1')];
}
public function getAuthStatusList()
{
return ['0' => __('Auth_status 0'), '1' => __('Auth_status 1'), '2' => __('Auth_status 2')];
}
public function getExpirestatusList()
{
return ['1' => __('Expirestatus 1'), '2' => __('Expirestatus 2')];
}
public function getAddTypeList()
{
return ['1' => __('Add_type 1'), '2' => __('Add_type 2')];
}
public function getAddressTypeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['address_type']) ? $data['address_type'] : '');
$list = $this->getAddressTypeList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getStartTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['start_time']) ? $data['start_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getEndTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['end_time']) ? $data['end_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getSignStartTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['sign_start_time']) ? $data['sign_start_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getSignEndTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['sign_end_time']) ? $data['sign_end_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
$list = $this->getStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getRecommendTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['recommend']) ? $data['recommend'] : '');
$list = $this->getRecommendList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getHotTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['hot']) ? $data['hot'] : '');
$list = $this->getHotList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getNewTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['new']) ? $data['new'] : '');
$list = $this->getNewList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getSelfhotTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['selfhot']) ? $data['selfhot'] : '');
$list = $this->getSelfhotList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getAuthStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['auth_status']) ? $data['auth_status'] : '');
$list = $this->getAuthStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getExpirestatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['expirestatus']) ? $data['expirestatus'] : '');
$list = $this->getExpirestatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getAddTypeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['add_type']) ? $data['add_type'] : '');
$list = $this->getAddTypeList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getAuthTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['auth_time']) ? $data['auth_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
protected function setStartTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setEndTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setSignStartTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setSignEndTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setAuthTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
public function activity()
{
return $this->belongsTo(Activity::class, 'classes_activity_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function manystore()
{
return $this->belongsTo(Manystore::class, 'manystore_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function shop()
{
return $this->belongsTo(ManystoreShop::class, 'shop_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}

View File

@ -0,0 +1,258 @@
<?php
namespace app\common\model\school\classes\activity;
use app\admin\model\manystore\Shop;
use app\admin\model\school\classes\activity\Order;
use app\common\model\BaseModel;
use app\common\model\dyqc\ManystoreShop;
use app\common\model\school\classes\ClassesSpec;
use app\manystore\model\Manystore;
use think\Model;
use traits\model\SoftDelete;
class ActivityItem extends BaseModel
{
use SoftDelete;
// 表名
protected $name = 'school_classes_activity_item';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = 'deletetime';
// 追加属性
protected $append = [
'status_text',
'sex_text'
];
protected static function init()
{
self::afterInsert(function ($row) {
if (!$row['weigh']) {
$pk = $row->getPk();
$row->getQuery()->where($pk, $row[$pk])->update(['weigh' => $row[$pk]]);
}
});
}
public function getStatusList()
{
return ['1' => __('Status 1'), '2' => __('Status 2')];
}
public function getSexList()
{
return ['1' => __('Sex 1'), '2' => __('Sex 2'), '3' => __('Sex 3')];
}
public function getStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
$list = $this->getStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getSexTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['sex']) ? $data['sex'] : '');
$list = $this->getSexList();
return isset($list[$value]) ? $list[$value] : '';
}
public function manystore()
{
return $this->belongsTo(Manystore::class, 'manystore_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function shop()
{
return $this->belongsTo(ManystoreShop::class, 'shop_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function activity()
{
return $this->belongsTo(Activity::class, 'classes_activity_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function specCheck(&$params,$shop_id=null,$row=null,$check=true,$oper_type='user',$oper_id=0)
{
//限定人数必须大于0
$limit_num = $params["limit_num"];
if($limit_num<=0){
throw new \Exception("{$params["name"]}限定人数必须大于0");
}
//收费免费判断
if($params["price"]==0){
$params["feel"] = "1";
}else{
//个人认证无法下付费课程
$shop = ManystoreShop::where("id",$params["shop_id"] )->find();
if($shop["type"]=="1"){
throw new \Exception("这个机构属于个人认证,无法发布付费活动!");
}
$params["feel"] = "0";
}
//开始和结束时间不能为空
// $time = $params["time"];
//
// if(empty($time))throw new \Exception("{$params["name"]}请选择开始和结束时间".$time);
// $split_line = " - ";
// $time_arr = explode($split_line,$time);
// $params["start_time"] = $time_arr[0] ;
// $params["end_time"] = $time_arr[1];
// unset($params["time"]);
//
// $start_time = $params["start_time"];
// $end_time = $params["end_time"];
//
// if(empty($start_time) || empty($end_time)){
// throw new \Exception("{$params["name"]}请选择开始和结束时间".$time);
// }
// //转化时间戳
// $start_time = $params["start_time"] && !is_numeric($params["start_time"]) ? strtotime($params["start_time"]) : $params["start_time"];
// $end_time = $params["end_time"] && !is_numeric($params["end_time"]) ? strtotime($params["end_time"]) : $params["end_time"];
// //结束时间不能小于开始时间
// if($end_time<=$start_time){
// throw new \Exception("{$params["name"]}结束时间不能小于开始时间");
// }
//
// //结束时间不能是已经过去的时间
// $now_time = time();
// if($end_time<=$now_time){
// throw new \Exception("{$params["name"]}结束时间不能是已经过去的时间");
// }
// //如果是员工操作则结束时间必须大于当前时间n秒
// if($oper_type == "user" && $oper_id){
// $classes_timeout_time = config("site.classes_timeout_time") ?:0;
// if($classes_timeout_time > 0) {
// $now_times = time() + $classes_timeout_time;
// if($start_time<=$now_times){
// //$now_time时间格式化
// $now_time_text = date("Y-m-d H:i",$now_times);
// throw new \Exception("{$params["name"]}开始时间必须在{$now_time_text}之后");
// }
// }
//
// }
//开始和结束时间必须是同一天
// $start_time_date = date("Y-m-d",$start_time);
// $end_time_date = date("Y-m-d",$end_time);
// if($start_time_date!=$end_time_date){
// throw new \Exception("{$params["name"]}开始和结束时间必须是同一天");
// }
//
// $params["start_time"] = $start_time;
// $params["end_time"] = $end_time;
// $orderTimeTableName = (new ClassesSpec)->getWithAlisaName();
//修改
if($row){
//修复旧数据时间戳
// $row["start_time"]= strtotime(date("Y-m-d H:i",$row["start_time"]));
// $row["end_time"]= strtotime(date("Y-m-d H:i",$row["end_time"]));
//
$this->updateCheck($row->id,$params,$row);
//规格名字不能一样(同课程下)
$spec_name = $params["name"];
$classes_lib_id = $params["classes_activity_id"];
$spec_name_exist = self::where("name",$spec_name)->where("classes_activity_id",$classes_lib_id)->where("id","<>",$row->id)->find();
if($spec_name_exist){
throw new \Exception("该活动下已存在该课时规格名称请重新输入1");
}
// //同课程下,各个课时的开始和结束时间不能有重叠(出现时间交叠也不行)
// $spec_time_exist = ClassesSpec::where(function ($query) use ($orderTimeTableName,$start_time,$end_time) {
// //兩個時間區間重合 存在任意交集 都不行
// $query->where("start_time BETWEEN {$start_time} AND {$end_time}");
// $query->whereOr("end_time BETWEEN {$start_time} AND {$end_time}");
// $query->whereOr("start_time <= {$start_time} AND end_time >= {$end_time}");
// $query->whereOr("start_time >= {$start_time} AND end_time <= {$end_time}");
// })
// ->where("classes_lib_id",$classes_lib_id)
// ->where("id","<>",$row->id)->find();
//
// if($check && $spec_time_exist){
// throw new \Exception("该课程下,{$spec_time_exist['name']}课时的开始和结束时间与你有重叠");
// }
}else{
//规格名字不能一样(同课程下)
$spec_name = $params["name"];
$classes_lib_id = $params["classes_activity_id"];
$spec_name_exist = self::where("name",$spec_name)->where("classes_activity_id",$classes_lib_id)->find();
if($spec_name_exist){
throw new \Exception("该活动下已存在该课时规格名称请重新输入2");
}
// //同课程下,各个课时的开始和结束时间不能有重叠(出现时间交叠也不行)
// $spec_time_exist = ClassesSpec::where(function ($query) use ($orderTimeTableName,$start_time,$end_time) {
// //兩個時間區間重合 存在任意交集 都不行
// $query->where("start_time BETWEEN {$start_time} AND {$end_time}");
// $query->whereOr("end_time BETWEEN {$start_time} AND {$end_time}");
// $query->whereOr("start_time <= {$start_time} AND end_time >= {$end_time}");
// $query->whereOr("start_time >= {$start_time} AND end_time <= {$end_time}");
// })
// ->where("classes_lib_id",$classes_lib_id)
// ->find();
//
// if($check && $spec_time_exist){
// throw new \Exception("该课程下,{$spec_time_exist['name']}课时的开始和结束时间与你有重叠");
// }
}
}
public function updateCheck($id,$params=[],$row=null){
if($params && $row){
// var_dump($this->no_auth_fields_check($params,$row));
if(!$this->no_auth_fields_check($params,$row)){
return true;
}
}
// 课程存在售后订单则不允许操作
$order = Order::where("classes_activity_item_id",$id)->where("status","not in","-3,6,9")->find();
if($order)throw new \Exception("{$order['name']}存在正在使用中的订单报名学员,规格无法继续操作,如规格有误请下架!");
}
}

View File

@ -0,0 +1,92 @@
<?php
namespace app\common\model\school\classes\activity;
use app\admin\model\manystore\Shop;
use app\common\model\dyqc\ManystoreShop;
use app\manystore\model\Manystore;
use think\Model;
use traits\model\SoftDelete;
class ActivityItemAuth extends Model
{
use SoftDelete;
// 表名
protected $name = 'school_classes_activity_item_auth';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = 'deletetime';
// 追加属性
protected $append = [
'status_text',
'sex_text'
];
protected static function init()
{
self::afterInsert(function ($row) {
if (!$row['weigh']) {
$pk = $row->getPk();
$row->getQuery()->where($pk, $row[$pk])->update(['weigh' => $row[$pk]]);
}
});
}
public function getStatusList()
{
return ['1' => __('Status 1'), '2' => __('Status 2')];
}
public function getSexList()
{
return ['1' => __('Sex 1'), '2' => __('Sex 2'), '3' => __('Sex 3')];
}
public function getStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
$list = $this->getStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getSexTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['sex']) ? $data['sex'] : '');
$list = $this->getSexList();
return isset($list[$value]) ? $list[$value] : '';
}
public function manystore()
{
return $this->belongsTo(Manystore::class, 'manystore_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function shop()
{
return $this->belongsTo(ManystoreShop::class, 'shop_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function activity()
{
return $this->belongsTo(Activity::class, 'classes_activity_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}

View File

@ -0,0 +1,213 @@
<?php
namespace app\common\model\school\classes\activity\order;
use app\admin\model\manystore\Shop;
use app\common\model\dyqc\ManystoreShop;
use app\common\model\school\classes\activity\Activity;
use app\manystore\model\Manystore;
use think\Model;
use traits\model\SoftDelete;
class Order extends Model
{
use SoftDelete;
// 表名
protected $name = 'school_classes_activity_order';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = 'deletetime';
// 追加属性
protected $append = [
'pay_type_text',
'status_text',
'before_status_text',
'server_status_text',
'canceltime_text',
'paytime_text',
'auth_time_text',
'reservation_time_text',
'finishtime_text',
'refundtime_text',
'auth_status_text'
];
public function getPayTypeList()
{
return ['yue' => __('Pay_type yue'), 'wechat' => __('Pay_type wechat')];
}
public function getStatusList()
{
return ['-3' => __('Status -3'), '0' => __('Status 0'), '2' => __('Status 2'), '3' => __('Status 3'), '4' => __('Status 4'), '6' => __('Status 6'), '9' => __('Status 9')];
}
public function getBeforeStatusList()
{
return ['-3' => __('Before_status -3'), '0' => __('Before_status 0'), '2' => __('Before_status 2'), '3' => __('Before_status 3'), '4' => __('Before_status 4'), '6' => __('Before_status 6'), '9' => __('Before_status 9')];
}
public function getServerStatusList()
{
return ['0' => __('Server_status 0'), '3' => __('Server_status 3'), '6' => __('Server_status 6')];
}
public function getAuthStatusList()
{
return ['0' => __('Auth_status 0'), '1' => __('Auth_status 1'), '2' => __('Auth_status 2')];
}
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 getStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
$list = $this->getStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getBeforeStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['before_status']) ? $data['before_status'] : '');
$list = $this->getBeforeStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getServerStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['server_status']) ? $data['server_status'] : '');
$list = $this->getServerStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getCanceltimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['canceltime']) ? $data['canceltime'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getPaytimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['paytime']) ? $data['paytime'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getAuthTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['auth_time']) ? $data['auth_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getReservationTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['reservation_time']) ? $data['reservation_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getFinishtimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['finishtime']) ? $data['finishtime'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getRefundtimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['refundtime']) ? $data['refundtime'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getAuthStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['auth_status']) ? $data['auth_status'] : '');
$list = $this->getAuthStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
protected function setCanceltimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setPaytimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setAuthTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setReservationTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setFinishtimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setRefundtimeAttr($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 manystore()
{
return $this->belongsTo(Manystore::class, 'manystore_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function shop()
{
return $this->belongsTo(ManystoreShop::class, 'shop_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function activity()
{
return $this->belongsTo(Activity::class, 'classes_activity_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function detail()
{
return $this->belongsTo(OrderDetail::class, 'activity_order_detail_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}

View File

@ -0,0 +1,239 @@
<?php
namespace app\common\model\school\classes\activity\order;
use app\admin\model\manystore\Shop;
use app\common\model\school\classes\activity\Activity;
use app\common\model\dyqc\ManystoreShop;
use app\manystore\model\Manystore;
use think\Model;
use traits\model\SoftDelete;
class OrderDetail extends Model
{
use SoftDelete;
// 表名
protected $name = 'school_classes_activity_order_detail';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = 'deletetime';
// 追加属性
protected $append = [
'address_type_text',
'start_time_text',
'end_time_text',
'sign_start_time_text',
'sign_end_time_text',
'status_text',
'recommend_text',
'hot_text',
'new_text',
'selfhot_text',
'expirestatus_text',
'add_type_text'
];
protected static function init()
{
self::afterInsert(function ($row) {
if (!$row['weigh']) {
$pk = $row->getPk();
$row->getQuery()->where($pk, $row[$pk])->update(['weigh' => $row[$pk]]);
}
});
}
public function getAddressTypeList()
{
return ['1' => __('Address_type 1'), '2' => __('Address_type 2')];
}
public function getStatusList()
{
return ['1' => __('Status 1'), '2' => __('Status 2'), '3' => __('Status 3')];
}
public function getRecommendList()
{
return ['0' => __('Recommend 0'), '1' => __('Recommend 1')];
}
public function getHotList()
{
return ['0' => __('Hot 0'), '1' => __('Hot 1')];
}
public function getNewList()
{
return ['0' => __('New 0'), '1' => __('New 1')];
}
public function getSelfhotList()
{
return ['0' => __('Selfhot 0'), '1' => __('Selfhot 1')];
}
public function getExpirestatusList()
{
return ['1' => __('Expirestatus 1'), '2' => __('Expirestatus 2')];
}
public function getAddTypeList()
{
return ['1' => __('Add_type 1'), '2' => __('Add_type 2')];
}
public function getAddressTypeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['address_type']) ? $data['address_type'] : '');
$list = $this->getAddressTypeList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getStartTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['start_time']) ? $data['start_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getEndTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['end_time']) ? $data['end_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getSignStartTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['sign_start_time']) ? $data['sign_start_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getSignEndTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['sign_end_time']) ? $data['sign_end_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
$list = $this->getStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getRecommendTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['recommend']) ? $data['recommend'] : '');
$list = $this->getRecommendList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getHotTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['hot']) ? $data['hot'] : '');
$list = $this->getHotList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getNewTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['new']) ? $data['new'] : '');
$list = $this->getNewList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getSelfhotTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['selfhot']) ? $data['selfhot'] : '');
$list = $this->getSelfhotList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getExpirestatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['expirestatus']) ? $data['expirestatus'] : '');
$list = $this->getExpirestatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getAddTypeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['add_type']) ? $data['add_type'] : '');
$list = $this->getAddTypeList();
return isset($list[$value]) ? $list[$value] : '';
}
protected function setStartTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setEndTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setSignStartTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setSignEndTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
public function activityorder()
{
return $this->belongsTo(Order::class, 'classes_activity_order_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function activity()
{
return $this->belongsTo(Activity::class, 'classes_activity_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function manystore()
{
return $this->belongsTo(Manystore::class, 'manystore_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function shop()
{
return $this->belongsTo(ManystoreShop::class, 'shop_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function user()
{
return $this->belongsTo('app\common\model\User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}

View File

@ -0,0 +1,53 @@
<?php
namespace app\common\model\school\classes\activity\order;
use think\Model;
use traits\model\SoftDelete;
class OrderLog extends Model
{
use SoftDelete;
// 表名
protected $name = 'school_classes_activity_order_log';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = 'deletetime';
// 追加属性
protected $append = [
'status_text'
];
public function getStatusList()
{
return ['-3' => __('Status -3'), '0' => __('Status 0'), '2' => __('Status 2'), '3' => __('Status 3'), '4' => __('Status 4'), '6' => __('Status 6'), '9' => __('Status 9')];
}
public function getStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
$list = $this->getStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function activityorder()
{
return $this->belongsTo(Order::class, 'classes_activity_order_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}

View File

@ -0,0 +1,354 @@
<?php
namespace app\manystore\controller\school\classes\activity;
use app\common\controller\ManystoreBase;
use app\common\model\manystore\UserAuth;
use app\common\model\User;
use app\manystore\model\Manystore;
use think\Db;
use think\Exception;
use think\exception\PDOException;
use think\exception\ValidateException;
/**
* 课程活动
*
* @icon fa fa-circle-o
*/
class Activity extends ManystoreBase
{
/**
* Activity模型对象
* @var \app\manystore\model\school\classes\activity\Activity
*/
protected $model = null;
protected $itemmodel = null;
protected $qSwitch = true;
protected $qFields = ["user_id","shop_id","manystore_id"];
public function _initialize()
{
// parent::_initialize();
$this->model = new \app\manystore\model\school\classes\activity\Activity;
$this->itemmodel = new \app\manystore\model\school\classes\activity\ActivityItem();
parent::_initialize();
$this->view->assign("addressTypeList", $this->model->getAddressTypeList());
$this->view->assign("statusList", $this->model->getStatusList());
$this->view->assign("recommendList", $this->model->getRecommendList());
$this->view->assign("hotList", $this->model->getHotList());
$this->view->assign("newList", $this->model->getNewList());
$this->view->assign("selfhotList", $this->model->getSelfhotList());
$this->view->assign("expirestatusList", $this->model->getExpirestatusList());
$this->view->assign("addTypeList", $this->model->getAddTypeList());
$this->getCity();
$this->view->assign("itemStatusList", $this->itemmodel->getStatusList());
$this->view->assign("sexList", $this->itemmodel->getSexList());
}
public function import()
{
parent::import();
}
/**
* 默认生成的控制器所继承的父类中有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();
$list = $this->model
->with(['manystore','manystoreshop'])
->where($where)
->order($sort, $order)
->paginate($limit);
foreach ($list as $row) {
$row->getRelation('manystore')->visible(['nickname']);
$row->getRelation('manystoreshop')->visible(['name','logo']);
}
$result = array("total" => $list->total(), "rows" => $list->items());
return json($result);
}
return $this->view->fetch();
}
protected function update_classes($classes_activity_id){
}
protected function updateCheck($id,$params=[],$row=null){
// 课程存在售后订单则不允许操作
}
protected function update_check(&$params,$row=null)
{
//开始和结束时间不能为空
$time = $params["time"];
if(empty($time))throw new \Exception("{$params["title"]}请选择开始和结束时间".$time);
$split_line = " - ";
$time_arr = explode($split_line,$time);
$params["start_time"] = $time_arr[0] ;
$params["end_time"] = $time_arr[1];
unset($params["time"]);
$start_time = $params["start_time"];
$end_time = $params["end_time"];
if(empty($start_time) || empty($end_time)){
throw new \Exception("{$params["title"]}请选择开始和结束时间".$time);
}
//转化时间戳
$start_time = $params["start_time"] && !is_numeric($params["start_time"]) ? strtotime($params["start_time"]) : $params["start_time"];
$end_time = $params["end_time"] && !is_numeric($params["end_time"]) ? strtotime($params["end_time"]) : $params["end_time"];
//结束时间不能小于开始时间
if($end_time<=$start_time){
throw new \Exception("{$params["title"]}结束时间不能小于开始时间");
}
//开始和结束时间不能为空
$time = $params["sign_time"];
if(empty($time))throw new \Exception("{$params["title"]}请选择开始和结束时间".$time);
$split_line = " - ";
$time_arr = explode($split_line,$time);
$params["sign_start_time"] = $time_arr[0] ;
$params["sign_end_time"] = $time_arr[1];
unset($params["sign_time"]);
$start_time = $params["sign_start_time"];
$end_time = $params["sign_end_time"];
if(empty($start_time) || empty($end_time)){
throw new \Exception("{$params["title"]}请选择开始和结束时间".$time);
}
//转化时间戳
$start_time = $params["sign_start_time"] && !is_numeric($params["sign_start_time"]) ? strtotime($params["sign_start_time"]) : $params["sign_start_time"];
$end_time = $params["sign_end_time"] && !is_numeric($params["sign_end_time"]) ? strtotime($params["sign_end_time"]) : $params["sign_end_time"];
//结束时间不能小于开始时间
if($end_time<=$start_time){
throw new \Exception("{$params["title"]}结束时间不能小于开始时间");
}
//修改
if($row){
}else{
//新增
}
}
/**
* 添加
*
* @return string
* @throws \think\Exception
*/
public function add()
{
if ($this->request->isPost()) {
$params = $this->request->post("row/a");
if ($params) {
$params = $this->preExcludeFields($params);
if($this->storeIdFieldAutoFill && STORE_ID ){
$params['store_id'] = STORE_ID;
}
if($this->shopIdAutoCondition && SHOP_ID){
$params['shop_id'] = SHOP_ID;
}
try {
$this->update_check($params,$row=null);
} catch (ValidateException|PDOException|Exception $e) {
$this->error($e->getMessage());
}
$result = false;
Db::startTrans();
try {
//是否采用模型验证
if ($this->modelValidate) {
$name = str_replace("\\model\\", "\\validate\\", get_class($this->model));
$validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.add' : $name) : $this->modelValidate;
$this->model->validateFailException(true)->validate($validate);
}
$this->update_check($params,$row=null);
$result = $this->model->allowField(true)->save($params);
$this->update_classes($this->model["id"]);
Db::commit();
} catch (ValidateException $e) {
Db::rollback();
$this->error($e->getMessage());
} catch (PDOException $e) {
Db::rollback();
$this->error($e->getMessage());
} catch (Exception $e) {
Db::rollback();
$this->error($e->getMessage());
}
if ($result !== false) {
$this->success();
} else {
$this->error(__('No rows were inserted'));
}
}
$this->error(__('Parameter %s can not be empty', ''));
}
return $this->view->fetch();
}
/**
* 编辑
*/
public function edit($ids = null)
{
if($this->shopIdAutoCondition){
$this->model->where(array('shop_id'=>SHOP_ID));
}
$row = $this->model->where(array('id'=>$ids))->find();
if (!$row) {
$this->error(__('No Results were found'));
}
if ($this->request->isPost()) {
$params = $this->request->post("row/a");
if ($params) {
$params = $this->preExcludeFields($params);
$result = false;
try {
$this->update_check($params,$row);
} catch (ValidateException|PDOException|Exception $e) {
$this->error($e->getMessage());
}
Db::startTrans();
try {
//是否采用模型验证
if ($this->modelValidate) {
$name = str_replace("\\model\\", "\\validate\\", get_class($this->model));
$validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.edit' : $name) : $this->modelValidate;
$row->validateFailException(true)->validate($validate);
}
$this->update_check($params,$row);
$result = $row->allowField(true)->save($params);
$this->update_classes($row["id"]);
Db::commit();
} catch (ValidateException $e) {
Db::rollback();
$this->error($e->getMessage());
} catch (PDOException $e) {
Db::rollback();
$this->error($e->getMessage());
} catch (Exception $e) {
Db::rollback();
$this->error($e->getMessage());
}
if ($result !== false) {
$this->success();
} else {
$this->error(__('No rows were updated'));
}
}
$this->error(__('Parameter %s can not be empty', ''));
}
$user = User::where("id", $row["user_id"])->find();
// if(!$user) $this->error("未找到用户请先让用户登录小程序再提交表单");
$row["user_id"] = $user["mobile"]?? ""; //nickname|realname|mobile
$this->view->assign("row", $row);
return $this->view->fetch();
}
/**
* 删除
*/
public function del($ids = "")
{
if (!$this->request->isPost()) {
$this->error(__("Invalid parameters"));
}
$ids = $ids ? $ids : $this->request->post("ids");
if ($ids) {
$pk = $this->model->getPk();
if($this->shopIdAutoCondition){
$this->model->where(array('shop_id'=>SHOP_ID));
}
$list = $this->model->where($pk, 'in', $ids)->select();
foreach ($list as $item) {
$this->updateCheck($item->id);
}
$count = 0;
Db::startTrans();
try {
foreach ($list as $k => $v) {
$count += $v->delete();
}
Db::commit();
} catch (PDOException $e) {
Db::rollback();
$this->error($e->getMessage());
} catch (Exception $e) {
Db::rollback();
$this->error($e->getMessage());
}
if ($count) {
$this->success();
} else {
$this->error(__('No rows were deleted'));
}
}
$this->error(__('Parameter %s can not be empty', 'ids'));
}
}

View File

@ -0,0 +1,84 @@
<?php
namespace app\manystore\controller\school\classes\activity;
use app\common\controller\ManystoreBase;
/**
* 课程活动审核
*
* @icon fa fa-circle-o
*/
class ActivityAuth extends ManystoreBase
{
/**
* ActivityAuth模型对象
* @var \app\manystore\model\school\classes\activity\ActivityAuth
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\manystore\model\school\classes\activity\ActivityAuth;
$this->view->assign("addressTypeList", $this->model->getAddressTypeList());
$this->view->assign("statusList", $this->model->getStatusList());
$this->view->assign("recommendList", $this->model->getRecommendList());
$this->view->assign("hotList", $this->model->getHotList());
$this->view->assign("newList", $this->model->getNewList());
$this->view->assign("selfhotList", $this->model->getSelfhotList());
$this->view->assign("authStatusList", $this->model->getAuthStatusList());
$this->view->assign("expirestatusList", $this->model->getExpirestatusList());
$this->view->assign("addTypeList", $this->model->getAddTypeList());
}
public function import()
{
parent::import();
}
/**
* 默认生成的控制器所继承的父类中有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();
$list = $this->model
->with(['schoolclassesactivity','manystore','manystoreshop'])
->where($where)
->order($sort, $order)
->paginate($limit);
foreach ($list as $row) {
$row->getRelation('schoolclassesactivity')->visible(['id']);
$row->getRelation('manystore')->visible(['nickname']);
$row->getRelation('manystoreshop')->visible(['name','logo']);
}
$result = array("total" => $list->total(), "rows" => $list->items());
return json($result);
}
return $this->view->fetch();
}
}

View File

@ -0,0 +1,77 @@
<?php
namespace app\manystore\controller\school\classes\activity;
use app\common\controller\ManystoreBase;
/**
* 课程活动项目
*
* @icon fa fa-circle-o
*/
class ActivityItem extends ManystoreBase
{
/**
* ActivityItem模型对象
* @var \app\manystore\model\school\classes\activity\ActivityItem
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\manystore\model\school\classes\activity\ActivityItem;
$this->view->assign("statusList", $this->model->getStatusList());
$this->view->assign("sexList", $this->model->getSexList());
}
public function import()
{
parent::import();
}
/**
* 默认生成的控制器所继承的父类中有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();
$list = $this->model
->with(['manystore','manystoreshop','schoolclassesactivity'])
->where($where)
->order($sort, $order)
->paginate($limit);
foreach ($list as $row) {
$row->getRelation('manystore')->visible(['nickname']);
$row->getRelation('manystoreshop')->visible(['name','logo']);
$row->getRelation('schoolclassesactivity')->visible(['title','headimage']);
}
$result = array("total" => $list->total(), "rows" => $list->items());
return json($result);
}
return $this->view->fetch();
}
}

View File

@ -0,0 +1,77 @@
<?php
namespace app\manystore\controller\school\classes\activity;
use app\common\controller\ManystoreBase;
/**
* 课程活动项目审核管理
*
* @icon fa fa-circle-o
*/
class ActivityItemAuth extends ManystoreBase
{
/**
* ActivityItemAuth模型对象
* @var \app\manystore\model\school\classes\activity\ActivityItemAuth
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\manystore\model\school\classes\activity\ActivityItemAuth;
$this->view->assign("statusList", $this->model->getStatusList());
$this->view->assign("sexList", $this->model->getSexList());
}
public function import()
{
parent::import();
}
/**
* 默认生成的控制器所继承的父类中有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();
$list = $this->model
->with(['manystore','manystoreshop','schoolclassesactivity'])
->where($where)
->order($sort, $order)
->paginate($limit);
foreach ($list as $row) {
$row->getRelation('manystore')->visible(['nickname']);
$row->getRelation('manystoreshop')->visible(['name','logo']);
$row->getRelation('schoolclassesactivity')->visible(['title','headimage']);
}
$result = array("total" => $list->total(), "rows" => $list->items());
return json($result);
}
return $this->view->fetch();
}
}

View File

@ -0,0 +1,82 @@
<?php
namespace app\manystore\controller\school\classes\activity\order;
use app\common\controller\ManystoreBase;
/**
* 机构课程活动订单
*
* @icon fa fa-circle-o
*/
class Order extends ManystoreBase
{
/**
* Order模型对象
* @var \app\manystore\model\school\classes\activity\order\Order
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\manystore\model\school\classes\activity\order\Order;
$this->view->assign("payTypeList", $this->model->getPayTypeList());
$this->view->assign("statusList", $this->model->getStatusList());
$this->view->assign("beforeStatusList", $this->model->getBeforeStatusList());
$this->view->assign("serverStatusList", $this->model->getServerStatusList());
$this->view->assign("authStatusList", $this->model->getAuthStatusList());
}
public function import()
{
parent::import();
}
/**
* 默认生成的控制器所继承的父类中有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();
$list = $this->model
->with(['user','manystore','manystoreshop','schoolclassesactivity','schoolclassesactivityorderdetail'])
->where($where)
->order($sort, $order)
->paginate($limit);
foreach ($list as $row) {
$row->getRelation('user')->visible(['nickname','realname','mobile','avatar']);
$row->getRelation('manystore')->visible(['nickname']);
$row->getRelation('manystoreshop')->visible(['name','logo']);
$row->getRelation('schoolclassesactivity')->visible(['title','headimage']);
$row->getRelation('schoolclassesactivityorderdetail')->visible(['title','headimage']);
}
$result = array("total" => $list->total(), "rows" => $list->items());
return json($result);
}
return $this->view->fetch();
}
}

View File

@ -0,0 +1,85 @@
<?php
namespace app\manystore\controller\school\classes\activity\order;
use app\common\controller\ManystoreBase;
/**
* 课程活动订单详情
*
* @icon fa fa-circle-o
*/
class OrderDetail extends ManystoreBase
{
/**
* OrderDetail模型对象
* @var \app\manystore\model\school\classes\activity\order\OrderDetail
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\manystore\model\school\classes\activity\order\OrderDetail;
$this->view->assign("addressTypeList", $this->model->getAddressTypeList());
$this->view->assign("statusList", $this->model->getStatusList());
$this->view->assign("recommendList", $this->model->getRecommendList());
$this->view->assign("hotList", $this->model->getHotList());
$this->view->assign("newList", $this->model->getNewList());
$this->view->assign("selfhotList", $this->model->getSelfhotList());
$this->view->assign("expirestatusList", $this->model->getExpirestatusList());
$this->view->assign("addTypeList", $this->model->getAddTypeList());
}
public function import()
{
parent::import();
}
/**
* 默认生成的控制器所继承的父类中有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();
$list = $this->model
->with(['schoolclassesactivityorder','schoolclassesactivity','manystore','manystoreshop','user'])
->where($where)
->order($sort, $order)
->paginate($limit);
foreach ($list as $row) {
$row->getRelation('schoolclassesactivityorder')->visible(['order_no','pay_no']);
$row->getRelation('schoolclassesactivity')->visible(['title','headimage']);
$row->getRelation('manystore')->visible(['nickname']);
$row->getRelation('manystoreshop')->visible(['name','logo']);
$row->getRelation('user')->visible(['nickname','realname','mobile','avatar']);
}
$result = array("total" => $list->total(), "rows" => $list->items());
return json($result);
}
return $this->view->fetch();
}
}

View File

@ -0,0 +1,74 @@
<?php
namespace app\manystore\controller\school\classes\activity\order;
use app\common\controller\ManystoreBase;
/**
* 机构课程活动订单日志
*
* @icon fa fa-circle-o
*/
class OrderLog extends ManystoreBase
{
/**
* OrderLog模型对象
* @var \app\manystore\model\school\classes\activity\order\OrderLog
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\manystore\model\school\classes\activity\order\OrderLog;
$this->view->assign("statusList", $this->model->getStatusList());
}
public function import()
{
parent::import();
}
/**
* 默认生成的控制器所继承的父类中有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();
$list = $this->model
->with(['schoolclassesactivityorder'])
->where($where)
->order($sort, $order)
->paginate($limit);
foreach ($list as $row) {
$row->getRelation('schoolclassesactivityorder')->visible(['order_no','pay_no']);
}
$result = array("total" => $list->total(), "rows" => $list->items());
return json($result);
}
return $this->view->fetch();
}
}

View File

@ -0,0 +1,68 @@
<?php
return [
'Manystore_id' => '机构账号id',
'Shop_id' => '机构店铺id',
'Title' => '标题',
'Headimage' => '头图',
'Images' => '轮播图',
'Address_type' => '地址类型',
'Address_type 1' => '按机构',
'Address_type 2' => '独立位置',
'Address_city' => '城市选择',
'Province' => '省编号',
'City' => '市编号',
'District' => '县区编号',
'Address' => '活动地址',
'Address_detail' => '活动详细地址',
'Longitude' => '经度',
'Latitude' => '纬度',
'Start_time' => '活动开始时间',
'End_time' => '活动结束时间',
'Sign_start_time' => '报名开始时间',
'Sign_end_time' => '报名结束时间',
'Price' => '报名费用',
'People_num' => '活动人数',
'Item' => '活动项目',
'Content' => '活动详情',
'Status' => '状态',
'Status 1' => '上架',
'Status 2' => '下架',
'Status 3' => '平台下架',
'Weigh' => '权重',
'Recommend' => '平台推荐',
'Recommend 0' => '否',
'Recommend 1' => '是',
'Hot' => '平台热门',
'Hot 0' => '否',
'Hot 1' => '是',
'New' => '平台最新',
'New 0' => '否',
'New 1' => '是',
'Selfhot' => '机构热门',
'Selfhot 0' => '否',
'Selfhot 1' => '是',
'Sale' => '总销量',
'Stock' => '限制总人数',
'Views' => '浏览量',
'Expirestatus' => '过期状态',
'Expirestatus 1' => '进行中',
'Expirestatus 2' => '已过期',
'Add_type' => '添加人类型',
'Add_type 1' => '机构',
'Add_type 2' => '总后台',
'Add_id' => '添加人id',
'Createtime' => '创建时间',
'Updatetime' => '修改时间',
'Deletetime' => '删除时间',
'Manystore.nickname' => '昵称',
'Manystoreshop.name' => '店铺名称',
'Manystoreshop.logo' => '品牌LOGO',
'Sex' => '性别限制',
'Sex 1' => '男',
'Sex 2' => '女',
'Sex 3' => '男女不限',
'Limit_num' => '本项目限定人数',
'Age' => '年龄限制描述',
'Item_json' => '活动项目',
];

View File

@ -0,0 +1,69 @@
<?php
return [
'Classes_activity_id' => '课程活动id',
'Manystore_id' => '机构账号id',
'Shop_id' => '机构店铺id',
'Title' => '标题',
'Headimage' => '头图',
'Images' => '轮播图',
'Address_type' => '地址类型',
'Address_type 1' => '按机构',
'Address_type 2' => '独立位置',
'Address_city' => '城市选择',
'Province' => '省编号',
'City' => '市编号',
'District' => '县区编号',
'Address' => '活动地址',
'Address_detail' => '活动详细地址',
'Longitude' => '经度',
'Latitude' => '纬度',
'Start_time' => '活动开始时间',
'End_time' => '活动结束时间',
'Sign_start_time' => '报名开始时间',
'Sign_end_time' => '报名结束时间',
'Price' => '报名费用',
'People_num' => '活动人数',
'Item' => '活动项目',
'Content' => '活动详情',
'Status' => '状态',
'Status 1' => '上架',
'Status 2' => '下架',
'Status 3' => '平台下架',
'Weigh' => '权重',
'Recommend' => '平台推荐',
'Recommend 0' => '否',
'Recommend 1' => '是',
'Hot' => '平台热门',
'Hot 0' => '否',
'Hot 1' => '是',
'New' => '平台最新',
'New 0' => '否',
'New 1' => '是',
'Selfhot' => '机构热门',
'Selfhot 0' => '否',
'Selfhot 1' => '是',
'Auth_status' => '审核状态',
'Auth_status 0' => '待审核',
'Auth_status 1' => '审核通过',
'Auth_status 2' => '审核不通过',
'Reason' => '审核不通过原因',
'Sale' => '总销量',
'Stock' => '限制总人数',
'Views' => '浏览量',
'Expirestatus' => '过期状态',
'Expirestatus 1' => '进行中',
'Expirestatus 2' => '已过期',
'Add_type' => '添加人类型',
'Add_type 1' => '机构',
'Add_type 2' => '总后台',
'Add_id' => '添加人id',
'Admin_id' => '审核管理员id',
'Auth_time' => '审核时间',
'Createtime' => '创建时间',
'Updatetime' => '修改时间',
'Deletetime' => '删除时间',
'Manystore.nickname' => '昵称',
'Manystoreshop.name' => '店铺名称',
'Manystoreshop.logo' => '品牌LOGO'
];

View File

@ -0,0 +1,29 @@
<?php
return [
'Manystore_id' => '机构账号id',
'Shop_id' => '机构店铺id',
'Classes_activity_id' => '课程活动id',
'Name' => '活动项名称',
'Price' => '项目价格0为免费',
'Limit_num' => '本项目限定人数',
'Age' => '年龄限制描述',
'Status' => '状态',
'Status 1' => '上架',
'Status 2' => '下架',
'Sex' => '性别限制',
'Sex 1' => '男',
'Sex 2' => '女',
'Sex 3' => '男女不限',
'Weigh' => '权重',
'Sign_num' => '已报名人数',
'Verification_num' => '已核销人数',
'Createtime' => '创建时间',
'Updatetime' => '修改时间',
'Deletetime' => '删除时间',
'Manystore.nickname' => '昵称',
'Manystoreshop.name' => '店铺名称',
'Manystoreshop.logo' => '品牌LOGO',
'Schoolclassesactivity.title' => '标题',
'Schoolclassesactivity.headimage' => '头图'
];

View File

@ -0,0 +1,29 @@
<?php
return [
'Manystore_id' => '机构账号id',
'Shop_id' => '机构店铺id',
'Classes_activity_id' => '课程活动id',
'Name' => '活动项名称',
'Price' => '项目价格0为免费',
'Limit_num' => '本项目限定人数',
'Age' => '年龄限制描述',
'Status' => '状态',
'Status 1' => '上架',
'Status 2' => '下架',
'Sex' => '性别限制',
'Sex 1' => '男',
'Sex 2' => '女',
'Sex 3' => '男女不限',
'Weigh' => '权重',
'Sign_num' => '已报名人数',
'Verification_num' => '已核销人数',
'Createtime' => '创建时间',
'Updatetime' => '修改时间',
'Deletetime' => '删除时间',
'Manystore.nickname' => '昵称',
'Manystoreshop.name' => '店铺名称',
'Manystoreshop.logo' => '品牌LOGO',
'Schoolclassesactivity.title' => '标题',
'Schoolclassesactivity.headimage' => '头图'
];

View File

@ -0,0 +1,74 @@
<?php
return [
'Order_no' => '订单号',
'Pay_no' => '微信支付单号',
'User_id' => '下单人用户id',
'Manystore_id' => '机构账号id',
'Shop_id' => '机构id',
'Code' => '核销码',
'Codeimage' => '核销二维码图片',
'Codeoneimage' => '核销一维码图片',
'Classes_activity_id' => '课程活动id',
'Activity_order_detail_id' => '订单课程活动id',
'Beforeprice' => '订单优惠前金额',
'Totalprice' => '订单应付金额',
'Payprice' => '订单实付金额',
'Pay_type' => '支付方式',
'Pay_type yue' => '余额',
'Pay_type wechat' => '微信',
'Status' => '订单状态',
'Status -3' => '已取消',
'Status 0' => '待支付',
'Status 2' => '已报名待审核',
'Status 3' => '已预约',
'Status 4' => '售后中',
'Status 6' => '已退款',
'Status 9' => '已完成',
'Before_status' => '售后前状态',
'Before_status -3' => '已取消',
'Before_status 0' => '未售后',
'Before_status 2' => '已报名待审核',
'Before_status 3' => '已预约',
'Before_status 4' => '售后中',
'Before_status 6' => '已退款',
'Before_status 9' => '已完成',
'Server_status' => '售后订单状态',
'Server_status 0' => '正常',
'Server_status 3' => '售后中',
'Server_status 6' => '售后完成',
'Canceltime' => '取消时间',
'Paytime' => '支付时间',
'Auth_time' => '审核时间',
'Reservation_time' => '预约时间',
'Finishtime' => '完成时间',
'Refundtime' => '退款时间',
'Total_refundprice' => '应退款金额',
'Real_refundprice' => '实际退款金额',
'Sub_refundprice' => '剩余未退金额',
'Pay_json' => '三方支付信息json',
'Platform' => '支付平台',
'Verification_user_id' => '核销人用户id',
'Verification_type' => '核销用户类型',
'Reason' => '审核不通过原因',
'Auth_status' => '审核状态',
'Auth_status 0' => '待审核',
'Auth_status 1' => '审核通过',
'Auth_status 2' => '审核失败',
'Auth_user_id' => '审核用户id',
'Auth_type' => '审核用户类型',
'Createtime' => '创建时间',
'Updatetime' => '修改时间',
'Deletetime' => '删除时间',
'User.nickname' => '昵称',
'User.realname' => '真实姓名',
'User.mobile' => '手机号',
'User.avatar' => '头像',
'Manystore.nickname' => '昵称',
'Manystoreshop.name' => '店铺名称',
'Manystoreshop.logo' => '品牌LOGO',
'Schoolclassesactivity.title' => '标题',
'Schoolclassesactivity.headimage' => '头图',
'Schoolclassesactivityorderdetail.title' => '标题',
'Schoolclassesactivityorderdetail.headimage' => '头图'
];

View File

@ -0,0 +1,72 @@
<?php
return [
'Classes_activity_order_id' => '课程活动订单id',
'Classes_activity_id' => '课程活动id',
'Manystore_id' => '机构账号id',
'Shop_id' => '机构id',
'User_id' => '下单用户id',
'Title' => '标题',
'Headimage' => '头图',
'Images' => '轮播图',
'Address_type' => '地址类型',
'Address_type 1' => '按机构',
'Address_type 2' => '独立位置',
'Address_city' => '城市选择',
'Province' => '省编号',
'City' => '市编号',
'District' => '县区编号',
'Address' => '活动地址',
'Address_detail' => '活动详细地址',
'Longitude' => '经度',
'Latitude' => '纬度',
'Start_time' => '活动开始时间',
'End_time' => '活动结束时间',
'Sign_start_time' => '报名开始时间',
'Sign_end_time' => '报名结束时间',
'Price' => '报名费用',
'People_num' => '活动人数',
'Item' => '活动项目',
'Content' => '活动详情',
'Status' => '状态',
'Status 1' => '上架',
'Status 2' => '下架',
'Status 3' => '平台下架',
'Weigh' => '权重',
'Recommend' => '平台推荐',
'Recommend 0' => '否',
'Recommend 1' => '是',
'Hot' => '平台热门',
'Hot 0' => '否',
'Hot 1' => '是',
'New' => '平台最新',
'New 0' => '否',
'New 1' => '是',
'Selfhot' => '机构热门',
'Selfhot 0' => '否',
'Selfhot 1' => '是',
'Sale' => '总销量',
'Stock' => '限制总人数',
'Views' => '浏览量',
'Expirestatus' => '过期状态',
'Expirestatus 1' => '进行中',
'Expirestatus 2' => '已过期',
'Add_type' => '添加人类型',
'Add_type 1' => '机构',
'Add_type 2' => '总后台',
'Add_id' => '添加人id',
'Createtime' => '创建时间',
'Updatetime' => '修改时间',
'Deletetime' => '删除时间',
'Schoolclassesactivityorder.order_no' => '订单号',
'Schoolclassesactivityorder.pay_no' => '微信支付单号',
'Schoolclassesactivity.title' => '标题',
'Schoolclassesactivity.headimage' => '头图',
'Manystore.nickname' => '昵称',
'Manystoreshop.name' => '店铺名称',
'Manystoreshop.logo' => '品牌LOGO',
'User.nickname' => '昵称',
'User.realname' => '真实姓名',
'User.mobile' => '手机号',
'User.avatar' => '头像'
];

View File

@ -0,0 +1,21 @@
<?php
return [
'Classes_activity_order_id' => '课程活动订单id',
'Status' => '订单状态',
'Status -3' => '已取消',
'Status 0' => '待支付',
'Status 2' => '已报名待审核',
'Status 3' => '已预约',
'Status 4' => '售后中',
'Status 6' => '已退款',
'Status 9' => '已完成',
'Log_text' => '记录内容',
'Oper_type' => '记录人类型',
'Oper_id' => '记录人id',
'Createtime' => '创建时间',
'Updatetime' => '修改时间',
'Deletetime' => '删除时间',
'Schoolclassesactivityorder.order_no' => '订单号',
'Schoolclassesactivityorder.pay_no' => '微信支付单号'
];

View File

@ -0,0 +1,217 @@
<?php
namespace app\manystore\model\school\classes\activity;
use app\admin\model\manystore\Shop;
use app\manystore\model\Manystore;
use think\Model;
use traits\model\SoftDelete;
class Activity extends Model
{
use SoftDelete;
// 表名
protected $name = 'school_classes_activity';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = 'deletetime';
// 追加属性
protected $append = [
'address_type_text',
'start_time_text',
'end_time_text',
'sign_start_time_text',
'sign_end_time_text',
'status_text',
'recommend_text',
'hot_text',
'new_text',
'selfhot_text',
'expirestatus_text',
'add_type_text'
];
protected static function init()
{
self::afterInsert(function ($row) {
$pk = $row->getPk();
$row->getQuery()->where($pk, $row[$pk])->update(['weigh' => $row[$pk]]);
});
}
public function getAddressTypeList()
{
return ['1' => __('Address_type 1'), '2' => __('Address_type 2')];
}
public function getStatusList()
{
return ['1' => __('Status 1'), '2' => __('Status 2'), '3' => __('Status 3')];
}
public function getRecommendList()
{
return ['0' => __('Recommend 0'), '1' => __('Recommend 1')];
}
public function getHotList()
{
return ['0' => __('Hot 0'), '1' => __('Hot 1')];
}
public function getNewList()
{
return ['0' => __('New 0'), '1' => __('New 1')];
}
public function getSelfhotList()
{
return ['0' => __('Selfhot 0'), '1' => __('Selfhot 1')];
}
public function getExpirestatusList()
{
return ['1' => __('Expirestatus 1'), '2' => __('Expirestatus 2')];
}
public function getAddTypeList()
{
return ['1' => __('Add_type 1'), '2' => __('Add_type 2')];
}
public function getAddressTypeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['address_type']) ? $data['address_type'] : '');
$list = $this->getAddressTypeList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getStartTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['start_time']) ? $data['start_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getEndTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['end_time']) ? $data['end_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getSignStartTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['sign_start_time']) ? $data['sign_start_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getSignEndTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['sign_end_time']) ? $data['sign_end_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
$list = $this->getStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getRecommendTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['recommend']) ? $data['recommend'] : '');
$list = $this->getRecommendList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getHotTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['hot']) ? $data['hot'] : '');
$list = $this->getHotList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getNewTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['new']) ? $data['new'] : '');
$list = $this->getNewList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getSelfhotTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['selfhot']) ? $data['selfhot'] : '');
$list = $this->getSelfhotList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getExpirestatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['expirestatus']) ? $data['expirestatus'] : '');
$list = $this->getExpirestatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getAddTypeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['add_type']) ? $data['add_type'] : '');
$list = $this->getAddTypeList();
return isset($list[$value]) ? $list[$value] : '';
}
protected function setStartTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setEndTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setSignStartTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setSignEndTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
public function manystore()
{
return $this->belongsTo(Manystore::class, 'manystore_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function manystoreshop()
{
return $this->belongsTo(Shop::class, 'shop_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}

View File

@ -0,0 +1,250 @@
<?php
namespace app\manystore\model\school\classes\activity;
use app\admin\model\manystore\Shop;
use app\manystore\model\Manystore;
use think\Model;
use traits\model\SoftDelete;
class ActivityAuth extends Model
{
use SoftDelete;
// 表名
protected $name = 'school_classes_activity_auth';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = 'deletetime';
// 追加属性
protected $append = [
'address_type_text',
'start_time_text',
'end_time_text',
'sign_start_time_text',
'sign_end_time_text',
'status_text',
'recommend_text',
'hot_text',
'new_text',
'selfhot_text',
'auth_status_text',
'expirestatus_text',
'add_type_text',
'auth_time_text'
];
protected static function init()
{
self::afterInsert(function ($row) {
$pk = $row->getPk();
$row->getQuery()->where($pk, $row[$pk])->update(['weigh' => $row[$pk]]);
});
}
public function getAddressTypeList()
{
return ['1' => __('Address_type 1'), '2' => __('Address_type 2')];
}
public function getStatusList()
{
return ['1' => __('Status 1'), '2' => __('Status 2'), '3' => __('Status 3')];
}
public function getRecommendList()
{
return ['0' => __('Recommend 0'), '1' => __('Recommend 1')];
}
public function getHotList()
{
return ['0' => __('Hot 0'), '1' => __('Hot 1')];
}
public function getNewList()
{
return ['0' => __('New 0'), '1' => __('New 1')];
}
public function getSelfhotList()
{
return ['0' => __('Selfhot 0'), '1' => __('Selfhot 1')];
}
public function getAuthStatusList()
{
return ['0' => __('Auth_status 0'), '1' => __('Auth_status 1'), '2' => __('Auth_status 2')];
}
public function getExpirestatusList()
{
return ['1' => __('Expirestatus 1'), '2' => __('Expirestatus 2')];
}
public function getAddTypeList()
{
return ['1' => __('Add_type 1'), '2' => __('Add_type 2')];
}
public function getAddressTypeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['address_type']) ? $data['address_type'] : '');
$list = $this->getAddressTypeList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getStartTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['start_time']) ? $data['start_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getEndTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['end_time']) ? $data['end_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getSignStartTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['sign_start_time']) ? $data['sign_start_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getSignEndTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['sign_end_time']) ? $data['sign_end_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
$list = $this->getStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getRecommendTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['recommend']) ? $data['recommend'] : '');
$list = $this->getRecommendList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getHotTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['hot']) ? $data['hot'] : '');
$list = $this->getHotList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getNewTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['new']) ? $data['new'] : '');
$list = $this->getNewList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getSelfhotTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['selfhot']) ? $data['selfhot'] : '');
$list = $this->getSelfhotList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getAuthStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['auth_status']) ? $data['auth_status'] : '');
$list = $this->getAuthStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getExpirestatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['expirestatus']) ? $data['expirestatus'] : '');
$list = $this->getExpirestatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getAddTypeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['add_type']) ? $data['add_type'] : '');
$list = $this->getAddTypeList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getAuthTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['auth_time']) ? $data['auth_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
protected function setStartTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setEndTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setSignStartTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setSignEndTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setAuthTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
public function schoolclassesactivity()
{
return $this->belongsTo(Activity::class, 'classes_activity_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function manystore()
{
return $this->belongsTo(Manystore::class, 'manystore_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function manystoreshop()
{
return $this->belongsTo(Shop::class, 'shop_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}

View File

@ -0,0 +1,89 @@
<?php
namespace app\manystore\model\school\classes\activity;
use app\admin\model\manystore\Shop;
use app\manystore\model\Manystore;
use think\Model;
use traits\model\SoftDelete;
class ActivityItem extends Model
{
use SoftDelete;
// 表名
protected $name = 'school_classes_activity_item';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = 'deletetime';
// 追加属性
protected $append = [
'status_text',
'sex_text'
];
protected static function init()
{
self::afterInsert(function ($row) {
$pk = $row->getPk();
$row->getQuery()->where($pk, $row[$pk])->update(['weigh' => $row[$pk]]);
});
}
public function getStatusList()
{
return ['1' => __('Status 1'), '2' => __('Status 2')];
}
public function getSexList()
{
return ['1' => __('Sex 1'), '2' => __('Sex 2'), '3' => __('Sex 3')];
}
public function getStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
$list = $this->getStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getSexTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['sex']) ? $data['sex'] : '');
$list = $this->getSexList();
return isset($list[$value]) ? $list[$value] : '';
}
public function manystore()
{
return $this->belongsTo(Manystore::class, 'manystore_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function manystoreshop()
{
return $this->belongsTo(Shop::class, 'shop_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function schoolclassesactivity()
{
return $this->belongsTo(Activity::class, 'classes_activity_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}

View File

@ -0,0 +1,89 @@
<?php
namespace app\manystore\model\school\classes\activity;
use app\admin\model\manystore\Shop;
use app\manystore\model\Manystore;
use think\Model;
use traits\model\SoftDelete;
class ActivityItemAuth extends Model
{
use SoftDelete;
// 表名
protected $name = 'school_classes_activity_item_auth';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = 'deletetime';
// 追加属性
protected $append = [
'status_text',
'sex_text'
];
protected static function init()
{
self::afterInsert(function ($row) {
$pk = $row->getPk();
$row->getQuery()->where($pk, $row[$pk])->update(['weigh' => $row[$pk]]);
});
}
public function getStatusList()
{
return ['1' => __('Status 1'), '2' => __('Status 2')];
}
public function getSexList()
{
return ['1' => __('Sex 1'), '2' => __('Sex 2'), '3' => __('Sex 3')];
}
public function getStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
$list = $this->getStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getSexTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['sex']) ? $data['sex'] : '');
$list = $this->getSexList();
return isset($list[$value]) ? $list[$value] : '';
}
public function manystore()
{
return $this->belongsTo(Manystore::class, 'manystore_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function manystoreshop()
{
return $this->belongsTo(Shop::class, 'shop_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function schoolclassesactivity()
{
return $this->belongsTo(Activity::class, 'classes_activity_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}

View File

@ -0,0 +1,212 @@
<?php
namespace app\manystore\model\school\classes\activity\order;
use app\admin\model\manystore\Shop;
use app\manystore\model\Manystore;
use app\manystore\model\school\classes\activity\Activity;
use think\Model;
use traits\model\SoftDelete;
class Order extends Model
{
use SoftDelete;
// 表名
protected $name = 'school_classes_activity_order';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = 'deletetime';
// 追加属性
protected $append = [
'pay_type_text',
'status_text',
'before_status_text',
'server_status_text',
'canceltime_text',
'paytime_text',
'auth_time_text',
'reservation_time_text',
'finishtime_text',
'refundtime_text',
'auth_status_text'
];
public function getPayTypeList()
{
return ['yue' => __('Pay_type yue'), 'wechat' => __('Pay_type wechat')];
}
public function getStatusList()
{
return ['-3' => __('Status -3'), '0' => __('Status 0'), '2' => __('Status 2'), '3' => __('Status 3'), '4' => __('Status 4'), '6' => __('Status 6'), '9' => __('Status 9')];
}
public function getBeforeStatusList()
{
return ['-3' => __('Before_status -3'), '0' => __('Before_status 0'), '2' => __('Before_status 2'), '3' => __('Before_status 3'), '4' => __('Before_status 4'), '6' => __('Before_status 6'), '9' => __('Before_status 9')];
}
public function getServerStatusList()
{
return ['0' => __('Server_status 0'), '3' => __('Server_status 3'), '6' => __('Server_status 6')];
}
public function getAuthStatusList()
{
return ['0' => __('Auth_status 0'), '1' => __('Auth_status 1'), '2' => __('Auth_status 2')];
}
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 getStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
$list = $this->getStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getBeforeStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['before_status']) ? $data['before_status'] : '');
$list = $this->getBeforeStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getServerStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['server_status']) ? $data['server_status'] : '');
$list = $this->getServerStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getCanceltimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['canceltime']) ? $data['canceltime'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getPaytimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['paytime']) ? $data['paytime'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getAuthTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['auth_time']) ? $data['auth_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getReservationTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['reservation_time']) ? $data['reservation_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getFinishtimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['finishtime']) ? $data['finishtime'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getRefundtimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['refundtime']) ? $data['refundtime'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getAuthStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['auth_status']) ? $data['auth_status'] : '');
$list = $this->getAuthStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
protected function setCanceltimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setPaytimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setAuthTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setReservationTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setFinishtimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setRefundtimeAttr($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 manystore()
{
return $this->belongsTo(Manystore::class, 'manystore_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function manystoreshop()
{
return $this->belongsTo(Shop::class, 'shop_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function schoolclassesactivity()
{
return $this->belongsTo(Activity::class, 'classes_activity_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function schoolclassesactivityorderdetail()
{
return $this->belongsTo(OrderDetail::class, 'activity_order_detail_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}

View File

@ -0,0 +1,236 @@
<?php
namespace app\manystore\model\school\classes\activity\order;
use app\admin\model\manystore\Shop;
use app\manystore\model\Manystore;
use app\manystore\model\school\classes\activity\Activity;
use think\Model;
use traits\model\SoftDelete;
class OrderDetail extends Model
{
use SoftDelete;
// 表名
protected $name = 'school_classes_activity_order_detail';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = 'deletetime';
// 追加属性
protected $append = [
'address_type_text',
'start_time_text',
'end_time_text',
'sign_start_time_text',
'sign_end_time_text',
'status_text',
'recommend_text',
'hot_text',
'new_text',
'selfhot_text',
'expirestatus_text',
'add_type_text'
];
protected static function init()
{
self::afterInsert(function ($row) {
$pk = $row->getPk();
$row->getQuery()->where($pk, $row[$pk])->update(['weigh' => $row[$pk]]);
});
}
public function getAddressTypeList()
{
return ['1' => __('Address_type 1'), '2' => __('Address_type 2')];
}
public function getStatusList()
{
return ['1' => __('Status 1'), '2' => __('Status 2'), '3' => __('Status 3')];
}
public function getRecommendList()
{
return ['0' => __('Recommend 0'), '1' => __('Recommend 1')];
}
public function getHotList()
{
return ['0' => __('Hot 0'), '1' => __('Hot 1')];
}
public function getNewList()
{
return ['0' => __('New 0'), '1' => __('New 1')];
}
public function getSelfhotList()
{
return ['0' => __('Selfhot 0'), '1' => __('Selfhot 1')];
}
public function getExpirestatusList()
{
return ['1' => __('Expirestatus 1'), '2' => __('Expirestatus 2')];
}
public function getAddTypeList()
{
return ['1' => __('Add_type 1'), '2' => __('Add_type 2')];
}
public function getAddressTypeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['address_type']) ? $data['address_type'] : '');
$list = $this->getAddressTypeList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getStartTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['start_time']) ? $data['start_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getEndTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['end_time']) ? $data['end_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getSignStartTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['sign_start_time']) ? $data['sign_start_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getSignEndTimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['sign_end_time']) ? $data['sign_end_time'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
public function getStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
$list = $this->getStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getRecommendTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['recommend']) ? $data['recommend'] : '');
$list = $this->getRecommendList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getHotTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['hot']) ? $data['hot'] : '');
$list = $this->getHotList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getNewTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['new']) ? $data['new'] : '');
$list = $this->getNewList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getSelfhotTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['selfhot']) ? $data['selfhot'] : '');
$list = $this->getSelfhotList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getExpirestatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['expirestatus']) ? $data['expirestatus'] : '');
$list = $this->getExpirestatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function getAddTypeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['add_type']) ? $data['add_type'] : '');
$list = $this->getAddTypeList();
return isset($list[$value]) ? $list[$value] : '';
}
protected function setStartTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setEndTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setSignStartTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
protected function setSignEndTimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
public function schoolclassesactivityorder()
{
return $this->belongsTo(Order::class, 'classes_activity_order_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function schoolclassesactivity()
{
return $this->belongsTo(Activity::class, 'classes_activity_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function manystore()
{
return $this->belongsTo(Manystore::class, 'manystore_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function manystoreshop()
{
return $this->belongsTo(Shop::class, 'shop_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
public function user()
{
return $this->belongsTo('app\admin\model\User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}

View File

@ -0,0 +1,53 @@
<?php
namespace app\manystore\model\school\classes\activity\order;
use think\Model;
use traits\model\SoftDelete;
class OrderLog extends Model
{
use SoftDelete;
// 表名
protected $name = 'school_classes_activity_order_log';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = 'deletetime';
// 追加属性
protected $append = [
'status_text'
];
public function getStatusList()
{
return ['-3' => __('Status -3'), '0' => __('Status 0'), '2' => __('Status 2'), '3' => __('Status 3'), '4' => __('Status 4'), '6' => __('Status 6'), '9' => __('Status 9')];
}
public function getStatusTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
$list = $this->getStatusList();
return isset($list[$value]) ? $list[$value] : '';
}
public function schoolclassesactivityorder()
{
return $this->belongsTo(Order::class, 'classes_activity_order_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}

View File

@ -0,0 +1,27 @@
<?php
namespace app\manystore\validate\school\classes\activity;
use think\Validate;
class Activity extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}

View File

@ -0,0 +1,27 @@
<?php
namespace app\manystore\validate\school\classes\activity;
use think\Validate;
class ActivityAuth extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}

View File

@ -0,0 +1,27 @@
<?php
namespace app\manystore\validate\school\classes\activity;
use think\Validate;
class ActivityItem extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}

View File

@ -0,0 +1,27 @@
<?php
namespace app\manystore\validate\school\classes\activity;
use think\Validate;
class ActivityItemAuth extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}

View File

@ -0,0 +1,27 @@
<?php
namespace app\manystore\validate\school\classes\activity\order;
use think\Validate;
class Order extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}

View File

@ -0,0 +1,27 @@
<?php
namespace app\manystore\validate\school\classes\activity\order;
use think\Validate;
class OrderDetail extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}

View File

@ -0,0 +1,27 @@
<?php
namespace app\manystore\validate\school\classes\activity\order;
use think\Validate;
class OrderLog extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}

View File

@ -0,0 +1,272 @@
<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">{:__('Manystore_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-manystore_id" data-rule="required" data-source="manystore/index" class="form-control selectpage" name="row[manystore_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Headimage')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-headimage" data-rule="required" class="form-control" size="50" name="row[headimage]" type="text">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="faupload-headimage" class="btn btn-danger faupload" data-input-id="c-headimage" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-headimage"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-headimage" class="btn btn-primary fachoose" data-input-id="c-headimage" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-headimage"></span>
</div>
<ul class="row list-inline faupload-preview" id="p-headimage"></ul>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-images" data-rule="required" class="form-control" size="50" name="row[images]" type="text">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-images"></span>
</div>
<ul class="row list-inline faupload-preview" id="p-images"></ul>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Address_type')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-address_type" data-rule="required" class="form-control selectpicker" name="row[address_type]">
{foreach name="addressTypeList" item="vo"}
<option value="{$key}" {in name="key" value="1"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Address_city')}:</label>
<div class="col-xs-12 col-sm-8">
<div class='control-relative'><input id="c-address_city" class="form-control" data-toggle="city-picker" name="row[address_city]" type="text"></div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Province')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-province" class="form-control" name="row[province]" type="number">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('City')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-city" class="form-control" name="row[city]" type="number">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('District')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-district" class="form-control" name="row[district]" type="number">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-address" class="form-control" name="row[address]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Address_detail')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-address_detail" class="form-control" name="row[address_detail]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Longitude')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-longitude" class="form-control" name="row[longitude]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Latitude')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-latitude" class="form-control" name="row[latitude]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Start_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-start_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[start_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">{:__('End_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-end_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[end_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">{:__('Sign_start_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sign_start_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[sign_start_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">{:__('Sign_end_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sign_end_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[sign_end_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">{:__('Price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-price" data-rule="required" class="form-control" step="0.01" name="row[price]" type="number">
</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" 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">{:__('Item')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-item" class="form-control" name="row[item]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-content" data-rule="required" class="form-control editor" rows="5" name="row[content]" cols="50"></textarea>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="statusList" item="vo"}
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-weigh" class="form-control" name="row[weigh]" type="number" value="0">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Recommend')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-recommend" class="form-control selectpicker" name="row[recommend]">
{foreach name="recommendList" item="vo"}
<option value="{$key}" {in name="key" value="0"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Hot')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-hot" class="form-control selectpicker" name="row[hot]">
{foreach name="hotList" item="vo"}
<option value="{$key}" {in name="key" value="0"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('New')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-new" class="form-control selectpicker" name="row[new]">
{foreach name="newList" item="vo"}
<option value="{$key}" {in name="key" value="0"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Selfhot')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-selfhot" class="form-control selectpicker" name="row[selfhot]">
{foreach name="selfhotList" item="vo"}
<option value="{$key}" {in name="key" value="0"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Sale')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sale" class="form-control" name="row[sale]" type="number" value="0">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Stock')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-stock" class="form-control" name="row[stock]" type="number">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Views')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-views" class="form-control" name="row[views]" type="number" value="0">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Expirestatus')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="expirestatusList" item="vo"}
<label for="row[expirestatus]-{$key}"><input id="row[expirestatus]-{$key}" name="row[expirestatus]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Add_type')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-add_type" data-rule="required" class="form-control selectpicker" name="row[add_type]">
{foreach name="addTypeList" item="vo"}
<option value="{$key}" {in name="key" value="2"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Add_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-add_id" data-rule="required" data-source="add/index" class="form-control selectpage" name="row[add_id]" type="text" value="">
</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>

View File

@ -0,0 +1,272 @@
<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">{:__('Manystore_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-manystore_id" data-rule="required" data-source="manystore/index" class="form-control selectpage" name="row[manystore_id]" type="text" value="{$row.manystore_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" value="{$row.title|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Headimage')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-headimage" data-rule="required" class="form-control" size="50" name="row[headimage]" type="text" value="{$row.headimage|htmlentities}">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="faupload-headimage" class="btn btn-danger faupload" data-input-id="c-headimage" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-headimage"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-headimage" class="btn btn-primary fachoose" data-input-id="c-headimage" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-headimage"></span>
</div>
<ul class="row list-inline faupload-preview" id="p-headimage"></ul>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-images" data-rule="required" class="form-control" size="50" name="row[images]" type="text" value="{$row.images|htmlentities}">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-images"></span>
</div>
<ul class="row list-inline faupload-preview" id="p-images"></ul>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Address_type')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-address_type" data-rule="required" class="form-control selectpicker" name="row[address_type]">
{foreach name="addressTypeList" item="vo"}
<option value="{$key}" {in name="key" value="$row.address_type"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Address_city')}:</label>
<div class="col-xs-12 col-sm-8">
<div class='control-relative'><input id="c-address_city" class="form-control" data-toggle="city-picker" name="row[address_city]" type="text" value="{$row.address_city|htmlentities}"></div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Province')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-province" class="form-control" name="row[province]" type="number" value="{$row.province|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('City')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-city" class="form-control" name="row[city]" type="number" value="{$row.city|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('District')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-district" class="form-control" name="row[district]" type="number" value="{$row.district|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-address" class="form-control" name="row[address]" type="text" value="{$row.address|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Address_detail')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-address_detail" class="form-control" name="row[address_detail]" type="text" value="{$row.address_detail|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Longitude')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-longitude" class="form-control" name="row[longitude]" type="text" value="{$row.longitude|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Latitude')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-latitude" class="form-control" name="row[latitude]" type="text" value="{$row.latitude|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Start_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-start_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[start_time]" type="text" value="{:$row.start_time?datetime($row.start_time):''}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('End_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-end_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[end_time]" type="text" value="{:$row.end_time?datetime($row.end_time):''}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Sign_start_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sign_start_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[sign_start_time]" type="text" value="{:$row.sign_start_time?datetime($row.sign_start_time):''}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Sign_end_time')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sign_end_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[sign_end_time]" type="text" value="{:$row.sign_end_time?datetime($row.sign_end_time):''}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-price" data-rule="required" class="form-control" step="0.01" name="row[price]" type="number" value="{$row.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" 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">{:__('Item')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-item" class="form-control" name="row[item]" type="text" value="{$row.item|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-content" data-rule="required" class="form-control editor" rows="5" name="row[content]" cols="50">{$row.content|htmlentities}</textarea>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="statusList" item="vo"}
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-weigh" class="form-control" name="row[weigh]" type="number" value="{$row.weigh|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Recommend')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-recommend" class="form-control selectpicker" name="row[recommend]">
{foreach name="recommendList" item="vo"}
<option value="{$key}" {in name="key" value="$row.recommend"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Hot')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-hot" class="form-control selectpicker" name="row[hot]">
{foreach name="hotList" item="vo"}
<option value="{$key}" {in name="key" value="$row.hot"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('New')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-new" class="form-control selectpicker" name="row[new]">
{foreach name="newList" item="vo"}
<option value="{$key}" {in name="key" value="$row.new"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Selfhot')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-selfhot" class="form-control selectpicker" name="row[selfhot]">
{foreach name="selfhotList" item="vo"}
<option value="{$key}" {in name="key" value="$row.selfhot"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Sale')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sale" class="form-control" name="row[sale]" type="number" value="{$row.sale|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Stock')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-stock" class="form-control" name="row[stock]" type="number" value="{$row.stock|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Views')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-views" class="form-control" name="row[views]" type="number" value="{$row.views|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Expirestatus')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="expirestatusList" item="vo"}
<label for="row[expirestatus]-{$key}"><input id="row[expirestatus]-{$key}" name="row[expirestatus]" type="radio" value="{$key}" {in name="key" value="$row.expirestatus"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Add_type')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-add_type" data-rule="required" class="form-control selectpicker" name="row[add_type]">
{foreach name="addTypeList" item="vo"}
<option value="{$key}" {in name="key" value="$row.add_type"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Add_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-add_id" data-rule="required" data-source="add/index" class="form-control selectpage" name="row[add_id]" type="text" value="{$row.add_id|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>

Some files were not shown because too many files have changed in this diff Show More