parent
87b471510b
commit
23f8715a95
|
@ -4,7 +4,9 @@ namespace app\admin\controller\manystore;
|
||||||
|
|
||||||
use app\admin\model\User;
|
use app\admin\model\User;
|
||||||
use app\common\model\school\classes\Order;
|
use app\common\model\school\classes\Order;
|
||||||
|
|
||||||
use app\manystore\model\Manystore;
|
use app\manystore\model\Manystore;
|
||||||
|
use app\manystore\model\ManystoreLog;
|
||||||
use app\manystore\model\ManystoreShop;
|
use app\manystore\model\ManystoreShop;
|
||||||
use app\manystore\model\ManystoreAuthGroup;
|
use app\manystore\model\ManystoreAuthGroup;
|
||||||
use app\manystore\model\ManystoreAuthGroupAccess;
|
use app\manystore\model\ManystoreAuthGroupAccess;
|
||||||
|
@ -12,6 +14,7 @@ use app\common\controller\Backend;
|
||||||
use fast\Random;
|
use fast\Random;
|
||||||
use fast\Tree;
|
use fast\Tree;
|
||||||
use think\Exception;
|
use think\Exception;
|
||||||
|
use think\Hook;
|
||||||
use think\Validate;
|
use think\Validate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -35,7 +38,7 @@ class Index extends Backend
|
||||||
|
|
||||||
|
|
||||||
//不用审核允许修改的字段
|
//不用审核允许修改的字段
|
||||||
protected $no_auth_fields = ['image','images','address_city','province',"city","district","address","address_detail",
|
protected $no_auth_fields = [ "name",'image','images','address_city','province',"city","district","address","address_detail",
|
||||||
"longitude","latitude","content","desc"
|
"longitude","latitude","content","desc"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -57,6 +60,55 @@ class Index extends Backend
|
||||||
$this->view->assign("typeList", $this->shopModel->getTypeList());
|
$this->view->assign("typeList", $this->shopModel->getTypeList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 免登录进入机构后台
|
||||||
|
* @return string
|
||||||
|
* @throws \think\Exception
|
||||||
|
* @throws \think\db\exception\BindParamException
|
||||||
|
* @throws \think\exception\DbException
|
||||||
|
* @throws \think\exception\PDOException
|
||||||
|
*/
|
||||||
|
public function free($ids = ''){
|
||||||
|
$param = $this->request->param();
|
||||||
|
if($this->request->isPost()){
|
||||||
|
// try{
|
||||||
|
if(isset($param['ids']))$ids = $param['ids'];
|
||||||
|
//机构登录
|
||||||
|
//如果存在登录,先退出登录
|
||||||
|
$auth = \app\manystore\library\Auth::instance();
|
||||||
|
if($auth->isLogin()){
|
||||||
|
$auth->logout();
|
||||||
|
Hook::listen("manystore_logout_after", $this->request);
|
||||||
|
}
|
||||||
|
//执行登录
|
||||||
|
ManystoreLog::setTitle(__('Login'));
|
||||||
|
$result = $auth->freelogin($ids, 0);
|
||||||
|
if ($result === true) {
|
||||||
|
Hook::listen("admin_login_after", $this->request);
|
||||||
|
$this->success(__('Login successful'), null, [ 'id' => $auth->id, 'avatar' => $auth->avatar]);
|
||||||
|
} else {
|
||||||
|
$msg = $auth->getError();
|
||||||
|
$msg = $msg ? $msg : __('Username or password is incorrect');
|
||||||
|
$this->error($msg, null, ['token' => $this->request->token()]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// }catch (\Exception $e){
|
||||||
|
// $this->error($e->getMessage());
|
||||||
|
// }
|
||||||
|
|
||||||
|
}
|
||||||
|
$row = $this->model->get($ids);
|
||||||
|
$this->view->assign('vo', $row);
|
||||||
|
return $this->view->fetch();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查看
|
* 查看
|
||||||
*/
|
*/
|
||||||
|
@ -135,9 +187,13 @@ class Index extends Backend
|
||||||
//审核通过
|
//审核通过
|
||||||
if($this->success_auth){
|
if($this->success_auth){
|
||||||
//如果是平台下架,则更新成正常下架
|
//如果是平台下架,则更新成正常下架
|
||||||
if($params["status"] == 'hidden') $params["status"] = 'normal';
|
if($params["status"] == 'hidden')$params["status"] = 'normal';
|
||||||
|
|
||||||
|
//当前密码
|
||||||
|
$password = $params['password'] ? $params['password'] : \app\common\model\dyqc\ManystoreShop::getDefaultPassword($params["type"],$params["user_id"],$params);
|
||||||
|
|
||||||
//调用通过事件
|
//调用通过事件
|
||||||
$data = ['shop' => $row];
|
$data = ['shop' => $row,"password"=>$password];
|
||||||
\think\Hook::listen('shop_auth_success_after', $data);
|
\think\Hook::listen('shop_auth_success_after', $data);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,10 @@ use think\exception\ValidateException;
|
||||||
class ClassesLib extends Backend
|
class ClassesLib extends Backend
|
||||||
{
|
{
|
||||||
|
|
||||||
|
protected $qSwitch = true;
|
||||||
|
protected $qFields = ["teacher_id","user_id","shop_id","manystore_id"];
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ClassesLib模型对象
|
* ClassesLib模型对象
|
||||||
* @var \app\admin\model\school\classes\ClassesLib
|
* @var \app\admin\model\school\classes\ClassesLib
|
||||||
|
@ -39,8 +43,9 @@ class ClassesLib extends Backend
|
||||||
|
|
||||||
public function _initialize()
|
public function _initialize()
|
||||||
{
|
{
|
||||||
parent::_initialize();
|
|
||||||
$this->model = new \app\admin\model\school\classes\ClassesLib;
|
$this->model = new \app\admin\model\school\classes\ClassesLib;
|
||||||
|
parent::_initialize();
|
||||||
|
|
||||||
$this->view->assign("addTypeList", $this->model->getAddTypeList());
|
$this->view->assign("addTypeList", $this->model->getAddTypeList());
|
||||||
$this->view->assign("typeList", $this->model->getTypeList());
|
$this->view->assign("typeList", $this->model->getTypeList());
|
||||||
$this->view->assign("addressTypeList", $this->model->getAddressTypeList());
|
$this->view->assign("addressTypeList", $this->model->getAddressTypeList());
|
||||||
|
|
|
@ -3,6 +3,15 @@
|
||||||
namespace app\admin\controller\school\classes;
|
namespace app\admin\controller\school\classes;
|
||||||
|
|
||||||
use app\common\controller\Backend;
|
use app\common\controller\Backend;
|
||||||
|
use app\common\model\User;
|
||||||
|
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,10 +27,14 @@ class Verification extends Backend
|
||||||
*/
|
*/
|
||||||
protected $model = null;
|
protected $model = null;
|
||||||
|
|
||||||
|
protected $qSwitch = true;
|
||||||
|
protected $qFields = ["manystore_id","shop_id"];
|
||||||
|
|
||||||
public function _initialize()
|
public function _initialize()
|
||||||
{
|
{
|
||||||
parent::_initialize();
|
|
||||||
$this->model = new \app\admin\model\school\classes\Verification;
|
$this->model = new \app\admin\model\school\classes\Verification;
|
||||||
|
parent::_initialize();
|
||||||
|
|
||||||
$this->view->assign("statusList", $this->model->getStatusList());
|
$this->view->assign("statusList", $this->model->getStatusList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,4 +83,191 @@ class Verification extends Backend
|
||||||
return $this->view->fetch();
|
return $this->view->fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
protected function updateCheck($id,$params=[],$row=null){
|
||||||
|
|
||||||
|
// 课程存在售后订单则不允许操作
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected function update_check(&$params,$row=null)
|
||||||
|
{
|
||||||
|
|
||||||
|
$shop_id = $params["shop_id"];
|
||||||
|
$manystore = Manystore::where("shop_id",$shop_id)->find();
|
||||||
|
if(!$manystore){
|
||||||
|
$this->error("店铺不存在");
|
||||||
|
}
|
||||||
|
//用户不存在
|
||||||
|
$user_id = $params["user_id"];
|
||||||
|
$user = User::where("id",$user_id)->find();
|
||||||
|
if(!$user){
|
||||||
|
$this->error("用户不存在");
|
||||||
|
}
|
||||||
|
|
||||||
|
//修改
|
||||||
|
if($row){
|
||||||
|
//用户已是其他的教师(搜索)
|
||||||
|
$teacher_user = $this->model->where("user_id",$user_id)->where("id","<>",$row["id"])->find();
|
||||||
|
if($teacher_user){
|
||||||
|
$this->error("用户已存在或已是其他授权机构核销员!");
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
//新增
|
||||||
|
//用户已是教师(搜索)
|
||||||
|
$teacher_user = $this->model->where("user_id",$user_id)->find();
|
||||||
|
if($teacher_user){
|
||||||
|
$this->error("用户已存在或已是其他授权机构核销员!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$params["manystore_id"] = $manystore["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'));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'Order_no' => '订单号',
|
'Order_no' => '订单号',
|
||||||
|
'Edit'=>'订单详情',
|
||||||
'Pay_no' => '微信支付单号',
|
'Pay_no' => '微信支付单号',
|
||||||
'User_id' => '下单人id',
|
'User_id' => '下单人id',
|
||||||
'Manystore_id' => '机构账号id',
|
'Manystore_id' => '机构账号id',
|
||||||
|
|
|
@ -25,8 +25,19 @@ class Verification extends Model
|
||||||
|
|
||||||
// 追加属性
|
// 追加属性
|
||||||
protected $append = [
|
protected $append = [
|
||||||
'status_text'
|
'status_text',
|
||||||
|
'classes_title'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
public function getClassesTitleAttr($value, $data)
|
||||||
|
{
|
||||||
|
$classes_lib_ids = (isset($data['classes_lib_ids']) ? $data['classes_lib_ids'] : '');
|
||||||
|
if(!$classes_lib_ids) return '';
|
||||||
|
//$classes_cate_ids 查询分类表 names 已逗号拼接返回
|
||||||
|
$classes_cate_title = ClassesLib::where('id','in',$classes_lib_ids)->column('title');
|
||||||
|
return implode(',',$classes_cate_title);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,16 @@
|
||||||
<div class="widget-body no-padding">
|
<div class="widget-body no-padding">
|
||||||
<div id="toolbar" class="toolbar">
|
<div id="toolbar" class="toolbar">
|
||||||
{:build_toolbar('refresh,add')}
|
{:build_toolbar('refresh,add')}
|
||||||
|
|
||||||
|
<!-- <div class="alert alert-danger-light">-->
|
||||||
|
<!-- <b>机构后台地址:</b><br>-->
|
||||||
|
<!-- <div id="auto_1">-->
|
||||||
|
<!-- <a href="#" target="_blank"></a>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
|
||||||
|
<!-- </div>-->
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<table id="table" class="table table-striped table-bordered table-hover"
|
<table id="table" class="table table-striped table-bordered table-hover"
|
||||||
data-operate-edit="{:$auth->check('manystore/index/edit')}"
|
data-operate-edit="{:$auth->check('manystore/index/edit')}"
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Shop_id')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Shop_id')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<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="">
|
<input id="c-shop_id" data-rule="required" data-source="dyqc/manystore_shop/index" class="form-control selectpage" name="row[shop_id]" type="text" value="{$q_shop_id}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="form-group">-->
|
<!-- <div class="form-group">-->
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('讲师id')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('讲师id')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
<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="">
|
<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="{$q_teacher_id}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -3,44 +3,39 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Order_no')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Order_no')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
<input id="c-order_no" class="form-control" name="row[order_no]" type="text" value="{$row.order_no|htmlentities}">
|
<input id="c-order_no" class="form-control" name="row[order_no]" readonly disabled type="text" value="{$row.order_no|htmlentities}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_no')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_no')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
<input id="c-pay_no" class="form-control" name="row[pay_no]" type="text" value="{$row.pay_no|htmlentities}">
|
<input id="c-pay_no" class="form-control" name="row[pay_no]" readonly disabled type="text" value="{$row.pay_no|htmlentities}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<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">{:__('User_id')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<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-user_id" data-rule="required" data-source="user/user/index" disabled readonly data-field="mobile" data-format-item="{id} - {nickname} - {mobile}" class="form-control selectpage" name="row[user_id]" type="text" value="{$row.user_id|htmlentities}">
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Manystore_id')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-manystore_id" data-rule="required" data-source="manystore/index" class="form-control selectpage" name="row[manystore_id]" type="text" value="{$row.manystore_id|htmlentities}">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Shop_id')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Shop_id')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
<input id="c-shop_id" data-rule="required" data-source="manystore/shop/index" class="form-control selectpage" name="row[shop_id]" type="text" value="{$row.shop_id|htmlentities}">
|
<input id="c-shop_id" data-rule="required" data-source="dyqc/manystore_shop/index" disabled readonly class="form-control selectpage" name="row[shop_id]" type="text" value="{$row.shop_id|htmlentities}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Code')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Code')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
<input id="c-code" class="form-control" name="row[code]" type="text" value="{$row.code|htmlentities}">
|
<input id="c-code" class="form-control" name="row[code]" readonly disabled type="text" value="{$row.code|htmlentities}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Codeimage')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Codeimage')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input id="c-codeimage" class="form-control" size="50" name="row[codeimage]" type="text" value="{$row.codeimage|htmlentities}">
|
<input id="c-codeimage" class="form-control" readonly disabled size="50" name="row[codeimage]" type="text" value="{$row.codeimage|htmlentities}">
|
||||||
<div class="input-group-addon no-border no-padding">
|
<div class="input-group-addon no-border no-padding">
|
||||||
<span><button type="button" id="faupload-codeimage" class="btn btn-danger faupload" data-input-id="c-codeimage" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-codeimage"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
|
<span><button type="button" id="faupload-codeimage" class="btn btn-danger faupload" data-input-id="c-codeimage" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-codeimage"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
|
||||||
<span><button type="button" id="fachoose-codeimage" class="btn btn-primary fachoose" data-input-id="c-codeimage" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
|
<span><button type="button" id="fachoose-codeimage" class="btn btn-primary fachoose" data-input-id="c-codeimage" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
|
||||||
|
@ -54,7 +49,7 @@
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Codeoneimage')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Codeoneimage')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input id="c-codeoneimage" class="form-control" size="50" name="row[codeoneimage]" type="text" value="{$row.codeoneimage|htmlentities}">
|
<input id="c-codeoneimage" class="form-control" readonly disabled size="50" name="row[codeoneimage]" type="text" value="{$row.codeoneimage|htmlentities}">
|
||||||
<div class="input-group-addon no-border no-padding">
|
<div class="input-group-addon no-border no-padding">
|
||||||
<span><button type="button" id="faupload-codeoneimage" class="btn btn-danger faupload" data-input-id="c-codeoneimage" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-codeoneimage"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
|
<span><button type="button" id="faupload-codeoneimage" class="btn btn-danger faupload" data-input-id="c-codeoneimage" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-codeoneimage"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
|
||||||
<span><button type="button" id="fachoose-codeoneimage" class="btn btn-primary fachoose" data-input-id="c-codeoneimage" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
|
<span><button type="button" id="fachoose-codeoneimage" class="btn btn-primary fachoose" data-input-id="c-codeoneimage" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
|
||||||
|
@ -67,40 +62,40 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Classes_lib_id')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Classes_lib_id')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
<input id="c-classes_lib_id" data-rule="required" data-source="school/classes/lib/index" class="form-control selectpage" name="row[classes_lib_id]" type="text" value="{$row.classes_lib_id|htmlentities}">
|
<input id="c-classes_lib_id" data-rule="required" readonly disabled data-source="school/classes/classes_lib/index" data-field="title" class="form-control selectpage" name="row[classes_lib_id]" type="text" value="{$row.classes_lib_id|htmlentities}">
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Classes_order_detail_id')}:</label>
|
|
||||||
<div class="col-xs-12 col-sm-8">
|
|
||||||
<input id="c-classes_order_detail_id" data-rule="required" data-source="school/classes/order/detail/index" class="form-control selectpage" name="row[classes_order_detail_id]" type="text" value="{$row.classes_order_detail_id|htmlentities}">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- <div class="form-group">-->
|
||||||
|
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Classes_order_detail_id')}:</label>-->
|
||||||
|
<!-- <div class="col-xs-12 col-sm-8">-->
|
||||||
|
<!-- <input id="c-classes_order_detail_id" data-rule="required" data-source="school/classes/order/detail/index" class="form-control selectpage" name="row[classes_order_detail_id]" type="text" value="{$row.classes_order_detail_id|htmlentities}">-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Beforeprice')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Beforeprice')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
<input id="c-beforeprice" class="form-control" step="0.01" name="row[beforeprice]" type="number" value="{$row.beforeprice|htmlentities}">
|
<input id="c-beforeprice" class="form-control" step="0.01" readonly disabled name="row[beforeprice]" type="number" value="{$row.beforeprice|htmlentities}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Totalprice')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Totalprice')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
<input id="c-totalprice" class="form-control" step="0.01" name="row[totalprice]" type="number" value="{$row.totalprice|htmlentities}">
|
<input id="c-totalprice" class="form-control" step="0.01" readonly disabled name="row[totalprice]" type="number" value="{$row.totalprice|htmlentities}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Payprice')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Payprice')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
<input id="c-payprice" class="form-control" step="0.01" name="row[payprice]" type="number" value="{$row.payprice|htmlentities}">
|
<input id="c-payprice" class="form-control" step="0.01" readonly disabled name="row[payprice]" type="number" value="{$row.payprice|htmlentities}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_type')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Pay_type')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
|
||||||
<select id="c-pay_type" class="form-control selectpicker" name="row[pay_type]">
|
<select id="c-pay_type" class="form-control selectpicker" readonly disabled name="row[pay_type]">
|
||||||
{foreach name="payTypeList" item="vo"}
|
{foreach name="payTypeList" item="vo"}
|
||||||
<option value="{$key}" {in name="key" value="$row.pay_type"}selected{/in}>{$vo}</option>
|
<option value="{$key}" {in name="key" value="$row.pay_type"}selected{/in}>{$vo}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -112,7 +107,7 @@
|
||||||
|
|
||||||
<div class="radio">
|
<div class="radio">
|
||||||
{foreach name="statusList" item="vo"}
|
{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]" readonly disabled type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -17,19 +17,19 @@
|
||||||
<div class="widget-body no-padding">
|
<div class="widget-body no-padding">
|
||||||
<div id="toolbar" class="toolbar">
|
<div id="toolbar" class="toolbar">
|
||||||
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
|
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
|
||||||
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('school/classes/order/order/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
|
<!-- <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('school/classes/order/order/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>-->
|
||||||
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('school/classes/order/order/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
|
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('school/classes/order/order/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
|
||||||
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('school/classes/order/order/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
|
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('school/classes/order/order/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
|
||||||
|
|
||||||
|
|
||||||
<div class="dropdown btn-group {:$auth->check('school/classes/order/order/multi')?'':'hide'}">
|
<!-- <div class="dropdown btn-group {:$auth->check('school/classes/order/order/multi')?'':'hide'}">-->
|
||||||
<a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
|
<!-- <a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>-->
|
||||||
<ul class="dropdown-menu text-left" role="menu">
|
<!-- <ul class="dropdown-menu text-left" role="menu">-->
|
||||||
{foreach name="statusList" item="vo"}
|
<!-- {foreach name="statusList" item="vo"}-->
|
||||||
<li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:" data-params="status={$key}">{:__('Set status to ' . $key)}</a></li>
|
<!-- <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:" data-params="status={$key}">{:__('Set status to ' . $key)}</a></li>-->
|
||||||
{/foreach}
|
<!-- {/foreach}-->
|
||||||
</ul>
|
<!-- </ul>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
|
|
||||||
<a class="btn btn-success btn-recyclebin btn-dialog {:$auth->check('school/classes/order/order/recyclebin')?'':'hide'}" href="school/classes/order/order/recyclebin" title="{:__('Recycle bin')}"><i class="fa fa-recycle"></i> {:__('Recycle bin')}</a>
|
<a class="btn btn-success btn-recyclebin btn-dialog {:$auth->check('school/classes/order/order/recyclebin')?'':'hide'}" href="school/classes/order/order/recyclebin" title="{:__('Recycle bin')}"><i class="fa fa-recycle"></i> {:__('Recycle bin')}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,21 +1,21 @@
|
||||||
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
||||||
|
|
||||||
<div class="form-group">
|
<!-- <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">{:__('Manystore_id')}:</label>-->
|
||||||
<div class="col-xs-12 col-sm-8">
|
<!-- <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="">
|
<!-- <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>
|
<!-- </div>-->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Shop_id')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Shop_id')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<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="">
|
<input id="c-shop_id" data-rule="required" data-source="dyqc/manystore_shop/index" class="form-control selectpage" name="row[shop_id]" type="text" value="{$q_shop_id}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<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">{:__('User_id')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<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-user_id" data-rule="required" data-source="user/user/index" data-field="mobile" data-format-item="{id} - {nickname} - {mobile}" class="form-control selectpage" name="row[user_id]" type="text" value="">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
||||||
|
|
||||||
<div class="form-group">
|
<!-- <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">{:__('Manystore_id')}:</label>-->
|
||||||
<div class="col-xs-12 col-sm-8">
|
<!-- <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}">
|
<!-- <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>
|
<!-- </div>-->
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Shop_id')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Shop_id')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
<div class="form-group">
|
<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">{:__('User_id')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<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-user_id" data-rule="required" data-source="user/user/index" data-field="mobile" data-format-item="{id} - {nickname} - {mobile}" class="form-control selectpage" name="row[user_id]" type="text" value="{$row.user_id|htmlentities}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
|
@ -271,6 +271,11 @@ class ManystoreBase extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(!defined('SHOP_AUTH_TYPE_TEXT')) {
|
||||||
|
define('SHOP_AUTH_TYPE_TEXT', $manystoreShop->type_text ?? "个人认证");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if(!defined('STORE_ID')) {
|
if(!defined('STORE_ID')) {
|
||||||
define('STORE_ID', $this->auth->id);
|
define('STORE_ID', $this->auth->id);
|
||||||
}
|
}
|
||||||
|
@ -329,7 +334,8 @@ class ManystoreBase extends Controller
|
||||||
'referer' => Session::get("referer"),
|
'referer' => Session::get("referer"),
|
||||||
'shop_id' => $this->auth->shop_id,
|
'shop_id' => $this->auth->shop_id,
|
||||||
'store_id' => $this->auth->id,
|
'store_id' => $this->auth->id,
|
||||||
'shop_user_id' => $manystoreShop->user_id ?:0,
|
'shop_user_id' => $manystoreShop->user_id ??0,
|
||||||
|
'auth_type_text' => $manystoreShop->type_text ?? "个人认证",
|
||||||
];
|
];
|
||||||
$config = array_merge($config, Config::get("view_replace_str"));
|
$config = array_merge($config, Config::get("view_replace_str"));
|
||||||
|
|
||||||
|
@ -352,8 +358,8 @@ class ManystoreBase extends Controller
|
||||||
$this->assign('shop_id', $this->auth->shop_id);
|
$this->assign('shop_id', $this->auth->shop_id);
|
||||||
|
|
||||||
$this->assign('store_id', $this->auth->id);
|
$this->assign('store_id', $this->auth->id);
|
||||||
$this->assign('shop_user_id', $manystoreShop->user_id ?:0 );
|
$this->assign('shop_user_id', $manystoreShop->user_id ??0 );
|
||||||
|
$this->assign( 'auth_type_text' , $manystoreShop->type_text ?? "个人认证");
|
||||||
// if(!defined('SHOP_ID')){
|
// if(!defined('SHOP_ID')){
|
||||||
// define('SHOP_ID', $this->auth->shop_id);
|
// define('SHOP_ID', $this->auth->shop_id);
|
||||||
// }
|
// }
|
||||||
|
|
|
@ -6,7 +6,7 @@ class OrderHook
|
||||||
|
|
||||||
public function classeshourOrderCreateBefore(&$params)
|
public function classeshourOrderCreateBefore(&$params)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -34,12 +34,27 @@ class ManystoreShop extends BaseModel
|
||||||
|
|
||||||
// 追加属性
|
// 追加属性
|
||||||
protected $append = [
|
protected $append = [
|
||||||
|
'type_text',
|
||||||
'status_text',
|
'status_text',
|
||||||
'auth_time_text',
|
'auth_time_text',
|
||||||
'create_time_text',
|
'create_time_text',
|
||||||
'update_time_text'
|
'update_time_text'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
public function getTypeList()
|
||||||
|
{
|
||||||
|
return ['1' => __('Type 1'), '2' => __('Type 2')];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTypeTextAttr($value, $data)
|
||||||
|
{
|
||||||
|
$value = $value ? $value : (isset($data['type']) ? $data['type'] : '');
|
||||||
|
$list = $this->getTypeList();
|
||||||
|
return isset($list[$value]) ? $list[$value] : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 拼音对象
|
// 拼音对象
|
||||||
protected static $pinyin = null;
|
protected static $pinyin = null;
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,8 @@ class Profile extends ManystoreBase
|
||||||
$shopModel = new ManystoreShop();
|
$shopModel = new ManystoreShop();
|
||||||
$shop_info = $shopModel->where(array('id'=>SHOP_ID))->find();
|
$shop_info = $shopModel->where(array('id'=>SHOP_ID))->find();
|
||||||
$this->view->assign('statusList',[0=>'待审核',1=>'审核通过',2=>'审核拒绝']);
|
$this->view->assign('statusList',[0=>'待审核',1=>'审核通过',2=>'审核拒绝']);
|
||||||
|
$this->view->assign('typeList',$shop_info->getTypeList());
|
||||||
|
|
||||||
$this->view->assign('shop_info',$shop_info);
|
$this->view->assign('shop_info',$shop_info);
|
||||||
return $this->view->fetch();
|
return $this->view->fetch();
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,9 @@ use think\exception\ValidateException;
|
||||||
class ClassesLib extends ManystoreBase
|
class ClassesLib extends ManystoreBase
|
||||||
{
|
{
|
||||||
|
|
||||||
|
protected $qSwitch = true;
|
||||||
|
protected $qFields = ["teacher_id","user_id","shop_id","manystore_id"];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ClassesLib模型对象
|
* ClassesLib模型对象
|
||||||
* @var \app\manystore\model\school\classes\ClassesLib
|
* @var \app\manystore\model\school\classes\ClassesLib
|
||||||
|
@ -40,8 +43,9 @@ class ClassesLib extends ManystoreBase
|
||||||
|
|
||||||
public function _initialize()
|
public function _initialize()
|
||||||
{
|
{
|
||||||
parent::_initialize();
|
|
||||||
$this->model = new \app\manystore\model\school\classes\ClassesLib;
|
$this->model = new \app\manystore\model\school\classes\ClassesLib;
|
||||||
|
parent::_initialize();
|
||||||
|
|
||||||
$this->view->assign("addTypeList", $this->model->getAddTypeList());
|
$this->view->assign("addTypeList", $this->model->getAddTypeList());
|
||||||
$this->view->assign("typeList", $this->model->getTypeList());
|
$this->view->assign("typeList", $this->model->getTypeList());
|
||||||
$this->view->assign("addressTypeList", $this->model->getAddressTypeList());
|
$this->view->assign("addressTypeList", $this->model->getAddressTypeList());
|
||||||
|
|
|
@ -3,6 +3,12 @@
|
||||||
namespace app\manystore\controller\school\classes;
|
namespace app\manystore\controller\school\classes;
|
||||||
|
|
||||||
use app\common\controller\ManystoreBase;
|
use app\common\controller\ManystoreBase;
|
||||||
|
use app\common\model\User;
|
||||||
|
use app\manystore\model\Manystore;
|
||||||
|
use think\Db;
|
||||||
|
use think\Exception;
|
||||||
|
use think\exception\PDOException;
|
||||||
|
use think\exception\ValidateException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 机构核销员
|
* 机构核销员
|
||||||
|
@ -17,12 +23,16 @@ class Verification extends ManystoreBase
|
||||||
* @var \app\manystore\model\school\classes\Verification
|
* @var \app\manystore\model\school\classes\Verification
|
||||||
*/
|
*/
|
||||||
protected $model = null;
|
protected $model = null;
|
||||||
|
protected $qSwitch = true;
|
||||||
|
protected $qFields = ["manystore_id","shop_id"];
|
||||||
|
|
||||||
public function _initialize()
|
public function _initialize()
|
||||||
{
|
{
|
||||||
parent::_initialize();
|
|
||||||
$this->model = new \app\manystore\model\school\classes\Verification;
|
$this->model = new \app\manystore\model\school\classes\Verification;
|
||||||
|
parent::_initialize();
|
||||||
$this->view->assign("statusList", $this->model->getStatusList());
|
$this->view->assign("statusList", $this->model->getStatusList());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function import()
|
public function import()
|
||||||
|
@ -73,4 +83,201 @@ class Verification extends ManystoreBase
|
||||||
return $this->view->fetch();
|
return $this->view->fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
protected function updateCheck($id,$params=[],$row=null){
|
||||||
|
|
||||||
|
// 课程存在售后订单则不允许操作
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected function update_check(&$params,$row=null)
|
||||||
|
{
|
||||||
|
|
||||||
|
$shop_id = SHOP_ID;
|
||||||
|
$manystore = Manystore::where("shop_id", $shop_id)->find();
|
||||||
|
if (!$manystore) {
|
||||||
|
$this->error("店铺不存在");
|
||||||
|
}
|
||||||
|
$params["manystore_id"] = $manystore["id"];
|
||||||
|
$params["shop_id"] = $shop_id;
|
||||||
|
$user = User::where("nickname|realname|mobile", $params["user_id"])->find();
|
||||||
|
if(!$user) $this->error("未找到用户请先让用户登录小程序再提交表单");
|
||||||
|
$params["user_id"] = $user["id"];
|
||||||
|
|
||||||
|
$user_id = $params["user_id"];
|
||||||
|
//修改
|
||||||
|
if($row){
|
||||||
|
//用户已是其他的教师(搜索)
|
||||||
|
$teacher_user = $this->model->where("user_id",$user_id)->where("id","<>",$row["id"])->find();
|
||||||
|
if($teacher_user){
|
||||||
|
$this->error("用户已存在或已是其他授权机构核销员!");
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
//新增
|
||||||
|
//用户已是教师(搜索)
|
||||||
|
$teacher_user = $this->model->where("user_id",$user_id)->find();
|
||||||
|
if($teacher_user){
|
||||||
|
$this->error("用户已存在或已是其他授权机构核销员!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @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', ''));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$user = User::where("id", $row["user_id"])->find();
|
||||||
|
// if(!$user) $this->error("未找到用户请先让用户登录小程序再提交表单");
|
||||||
|
$row["user_id"] = $user["mobile"]?? ""; //nickname|realname|mobile
|
||||||
|
$this->view->assign("row", $row);
|
||||||
|
return $this->view->fetch();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
public function del($ids = "")
|
||||||
|
{
|
||||||
|
if (!$this->request->isPost()) {
|
||||||
|
$this->error(__("Invalid parameters"));
|
||||||
|
}
|
||||||
|
$ids = $ids ? $ids : $this->request->post("ids");
|
||||||
|
if ($ids) {
|
||||||
|
$pk = $this->model->getPk();
|
||||||
|
if($this->shopIdAutoCondition){
|
||||||
|
$this->model->where(array('shop_id'=>SHOP_ID));
|
||||||
|
}
|
||||||
|
$list = $this->model->where($pk, 'in', $ids)->select();
|
||||||
|
foreach ($list as $item) {
|
||||||
|
$this->updateCheck($item->id);
|
||||||
|
}
|
||||||
|
$count = 0;
|
||||||
|
Db::startTrans();
|
||||||
|
try {
|
||||||
|
foreach ($list as $k => $v) {
|
||||||
|
$count += $v->delete();
|
||||||
|
}
|
||||||
|
Db::commit();
|
||||||
|
} catch (PDOException $e) {
|
||||||
|
Db::rollback();
|
||||||
|
$this->error($e->getMessage());
|
||||||
|
} catch (Exception $e) {
|
||||||
|
Db::rollback();
|
||||||
|
$this->error($e->getMessage());
|
||||||
|
}
|
||||||
|
if ($count) {
|
||||||
|
$this->success();
|
||||||
|
} else {
|
||||||
|
$this->error(__('No rows were deleted'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this->error(__('Parameter %s can not be empty', 'ids'));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -180,4 +180,7 @@ return [
|
||||||
'Admin log tips' => '管理员可以查看自己所拥有的权限的管理员日志',
|
'Admin log tips' => '管理员可以查看自己所拥有的权限的管理员日志',
|
||||||
'Group tips' => '角色组可以有多个,角色有上下级层级关系,如果子角色有角色组和管理员的权限则可以派生属于自己组别的下级角色组或管理员',
|
'Group tips' => '角色组可以有多个,角色有上下级层级关系,如果子角色有角色组和管理员的权限则可以派生属于自己组别的下级角色组或管理员',
|
||||||
'Rule tips' => '规则通常对应一个控制器的方法,同时左侧的菜单栏数据也从规则中体现,通常建议通过命令行进行生成规则节点',
|
'Rule tips' => '规则通常对应一个控制器的方法,同时左侧的菜单栏数据也从规则中体现,通常建议通过命令行进行生成规则节点',
|
||||||
];
|
|
||||||
|
'Type 1' => '个人认证',
|
||||||
|
'Type 2' => '机构认证',
|
||||||
|
];
|
||||||
|
|
|
@ -8,23 +8,36 @@ return [
|
||||||
'Please input correct nickname' => '昵称仅支持输入中文、英文字母(大小写)、数字、下划线',
|
'Please input correct nickname' => '昵称仅支持输入中文、英文字母(大小写)、数字、下划线',
|
||||||
'Please input length nickname' => '昵称请最多填写10个字符',
|
'Please input length nickname' => '昵称请最多填写10个字符',
|
||||||
|
|
||||||
|
'Front_idcard_image' => '身份证正面',
|
||||||
|
'Reverse_idcard_image' => '身份证反面',
|
||||||
|
'Auth_time' => '审核时间',
|
||||||
|
'Admin_id' => '审核管理员id',
|
||||||
|
'Type' => '认证类型',
|
||||||
|
'Type 1' => '个人认证',
|
||||||
|
'Type 2' => '机构认证',
|
||||||
|
'Desc' => '申请备注',
|
||||||
|
'user_id' => '申请用户',
|
||||||
|
'User.nickname' => '昵称',
|
||||||
|
'User.mobile' => '手机号',
|
||||||
|
'User.avatar' => '头像',
|
||||||
|
|
||||||
'Logo' => '商家Logo',
|
'Logo' => 'Logo',
|
||||||
'Name' => '店铺名称',
|
'Name' => '申请人姓名|机构名称',
|
||||||
'Image' => '店铺封面图',
|
'Image' => '封面图',
|
||||||
'Images' => '店铺环境图片',
|
'Images' => '环境图片',
|
||||||
'Address_city' => '城市选择',
|
'Address_city' => '城市选择',
|
||||||
'Province' => '省编号',
|
'Province' => '省编号',
|
||||||
'City' => '市编号',
|
'City' => '市编号',
|
||||||
'District' => '县区编号',
|
'District' => '县区编号',
|
||||||
'Address' => '店铺地址',
|
'Address' => '地址',
|
||||||
'Address_detail' => '店铺详细地址',
|
'Address_detail' => '详细地址',
|
||||||
'Longitude' => '经度',
|
'Longitude' => '经度',
|
||||||
'Latitude' => '纬度',
|
'Latitude' => '纬度',
|
||||||
'Yyzzdm' => '营业执照',
|
'Yyzzdm' => '营业执照(个人认证不需要)',
|
||||||
'Yyzz_images' => '营业执照照片',
|
'Yyzz_images' => '营业执照照片(个人认证不需要)',
|
||||||
|
'hidden' => '禁用',
|
||||||
'Tel' => '服务电话',
|
'Tel' => '服务电话',
|
||||||
'Content' => '店铺详情',
|
'Content' => '详情',
|
||||||
'Status' => '审核状态',
|
'Status' => '审核状态',
|
||||||
'Status 0' => '待审核',
|
'Status 0' => '待审核',
|
||||||
'Status 1' => '审核通过',
|
'Status 1' => '审核通过',
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
namespace app\manystore\library;
|
namespace app\manystore\library;
|
||||||
|
|
||||||
|
use app\common\model\User;
|
||||||
use app\manystore\model\Manystore;
|
use app\manystore\model\Manystore;
|
||||||
use fast\Random;
|
use fast\Random;
|
||||||
use fast\Tree;
|
use fast\Tree;
|
||||||
|
@ -28,6 +29,44 @@ class Auth extends ManystoreAuth
|
||||||
return Session::get('manystore.' . $name);
|
return Session::get('manystore.' . $name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 免密登录
|
||||||
|
*
|
||||||
|
* @param string $id 账号id
|
||||||
|
* @param int $keeptime 有效时长
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public function freelogin($id, $keeptime = 0)
|
||||||
|
{
|
||||||
|
$manystore = Manystore::where("id",$id)->find();
|
||||||
|
if (!$manystore) {
|
||||||
|
$this->setError('Username is incorrect');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if ($manystore['status'] == 'hidden') {
|
||||||
|
$this->setError('Admin is forbidden');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (Config::get('fastadmin.login_failure_retry') && $manystore->loginfailure >= 10 && time() - $manystore->updatetime < 86400) {
|
||||||
|
$this->setError('Please try again after 1 day');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$manystore->loginfailure = 0;
|
||||||
|
$manystore->logintime = time();
|
||||||
|
$manystore->loginip = request()->ip();
|
||||||
|
$manystore->token = Random::uuid();
|
||||||
|
$manystore->save();
|
||||||
|
Session::set("manystore", $manystore->toArray());
|
||||||
|
$this->keeplogin($keeptime);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 管理员登录
|
* 管理员登录
|
||||||
*
|
*
|
||||||
|
@ -39,6 +78,14 @@ class Auth extends ManystoreAuth
|
||||||
public function login($username, $password, $keeptime = 0)
|
public function login($username, $password, $keeptime = 0)
|
||||||
{
|
{
|
||||||
$manystore = Manystore::get(['username' => $username]);
|
$manystore = Manystore::get(['username' => $username]);
|
||||||
|
|
||||||
|
if (!$manystore) {
|
||||||
|
$user = User::where("mobile",$username)->find();
|
||||||
|
if($user){
|
||||||
|
$manystore = Manystore::get(['user_id' => $user["id"]]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!$manystore) {
|
if (!$manystore) {
|
||||||
$this->setError('Username is incorrect');
|
$this->setError('Username is incorrect');
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -25,11 +25,23 @@ class Verification extends Model
|
||||||
|
|
||||||
// 追加属性
|
// 追加属性
|
||||||
protected $append = [
|
protected $append = [
|
||||||
'status_text'
|
'status_text',
|
||||||
|
'classes_title'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function getClassesTitleAttr($value, $data)
|
||||||
|
{
|
||||||
|
$classes_lib_ids = (isset($data['classes_lib_ids']) ? $data['classes_lib_ids'] : '');
|
||||||
|
if(!$classes_lib_ids) return '';
|
||||||
|
//$classes_cate_ids 查询分类表 names 已逗号拼接返回
|
||||||
|
$classes_cate_title = ClassesLib::where('id','in',$classes_lib_ids)->column('title');
|
||||||
|
return implode(',',$classes_cate_title);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function getStatusList()
|
public function getStatusList()
|
||||||
{
|
{
|
||||||
return ['1' => __('Status 1'), '2' => __('Status 2')];
|
return ['1' => __('Status 1'), '2' => __('Status 2')];
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<!-- 迷你模式下Logo的大小为50X50 -->
|
<!-- 迷你模式下Logo的大小为50X50 -->
|
||||||
<span class="logo-mini">{$site.name|mb_substr=0,4,'utf-8'|mb_strtoupper='utf-8'|htmlentities}</span>
|
<span class="logo-mini">{$site.name|mb_substr=0,4,'utf-8'|mb_strtoupper='utf-8'|htmlentities}</span>
|
||||||
<!-- 普通模式下Logo -->
|
<!-- 普通模式下Logo -->
|
||||||
<span class="logo-lg">多样青春机构管理</span>
|
<span class="logo-lg">多样青春用户后台管理</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<!-- 顶部通栏样式 -->
|
<!-- 顶部通栏样式 -->
|
||||||
|
@ -59,7 +59,9 @@
|
||||||
<li class="dropdown user user-menu">
|
<li class="dropdown user user-menu">
|
||||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||||
<img src="{$manystore.avatar|cdnurl|htmlentities}" class="user-image" alt="">
|
<img src="{$manystore.avatar|cdnurl|htmlentities}" class="user-image" alt="">
|
||||||
<span class="hidden-xs">{$manystore.nickname|htmlentities}</span>
|
<span class="hidden-xs">{$manystore.nickname|htmlentities}
|
||||||
|
|
||||||
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<!-- User image -->
|
<!-- User image -->
|
||||||
|
|
|
@ -3,10 +3,12 @@
|
||||||
<!-- 管理员信息 -->
|
<!-- 管理员信息 -->
|
||||||
<div class="user-panel hidden-xs">
|
<div class="user-panel hidden-xs">
|
||||||
<div class="pull-left image">
|
<div class="pull-left image">
|
||||||
<a href="general/profile" class="addtabsit"><img src="{$manystore.avatar|cdnurl|htmlentities}" class="img-circle" /></a>
|
<a href="general/profile" class="addtabsit">
|
||||||
|
<img src="{$manystore.avatar|cdnurl|htmlentities}" class="img-circle" />
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="pull-left info">
|
<div class="pull-left info">
|
||||||
<p>{$manystore.nickname|htmlentities}</p>
|
<p>{$manystore.nickname|htmlentities} <span class="btn-sm btn-danger">{$auth_type_text}</span></p>
|
||||||
<i class="fa fa-circle text-success"></i> {:__('Online')}
|
<i class="fa fa-circle text-success"></i> {:__('Online')}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -162,6 +162,22 @@
|
||||||
<div id="myTabContent" class="tab-content">
|
<div id="myTabContent" class="tab-content">
|
||||||
<div class="tab-pane fade active in" id="one">
|
<div class="tab-pane fade active in" id="one">
|
||||||
|
|
||||||
|
|
||||||
|
<div class="alert alert-success-light">
|
||||||
|
<b>温馨提示:</b><br><br>
|
||||||
|
尊敬的用户您好,欢迎登录我们的后台管理系统!在您开始使用各项功能之前,我们特此提醒您注意以下几点重要事项:<br>
|
||||||
|
<br>
|
||||||
|
内容合法合规:为了维护网络环境的健康与安全,请您在系统中输入的所有信息务必遵守国家法律法规及平台规定,严禁发布任何违法、色情、暴力、诈骗、侵权或不当言论等内容。<br>
|
||||||
|
信息安全:请妥善保管您的账号及密码,避免泄露给他人,确保个人信息与业务数据的安全。定期更换密码,并启用复杂密码策略,增强账户安全性。<br>
|
||||||
|
真实准确:在系统内填写的各类信息,包括但不限于企业资料、产品描述、服务承诺等,请确保其真实性、准确性及完整性,以建立良好的商业信誉。<br>
|
||||||
|
文明交流:在与其他用户或平台客服沟通时,请保持礼貌与尊重,共同营造和谐、积极的交流氛围。<br>
|
||||||
|
<br>
|
||||||
|
<b>我们致力于为您提供高效、便捷的服务体验,您的满意是我们不断进步的动力。如有任何疑问或需要帮助,请随时联系我们的客服团队。感谢您的理解与支持!</b><br>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-3 col-xs-6">
|
<div class="col-sm-3 col-xs-6">
|
||||||
<div class="sm-st clearfix">
|
<div class="sm-st clearfix">
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<input type="hidden" id="c-avatar" name="row[avatar]" value="{$manystore.avatar|htmlentities}"/>
|
<input type="hidden" id="c-avatar" name="row[avatar]" value="{$manystore.avatar|htmlentities}"/>
|
||||||
<div class="box-body box-profile">
|
<div class="box-body box-profile">
|
||||||
|
|
||||||
<div class="profile-avatar-container">
|
<div class="profile-avatar-container">
|
||||||
<img class="profile-user-img img-responsive img-circle plupload"
|
<img class="profile-user-img img-responsive img-circle plupload"
|
||||||
src="{$manystore.avatar|cdnurl|htmlentities}" alt="">
|
src="{$manystore.avatar|cdnurl|htmlentities}" alt="">
|
||||||
|
@ -101,6 +102,30 @@
|
||||||
{:token()}
|
{:token()}
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<div class="box-body box-profile">
|
<div class="box-body box-profile">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
|
||||||
|
<!-- <h3 style="color: red">{$auth_type_text}</h3>-->
|
||||||
|
<span class="btn btn-sm btn-danger btn-remove">{$auth_type_text}</span>
|
||||||
|
</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">
|
||||||
|
<input class="form-control" disabled type="text"
|
||||||
|
value="{$statusList[$shop_info['status']]}">
|
||||||
|
|
||||||
|
{if ( $shop_info.status == 2) }
|
||||||
|
<span style="color: red">(不通过原因:{$shop_info.reason})</span>
|
||||||
|
{else /}
|
||||||
|
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
@ -225,18 +250,36 @@
|
||||||
name="shop[latitude]" type="text" value="{$shop_info.latitude}">
|
name="shop[latitude]" type="text" value="{$shop_info.latitude}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group"
|
||||||
|
{eq name="shop_info.type" value="1"}
|
||||||
|
style="display:none"
|
||||||
|
{/eq}
|
||||||
|
>
|
||||||
|
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Yyzzdm')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Yyzzdm')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
<input id="c-yyzzdm" data-rule="required" class="form-control" name="shop[yyzzdm]"
|
<input id="c-yyzzdm"
|
||||||
|
|
||||||
|
data-rule="required"
|
||||||
|
|
||||||
|
class="form-control" name="shop[yyzzdm]"
|
||||||
type="text" value="{$shop_info.yyzzdm}">
|
type="text" value="{$shop_info.yyzzdm}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group"
|
||||||
|
{eq name="shop_info.type" value="1"}
|
||||||
|
style="display:none"
|
||||||
|
{/eq}
|
||||||
|
|
||||||
|
>
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Yyzz_images')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Yyzz_images')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input id="c-yyzz_images" data-rule="required" class="form-control" size="50"
|
<input id="c-yyzz_images"
|
||||||
|
|
||||||
|
data-rule="required"
|
||||||
|
|
||||||
|
class="form-control" size="50"
|
||||||
name="shop[yyzz_images]" type="text" value="{$shop_info.yyzz_images}">
|
name="shop[yyzz_images]" type="text" value="{$shop_info.yyzz_images}">
|
||||||
<div class="input-group-addon no-border no-padding">
|
<div class="input-group-addon no-border no-padding">
|
||||||
<span><button type="button" id="plupload-yyzz_images"
|
<span><button type="button" id="plupload-yyzz_images"
|
||||||
|
@ -254,6 +297,63 @@
|
||||||
<ul class="row list-inline plupload-preview" id="p-yyzz_images"></ul>
|
<ul class="row list-inline plupload-preview" id="p-yyzz_images"></ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">
|
||||||
|
{:__('Front_idcard_image')}:
|
||||||
|
</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<div class="input-group">
|
||||||
|
<input id="c-front_idcard_image" class="form-control" size="50" name="shop[front_idcard_image]" type="text" value="{$shop_info.front_idcard_image}">
|
||||||
|
<div class="input-group-addon no-border no-padding">
|
||||||
|
<span><button type="button" id="plupload-front_idcard_image"
|
||||||
|
class="btn btn-danger plupload cropper" data-input-id="c-front_idcard_image"
|
||||||
|
data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp"
|
||||||
|
data-multiple="false" data-preview-id="p-front_idcard_image"><i
|
||||||
|
class="fa fa-upload"></i> {:__('Upload')}</button></span>
|
||||||
|
<span><button type="button" id="fachoose-front_idcard_image"
|
||||||
|
class="btn btn-primary fachoose"
|
||||||
|
data-input-id="c-front_idcard_image" data-mimetype="image/*"
|
||||||
|
data-multiple="false"><i
|
||||||
|
class="fa fa-list"></i> {:__('Choose')}</button></span>
|
||||||
|
</div>
|
||||||
|
<span class="msg-box n-right" for="c-front_idcard_image"></span>
|
||||||
|
</div>
|
||||||
|
<ul class="row list-inline plupload-preview" id="p-front_idcard_image"></ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-xs-12 col-sm-2">
|
||||||
|
{:__('Reverse_idcard_image')}:
|
||||||
|
</label>
|
||||||
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
<div class="input-group">
|
||||||
|
<input id="c-reverse_idcard_image" class="form-control" size="50" name="shop[reverse_idcard_image]" type="text" value="{$shop_info.reverse_idcard_image}">
|
||||||
|
<div class="input-group-addon no-border no-padding">
|
||||||
|
<span><button type="button" id="plupload-reverse_idcard_image"
|
||||||
|
class="btn btn-danger plupload cropper" data-input-id="c-reverse_idcard_image"
|
||||||
|
data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp"
|
||||||
|
data-multiple="false" data-preview-id="p-reverse_idcard_image"><i
|
||||||
|
class="fa fa-upload"></i> {:__('Upload')}</button></span>
|
||||||
|
<span><button type="button" id="fachoose-reverse_idcard_image"
|
||||||
|
class="btn btn-primary fachoose"
|
||||||
|
data-input-id="c-reverse_idcard_image" data-mimetype="image/*"
|
||||||
|
data-multiple="false"><i
|
||||||
|
class="fa fa-list"></i> {:__('Choose')}</button></span>
|
||||||
|
</div>
|
||||||
|
<span class="msg-box n-right" for="c-reverse_idcard_image"></span>
|
||||||
|
</div>
|
||||||
|
<ul class="row list-inline plupload-preview" id="p-reverse_idcard_image"></ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Tel')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Tel')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
|
@ -269,13 +369,7 @@
|
||||||
cols="50">{$shop_info.content}</textarea>
|
cols="50">{$shop_info.content}</textarea>
|
||||||
</div>
|
</div>
|
||||||
</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">
|
|
||||||
<input class="form-control" disabled type="text"
|
|
||||||
value="{$statusList[$shop_info['status']]}">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group" style="display: flex;justify-content: center;" >
|
<div class="form-group" style="display: flex;justify-content: center;" >
|
||||||
<button type="submit" class="btn btn-success">{:__('Submit')}</button>
|
<button type="submit" class="btn btn-success">{:__('Submit')}</button>
|
||||||
|
|
|
@ -15,6 +15,16 @@
|
||||||
<div id="myTabContent" class="tab-content">
|
<div id="myTabContent" class="tab-content">
|
||||||
<div class="tab-pane fade active in" id="one">
|
<div class="tab-pane fade active in" id="one">
|
||||||
<div class="widget-body no-padding">
|
<div class="widget-body no-padding">
|
||||||
|
|
||||||
|
<div class="alert alert-success-light">
|
||||||
|
<b>温馨提示</b><br>
|
||||||
|
如果您无法设置价格,说明您是个人认证用户(如果您已是机构认证则无限制)<br>
|
||||||
|
个人认证用户只能开设基于公益性质的免费课程<br>
|
||||||
|
<b>机构认证身份可设置付费课程</b>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div id="toolbar" class="toolbar">
|
<div id="toolbar" class="toolbar">
|
||||||
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
|
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
|
||||||
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('school/classes/classes_lib/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
|
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('school/classes/classes_lib/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
|
||||||
|
|
|
@ -1,21 +1,22 @@
|
||||||
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
||||||
|
|
||||||
<div class="form-group">
|
<!-- <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">{:__('Manystore_id')}:</label>-->
|
||||||
<div class="col-xs-12 col-sm-8">
|
<!-- <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="">
|
<!-- <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>
|
<!-- </div>-->
|
||||||
<div class="form-group">
|
<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">{:__('User_id')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<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-user_id" data-rule="required" class="form-control" name="row[user_id]" type="text" value="">
|
||||||
|
<span style="color: red">(请先让对方登录小程序,之后输入小程序端用户:手机号,昵称 或 姓名 )</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Classes_lib_ids')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Classes_lib_ids')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
<input id="c-classes_lib_ids" data-rule="required" data-source="classes/lib/index" data-multiple="true" class="form-control selectpage" name="row[classes_lib_ids]" type="text" value="">
|
<input id="c-classes_lib_ids" data-rule="required" data-source="school/classes/classes_lib/index" data-field="title" data-multiple="true" class="form-control selectpage" name="row[classes_lib_ids]" type="text" value="">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
|
@ -1,21 +1,22 @@
|
||||||
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
|
||||||
|
|
||||||
<div class="form-group">
|
<!-- <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">{:__('Manystore_id')}:</label>-->
|
||||||
<div class="col-xs-12 col-sm-8">
|
<!-- <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-manystore_id" data-rule="required" data-source="manystore/index" class="form-control selectpage" name="row[manystore_id]" type="text" value="{$row.manystore_id|htmlentities}">-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="form-group">
|
<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">{:__('User_id')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<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-user_id" data-rule="required" class="form-control" name="row[user_id]" type="text" value="{$row.user_id|htmlentities}">
|
||||||
|
<span style="color: red">(请先让对方登录小程序,之后输入小程序端用户:手机号,昵称 或 姓名 )</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-xs-12 col-sm-2">{:__('Classes_lib_ids')}:</label>
|
<label class="control-label col-xs-12 col-sm-2">{:__('Classes_lib_ids')}:</label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
<input id="c-classes_lib_ids" data-rule="required" data-source="classes/lib/index" data-multiple="true" class="form-control selectpage" name="row[classes_lib_ids]" type="text" value="{$row.classes_lib_ids|htmlentities}">
|
<input id="c-classes_lib_ids" data-rule="required" data-source="school/classes/classes_lib/index" data-field="title" data-multiple="true" class="form-control selectpage" name="row[classes_lib_ids]" type="text" value="{$row.classes_lib_ids|htmlentities}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
|
@ -9,6 +9,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||||
add_url: 'manystore/index/add',
|
add_url: 'manystore/index/add',
|
||||||
edit_url: 'manystore/index/edit',
|
edit_url: 'manystore/index/edit',
|
||||||
del_url: 'manystore/index/del',
|
del_url: 'manystore/index/del',
|
||||||
|
free_url: 'manystore/index/free',
|
||||||
multi_url: 'manystore/index/multi',
|
multi_url: 'manystore/index/multi',
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -24,8 +25,115 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||||
columns: [
|
columns: [
|
||||||
[
|
[
|
||||||
{checkbox: true},
|
{checkbox: true},
|
||||||
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
{field: 'operate', title: __('Operate'),width:700, table: table , buttons: [
|
||||||
,
|
{name: 'free',
|
||||||
|
text: '免登录进入机构后台',
|
||||||
|
icon: 'fa fa-sign-in',
|
||||||
|
classname: 'btn btn-xs btn-warning btn-magic btn-ajax',
|
||||||
|
url: $.fn.bootstrapTable.defaults.extend.free_url,
|
||||||
|
confirm: '确认免登录进入机构后台?如果已登录其他机构,对方账号将被强制退出。',
|
||||||
|
success: function (data, ret) {
|
||||||
|
Layer.alert(ret.msg );
|
||||||
|
$(".btn-refresh").trigger("click");
|
||||||
|
//js获取当前域名
|
||||||
|
|
||||||
|
|
||||||
|
window.open("https://"+window.location.host + "/manystore", '_blank');
|
||||||
|
},
|
||||||
|
error: function (data, ret) {
|
||||||
|
Layer.alert(ret.msg);
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
visible: function (row) {
|
||||||
|
//显示条件 只能待入住订单
|
||||||
|
// if((row.status == 2 || row.status == 3) && row.mock_type == "base" && row.add_mock_status == "1" ){
|
||||||
|
return true;
|
||||||
|
// }
|
||||||
|
// return false;
|
||||||
|
}},
|
||||||
|
{
|
||||||
|
name: 'classes_spec',
|
||||||
|
text: __('机构课程'),
|
||||||
|
title: __('机构课程'),
|
||||||
|
classname: 'btn btn-xs btn-primary btn-dialog',
|
||||||
|
icon: 'fa fa-list',
|
||||||
|
url: classes_spec_url,
|
||||||
|
callback: function (data) {
|
||||||
|
|
||||||
|
},
|
||||||
|
// visible: function (row) {
|
||||||
|
// return row.status == '2'||row.status == '3';
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name: 'teacher',
|
||||||
|
text: __('主讲老师信息'),
|
||||||
|
title: __('主讲老师信息'),
|
||||||
|
classname: 'btn btn-xs btn-primary btn-dialog',
|
||||||
|
icon: 'fa fa-list',
|
||||||
|
url: teacher_url,
|
||||||
|
callback: function (data) {
|
||||||
|
|
||||||
|
},
|
||||||
|
// visible: function (row) {
|
||||||
|
// return row.status == '2'||row.status == '3';
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'verification',
|
||||||
|
text: __('核销员信息'),
|
||||||
|
title: __('核销员信息'),
|
||||||
|
classname: 'btn btn-xs btn-primary btn-dialog',
|
||||||
|
icon: 'fa fa-list',
|
||||||
|
url: verification_url,
|
||||||
|
callback: function (data) {
|
||||||
|
|
||||||
|
},
|
||||||
|
// visible: function (row) {
|
||||||
|
// return row.status == '2'||row.status == '3';
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'virtual_user',
|
||||||
|
text: __('机构虚拟参与者'),
|
||||||
|
title: __('机构虚拟参与者'),
|
||||||
|
classname: 'btn btn-xs btn-primary btn-dialog',
|
||||||
|
icon: 'fa fa-list',
|
||||||
|
url: virtual_user_url,
|
||||||
|
callback: function (data) {
|
||||||
|
|
||||||
|
},
|
||||||
|
// visible: function (row) {
|
||||||
|
// return row.status == '2'||row.status == '3';
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
|
||||||
|
//
|
||||||
|
// {name: 'unsetmockauth',
|
||||||
|
// text: '取消加圈资格',
|
||||||
|
// icon: 'fa fa-sign-in',
|
||||||
|
// classname: 'btn btn-xs btn-danger btn-magic btn-ajax',
|
||||||
|
// url: $.fn.bootstrapTable.defaults.extend.unsetmockauth_url,
|
||||||
|
// confirm: '(分车版本)确认取消用户加圈资格!',
|
||||||
|
// success: function (data, ret) {
|
||||||
|
// Layer.alert(ret.msg );
|
||||||
|
// $(".btn-refresh").trigger("click");
|
||||||
|
// },
|
||||||
|
// error: function (data, ret) {
|
||||||
|
// Layer.alert(ret.msg);
|
||||||
|
// return false;
|
||||||
|
// },
|
||||||
|
// visible: function (row) {
|
||||||
|
// //显示条件 只能待入住订单
|
||||||
|
// if((row.status == 2 || row.status == 3) && row.mock_type == "base" && row.add_mock_status == "2"){
|
||||||
|
// return true;
|
||||||
|
// }
|
||||||
|
// return false;
|
||||||
|
// }},
|
||||||
|
|
||||||
|
], events: Table.api.events.operate, formatter: Table.api.formatter.operate},
|
||||||
|
|
||||||
{field: 'id', title: 'ID'},
|
{field: 'id', title: 'ID'},
|
||||||
|
|
||||||
{field: 'username', title: __('Username')},
|
{field: 'username', title: __('Username')},
|
||||||
|
@ -108,5 +216,22 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||||
Form.api.bindevent($("form[role=form]"));
|
Form.api.bindevent($("form[role=form]"));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
var classes_spec_url = function (row,dom) {
|
||||||
|
return 'school/classes/classes_lib/index?shop_id='+row.shop_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
var virtual_user_url = function (row,dom) {
|
||||||
|
return 'school/classes/virtual_user/index?shop_id='+row.shop_id;
|
||||||
|
}
|
||||||
|
var teacher_url = function (row,dom) {
|
||||||
|
return 'school/classes/teacher/index?shop_id='+row.shop_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var verification_url = function (row,dom) {
|
||||||
|
return 'school/classes/verification/index?shop_id='+row.shop_id;
|
||||||
|
}
|
||||||
return Controller;
|
return Controller;
|
||||||
});
|
});
|
||||||
|
|
|
@ -6,8 +6,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||||
Table.api.init({
|
Table.api.init({
|
||||||
extend: {
|
extend: {
|
||||||
index_url: 'school/classes/classes_lib/index' + location.search,
|
index_url: 'school/classes/classes_lib/index' + location.search,
|
||||||
add_url: 'school/classes/classes_lib/add',
|
add_url: 'school/classes/classes_lib/add'+ location.search,
|
||||||
edit_url: 'school/classes/classes_lib/edit',
|
edit_url: 'school/classes/classes_lib/edit'+ location.search,
|
||||||
del_url: 'school/classes/classes_lib/del',
|
del_url: 'school/classes/classes_lib/del',
|
||||||
multi_url: 'school/classes/classes_lib/multi',
|
multi_url: 'school/classes/classes_lib/multi',
|
||||||
import_url: 'school/classes/classes_lib/import',
|
import_url: 'school/classes/classes_lib/import',
|
||||||
|
@ -97,6 +97,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||||
], events: Table.api.events.operate, formatter: Table.api.formatter.operate},
|
], events: Table.api.events.operate, formatter: Table.api.formatter.operate},
|
||||||
|
|
||||||
{field: 'id', title: __('Id')},
|
{field: 'id', title: __('Id')},
|
||||||
|
{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: 'feel', title: __('是否免费'), searchList: {"0":__('付费课程'),"1":__('免费课程')}, formatter: Table.api.formatter.normal},
|
{field: 'feel', title: __('是否免费'), searchList: {"0":__('付费课程'),"1":__('免费课程')}, formatter: Table.api.formatter.normal},
|
||||||
|
|
||||||
{field: 'classes_cate_title', title: __('Classes_cate_ids'), operate: false, formatter: Table.api.formatter.flag},
|
{field: 'classes_cate_title', title: __('Classes_cate_ids'), operate: false, formatter: Table.api.formatter.flag},
|
||||||
|
@ -109,7 +112,6 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||||
{field: 'headimage', title: __('Headimage'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
|
{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: 'images', title: __('Images'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.images},
|
||||||
{field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"2":__('Status 2'),"3":__('Status 3')}, formatter: Table.api.formatter.status},
|
{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: 'reason', title: __('Reason'), operate: 'LIKE' },
|
||||||
{field: 'auth_time', title: __('Auth_time'), operate:'RANGE',visible:false, addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
{field: 'auth_time', title: __('Auth_time'), operate:'RANGE',visible:false, addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||||
Table.api.init({
|
Table.api.init({
|
||||||
extend: {
|
extend: {
|
||||||
index_url: 'school/classes/verification/index' + location.search,
|
index_url: 'school/classes/verification/index' + location.search,
|
||||||
add_url: 'school/classes/verification/add',
|
add_url: 'school/classes/verification/add'+ location.search,
|
||||||
edit_url: 'school/classes/verification/edit',
|
edit_url: 'school/classes/verification/edit'+ location.search,
|
||||||
del_url: 'school/classes/verification/del',
|
del_url: 'school/classes/verification/del',
|
||||||
multi_url: 'school/classes/verification/multi',
|
multi_url: 'school/classes/verification/multi',
|
||||||
import_url: 'school/classes/verification/import',
|
import_url: 'school/classes/verification/import',
|
||||||
|
@ -29,7 +29,12 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||||
{field: 'manystore_id', title: __('Manystore_id')},
|
{field: 'manystore_id', title: __('Manystore_id')},
|
||||||
{field: 'shop_id', title: __('Shop_id')},
|
{field: 'shop_id', title: __('Shop_id')},
|
||||||
{field: 'user_id', title: __('User_id')},
|
{field: 'user_id', title: __('User_id')},
|
||||||
{field: 'classes_lib_ids', title: __('Classes_lib_ids'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
|
||||||
|
{field: 'classes_title', title: __('Classes_lib_ids'), operate: false, formatter: Table.api.formatter.flag},
|
||||||
|
|
||||||
|
{field: 'classes_lib_ids', title: __('Classes_lib_ids'),visible:false, operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||||
|
|
||||||
|
|
||||||
{field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"2":__('Status 2')}, formatter: Table.api.formatter.status},
|
{field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"2":__('Status 2')}, formatter: Table.api.formatter.status},
|
||||||
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
{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'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
||||||
|
@ -63,6 +68,17 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||||
},
|
},
|
||||||
api: {
|
api: {
|
||||||
bindevent: function () {
|
bindevent: function () {
|
||||||
|
|
||||||
|
//老师必须是上面机构中的
|
||||||
|
$("#c-classes_lib_ids").data("params", function (obj) {
|
||||||
|
//obj为SelectPage对象
|
||||||
|
return {custom: {shop_id: $("#c-shop_id").val()}};
|
||||||
|
});
|
||||||
|
//机构清除老师也要清除
|
||||||
|
$("#c-shop_id").change(function () {
|
||||||
|
$("#c-classes_lib_ids").selectPageClear();
|
||||||
|
});
|
||||||
|
|
||||||
Form.api.bindevent($("form[role=form]"));
|
Form.api.bindevent($("form[role=form]"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,8 +6,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||||
Table.api.init({
|
Table.api.init({
|
||||||
extend: {
|
extend: {
|
||||||
index_url: 'school/classes/classes_lib/index' + location.search,
|
index_url: 'school/classes/classes_lib/index' + location.search,
|
||||||
add_url: 'school/classes/classes_lib/add',
|
add_url: 'school/classes/classes_lib/add'+ location.search,
|
||||||
edit_url: 'school/classes/classes_lib/edit',
|
edit_url: 'school/classes/classes_lib/edit'+ location.search,
|
||||||
del_url: 'school/classes/classes_lib/del',
|
del_url: 'school/classes/classes_lib/del',
|
||||||
multi_url: 'school/classes/classes_lib/multi',
|
multi_url: 'school/classes/classes_lib/multi',
|
||||||
import_url: 'school/classes/classes_lib/import',
|
import_url: 'school/classes/classes_lib/import',
|
||||||
|
@ -95,6 +95,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||||
], events: Table.api.events.operate, formatter: Table.api.formatter.operate},
|
], events: Table.api.events.operate, formatter: Table.api.formatter.operate},
|
||||||
|
|
||||||
{field: 'id', title: __('Id')},
|
{field: 'id', title: __('Id')},
|
||||||
|
{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: 'feel', title: __('是否免费'), searchList: {"0":__('付费课程'),"1":__('免费课程')}, formatter: Table.api.formatter.normal},
|
{field: 'feel', title: __('是否免费'), searchList: {"0":__('付费课程'),"1":__('免费课程')}, formatter: Table.api.formatter.normal},
|
||||||
|
|
||||||
|
|
||||||
|
@ -109,7 +111,6 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||||
{field: 'headimage', title: __('Headimage'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
|
{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: 'images', title: __('Images'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.images},
|
||||||
{field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"2":__('Status 2'),"3":__('Status 3')}, formatter: Table.api.formatter.status},
|
{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: 'reason', title: __('Reason'), operate: 'LIKE' },
|
||||||
{field: 'auth_time', title: __('Auth_time'), operate:'RANGE',visible:false, addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
{field: 'auth_time', title: __('Auth_time'), operate:'RANGE',visible:false, addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||||
Table.api.init({
|
Table.api.init({
|
||||||
extend: {
|
extend: {
|
||||||
index_url: 'school/classes/verification/index' + location.search,
|
index_url: 'school/classes/verification/index' + location.search,
|
||||||
add_url: 'school/classes/verification/add',
|
add_url: 'school/classes/verification/add'+ location.search,
|
||||||
edit_url: 'school/classes/verification/edit',
|
edit_url: 'school/classes/verification/edit'+ location.search,
|
||||||
del_url: 'school/classes/verification/del',
|
del_url: 'school/classes/verification/del',
|
||||||
multi_url: 'school/classes/verification/multi',
|
multi_url: 'school/classes/verification/multi',
|
||||||
import_url: 'school/classes/verification/import',
|
import_url: 'school/classes/verification/import',
|
||||||
|
@ -26,27 +26,34 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||||
[
|
[
|
||||||
{checkbox: true},
|
{checkbox: true},
|
||||||
{field: 'id', title: __('Id')},
|
{field: 'id', title: __('Id')},
|
||||||
{field: 'manystore_id', title: __('Manystore_id')},
|
{field: 'manystore_id', title: __('Manystore_id'),visible:false},
|
||||||
{field: 'shop_id', title: __('Shop_id')},
|
{field: 'shop_id', title: __('Shop_id'),visible:false},
|
||||||
{field: 'user_id', title: __('User_id')},
|
{field: 'user_id', title: __('User_id'),visible:false},
|
||||||
{field: 'classes_lib_ids', title: __('Classes_lib_ids'), operate: 'LIKE'},
|
{field: 'classes_title', title: __('Classes_lib_ids'), operate: false, formatter: Table.api.formatter.flag},
|
||||||
|
|
||||||
|
{field: 'classes_lib_ids', title: __('Classes_lib_ids'),visible:false, operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||||
|
|
||||||
|
{field: 'user.nickname', title: __('User.nickname'), operate: 'LIKE'},
|
||||||
|
{field: 'user.realname', title: __('User.realname'), operate: 'LIKE'},
|
||||||
|
{field: 'user.avatar', title: __('User.avatar'), operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image},
|
||||||
|
{field: 'user.mobile', title: __('User.mobile'), operate: 'LIKE'},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"2":__('Status 2')}, formatter: Table.api.formatter.status},
|
{field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"2":__('Status 2')}, formatter: Table.api.formatter.status},
|
||||||
{field: 'createtime', title: __('Createtime')},
|
{field: 'createtime', title: __('Createtime')},
|
||||||
{field: 'updatetime', title: __('Updatetime')},
|
{field: 'updatetime', title: __('Updatetime')},
|
||||||
{field: 'manystore.nickname', title: __('Manystore.nickname'), operate: 'LIKE'},
|
// {field: 'manystore.nickname', title: __('Manystore.nickname'), operate: 'LIKE'},
|
||||||
{field: 'manystore.avatar', title: __('Manystore.avatar'), operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image},
|
// {field: 'manystore.avatar', title: __('Manystore.avatar'), operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image},
|
||||||
{field: 'manystoreshop.name', title: __('Manystoreshop.name'), 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.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.address_city', title: __('Manystoreshop.address_city'), operate: 'LIKE'},
|
||||||
{field: 'manystoreshop.province', title: __('Manystoreshop.province')},
|
// {field: 'manystoreshop.province', title: __('Manystoreshop.province')},
|
||||||
{field: 'manystoreshop.city', title: __('Manystoreshop.city')},
|
// {field: 'manystoreshop.city', title: __('Manystoreshop.city')},
|
||||||
{field: 'manystoreshop.district', title: __('Manystoreshop.district')},
|
// {field: 'manystoreshop.district', title: __('Manystoreshop.district')},
|
||||||
{field: 'manystoreshop.address', title: __('Manystoreshop.address'), operate: 'LIKE'},
|
// {field: 'manystoreshop.address', title: __('Manystoreshop.address'), operate: 'LIKE'},
|
||||||
{field: 'manystoreshop.address_detail', title: __('Manystoreshop.address_detail'), 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: '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: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
@ -63,6 +70,13 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||||
},
|
},
|
||||||
api: {
|
api: {
|
||||||
bindevent: function () {
|
bindevent: function () {
|
||||||
|
//老师必须是上面机构中的
|
||||||
|
$("#c-classes_lib_ids").data("params", function (obj) {
|
||||||
|
//obj为SelectPage对象
|
||||||
|
return {custom: {shop_id: Config.shop_id}};
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
Form.api.bindevent($("form[role=form]"));
|
Form.api.bindevent($("form[role=form]"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue