优化公司为模糊搜索

master
chenzhi 4 years ago
parent 41f214c7e7
commit a0b04cf81e

@ -65,7 +65,7 @@ class ExcelPaymentController extends BaseController
}
if(isset($_REQUEST['company_name'])){
$map['i.company_name'] = $_REQUEST['company_name'];
$map['i.company_name'] = ['LIKE',"%".$_REQUEST['company_name']."%"];
}
if(isset($_REQUEST['pay_status'])){

@ -106,13 +106,10 @@
<!-- 高级搜索 -->
<div class="jssearch fl cf search_list" style="margin-bottom: 0">
<div class="input-list input-list-promote search_label_rehab">
<select id="company_name" name="company_name" class="select_gallery" style="width: 220px;">
<option value="">请先选择公司类型</option>
</select>
<div class="input-list">
<input type="text" name="company_name" placeholder="请输入公司名称模糊搜索" value="{:I('company_name')}" style="width: 180px;">
</div>
<div class="input-list">
<input type="text" readonly id="time_start" name="time_start" class="" value="{:I('time_start')}" placeholder="结算开始时间" />
&nbsp;-&nbsp;
@ -261,27 +258,6 @@
}
$(function(){
var company_name = "{$_GET['company_name']??0}";
companySelect();
function companySelect(){
var url = "{:U('Ajax/getCompanyList')}"+"&company_type=2";
$.get(url,function(data){
var company = data;
var companystr = '<option value="">请选择合作公司</option>';
for (var i in company) {
if(company[i].name == company_name){
companystr += "<option value='" + company[i].name + "' selected='selected'>" + company[i].name + "</option>"
}else{
companystr += "<option value='" + company[i].name + "'>" + company[i].name + "</option>"
}
}
$("#company_name").html(companystr);
$("#company_name").select2();
})
}
$(".viewPool").click(function () {
var id = $(this).data("id");
var url = "{:U('viewPool')}"+"&id="+id

Loading…
Cancel
Save