优化搜索

master
chenzhi 4 years ago
parent 945f033df5
commit 6181059faf

@ -40,18 +40,19 @@ class PartnerController extends ThinkController
if (!empty(I('partner'))) {
$map['partner'] = ['like', '%' . I('partner') . '%'];
}
if (!empty(I('timestart'))) {
$timestart = strtotime(I('timestart'));
$map['_string'] = "contract_start_time >= {$timestart}";
}
if (!empty(I('timeend'))) {
$timeend = strtotime(I('timeend') . ' 23:59:59');
if (!empty($map['_string'])) {
$map['_string'] .= " and ";
}
$map['_string'] .= " contract_end_time < {$timeend}";
if (isset($_REQUEST['timestart']) && isset($_REQUEST['timeend'])) {
$time_start = strtotime($_REQUEST['timestart']);
$time_end = strtotime($_REQUEST['timeend'])+ 86399;
$map["_string"] = "(contract_start_time BETWEEN {$time_start} AND {$time_end}) OR (contract_end_time BETWEEN {$time_start} AND {$time_end})";
} elseif (isset($_REQUEST['timestart'])) {
$time_start = strtotime($_REQUEST['timestart']);
$map["_string"] = "(contract_start_time >= {$time_start} ) OR (contract_end_time >= {$time_start})";
} elseif (isset($_REQUEST['timeend'])) {
$time_end = strtotime($_REQUEST['timeend'])+ 86399;
$map["_string"] = "(contract_start_time <= {$time_end} ) OR (contract_end_time <= {$time_end})";
}
$page = intval(I('get.p', 0));
$page = $page ? $page : 1; //默认显示第一页数据
$row = intval(I('row', 0));

@ -497,6 +497,14 @@ class PromoteCompanyController extends ThinkController
$this->meta_title ='审核信息查看';
$this->display("view");
}
public function verifyDel(){
if(!isset($_REQUEST['id'])) $this->error('数据异常', U('index'));
$id = $_REQUEST['id'];
M("PromoteCompanyVerify", 'tab_')->where("id = '{$id}'")->delete();
addOperationLog(['op_type'=>2,'key'=>$id,'op_name'=>'删除审核','url'=>U('PromoteCompany/index')]);
$this->success('删除成功', U('index'));
}
public function marketingDirectorShow($ids=[], $isShow=0)

@ -67,11 +67,11 @@
<div class="input-list">
<input type="text" id="time-start" name="timestart" class="" value="{$startDate}"
placeholder="开始时间"/>
placeholder="合同开始时间"/>
-
<div class="input-append date" id="datetimepicker" style="display:inline-block">
<input type="text" id="time-end" name="timeend" class="" value="{$endDate}"
placeholder="结束时间"/>
placeholder="合同结束时间"/>
<span class="add-on"><i class="icon-th"></i></span>
</div>
</div>
@ -104,6 +104,7 @@
<th>产品类型</th>
<th colspan="2">游戏分成比例</th>
<th>合同期限</th>
<th>结算周期</th>
<th>帐户名</th>
<th>银行账号</th>
@ -145,6 +146,7 @@
<td>-</td>
</notempty>
<td rowspan="{$data.row}">{$data.contract_time}</td>
<td rowspan="{$data.row}">{$data.settlement_type|default="--"}</td>
<td rowspan="{$data.row}">{$data.payee_name|default="--"}</td>
<td rowspan="{$data.row}">{$data.bank_account|default="--"}</td>

@ -165,9 +165,9 @@
<td>{$data.contract_time}</td>
<td>{$data.validity_time}</td>
<td>{$data.company_info.channel_rate}%</td>
<td>{$data.company_info.fax_ratio}%</td>
<td>{$data.company_info.taxation_rate}%</td>
<td>{$data.company_info.channel_rate|showPercent}</td>
<td>{$data.company_info.fax_ratio|showPercent}</td>
<td>{$data.company_info.taxation_rate|showPercent}</td>
<td>{$data.company_info.bank_address}</td>
<td>{$data.company_info.bank_card}</td>
@ -199,6 +199,9 @@
</td>
<td >
<a href="{:U('verifyView',array('id'=>$data['id']))}">查看</a>
<if condition="$data.verify_status elt 0 ">
<a style="color: red;" href="{:U('verifyDel',array('id'=>$data['id']))}" class="confirm ajax-get">删除</a>
</if>
</td>
</tr>
</volist>

Loading…
Cancel
Save