Commit 6c0bb1ca by shz

tospur

parent a3d005d6
......@@ -98,8 +98,8 @@ class customerList extends WP_List_Table
if($current_user->roles[0] == 'author'){
$sql = $sql . " and tcs.consultant_id = " . $current_user->ID;
}
if (isset($_REQUEST['organization']) && $_REQUEST['organization'] != -1) {
$sql = $sql . " and tc.subsidiaryId = " . $_REQUEST['organization'];
if (isset($_REQUEST['filedName']) && $_REQUEST['filedName'] != null) {
$sql = $sql . " and tc.filedName like '%" . $_REQUEST['filedName'] . "%'";
}
if (isset($_REQUEST['status']) && $_REQUEST['status'] != -1) {
$sql = $sql . " and tcs.status = " . $_REQUEST['status'];
......
......@@ -42,8 +42,8 @@ class customerTrackingList extends WP_List_Table
" left join tospur_consultant tc on tct.consultant_id = tc.id" .
" left join tospur_organization torg on tc.subsidiaryId = torg.id" .
" where 1 = 1";
if (isset($_REQUEST['organization']) && $_REQUEST['organization'] != -1) {
$sql = $sql . " and tc.subsidiaryId = " . $_REQUEST['organization'];
if (isset($_REQUEST['filedName']) && $_REQUEST['filedName'] != null) {
$sql = $sql . " and tc.filedName like '%" . $_REQUEST['filedName'] . "%'";
}
if (isset($_REQUEST['status_type']) && $_REQUEST['status_type'] != -1) {
$sql = $sql . " and tct.status_type = " . $_REQUEST['status_type'];
......
......@@ -4,7 +4,6 @@
<input type="hidden" name="page" value="customerList">
<div>
<input type="hidden" name="hasSearch" value="1"/>
{% include 'selectOrganization.html' %}
<label for="status" class="hidden"></label>
<select name="status" id="status">
<option value="-1">状态</option>
......@@ -95,6 +94,7 @@
</select>
</div>
<div style="margin-top: 10px;">
<input type="text" placeholder="请输入门店" name="filedName" value="{{ req.filedName }}">
<input type="text" placeholder="请输入姓名" name="search_name" value="{{ req.search_name }}">
<input type="text" placeholder="请输入置业顾问" name="search_consultant_name" value="{{ req.search_consultant_name }}">
<input type="text" placeholder="请输入电话" name="search_phone" value="{{ req.search_phone }}">
......@@ -166,16 +166,5 @@
}
allot_consultant('customerlist');
$('form').submit(function () {
var organization = getOrganization();
var select = $('select[data-depth]:not(.hidden)');
if (select.length > 1 && organization == -1) {
alert('请选择门店');
return false;
} else {
$(this).append('<input type="hidden" name="organization" value="' + organization + '">');
}
});
});
</script>
\ No newline at end of file
......@@ -5,7 +5,6 @@
<input type="hidden" name="page" value="customerTrackingList">
<div>
{% include 'selectOrganization.html' %}
<label for="status_type" class="hidden"></label>
<select name="status_type" id="status_type">
<option value="-1">跟进类型</option>
......@@ -14,6 +13,8 @@
{{ item.id == (req.status_type) ?"selected":"" }} value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
</select>
<label for="filedName" class="hidden"></label>
<input type="text" placeholder="请输入门店" name="filedName" id="filedName" value="{{ req.filedName }}">
<label for="search_consultant_name" class="hidden"></label>
<input type="text" placeholder="请输入置业顾问" name="search_consultant_name" id="search_consultant_name"
value="{{ req.search_consultant_name }}">
......@@ -33,16 +34,5 @@
<script>
$(document).ready(function () {
search_form_set_page();
$('form').submit(function () {
var organization = getOrganization();
var select = $('select[data-depth]:not(.hidden)');
if (select.length > 1 && organization == -1) {
alert('请选择门店');
return false;
} else {
$(this).append('<input type="hidden" name="organization" value="' + organization + '">');
}
});
});
</script>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment