From ffee256f93ce1f04dff1cbea1e886bab9fc32577 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 18 Jun 2020 18:16:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96bug1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompanyStatementController.class.php | 5 +++ .../Admin/View/CompanyStatement/lists.html | 36 ++++++++++++------- 2 files changed, 28 insertions(+), 13 deletions(-) diff --git a/Application/Admin/Controller/CompanyStatementController.class.php b/Application/Admin/Controller/CompanyStatementController.class.php index 806a852b6..6b0a5979d 100644 --- a/Application/Admin/Controller/CompanyStatementController.class.php +++ b/Application/Admin/Controller/CompanyStatementController.class.php @@ -106,6 +106,9 @@ class CompanyStatementController extends ThinkController if(isset($_REQUEST['company_belong'])){ $map['company_belong'] = $_REQUEST['company_belong']; } + if(isset($_REQUEST['company_id'])){ + $map['company_id'] = $_REQUEST['company_id']; + } if(isset($_REQUEST['verify_status'])){ $map['verify_status'] = $_REQUEST['verify_status']; } @@ -310,6 +313,7 @@ class CompanyStatementController extends ThinkController $v['verify_log'][$op_pre.'_time']=date("Y-m-d H:i:s"); $v['verify_log'] = json_encode($v['verify_log']); $v['verify_status']=$change_status; + $v['op_time'] = time(); $this->DBModel->save($v); $opname = $this->VerifyStatus[$change_status]; addOperationLog(['op_type'=>1,'key'=>$v['id'],"op_name"=>$opname,'url'=>U('lists')]); @@ -519,6 +523,7 @@ class CompanyStatementController extends ThinkController $v['verify_log'][$op_pre.'_num']=$num; $v['verify_log'] = json_encode($v['verify_log']); $v['verify_status']=$change_status; + $v['op_time']=time(); $this->DBModel->save($v); } } diff --git a/Application/Admin/View/CompanyStatement/lists.html b/Application/Admin/View/CompanyStatement/lists.html index 95ba51215..db5e44e09 100644 --- a/Application/Admin/View/CompanyStatement/lists.html +++ b/Application/Admin/View/CompanyStatement/lists.html @@ -231,7 +231,7 @@
- 导出 + {$_page|default=''}
@@ -265,24 +265,34 @@ } $(function(){ - + var loop = 1; var company_id = "{$_GET['company_id']??0}"; $("#company_type").on("change",function(){ var type = $(this).find("option:selected").val(); - var url = "{:U('Ajax/getCompanyList')}"+"&company_type="+type; - $.get(url,function(data){ - var company = data; - var companystr = ''; - for (var i in company) { - if(company[i].id == company_id){ - companystr += "" - }else{ - companystr += "" + if(type != ''){ + var url = "{:U('Ajax/getCompanyList')}"+"&company_type="+type; + $.get(url,function(data){ + var company = data; + var companystr = ''; + for (var i in company) { + if(company[i].id == company_id && loop==1){ + companystr += "" + }else{ + companystr += "" + } } - } + $("#company_id").html(companystr); + $("#company_id").select2(); + loop++; + }) + }else{ + var companystr = ''; $("#company_id").html(companystr); $("#company_id").select2(); - }) + } + + + }) $("#company_type").change();