马铁龙 6 år sedan
förälder
incheckning
0dcebc1c31
2 ändrade filer med 6 tillägg och 0 borttagningar
  1. 5 0
      application/admin/controller/Intention.php
  2. 1 0
      public/assets/js/backend/protector.js

+ 5 - 0
application/admin/controller/Intention.php

@@ -184,13 +184,16 @@ class Intention extends Backend
 
             //2.protector表 通过id 查找出数据
             $protector = \app\admin\model\Intention::get($id);
+
             //3.获取用户id
             $usr_id = Session::get('admin')['id'];
+
             //4.判断用户id和 protector的用户id是否一致 保存状态
             if ($usr_id != 1 && $protector['usr_id'] != $usr_id) {
                 $this->error('请操作自己的数据!');
             }
 
+
             //5.保护到期时间设置现在 冻结算一下
             $free_day = Session::get('admin')['free_day'];
             $param['ex_date'] = date('Y-m-d');
@@ -212,6 +215,8 @@ class Intention extends Backend
             $this->error($e->getMessage());
         }
     }
+
+
     public function follow($ids = NULL){
         $info = Db::table('follow')->where('type',1)->where('protect_id',$ids)->field('created_at','main')->select();
         if($_POST){

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

@@ -37,6 +37,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'selectpage', 'bootst
                         }},
                         {field: 'pro_date', title: __('Pro_date'), operate:'RANGE', addclass:'datetimerange'},
                         {field: 'ex_date', title: __('Ex_date'),searchable: false, operate:'RANGE', addclass:'datetimerange'},
+                        {field: 'again_date', title: '签单到期时间',searchable: false, visibile: status == 'contract' ? true : false},
                         {field: 'operate', title: __('Operate'),searchable: false,
                             table: table,
                             events: Controller.api.events.operate,