多样青春夜校

1,课时预约订单更新课时信息(员工端接口)
2,课时预约订单核销完成(员工端接口)
3,课程上新(总后台)
4,课程上新(机构后台)
This commit is contained in:
15090180611 2024-11-13 19:04:06 +08:00
parent eacbc0816b
commit 771460f16d
42 changed files with 2481 additions and 2298 deletions

View File

@ -0,0 +1,37 @@
<?php
namespace app\admin\controller\school;
use app\common\controller\Backend;
/**
* 距离搜索展示区域
*
* @icon fa fa-circle-o
*/
class SearchCity extends Backend
{
/**
* SearchCity模型对象
* @var \app\admin\model\school\SearchCity
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\school\SearchCity;
}
/**
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
*/
}

View File

@ -23,6 +23,7 @@ class Cate extends Backend
parent::_initialize();
$this->model = new \app\admin\model\school\classes\Cate;
$this->view->assign("statusList", $this->model->getStatusList());
$this->view->assign("hotList", $this->model->getHotList());
}

View File

@ -2,7 +2,17 @@
namespace app\admin\controller\school\classes;
use app\admin\model\dyqc\ManystoreShop;
use app\common\controller\Backend;
use app\common\model\school\classes\Order;
use app\manystore\model\Manystore;
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;
/**
* 机构课程库
@ -18,6 +28,15 @@ class ClassesLib extends Backend
*/
protected $model = null;
//不用审核允许修改的字段
protected $no_auth_fields = ['headimage','images','notice','content',"virtual_num","virtual_collect","underline_price"];
//更新数据是否需要触发审核开关
protected $need_auth = false;
protected $have_auth = false;
protected $success_auth = false;
public function _initialize()
{
parent::_initialize();
@ -79,4 +98,288 @@ class ClassesLib extends Backend
return $this->view->fetch();
}
protected function authClasses(&$params,$row=null){
//审核失败需填写原因
if($params["auth_status"] == '2' && empty($params["reason"])){
$this->error("审核失败需填写原因");
}
if($params["auth_status"] == '2'){
//审核不通过会平台下架
$params["status"] = '3';
}
//更新
if($row){
if($params["auth_status"] != '1' && $row["auth_status"] == '1'){
$this->error("审核已通过的课程不允许再修改审核状态!");
}
if($params["auth_status"] != '0' && $row["auth_status"] == '0'){
//填写审核时间和审核人
$params["auth_time"] = time();
$params["admin_id"] = $this->auth->id;
if($params["auth_status"] == '1'){
//审核通过
$this->success_auth = true;
}
}
//审核通过
if($this->success_auth){
//如果是平台下架,则更新成正常下架
if($params["status"] == '3') $params["status"] = '2';
}
}else{
//新增
}
}
protected function no_auth_fields_check($params,$row){
foreach ($params as $k=>$v){
//说明数值有变动
//$params[$k] 去掉两端空格
$params[$k] = trim($v);
if($row[$k]!=$params[$k]){
//当修改参数不在允许修改的字段中
if(!in_array($k,$this->no_auth_fields)){
$this->have_auth = true;break;
}
}
}
return $this->have_auth;
}
protected function updateCheck($id,$params=[],$row=null){
if($params && $row){
if(!$this->no_auth_fields_check($params,$row)){
return true;
}
}
// 课程存在未完成订单则不允许操作
$order = Order::where("classes_lib_id",$id)->where("status","in","0,3")->find();
if($order)$this->error("存在正在使用中的课程订单或存在正在售后中的课程订单无法继续操作!");
// 课程存在售后订单则不允许操作
}
protected function update_check(&$params,$row=null)
{
$shop_id = $row["shop_id"];
$manystore = Manystore::where("shop_id",$shop_id)->find();
if(!$manystore){
$this->error("店铺不存在");
}
$params["manystore_id"] = $manystore["id"];
//验证老师id
$teacher_id = $row['teacher_id'];
$teacher = \app\admin\model\school\classes\Teacher::where("id",$teacher_id)->find();
if(!$teacher){
$this->error("老师不存在");
}
if(!$teacher["user_id"]){
$this->error("当前老师没有前端用户!请换一个!");
}
//老师与当前机构id不一致
if($teacher["manystore_id"] != $manystore["id"]){
$this->error("当前老师与当前机构不匹配,请换一个老师!");
}
$params["user_id"] = $teacher["user_id"];
//独立地点需传定位信息
if($params["address_type"] == "2"){
if(empty($params["address_city"])
|| empty($params["province"])
|| empty($params["city"])
|| empty($params["district"])
|| empty($params["longitude"])
|| empty($params["latitude"])) $this->error("独立地点需传定位信息");
}
//特有认证判断
$this->authClasses($params,$row);
// var_dump($row);die;
//更新
if($row){
$this->have_auth = false;
if($this->need_auth){
//判断更新的变动数据
$this->no_auth_fields_check($params,$row);
if($this->have_auth){
$params['status'] = "3";
$params['auth_status'] = "0";
}
}
$this->updateCheck($row->id,$params,$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);
$result = $this->model->allowField(true)->save($params);
Db::commit();
} catch (ValidateException|PDOException|Exception $e) {
Db::rollback();
$this->error($e->getMessage());
}
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()) {
$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);
$result = $row->allowField(true)->save($params);
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) {
$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

@ -3,6 +3,8 @@
namespace app\admin\controller\school\classes;
use app\common\controller\Backend;
use fast\Tree;
use think\Model;
/**
* 机构老师
@ -18,6 +20,10 @@ class Teacher extends Backend
*/
protected $model = null;
protected $selectpageFields = 'id,name,head_image,manystore_id,shop_id,user_id';
protected $searchFields = 'id,name,user_id';
public function _initialize()
{
parent::_initialize();
@ -70,4 +76,146 @@ class Teacher extends Backend
return $this->view->fetch();
}
/**
* Selectpage的实现方法
*
* 当前方法只是一个比较通用的搜索匹配,请按需重载此方法来编写自己的搜索逻辑,$where按自己的需求写即可
* 这里示例了所有的参数,所以比较复杂,实现上自己实现只需简单的几行即可
*
*/
protected function selectpage()
{
//设置过滤方法
$this->request->filter(['trim', 'strip_tags', 'htmlspecialchars']);
//搜索关键词,客户端输入以空格分开,这里接收为数组
$word = (array)$this->request->request("q_word/a");
//当前页
$page = $this->request->request("pageNumber");
//分页大小
$pagesize = $this->request->request("pageSize");
//搜索条件
$andor = $this->request->request("andOr", "and", "strtoupper");
//排序方式
$orderby = (array)$this->request->request("orderBy/a");
//显示的字段
$field = $this->request->request("showField");
//主键
$primarykey = $this->request->request("keyField");
//主键值
$primaryvalue = $this->request->request("keyValue");
//搜索字段
$searchfield = (array)$this->request->request("searchField/a");
//自定义搜索条件
$custom = (array)$this->request->request("custom/a");
//是否返回树形结构
$istree = $this->request->request("isTree", 0);
$ishtml = $this->request->request("isHtml", 0);
if ($istree) {
$word = [];
$pagesize = 999999;
}
$order = [];
foreach ($orderby as $k => $v) {
$order[$v[0]] = $v[1];
}
$field = $field ? $field : 'name';
//如果有primaryvalue,说明当前是初始化传值
if ($primaryvalue !== null) {
$where = [$primarykey => ['in', $primaryvalue]];
$pagesize = 999999;
} else {
$where = function ($query) use ($word, $andor, $field, $searchfield, $custom) {
$logic = $andor == 'AND' ? '&' : '|';
$searchfield = is_array($searchfield) ? implode($logic, $searchfield) : $searchfield;
$searchfield = str_replace(',', $logic, $searchfield);
$word = array_filter(array_unique($word));
if (count($word) == 1) {
$query->where($searchfield, "like", "%" . reset($word) . "%");
} else {
$query->where(function ($query) use ($word, $searchfield) {
foreach ($word as $index => $item) {
$query->whereOr(function ($query) use ($item, $searchfield) {
$query->where($searchfield, "like", "%{$item}%");
});
}
});
}
if ($custom && is_array($custom)) {
foreach ($custom as $k => $v) {
if (is_array($v) && 2 == count($v)) {
$query->where($k, trim($v[0]), $v[1]);
} else {
$query->where($k, '=', $v);
}
}
}
};
}
$adminIds = $this->getDataLimitAdminIds();
if (is_array($adminIds)) {
$this->model->where($this->dataLimitField, 'in', $adminIds);
}
$list = [];
$total = $this->model->where($where)->count();
if ($total > 0) {
if (is_array($adminIds)) {
$this->model->where($this->dataLimitField, 'in', $adminIds);
}
$fields = is_array($this->selectpageFields) ? $this->selectpageFields : ($this->selectpageFields && $this->selectpageFields != '*' ? explode(',', $this->selectpageFields) : []);
//如果有primaryvalue,说明当前是初始化传值,按照选择顺序排序
if ($primaryvalue !== null && preg_match("/^[a-z0-9_\-]+$/i", $primarykey)) {
$primaryvalue = array_unique(is_array($primaryvalue) ? $primaryvalue : explode(',', $primaryvalue));
//修复自定义data-primary-key为字符串内容时给排序字段添加上引号
$primaryvalue = array_map(function ($value) {
return '\'' . $value . '\'';
}, $primaryvalue);
$primaryvalue = implode(',', $primaryvalue);
$this->model->orderRaw("FIELD(`{$primarykey}`, {$primaryvalue})");
} else {
$this->model->order($order);
}
$datalist = $this->model->where($where)
->page($page, $pagesize)
->select();
foreach ($datalist as $index => $item) {
unset($item['password'], $item['salt']);
if ($this->selectpageFields == '*') {
$result = [
$primarykey => $item[$primarykey] ?? '',
$field => $item[$field] ?? '',
];
} else {
$result = array_intersect_key(($item instanceof Model ? $item->toArray() : (array)$item), array_flip($fields));
}
$result['pid'] = isset($item['pid']) ? $item['pid'] : (isset($item['parent_id']) ? $item['parent_id'] : 0);
$list[] = $result;
}
if ($istree && !$primaryvalue) {
$tree = Tree::instance();
$tree->init(collection($list)->toArray(), 'pid');
$list = $tree->getTreeList($tree->getTreeArray(0), $field);
if (!$ishtml) {
foreach ($list as &$item) {
$item = str_replace('&nbsp;', ' ', $item);
}
unset($item);
}
}
}
//这里一定要返回有list这个字段,total是可选的,如果total<=list的数量,则会隐藏分页按钮
return json(['list' => $list, 'total' => $total]);
}
}

View File

@ -2,6 +2,9 @@
return [
'Name' => '分类名',
'Hot' => '平台热门',
'Hot 0' => '否',
'Hot 1' => '是',
'Status' => '状态',
'Status 1' => '上架',
'Set status to 1'=> '设为上架',

View File

@ -0,0 +1,9 @@
<?php
return [
'Address_city' => '城市选择',
'Province' => '省编号',
'City' => '市编号',
'District' => '县区编号',
'Deletetime' => '删除时间'
];

View File

@ -0,0 +1,40 @@
<?php
namespace app\admin\model\school;
use think\Model;
use traits\model\SoftDelete;
class SearchCity extends Model
{
use SoftDelete;
// 表名
protected $name = 'school_search_city';
// 自动写入时间戳字段
protected $autoWriteTimestamp = false;
// 定义时间戳字段名
protected $createTime = false;
protected $updateTime = false;
protected $deleteTime = 'deletetime';
// 追加属性
protected $append = [
];
}

View File

@ -25,10 +25,12 @@ class Cate extends Model
// 追加属性
protected $append = [
'status_text'
'status_text',
'hot_text',
];
protected static function init()
{
self::afterInsert(function ($row) {
@ -54,6 +56,18 @@ class Cate extends Model
}
public function getHotList()
{
return ['0' => __('Hot 0'), '1' => __('Hot 1')];
}
public function getHotTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['hot']) ? $data['hot'] : '');
$list = $this->getHotList();
return isset($list[$value]) ? $list[$value] : '';
}
}

View File

@ -34,9 +34,31 @@ class ClassesLib extends Model
'recommend_text',
'hot_text',
'new_text',
'selfhot_text'
'selfhot_text',
'classes_cate_title',
'classes_label_title',
];
public function getClassesCateTitleAttr($value, $data)
{
$classes_cate_ids = (isset($data['classes_cate_ids']) ? $data['classes_cate_ids'] : '');
if(!$classes_cate_ids) return '';
//$classes_cate_ids 查询分类表 names 已逗号拼接返回
$classes_cate_title = Cate::where('id','in',$classes_cate_ids)->column('name');
return implode(',',$classes_cate_title);
}
public function getClassesLabelTitleAttr($value, $data)
{
$classes_cate_ids = (isset($data['classes_label_ids']) ? $data['classes_label_ids'] : '');
if(!$classes_cate_ids) return '';
//$classes_cate_ids 查询分类表 names 已逗号拼接返回
$classes_cate_title = Label::where('id','in',$classes_cate_ids)->column('name');
return implode(',',$classes_cate_title);
}
protected static function init()
{

View File

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

View File

@ -6,6 +6,20 @@
<input id="c-name" class="form-control" name="row[name]" type="text">
</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">{:__('Status')}:</label>
<div class="col-xs-12 col-sm-8">

View File

@ -6,6 +6,21 @@
<input id="c-name" 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">{:__('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">{:__('Status')}:</label>
<div class="col-xs-12 col-sm-8">

View File

@ -1,23 +1,23 @@
<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" data-field="id" 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">{:__('Manystore_id')}:</label>-->
<!-- <div class="col-xs-12 col-sm-8">-->
<!-- <input id="c-manystore_id" data-rule="required" data-source="manystore/index" data-field="id" 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="dyqc/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">{:__('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">{:__('讲师id')}:</label>
<div class="col-xs-12 col-sm-8">
@ -43,18 +43,18 @@
<input id="c-self_label_tag" class="form-control" data-role="tagsinput" name="row[self_label_tag]" type="text">
</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">
<!-- <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" 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>-->
<select id="c-add_type" 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>-->
<!-- </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">-->
@ -64,14 +64,14 @@
<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" class="form-control" name="row[title]" type="text">
<input id="c-title" class="form-control" data-rule="required" 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" class="form-control" size="50" name="row[headimage]" type="text">
<input id="c-headimage" class="form-control" data-rule="required" 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>
@ -85,7 +85,7 @@
<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" class="form-control" size="50" name="row[images]" type="text">
<input id="c-images" class="form-control" data-rule="required" 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>
@ -110,69 +110,67 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Classes_num')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-classes_num" class="form-control" name="row[classes_num]" type="number">
<input id="c-classes_num" class="form-control" data-rule="required" name="row[classes_num]" type="number">
</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" class="form-control selectpicker" name="row[address_type]">
<div class="radio">
{foreach name="addressTypeList" item="vo"}
<option value="{$key}" {in name="key" value="1"}selected{/in}>{$vo}</option>
<label for="row[address_type]-{$key}"><input data-rule="required" id="row[address_type]-{$key}" name="row[address_type]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label>
{/foreach}
</select>
<span style="color: red">( 如果选独立位置需填写具体位置信息! )</span>
</div>
</div>
</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" data-toggle="city-picker" name="row[address_city]" type="text"></div>
<div class='control-relative'>
<input id="c-address_city" class="form-control form-control" data-toggle="city-picker" name="row[address_city]" value="" type="text">
</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">
<input type="hidden" id="province" name="row[province]" value="" >
<input type="hidden" id="city" name="row[city]" value="" >
<input type="hidden" id="district" name="row[district]" value="" >
</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 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="">
<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-8">
<input id="c-longitude" class="form-control" name="row[longitude]" type="text" value="">
<div class="col-xs-12 col-sm-3">
<input id="c-longitude" readonly 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 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">{:__('Classes_date_text')}:</label>
<div class="col-xs-12 col-sm-8">
@ -194,7 +192,7 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Notice')}:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-notice" class="form-control " rows="5" name="row[notice]" cols="50"></textarea>
<textarea id="c-notice" class="form-control editor" rows="5" name="row[notice]" cols="50"></textarea>
</div>
</div>
<div class="form-group">
@ -216,12 +214,12 @@
<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">
</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">-->
<!-- </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">
@ -270,12 +268,12 @@
<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_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">{:__('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">{:__('Weigh')}:</label>
<div class="col-xs-12 col-sm-8">

View File

@ -1,23 +1,23 @@
<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" data-field="id" 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">{:__('Manystore_id')}:</label>-->
<!-- <div class="col-xs-12 col-sm-8">-->
<!-- <input id="c-manystore_id" data-rule="required" data-source="manystore/index" data-field="id" 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="dyqc/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">{:__('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">{:__('讲师id')}:</label>
@ -44,18 +44,18 @@
<input id="c-self_label_tag" class="form-control" data-role="tagsinput" name="row[self_label_tag]" type="text" value="{$row.self_label_tag|htmlentities}">
</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">
<!-- <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" 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>-->
<select id="c-add_type" 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>-->
<!-- </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">-->
@ -65,14 +65,14 @@
<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" class="form-control" name="row[title]" type="text" value="{$row.title|htmlentities}">
<input id="c-title" class="form-control" data-rule="required" 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" class="form-control" size="50" name="row[headimage]" type="text" value="{$row.headimage|htmlentities}">
<input id="c-headimage" class="form-control" data-rule="required" 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>
@ -86,7 +86,7 @@
<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" class="form-control" size="50" name="row[images]" type="text" value="{$row.images|htmlentities}">
<input id="c-images" class="form-control" data-rule="required" 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>
@ -111,69 +111,70 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Classes_num')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-classes_num" class="form-control" name="row[classes_num]" type="number" value="{$row.classes_num|htmlentities}">
<input id="c-classes_num" class="form-control" data-rule="required" name="row[classes_num]" type="number" value="{$row.classes_num|htmlentities}">
</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" class="form-control selectpicker" name="row[address_type]">
<div class="radio">
{foreach name="addressTypeList" item="vo"}
<option value="{$key}" {in name="key" value="$row.address_type"}selected{/in}>{$vo}</option>
<label for="row[address_type]-{$key}"><input data-rule="required" 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}
</select>
<span style="color: red">( 如果选独立位置需填写具体位置信息! )</span>
</div>
</div>
</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" data-toggle="city-picker" name="row[address_city]" type="text" value="{$row.address_city|htmlentities}"></div>
<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>
</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}">
<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">
<input id="c-address" class="form-control" name="row[address]" type="text" value="{$row.address|htmlentities}">
<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|htmlentities}">
<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-8">
<input id="c-longitude" class="form-control" name="row[longitude]" type="text" value="{$row.longitude|htmlentities}">
<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>
</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 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">{:__('Classes_date_text')}:</label>
<div class="col-xs-12 col-sm-8">
@ -195,7 +196,7 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Notice')}:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-notice" class="form-control " rows="5" name="row[notice]" cols="50">{$row.notice|htmlentities}</textarea>
<textarea id="c-notice" class="form-control editor" rows="5" name="row[notice]" cols="50">{$row.notice|htmlentities}</textarea>
</div>
</div>
<div class="form-group">
@ -204,12 +205,12 @@
<input id="c-virtual_num" class="form-control" name="row[virtual_num]" type="number" value="{$row.virtual_num|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">{:__('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">{:__('Price')}:</label>
<div class="col-xs-12 col-sm-8">
@ -268,12 +269,12 @@
<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_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">{:__('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">{:__('Weigh')}:</label>
<div class="col-xs-12 col-sm-8">

View File

@ -0,0 +1,20 @@
<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">{:__('Address_city')}:</label>
<div class="col-xs-12 col-sm-8">
<div class='control-relative'>
<input id="c-address_city" data-rule="required" class="form-control form-control" data-toggle="city-picker" name="row[address_city]" value="" type="text">
</div>
<input type="hidden" id="province" name="row[province]" value="" >
<input type="hidden" id="city" name="row[city]" value="" >
<input type="hidden" id="district" name="row[district]" 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,20 @@
<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">{:__('Address_city')}:</label>
<div class="col-xs-12 col-sm-8">
<div class='control-relative'>
<input id="c-address_city" data-rule="required" 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 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,29 @@
<div class="panel panel-default panel-intro">
{:build_heading()}
<div class="panel-body">
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade active in" id="one">
<div class="widget-body no-padding">
<div id="toolbar" class="toolbar">
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('school/search_city/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/search_city/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/search_city/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
<a class="btn btn-success btn-recyclebin btn-dialog {:$auth->check('school/search_city/recyclebin')?'':'hide'}" href="school/search_city/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/search_city/edit')}"
data-operate-del="{:$auth->check('school/search_city/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/search_city/restore')?'':'hide'}" href="javascript:;" data-url="school/search_city/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/search_city/destroy')?'':'hide'}" href="javascript:;" data-url="school/search_city/destroy" data-action="destroy"><i class="fa fa-times"></i> {:__('Destroy')}</a>
<a class="btn btn-success btn-restoreall {:$auth->check('school/search_city/restore')?'':'hide'}" href="javascript:;" data-url="school/search_city/restore" title="{:__('Restore all')}"><i class="fa fa-rotate-left"></i> {:__('Restore all')}</a>
<a class="btn btn-danger btn-destroyall {:$auth->check('school/search_city/destroy')?'':'hide'}" href="javascript:;" data-url="school/search_city/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/search_city/restore')}"
data-operate-destroy="{:$auth->check('school/search_city/destroy')}"
width="100%">
</table>
</div>
</div>
</div>
</div>
</div>

View File

@ -120,6 +120,30 @@ class Order extends Base
}
/**
* @ApiTitle( 预约课时单取消接口)
* @ApiSummary(预约课时单取消接口(已完成的单无法取消))
* @ApiRoute(/api/school/order/cancel)
* @ApiMethod(POST)
* @ApiParams(name = "order_no", type = "string",required=true,description = "订单号")
* @ApiReturn({
*
*})
*/
public function cancel(){
$user_id = 0;
$user = $this->auth->getUser();//登录用户
if($user)$user_id = $user['id'];
$order_no = $this->request->post('order_no/s', ''); //订单号
try{
//当前申请状态
$res = $this->model->cancel($order_no,$user_id,true,'user',0,true);
}catch (\Throwable $e){
$this->error($e->getMessage());
}
$this->success('预约课时取消成功', $res);
}

View File

@ -107,7 +107,7 @@ class HourOrder extends Base
/**
* @ApiTitle( 预约课时单取消接口)
* @ApiTitle( 员工代操作:预约课时单取消接口)
* @ApiSummary(预约课时单取消接口(已完成的单无法取消))
* @ApiRoute(/api/school/worker/hour_order/cancel)
* @ApiMethod(POST)
@ -135,6 +135,95 @@ class HourOrder extends Base
/**
* @ApiTitle( 员工代操作:预约课时单审核接口)
* @ApiSummary(预约课时单审核接口)
* @ApiRoute(/api/school/worker/hour_order/examine)
* @ApiMethod(POST)
* @ApiParams(name = "order_no", type = "string",required=true,description = "订单号")
* @ApiParams(name = "auth_status", type = "int",required=true,description = "审核状态:1=审核通过,2=审核失败")
* @ApiParams(name = "reason", type = "string",required=false,description = "审核失败理由")
* @ApiReturn({
*
*})
*/
public function examine(){
$user_id = 0;
$user = $this->auth->getUser();//登录用户
if($user)$user_id = $user['id'];
$order_no = $this->request->post('order_no/s', ''); //订单号
$auth_status = $this->request->post('auth_status/d', ''); //审核状态
$reason = $this->request->post('reason/s', ''); //审核失败理由
try{
//当前申请状态
$res = $this->model->examine($order_no,$auth_status,$reason,0,true,'user',$user_id,true);
}catch (\Throwable $e){
$this->error($e->getMessage());
}
$this->success('预约课时取消成功', $res);
}
/**
* @ApiTitle( 员工代操作:预约课时单核销完成接口)
* @ApiSummary(预约课时单核销完成接口)
* @ApiRoute(/api/school/worker/hour_order/verification)
* @ApiMethod(POST)
* @ApiParams(name = "order_no", type = "string",required=true,description = "订单号")
* @ApiReturn({
*
*})
*/
public function verification(){
$user_id = 0;
$user = $this->auth->getUser();//登录用户
if($user)$user_id = $user['id'];
$order_no = $this->request->post('order_no/s', ''); //订单号
try{
//当前申请状态
$res = $this->model->verification($order_no,0,true,'user',$user_id,true);
}catch (\Throwable $e){
$this->error($e->getMessage());
}
$this->success('预约课时核销成功', $res);
}
/**
* @ApiTitle( 员工代操作:预约课修改课时接口)
* @ApiSummary(预约课修改课时接口)
* @ApiRoute(/api/school/worker/hour_order/update_spec)
* @ApiMethod(POST)
* @ApiParams(name = "order_no", type = "string",required=true,description = "订单号")
* @ApiParams(name = "classes_lib_spec_id", type = "int",required=true,description = "要更换的课时id")
* @ApiReturn({
*
*})
*/
public function update_spec(){
$user_id = 0;
$user = $this->auth->getUser();//登录用户
if($user)$user_id = $user['id'];
$order_no = $this->request->post('order_no/s', ''); //订单号
$classes_lib_spec_id = $this->request->post('classes_lib_spec_id/d', 0); //审核状态
try{
//当前申请状态
$res = $this->model->updateClassesSpec($order_no,$classes_lib_spec_id,0,true,'user',$user_id,true);
}catch (\Throwable $e){
$this->error($e->getMessage());
}
$this->success('预约课时取消成功', $res);
}
/**

View File

@ -33,7 +33,7 @@ class Order extends Base
/**
* @ApiTitle( 订单详情)
* @ApiSummary(订单详情)
* @ApiRoute(/api/school/order/detail)
* @ApiRoute(/api/school/worker/order/detail)
* @ApiMethod(GET)
* @ApiParams(name = "id", type = "int",required=true,description = "订单id或订单号")
* @ApiReturn({
@ -62,7 +62,7 @@ class Order extends Base
/**
* @ApiTitle( 我的订单列表接口)
* @ApiSummary(我的订单列表接口)
* @ApiRoute(/api/school/order/order_list)
* @ApiRoute(/api/school/worker/order/order_list)
* @ApiMethod(GET)
* @ApiParams(name = "keywords", type = "string",required=false,description = "搜索关键字")
* @ApiParams(name = "page", type = "string",required=true,description = "页数")
@ -98,11 +98,36 @@ class Order extends Base
$this->success('查询成功', $res);
}
/**
* @ApiTitle( 员工代操作:课程订单未支付取消接口)
* @ApiSummary(课程订单未支付取消接口(已支付单无法取消,要走售后))
* @ApiRoute(/api/school/worker/order/cancel)
* @ApiMethod(POST)
* @ApiParams(name = "order_no", type = "string",required=true,description = "订单号")
* @ApiReturn({
*
*})
*/
public function cancel(){
$user_id = 0;
$user = $this->auth->getUser();//登录用户
if($user)$user_id = $user['id'];
$order_no = $this->request->post('order_no/s', ''); //订单号
try{
//当前申请状态
$res = $this->model->cancel($order_no,0,true,'user',$user_id,true);
}catch (\Throwable $e){
$this->error($e->getMessage());
}
$this->success('预约课时取消成功', $res);
}
/**
* @ApiTitle( 我的订单数量接口)
* @ApiSummary(返回订单各个数量)
* @ApiRoute(/api/school/order/order_count)
* @ApiRoute(/api/school/worker/order/order_count)
* @ApiMethod(GET)
* @ApiParams(name = "classes_lib_id", type = "int",required=false,description = "课程id")
* @ApiReturn({

View File

@ -0,0 +1,21 @@
<?php
namespace app\common\model\school;
use think\Model;
/**
* 区域数据
*/
class Area extends Model
{
// 表名,不含前缀
protected $name = 'school_area';
// 追加属性
protected $append = [
];
}

View File

@ -801,6 +801,8 @@ class Order extends BaseModel
* @throws \think\exception\DbException
*/
public static function checkLibSpec($user_id,$classes_lib_id,$classes_lib_spec_id){
if(!$classes_lib_spec_id || !$classes_lib_id)throw new \Exception("缺少必要信息!");
$classes_lib_spec_info = ClassesSpec::where('id',$classes_lib_spec_id)
->where('classes_lib_id',$classes_lib_id)
->find();
@ -985,6 +987,103 @@ class Order extends BaseModel
//执行课时数更新
// $res1 = \app\common\model\school\classes\order\Order::statisticsAndUpdateClassesNumber($order['classes_order_id']);
if($trans){
self::commitTrans();
}
}catch (\Exception $e){
if($trans){
self::rollbackTrans();
}
throw new \Exception($e->getMessage());
}
return $order;
}
/**更新订单核销状态
* @param $order
* @return array|false|\PDOStatement|string|Model
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public static function updateVerification($order,$oper_id = 0,$oper_type='user'){
if(is_string($order))$order = self::getHaveVerificationOrder($order);
$order->status = "3";//refund_status
$order->verification_user_id = $oper_id;
$order->verification_type = $oper_type;
$order->finish_time = time();
$order->save();
return $order;
}
/**得到可核销订单
* @param $order_no
* @return array|false|\PDOStatement|string|Model
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public static function getHaveVerificationOrder($order_no){
// $where = [self::STATUS_NOPAY,self::STATUS_PAYED];
$order = self::where('order_no|id',$order_no)->where("status","in",['-1',"0"])->find();
if(!$order)throw new \Exception("不是待核销的订单!");
return $order;
}
/**订单核销
* @param $order_no
* @param int $user_id
* @param bool $check
* @param bool $trans
* @return bool
* @throws \Exception
*/
public function verification($order_no,$user_id=0,$check=false,$oper_type='user',$oper_id=0,$trans=false){
//得到可取消订单
$order = self::getHaveVerificationOrder($order_no);
if($check){
//用户操作权限检测
self::checkOptionAuth($order['classes_order_id'],$user_id ?: $oper_id,$oper_type);
}
//判断逻辑
if($trans){
self::beginTrans();
}
$res = true;
try{
//事务逻辑
//更新订单状态
//如果没有审核,先审核成功再核销
if($order["status"] == '-1'){
$order = $this->examine($order_no,'1',"",$user_id,$check,$oper_type,$oper_id);
}
$order = Order::updateVerification($order,$user_id ?: $oper_id,$oper_type);
//插入订单取消日志
if(!$user_id ||$order["user_id"] !=$user_id ){
OrderLog::log($order['id'],"[员工操作]课时预约单核销成功,当前课时已完成",$oper_type ?: 'user', $oper_id ?: $order['user_id']);
}else{
OrderLog::log($order['id'],"课时预约单核销成功,当前课时已完成",$oper_type ?: 'user', $oper_id ?: $order['user_id']);
}
//调用订单取消事件
$data = ['order' => $order];
\think\Hook::listen('classeshour_order_finish_after', $data);
//执行课时数更新
$res1 = \app\common\model\school\classes\order\Order::statisticsAndUpdateClassesNumber($order['classes_order_id']);
if($trans){
self::commitTrans();
}
@ -1001,4 +1100,62 @@ class Order extends BaseModel
/**订单修改课时
* @param $order_no
* @param int $user_id
* @param bool $check
* @param bool $trans
* @return bool
* @throws \Exception
*/
public function updateClassesSpec($order_no,$classes_lib_spec_id,$user_id=0,$check=false,$oper_type='user',$oper_id=0,$trans=false){
//得到可取消订单
$order = self::getHaveUpdateOrder($order_no);
if($check){
//用户操作权限检测
self::checkOptionAuth($order['classes_order_id'],$user_id ?: $oper_id,$oper_type);
}
self::checkLibSpec($order['user_id'],$order["classes_lib_id"],$classes_lib_spec_id);
//判断逻辑
if($trans){
self::beginTrans();
}
$res = true;
try{
//事务逻辑
//更新订单状态
//课时规格更新
$order = self::buildLibSpec($order_no,$classes_lib_spec_id);
//插入订单取消日志
if(!$user_id ||$order["user_id"] !=$user_id ){
OrderLog::log($order['id'],"[员工操作]预约课时订单规格已变更",$oper_type ?: 'user', $oper_id ?: $order['user_id']);
}else{
OrderLog::log($order['id'],"预约课时订单规格已变更",$oper_type ?: 'user', $oper_id ?: $order['user_id']);
}
//调用订单事件
$data = ['order' => $order];
\think\Hook::listen('classeshour_order_update_after', $data);
//执行课时数更新
$res1 = \app\common\model\school\classes\order\Order::statisticsAndUpdateClassesNumber($order['classes_order_id']);
if($trans){
self::commitTrans();
}
}catch (\Exception $e){
if($trans){
self::rollbackTrans();
}
throw new \Exception($e->getMessage());
}
return $order;
}
}

View File

@ -3,6 +3,7 @@
namespace app\common\model\school\classes\order;
use app\admin\model\Admin;
use app\common\model\BaseModel;
use app\common\model\dyqc\ManystoreShop;
use app\common\model\school\classes\ClassesLib;
@ -886,6 +887,7 @@ class Order extends BaseModel
$order->total_refundprice = bcsub($order->totalprice,$detail->used_price,2);
$order->save();
//课程下单时已核销人数更新
$lib = $order->lib;
if($lib){
@ -895,23 +897,159 @@ class Order extends BaseModel
$specs = $lib->specs;
if($specs){
foreach ($specs as $spec){
// '已核销人数',
$spec->verification_num = \app\common\model\school\classes\hourorder\Order::where("classes_lib_spec_id",$spec["id"])->where("status","=","3")->count();
//已报名人数
$spec->sign_num = \app\common\model\school\classes\hourorder\Order::where("classes_lib_spec_id",$spec["id"])->where("status","in",["-1","0"])->count();
$spec->save();
}
}
}
//检测订单完成状态
self::statisticsAndUpdateOrderFinish($order->id);
return $order;
}
/** 检测订单完成状态
* @param $order
* @return void
* @throws \think\Exception
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public static function statisticsAndUpdateOrderFinish($order){
if(is_string($order)||is_numeric($order))$order = self::getOrder($order);
$detail = $order->detail;
if(!$detail)throw new \think\Exception("订单信息缺失!");
//得到当前订单的所有已完成课时订单
$hourorderOrderCount = \app\common\model\school\classes\hourorder\Order::where("status","=",'3')
->where("classes_order_id","=",$order["id"])
->count();
//可完成的订单
if($order["status"] == '3' && (in_array($order["server_status"],['0','6'])) && !$order['finishtime']){
//判定是否达成完成条件
//条件:课程课时已全部完成
if($hourorderOrderCount >= $detail->classes_num){
//执行订单完成的更新逻辑
self::updateFinish($order);
}
}
}
/** 更新订单成已完成
* @param $order
* @return void
*/
public static function updateFinish($order){
if(is_string($order)||is_numeric($order))$order = self::getOrder($order);
//更新订单
$order["status"] = '9';
$order["finishtime"] = time();
$order->save();
//记录订单日志
OrderLog::log($order['id'],"课程订单,课时已全部完成",'user',$order['user_id']);
//调用支付成功事件
$data = ['order' => $order];
\think\Hook::listen('classes_order_finish_after', $data);
}
/**得到可取消订单
* @param $order_no
* @return array|false|\PDOStatement|string|Model
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public static function getHaveCancelOrder($order_no){
// $where = [self::STATUS_NOPAY,self::STATUS_PAYED];
$order = self::where('order_no|id|pay_no|code',$order_no)
->where("status","in",['0'])
->find();
if(!$order)throw new \Exception("只有待支付订单可取消,已支付请走售后申请,已取消请忽略!");
return $order;
}
/**更新订单取消状态
* @param $order
* @return array|false|\PDOStatement|string|Model
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public static function updateCancel($order){
if(is_string($order))$order = self::getHaveCancelOrder($order);
$order->status = "-3";//refund_status
$order->canceltime = time();
$order->save();
return $order;
}
/**订单取消
* @param $order_no
* @param int $user_id
* @param bool $check
* @param bool $trans
* @return bool
* @throws \Exception
*/
public function cancel($order_no,$user_id=0,$check=false,$oper_type='user',$oper_id=0,$trans=false){
//得到可取消订单
$order = self::getHaveCancelOrder($order_no);
if($check){
//用户操作权限检测
\app\common\model\school\classes\hourorder\Order::checkOptionAuth($order['id'],$user_id ?: $oper_id,$oper_type);
}
//判断逻辑
if($trans){
self::beginTrans();
}
$res = true;
try{
//事务逻辑
//更新订单取消状态
$order = Order::updateCancel($order);
//插入订单取消日志
if(!$user_id ||$order["user_id"] !=$user_id ){
OrderLog::log($order['id'],"[系统操作]课程订单未支付取消成功",$oper_type ?: 'user', $oper_id ?: $order['user_id']);
}else{
OrderLog::log($order['id'],"课程订单未支付取消成功",$oper_type ?: 'user', $oper_id ?: $order['user_id']);
}
//调用订单取消事件
$data = ['order' => $order];
\think\Hook::listen('classes_order_cancel_after', $data);
//执行课时数更新
$res1 = self::statisticsAndUpdateClassesNumber($order['id']);
if($trans){
self::commitTrans();
}
}catch (\Exception $e){
if($trans){
self::rollbackTrans();
}
throw new \Exception($e->getMessage());
}
return $res1;
}
}

View File

@ -3,6 +3,17 @@
namespace app\manystore\controller\school\classes;
use app\common\controller\ManystoreBase;
use app\admin\model\dyqc\ManystoreShop;
use app\common\controller\Backend;
use app\common\model\school\classes\Order;
use app\manystore\model\Manystore;
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;
/**
* 机构课程库
@ -18,6 +29,15 @@ class ClassesLib extends ManystoreBase
*/
protected $model = null;
//不用审核允许修改的字段
protected $no_auth_fields = ['headimage','images','notice','content',"virtual_num","virtual_collect","underline_price"];
//更新数据是否需要触发审核开关
protected $need_auth = true;
protected $have_auth = false;
protected $success_auth = false;
public function _initialize()
{
parent::_initialize();
@ -82,4 +102,308 @@ class ClassesLib extends ManystoreBase
return $this->view->fetch();
}
protected function authClasses(&$params,$row=null){
//审核失败需填写原因
if($params["auth_status"] == '2' && empty($params["reason"])){
$this->error("审核失败需填写原因");
}
if($params["auth_status"] == '2'){
//审核不通过会平台下架
$params["status"] = '3';
}
//更新
if($row){
if($params["auth_status"] != '1' && $row["auth_status"] == '1'){
$this->error("审核已通过的课程不允许再修改审核状态!");
}
if($params["auth_status"] != '0' && $row["auth_status"] == '0'){
//填写审核时间和审核人
$params["auth_time"] = time();
$params["admin_id"] = $this->auth->id;
if($params["auth_status"] == '1'){
//审核通过
$this->success_auth = true;
}
}
//审核通过
if($this->success_auth){
//如果是平台下架,则更新成正常下架
if($params["status"] == '3') $params["status"] = '2';
}
}else{
//新增
}
}
protected function no_auth_fields_check($params,$row){
foreach ($params as $k=>$v){
//说明数值有变动
//$params[$k] 去掉两端空格
$params[$k] = trim($v);
if($row[$k]!=$params[$k]){
//特殊:如果是上架状态或下架状态也可以修改
if($k=="status" && ($params[$k]=='1' || $params[$k]=='2')){
continue;
}
//当修改参数不在允许修改的字段中
if(!in_array($k,$this->no_auth_fields)){
$this->have_auth = true;break;
}
}
}
return $this->have_auth;
}
protected function updateCheck($id,$params=[],$row=null){
if($params && $row){
if(!$this->no_auth_fields_check($params,$row)){
return true;
}
}
// 课程存在未完成订单则不允许操作
$order = Order::where("classes_lib_id",$id)->where("status","in","0,3")->find();
if($order)$this->error("存在正在使用中的课程订单或存在正在售后中的课程订单无法继续操作!");
// 课程存在售后订单则不允许操作
}
protected function update_check(&$params,$row=null)
{
$shop_id = $row["shop_id"];
$manystore = Manystore::where("shop_id",$shop_id)->find();
if(!$manystore){
$this->error("店铺不存在");
}
$params["manystore_id"] = $manystore["id"];
//验证老师id
$teacher_id = $row['teacher_id'];
$teacher = \app\admin\model\school\classes\Teacher::where("id",$teacher_id)->find();
if(!$teacher){
$this->error("老师不存在");
}
if(!$teacher["user_id"]){
$this->error("当前老师没有前端用户!请换一个!");
}
//老师与当前机构id不一致
if($teacher["manystore_id"] != $manystore["id"]){
$this->error("当前老师与当前机构不匹配,请换一个老师!");
}
$params["user_id"] = $teacher["user_id"];
//独立地点需传定位信息
if($params["address_type"] == "2"){
if(empty($params["address_city"])
|| empty($params["province"])
|| empty($params["city"])
|| empty($params["district"])
|| empty($params["longitude"])
|| empty($params["latitude"])) $this->error("独立地点需传定位信息");
}
//特有认证判断
// $this->authClasses($params,$row);
// var_dump($row);die;
//更新
if($row){
if($row['status'] == "3" && $params['status'] != $row['status']){
$this->error("平台下架审核的课程无法上架!");
}
$this->have_auth = false;
if($this->need_auth){
//判断更新的变动数据
$this->no_auth_fields_check($params,$row);
if($this->have_auth){
$params['status'] = "3";
$params['auth_status'] = "0";
}
}
$this->updateCheck($row->id,$params,$row);
}else{
//新增
$params["add_type"] = '2';
$params["add_id"] = $this->auth->id;
}
}
/**
* 添加
*
* @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;
}
$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);
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;
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);
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', ''));
}
$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

@ -41,7 +41,7 @@ return [
'Status' => '状态',
'Status 1' => '上架',
'Status 2' => '下架',
'Status 3' => '平台下架',
'Status 3' => '(审核中课程)平台下架',
'Auth_status' => '审核状态',
'Auth_status 0' => '待审核',
'Auth_status 1' => '审核通过',

View File

@ -34,9 +34,28 @@ class ClassesLib extends Model
'recommend_text',
'hot_text',
'new_text',
'selfhot_text'
'selfhot_text',
'classes_cate_title',
'classes_label_title',
];
public function getClassesCateTitleAttr($value, $data)
{
$classes_cate_ids = (isset($data['classes_cate_ids']) ? $data['classes_cate_ids'] : '');
if(!$classes_cate_ids) return '';
//$classes_cate_ids 查询分类表 names 已逗号拼接返回
$classes_cate_title = Cate::where('id','in',$classes_cate_ids)->column('name');
return implode(',',$classes_cate_title);
}
public function getClassesLabelTitleAttr($value, $data)
{
$classes_cate_ids = (isset($data['classes_label_ids']) ? $data['classes_label_ids'] : '');
if(!$classes_cate_ids) return '';
//$classes_cate_ids 查询分类表 names 已逗号拼接返回
$classes_cate_title = Label::where('id','in',$classes_cate_ids)->column('name');
return implode(',',$classes_cate_title);
}
protected static function init()
{

View File

@ -1,66 +1,79 @@
<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" data-field="id" 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="dyqc/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">{:__('Manystore_id')}:</label>
<label class="control-label col-xs-12 col-sm-2">{:__('讲师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">{:__('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="">
<input id="c-teacher_id" data-rule="required" data-source="school/classes/teacher/index" data-field="name" class="form-control selectpage" name="row[teacher_id]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Classes_cate_ids')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-classes_cate_ids" data-rule="required" data-source="classes/cate/index" data-multiple="true" class="form-control selectpage" name="row[classes_cate_ids]" type="text" value="">
<input id="c-classes_cate_ids" data-rule="required" data-source="school/classes/cate/index" data-multiple="true" class="form-control selectpage" name="row[classes_cate_ids]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Classes_label_ids')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-classes_label_ids" data-rule="required" data-source="classes/label/index" data-multiple="true" class="form-control selectpage" name="row[classes_label_ids]" type="text" value="">
<input id="c-classes_label_ids" data-rule="required" data-source="school/classes/label/index" data-multiple="true" class="form-control selectpage" name="row[classes_label_ids]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Self_label_tag')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-self_label_tag" class="form-control" name="row[self_label_tag]" type="text">
<input id="c-self_label_tag" class="form-control" data-role="tagsinput" name="row[self_label_tag]" type="text">
</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">
<!-- <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" 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>-->
<select id="c-add_type" 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>-->
<!-- </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">{:__('Title')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-title" class="form-control" name="row[title]" type="text">
<input id="c-title" class="form-control" data-rule="required" 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" class="form-control" size="50" name="row[headimage]" type="text">
<input id="c-headimage" class="form-control" data-rule="required" 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="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>
@ -72,9 +85,9 @@
<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" class="form-control" size="50" name="row[images]" type="text">
<input id="c-images" class="form-control" data-rule="required" 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="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>
@ -97,69 +110,67 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Classes_num')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-classes_num" class="form-control" name="row[classes_num]" type="number">
<input id="c-classes_num" class="form-control" data-rule="required" name="row[classes_num]" type="number">
</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" class="form-control selectpicker" name="row[address_type]">
<div class="radio">
{foreach name="addressTypeList" item="vo"}
<option value="{$key}" {in name="key" value="1"}selected{/in}>{$vo}</option>
<label for="row[address_type]-{$key}"><input data-rule="required" id="row[address_type]-{$key}" name="row[address_type]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label>
{/foreach}
</select>
<span style="color: red">( 如果选独立位置需填写具体位置信息! )</span>
</div>
</div>
</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" data-toggle="city-picker" name="row[address_city]" type="text"></div>
<div class='control-relative'>
<input id="c-address_city" class="form-control form-control" data-toggle="city-picker" name="row[address_city]" value="" type="text">
</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">
<input type="hidden" id="province" name="row[province]" value="" >
<input type="hidden" id="city" name="row[city]" value="" >
<input type="hidden" id="district" name="row[district]" value="" >
</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 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="">
<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-8">
<input id="c-longitude" class="form-control" name="row[longitude]" type="text" value="">
<div class="col-xs-12 col-sm-3">
<input id="c-longitude" readonly 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 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">{:__('Classes_date_text')}:</label>
<div class="col-xs-12 col-sm-8">
@ -181,7 +192,7 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Notice')}:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-notice" class="form-control " rows="5" name="row[notice]" cols="50"></textarea>
<textarea id="c-notice" class="form-control editor" rows="5" name="row[notice]" cols="50"></textarea>
</div>
</div>
<div class="form-group">
@ -190,12 +201,25 @@
<input id="c-virtual_num" class="form-control" name="row[virtual_num]" type="number">
</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">
</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-virtual_people" class="form-control" name="row[virtual_people]" type="number">-->
<!-- </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">-->
<!-- </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">
@ -220,7 +244,12 @@
<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>
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}"
{in name="key" value="1"}checked{/in}
{in name="key" value="3"} disabled {/in}
/>
{$vo}
</label>
{/foreach}
</div>
@ -238,66 +267,64 @@
</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_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">{:__('Admin_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-admin_id" data-rule="required" data-source="auth/admin/selectpage" class="form-control selectpage" name="row[admin_id]" type="text" value="">
</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">
<!--用php标签判断 如果不通过,展示原因-->
<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 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_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">{:__('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">-->
</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-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>-->
<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">{:__('Hot')}:</label>-->
<!-- <div class="col-xs-12 col-sm-8">-->
</div>
</div>
<!-- <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">

View File

@ -1,66 +1,80 @@
<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" data-field="id" 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">{:__('Manystore_id')}:</label>
<label class="control-label col-xs-12 col-sm-2">{:__('Shop_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}">
<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}">
</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">{:__('User_id')}:</label>
<label class="control-label col-xs-12 col-sm-2">{:__('讲师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}">
<input id="c-teacher_id" data-rule="required" data-source="school/classes/teacher/index" data-field="name" class="form-control selectpage" name="row[teacher_id]" type="text" value="{$row.teacher_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Classes_cate_ids')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-classes_cate_ids" data-rule="required" data-source="classes/cate/index" data-multiple="true" class="form-control selectpage" name="row[classes_cate_ids]" type="text" value="{$row.classes_cate_ids|htmlentities}">
<input id="c-classes_cate_ids" data-rule="required" data-source="school/classes/cate/index" data-multiple="true" class="form-control selectpage" name="row[classes_cate_ids]" type="text" value="{$row.classes_cate_ids|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Classes_label_ids')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-classes_label_ids" data-rule="required" data-source="classes/label/index" data-multiple="true" class="form-control selectpage" name="row[classes_label_ids]" type="text" value="{$row.classes_label_ids|htmlentities}">
<input id="c-classes_label_ids" data-rule="required" data-source="school/classes/label/index" data-multiple="true" class="form-control selectpage" name="row[classes_label_ids]" type="text" value="{$row.classes_label_ids|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Self_label_tag')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-self_label_tag" class="form-control" name="row[self_label_tag]" type="text" value="{$row.self_label_tag|htmlentities}">
<input id="c-self_label_tag" class="form-control" data-role="tagsinput" name="row[self_label_tag]" type="text" value="{$row.self_label_tag|htmlentities}">
</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">
<!-- <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" 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>-->
<select id="c-add_type" 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>-->
<!-- </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">{:__('Title')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-title" class="form-control" name="row[title]" type="text" value="{$row.title|htmlentities}">
<input id="c-title" class="form-control" data-rule="required" 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" class="form-control" size="50" name="row[headimage]" type="text" value="{$row.headimage|htmlentities}">
<input id="c-headimage" class="form-control" data-rule="required" 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="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>
@ -72,9 +86,9 @@
<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" class="form-control" size="50" name="row[images]" type="text" value="{$row.images|htmlentities}">
<input id="c-images" class="form-control" data-rule="required" 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="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>
@ -97,69 +111,70 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Classes_num')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-classes_num" class="form-control" name="row[classes_num]" type="number" value="{$row.classes_num|htmlentities}">
<input id="c-classes_num" class="form-control" data-rule="required" name="row[classes_num]" type="number" value="{$row.classes_num|htmlentities}">
</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" class="form-control selectpicker" name="row[address_type]">
<div class="radio">
{foreach name="addressTypeList" item="vo"}
<option value="{$key}" {in name="key" value="$row.address_type"}selected{/in}>{$vo}</option>
<label for="row[address_type]-{$key}"><input data-rule="required" 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}
</select>
<span style="color: red">( 如果选独立位置需填写具体位置信息! )</span>
</div>
</div>
</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" data-toggle="city-picker" name="row[address_city]" type="text" value="{$row.address_city|htmlentities}"></div>
<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>
</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}">
<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">
<input id="c-address" class="form-control" name="row[address]" type="text" value="{$row.address|htmlentities}">
<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|htmlentities}">
<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-8">
<input id="c-longitude" class="form-control" name="row[longitude]" type="text" value="{$row.longitude|htmlentities}">
<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>
</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 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">{:__('Classes_date_text')}:</label>
<div class="col-xs-12 col-sm-8">
@ -181,7 +196,7 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Notice')}:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-notice" class="form-control " rows="5" name="row[notice]" cols="50">{$row.notice|htmlentities}</textarea>
<textarea id="c-notice" class="form-control editor" rows="5" name="row[notice]" cols="50">{$row.notice|htmlentities}</textarea>
</div>
</div>
<div class="form-group">
@ -190,12 +205,12 @@
<input id="c-virtual_num" class="form-control" name="row[virtual_num]" type="number" value="{$row.virtual_num|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">{:__('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">{:__('Price')}:</label>
<div class="col-xs-12 col-sm-8">
@ -214,13 +229,28 @@
<input id="c-virtual_collect" class="form-control" name="row[virtual_collect]" type="number" value="{$row.virtual_collect|htmlentities}">
</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-virtual_people" class="form-control" name="row[virtual_people]" type="number" value="{$row.virtual_people|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>
<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}
{in name="key" value="3"} disabled {/in}
/>
{$vo}
</label>
{/foreach}
</div>
@ -238,66 +268,60 @@
</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_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">{:__('Admin_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-admin_id" data-rule="required" data-source="auth/admin/selectpage" class="form-control selectpage" name="row[admin_id]" type="text" value="{$row.admin_id|htmlentities}">
</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">
<!-- <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_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">{:__('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>
<!-- <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">
<!-- </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>
<!-- <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">
<!-- </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>
<!-- <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>-->
<!-- </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">
@ -310,6 +334,10 @@
</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">

View File

@ -283,854 +283,4 @@ body {
line-height: 1.5715;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
-moz-osx-font-smoothing: grayscale;
font-feature-settings: 'liga';
-webkit-text-size-adjust: 100%;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Ubuntu, Helvetica Neue, Helvetica, Arial, PingFang SC, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Source Han Sans CN, sans-serif;
font-weight: 400;
color: #616161;
}
a {
color: #007bff;
}
a:hover,
a:focus {
color: #007bff;
}
.navbar-white {
background-color: #fff;
border-color: #fff;
box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
}
.navbar-white .dropdown-menu {
border-radius: 5px;
-webkit-box-shadow: 0px 20px 30px rgba(83, 88, 93, 0.05), 0px 0px 30px rgba(83, 88, 93, 0.1);
-moz-box-shadow: 0px 20px 30px rgba(83, 88, 93, 0.05), 0px 0px 30px rgba(83, 88, 93, 0.1);
box-shadow: 0px 20px 30px rgba(83, 88, 93, 0.05), 0px 0px 30px rgba(83, 88, 93, 0.1);
}
@media (min-width: 768px) {
.navbar-default .navbar-brand {
height: 60px;
line-height: 27px;
}
.navbar-default .navbar-nav > li > a {
height: 60px;
line-height: 27px;
}
.navbar-white .navbar-brand {
height: 60px;
line-height: 27px;
}
.navbar-white .navbar-nav > li > a {
height: 60px;
line-height: 27px;
color: #555;
}
.navbar-white .navbar-nav > li > a:hover,
.navbar-white .navbar-nav > li > a:focus {
color: #007bff;
}
.navbar-white .navbar-nav > .active > a,
.navbar-white .navbar-nav > .active > a:hover,
.navbar-white .navbar-nav > .active > a:focus {
background-color: inherit;
color: #007bff;
}
}
@media (max-width: 768px) {
body {
padding-top: 50px;
}
.navbar-white .navbar-nav .open .dropdown-menu {
background: #eee;
}
.navbar-white .navbar-toggle {
border-color: #ddd;
}
.navbar-white .navbar-toggle .icon-bar {
background-color: #888;
}
.navbar-white .navbar-collapse.in {
border-top-color: #f5f5f5;
}
}
#header-navbar .dropdown:hover .dropdown-menu {
display: block;
margin-top: 0;
}
#header-navbar li.dropdown ul.dropdown-menu {
min-width: 100px;
}
.navbar {
border: none;
}
.navbar-nav > li > a {
font-size: 14px;
}
.dropdown-menu > li > a {
font-size: 14px;
padding: 5px 20px;
}
.dropdown-menu {
border-radius: 2px;
border: 0px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
padding: 5px 0px;
}
.dropdown-menu li a {
padding-top: 10px !important;
padding-bottom: 10px;
}
.dropdown-menu > li > a {
font-weight: 400;
color: #444;
padding: 5px 15px;
padding-bottom: 10px;
}
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
text-decoration: none;
color: #777;
background: rgba(0, 0, 0, 0.05);
}
.toast-top-center {
top: 60px;
}
#toast-container > div {
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
/*修复nice-validator和summernote的编辑框冲突*/
.nice-validator .note-editor .note-editing-area .note-editable {
display: inherit;
}
/*预览区域*/
.plupload-preview,
.faupload-preview {
padding: 0 10px;
margin-bottom: 0;
}
.plupload-preview li,
.faupload-preview li {
margin-top: 10px;
}
.plupload-preview .thumbnail,
.faupload-preview .thumbnail {
margin-bottom: 10px;
}
.plupload-preview a,
.faupload-preview a {
display: block;
}
.plupload-preview a:first-child,
.faupload-preview a:first-child {
height: 90px;
}
.plupload-preview a img,
.faupload-preview a img {
height: 80px;
object-fit: cover;
}
.layui-layer-content {
clear: both;
}
.layui-layer-fast .layui-layer-content > table.table {
margin-bottom: 0;
}
.layui-layer-fast .layui-layer-confirm {
display: none;
position: absolute;
width: 100%;
height: 100%;
left: 0;
bottom: 0;
border: 1px solid transparent;
background: transparent;
color: transparent;
}
.layui-layer-fast .layui-layer-confirm:focus {
border: 1px solid #444c69;
-webkit-border-radius: 2px;
-webkit-background-clip: padding-box;
-moz-border-radius: 2px;
-moz-background-clip: padding;
border-radius: 2px;
background-clip: padding-box;
}
.layui-layer-fast .layui-layer-confirm:focus-visible {
outline: 0;
}
.layui-layer-fast-msg {
min-width: 100px;
border-radius: 2px;
}
.input-group > .msg-box.n-right {
position: absolute;
}
.bootstrap-select {
min-height: 33px;
}
.bootstrap-select .status {
background: #f0f0f0;
clear: both;
color: #999;
font-size: 12px;
font-weight: 500;
line-height: 1;
margin-bottom: -5px;
padding: 10px 20px;
}
.bootstrap-select .msg-box {
position: absolute;
right: 0;
top: 0;
}
.bootstrap-select .bs-placeholder {
min-height: 33px;
}
select.bs-select-hidden,
select.selectpicker {
display: inherit !important;
max-height: 33px;
overflow: hidden;
}
select.bs-select-hidden[multiple],
select.selectpicker[multiple] {
height: 31px;
padding: 0;
background: #f4f4f4;
}
select.bs-select-hidden[multiple] option,
select.selectpicker[multiple] option {
color: #f4f4f4;
zoom: 1;
filter: alpha(opacity=0);
-webkit-opacity: 0;
-moz-opacity: 0;
opacity: 0;
}
@media not all and (min-resolution: 0.001dpcm) {
@supports (-webkit-appearance:none) {
select.bs-select-hidden[multiple],
select.selectpicker[multiple] {
visibility: hidden;
}
}
}
input.selectpage {
color: transparent;
pointer-events: none;
}
.sp_container {
min-height: 33px;
}
.sp_container input.selectpage {
color: inherit;
pointer-events: inherit;
padding-left: 12px;
padding-right: 12px;
}
.sp_container .sp_element_box input.selectpage {
padding-left: 0;
padding-right: 0;
}
.sp_container .sp_element_box li:first-child input.selectpage {
padding-left: 9px;
padding-right: 9px;
}
/*修复radio和checkbox样式对齐*/
.radio > label,
.checkbox > label {
margin-right: 10px;
}
.radio > label > input,
.checkbox > label > input {
margin: 5px 0 0;
}
form.form-horizontal .control-label {
font-weight: normal;
}
.panel-default {
padding: 0 15px;
border: none;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
.panel-default > .panel-heading {
position: relative;
font-size: 16px;
padding: 15px 0;
background: #fff;
border-bottom: 1px solid #f5f5f5;
}
.panel-default h2.page-header {
margin-top: 0;
height: 50px;
line-height: 31px;
font-size: 18px;
padding: 10px 0;
border-bottom: 1px solid #f5f5f5;
}
.panel-default > .panel-heading .panel-title {
color: #313131;
}
.panel-default > .panel-heading .panel-title > i {
display: none;
}
.panel-default > .panel-heading .more {
position: absolute;
top: 13px;
right: 0;
display: block;
color: #919191;
-webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
transition: all 0.3s ease;
}
.panel-default > .panel-heading .more:hover {
color: #616161;
-webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
transition: all 0.3s ease;
}
.panel-default > .panel-heading .panel-bar {
position: absolute;
top: 7px;
right: 0;
display: block;
}
@media (max-width: 767px) {
.panel-default {
padding: 0 10px;
}
.panel-default > .panel-heading {
padding: 10px 0;
}
.panel-default > .panel-heading .more {
top: 8px;
}
> .panel-body {
position: relative;
padding: 15px 0;
}
> .panel-footer {
padding: 15px 0;
background: none;
}
}
.panel-gray {
-webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
-moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}
.panel-gray > .panel-heading {
background-color: #f5f5f5;
color: #919191;
}
.panel-gray > .panel-body {
color: #919191;
background: #fff;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
}
.panel-page {
padding: 45px 50px 50px;
min-height: 500px;
}
.panel-page .panel-heading {
background: transparent;
border-bottom: none;
margin: 0 0 30px 0;
padding: 0;
}
.panel-page .panel-heading h2 {
font-size: 25px;
margin-top: 0;
}
@media (max-width: 767px) {
.panel-page {
padding: 15px;
min-height: 300px;
}
.n-bootstrap .n-right {
margin-top: 0;
top: -20px;
position: absolute;
left: 0;
text-align: right;
width: 100%;
}
.n-bootstrap .n-right .msg-wrap {
position: relative;
}
.n-bootstrap .col-xs-12 > .n-right .msg-wrap {
margin-right: 15px;
}
}
.nav-pills > li {
margin-right: 5px;
}
.nav-pills > li > a {
padding: 10px 15px;
color: #616161;
-webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
transition: all 0.3s ease;
}
.nav-pills > li > a:hover {
-webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
transition: all 0.3s ease;
background-color: #f5f5f5;
}
.nav-pills > li.active > a {
border: none;
color: #fff;
background: #007bff;
-webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
transition: all 0.3s ease;
border-radius: 3px;
}
.nav-pills.nav-pills-sm > li > a {
font-size: 12px;
line-height: 1.5;
padding: 4px 13px;
}
.fieldlist dd {
display: block;
margin: 5px 0;
}
.fieldlist dd input {
display: inline-block;
width: 300px;
}
.fieldlist dd input:first-child {
width: 110px;
}
.fieldlist dd ins {
width: 110px;
display: inline-block;
text-decoration: none;
}
/* 弹窗中的表单 */
.form-layer {
height: 100%;
min-height: 150px;
min-width: 300px;
}
.form-layer .form-body {
width: 100%;
overflow: auto;
top: 0;
position: absolute;
z-index: 10;
bottom: 50px;
padding: 15px;
}
.form-layer .form-footer {
height: 50px;
line-height: 50px;
background-color: #ecf0f1;
width: 100%;
position: absolute;
z-index: 200;
bottom: 0;
margin: 0;
}
.form-layer .form-footer .form-group {
margin-left: 0;
margin-right: 0;
}
footer.footer {
width: 100%;
color: #aaa;
background: #555;
margin-top: 25px;
}
footer.footer .copyright {
line-height: 50px;
text-align: center;
background: #393939;
margin: 0;
}
footer.footer .copyright a {
color: #aaa;
}
footer.footer .copyright a:hover {
color: #fff;
}
.rotate {
-webkit-transition-duration: 0.8s;
-moz-transition-duration: 0.8s;
-o-transition-duration: 0.8s;
transition-duration: 0.8s;
-webkit-transition-property: transform;
transition-property: transform;
-webkit-transition-property: -webkit-transform;
-moz-transition-property: -moz-transform;
-o-transition-property: -o-transform;
transition-property: -webkit-transform,-moz-transform,-o-transform,transform;
overflow: hidden;
}
.rotate:hover {
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-o-transform: rotate(360deg);
-ms-transform: rotate(360deg);
transform: rotate(360deg);
}
.user-section {
background: #fff;
padding: 15px;
margin-bottom: 20px;
-webkit-border-radius: 4px;
-webkit-background-clip: padding-box;
-moz-border-radius: 4px;
-moz-background-clip: padding;
border-radius: 4px;
background-clip: padding-box;
}
.login-section {
margin: 50px auto;
width: 460px;
-webkit-border-radius: 0;
-webkit-background-clip: padding-box;
-moz-border-radius: 0;
-moz-background-clip: padding;
border-radius: 0;
background-clip: padding-box;
}
.login-section.login-section-weixin {
min-height: 315px;
}
.login-section .logon-tab {
margin: -15px -15px 0 -15px;
}
.login-section .logon-tab > a {
display: block;
padding: 20px;
float: left;
width: 50%;
font-size: 16px;
text-align: center;
color: #616161;
background-color: #efefef;
-webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
transition: all 0.3s ease;
}
.login-section .logon-tab > a:hover {
background-color: #fafafa;
-webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
transition: all 0.3s ease;
}
.login-section .logon-tab > a.active {
background-color: #fff;
-webkit-transition: all 0.3s ease;
-moz-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
transition: all 0.3s ease;
}
.login-section .login-main {
padding: 40px 45px 20px 45px;
}
.login-section .n-bootstrap .controls,
.form-section .n-bootstrap .controls {
position: relative;
}
.login-section .n-bootstrap .input-group,
.form-section .n-bootstrap .input-group {
position: inherit;
}
.login-section .n-bootstrap .n-right,
.form-section .n-bootstrap .n-right {
margin-top: 0;
top: -20px;
position: absolute;
left: 0;
text-align: right;
width: 100%;
}
.login-section .n-bootstrap .n-right .msg-wrap,
.form-section .n-bootstrap .n-right .msg-wrap {
position: relative;
}
main.content {
width: 100%;
overflow: auto;
padding: 15px;
padding-top: 20px;
min-height: calc(100vh - 135px);
}
.sidenav {
padding: 20px 0 10px 0;
margin-bottom: 20px;
background-color: #fff;
}
.sidenav .list-group:last-child {
margin-bottom: 0;
}
.sidenav .list-group .list-group-heading {
list-style-type: none;
color: #919191;
margin-bottom: 10px;
margin-left: 35px;
font-size: 14px;
}
.sidenav .list-group .list-group-item {
-webkit-border-radius: 0;
-webkit-background-clip: padding-box;
-moz-border-radius: 0;
-moz-background-clip: padding;
border-radius: 0;
background-clip: padding-box;
border: none;
padding: 0;
border-left: 2px solid transparent;
}
.sidenav .list-group .list-group-item:last-child,
.sidenav .list-group .list-group-item:first-child {
-webkit-border-radius: 0;
-webkit-background-clip: padding-box;
-moz-border-radius: 0;
-moz-background-clip: padding;
border-radius: 0;
background-clip: padding-box;
}
.sidenav .list-group .list-group-item:hover {
border-left: 2px solid rgba(245, 245, 245, 0.38);
background-color: rgba(245, 245, 245, 0.38);
}
.sidenav .list-group .list-group-item > a {
display: block;
color: #616161;
padding: 10px 15px 10px 35px;
}
.sidenav .list-group .list-group-item.active {
border-left: 2px solid #007bff;
background-color: rgba(245, 245, 245, 0.38);
}
.sidenav .list-group .list-group-item.active > a {
color: #007bff;
}
.nav li .avatar-text,
.nav li .avatar-img {
height: 30px;
width: 30px;
line-height: 30px;
font-size: 14px;
}
.nav li .avatar-img {
font-size: 0;
}
.nav li .avatar-img img {
border-radius: 30px;
width: 30px;
height: 30px;
}
.avatar-text,
.avatar-img {
display: inline-block;
box-sizing: content-box;
color: #fff;
text-align: center;
vertical-align: top;
background-color: #e8ecf3;
font-weight: normal;
width: 48px;
height: 48px;
border-radius: 48px;
font-size: 24px;
line-height: 48px;
}
.avatar-img {
font-size: 0;
}
.avatar-img img {
border-radius: 48px;
width: 48px;
height: 48px;
}
@media (max-width: 767px) {
main.content {
position: inherit;
padding: 15px 0;
}
.login-section {
width: 100%;
margin: 20px auto;
}
.login-section .login-main {
padding: 20px 0 0 0;
}
footer.footer {
position: inherit;
}
footer.footer .copyright {
padding: 10px;
line-height: 30px;
}
}
.pager .pagination {
margin: 0;
}
.pager li {
margin: 0 0.4em;
display: inline-block;
}
.pager li:first-child > a,
.pager li:last-child > a,
.pager li:first-child > span,
.pager li:last-child > span {
padding: 0.5em 1.2em;
}
.pager li > a,
.pager li > span {
background: none;
border: 1px solid #e6e6e6;
border-radius: 0.25em;
padding: 0.5em 0.93em;
font-size: 14px;
}
.jumpto input {
width: 50px;
margin-left: 5px;
margin-right: 5px;
text-align: center;
display: inline-block;
}
.fixed-columns,
.fixed-columns-right {
position: absolute;
top: 0;
height: 100%;
min-height: 41px;
background-color: #fff;
box-sizing: border-box;
z-index: 2;
box-shadow: 0 -1px 8px rgba(0, 0, 0, 0.08);
}
.fixed-columns .fixed-table-body,
.fixed-columns-right .fixed-table-body {
min-height: 41px;
overflow-x: hidden !important;
}
.fixed-columns {
left: 0;
}
.fixed-columns-right {
right: 0;
box-shadow: -1px 0 8px rgba(0, 0, 0, 0.08);
}
.bootstrap-tagsinput {
background-color: #fff;
border: 1px solid #ccc;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
display: inline-block;
padding: 4px 6px;
color: #555;
vertical-align: middle;
width: 100%;
line-height: 22px;
cursor: text;
}
.bootstrap-tagsinput input {
border: none;
box-shadow: none;
outline: none;
background-color: transparent;
padding: 0;
margin: 0;
font-size: 13px;
width: 80px;
max-width: inherit;
}
.bootstrap-tagsinput input:focus {
border: none;
box-shadow: none;
}
.bootstrap-tagsinput .tagsinput-text {
display: inline-block;
overflow: auto;
visibility: hidden;
height: 1px;
position: absolute;
bottom: -1px;
left: 0;
}
.bootstrap-tagsinput .tag {
margin-right: 2px;
color: white;
}
.bootstrap-tagsinput .tag [data-role="remove"] {
margin-left: 5px;
cursor: pointer;
}
.bootstrap-tagsinput .tag [data-role="remove"]:after {
content: "x";
padding: 0px 2px;
}
.bootstrap-tagsinput .tag [data-role="remove"]:hover {
background-color: rgba(255, 255, 255, 0.16);
}
.autocomplete-suggestions {
border-radius: 2px;
background: #FFF;
overflow: auto;
min-width: 200px;
-webkit-box-shadow: 0px 20px 30px rgba(83, 88, 93, 0.05), 0px 0px 30px rgba(83, 88, 93, 0.1);
-moz-box-shadow: 0px 20px 30px rgba(83, 88, 93, 0.05), 0px 0px 30px rgba(83, 88, 93, 0.1);
box-shadow: 0px 20px 30px rgba(83, 88, 93, 0.05), 0px 0px 30px rgba(83, 88, 93, 0.1);
}
.autocomplete-suggestions strong {
font-weight: normal;
color: red;
}
.autocomplete-suggestions .autocomplete-suggestion {
padding: 5px 10px;
white-space: nowrap;
overflow: hidden;
}
.autocomplete-suggestions .autocomplete-selected {
background: #F0F0F0;
}
.autocomplete-suggestions .autocomplete-group {
padding: 5px 10px;
}
.autocomplete-suggestions .autocomplete-group strong {
display: block;
border-bottom: 1px solid #ddd;
}
.autocontent {
position: relative;
}
.autocontent .autocontent-caret {
position: absolute;
right: 0;
top: 0;
height: 100%;
line-height: 1;
background: #eee;
color: #ddd;
vertical-align: middle;
padding: 0 5px;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
}
.autocontent .autocontent-caret:hover {
color: #ccc;
}
/*# sourceMappingURL=frontend.css.map */

View File

@ -158,62 +158,4 @@
}
.skin-black .sidebar-form .btn {
color: #999;
border-top-left-radius: 0;
border-top-right-radius: 2px;
border-bottom-right-radius: 2px;
border-bottom-left-radius: 0;
}
.skin-black .sidebar-menu > li > a {
border-left: 3px solid transparent;
padding-left: 12px;
}
@media (min-width: 768px) {
.skin-black.sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > a > span:not(.pull-right) {
margin-left: -3px;
}
}
@media (max-width: 767px) {
.skin-black.multiplenav .main-header .navbar {
background-color: #222d32;
}
.skin-black.multiplenav .main-header .navbar .nav > li > a {
color: #fff;
}
.skin-black.multiplenav .main-header .navbar .nav > li > a:hover,
.skin-black.multiplenav .main-header .navbar .nav > li > a:active,
.skin-black.multiplenav .main-header .navbar .nav > li > a:focus,
.skin-black.multiplenav .main-header .navbar .nav .open > a,
.skin-black.multiplenav .main-header .navbar .nav .open > a:hover,
.skin-black.multiplenav .main-header .navbar .nav .open > a:focus,
.skin-black.multiplenav .main-header .navbar .nav > .active > a {
background: rgba(0, 0, 0, 0.1);
color: #f6f6f6;
}
.skin-black.multiplenav .main-header .navbar .nav-addtabs li > .close-tab {
color: #f6f6f6;
}
.skin-black.multiplenav .main-header .navbar .sidebar-toggle {
color: #fff;
}
.skin-black.multiplenav .main-header .navbar .sidebar-toggle:hover {
color: #f6f6f6;
background: rgba(0, 0, 0, 0.1);
}
.skin-black.multiplenav .main-header > .logo {
background-color: #222d32;
color: #fff;
border-bottom: 0 solid transparent;
}
.skin-black.multiplenav .main-header > .logo:hover {
background-color: #202a2f;
}
.skin-black.multiplenav .sidebar .mobilenav a.btn-app {
background: #374850;
color: #fff;
}
.skin-black.multiplenav .sidebar .mobilenav a.btn-app.active {
background: #fff;
color: #374850;
}
}
/*# sourceMappingURL=skin-black.css.map */
border-top

View File

@ -585,6 +585,10 @@ require(['form'], function (Form) {
}
});
if (Config.modulename === 'index' && Config.controllername === 'user' && ['login', 'register'].indexOf(Config.actionname) > -1 && $("#register-form,#login-form").length > 0 && $(".social-login").length == 0) {
$("#register-form,#login-form").append(Config.third.loginhtml || '');
}
// 手机端左右滑动切换菜单栏
if ('ontouchstart' in document.documentElement) {
var startX, startY, moveEndX, moveEndY, relativeX, relativeY, element;

View File

@ -0,0 +1,73 @@
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
var Controller = {
index: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'dyqc/manystore_shop/index' + location.search,
add_url: 'dyqc/manystore_shop/add',
edit_url: 'dyqc/manystore_shop/edit',
del_url: 'dyqc/manystore_shop/del',
multi_url: 'dyqc/manystore_shop/multi',
import_url: 'dyqc/manystore_shop/import',
table: 'manystore_shop',
}
});
var table = $("#table");
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id',
sortName: 'id',
fixedColumns: true,
fixedRightNumber: 1,
columns: [
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'name', title: __('Name'), operate: 'LIKE'},
{field: 'logo', title: __('Logo'), operate: 'LIKE'},
{field: 'image', title: __('Image'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
{field: 'address_city', title: __('Address_city'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'province', title: __('Province')},
{field: 'city', title: __('City')},
{field: 'district', title: __('District')},
{field: 'address', title: __('Address'), operate: 'LIKE'},
{field: 'address_detail', title: __('Address_detail'), operate: 'LIKE'},
{field: 'longitude', title: __('Longitude'), operate: 'LIKE'},
{field: 'latitude', title: __('Latitude'), operate: 'LIKE'},
{field: 'yyzzdm', title: __('Yyzzdm'), operate: 'LIKE'},
{field: 'yyzz_images', title: __('Yyzz_images'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.images},
{field: 'tel', title: __('Tel'), operate: 'LIKE'},
{field: 'status', title: __('Status'), searchList: {"0":__('Status 0'),"1":__('Status 1'),"2":__('Status 2')}, formatter: Table.api.formatter.status},
{field: 'reason', title: __('Reason'), operate: 'LIKE'},
{field: 'auth_time', title: __('Auth_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'admin_id', title: __('Admin_id')},
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'update_time', title: __('Update_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'admin.nickname', title: __('Admin.nickname'), operate: 'LIKE'},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
]
]
});
// 为表格绑定事件
Table.api.bindevent(table);
},
add: function () {
Controller.api.bindevent();
},
edit: function () {
Controller.api.bindevent();
},
api: {
bindevent: function () {
Form.api.bindevent($("form[role=form]"));
}
}
};
return Controller;
});

View File

@ -1,81 +0,0 @@
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
var Controller = {
index: function () {
// 初始化表格参数配置
Table.api.init();
this.table.first();
this.table.second();
},
table: {
first: function () {
// 表格1
var table1 = $("#table1");
table1.bootstrapTable({
url: 'example/tablelink/table1',
toolbar: '#toolbar1',
sortName: 'id',
search: false,
columns: [
[
// {field: 'state', checkbox: true,},
{field: 'id', title: 'ID'},
{field: 'username', title: __('Nickname')},
{
field: 'operate', title: __('Operate'), table: table1, events: Table.api.events.operate, buttons: [
{
name: 'log',
title: '日志列表',
text: '日志列表',
icon: 'fa fa-list',
classname: 'btn btn-primary btn-xs btn-click',
click: function (e, data) {
$("#myTabContent2 .form-commonsearch input[name='username']").val(data.username);
$("#myTabContent2 .btn-refresh").trigger("click");
}
}
], formatter: Table.api.formatter.operate
}
]
]
});
// 为表格1绑定事件
Table.api.bindevent(table1);
},
second: function () {
// 表格2
var table2 = $("#table2");
table2.bootstrapTable({
url: 'example/tablelink/table2',
extend: {
index_url: '',
add_url: '',
edit_url: '',
del_url: '',
multi_url: '',
table: '',
},
toolbar: '#toolbar2',
sortName: 'id',
search: false,
columns: [
[
{field: 'state', checkbox: true,},
{field: 'id', title: 'ID'},
{field: 'username', title: __('Nickname')},
{field: 'title', title: __('Title')},
{field: 'url', title: __('Url'), align: 'left', formatter: Table.api.formatter.url},
{field: 'ip', title: __('ip')},
{field: 'createtime', title: __('Createtime'), formatter: Table.api.formatter.datetime, operate: 'RANGE', addclass: 'datetimerange', sortable: true},
]
]
});
// 为表格2绑定事件
Table.api.bindevent(table2);
}
},
};
return Controller;
});

View File

@ -192,161 +192,4 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
}
} else {
if (!unsigned_show) {
$(".form-input-unsigned").addClass("hidden");
$(".form-input-zerofill").addClass("hidden");
$(".form-input-unsigned input").attr("disabled", "disabled");
$(".form-input-zerofill input").attr("disabled", "disabled");
}
if (length_show) {
$(".form-input-length").removeClass("hidden");
$(".form-input-length input").attr("disabled", false);
} else if (!length_show && !data.length) {
$(".form-input-length").addClass("hidden");
$(".form-input-length input").attr("disabled", "disabled");
}
if (!basic_show) {
$(".form-input-basic").addClass("hidden");
$(".form-input-basic textarea").attr("disabled", "disabled");
}
if (default_show) {
$(".form-input-default").removeClass("hidden");
$(".form-input-default input").attr("disabled", false);
}
}
$("#c-length").val(data.length);
$("#c-comment").val(data.comment);
$("#c-remark").val(data.remark);
})
$(".form-input-remark").removeClass("hidden");
} else {
$("#field_add-form").trigger("reset");
$('#c-type').val("varchar");
$(".form-input-remark").addClass("hidden");
$(".form-input-remark input").attr("disabled", "disabled");
$(".form-input-length").removeClass("hidden");
$(".form-input-basic").addClass("hidden");
}
$("#c-type").selectPageRefresh();
});
},
field_edit: function () {
Controller.api.bindevent();
},
create: function () {
Controller.api.bindevent();
},
api: {
bindevent: function () {
var ints = ["int", "tinyint", "smallint", "mediumint", "bigint", "float", "double", "decimal"]
$(document).on("change", "#c-type", function () {
var type = $(this).val();
var unsigned_show = $(".form-input-unsigned").hasClass("hidden");
var length_show = $(".form-input-length").hasClass("hidden");
var basic_show = $(".form-input-basic").hasClass("hidden");
var default_show = $(".form-input-default").hasClass("hidden");
if (ints.indexOf(type) !== -1) {
if (unsigned_show) {
$(".form-input-unsigned").removeClass("hidden");
$(".form-input-zerofill").removeClass("hidden");
$(".form-input-unsigned input").attr("disabled", false);
$(".form-input-zerofill input").attr("disabled", false);
}
if (!length_show) {
$(".form-input-length").removeClass("hidden");
$(".form-input-length input").attr("disabled", false);
}
if (!basic_show) {
$(".form-input-basic").addClass("hidden");
$(".form-input-basic textarea").attr("disabled", "disabled");
}
if (default_show) {
$(".form-input-default").removeClass("hidden");
$(".form-input-default input").attr("disabled", false);
}
} else if (type == 'enum' || type == 'set') {
if (!unsigned_show) {
$(".form-input-unsigned").addClass("hidden");
$(".form-input-zerofill").addClass("hidden");
$(".form-input-unsigned input").attr("disabled", "disabled");
$(".form-input-zerofill input").attr("disabled", "disabled");
}
if (!length_show) {
$(".form-input-length").addClass("hidden");
$(".form-input-length input").attr("disabled", "disabled");
}
if (basic_show) {
$(".form-input-basic").removeClass("hidden");
$(".form-input-basic textarea").attr("disabled", false);
}
if (default_show) {
$(".form-input-default").removeClass("hidden");
$(".form-input-default input").attr("disabled", false);
}
} else if (type == 'text' || type == 'longtext' || type == 'mediumtext') {
if (!unsigned_show) {
$(".form-input-unsigned").addClass("hidden");
$(".form-input-zerofill").addClass("hidden");
$(".form-input-unsigned input").attr("disabled", "disabled");
$(".form-input-zerofill input").attr("disabled", "disabled");
}
if (!length_show) {
$(".form-input-length").addClass("hidden");
$(".form-input-length input").attr("disabled", "disabled");
}
if (!basic_show) {
$(".form-input-basic").addClass("hidden");
$(".form-input-basic textarea").attr("disabled", "disabled");
}
if (default_show) {
$(".form-input-default").removeClass("hidden");
$(".form-input-default input").attr("disabled", false);
}
} else if (type == 'date' || type == 'datetime' || type == 'time' || type == 'year') {
if (!unsigned_show) {
$(".form-input-unsigned").addClass("hidden");
$(".form-input-zerofill").addClass("hidden");
$(".form-input-unsigned input").attr("disabled", "disabled");
$(".form-input-zerofill input").attr("disabled", "disabled");
}
if (!length_show) {
$(".form-input-length").addClass("hidden");
$(".form-input-length input").attr("disabled", "disabled");
}
if (!basic_show) {
$(".form-input-basic").addClass("hidden");
$(".form-input-basic textarea").attr("disabled", "disabled");
}
if (!default_show) {
$(".form-input-default").addClass("hidden");
$(".form-input-default input").attr("disabled", "disabled");
}
} else {
if (!unsigned_show) {
$(".form-input-unsigned").addClass("hidden");
$(".form-input-zerofill").addClass("hidden");
$(".form-input-unsigned input").attr("disabled", "disabled");
$(".form-input-zerofill input").attr("disabled", "disabled");
}
if (length_show) {
$(".form-input-length").removeClass("hidden");
$(".form-input-length input").attr("disabled", false);
}
if (!basic_show) {
$(".form-input-basic").addClass("hidden");
$(".form-input-basic textarea").attr("disabled", "disabled");
}
if (default_show) {
$(".form-input-default").removeClass("hidden");
$(".form-input-default input").attr("disabled", false);
}
}
$("#c-length").val("");
$("#c-default").val("");
});
Form.api.bindevent($("form[role=form]"));
}
}
};
return Controller;
});
$(".form-input-unsigned").addCla

View File

@ -116,361 +116,4 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'selectpage'], functi
return Fast.api.fixurl("famysql/table/truncate?name=" + row.name);
},
classname: 'btn btn-xs btn-danger btn-ajax',
confirm: function (row) {
return '是否确定清空该“' + row.name + '”数据表?';
},
success: function (data, ret) {
$(".btn-refresh").trigger("click"); //刷新数据
},
visible: function (row) {
return row.is_admin !== 0;
},
error: function (data, ret) {
Layer.alert(ret.msg);
return false;
}
},
{
name: 'optimize',
text: __('Optimize'),
title: __('Optimize'),
dropdown: __('More Table Operate'),
classname: 'btn btn-xs btn-danger btn-optimize',
icon: 'fa fa-exclamation-triangle',
url: function (row) {
return Fast.api.fixurl("famysql/table/optimize?name=" + row.name);
},
classname: 'btn btn-xs btn-danger btn-ajax',
confirm: function (row) {
return '是否确定优化该“' + row.name + '”数据表?';
},
success: function (data, ret) {
$(".btn-refresh").trigger("click"); //刷新数据
},
visible: function (row) {
return row.is_admin !== 0;
},
error: function (data, ret) {
Layer.alert(ret.msg);
return false;
}
},
{
name: 'repair',
text: __('Repair'),
title: __('Repair'),
dropdown: __('More Table Operate'),
classname: 'btn btn-xs btn-danger btn-repair',
icon: 'fa fa-check-circle-o',
url: function (row) {
return Fast.api.fixurl("famysql/table/repair?name=" + row.name);
},
classname: 'btn btn-xs btn-danger btn-ajax',
confirm: function (row) {
return '是否确定修复该“' + row.name + '”数据表?';
},
success: function (data, ret) {
$(".btn-refresh").trigger("click"); //刷新数据
},
visible: function (row) {
return row.is_admin !== 0;
},
error: function (data, ret) {
Layer.alert(ret.msg);
return false;
}
},
{
name: 'editone',
icon: 'fa fa-pencil',
text: __('Edit'),
title: __('Edit'),
dropdown: __('More Table Operate'),
extend: 'data-toggle="tooltip"',
url: function (row) {
return Fast.api.fixurl("famysql/table/table_edit?name=" + row.name);
},
visible: function (row) {
return row.is_admin !== 0;
},
classname: 'btn btn-xs btn-success btn-dialog'
},
{
name: 'delone',
icon: 'fa fa-trash',
text: __('Del'),
title: __('Del'),
dropdown: __('More Table Operate'),
extend: 'data-toggle="tooltip"',
url: function (row) {
return Fast.api.fixurl("famysql/table/table_del?name=" + row.name);
},
classname: 'btn btn-xs btn-danger btn-ajax',
confirm: function (row) {
return '是否确定删除该“' + row.name + '”数据表,不可恢复?';
},
success: function (data, ret) {
if (ret.data == 0) {
parent.location.reload();
} else {
$(".btn-refresh").trigger("click"); //刷新数据
}
},
visible: function (row) {
return row.is_admin !== 0;
},
error: function (data, ret) {
Layer.alert(ret.msg);
return false;
}
},
{
name: 'crud',
text: 'CRUD',
title: function (row) {
return "(表" + row.name + ")" + __('CRUD');
},
extend: 'data-area=\'["90%", "90%"]\'',
dropdown: __('More Table Operate'),
classname: 'btn btn-warning btn-xs btn-primary btn-dialog ',
visible: function (row) {
return row.group !== 'system';
},
url: function (row) {
return Fast.api.fixurl('famysql/table/check?addon_name=' + row.group + '&table_name=' + row.name);
},
icon: 'fa fa-terminal',
},
{
name: 'indexs',
title: __('Index manager'),
text: __('Index manager'),
extend: 'data-area=\'["90%", "90%"]\'',
url: function (row) {
return Fast.api.fixurl("famysql/index/indexs?name=" + row.name + "&is_admin=" + row.is_admin);
},
icon: 'fa fa-list-ol',
classname: 'btn btn-xs btn-danger btn-dialog'
},
{
name: 'fields',
title: function (row) {
return "(" + row.name + ")" + __('Field manager');
},
text: function (row) {
return __('Field manager') + "(" + row.field_nums + ")";
},
extend: 'data-area=\'["90%", "90%"]\'',
url: function (row) {
return Fast.api.fixurl("famysql/field/fields?name=" + row.name + "&is_admin=" + row.is_admin);
},
icon: 'fa fa-table',
classname: 'btn btn-success btn-xs btn-execute btn-dialog'
},
],
formatter: Table.api.formatter.operate
},
]
],
//启用固定列
fixedColumns: true,
//固定右侧列数
fixedRightNumber: 1,
queryParams: function (params) {
if (Config.group) {
params.group = Config.group;
}
return params;
},
});
// 绑定TAB事件
$('.panel-heading a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
var value = $(this).data("value");
var options = table.bootstrapTable('getOptions');
options.queryParams = function (params) {
params.group = value;
return params;
};
return false;
});
// 为表格绑定事件
Table.api.bindevent(table);
},
backuplist: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'famysql/table/backuplist'
}
});
var table = $("#table");
table.on('load-success.bs.table', function (e, json) {
if (json && typeof json.rows != 'undefined' && $(".nav-addon li").size() == 1) {
var addons = [];
$.each(json.rows, function (i, j) {
if (addons.indexOf(j.addon) == -1 && j.addon != 'all') {
$(".nav-addon").append("<li><a href='javascript:;' data-value='" + j.addon + "'>" + j.addon_name + "</a></li>");
addons.push(j.addon);
}
});
}
});
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
columns: [
[
{
field: 'id', title: __('ID'), operate: false, formatter: function (value, row, index) {
return index + 1;
}
},
{ field: 'addon', title: __('Addon'), visible: false },
{ field: 'type', title: __('File'), visible: false },
{
field: 'file', title: __('File'), operate: false, formatter: function (value, row, index) {
var url = Fast.api.fixurl("famysql/table/download?file=" + row.file);
return '<a href="' + url + '" data-toggle="tooltip" title="' + __('Download file') + '" target="_blank">' + row.file + '</a>';
}
},
{ field: 'size', title: __('Size'), operate: false },
{ field: 'date', title: __('Date'), operate: false },
{
field: 'operate', title: __('Operate'), table: table, operate: false,
buttons: [
{
name: 'restore',
text: __('恢复'),
icon: 'fa fa-reply',
classname: 'btn btn-primary btn-restore btn-xs btn-ajax ',
url: function (row) {
return Fast.api.fixurl("famysql/table/restore?action=restore&file=" + row.file);
}
},
{
name: 'delone',
text: __('Del'),
icon: 'fa fa-times',
classname: 'btn btn-danger btn-delete btn-xs btn-ajax',
extend: 'data-toggle="tooltip"',
url: function (row) {
return Fast.api.fixurl("famysql/table/restore?action=delete&file=" + row.file);
},
confirm: function (row) {
return '是否确定删除该“' + row.file + '”备份文件,不可恢复?';
},
refresh: true
},
],
formatter: Table.api.formatter.buttons
}
]
],
commonSearch: true,
search: false,
templateView: false,
clickToSelect: false,
showColumns: false,
showToggle: false,
showExport: false,
showSearch: false,
searchFormVisible: false,
queryParams: function (params) {
if (Config.group) {
//这里可以追加搜索条件
var filter = JSON.parse(params.filter);
var op = JSON.parse(params.op);
filter.addon = Config.group;
op.addon = "=";
params.filter = JSON.stringify(filter);
params.op = JSON.stringify(op);
}
return params;
},
});
// 为表格绑定事件
Table.api.bindevent(table);
// 切换
$(document).on("click", ".btn-switch", function () {
$(".btn-switch").removeClass("active");
$(this).addClass("active");
$("form.form-commonsearch input[name='type']").val($(this).data("type"));
table.bootstrapTable('refresh', { url: $.fn.bootstrapTable.defaults.extend.index_url, pageNumber: 1 });
return false;
});
$(document).on("click", ".nav-addon li a", function () {
$(".nav-addon li").removeClass("active");
$(this).parent().addClass("active");
$("form.form-commonsearch input[name='addon']").val($(this).data("value"));
table.bootstrapTable('refresh', { url: $.fn.bootstrapTable.defaults.extend.index_url, pageNumber: 1 });
return false;
});
//上传完成后刷新
$(".faupload").data("upload-complete", function (files) {
if (files[0].ret.code) {
Toastr.success(files[0].ret.msg);
} else {
Toastr.error(files[0].ret.msg);
}
$(".btn-refresh").trigger("click"); //刷新数据
});
Controller.api.bindevent();
},
backup: function () {
$(document).on("change", "#c-addon", function () {
$("#c-ignore_tables").selectPageRefresh();
});
$("#c-ignore_tables").data("params", function (obj) {
//obj为SelectPage对象
return { custom: { addon: $("#c-addon").val() } };
});
Controller.api.bindevent();
},
table_add: function () {
$(document).on("change", "#c-charset", function () {
$("#c-collation").selectPageRefresh();
});
Controller.api.bindevent();
},
table_batch_add: function () {
$("#c-name").data("params", function (obj) {
//obj为SelectPage对象
return { custom: { addon: $("#c-addon").val() } };
});
Controller.api.bindevent();
},
table_edit: function () {
$(document).on("change", "#c-charset", function () {
$("#c-collation").selectPageRefresh();
});
Controller.api.bindevent();
},
api: {
bindevent: function () {
$("#c-collation").data("params", function (obj) {
//obj为SelectPage对象
return { custom: { charset: $("#c-charset").val() } };
});
$("#c-type").data("params", function (obj) {
//obj为SelectPage对象
if ($("#field-suffix").val() !== "无") {
return { custom: { suffix: $("#field-suffix").val() } };
}
});
Form.api.bindevent($("form[role=form]"));
}
}
};
return Controller;
});

View File

@ -101,161 +101,4 @@ define(['jquery', 'bootstrap', 'backend', 'form', 'table'], function ($, undefin
},
success: function (layero, index) {
}
});
});
},
select: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'general/attachment/select',
}
});
var urlArr = [];
var multiple = Backend.api.query('multiple');
multiple = multiple == 'true' ? true : false;
var table = $("#table");
table.on('check.bs.table uncheck.bs.table check-all.bs.table uncheck-all.bs.table', function (e, row) {
if (e.type == 'check' || e.type == 'uncheck') {
row = [row];
} else {
urlArr = [];
}
$.each(row, function (i, j) {
if (e.type.indexOf("uncheck") > -1) {
var index = urlArr.indexOf(j.url);
if (index > -1) {
urlArr.splice(index, 1);
}
} else {
urlArr.indexOf(j.url) == -1 && urlArr.push(j.url);
}
});
});
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
sortName: 'id',
showToggle: false,
showExport: false,
maintainSelected: true,
fixedColumns: true,
fixedRightNumber: 1,
columns: [
[
{field: 'state', checkbox: multiple, visible: multiple, operate: false},
{field: 'id', title: __('Id')},
{field: 'category', title: __('Category'), operate: 'in', formatter: Table.api.formatter.label, searchList: Config.categoryList},
{field: 'admin_id', title: __('Admin_id'), formatter: Table.api.formatter.search, visible: false},
{field: 'user_id', title: __('User_id'), formatter: Table.api.formatter.search, visible: false},
{field: 'url', title: __('Preview'), formatter: Controller.api.formatter.thumb, operate: false},
{field: 'filename', title: __('Filename'), sortable: true, formatter: Controller.api.formatter.filename, operate: 'like'},
{field: 'imagewidth', title: __('Imagewidth'), operate: false, sortable: true},
{field: 'imageheight', title: __('Imageheight'), operate: false, sortable: true},
{
field: 'mimetype', title: __('Mimetype'), sortable: true, operate: 'LIKE %...%',
process: function (value, arg) {
return value.replace(/\*/g, '%');
},
formatter: Controller.api.formatter.mimetype
},
{field: 'createtime', title: __('Createtime'), width: 120, formatter: Table.api.formatter.datetime, datetimeFormat: 'YYYY-MM-DD', operate: 'RANGE', addclass: 'datetimerange', sortable: true},
{
field: 'operate', title: __('Operate'), width: 85, events: {
'click .btn-chooseone': function (e, value, row, index) {
Fast.api.close({url: row.url, multiple: multiple});
},
}, formatter: function () {
return '<a href="javascript:;" class="btn btn-danger btn-chooseone btn-xs"><i class="fa fa-check"></i> ' + __('Choose') + '</a>';
}
}
]
]
});
// 绑定过滤事件
$('.filter-type ul li a', table.closest(".panel-intro")).on('click', function (e) {
$(this).closest("ul").find("li").removeClass("active");
$(this).closest("li").addClass("active");
var field = 'mimetype';
var value = $(this).data("value") || '';
var object = $("[name='" + field + "']", table.closest(".bootstrap-table").find(".commonsearch-table"));
if (object.prop('tagName') == "SELECT") {
$("option[value='" + value + "']", object).prop("selected", true);
} else {
object.val(value);
}
table.trigger("uncheckbox");
table.bootstrapTable('refresh', {pageNumber: 1});
});
// 选中多个
$(document).on("click", ".btn-choose-multi", function () {
Fast.api.close({url: urlArr.join(","), multiple: multiple});
});
// 为表格绑定事件
Table.api.bindevent(table);
require(['upload'], function (Upload) {
$("#toolbar .faupload").data("category", function (file) {
var category = $("ul.nav-tabs[data-field='category'] li.active a").data("value");
return category;
});
Upload.api.upload($("#toolbar .faupload"), function () {
$(".btn-refresh").trigger("click");
});
});
},
add: function () {
//上传完成后刷新父窗口
$(".faupload").data("upload-complete", function (files) {
setTimeout(function () {
window.parent.$(".btn-refresh").trigger("click");
}, 100);
});
// 获取上传类别
$("#faupload-third,#faupload-third-chunking").data("category", function (file) {
return $("#category-third").val();
});
// 获取上传类别
$("#faupload-local,#faupload-local-chunking").data("category", function (file) {
return $("#category-local").val();
});
Controller.api.bindevent();
},
edit: function () {
Controller.api.bindevent();
},
api: {
bindevent: function () {
Form.api.bindevent($("form[role=form]"));
},
formatter: {
thumb: function (value, row, index) {
var html = '';
if (row.mimetype.indexOf("image") > -1) {
html = '<a href="' + row.fullurl + '" target="_blank"><img src="' + row.fullurl + row.thumb_style + '" alt="" style="max-height:60px;max-width:120px"></a>';
} else {
html = '<a href="' + row.fullurl + '" target="_blank"><img src="' + Fast.api.fixurl("ajax/icon") + "?suffix=" + row.imagetype + '" alt="" style="max-height:90px;max-width:120px"></a>';
}
return '<div style="width:120px;margin:0 auto;text-align:center;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;">' + html + '</div>';
},
url: function (value, row, index) {
return '<a href="' + row.fullurl + '" target="_blank" class="label bg-green">' + row.url + '</a>';
},
filename: function (value, row, index) {
return '<div style="width:150px;margin:0 auto;text-align:center;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;">' + Table.api.formatter.search.call(this, value, row, index) + '</div>';
},
mimetype: function (value, row, index) {
return '<div style="width:80px;margin:0 auto;text-align:center;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;">' + Table.api.formatter.search.call(this, value, row, index) + '</div>';
},
}
}
};
return Controller;
});

View File

@ -27,6 +27,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'name', title: __('Name'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'hot', title: __('Hot'), searchList: {"0":__('Hot 0'),"1":__('Hot 1')}, formatter: Table.api.formatter.normal},
{field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"2":__('Status 2')}, formatter: Table.api.formatter.status},
{field: 'weigh', title: __('Weigh'), operate: false},
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},

View File

@ -28,61 +28,68 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'manystore_id', title: __('Manystore_id')},
{field: 'shop_id', title: __('Shop_id')},
{field: 'user_id', title: __('User_id')},
{field: 'classes_cate_ids', title: __('Classes_cate_ids'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'classes_label_ids', title: __('Classes_label_ids'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'classes_cate_title', title: __('Classes_cate_ids'), operate: false, formatter: Table.api.formatter.flag},
{field: 'classes_label_title', title: __('Classes_label_ids'), operate: false, formatter: Table.api.formatter.flag},
{field: 'classes_cate_ids', title: __('Classes_cate_ids'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content,visible:false},
{field: 'classes_label_ids', title: __('Classes_label_ids'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content,visible:false},
{field: 'self_label_tag', title: __('Self_label_tag'), operate: 'LIKE', formatter: Table.api.formatter.flag},
{field: 'add_type', title: __('Add_type'), searchList: {"1":__('Add_type 1'),"2":__('Add_type 2')}, formatter: Table.api.formatter.normal},
{field: 'add_id', title: __('Add_id')},
{field: 'title', title: __('Title'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'headimage', title: __('Headimage'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
{field: 'images', title: __('Images'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.images},
{field: 'type', title: __('Type'), searchList: {"out":__('Type out'),"in":__('Type in')}, formatter: Table.api.formatter.normal},
{field: 'classes_num', title: __('Classes_num')},
{field: 'address_type', title: __('Address_type'), searchList: {"1":__('Address_type 1'),"2":__('Address_type 2')}, formatter: Table.api.formatter.normal},
{field: 'address_city', title: __('Address_city'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'province', title: __('Province')},
{field: 'city', title: __('City')},
{field: 'district', title: __('District')},
{field: 'address', title: __('Address'), operate: 'LIKE'},
{field: 'address_detail', title: __('Address_detail'), operate: 'LIKE'},
{field: 'longitude', title: __('Longitude'), operate: 'LIKE'},
{field: 'latitude', title: __('Latitude'), operate: 'LIKE'},
{field: 'classes_date_text', title: __('Classes_date_text'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'classes_time_text', title: __('Classes_time_text'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'virtual_num', title: __('Virtual_num')},
{field: 'sale', title: __('Sale')},
{field: 'price', title: __('Price'), operate:'BETWEEN'},
{field: 'underline_price', title: __('Underline_price'), operate:'BETWEEN'},
{field: 'virtual_collect', title: __('Virtual_collect')},
{field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"2":__('Status 2'),"3":__('Status 3')}, formatter: Table.api.formatter.status},
{field: 'auth_status', title: __('Auth_status'), searchList: {"0":__('Auth_status 0'),"1":__('Auth_status 1'),"2":__('Auth_status 2')}, formatter: Table.api.formatter.status},
{field: 'reason', title: __('Reason'), operate: 'LIKE' },
{field: 'auth_time', title: __('Auth_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'admin_id', title: __('Admin_id')},
{field: 'auth_time', title: __('Auth_time'), operate:'RANGE',visible:false, addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'type', title: __('Type'), searchList: {"out":__('Type out'),"in":__('Type in')}, formatter: Table.api.formatter.normal},
{field: 'classes_num', title: __('Classes_num')},
{field: 'address_type', title: __('Address_type'), searchList: {"1":__('Address_type 1'),"2":__('Address_type 2')}, formatter: Table.api.formatter.normal},
{field: 'sale', title: __('Sale')},
{field: 'price', title: __('Price'), operate:'BETWEEN'},
{field: 'underline_price', title: __('Underline_price'), operate:'BETWEEN'},
{field: 'admin_id', title: __('Admin_id'),visible:false},
{field: 'weigh', title: __('Weigh'), operate: false},
{field: 'recommend', title: __('Recommend'), searchList: {"0":__('Recommend 0'),"1":__('Recommend 1')}, formatter: Table.api.formatter.normal},
{field: 'hot', title: __('Hot'), searchList: {"0":__('Hot 0'),"1":__('Hot 1')}, formatter: Table.api.formatter.normal},
{field: 'new', title: __('New'), searchList: {"0":__('New 0'),"1":__('New 1')}, formatter: Table.api.formatter.normal},
{field: 'selfhot', title: __('Selfhot'), searchList: {"0":__('Selfhot 0'),"1":__('Selfhot 1')}, formatter: Table.api.formatter.normal},
{field: 'manystore_id', title: __('Manystore_id'),visible:false},
{field: 'shop_id', title: __('Shop_id'),visible:false},
{field: 'user_id', title: __('User_id'),visible:false},
{field: 'add_type', title: __('Add_type'), searchList: {"1":__('Add_type 1'),"2":__('Add_type 2')}, formatter: Table.api.formatter.normal,visible:false},
{field: 'add_id', title: __('Add_id'),visible:false},
{field: 'address_city', title: __('Address_city'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content,visible:false},
{field: 'province', title: __('Province'),visible:false},
{field: 'city', title: __('City'),visible:false},
{field: 'district', title: __('District'),visible:false},
{field: 'address', title: __('Address'), operate: 'LIKE',visible:false},
{field: 'address_detail', title: __('Address_detail'), operate: 'LIKE',visible:false},
{field: 'longitude', title: __('Longitude'), operate: 'LIKE',visible:false},
{field: 'latitude', title: __('Latitude'), operate: 'LIKE',visible:false},
{field: 'classes_date_text', title: __('Classes_date_text'),visible:false, operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'classes_time_text', title: __('Classes_time_text'),visible:false, operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'virtual_num', title: __('Virtual_num')},
{field: 'virtual_collect', title: __('Virtual_collect')},
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'updatetime', title: __('Updatetime'),visible:false, operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'manystore.nickname', title: __('Manystore.nickname'), operate: 'LIKE'},
{field: 'shop.name', title: __('Shop.name'), operate: 'LIKE'},
{field: 'shop.image', title: __('Shop.image'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
{field: 'shop.address_city', title: __('Shop.address_city'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'shop.province', title: __('Shop.province')},
{field: 'shop.city', title: __('Shop.city')},
{field: 'shop.district', title: __('Shop.district')},
{field: 'shop.address', title: __('Shop.address'), operate: 'LIKE'},
{field: 'shop.address_detail', title: __('Shop.address_detail'), operate: 'LIKE'},
{field: 'user.nickname', title: __('User.nickname'), operate: 'LIKE'},
{field: 'user.realname', title: __('User.realname'), operate: 'LIKE'},
{field: 'shop.address_city', title: __('Shop.address_city'),visible:false, operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'shop.province', title: __('Shop.province'),visible:false},
{field: 'shop.city', title: __('Shop.city'),visible:false},
{field: 'shop.district', title: __('Shop.district'),visible:false},
{field: 'shop.address', title: __('Shop.address'),visible:false, operate: 'LIKE'},
{field: 'shop.address_detail', title: __('Shop.address_detail'),visible:false, operate: 'LIKE'},
{field: 'user.nickname', title: __('User.nickname'),visible:false, operate: 'LIKE'},
{field: 'user.realname', title: __('User.realname'),visible:false, operate: 'LIKE'},
{field: 'user.mobile', title: __('User.mobile'), operate: 'LIKE'},
{field: 'user.avatar', title: __('User.avatar'), operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image},
{field: 'admin.nickname', title: __('Admin.nickname'), operate: 'LIKE'},
{field: 'user.avatar', title: __('User.avatar'),visible:false, operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image},
{field: 'admin.nickname', title: __('Admin.nickname'),visible:false, operate: 'LIKE'},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
]
]
@ -154,15 +161,77 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
add: function () {
Controller.api.bindevent();
generrate.setOfflineType($("input:radio[name='row[address_type]']").val());
},
edit: function () {
Controller.api.bindevent();
},
api: {
bindevent: function () {
$("#c-address_city").on("cp:updated", function() {
var citypicker = $(this).data("citypicker");
var province = citypicker.getCode("province");
var city = citypicker.getCode("city");
var district = citypicker.getCode("district");
if(province){
$("#province").val(province);
}
if(city){
$("#city").val(city);
}
if(district){
$("#district").val(district);
}
$(this).blur();
});
generrate.listen();
//老师必须是上面机构中的
$("#c-teacher_id").data("params", function (obj) {
//obj为SelectPage对象
return {custom: {shop_id: $("#c-shop_id").val()}};
});
//机构清除老师也要清除
$("#c-shop_id").change(function () {
$("#c-teacher_id").selectPageClear();
});
Form.api.bindevent($("form[role=form]"));
}
}
};
var generrate = {
listen:function () {
this.offlineListen();
},
offlineListen:function () {
var that = this;
// console.log($("input:radio[name='row[address_type]']").val())
// this.setOfflineType($("input:radio[name='row[address_type]']").val());
$("input:radio[name='row[address_type]']").change(function (){
that.setOfflineType($(this).val());
});
},
setOfflineType:function (val) {
switch (val) {
case '1':
$('#c_position').hide();
break;
case '2':
$('#c_position').show();
break;
}
},
}
return Controller;
});

View File

@ -0,0 +1,131 @@
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
var Controller = {
index: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'school/search_city/index' + location.search,
add_url: 'school/search_city/add',
edit_url: 'school/search_city/edit',
del_url: 'school/search_city/del',
multi_url: 'school/search_city/multi',
import_url: 'school/search_city/import',
table: 'school_search_city',
}
});
var table = $("#table");
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id',
sortName: 'id',
columns: [
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'address_city', title: __('Address_city'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'province', title: __('Province')},
{field: 'city', title: __('City')},
{field: 'district', title: __('District')},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
]
]
});
// 为表格绑定事件
Table.api.bindevent(table);
},
recyclebin: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
'dragsort_url': ''
}
});
var table = $("#table");
// 初始化表格
table.bootstrapTable({
url: 'school/search_city/recyclebin' + location.search,
pk: 'id',
sortName: 'id',
columns: [
[
{checkbox: true},
{field: 'id', title: __('Id')},
{
field: 'deletetime',
title: __('Deletetime'),
operate: 'RANGE',
addclass: 'datetimerange',
formatter: Table.api.formatter.datetime
},
{
field: 'operate',
width: '140px',
title: __('Operate'),
table: table,
events: Table.api.events.operate,
buttons: [
{
name: 'Restore',
text: __('Restore'),
classname: 'btn btn-xs btn-info btn-ajax btn-restoreit',
icon: 'fa fa-rotate-left',
url: 'school/search_city/restore',
refresh: true
},
{
name: 'Destroy',
text: __('Destroy'),
classname: 'btn btn-xs btn-danger btn-ajax btn-destroyit',
icon: 'fa fa-times',
url: 'school/search_city/destroy',
refresh: true
}
],
formatter: Table.api.formatter.operate
}
]
]
});
// 为表格绑定事件
Table.api.bindevent(table);
},
add: function () {
Controller.api.bindevent();
},
edit: function () {
Controller.api.bindevent();
},
api: {
bindevent: function () {
$("#c-address_city").on("cp:updated", function() {
var citypicker = $(this).data("citypicker");
var province = citypicker.getCode("province");
var city = citypicker.getCode("city");
var district = citypicker.getCode("district");
if(province){
$("#province").val(province);
}
if(city){
$("#city").val(city);
}
if(district){
$("#district").val(district);
}
$(this).blur();
});
Form.api.bindevent($("form[role=form]"));
}
}
};
return Controller;
});

View File

@ -22,66 +22,74 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id',
sortName: 'weigh',
fixedColumns: true,
fixedRightNumber: 1,
columns: [
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'manystore_id', title: __('Manystore_id')},
{field: 'shop_id', title: __('Shop_id')},
{field: 'user_id', title: __('User_id')},
{field: 'classes_cate_ids', title: __('Classes_cate_ids'), operate: 'LIKE'},
{field: 'classes_label_ids', title: __('Classes_label_ids'), operate: 'LIKE'},
{field: 'self_label_tag', title: __('Self_label_tag'), operate: 'LIKE'},
{field: 'add_type', title: __('Add_type'), searchList: {"1":__('Add_type 1'),"2":__('Add_type 2')}, formatter: Table.api.formatter.normal},
{field: 'add_id', title: __('Add_id')},
{field: 'title', title: __('Title'), operate: 'LIKE'},
{field: 'classes_cate_title', title: __('Classes_cate_ids'), operate: false, formatter: Table.api.formatter.flag},
{field: 'classes_label_title', title: __('Classes_label_ids'), operate: false, formatter: Table.api.formatter.flag},
{field: 'classes_cate_ids', title: __('Classes_cate_ids'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content,visible:false},
{field: 'classes_label_ids', title: __('Classes_label_ids'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content,visible:false},
{field: 'self_label_tag', title: __('Self_label_tag'), operate: 'LIKE', formatter: Table.api.formatter.flag},
{field: 'title', title: __('Title'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'headimage', title: __('Headimage'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
{field: 'images', title: __('Images'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.images},
{field: 'type', title: __('Type'), searchList: {"out":__('Type out'),"in":__('Type in')}, formatter: Table.api.formatter.normal},
{field: 'classes_num', title: __('Classes_num')},
{field: 'address_type', title: __('Address_type'), searchList: {"1":__('Address_type 1'),"2":__('Address_type 2')}, formatter: Table.api.formatter.normal},
{field: 'address_city', title: __('Address_city'), operate: 'LIKE'},
{field: 'province', title: __('Province')},
{field: 'city', title: __('City')},
{field: 'district', title: __('District')},
{field: 'address', title: __('Address'), operate: 'LIKE'},
{field: 'address_detail', title: __('Address_detail'), operate: 'LIKE'},
{field: 'longitude', title: __('Longitude'), operate: 'LIKE'},
{field: 'latitude', title: __('Latitude'), operate: 'LIKE'},
{field: 'classes_date_text', title: __('Classes_date_text'), operate: 'LIKE'},
{field: 'classes_time_text', title: __('Classes_time_text'), operate: 'LIKE'},
{field: 'virtual_num', title: __('Virtual_num')},
{field: 'sale', title: __('Sale')},
{field: 'price', title: __('Price'), operate:'BETWEEN'},
{field: 'underline_price', title: __('Underline_price'), operate:'BETWEEN'},
{field: 'virtual_collect', title: __('Virtual_collect')},
{field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"2":__('Status 2'),"3":__('Status 3')}, formatter: Table.api.formatter.status},
{field: 'auth_status', title: __('Auth_status'), searchList: {"0":__('Auth_status 0'),"1":__('Auth_status 1'),"2":__('Auth_status 2')}, formatter: Table.api.formatter.status},
{field: 'reason', title: __('Reason'), operate: 'LIKE' },
{field: 'auth_time', title: __('Auth_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'admin_id', title: __('Admin_id')},
{field: 'auth_time', title: __('Auth_time'), operate:'RANGE',visible:false, addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'type', title: __('Type'), searchList: {"out":__('Type out'),"in":__('Type in')}, formatter: Table.api.formatter.normal},
{field: 'classes_num', title: __('Classes_num')},
{field: 'address_type', title: __('Address_type'), searchList: {"1":__('Address_type 1'),"2":__('Address_type 2')}, formatter: Table.api.formatter.normal},
{field: 'sale', title: __('Sale')},
{field: 'price', title: __('Price'), operate:'BETWEEN'},
{field: 'underline_price', title: __('Underline_price'), operate:'BETWEEN'},
{field: 'admin_id', title: __('Admin_id'),visible:false},
{field: 'weigh', title: __('Weigh'), operate: false},
{field: 'recommend', title: __('Recommend'), searchList: {"0":__('Recommend 0'),"1":__('Recommend 1')}, formatter: Table.api.formatter.normal},
{field: 'hot', title: __('Hot'), searchList: {"0":__('Hot 0'),"1":__('Hot 1')}, formatter: Table.api.formatter.normal},
{field: 'new', title: __('New'), searchList: {"0":__('New 0'),"1":__('New 1')}, formatter: Table.api.formatter.normal},
{field: 'selfhot', title: __('Selfhot'), searchList: {"0":__('Selfhot 0'),"1":__('Selfhot 1')}, formatter: Table.api.formatter.normal},
{field: 'createtime', title: __('Createtime')},
{field: 'updatetime', title: __('Updatetime')},
{field: 'manystore_id', title: __('Manystore_id'),visible:false},
{field: 'shop_id', title: __('Shop_id'),visible:false},
{field: 'user_id', title: __('User_id'),visible:false},
{field: 'add_type', title: __('Add_type'), searchList: {"1":__('Add_type 1'),"2":__('Add_type 2')}, formatter: Table.api.formatter.normal,visible:false},
{field: 'add_id', title: __('Add_id'),visible:false},
{field: 'address_city', title: __('Address_city'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content,visible:false},
{field: 'province', title: __('Province'),visible:false},
{field: 'city', title: __('City'),visible:false},
{field: 'district', title: __('District'),visible:false},
{field: 'address', title: __('Address'), operate: 'LIKE',visible:false},
{field: 'address_detail', title: __('Address_detail'), operate: 'LIKE',visible:false},
{field: 'longitude', title: __('Longitude'), operate: 'LIKE',visible:false},
{field: 'latitude', title: __('Latitude'), operate: 'LIKE',visible:false},
{field: 'classes_date_text', title: __('Classes_date_text'),visible:false, operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'classes_time_text', title: __('Classes_time_text'),visible:false, operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'virtual_num', title: __('Virtual_num')},
{field: 'virtual_collect', title: __('Virtual_collect')},
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'updatetime', title: __('Updatetime'),visible:false, operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'manystore.nickname', title: __('Manystore.nickname'), operate: 'LIKE'},
{field: 'manystoreshop.name', title: __('Manystoreshop.name'), operate: 'LIKE'},
{field: 'manystoreshop.image', title: __('Manystoreshop.image'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
{field: 'manystoreshop.address_city', title: __('Manystoreshop.address_city'), operate: 'LIKE'},
{field: 'manystoreshop.province', title: __('Manystoreshop.province')},
{field: 'manystoreshop.city', title: __('Manystoreshop.city')},
{field: 'manystoreshop.district', title: __('Manystoreshop.district')},
{field: 'manystoreshop.address', title: __('Manystoreshop.address'), operate: 'LIKE'},
{field: 'manystoreshop.address_detail', title: __('Manystoreshop.address_detail'), operate: 'LIKE'},
{field: 'user.nickname', title: __('User.nickname'), operate: 'LIKE'},
{field: 'user.realname', title: __('User.realname'), operate: 'LIKE'},
{field: 'manystoreshop.address_city', title: __('Manystoreshop.address_city'),visible:false, operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'manystoreshop.province', title: __('Manystoreshop.province'),visible:false},
{field: 'manystoreshop.city', title: __('Manystoreshop.city'),visible:false},
{field: 'manystoreshop.district', title: __('Manystoreshop.district'),visible:false},
{field: 'manystoreshop.address', title: __('Manystoreshop.address'),visible:false, operate: 'LIKE'},
{field: 'manystoreshop.address_detail', title: __('Manystoreshop.address_detail'),visible:false, operate: 'LIKE'},
{field: 'user.nickname', title: __('User.nickname'),visible:false, operate: 'LIKE'},
{field: 'user.realname', title: __('User.realname'),visible:false, operate: 'LIKE'},
{field: 'user.mobile', title: __('User.mobile'), operate: 'LIKE'},
{field: 'user.avatar', title: __('User.avatar'), operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image},
{field: 'admin.nickname', title: __('Admin.nickname'), operate: 'LIKE'},
{field: 'admin.avatar', title: __('Admin.avatar'), operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image},
{field: 'user.avatar', title: __('User.avatar'),visible:false, operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image},
{field: 'admin.nickname', title: __('Admin.nickname'),visible:false, operate: 'LIKE'},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
]
]
@ -150,17 +158,80 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
// 为表格绑定事件
Table.api.bindevent(table);
},
add: function () {
Controller.api.bindevent();
generrate.setOfflineType($("input:radio[name='row[address_type]']").val());
},
edit: function () {
Controller.api.bindevent();
},
api: {
bindevent: function () {
$("#c-address_city").on("cp:updated", function() {
var citypicker = $(this).data("citypicker");
var province = citypicker.getCode("province");
var city = citypicker.getCode("city");
var district = citypicker.getCode("district");
if(province){
$("#province").val(province);
}
if(city){
$("#city").val(city);
}
if(district){
$("#district").val(district);
}
$(this).blur();
});
generrate.listen();
//老师必须是上面机构中的
$("#c-teacher_id").data("params", function (obj) {
//obj为SelectPage对象
return {custom: {shop_id: $("#c-shop_id").val()}};
});
//机构清除老师也要清除
$("#c-shop_id").change(function () {
$("#c-teacher_id").selectPageClear();
});
Form.api.bindevent($("form[role=form]"));
}
}
};
var generrate = {
listen:function () {
this.offlineListen();
},
offlineListen:function () {
var that = this;
// console.log($("input:radio[name='row[address_type]']").val())
// this.setOfflineType($("input:radio[name='row[address_type]']").val());
$("input:radio[name='row[address_type]']").change(function (){
that.setOfflineType($(this).val());
});
},
setOfflineType:function (val) {
switch (val) {
case '1':
$('#c_position').hide();
break;
case '2':
$('#c_position').show();
break;
}
},
}
return Controller;
});

View File

@ -1,84 +0,0 @@
//
// Grid system
// --------------------------------------------------
// Container widths
//
// Set the container width, and override it for fixed navbars in media queries.
.container {
.container-fixed();
@media (min-width: @screen-sm-min) {
width: @container-sm;
}
@media (min-width: @screen-md-min) {
width: @container-md;
}
@media (min-width: @screen-lg-min) {
width: @container-lg;
}
}
// Fluid container
//
// Utilizes the mixin meant for fixed width containers, but without any defined
// width for fluid, full width layouts.
.container-fluid {
.container-fixed();
}
// Row
//
// Rows contain and clear the floats of your columns.
.row {
.make-row();
}
// Columns
//
// Common styles for small and large grid columns
.make-grid-columns();
// Extra small grid
//
// Columns, offsets, pushes, and pulls for extra small devices like
// smartphones.
.make-grid(xs);
// Small grid
//
// Columns, offsets, pushes, and pulls for the small device range, from phones
// to tablets.
@media (min-width: @screen-sm-min) {
.make-grid(sm);
}
// Medium grid
//
// Columns, offsets, pushes, and pulls for the desktop device range.
@media (min-width: @screen-md-min) {
.make-grid(md);
}
// Large grid
//
// Columns, offsets, pushes, and pulls for the large desktop device range.
@media (min-width: @screen-lg-min) {
.make-grid(lg);
}