Browse Source

登录调整

zhangxiaobin 1 year ago
parent
commit
fb0104d0d4

+ 5 - 1
application/admin/controller/Question.php

@@ -22,7 +22,11 @@ class Question extends Backend
     {
         parent::_initialize();
         $this->model = new \app\admin\model\Question;
-
+        $listArr = [
+            'statusList' => $this->model->getStatusList(),
+        ];
+        $this->view->assign($listArr);
+        $this->assignconfig($listArr);
     }
 
 

+ 5 - 1
application/admin/controller/QuestionItem.php

@@ -22,7 +22,11 @@ class QuestionItem extends Backend
     {
         parent::_initialize();
         $this->model = new \app\admin\model\QuestionItem;
-
+        $listArr = [
+            'statusList' => $this->model->getStatusList(),
+        ];
+        $this->view->assign($listArr);
+        $this->assignconfig($listArr);
     }
 
 

+ 3 - 0
application/admin/lang/zh-cn/question.php

@@ -5,6 +5,9 @@ return [
     'Title'      => '标题',
     'Desc'       => '描述',
     'Weigh'      => '权重',
+    'Status'     => '状态',
+    'Status 0'   => '隐藏',
+    'Status 1'   => '显示',
     'Createtime' => '创建时间',
     'Updatetime' => '更新时间'
 ];

+ 3 - 0
application/admin/lang/zh-cn/question_item.php

@@ -6,6 +6,9 @@ return [
     'Title'       => '标题',
     'Content'     => '内容',
     'Weigh'       => '权重',
+    'Status'     => '状态',
+    'Status 0'   => '隐藏',
+    'Status 1'   => '显示',
     'Createtime'  => '创建时间',
     'Updatetime'  => '更新时间'
 ];

+ 16 - 8
application/admin/model/Question.php

@@ -25,9 +25,9 @@ class Question extends Model
 
     // 追加属性
     protected $append = [
-
+        'status_text'
     ];
-    
+
 
     protected static function init()
     {
@@ -37,12 +37,20 @@ class Question extends Model
         });
     }
 
-    
-
-
-
-
-
+    public function getStatusList()
+    {
+        return ['0' =>__('Status 0'), '1' =>__('Status 1')];
+    }
 
+    public function getStatusTextAttr($value, $data)
+    {
+        $value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
+        $list = $this->getStatusList();
+        return isset($list[$value]) ? $list[$value] : '';
+    }
 
+    public function questionItem()
+    {
+        return $this->hasMany('QuestionItem', 'id', 'question_id');
+    }
 }

+ 11 - 7
application/admin/model/QuestionItem.php

@@ -25,7 +25,7 @@ class QuestionItem extends Model
 
     // 追加属性
     protected $append = [
-
+        'status_text'
     ];
     
 
@@ -37,12 +37,16 @@ class QuestionItem extends Model
         });
     }
 
-    
-
-
-
-
-
+    public function getStatusList()
+    {
+        return ['0' =>__('Status 0'), '1' =>__('Status 1')];
+    }
 
+    public function getStatusTextAttr($value, $data)
+    {
+        $value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
+        $list = $this->getStatusList();
+        return isset($list[$value]) ? $list[$value] : '';
+    }
 
 }

+ 10 - 0
application/admin/view/question/add.html

@@ -18,6 +18,16 @@
             <input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="0">
         </div>
     </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <select id="c-status" data-rule="required" class="form-control selectpicker" name="row[status]">
+                {foreach name="statusList" item="vo"}
+                    <option value="{$key}" {in name="key" value="1"}selected{/in}>{$vo}</option>
+                {/foreach}
+            </select>
+        </div>
+    </div>
     <div class="form-group layer-footer">
         <label class="control-label col-xs-12 col-sm-2"></label>
         <div class="col-xs-12 col-sm-8">

+ 10 - 0
application/admin/view/question/edit.html

@@ -18,6 +18,16 @@
             <input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="{$row.weigh|htmlentities}">
         </div>
     </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <select id="c-status" data-rule="required" class="form-control selectpicker" name="row[status]">
+                {foreach name="statusList" item="vo"}
+                <option value="{$key}" {in name="key" value="$row.status"}selected{/in}>{$vo}</option>
+                {/foreach}
+            </select>
+        </div>
+    </div>
     <div class="form-group layer-footer">
         <label class="control-label col-xs-12 col-sm-2"></label>
         <div class="col-xs-12 col-sm-8">

+ 10 - 0
application/admin/view/question_item/add.html

@@ -24,6 +24,16 @@
             <input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="0">
         </div>
     </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <select id="c-status" data-rule="required" class="form-control selectpicker" name="row[status]">
+                {foreach name="statusList" item="vo"}
+                <option value="{$key}" {in name="key" value="1"}selected{/in}>{$vo}</option>
+                {/foreach}
+            </select>
+        </div>
+    </div>
     <div class="form-group layer-footer">
         <label class="control-label col-xs-12 col-sm-2"></label>
         <div class="col-xs-12 col-sm-8">

+ 10 - 0
application/admin/view/question_item/edit.html

@@ -24,6 +24,16 @@
             <input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="{$row.weigh|htmlentities}">
         </div>
     </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
+        <div class="col-xs-12 col-sm-8">
+            <select id="c-status" data-rule="required" class="form-control selectpicker" name="row[status]">
+                {foreach name="statusList" item="vo"}
+                <option value="{$key}" {in name="key" value="$row.status"}selected{/in}>{$vo}</option>
+                {/foreach}
+            </select>
+        </div>
+    </div>
     <div class="form-group layer-footer">
         <label class="control-label col-xs-12 col-sm-2"></label>
         <div class="col-xs-12 col-sm-8">

+ 65 - 0
application/api/controller/Companys.php

@@ -153,4 +153,69 @@ class Companys extends Api
             $this->error($e->getMessage());
         }
     }
+
+    /**
+     * 保存
+     * @return void
+     */
+    public function save()
+    {
+        try {
+            //验证参数
+            $id = $this->request->param('id',0);
+            $userId = $this->auth->id;
+            $scene = !empty($id) ? 'edit' : 'add';
+            $validate = validate('Companys');
+            if(!$validate->check($this->request->param(),[],$scene)){
+                throw new Exception($validate->getError());
+            }
+            if (!empty($id)) {
+                $where['user_id'] = $userId;
+                $where['id'] = $id;
+                $companyData = $this->model->where($where)->find();
+                if (empty($companyData)) {
+                    throw new Exception('未找到相关信息');
+                }
+            } else {
+                $where['user_id'] = $userId;
+                $companyData = $this->model->where($where)->find();
+                if (!empty($companyData)) {
+                    throw new Exception('您已申请过入驻');
+                }
+            }
+            $time = time();
+            $areaData = getProvince($this->request->param());
+            $fullAddress = $areaData['full_address'];
+            $data = [
+                'contacts' => $this->request->param('contacts', ''),
+                'mobile'  => $this->request->param('mobile', ''),
+                'province_id'  => $this->request->param('province_id', 0),
+                'city_id'  => $this->request->param('city_id', 0),
+                'area_id'  => $this->request->param('area_id', 0),
+                'province_name'  => $areaData['province_name'],
+                'city_name'  => $areaData['city_name'],
+                'area_name'  => $areaData['area_name'],
+                'address'  => $this->request->param('address', ''),
+                'full_address'  => $fullAddress,
+                'aptitude_images'  => $this->request->param('aptitude_images', ''),
+                'status' => 1,
+            ];
+            if (empty($id)) {
+                $data['user_id'] = $userId;
+                $data['createtime'] = $time;
+                $res = $this->model->insertGetId($data);
+            } else {
+                $data['updatetime'] = $time;
+                $where['id'] = $id;
+                $where['user_id'] = $userId;
+                $res = $this->model->where($where)->update($data);
+            }
+            if (!$res) {
+                throw new Exception('操作失败');
+            }
+            $this->success('操作成功');
+        } catch (Exception $e) {
+            $this->error($e->getMessage());
+        }
+    }
 }

+ 60 - 0
application/api/controller/Cooperation.php

@@ -0,0 +1,60 @@
+<?php
+
+namespace app\api\controller;
+
+use app\common\controller\Api;
+use think\Db;
+use think\Exception;
+
+class Cooperation extends Api
+{
+    protected $noNeedLogin = [];
+    protected $noNeedRight = '*';
+    protected $model = null;
+
+    public function _initialize()
+    {
+        parent::_initialize();
+        $this->model = Db::name('cooperation');
+    }
+
+    /**
+     * 保存
+     * @return void
+     */
+    public function save()
+    {
+        try {
+            //验证参数
+            $id = $this->request->param('id',0);
+            $userId = $this->auth->id;
+            $scene = !empty($id) ? 'edit' : 'add';
+            $validate = validate('Cooperation');
+            if(!$validate->check($this->request->param(),[],$scene)){
+                throw new Exception($validate->getError());
+            }
+            $time = time();
+            $data = [
+                'name' => $this->request->param('name', ''),
+                'mobile'  => $this->request->param('mobile', ''),
+                'servicetype_id'  => $this->request->param('servicetype_id', 0),
+            ];
+            if (empty($id)) {
+                $data['user_id'] = $userId;
+                $data['createtime'] = $time;
+                $res = $this->model->insertGetId($data);
+            } else {
+                $data['updatetime'] = $time;
+                $where['id'] = $id;
+                $where['user_id'] = $userId;
+                $res = $this->model->where($where)->update($data);
+            }
+            if (!$res) {
+                throw new Exception('操作失败');
+            }
+            $this->success('操作成功');
+        } catch (Exception $e) {
+            $this->error($e->getMessage());
+        }
+    }
+}

+ 78 - 0
application/api/controller/Question.php

@@ -0,0 +1,78 @@
+<?php
+
+namespace app\api\controller;
+
+use app\common\controller\Api;
+use think\Db;
+use think\Exception;
+
+class Question extends Api
+{
+    protected $noNeedLogin = [];
+    protected $noNeedRight = '*';
+    protected $model = null;
+
+    public function _initialize()
+    {
+        parent::_initialize();
+        $this->model = new \app\common\model\Question();
+    }
+
+    /**
+     * 列表
+     * @return void
+     */
+    public function getList()
+    {
+        try {
+            $field = 'id,title,desc';
+            $where['status'] = 1;
+            $result = $this->model->field($field)->with(['questionItem'=>function($query){
+                $query->field('id,title,content')->where(['status'=>1]);
+            }])->where($where)->select();
+            $rows = [];
+            if (!empty($result)) {
+                foreach ($result as $key => &$value) {
+                    $itemData = isset($value['question_item']) ? $value['question_item'] : '';
+                    $questionItem = [];
+                    foreach ($itemData as $itemKey => $itemVal) {
+                        $questionItem[] = [
+                            'id' => $itemVal['id'],
+                            'title' => $itemVal['title'],
+                            'content' => $itemVal['content'],
+                        ];
+                    }
+                    $rows[] = [
+                        'id' => $value['id'],
+                        'title' => $value['title'],
+                        'desc' => $value['desc'],
+                        'question_item' => $questionItem,
+                    ];
+                }
+            }
+            $this->success('获取成功',$rows);
+        } catch (Exception $e) {
+            $this->error($e->getMessage());
+        }
+    }
+
+    /**
+     * 详情
+     * @return void
+     */
+    public function getInfo()
+    {
+        try {
+            $id = $this->request->param('id',0);
+            $field = 'id,title,content';
+            $where['id'] = $id;
+            $result = model('QuestionItem')->field($field)->where($where)->find();
+
+            $this->success('获取成功',$result);
+        } catch (Exception $e) {
+            $this->error($e->getMessage());
+        }
+    }
+
+
+}

+ 10 - 12
application/api/controller/User.php

@@ -75,7 +75,8 @@ class User extends Api
     {
         $mobile = $this->request->post('mobile');
         $captcha = $this->request->post('captcha');
-        if (!$mobile || !$captcha) {
+        $openid = $this->request->post('openid');
+        if (!$mobile || !$captcha || !$openid) {
             $this->error(__('Invalid parameters'));
         }
         if (!Validate::regex($mobile, "^1\d{10}$")) {
@@ -579,7 +580,7 @@ class User extends Api
             $openid = input('openid', '', 'trim');
             $mobile = input('mobile','','trim');
             $nickName = input('nickname','');
-            $avatar = input('avatar','');
+            $avatar = input('avatar','/assets/img/avatar.png');
             $sex = input('gender',0);
             if (!$openid) {
                 throw new Exception('未获取到用户openid');
@@ -587,10 +588,10 @@ class User extends Api
             $user = UserM::where(['mini_openid'=>$openid])->find();
             if (!$user) {//未查到用户信息
                 //用户手机号注册
-                if (empty($mobile)) {
+                /*if (empty($mobile)) {
                     throw new Exception('未获取到手机号');
                 }
-                $user = UserM::where(['mobile'=>$mobile])->find();
+                $user = UserM::where(['mobile'=>$mobile])->find();*/
                 if (empty($user)) {//微信登录注册
                     $time = time();
                     $ip = request()->ip();
@@ -598,7 +599,7 @@ class User extends Api
                         'nickname' => $nickName,
                         'avatar'    => $avatar,
                         'gender'    => $sex,
-                        'mobile'    => $mobile,
+                        //'mobile'    => $mobile,
                         'joinip'    => $ip,
                         'jointime'  => $time,
                         'createtime'=> $time,
@@ -610,13 +611,7 @@ class User extends Api
                     }
                     $user = Userm::getById($userAdd);
                 }
-                if (empty($user->openid)) {//手机号绑定openid
-                    $user->mini_openid = $openid;
-                    $userRes = $user->save();
-                    if (!$userRes) {
-                        throw new Exception('绑定微信失败');
-                    }
-                }
+
             } else {
                 $userUpdate = [];
                 if (!empty($nickName) && empty($user->nick_name)) {
@@ -628,6 +623,9 @@ class User extends Api
                 if (!empty($sex) && $sex != $user->sex) {
                     $userUpdate['gender'] = $sex;
                 }
+                if (empty($user->mini_openid)) {//手机号绑定openid
+                    $userUpdate['mini_openid'] = $openid;
+                }
                 if (!empty($userUpdate)) {
                     $userUpRes = Db::name('user')->where(['id'=>$user->id])->update($userUpdate);
                     if (!$userUpRes) {

+ 21 - 0
application/common.php

@@ -3,6 +3,7 @@
 // 公共助手函数
 
 use Symfony\Component\VarExporter\VarExporter;
+use think\Db;
 use think\exception\HttpResponseException;
 use think\Response;
 
@@ -1030,4 +1031,24 @@ if(!function_exists('build_qrcode')) {
         }
         return $filename;
     }
+}
+
+if(!function_exists('getProvince')) {
+    /**
+     * 获取省市区名称
+     * @return bool|string
+     */
+    function getProvince($params=[]) {
+        $provinceId = isset($params['province_id']) ? $params['province_id'] : 0;
+        $cityId     = isset($params['city_id']) ? $params['city_id'] : 0;
+        $areaId     = isset($params['area_id']) ? $params['area_id'] : 0;
+        $address    = isset($params['address']) ? $params['address'] : '';
+        $areaWhere['id'] = ['in',[$provinceId,$cityId,$areaId]];
+        $areaData = Db::name('shopro_area')->where($areaWhere)->column('id,name');
+        $params['province_name'] = isset($areaData[$provinceId]) ? $areaData[$provinceId] : '';
+        $params['city_name']     = isset($areaData[$cityId]) ? $areaData[$cityId] : '';
+        $params['area_name']     = isset($areaData[$areaId]) ? $areaData[$areaId] : '';
+        $params['full_address']  = $params['province_name'].$params['city_name'].$params['area_name'].$address;
+        return $params;
+    }
 }

+ 1 - 1
application/common/library/Auth.php

@@ -410,7 +410,7 @@ class Auth
 
         //追加
         $userinfo['avatar'] = one_domain_image($userinfo['avatar']);
-        $userinfo['money'] = model('wallet')->getWallet($this->id,'money');
+        $userinfo['money'] = model('wallet')->getWallet($this->id,$this->company_id,'money');
 
         return $userinfo;
     }

+ 52 - 0
application/common/model/Cooperation.php

@@ -0,0 +1,52 @@
+<?php
+
+namespace app\common\model;
+
+use think\Model;
+
+
+class Cooperation extends Model
+{
+
+    
+
+    
+
+    // 表名
+    protected $name = 'cooperation';
+    
+    // 自动写入时间戳字段
+    protected $autoWriteTimestamp = 'integer';
+
+    // 定义时间戳字段名
+    protected $createTime = 'createtime';
+    protected $updateTime = 'updatetime';
+    protected $deleteTime = false;
+
+    // 追加属性
+    protected $append = [
+        //'cooperation_status_text',
+    ];
+
+    public function getCooperationStatusList()
+    {
+        return ['1' =>__('Cooperation_status 1'), '2' =>__('Cooperation_status 2')];
+    }
+
+    public function getCooperationStatusTextAttr($value, $data)
+    {
+        $value = $value ? $value : (isset($data['cooperation_status']) ? $data['cooperation_status'] : '');
+        $list = $this->getCooperationStatusList();
+        return isset($list[$value]) ? $list[$value] : '';
+    }
+    
+    public function user()
+    {
+        return $this->belongsTo('User', 'user_id', 'id',[],'LEFT')->setEagerlyType(0);
+    }
+
+    public function servicetype()
+    {
+        return $this->belongsTo('Servicetype', 'servicetype_id', 'id',[],'LEFT')->setEagerlyType(0);
+    }
+}

+ 4 - 1
application/common/model/PreOrder.php

@@ -82,5 +82,8 @@ class PreOrder extends Model
         return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
     }
 
-
+    public function user()
+    {
+        return $this->hasOne('User', 'id', 'user_id',[],'LEFT');
+    }
 }

+ 35 - 0
application/common/model/Question.php

@@ -0,0 +1,35 @@
+<?php
+
+namespace app\common\model;
+
+use think\Model;
+
+
+class Question extends Model
+{
+
+    
+
+    
+
+    // 表名
+    protected $name = 'question';
+    
+    // 自动写入时间戳字段
+    protected $autoWriteTimestamp = 'integer';
+
+    // 定义时间戳字段名
+    protected $createTime = 'createtime';
+    protected $updateTime = 'updatetime';
+    protected $deleteTime = false;
+
+    // 追加属性
+    protected $append = [
+
+    ];
+    
+    public function questionItem()
+    {
+        return $this->hasMany('QuestionItem', 'id', 'question_id');
+    }
+}

+ 31 - 0
application/common/model/QuestionItem.php

@@ -0,0 +1,31 @@
+<?php
+
+namespace app\common\model;
+
+use think\Model;
+
+
+class QuestionItem extends Model
+{
+
+    
+
+    
+
+    // 表名
+    protected $name = 'question_item';
+    
+    // 自动写入时间戳字段
+    protected $autoWriteTimestamp = 'integer';
+
+    // 定义时间戳字段名
+    protected $createTime = 'createtime';
+    protected $updateTime = 'updatetime';
+    protected $deleteTime = false;
+
+    // 追加属性
+    protected $append = [
+
+    ];
+
+}

+ 2 - 0
application/common/model/Wallet.php

@@ -7,6 +7,8 @@ use think\Db;
  */
 class Wallet extends Model
 {
+    // 当前模型名称
+    protected $name = 'user_wallet';
     /**
      * 获取交易类型配置
      * @return mixed

+ 45 - 0
application/common/validate/Companys.php

@@ -0,0 +1,45 @@
+<?php
+
+namespace app\common\validate;
+use think\Validate;
+
+class Companys extends Validate
+{
+    // 验证规则
+    protected $rule = [
+        'id' => 'require|number',
+        'contacts' => 'require|max:32',
+        'mobile' => 'require|max:16',
+        'province_id' => 'require|number',
+        'city_id' => 'require|number',
+        'area_id' => 'require|number',
+        'address' => 'require|max:255',
+        'aptitude_images' => 'require|max:256',
+    ];
+
+    // 验证提示
+    protected $message = [
+        'id.require' => '请输入门店ID',
+        'id.number' => '您输入的门店ID,必须是数字类型',
+        'contacts.require' => '请输入联系人',
+        'contacts.max' => '您输入的联系人,必须小于32字符',
+        'mobile.require' => '请输入联系电话',
+        'mobile.max' => '您输入的联系电话,必须小于16字符',
+        'province_id.require' => '请输入省',
+        'province_id.number' => '您输入的省,必须是数字类型',
+        'city_id.require' => '请输入市',
+        'city_id.number' => '您输入的市,必须是数字类型',
+        'area_id.require' => '请输入区县',
+        'area_id.number' => '您输入的区县,必须是数字类型',
+        'address.require' => '请输入联系地址',
+        'address.max' => '您输入的联系地址,必须小于255字符',
+        'aptitude_images.require' => '请输入资质',
+        'aptitude_images.max' => '您输入的资质,必须小于256字符',
+    ];
+
+    // 应用场景
+    protected $scene = [
+        'add' => ['contacts','mobile','province_id','city_id','area_id','address','aptitude_images'],
+        'edit' => ['id','contacts','mobile','province_id','city_id','area_id','address','aptitude_images'],
+    ];
+}

+ 33 - 0
application/common/validate/Cooperation.php

@@ -0,0 +1,33 @@
+<?php
+
+namespace app\common\validate;
+use think\Validate;
+
+class Cooperation extends Validate
+{
+    // 验证规则
+    protected $rule = [
+        'id' => 'require|number',
+        'name' => 'require|max:32',
+        'mobile' => 'require|max:16',
+        'servicetype_id' => 'require|number',
+    ];
+
+    // 验证提示
+    protected $message = [
+        'id.require' => '请输入商务合作ID',
+        'id.number' => '您输入的商务合作ID,必须是数字类型',
+        'name.require' => '请输入联系人',
+        'name.max' => '您输入的联系人,必须小于32字符',
+        'mobile.require' => '请输入联系电话',
+        'mobile.max' => '您输入的联系电话,必须小于16字符',
+        'servicetype_id.require' => '请输入合作内容',
+        'servicetype_id.number' => '您输入的合作内容,必须是数字类型',
+    ];
+
+    // 应用场景
+    protected $scene = [
+        'add' => ['name','mobile','servicetype_id'],
+        'edit' => ['id','name','mobile','servicetype_id'],
+    ];
+}

+ 1 - 0
public/assets/js/backend/question.js

@@ -29,6 +29,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                         {field: 'title', title: __('Title'), operate: 'LIKE'},
                         {field: 'desc', title: __('Desc'), operate: 'LIKE'},
                         {field: 'weigh', title: __('Weigh'), operate: false},
+                        {field: 'status', title: __('Status'), searchList: Config.statusList, formatter: Table.api.formatter.status},
                         {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: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}

+ 1 - 0
public/assets/js/backend/question_item.js

@@ -29,6 +29,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                         {field: 'question_id', title: __('Question_id')},
                         {field: 'title', title: __('Title'), operate: 'LIKE'},
                         {field: 'weigh', title: __('Weigh'), operate: false},
+                        {field: 'status', title: __('Status'), searchList: Config.statusList, formatter: Table.api.formatter.status},
                         {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: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}