优化公会检索

master
chenzhi 5 years ago
parent 832f531d20
commit 3ff79ce6c1

@ -71,12 +71,8 @@ class CompanyRelationController extends AdminController
if(isset($params['company_type'])){
$where['_string'] .= " AND (first_company_type='{$params['company_type']}' OR second_company_type='{$params['company_type']}')";
}
if(isset($params['company_id'])){
$where['_string'] .= " AND (first_company_id='{$params['company_id']}' OR second_company_id='{$params['company_id']}')";
}
if(isset($params['company_type']) && isset($params['company_id'])){
unset($where['_string']);
$where['_string'] .= " (first_company_id='{$params['company_id']}' AND first_company_type='{$params['company_type']}') OR (second_company_id='{$params['company_id']}' AND second_company_type='{$params['company_type']}')";
if(isset($params['company_name'])){
$where['_string'] .= " AND (first_company_name LIKE '%{$params['company_name']}%' OR second_company_name LIKE '%{$params['company_name']}%')";
}
if(isset($params['settlement_type'])){
@ -150,13 +146,8 @@ class CompanyRelationController extends AdminController
if(isset($params['company_type'])){
$where['_string'] .= " AND (first_company_type='{$params['company_type']}' OR second_company_type='{$params['company_type']}')";
}
if(isset($params['company_id'])){
$where['_string'] .= " AND (first_company_id='{$params['company_id']}' OR second_company_id='{$params['company_id']}')";
}
if(isset($params['company_type']) && isset($params['company_id'])){
unset($where['_string']);
$where['_string'] .= " (first_company_id='{$params['company_id']}' AND first_company_type='{$params['company_type']}') OR (second_company_id='{$params['company_id']}' AND second_company_type='{$params['company_type']}')";
if(isset($params['company_name'])){
$where['_string'] .= " AND (first_company_name LIKE '%{$params['company_name']}%' OR second_company_name LIKE '%{$params['company_name']}%')";
}
if(isset($params['settlement_type'])){

@ -76,11 +76,16 @@
</volist>
</select>
</div>
<div class="input-list input-list-promote search_label_rehab">
<div class="input-list">
<input style="width: 200px;" type="text" name="company_name" class="search-input" value="{:I('company_name')}" placeholder="请输入公司名称搜索">&nbsp;
</div>
<!-- <div class="input-list input-list-promote search_label_rehab">
<select id="company_id" name="company_id" class="select_gallery" >
<option value="">请先选择公司类型</option>
</select>
</div>
</div> -->
<div class="input-list input-list-game search_label_rehab">
<select id="settlement_type" name="settlement_type" class="select_gallery" >

@ -81,11 +81,15 @@
</volist>
</select>
</div>
<div class="input-list input-list-promote search_label_rehab">
<div class="input-list">
<input style="width: 200px;" type="text" name="company_name" class="search-input" value="{:I('company_name')}" placeholder="请输入公司名称搜索">&nbsp;
</div>
<!-- <div class="input-list input-list-promote search_label_rehab">
<select id="company_id" name="company_id" class="select_gallery" >
<option value="">请先选择公司类型</option>
</select>
</div>
</div> -->
<div class="input-list input-list-game search_label_rehab">
<select id="settlement_type" name="settlement_type" class="select_gallery" >

Loading…
Cancel
Save