优化bug1

master
chenzhi 4 years ago
parent fb0edbe752
commit ffee256f93

@ -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);
}
}

@ -231,7 +231,7 @@
</div>
<div class="page">
<if condition="$role_export_check eq true ">
<a class="sch-btn" href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a>
<!-- <a class="sch-btn" href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')))}" target="_blank">导出</a> -->
</if>
{$_page|default=''}
</div>
@ -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 = '<option value="">请选择合作公司</option>';
for (var i in company) {
if(company[i].id == company_id){
companystr += "<option value='" + company[i].id + "' selected='selected'>" + company[i].name + "</option>"
}else{
companystr += "<option value='" + company[i].id + "'>" + company[i].name + "</option>"
if(type != ''){
var url = "{:U('Ajax/getCompanyList')}"+"&company_type="+type;
$.get(url,function(data){
var company = data;
var companystr = '<option value="">请选择合作公司</option>';
for (var i in company) {
if(company[i].id == company_id && loop==1){
companystr += "<option value='" + company[i].id + "' selected='selected'>" + company[i].name + "</option>"
}else{
companystr += "<option value='" + company[i].id + "'>" + company[i].name + "</option>"
}
}
}
$("#company_id").html(companystr);
$("#company_id").select2();
loop++;
})
}else{
var companystr = '<option value="">请先选择合作公司</option>';
$("#company_id").html(companystr);
$("#company_id").select2();
})
}
})
$("#company_type").change();

Loading…
Cancel
Save