|
@@ -19,6 +19,7 @@ use app\common\lists\ListsSearchInterface;
|
|
|
use app\common\model\asset\AssetInfo;
|
|
use app\common\model\asset\AssetInfo;
|
|
|
use app\common\model\asset\AssetLeaseInfo;
|
|
use app\common\model\asset\AssetLeaseInfo;
|
|
|
use app\common\model\auth\Admin as adminModel ;
|
|
use app\common\model\auth\Admin as adminModel ;
|
|
|
|
|
+use app\common\model\auth\AdminJobs;
|
|
|
use app\common\service\FileService;
|
|
use app\common\service\FileService;
|
|
|
use think\Exception;
|
|
use think\Exception;
|
|
|
|
|
|
|
@@ -88,8 +89,37 @@ class AssetLeaseLists extends BaseAdminDataLists implements ListsSearchInterface
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if(!$admin_info['root']){
|
|
|
|
|
|
|
+ if(!$admin_info['root']) {
|
|
|
// $where[] = ['lease_start_time', '>=', $parms['start_time']];
|
|
// $where[] = ['lease_start_time', '>=', $parms['start_time']];
|
|
|
|
|
+ $jwhere = [];
|
|
|
|
|
+ $jwhere[] = ['admin_id', '=', $admin_info['admin_id']];
|
|
|
|
|
+ $jobs_list = AdminJobs::where($jwhere)->select()->toArray();
|
|
|
|
|
+ $all = false;
|
|
|
|
|
+ $first = false;
|
|
|
|
|
+ $second = false;
|
|
|
|
|
+ foreach ($jobs_list as $v) {
|
|
|
|
|
+ switch ($v['jobs_id']) {
|
|
|
|
|
+ case 1:
|
|
|
|
|
+ $all = true;
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 2:
|
|
|
|
|
+ $first = true;
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 3:
|
|
|
|
|
+ $second = true;
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!$all) {
|
|
|
|
|
+ if(!($first && $second)){
|
|
|
|
|
+ if($first){
|
|
|
|
|
+ $where[] = ['approval_status','in',[1,2]];
|
|
|
|
|
+ }
|
|
|
|
|
+ if($second){
|
|
|
|
|
+ $where[] = ['approval_status','in',[3,4,5]];
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
$lists = (new AssetLeaseInfo())->field('*')
|
|
$lists = (new AssetLeaseInfo())->field('*')
|
|
|
->append(['first_status_desc','second_status_desc','approval_status_desc'])
|
|
->append(['first_status_desc','second_status_desc','approval_status_desc'])
|