Przeglądaj źródła

Merge branch 'master' of git.pacsonline.cn:PACS/mark

# Conflicts:
#	public/assets/js/backend/protector.js
马铁龙 7 lat temu
rodzic
commit
37fd9909fe

+ 6 - 0
application/admin/controller/Protector.php

@@ -73,12 +73,14 @@ class Protector extends Backend
                 case 'overdue':                 //已过期
                     $total = $this->model
                         ->where('status',$this->status['OVERDUE'])
+                        ->whereOr('status',$this->status['GIVEUP'])
                         ->where($where_usr_id)
                         ->where($where)
                         ->order($sort, $order)
                         ->count();
                     $list = $this->model
                         ->where('status',$this->status['OVERDUE'])
+                        ->whereOr('status',$this->status['GIVEUP'])
                         ->where($where_usr_id)
                         ->where($where)
                         ->order($sort, $order)
@@ -155,6 +157,8 @@ class Protector extends Backend
                     $protect_count = Session::get('admin')['protect_count'];    //保护个数
                     $protect_day = Session::get('admin')['protect_day'];        //保护天数
                     $free_day = Session::get('admin')['free_day'];              // 冻结天数
+                    $params['pro_date'] = date('Y-m-d');    //保护时间
+
 
                     //  获取所属组名,id
                     $params['usr_depart'] = Session::get('admin')['usr_depart'];   //获取所属组名
@@ -316,10 +320,12 @@ class Protector extends Backend
             $free_day = Session::get('admin')['free_day'];              // 冻结天数
             $params['usr_id'] = $usr_id;                //usr id
             $params['usr_nickname'] = Session::get('admin')['nickname'];      //nickname
+            $params['pro_date'] = date('Y-m-d');    //保护时间
             $params['ex_date'] = date('Y-m-d',strtotime("+".$protect_day." day"));    //保护到期时间
             $params['free_date'] = date('Y-m-d',strtotime("{$params['ex_date']} "."+".$free_day." day"));    //保护到期时间
             $params['usr_depart'] = AuthGroupAccess::getGroupName($params['usr_id']);
             $params['id'] = $id;
+            $params['status'] = $this->status['PROTECTOR'];
 
             //5.入库
             $res = $this->model->allowField(true)->isUpdate(true)->save($params);

+ 6 - 0
application/admin/view/protector/add.html

@@ -54,6 +54,12 @@
             <input id="c-price" class="form-control" name="row[price]" type="number">
         </div>
     </div>
+    <div class="form-group">
+        <label class="control-label col-xs-12 col-sm-2">总价:</label>
+        <div class="col-xs-12 col-sm-8">
+            <input id="c-total" class="form-control" name="row[total]" type="number" disabled>
+        </div>
+    </div>
     <div class="form-group">
         <label class="control-label col-xs-12 col-sm-2">{:__('Remark')}:</label>
         <div class="col-xs-12 col-sm-8">

+ 9 - 0
application/config.php

@@ -11,6 +11,15 @@
 // +----------------------------------------------------------------------
 use think\Env;
 
+\think\Log::init(
+    [
+        'type'          =>  'File',
+        'path'          =>  APP_PATH.'logs/',
+        'apart_level'   =>  ['error','sql','info'],
+        'time_format'   =>'c',
+        'file_size'     => 1024 * 1024 * 10,
+    ]
+);
 return [
     // +----------------------------------------------------------------------
     // | 应用设置

+ 0 - 1
application/database.php

@@ -11,7 +11,6 @@
 // +----------------------------------------------------------------------
 
 use think\Env;
-
 return [
     // 数据库类型
     'type'            => Env::get('database.type', 'mysql'),