Commit 97a51cd8 by felix

按照11.11修改文档更新

parent f058ed92
......@@ -17,28 +17,33 @@ class Contract {
$context['buildProperty'] = SearchDao::searchBuildProperty();
$context['room'] = SearchDao::searchRoom();
$htEdit = current_user_can('htEdit');
if($type==1){
$wpdb->query("START TRANSACTION");
$prefix = "<h4>新增";
if(isset($_REQUEST["id"])) {
$prefix = "<h4>修改";
}
$result = Contract::doSqlAction();
if(!is_numeric($result)){
$wpdb->query("ROLLBACK");
$context["error"] = $result;
echo $result;
echo $prefix."合同失败</h4>";
if($htEdit){
$wpdb->query("START TRANSACTION");
$prefix = "<h4>新增";
if(isset($_REQUEST["id"])) {
$prefix = "<h4>修改";
}
$result = Contract::doSqlAction();
if(!is_numeric($result)){
$wpdb->query("ROLLBACK");
$context["error"] = $result;
echo $result;
echo $prefix."合同失败</h4>";
}else{
$wpdb->query("COMMIT");
echo $prefix."合同成功</h4>";
}
echo "<h4>3秒后自动跳转至合同列表</h4>
<script>
setTimeout(function(){
window.location.href='" . admin_url('admin.php?page=contractList') . "';
},3000);
</script>";
}else{
$wpdb->query("COMMIT");
echo $prefix."合同成功</h4>";
}
echo "<h4>3秒后自动跳转至合同列表</h4>
<script>
setTimeout(function(){
window.location.href='" . admin_url('admin.php?page=contractList') . "';
},3000);
</script>";
echo "<h4>没有权限提交合同</h4>";
}
exit;
}else if(isset($_GET['edit'])){
$id = $_REQUEST["id"];
......@@ -52,9 +57,11 @@ class Contract {
}
$context["commissionLog"] = CommissionDao::search_commission_log(implode(",",$commissionIds));
}
$context['htEdit'] = $htEdit;
Timber::render("contract.html",$context);
}
private static function formatCommissionParams($params,$contractId,$type){
$commissionParams = array(
"accounts" => $params["accounts"],
......
<?php
class Contract_List extends WP_List_Table{
if (!class_exists('UGEN_List_Table')) {
require_once(PLUGIN_DIR . 'Admin/UGEN_List_Table.php');
}
class Contract_List extends UGEN_List_Table{
function __construct()
{
global $status, $page;
......
......@@ -38,7 +38,8 @@ class House extends Tospur_House{
'community_name' => $_POST["community_name"],
'publicize' => $_POST["publicize"],
'threeD' => $_POST["threeD"],
'roundLook' => $_POST["roundLook"]
'roundLook' => $_POST["roundLook"],
'userId' => get_current_user_id()
);
$wpdb->query("START TRANSACTION");
if(isset($_POST['houseId'])){
......@@ -81,9 +82,12 @@ class House extends Tospur_House{
$context["plate"] = SearchDao::searchCity($context['result']->city_id,$context['result']->district_id);
$context["mark"] = SearchDao::searchHouseTag($_GET['id']);
$context["status"] = searchDao::searchStatusType(1,0);
}else{
$context['consultant'] = SearchDao::searchConsultantById(get_current_user_id());
}
$context['canApproval'] = House::canApproval();
$context['canEdit'] = House::canEdit();
$context['role'] = House::getCurrentRole();
$context["city"] = SearchDao::searchCity();
$context["buildProperty"] = SearchDao::searchBuildProperty();
$context["room"] = SearchDao::searchRoom();
......
<?php
if (!class_exists('WP_List_Table')) {
require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table.php');
if (!class_exists('UGEN_List_Table')) {
require_once(PLUGIN_DIR . 'Admin/UGEN_List_Table.php');
}
class QuotaMonthList extends WP_List_Table{
class QuotaMonthList extends UGEN_List_Table{
function column_default($item, $column_name)
{
switch($column_name){
......
<?php
if (!class_exists('WP_List_Table')) {
require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table.php');
if (!class_exists('UGEN_List_Table')) {
require_once(PLUGIN_DIR . 'Admin/UGEN_List_Table.php');
}
class QuotaYearList extends WP_List_Table
class QuotaYearList extends UGEN_List_Table
{
function __construct()
......
<?php
if (!class_exists('WP_List_Table')) {
require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table.php');
}
class UGEN_List_Table extends WP_List_Table{
function bulk_actions( $which = '' ) {
if ( is_null( $this->_actions ) ) {
$no_new_actions = $this->_actions = $this->get_bulk_actions();
/**
* Filter the list table Bulk Actions drop-down.
*
* The dynamic portion of the hook name, `$this->screen->id`, refers
* to the ID of the current screen, usually a string.
*
* This filter can currently only be used to remove bulk actions.
*
* @since 3.5.0
*
* @param array $actions An array of the available bulk actions.
*/
$this->_actions = apply_filters( "bulk_actions-{$this->screen->id}", $this->_actions );
$this->_actions = array_intersect_assoc( $this->_actions, $no_new_actions );
$two = '';
} else {
$two = '2';
}
if ( empty( $this->_actions ) )
return;
echo "<label for='bulk-action-selector-" . esc_attr( $which ) . "' class='screen-reader-text'>" . __( 'Select bulk action' ) . "</label>";
echo "<select name='action$two' id='bulk-action-selector-" . esc_attr( $which ) . "'>\n";
echo "<option value='-1' selected='selected'>" . __( 'Bulk Actions' ) . "</option>\n";
foreach ( $this->_actions as $name => $title ) {
$class = 'edit' == $name ? ' class="hide-if-no-js"' : '';
echo "\t<option value='$name'$class>$title</option>\n";
}
echo "</select>\n";
submit_button( __( 'Apply' ), 'action', '', false, array(
'id' => "doaction$two" ,
"style"=>" color: #fff;
background-color: #5cb85c;
border-color: #4cae4c;
margin-bottom: 5px;
padding: 3px 12px;
margin-bottom: 0;
font-size: 14px;
font-weight: 400;
line-height: 1.42857143;
text-align: center;
white-space: nowrap;
vertical-align: middle;
-ms-touch-action: manipulation;
touch-action: manipulation;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
background-image: none;
border: 1px solid transparent;
border-radius: 4px;
box-shadow:none;
-webkit-box-shadow:none;
") );
echo "\n";
}
}
\ No newline at end of file
<?php
if (!class_exists('WP_List_Table')) {
require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table.php');
if (!class_exists('UGEN_List_Table')) {
require_once(PLUGIN_DIR . 'Admin/UGEN_List_Table.php');
}
class commissionList extends WP_List_Table
class commissionList extends UGEN_List_Table
{
function __construct()
{
......@@ -117,6 +117,9 @@ class commissionList extends WP_List_Table
if (isset($_REQUEST['search_consultant_name']) && $_REQUEST['search_consultant_name'] != null) {
$sql = $sql . " and tc.consultant_name like '%" . $_REQUEST['search_consultant_name'] . "%'";
}
if (current_user_can('zygw')) {
$sql = $sql . " and tc.consultantId = " . get_current_user_id();
}
$result = DBManager::get_results($sql);
......
......@@ -7,12 +7,12 @@
*/
if (!class_exists('WP_List_Table')) {
require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table.php');
if (!class_exists('UGEN_List_Table')) {
require_once(PLUGIN_DIR . 'Admin/UGEN_List_Table.php');
}
class consultantScoreList extends WP_List_Table
class consultantScoreList extends UGEN_List_Table
{
function __construct()
{
......
<?php
if (!class_exists('WP_List_Table')) {
require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table.php');
if (!class_exists('UGEN_List_Table')) {
require_once(PLUGIN_DIR . 'Admin/UGEN_List_Table.php');
}
class customerList extends WP_List_Table
class customerList extends UGEN_List_Table
{
function __construct()
{
......@@ -45,8 +45,12 @@ class customerList extends WP_List_Table
$columns['consultant_name'] = '置业顾问';
$columns['status_name'] = '状态';
$columns['customer_remark'] = '客户备注';
$columns['price'] = '价格';
$columns['area'] = '面积';
$columns['plate'] = '区域';
return $columns;
}
function get_bulk_actions()
{
$actions = array(
......@@ -68,7 +72,7 @@ class customerList extends WP_List_Table
$result = DBManager::query('update ' . Config::TOSPUR_CUSTOMER_TABLE
. ' SET consultant_id = ' . $consultant_id
. ' where id in ' . $string);
if($result){
if ($result) {
echo '<script>alert("分配置业顾问成功");</script>';
}
}
......@@ -87,10 +91,11 @@ class customerList extends WP_List_Table
$this->process_bulk_action();
$sql = "SELECT tcs.*,tc.name as consultant_name,ts.status_name,tc.subsidiaryId FROM tospur_customer tcs" .
$sql = "SELECT tcs.*,tc.name as consultant_name,ts.status_name,tc.subsidiaryId,dc.plateName FROM tospur_customer tcs" .
" left join (SELECT * FROM tospur_status where status_type = 5) as ts on tcs.status = ts.status_id" .
" left join tospur_consultant tc on tcs.consultant_id = tc.id" .
" left join tospur_organization torg on tc.subsidiaryId = torg.id" .
" left join dic_city dc on tcs.plate_id = dc.plateId" .
" where 1 = 1";
if (current_user_can('zygw')) {
$sql = $sql . " and tcs.consultant_id = " . get_current_user_id();
......@@ -172,6 +177,12 @@ class customerList extends WP_List_Table
($value->secondHand_house == 1) ? '二手房' : null,
($value->rent_house == 1) ? '租房' : null
);
$price_array = array(
($value->new_house == 1 || $value->secondHand_house == 1)
? '总价:' . $value->min_totalPrice . ' — ' . $value->max_totalPrice . ' 万<br>单价:' .
$value->min_unitPrice . ' — ' . $value->max_unitPrice . ' 元/m²<br>' : null,
($value->rent_house == 1) ? '月租:' . $value->min_rent . ' — ' . $value->max_rent . ' 元/月' : null
);
$demand_type_array = array_filter($demand_type_array, function ($var) {
return !is_null($var);
});
......@@ -182,7 +193,10 @@ class customerList extends WP_List_Table
'customer_remark' => $value->customer_remark,
'consultant_id' => $value->consultant_id,
'consultant_name' => $value->consultant_name,
'status_name' => $value->status_name
'status_name' => $value->status_name,
'price' => implode("", $price_array),
'area' => $value->min_coveredArea . ' — ' . $value->max_coveredArea . ' m²',
'plate' => ($value->plateName) ? $value->plateName : '未知'
);
}
......
<?php
if (!class_exists('WP_List_Table')) {
require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table.php');
if (!class_exists('UGEN_List_Table')) {
require_once(PLUGIN_DIR . 'Admin/UGEN_List_Table.php');
}
class customerTrackingList extends WP_List_Table
class customerTrackingList extends UGEN_List_Table
{
function __construct()
{
......
<?php
if (!class_exists('WP_List_Table')) {
require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table.php');
if (!class_exists('UGEN_List_Table')) {
require_once(PLUGIN_DIR . 'Admin/UGEN_List_Table.php');
}
class newHouseList extends WP_List_Table
class newHouseList extends UGEN_List_Table
{
function get_views()
{
......@@ -60,27 +60,7 @@ class newHouseList extends WP_List_Table
function column_default($item, $column_name)
{
switch ($column_name) {
case'id':
case 'name':
case 'address':
case 'average_price':
case 'developer':
case 'check_in_time':
case 'room_id':
case 'property_age':
case 'decoration':
case 'covered_area':
case 'status':
case 'volume_rate':
case 'greening_rate':
case 'households':
case 'parking_spaces':
case 'property_management':
case 'property_money':
default:
return '<a href="' . admin_url() . 'admin.php?page=newHouse&edit=true&id=' . $item['id'] . '">' . $item[$column_name] . '</a>';
}
return '<a href="' . admin_url() . 'admin.php?page=newHouse&edit=true&id=' . $item['id'] . '">' . $item[$column_name] . '</a>';
}
function column_cb($item)
......@@ -99,7 +79,7 @@ class newHouseList extends WP_List_Table
$columns = array(
'cb' => '<input type="checkbox" />'
);
$columns['id'] = 'ID';
$columns['house_number'] = '编号';
$columns['name'] = '楼盘名';
$columns['address'] = '地址';
$columns['average_price'] = '单价';
......@@ -123,6 +103,7 @@ class newHouseList extends WP_List_Table
{
$sortable_columns = array(
'id' => array('id', false),
'house_number' => array('house_number', false),
'name' => array('name', false),
'address' => array('address', false),
'average_price' => array('average_price', false),
......@@ -133,7 +114,7 @@ class newHouseList extends WP_List_Table
'decoration' => array('decoration', false),
'covered_area' => array('covered_area', false),
'status' => array('status', false),
'volume_rate' => array('valvolume_rateid', false),
'volume_rate' => array('volume_rate', false),
'greening_rate' => array('greening_rate', false),
'households' => array('households', false),
'parking_spaces' => array('parking_spaces', false),
......@@ -358,6 +339,7 @@ class newHouseList extends WP_List_Table
foreach ($result as $key => $value) {
$data[$key] = array(
'id' => $value->id,
'house_number' => $value->house_number,
'name' => $value->name,
'address' => $value->address,
'average_price' => $value->average_price,
......
<?php
if (!class_exists('WP_List_Table')) {
require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table.php');
if (!class_exists('UGEN_List_Table')) {
require_once(PLUGIN_DIR . 'Admin/UGEN_List_Table.php');
}
global $progress_sql;
class progressList extends WP_List_Table
class progressList extends UGEN_List_Table
{
function __construct()
{
......@@ -224,6 +224,11 @@ function function_progressList()
{
$context = array();
$context['req'] = $_REQUEST;
$context['statistics'] = current_user_can('statistics');
$context['url'] = admin_url('admin.php?page=progressList');
if ($_GET['action'] == 'statistics') {
Statistics::business();
}
Timber::render("progressList.html", $context);
}
......
......@@ -51,7 +51,8 @@ class RentHouse extends Tospur_House{
"deadLine"=>$_POST["deadLine"],
"rent"=>$_POST["rent"],
"property_money"=>$_POST["property_money"],
"parking_spaces"=>$_POST["parking_spaces"]
"parking_spaces"=>$_POST["parking_spaces"],
'userId' => get_current_user_id()
);
if($type==3){
$wpdb->query("START TRANSACTION");
......@@ -96,9 +97,12 @@ class RentHouse extends Tospur_House{
$currentStatus = $context["result"]->status;
$currentApproval = $context["result"]->approval;
$context["status"] = searchDao::searchStatusType(2,0,$currentStatus,$currentApproval);
}else{
$context['consultant'] = SearchDao::searchConsultantById(get_current_user_id());
}
$context['canApproval'] = House::canApproval();
$context['canEdit'] = House::canEdit();
$context['role'] = House::getCurrentRole();
$context["city"] = SearchDao::searchCity();
$context["buildProperty"] = SearchDao::searchBuildProperty();
$context["room"] = SearchDao::searchRoom();
......
<?php
if (!class_exists('WP_List_Table')) {
require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table.php');
if (!class_exists('UGEN_List_Table')) {
require_once(PLUGIN_DIR . 'Admin/UGEN_List_Table.php');
}
class rentHouseList extends WP_List_Table
class rentHouseList extends UGEN_List_Table
{
function get_views()
{
......@@ -15,7 +15,7 @@ class rentHouseList extends WP_List_Table
$role = Tospur_House::getCurrentRole();
//根据当前user_id获取id所在门店的id,然后获取门店下所有职业顾问的id
$consultantArray = Tospur_House::get_oganization_consultant();
$select = "select COUNT(*) as allNum,
$select = "select COUNT(NULLIF(status not in (2,3,4), false)) as allNum,
COUNT(NULLIF(approval != -2, false)) as needCheckNum,
COUNT(NULLIF(status = 0, false)) as unCheckNum,
COUNT(NULLIF(status = 1, false)) as checkNum,
......@@ -50,10 +50,10 @@ class rentHouseList extends WP_List_Table
"unCheckNum" => '<a href="' . $current_url . '&status=0"'.($_REQUEST["status"]=="0"?'class="current"':"").'>未审核<span class="count">(' . $approvalParam["unCheckNum"] . ')</span></a>',
"checkNum" => '<a href="' . $current_url . '&status=1"'.($_REQUEST["status"]==1?'class="current"':"").'>审核<span class="count">(' . $approvalParam["checkNum"] . ')</span></a>',
"onSaleNum" => '<a href="' . $current_url . '&status=-1"'.($_REQUEST["status"]==-1?'class="current"':"").'>交易中<span class="count">(' . $approvalParam["onSaleNum"] . ')</span></a>',
"reactivationNum" => '<a href="' . $current_url . '&status=5"'.($_REQUEST["status"]==5?'class="current"':"").'>重激活<span class="count">(' . $approvalParam["reactivationNum"] . ')</span></a>',
"selfSaleNum" => '<a href="' . $current_url . '&status=2"'.($_REQUEST["status"]==2?'class="current"':"").'>自售<span class="count">(' . $approvalParam["selfSaleNum"] . ')</span></a>',
"otherSaleNum" => '<a href="' . $current_url . '&status=3"'.($_REQUEST["status"]==3?'class="current"':"").'>他售<span class="count">(' . $approvalParam["otherSaleNum"] . ')</span></a>',
"invalidNum" => '<a href="' . $current_url . '&status=4"'.($_REQUEST["status"]==4?'class="current"':"").'>无效<span class="count">(' . $approvalParam["invalidNum"] . ')</span></a>',
"reactivationNum" => '<a href="' . $current_url . '&status=5"'.($_REQUEST["status"]==5?'class="current"':"").'>重激活<span class="count">(' . $approvalParam["reactivationNum"] . ')</span></a>',
"invalidNum" => '<a href="' . $current_url . '&status=4"'.($_REQUEST["status"]==4?'class="current"':"").'>无效<span class="count">(' . $approvalParam["invalidNum"] . ')</span></a>'
);
}
......@@ -70,23 +70,7 @@ class rentHouseList extends WP_List_Table
function column_default($item, $column_name)
{
switch ($column_name) {
case'id':
case 'name':
case 'community_name':
case 'rent':
case 'buildproperty_id':
case 'covered_area':
case 'floor':
case 'faceto':
case 'decoration':
case 'age':
case 'matching_facilities':
case 'user_id':
case 'status':
default:
return '<a href="' . admin_url() . 'admin.php?page=rentHouse&edit=true&id=' . $item['id'] . '">' . $item[$column_name] . '</a>';
}
return '<a href="' . admin_url() . 'admin.php?page=rentHouse&edit=true&id=' . $item['id'] . '">' . $item[$column_name] . '</a>';
}
function column_cb($item)
......@@ -104,7 +88,7 @@ class rentHouseList extends WP_List_Table
$columns = array(
'cb' => '<input type="checkbox" />'
);
$columns['id'] = 'ID';
$columns['house_number'] = '编号';
$columns['name'] = '租房标题';
$columns['community_name'] = '小区名称';
$columns['rent'] = '元/月';
......@@ -124,6 +108,7 @@ class rentHouseList extends WP_List_Table
{
$sortable_columns = array(
'id' => array('id', false),
'house_number' => array('house_number', false),
'name' => array('name', false),
'community_name' => array('community_name', false),
'rent' => array('rent', false),
......@@ -303,6 +288,9 @@ class rentHouseList extends WP_List_Table
left join(select status_name,status_type,status_id from tospur_status)ts on th.status = ts.status_id and ts.status_type=2
left join(select status_name as approvalName,status_type,status_id from tospur_status)tss on th.approval = tss.status_id and tss.status_type=2
where 1=1 and house_type=2 ";
if (!isset($_REQUEST["status"])){
$sql = $sql . " and status not in (2,3,4)";
}
if($role == "zygw"){
$sql = $sql." and aus_id in".$consultantArray;
......@@ -380,6 +368,7 @@ class rentHouseList extends WP_List_Table
foreach ($result as $key => $value) {
$data[$key] = array(
'id' => $value->id,
'house_number' => $value->house_number,
'name' => $value->name,
'community_name' => $value->community_name,
'rent' => $value->rent,
......
......@@ -50,7 +50,8 @@ class SecHandHouse extends Tospur_House{
"deadLine"=>$_POST["deadLine"],
"property_money"=>$_POST["property_money"],
"mortgage" =>$_POST["mortgage"],
"parking_spaces"=>$_POST["parking_spaces"]
"parking_spaces"=>$_POST["parking_spaces"],
'userId' => get_current_user_id()
);
if($type==2){
......@@ -94,10 +95,13 @@ class SecHandHouse extends Tospur_House{
$context["plate"] = SearchDao::searchCity($context['result']->city_id,$context['result']->district_id);
$currentStatus = $context["result"]->status;
$currentApproval = $context["result"]->approval;
$context["status"] = searchDao::searchStatusType(2,0,$currentStatus,$currentApproval);
$context["status"] = SearchDao::searchStatusType(2,0,$currentStatus,$currentApproval);
}else{
$context['consultant'] = SearchDao::searchConsultantById(get_current_user_id());
}
$context['canApproval'] = House::canApproval();
$context['canEdit'] = House::canEdit();
$context['role'] = House::getCurrentRole();
$context["city"] = SearchDao::searchCity();
$context["buildProperty"] = SearchDao::searchBuildProperty();
$context["room"] = SearchDao::searchRoom();
......
<?php
if (!class_exists('WP_List_Table')) {
require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table.php');
if (!class_exists('UGEN_List_Table')) {
require_once(PLUGIN_DIR . 'Admin/UGEN_List_Table.php');
}
class secHandHouseList extends WP_List_Table
class secHandHouseList extends UGEN_List_Table
{
function get_views()
{
......@@ -14,7 +14,7 @@ class secHandHouseList extends WP_List_Table
$role = Tospur_House::getCurrentRole();
//根据当前user_id获取id所在门店的id,然后获取门店下所有职业顾问的id
$consultantArray = Tospur_House::get_oganization_consultant();
$select = "select COUNT(*) as allNum,
$select = "select COUNT(NULLIF(status not in (2,3,4), false)) as allNum,
COUNT(NULLIF(approval != -2, false)) as needCheckNum,
COUNT(NULLIF(status = 0, false)) as unCheckNum,
COUNT(NULLIF(status = 1, false)) as checkNum,
......@@ -49,10 +49,10 @@ class secHandHouseList extends WP_List_Table
"unCheckNum" => '<a href="' . $current_url . '&status=0"'.($_REQUEST["status"]=="0"?'class="current"':"").'>未审核<span class="count">(' . $approvalParam["unCheckNum"] . ')</span></a>',
"checkNum" => '<a href="' . $current_url . '&status=1"'.($_REQUEST["status"]==1?'class="current"':"").'>审核<span class="count">(' . $approvalParam["checkNum"] . ')</span></a>',
"onSaleNum" => '<a href="' . $current_url . '&status=-1"'.($_REQUEST["status"]==-1?'class="current"':"").'>交易中<span class="count">(' . $approvalParam["onSaleNum"] . ')</span></a>',
"reactivationNum" => '<a href="' . $current_url . '&status=5"'.($_REQUEST["status"]==5?'class="current"':"").'>重激活<span class="count">(' . $approvalParam["reactivationNum"] . ')</span></a>',
"selfSaleNum" => '<a href="' . $current_url . '&status=2"'.($_REQUEST["status"]==2?'class="current"':"").'>自售<span class="count">(' . $approvalParam["selfSaleNum"] . ')</span></a>',
"otherSaleNum" => '<a href="' . $current_url . '&status=3"'.($_REQUEST["status"]==3?'class="current"':"").'>他售<span class="count">(' . $approvalParam["otherSaleNum"] . ')</span></a>',
"invalidNum" => '<a href="' . $current_url . '&status=4"'.($_REQUEST["status"]==4?'class="current"':"").'>无效<span class="count">(' . $approvalParam["invalidNum"] . ')</span></a>',
"reactivationNum" => '<a href="' . $current_url . '&status=5"'.($_REQUEST["status"]==5?'class="current"':"").'>重激活<span class="count">(' . $approvalParam["reactivationNum"] . ')</span></a>',
"invalidNum" => '<a href="' . $current_url . '&status=4"'.($_REQUEST["status"]==4?'class="current"':"").'>无效<span class="count">(' . $approvalParam["invalidNum"] . ')</span></a>'
);
}
......@@ -69,23 +69,7 @@ class secHandHouseList extends WP_List_Table
function column_default($item, $column_name)
{
switch ($column_name) {
case'id':
case 'name':
case 'community_name':
case 'total_price':
case 'average_price':
case 'buildproperty_id':
case 'covered_area':
case 'floor':
case 'faceto':
case 'decoration':
case 'age':
case 'user_id':
case 'status':
default:
return '<a href="' . admin_url() . 'admin.php?page=secHandHouse&edit=true&id=' . $item['id'] . '">' . $item[$column_name] . '</a>';
}
return '<a href="' . admin_url() . 'admin.php?page=secHandHouse&edit=true&id=' . $item['id'] . '">' . $item[$column_name] . '</a>';
}
function column_cb($item)
......@@ -103,7 +87,7 @@ class secHandHouseList extends WP_List_Table
$columns = array(
'cb' => '<input type="checkbox" />'
);
$columns['id'] = 'ID';
$columns['house_number'] = '编号';
$columns['name'] = '二手房标题';
$columns['community_name'] = '小区名称';
$columns['total_price'] = '总价(万)';
......@@ -123,6 +107,7 @@ class secHandHouseList extends WP_List_Table
{
$sortable_columns = array(
'id' => array('id', false),
'house_number' => array('house_number', false),
'name' => array('name', false),
'community_name' => array('community_name', false),
'total_price' => array('total_price', false),
......@@ -328,7 +313,11 @@ class secHandHouseList extends WP_List_Table
left join(select value ,literal from dic_buildproperty) db on if(th.buildproperty_id>5,5,th.buildproperty_id) = db.value
left join(select status_name,status_type,status_id from tospur_status)ts on th.status = ts.status_id and ts.status_type=2
left join(select status_name as approvalName,status_type,status_id from tospur_status)tss on th.approval = tss.status_id and tss.status_type=2
where 1=1 and house_type=1 ";
where 1=1 and house_type=1 ";
if (!isset($_REQUEST["status"])){
$sql = $sql . " and status not in (2,3,4)";
}
if($role == "zygw"){
$sql = $sql." and aus_id in".$consultantArray;
......@@ -404,6 +393,7 @@ class secHandHouseList extends WP_List_Table
foreach ($result as $key => $value) {
$data[$key] = array(
'id' => $value->id,
'house_number' => $value->house_number,
'name' => $value->name,
'community_name' => $value->community_name,
'total_price' => $value->total_price,
......
<?php
if (!class_exists('WP_List_Table')) {
require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table.php');
if (!class_exists('UGEN_List_Table')) {
require_once(PLUGIN_DIR . 'Admin/UGEN_List_Table.php');
}
class tospurSaleList extends WP_List_Table
class tospurSaleList extends UGEN_List_Table
{
function __construct()
{
......@@ -67,7 +67,9 @@ class tospurSaleList extends WP_List_Table
<label for="cityDropDown"></label>
<select name="cityId" id="cityDropDown" style="vertical-align: initial;">
<?php
$cityId = (int)$_GET['cityId'];
$cityId = 2;
if(isset($_GET['cityId']))
$cityId = (int)$_GET['cityId'];
$city = SearchDao::searchCity();
?>
<option value="-1"<?php if ($cityId == -1) {
......@@ -89,7 +91,7 @@ class tospurSaleList extends WP_List_Table
<label for="search"></label>
<input type="search" id="search" name="s" value="<?php echo $_GET['s']; ?>" placeholder="请输入关键字搜索"
style="height: 28px;">
<input type="submit" id="search-submit" class="button" value="搜索">
<input type="submit" id="search-submit" class="btn btn-success" value="搜索">
</span>
</div>
<?php
......@@ -214,13 +216,9 @@ function tospur_sale_page()
});
$('#search-submit').click(function () {
var s = $('#search').val();
if (!s) {
alert('请输入关键字搜索');
} else {
window.location.href = '<?php
window.location.href = '<?php
echo admin_url('admin.php?page='.$_GET['page'].'&paged=1');
?>' + '&cityId=' + cityId + '&s=' + s;
}
return false;
});
});
......
......@@ -51,6 +51,7 @@ $context['cityId'] = $_GET['cityId'];
$context['house_type'] = $house_type;
$context['city'] = SearchDao::searchCity();
$context['role_flag'] = $role_flag;
$context['page'] = 'sale_detail';
if (!$role_flag) {
$context['handle'] = (integer)$result->handle;
}
......
......@@ -252,7 +252,8 @@ class upload
'entrustDay' => $sheet->getCell('B47')->getValue(),
'deadLine' => $sheet->getCell('B48')->getValue(),
'mortgage' => $sheet->getCell('B49')->getValue(),
'approval' => -2
'approval' => -2,
'userId' => get_current_user_id()
);
$sql = null;
......
......@@ -7,12 +7,12 @@
*/
if (!class_exists('WP_List_Table')) {
require_once(ABSPATH . 'wp-admin/includes/class-wp-list-table.php');
if (!class_exists('UGEN_List_Table')) {
require_once(PLUGIN_DIR . 'Admin/UGEN_List_Table.php');
}
class viewHouseList extends WP_List_Table
class viewHouseList extends UGEN_List_Table
{
function __construct()
{
......
......@@ -10,7 +10,7 @@
</select>
</div><br/><br/>
<div class="form-group">
<input type="submit" value="同步" class="form-control">
<input type="submit" value="同步" class="btn btn-success">
</div>
</form>
</body>
\ No newline at end of file
<table class="form-table">
<tbody>
<tr>
<th style="width: 63px;box-sizing: content-box;">
<th style="width: 63px;box-sizing: content-box;"
{% if (page == 'view_house' or page == 'sale_detail') %}
class=""
{% elseif (house_type == 0 or house_type == 1 or house_type == 2 or page == 'customer') %}
class="color-red"
{% endif %}
>
<label>置业顾问:</label>
</th>
<td>
<div id="consultantImg">
</div>
<button type="button" class="button action" data-toggle="modal" data-target="#myConsultant" id="recConsultantBt">
{% if role == 'jl' %}
<button type="button" class="btn btn-success" data-toggle="modal" data-target="#myConsultant" id="recConsultantBt">
选择置业顾问
</button>
{% endif %}
</td>
</tr>
</tbody>
......@@ -46,8 +54,13 @@
var label = $("<label>").append(data.name);
mid.append(label);
var right = $("<div>").addClass("col-md-3");
var cancel = $("<input>").attr({"type":"button","value":"删除"}).addClass("button action consultantCancel");
right.append(cancel);
if ('{{role}}' == 'jl') {
var cancel = $("<input>").attr({
"type": "button",
"value": "删除"
}).addClass("btn btn-info consultantCancel");
right.append(cancel);
}
var recommendConsultant = $("<input>").attr({"type":"hidden","name":"data[recConsultant][]","value":data.id});
row.append(left).append(mid).append(right);
var p = $("<p>").append(row).append(recommendConsultant);
......
......@@ -5,10 +5,10 @@
<div class="modal-header">
<div class="row">
<div class="col-md-6">
<input type="text" placeholder="请输入姓名/手机号搜索" id="addCustomer_searchtext" class="form-control">
<input type="text" placeholder="客户编号/姓名/手机号搜索" id="addCustomer_searchtext" class="form-control">
</div>
<div class="col-md-2">
<button type="button" class="button action" id="addCustomer_search">搜索</button>
<button type="button" class="btn btn-success" id="addCustomer_search">搜索</button>
</div>
</div>
</div>
......@@ -51,22 +51,25 @@
url: "admin-ajax.php",
data: params,
success:function(json){
console.log($("#addCustomer_list").find(".row").length);
$("#addCustomer_list").find(".row").remove();
console.log(json);
if(json){
for(var i = 0; i <json.length; i++){
var item = json[i];
var name = item["name"];
var id = item['id'];
var phone = item['phone'];
var row = $("<div>").addClass("row").css("margin-bottom","10px");
var left = $("<div>").addClass("col-md-3");
var idDiv = $("<label>").append(id);
var phoneDiv = $("<label>").append(phone);
var right = $("<div>").addClass("col-md-3");
var nameDiv = $("<label>").append(name);
var row = $("<div>").addClass("row").css("margin-bottom","10px");
var left = $("<div>").addClass("col-md-1");
var middle = $("<div>").addClass("col-md-3");
var right = $("<div>").addClass("col-md-3");
left.append(idDiv);
middle.append(nameDiv);
right.append(phoneDiv);
left.append(nameDiv);
row.append(left).append(right).data(item);
row.append(left).append(middle).append(right).data(item);
$("#addCustomer_list").append(row);
}
}
......
......@@ -2,7 +2,7 @@
<tbody>
<tr>
<td style="width: 75px;padding: 10px 0;">
<label class="control-label">特色筛选:</label>
<label class="control-label color-red">特色筛选:</label>
</td>
<td>
<div id="feature"></div>
......@@ -10,7 +10,7 @@
</tr>
<tr>
<td style="display: inline;padding: 10px 0;margin-left: 75px;">
<button type="button" class="button action" id="addFeatureBtn">
<button type="button" class="btn btn-success" id="addFeatureBtn">
添加特色
</button>
</td>
......
......@@ -7,7 +7,7 @@
<td>
<div id="houseImg">
</div>
<button type="button" class="button action" data-toggle="modal" data-target="#myModal" id="recHouseBt">
<button type="button" class="btn btn-success" data-toggle="modal" data-target="#myModal" id="recHouseBt">
添加房源
</button>
</td>
......@@ -38,7 +38,7 @@
var recommendHouse = $("<input>").attr({"type":"hidden","name":"data[recommend][]","value":data.id});
var url = url;
var img = $("<img>").attr({"src":data.path,"height":90,"width":140,"style":"margin-right:50px;margin-bottom:10px;"});
var cancel = $("<input>").attr({"type":"button","value":"删除"}).addClass("button action imgCancel");
var cancel = $("<input>").attr({"type":"button","value":"删除"}).addClass("btn btn-info imgCancel");
var p = $("<p>").append(img).append(cancel).append(recommendHouse);
$("#houseImg").append(p);
controlCommand("houseImg",3,0);
......
......@@ -29,7 +29,7 @@
<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 }}">
<input type="submit" id="submit" class="button action" value="搜索">
<input type="submit" id="submit" class="btn btn-success" value="搜索">
</div>
</form>
{{ function("addCommissionTable") }}
......
......@@ -26,7 +26,7 @@
<input type="hidden" name="data[recConsultant]" value="{{ consultant.consultanId }}">
</div>
{% endif %}
<button type="button" class="button action" data-toggle="modal" data-target="#myConsultant" id="recConsultantBt">
<button type="button" class="btn btn-success" data-toggle="modal" data-target="#myConsultant" id="recConsultantBt">
选择员工
</button>
</div>
......@@ -66,7 +66,7 @@
<br/>
<div class="row">
<div class="col-md-8">
<button type="button" class="button action" id="paid">
<button type="button" class="btn btn-success" id="paid">
添加实收佣金
</button>
</div>
......
......@@ -30,7 +30,7 @@
<br />
<div class="row addBorder">
<div class="col-md-6" class="form-control">
<label for="business">业务:</label>
<label for="business" class="color-red">业务:</label>
<select name="business" id="business" {{disabled}}>
<option value="-1">请选择</option>
<option value="0">新房</option>
......@@ -48,11 +48,11 @@
<br />
<div class="row addBorder">
<div class="col-md-6">
<label for="houseNumberText">房源编号:</label>
<label for="houseNumberText" class="color-red">房源编号:</label>
<input name="houseNumberText" type="text" value="{{result.houseNumber}}" class="form-control" disabled>
</div>
<div class="col-md-6">
<label for="addressText">房源地址:</label>
<label for="addressText" class="color-red">房源地址:</label>
<input name="addressText" type="text" value="{{result.address}}" class="form-control" style="width:60%;" disabled>
<input type="button" id="select_house" value="选择" data-toggle="modal" data-target="#myModal" class="form-control" {{disabled}}>
</div>
......@@ -60,34 +60,34 @@
<br />
<div class="row addBorder">
<div class="col-md-6">
<label for="customerNumberText">客源编号:</label>
<label for="customerNumberText" class="color-red">客源编号:</label>
<input name="customerNumberText" type="text" value="{{result.customerNumber}}" class="form-control" style="width:60%;" disabled>
<input type="button" id="select_customer" value="选择" data-toggle="modal" data-target="#addCustomer" class="form-control" {{disabled}}>
</div>
<div class="col-md-6">
<label for="signedDate">签约日:</label>
<label for="signedDate" class="color-red">签约日:</label>
<input name="signedDate" type="date" value="{{result.signedDate}}" class="form-control">
</div>
</div>
<br />
<div class="row addBorder">
<div class="col-md-6">
<label for="permitNumber">产证:</label>
<label for="permitNumber" class="color-red">产证:</label>
<input name="permitNumber" id="permitNumber" type="text" value="{{result.permitNumber}}" class="form-control">
</div>
<div class="col-md-6">
<label for="area">面积:</label>
<label for="area" class="color-red">面积:</label>
<input name="area" id="area" type="text" value="{{result.area}}" class="form-control">平方米
</div>
</div>
<br />
<div class="row addBorder">
<div class="col-md-6">
<label for="price">合同金额:</label>
<label for="price" class="color-red">合同金额:</label>
<input name="price" id="price" type="text" value="{{result.price}}" class="form-control" {{disabled}}>
</div>
<div class="col-md-6">
<label for="managerId">主管:</label>
<label for="managerId" class="color-red">主管:</label>
<select name="managerId" id="managerId" class="form-control">
{% for item in managers %}
<option value="{{item.ID}}">{{item.display_name}}</option>
......@@ -129,7 +129,7 @@
{% endfor %}
</tbody>
</table>
<button type="button" id="contractPicture" class="button action" data-toggle="modal" style="margin-top: 10px;margin-left: 15px">
<button type="button" id="contractPicture" class="btn btn-success" data-toggle="modal" style="margin-top: 10px;margin-left: 15px">
添加合同图片
</button>
<input type="hidden" name="exists_photo_ids" value="{{exists_photo_ids}}" >
......@@ -143,63 +143,47 @@
<div class="col-md-6 ">
<h4 class="addBorder">业主信息</h4>
<p class="addBorder">
<label for="oName">业主姓名:</label>
<label for="oName" class="color-red">业主姓名:</label>
<input name="oName" id="oName" type="text" value="{{result.oName}}" class="form-control ">
</p>
<p class="addBorder">
<label for="oPhone">手机:</label>
<label for="oPhone" class="color-red">手机:</label>
<input name="oPhone" id="oPhone" type="text" value="{{result.oPhone}}" class="form-control" {{disabled}}>
</p>
<p class="addBorder">
<label for="oID">身份证:</label>
<label for="oID" class="color-red">身份证:</label>
<input name="oID" id="oID" type="text" value="{{result.oID}}" class="form-control">
</p>
<p class="addBorder">
<label for="oBroker">经纪人:</label>
<input name="oBroker" id="oBroker" type="text" value="{{result.oBroker}}" placeholder="佣金管理设置后自动填充" readonly class="form-control">
</p>
<p class="addBorder">
<label for="oCommission">佣金:</label>
<input name="oCommission" id="oCommission" type="text" value="{{result.oCommission}}" class="form-control" {{disabled}}>
</p>
<p class="addBorder">
<label for="oAddress">地址:</label>
<label for="oAddress" class="color-red">地址:</label>
<input name="oAddress" id="oAddress" type="text" value="{{result.oAddress}}" class="form-control">
</p>
<h4 class="addBorder">贷款</h4>
<p class="addBorder">
<label for="oPayBack">偿还形式:</label>
<label for="oPayBack" class="color-red">偿还形式:</label>
<input name="oPayBack" id="oPayBack" type="text" value="{{result.oPayBack}}" class="form-control">
</p>
<p class="addBorder">
<label for="oMoney">偿还金额:</label>
<label for="oMoney" class="color-red">偿还金额:</label>
<input name="oMoney" id="oMoney" type="text" value="{{result.oMoney}}" class="form-control">
</p>
</div>
<div class="col-md-6">
<h4 class="addBorder">买方信息</h4>
<p class="addBorder">
<label for="cName">买方姓名:</label>
<label for="cName" class="color-red">买方姓名:</label>
<input name="cName" id="cName" type="text" value="{{result.cName}}" class="form-control">
</p>
<p class="addBorder">
<label for="cPhone">手机:</label>
<label for="cPhone" class="color-red">手机:</label>
<input name="cPhone" id="cPhone" type="text" value="{{result.cPhone}}" class="form-control" {{disabled}}>
</p>
<p class="addBorder">
<label for="cID">身份证:</label>
<label for="cID" class="color-red">身份证:</label>
<input name="cID" id="cID" type="text" value="{{result.cID}}" class="form-control">
</p>
<p class="addBorder">
<label for="cBroker">经纪人:</label>
<input name="cBroker" id="cBroker" type="text" value="{{result.oBroker}}" placeholder="佣金管理设置后自动填充" readonly class="form-control">
</p>
<p class="addBorder">
<label for="cCommission">佣金:</label>
<input name="cCommission" id="cCommission" type="text" value="{{result.cCommission}}" class="form-control" {{disabled}}>
</p>
<p class="addBorder">
<label for="cAddress">地址:</label>
<label for="cAddress" class="color-red">地址:</label>
<input name="cAddress" id="cAddress" type="text" value="{{result.cAddress}}" class="form-control">
</p>
</div>
......@@ -230,17 +214,18 @@
</div>
<input type="hidden" name="buy[consultantId]" value="{{ consultant[0].consultantId }}">
</div>
{% endif %}
<button type="button" class="button action " data-toggle="modal" data-target="#myConsultant" id="recConsultantBt_buy" {{disabled}}>
选择员工
{% else %}
<button type="button" class="btn btn-success" data-toggle="modal" data-target="#myConsultant" id="recConsultantBt_sell" {{disabled}}>
选择员工
</button>
{% endif %}
</div>
</div>
</div>
<br/>
<div class="row addBorder">
<div class="col-md-8">
<label for="businessType">应佣类型:</label>
<label for="businessType" class="color-red">应佣类型:</label>
<select name="businessType" {{disabled}}>
<option value="0">买卖</option>
<option value="1">租赁</option>
......@@ -250,21 +235,21 @@
<br/>
<div class="row addBorder">
<div class="col-md-8">
<label for="buy[accounts]">应收佣金:</label>
<label for="buy[accounts]" class="color-red">应收佣金:</label>
<input name="buy[accounts]" id="accounts_buy" type="text" class="form-control" {% if commission[0] %}value = "{{commission[0].accounts}}" readonly {% endif %}>
</div>
</div>
<br/>
<div class="row addBorder">
<div class="col-md-8">
<label for="buy[mtime]">应收时间:</label>
<label for="buy[mtime]" class="color-red">应收时间:</label>
<input name="buy[mtime]" type="date" class="form-control" {% if commission[0] %}value = "{{commission[0].mtime}}" readonly {% endif %}>
</div>
</div>
<br/>
<div class="row addBorder">
<div class="col-md-8">
<button type="button" class="button action" id="paid_buy">
<button type="button" class="btn btn-success" id="paid_buy">
添加实收佣金
</button>
</div>
......@@ -327,17 +312,18 @@
</div>
<input type="hidden" name="sell[consultantId]" value="{{ consultant[1].consultantId }}">
</div>
{% endif %}
<button type="button" class="button action" data-toggle="modal" data-target="#myConsultant" id="recConsultantBt_sell" {{disabled}}>
选择员工
{% else %}
<button type="button" class="btn btn-success" data-toggle="modal" data-target="#myConsultant" id="recConsultantBt_sell" {{disabled}}>
选择员工
</button>
{% endif %}
</div>
</div>
</div>
<br/>
<div class="row addBorder">
<div class="col-md-8">
<label for="businessType">应佣类型:</label>
<label for="businessType" class="color-red">应佣类型:</label>
<select name="businessType" {{disabled}}>
<option value="0">买卖</option>
<option value="1">租赁</option>
......@@ -347,21 +333,21 @@
<br/>
<div class="row addBorder">
<div class="col-md-8">
<label for="sell[accounts]">应收佣金:</label>
<label for="sell[accounts]" class="color-red">应收佣金:</label>
<input name="sell[accounts]" id="accounts_sell" type="text" class="form-control" {% if commission[1] %}value = "{{commission[1].accounts}}" readonly {% endif %}>
</div>
</div>
<br/>
<div class="row addBorder">
<div class="col-md-8">
<label for="sell[mtime]">应收时间:</label>
<label for="sell[mtime]" class="color-red">应收时间:</label>
<input name="sell[mtime]" type="date" class="form-control" {% if commission[1] %}value = "{{commission[1].mtime}}" readonly {% endif %}>
</div>
</div>
<br/>
<div class="row addBorder">
<div class="col-md-8">
<button type="button" class="button action" id="paid_sell">
<button type="button" class="btn btn-success" id="paid_sell">
添加实收佣金
</button>
</div>
......@@ -412,14 +398,16 @@
<input type="hidden" name="commissionId_sell" value="{{commission[1].id}}">
{% endif %}
<input type="hidden" name="address" id="address">
{% if htEdit %}
<div class="row" style="position: fixed;">
<select name="status" id="status">
{% for item in status %}
<option value="{{item.id}}">{{item.value}}</option>
{% endfor %}
</select>
<input type="submit" id="submit" class="button action">
<input type="submit" id="submit" class="btn btn-info">
</div>
{% endif %}
</div>
</div>
</form>
......@@ -467,11 +455,19 @@
price:'required',
signedDate:'required',
'buy[accounts]':'required',
'buy[mtime]':'required',
'sell[accounts]':'required',
oCommission:'required',
'sell[mtime]':'required',
oName:'required',
oPhone:'required',
cCommission:'required',
cPhone:'required'
oID:'required',
oAddress:'required',
oPayBack:'required',
oMoney:'required',
cName:'required',
cPhone:'required',
cID:'required',
cAddress:'required'
};
$('#contract').validate({
......@@ -484,23 +480,29 @@
houseNumber:'请选择房源',
customerNumber:'请选择客源',
businessId:'请选择业务类型',
permitNumber:'请输入产证编号',
area:'请输入面积',
price:'请输入金额',
signedDate:'请输入签约日期',
permitNumber:'请输入产证编号',
area:'请输入面积',
price:'请输入金额',
signedDate:'请输入签约日期',
'buy[accounts]':'请输入买方应收佣金',
'buy[mtime]':'请输入买方应收时间',
'sell[accounts]':'请输入卖方应收佣金',
oCommission:'请选业主佣金',
oPhone:'请选业主手机',
cCommission:'请选买方佣金',
cPhone:'请选买方手机'
'sell[mtime]':'请输入卖方应收时间',
oName:'请输入业主姓名',
oPhone:'请输入业主手机',
oID:'请输入业主身份证',
oAddress:'请输入业主地址',
oPayBack:'请输入偿还形式',
oMoney:'请输入偿还金额',
cName:'请输入买方姓名',
cPhone:'请输入买方手机',
cID:'请输入买方身份证',
cAddress:'请输入买方地址'
},
errorContainer: "#messageBox1",
errorLabelContainer: "#messageBox1",
submitHandler: function (form) {
console.log($("input[name='sell[consultantId]']").val() == undefined);
console.log($("input[name='buy[consultantId]']").val() == undefined);
if($("input[name='sell[consultantId]']").val() == undefined && $("input[name='buy[consultantId]']").val() == undefined){
if($("input[name='sell[consultantId]']").val() == undefined || $("input[name='buy[consultantId]']").val() == undefined){
$("#messageBox1").removeAttr("style");
var label = $("<label>").append("请选择员工").addClass("my-error-class");
$("#messageBox1").append(label);
......
......@@ -40,8 +40,8 @@
</div>
</div>
<div class="row" style="margin-top: 10px;margin-left: 0px">
<input type="submit" id="submit" class="button action" value="搜索">
<input type="button" id="reset"class="button action" value="重置">
<input type="submit" id="submit" class="btn btn-info" value="搜索">
<input type="button" id="reset"class="btn btn-success" value="重置">
</div>
<input type="hidden" name="page" value="contractList"/>
</form>
......
......@@ -19,4 +19,63 @@ p[class^=col-]{
#photoTables th,#photoTables td{
text-align: center;
}
.wp-list-table > thead > tr > th{
border: 1px solid #c4e2ff;
}
#the-list > tr ,#the-list > tr > td{
border: 1px solid #c4e2ff;
}
.manage-column {
border: 1px solid #c4e2ff;
}
.wp-list-table > tfoot > tr > th{
border: 1px solid #c4e2ff;
}
/*.wp-list-table > thead > tr > .column-id,*/
/*.wp-list-table > thead > tr >.column-name,*/
/*.wp-list-table > tfoot > tr > .column-id,*/
/*.wp-list-table > tfoot > tr > .column-name,*/
/*#the-list > tr >.column-id{*/
/*border-left: 0px;*/
/*}*/
/*#cb,.wp-list-table > tfoot > tr > .column-cb{*/
/*border-right: 0px;*/
/*}*/
.color-red{
color: red;
}
.nav-tabs>li.active>a, .nav-tabs>li.active>a:focus, .nav-tabs>li.active>a:hover{
background-color: transparent;
}
.widefat *,.widefat thead th,.widefat tfoot th{
text-align: center;
}
.widefat td{
vertical-align: middle;
}
.widefat tbody th.check-column,
.widefat tfoot th.check-column,
.widefat thead th.check-column
{
padding: 0px 0 0 0px;
text-align: center;
vertical-align: middle;
}
.widefat th input{
margin: 0 0 0 0px;
}
th.sortable a span, th.sorted a span{
float: none;
}
\ No newline at end of file
......@@ -56,7 +56,7 @@
{% endif %}
</div>
<div class="col-md-1">
<input type="submit" id="submit" class="button action" style="position: fixed;">
<input type="submit" id="submit" class="btn btn-info" style="position: fixed;">
{% if role != 'zygw' %}
<div class="row" style="position: fixed;top:50px;">
<select id="status" name="status">
......@@ -81,6 +81,10 @@
setArea("baseCity","baseAreaId","basePlateId");
});
$.validator.addMethod("check", function() {
return $('#demand_type').find('input[type=checkbox]:checked').length > 0;
});
var error = $('#error');
$('#customerForm').validate({
onkeyup: false,
......@@ -102,7 +106,8 @@
},
status: {
min: 0
}
},
demand_type_require: 'check'
},
messages: {
name: '请输入姓名',
......@@ -111,7 +116,8 @@
baseCity: '请选择城市',
baseAreaId: '请选择区域',
basePlateId: '请选择板块',
status: '请选择状态'
status: '请选择状态',
demand_type_require: "请选择需求类型"
},
errorLabelContainer: error,
submitHandler: function (form) {
......
<br>
<div class="row addBorder">
<div class="col-md-10">
<div class="col-md-10" id="demand_type">
<label for="character" class="color-red">需求类型:</label>
<input type="hidden" name="demand_type_require">
<input type="checkbox" name="new_house" id="new_house" value="{{ result.new_house }}" style="margin: 0;"{% if
result.new_house == 1 %} checked {% endif %}>
<label for="new_house">新房</label>
......
<br>
<div class="row addBorder">
<div class="col-md-12">
<label>城市:</label>
<label class="color-red">城市:</label>
<label for="baseCity"></label>
<select id="baseCity" name="baseCity" class="form-control">
<option value="-1">城市</option>
......
<br>
<div class="row addBorder">
<div class="col-md-6">
<label for="name">姓名:</label>
<label for="name" class="color-red">姓名:</label>
<input type="text" name="name" id="name" value="{{ result.name }}" class="form-control">
</div>
<div class="col-md-6">
......@@ -16,7 +16,7 @@
<br>
<div class="row addBorder">
<div class="col-md-8">
<label for="phone">电话:</label>
<label for="phone" class="color-red">电话:</label>
<input type="text" name="phone" id="phone" value="{{ result.phone }}" class="form-control">
</div>
</div>
......
......@@ -111,7 +111,7 @@
<label for="search_max_time" class="hidden"></label>
<input type="date" name="search_max_time" id="search_max_time" value="{{ req.search_max_time }}">
<input type="submit" id="submit" class="button action" value="搜索">
<input type="submit" id="submit" class="btn btn-success" value="搜索">
</div>
</form>
<form method="post">
......
......@@ -26,7 +26,7 @@
<label for="search_max_time" class="hidden"></label>
<input type="date" name="search_max_time" id="search_max_time" value="{{ req.search_max_time }}">
<input type="submit" id="submit" class="button action" value="搜索">
<input type="submit" id="submit" class="btn btn-success" value="搜索">
</div>
</form>
<form method="post">
......
......@@ -6,7 +6,7 @@
<h2>添加{{ text }}</h2>
<label for="feature">{{ text }}:</label>
<input id="feature" type="text">
<input type="submit" id="submit" class="button">
<input type="submit" id="submit" class="btn btn-info">
<h2>{{ text }}列表</h2>
<table class="table">
<thead>
......
......@@ -42,6 +42,6 @@
{% include 'recConsultant.html' %}
{{ block('recConsultant') }}
{% endif %}
<input type="submit" id="handle" class="button action" value="提交处理">
<input type="submit" id="handle" class="btn btn-info" value="提交处理">
</div>
</form>
\ No newline at end of file
......@@ -5,12 +5,12 @@
{% endif %}
<div class="row form-group">
<div class="col-xs-4">
<label for="baseCity" class="control-label" style="margin-right: 5px;width: auto;">城市:</label>
<label for="baseCity" class="control-label color-red" style="margin-right: 5px;width: auto;">城市:</label>
<span>
<select id="baseCity" name="baseCity" class="form-control" style="width: 75px;">
<option value="-1"> 城市</option>
{% for item in city %}
<option {{ item.id == result.city_id?"selected":"" }} value="{{ item.id }}">{{ item.value }}</option>
<option {% if result.city_id %}{{ item.id == result.city_id ?"selected":"" }}{% else %}{{ item.id == 2 ?"selected" }}{% endif %} value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
</select>
</span>
......@@ -36,7 +36,7 @@
</span>
</div>
<div class="col-xs-4">
<label for="address" class="control-label">小区名称:</label>
<label for="address" class="control-label color-red">小区名称:</label>
<p class="col-xs-7">
<input name="community_name" type="text" value="{{result.community_name}}" class="form-control">
</p>
......@@ -51,19 +51,19 @@
</div>
<div class="row form-group">
<div class="col-xs-4">
<label for="suite" class="control-label">门牌号码:</label>
<label for="suite" class="control-label color-red">门牌号码:</label>
<p class="col-xs-7">
<input name="suite" type="text" value="{{result.suite}}" class="form-control">
</p>
</div>
<div class="col-xs-4">
<label for="floor" class="control-label">楼层:</label>
<label for="floor" class="control-label color-red">楼层:</label>
<p class="col-xs-7">
<input name="floor" type="text" value="{{result.floor}}" class="form-control">
</p>
</div>
<div class="col-xs-4">
<label for="totalFloor" class="control-label">总层:</label>
<label for="totalFloor" class="control-label color-red">总层:</label>
<p class="col-xs-7">
<input type="text" name="totalFloor" value="{{result.totalFloor}}" class="form-control">
</p>
......@@ -112,7 +112,7 @@
</div>
<div class="row form-group">
<div class="col-xs-8">
<label for="from" class="control-label">户型:</label>
<label for="from" class="control-label color-red">户型:</label>
<span style="display: inline-block;width: 50px;">
<select name="roomNum" class="form-control">
<option value="0">0</option>
......@@ -180,7 +180,7 @@
<div class="row form-group">
<div class="col-xs-4">
<label for="covered_area" class="control-label">建筑面积:</label>
<label for="covered_area" class="control-label color-red">建筑面积:</label>
<p class="col-xs-6">
<input name="covered_area" type="text" value="{{result.covered_area}}" class="form-control">
</p>
......@@ -261,7 +261,7 @@
{% if house_type == 1 %}
<div class="col-xs-4">
<label for="total_price" class="control-label">总价:</label>
<label for="total_price" class="control-label color-red">总价:</label>
<p class="col-xs-5">
<input name="total_price" id="total_price" type="text" value="{{result.total_price}}" class="form-control">
</p>
......@@ -270,7 +270,7 @@
</p>
</div>
<div class="col-xs-4">
<label for="average_price" class="control-label">单价:</label>
<label for="average_price" class="control-label color-red">单价:</label>
<p class="col-xs-6">
<input name="average_price" id="average_price" type="text" value="{{result.average_price}}" class="form-control">
</p>
......@@ -369,7 +369,7 @@
<div class="row form-group">
<div class="col-xs-8">
<label for="overview" class="control-label">房源点评:</label>
<label for="overview" class="control-label color-red">房源点评:</label>
<p class="col-xs-10">
<textarea name="overview" rows="4" cols="60" class="form-control">{{result.overview}}</textarea>
</p>
......@@ -379,13 +379,13 @@
{% if not houseId %}
<div class="row form-group">
<div class="col-xs-4">
<label for="owner_name" class="control-label">业主姓名:</label>
<label for="owner_name" class="control-label color-red">业主姓名:</label>
<p class="col-xs-7">
<input name="owner_name" id="owner_name" type="text" value="" class="form-control">
</p>
</div>
<div class="col-xs-4">
<label for="owner_phone" class="control-label">业主电话:</label>
<label for="owner_phone" class="control-label color-red">业主电话:</label>
<p class="col-xs-7">
<input name="owner_phone" id="owner_phone" type="text" value="" class="form-control">
</p>
......
......@@ -240,6 +240,7 @@
init_modal_myConsultantList(function (data) {
var consultant_id = Number(data.id);
$('#allot_consultant_id').val(consultant_id);
$( "#doaction" ).trigger( "click" );
});
$("#myConsultant").on("hide.bs.modal", function () {
......
......@@ -13,7 +13,7 @@
<select id="listCity" name="listCity" class="form-control">
<option value="-1"> 城市</option>
{% for item in city %}
<option {{ item.id == cityId ?"selected":"" }} value="{{ item.id }}">{{ item.value }}</option>
<option {% if cityId %}{{ item.id == cityId ?"selected":"" }}{% else %}{{ item.id == 2 ?"selected" }}{% endif %} value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
</select>
<select id="listDistrict" name="listDistrict" class="form-control">
......@@ -100,7 +100,7 @@
<input type="text" name="stuff" class="form-control" {% if req %}value="{{req.stuff}}"{% endif %}>
<input type="hidden" name="hasSearch" value="1"/>
<input type="hidden" id="house_type" value="{{house_type}}"/>
<input type="submit" id="submit" class="button action" value="搜索">
<input type="submit" id="submit" class="btn btn-success" value="搜索">
</div>
</form>
<form method="post">
......@@ -124,6 +124,9 @@
var totalPrice = $("#totalPrice");
var rentalPrice = $("#rentalPrice");
var averagePrice = $("#averagePrice");
if($("#listCity").val() != -1&&$("#listDistrict").val() == -1&&$("#listPlate").val() == -1){
setCity("listCity", "listDistrict", "listPlate");
};
$("#listCity").change(function() {
var cityId = $("#listCity").val();
setCity("listCity", "listDistrict", "listPlate");
......
......@@ -61,7 +61,7 @@
var areatext = $("<input>").attr({"type":"text","placeholder":"面积","name":"data["+i+"][housearea]","style":"width:80%"}).addClass("form-control");
div3.append(areatext);
var div4 = $("<div>").addClass("col-md-3");
var button = $("<input>").attr({"type":"button","value":"删除","property":+i,"id":+i}).addClass("button action cancel");
var button = $("<input>").attr({"type":"button","value":"删除","property":+i,"id":+i}).addClass("btn btn-info cancel");
div4.append(button);
var type = $("<input>").attr({"type":"hidden","name":"data["+i+"][type]","value":4,"property":+i});
var mainHousePic = $("<input>").attr({"type":"hidden","name":"data["+i+"][mainHouse]","value":0,"property":+i});
......
......@@ -3,12 +3,12 @@
<br/>
<div class="row form-group">
<div class="col-xs-4">
<label for="baseCity" class="control-label" style="margin-right: 5px;width: auto;">城市:</label>
<label for="baseCity" class="control-label color-red" style="margin-right: 5px;width: auto;">城市:</label>
<span>
<select id="baseCity" name="baseCity" class="form-control" style="width: 75px;">
<option value="-1"> 城市</option>
{% for item in city %}
<option {{ item.id == result.city_id?"selected":"" }} value="{{ item.id }}">{{ item.value }}</option>
<option {% if result.city_id %}{{ item.id == result.city_id ?"selected":"" }}{% else %}{{ item.id == 2 ?"selected" }}{% endif %} value="{{ item.id }}">{{ item.value }}</option>
{% endfor %}
</select>
</span>
......@@ -34,14 +34,14 @@
</span>
</div>
<div class="col-xs-4">
<label for="address" class="control-label">小区名称:</label>
<label for="address" class="control-label color-red">小区名称:</label>
<p class="col-xs-7">
<input name="community_name" type="text" value="{{result.community_name}}" class="form-control">
</p>
</div>
<div class="col-xs-4">
<label for="address" class="control-label">地址:</label>
<label for="address" class="control-label color-red">地址:</label>
<p class="col-xs-7">
<input name="address" type="text" value="{{result.address}}" class="form-control">
</p>
......@@ -102,7 +102,7 @@
<div class="row form-group">
<div class="col-xs-4">
<label for="covered_area" class="control-label">建筑面积:</label>
<label for="covered_area" class="control-label color-red">建筑面积:</label>
<p class="col-xs-6">
<input name="covered_area" type="text" value="{{result.covered_area}}" class="form-control">
</p>
......@@ -132,7 +132,7 @@
</p>
</div>
<div class="col-xs-4">
<label for="property_money" class="control-label">物业费:</label>
<label for="property_money" class="control-label color-red">物业费:</label>
<p class="col-xs-6">
<input name="property_money" type="text" value="{{result.property_money}}" class="form-control" >
</p>
......@@ -171,7 +171,7 @@
<div class="row form-group">
<div class="col-xs-8">
<label for="latest_news" class="control-label">最新动态:</label>
<label for="latest_news" class="control-label color-red">最新动态:</label>
<p class="col-xs-10">
<textarea name="latest_news" rows="4" cols="60" class="form-control">{{result.latest_news}}</textarea>
</p>
......@@ -180,7 +180,7 @@
<div class="row form-group">
<div class="col-xs-8">
<label for="overview" class="control-label">楼盘概述:</label>
<label for="overview" class="control-label color-red">楼盘概述:</label>
<p class="col-xs-10">
<textarea name="overview" rows="4" cols="60" class="form-control">{{result.overview}}</textarea>
</p>
......
......@@ -36,13 +36,13 @@
<!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active">
<a href="#info" aria-controls="info" role="tab" data-toggle="tab">基本信息</a>
<a href="#info" aria-controls="info" role="tab" data-toggle="tab" class="backColor">基本信息</a>
</li>
<li role="presentation">
<a href="#mainHouse" aria-controls="mainHouse" role="tab" data-toggle="tab">其他信息</a>
<a href="#mainHouse" aria-controls="mainHouse" role="tab" data-toggle="tab" class="backColor">其他信息</a>
</li>
<li role="presentation">
<a href="#customer_tracking" aria-controls="customer_tracking" role="tab" data-toggle="tab">房源跟进</a>
<a href="#customer_tracking" aria-controls="customer_tracking" role="tab" data-toggle="tab" class="backColor">房源跟进</a>
</li>
</ul>
<!-- Tab panes -->
......@@ -96,7 +96,7 @@
</select>
{% endif %}
{% endif %}
<input type="submit" id="submit" class="button action">
<input type="submit" id="submit" class="btn btn-info">
{% endif %}
</div>
</div>
......@@ -117,6 +117,9 @@
<script>
(function($){
$(document).ready(function(){
if($("#baseCity").val() != -1 && $("#baseAreaId").val() == -1 && $("#basePlateId").val() == -1){
setCity("baseCity","baseAreaId","basePlateId");
};
$("#baseCity").change(function(){
setCity("baseCity","baseAreaId","basePlateId");
});
......
......@@ -9,7 +9,7 @@
</style>
<div id="addPhotos">
<div class="row">
<label for="photos" style="float: left;margin-top: 25px;margin-left: 15px;">房源相册:</label>
<label for="photos" class="color-red" style="float: left;margin-top: 25px;margin-left: 15px;">房源相册:</label>
<div class="col-md-7">
<table class="form-table" id="photoTables">
<thead>
......@@ -49,7 +49,7 @@
</tbody>
</table>
</div>
<button type="button" id="housePicture" class="button action" data-toggle="modal" style="margin-left: 130px;margin-bottom: 20px;clear: both;display: block;">
<button type="button" id="housePicture" class="btn btn-success" data-toggle="modal" style="margin-left: 130px;margin-bottom: 20px;clear: both;display: block;">
新增
</button>
<input type="hidden" name="exists_photo_ids" value="{{exists_photo_ids}}" >
......@@ -75,7 +75,7 @@
var radio = $("<input>").attr({"type":"radio","name":"frontCover","value":i}).addClass("form-control");
var td3 = td.clone().append(radio);
var picDelet = $("<input>").attr({"type":"button","value":"删除"}).addClass("button action existsCancel");
var picDelet = $("<input>").attr({"type":"button","value":"删除"}).addClass("btn btn-info existsCancel");
var td4 = td.clone().append(picDelet);
tr.append(td1).append(td2).append(td3).append(td4);
......
......@@ -66,6 +66,7 @@
</div>
</div>
<input type="submit" id="submit" class="button action" value="搜索">
<a class="button action" href="{{ url }}&action=statistics">即时统计</a>
</form>
{{ function("addProgressTable") }}
</div>
......
......@@ -9,7 +9,7 @@
<option value="2015">2015</option>
<option value="2016">2016</option>
</select>
<input type="submit" id="submit" class="button action" value="搜索">
<input type="submit" id="submit" class="btn btn-success" value="搜索">
<!--
<select name="month" id="month">
<option value="1">一月</option>
......
......@@ -23,7 +23,7 @@
</div>
</div>
<div style="margin-top: 10px">
<button type="button" class="button action" id="searchConsult">搜索</button>
<button type="button" class="btn btn-success" id="searchConsult">搜索</button>
</div>
</div>
......@@ -98,7 +98,9 @@
consultantArray.push(Number($(item).val()));
});
if($.inArray(Number($(this).data().id),consultantArray) == -1){
callback($(this).data());
if (confirm('是否确定选择职业顾问')) {
callback($(this).data());
}
}else{
alert('不能重复置业顾问');
}
......
......@@ -50,10 +50,10 @@
</select>
</div>
<div class="col-md-6">
<input type="text" placeholder="请出入楼盘名/地段名搜索" id="myModal_searchtext" class="form-control">
<input type="text" placeholder="楼盘名/地段名/房源编号搜索" id="myModal_searchtext" class="form-control">
</div>
<div class="col-md-2">
<button type="button" class="button action" id="myModal_search">搜索</button>
<button type="button" class="btn btn-success" id="myModal_search">搜索</button>
</div>
</div>
</div>
......
......@@ -88,7 +88,7 @@
</select>
{% endif %}
{% endif %}
<input type="submit" id="submit" class="button action">
<input type="submit" id="submit" class="btn btn-info">
{% endif %}
{% endif %}
</div>
......@@ -110,6 +110,9 @@
<script>
(function($){
$(document).ready(function(){
if($("#baseCity").val() != -1 && $("#baseAreaId").val() == -1 && $("#basePlateId").val() == -1){
setCity("baseCity","baseAreaId","basePlateId");
};
$("#baseCity").change(function(){
setCity("baseCity","baseAreaId","basePlateId");
});
......
......@@ -67,7 +67,7 @@
<input type="hidden" name="handle" value="1">
{% endif %}
{% if handle == 0 %}
<input type="submit" id="submit" class="button action" value="提交处理">
<input type="submit" id="submit" class="btn btn-info" value="提交处理">
{% endif %}
</div>
</form>
\ No newline at end of file
......@@ -22,7 +22,7 @@
<h2>新增客户跟踪</h2>
<h4 class="addBorder">跟进记录</h4>
<p class="addBorder">
<span>跟进类型:</span>
<span class="color-red">跟进类型:</span>
<span>
<select id="customer_tracking_status" name="customer_tracking_status">
{% set customer_tracking_status = function('CustomerTrackingDao::search_status') %}
......@@ -34,7 +34,7 @@
</span>
</p>
<p class="addBorder">
<span style="vertical-align: top;">跟进说明:</span>
<span style="vertical-align: top;" class="color-red">跟进说明:</span>
<span>
<textarea rows="8" id="description" name="description" class="form-control" style="width: 250px;resize: none;"></textarea>
<label for="description"></label>
......
......@@ -93,7 +93,7 @@
<input type="hidden" name="userType" value="{{houseId}}">
{% endif %}
{% endif %}
<input type="submit" id="submit" class="button action">
<input type="submit" id="submit" class="btn btn-info">
{% endif %}
{% endif %}
</div>
......@@ -115,6 +115,9 @@
<script>
(function($){
$(document).ready(function(){
if($("#baseCity").val() != -1 && $("#baseAreaId").val() == -1 && $("#basePlateId").val() == -1){
setCity("baseCity","baseAreaId","basePlateId");
};
$("#baseCity").change(function(){
setCity("baseCity","baseAreaId","basePlateId");
});
......@@ -197,7 +200,7 @@
totalFloor:'请输入总层',
owner_name:'请输入业主姓名',
owner_phone:'请输入业主电话',
total_price:'请输入价',
total_price:'请输入价',
average_price:'请输入单价',
covered_area:'请输入建筑面积',
community_name:'请输入小区名称',
......
......@@ -6,7 +6,7 @@
<span id="name">选择zip压缩文件</span>
</a>
<br>
<input type="submit" class="button action" value="提交">
<input type="submit" class="btn btn-info" value="提交">
</form>
</div>
<script>
......
<div class="row form-group">
<div class="col-xs-4">
<label for="housename" class="control-label">微信标题:</label>
<label for="housename" class="control-label color-red">微信标题:</label>
<p class="col-xs-7">
<input name="housename" id="housename" type="text" value="{{result.name}}" class="form-control" >
</p>
</div>
{% if house_type == 0 %}
<div class="col-xs-4">
<label for="average_price" class="control-label">均价:</label>
<label for="average_price" class="control-label color-red">均价:</label>
<p class="col-xs-6">
<input name="average_price" id="average_price" type="text" value="{{result.average_price}}" class="form-control">
</p>
......@@ -30,7 +30,7 @@
</tr>
<tr>
<td style="display: inline;padding: 10px 0;margin-left: 75px;">
<button type="button" class="button action" id="addTagBtn">
<button type="button" class="btn btn-success" id="addTagBtn">
标签
</button>
</td>
......
......@@ -33,7 +33,7 @@ class CustomerDao
{
global $wpdb;
$search = "%" . $_REQUEST['search'] . "%";
$sql = "SELECT tcs.id,tcs.name,tcs.phone FROM " . Config::TOSPUR_CUSTOMER_TABLE . " tcs where (tcs.name like %s or tcs.phone like %s)";
$sql = "SELECT tcs.id,tcs.name,tcs.phone FROM " . Config::TOSPUR_CUSTOMER_TABLE . " tcs where (tcs.id like %s or tcs.name like %s or tcs.phone like %s)";
switch ($_REQUEST["customerDemand"]) {
case "0":
$sql .= " and tcs.new_house = 1";
......@@ -45,7 +45,7 @@ class CustomerDao
$sql .= " and tcs.rent_house = 1";
break;
}
$result = DBManager::get_results($wpdb->prepare($sql, $search, $search));
$result = DBManager::get_results($wpdb->prepare($sql, $search, $search, $search));
wp_send_json($result);
}
......
......@@ -26,7 +26,7 @@ class InsertDao{
$prefix = "CZ";
break;
}
$house_number = $prefix.str_pad($cityId,4,'0',STR_PAD_LEFT).str_pad($houseId,8,'0',STR_PAD_LEFT);
$house_number = $prefix . current_time('YmdHis') . floor(microtime() * 1000);
return DBManager::update(Config::TOSPUR_HOUSE_TABLE,
array(
'house_number' => $house_number
......@@ -91,8 +91,10 @@ class InsertDao{
//主力房源的图片与房子信息关联插入数据库
if(isset($uploadedfile["name"])){
foreach($uploadedfile["name"] as $key=> $value) {
$fileName = explode(".",$uploadedfile["name"][$key]);
$name = md5($fileName[0]).".".$fileName[1];
$uploadParam = array(
"name" => $uploadedfile["name"][$key],
"name" => $name,
"type" => $uploadedfile["type"][$key],
"tmp_name" => $uploadedfile["tmp_name"][$key],
"error" => $uploadedfile["error"][$key],
......
......@@ -330,7 +330,8 @@ class SearchDao
if ($array['searchText'] != null) {
$params[] = '%' . $array['searchText'] . '%';
$params[] = '%' . $array['searchText'] . '%';
$sql = $sql . " and (name like '%s' or address like '%s')";
$params[] = '%' . $array['searchText'] . '%';
$sql = $sql . " and (name like '%s' or address like '%s' or house_number like '%s')";
}
if ($addWhereSql) {
......@@ -370,7 +371,7 @@ class SearchDao
LEFT JOIN " . Config::TOSPUR_ORGANIZATION_TABLE . " tor on tc.subsidiaryId = tor.Id
where 1=1";
$params = array();
if ($organizationId != -1) {
if ($organizationId != null && $organizationId != -1) {
$params[] = $organizationId;
$sql = $sql . " and subsidiaryId=%d";
}
......@@ -382,6 +383,14 @@ class SearchDao
return $result;
}
public static function searchConsultantById($consultantId)
{
global $wpdb;
$sql = "select * from " . Config::TOSPUR_CONSULTANT ." where id = %d";
$result = DBManager::get_results($wpdb->prepare($sql, $consultantId));
return $result;
}
public static function get_house_list($house_result)
{
$array = array();
......
......@@ -78,6 +78,13 @@ function tospur_theme_format(){
$wp_admin_bar->remove_menu('edit-profile');
$wp_admin_bar->remove_menu('view-site');
$wp_admin_bar->remove_menu('user-info');
$wp_admin_bar->remove_node('my-account');
$args = array(
'id' => 'logout',
'title' => wp_get_current_user()->display_name.',登出',
'parent' => 'top-secondary',
);
$wp_admin_bar->add_node($args);
}
function tospur_login_logo()
......@@ -103,7 +110,6 @@ function tospur_load_resources(){
wp_enqueue_style('jquery-ui_css');
wp_enqueue_style('bootstrapMinCss');
wp_enqueue_style('publicCss');
}
function tospur_register_script_style(){
......@@ -224,7 +230,8 @@ function custom_role() {
"fdfw_cz" => true,
"yyList"=>true,
"plsc"=>true,
"canEdit"=>true
"canEdit"=>true,
"statistics"=>true
);
add_role("zygw","置业顾问",array(
......@@ -237,6 +244,7 @@ function custom_role() {
"kh"=>true,
"khList"=>true,
"fygj"=>true,
"syjdb"=>true,
"ht"=>true,
"fdfw_cs" => true,
"fdfw_cz" => true,
......@@ -282,7 +290,8 @@ function custom_role() {
"fdfw_cz" => true,
"yyList"=>true,
"plsc"=>true,
"canEdit"=>true
"canEdit"=>true,
"statistics"=>true
));
add_role("jl","经理",array(
......@@ -312,7 +321,8 @@ function custom_role() {
"fdfw_cz" => true,
"yyList"=>true,
"plsc"=>true,
"canEdit"=>true
"canEdit"=>true,
"statistics"=>true
));
}
register_activation_hook( __FILE__, 'custom_role' );
......@@ -327,11 +337,12 @@ function reset_menu()
add_submenu_page('rentHouseList', '添加租房', '添加租房', 'zf', 'rentHouse', 'RentHouse::rentHouse_html');
add_menu_page("我的设置", "我的设置", "mySet", "introduction", "introduction::introduction_html", 'dashicons-menu', 9);
add_menu_page('合同列表','合同列表', 'ht', 'contractList', 'Contract_List::showTableView', 'dashicons-menu', 10);
add_submenu_page('contractList', '添加合同', '添加合同', 'htEdit', 'contract', 'Contract::init_view');
add_submenu_page('contractList', '添加合同', '添加合同', 'ht', 'contract', 'Contract::init_view');
add_menu_page('客户列表','客户列表', 'khList', 'customerList', 'function_customerList', 'dashicons-menu', 11);
add_submenu_page('customerList', '新增客户', '新增客户', 'kh', 'customer', 'customer::customer_html');
add_menu_page('房客跟进', '房客跟进', 'fygj', 'customerTrackingList', 'function_customerTrackingList', 'dashicons-menu', 12);
add_menu_page('置业顾问评分', '置业顾问评分', 'zygwpf', 'consultant_score', 'consultant_score_page', 'dashicons-menu', 14);
add_menu_page('置业顾问', '置业顾问', 'zygwpf', 'consultant_score', 'consultant_score_page', 'dashicons-menu', 14);
add_submenu_page('consultant_score', '置业顾问评分', '置业顾问评分', 'zygwpf', 'consultant_score', 'consultant_score_page');
add_submenu_page('consultant_score', '置业顾问业绩', '置业顾问业绩', 'zygwyj', 'quotaList', 'QuotaYearList::showHtml');
add_menu_page('收佣进度表', '收佣进度表', 'syjdb', 'commissionList', 'function_commissionList', 'dashicons-menu', 15);
add_menu_page('业务进度表', '业务进度表', 'ywjdb', 'progressList', 'function_progressList', 'dashicons-menu', 16);
......
......@@ -416,6 +416,9 @@ a:hover {
#wrapper #scroller ul li p.accept .btn:active {
background-color: #117bb9;
}
#wrapper #scroller ul li p.accept .btn:hover {
color: #ffffff;
}
#wrapper #scroller ul li p.accept .btn:focus {
outline: 0;
}
......
......@@ -450,6 +450,9 @@ a:hover {
.main form .btn:active {
background-color: #117bb9;
}
.main form .btn:hover {
color: #ffffff;
}
.main form .btn:focus {
outline: 0;
}
......@@ -415,6 +415,9 @@ a:hover {
.jumbotron ul li .btn:active {
background-color: #117bb9;
}
.jumbotron ul li .btn:hover {
color: #ffffff;
}
.jumbotron ul li .btn:focus {
outline: 0;
}
......@@ -471,6 +474,9 @@ a:hover {
.footer .btn-group .btn:active {
background-color: #117bb9;
}
.footer .btn-group .btn:hover {
color: #ffffff;
}
.footer .btn-group .btn:focus {
outline: 0;
}
......
......@@ -715,6 +715,9 @@ body {
.footer > .btn:active {
background-color: #117bb9;
}
.footer > .btn:hover {
color: #ffffff;
}
.footer > .btn:focus {
outline: 0;
}
......
......@@ -498,6 +498,9 @@ a:hover {
.container-fluid form .btn:active {
background-color: #117bb9;
}
.container-fluid form .btn:hover {
color: #ffffff;
}
.container-fluid form .btn:focus {
outline: 0;
}
......
......@@ -409,6 +409,9 @@ a:hover {
.container-fluid .btn:active {
background-color: #117bb9;
}
.container-fluid .btn:hover {
color: #ffffff;
}
.container-fluid .btn:focus {
outline: 0;
}
......@@ -501,6 +501,9 @@ a:hover {
.tab-content .tab-pane .btn:active {
background-color: #117bb9;
}
.tab-content .tab-pane .btn:hover {
color: #ffffff;
}
.tab-content .tab-pane .btn:focus {
outline: 0;
}
......
.tab {
width: 100%;
height: 40px;
margin-bottom: 0;
border-bottom: 1px solid #008cd7;
}
.tab li .btn {
color: #000000;
font-size: 18px;
font-weight: bold;
position: static;
}
.tab li .btn:after {
content: "";
width: 88%;
height: 4px;
position: absolute;
bottom: 0;
left: 0;
right: 0;
margin: 0 auto;
}
.tab li .btn:active {
box-shadow: none;
-webkit-box-shadow: none;
}
.tab li.active .btn:after {
background-color: #008cd7;
}
.row {
width: 100%;
height: 121px;
margin: 0;
padding: 15px 0;
border-bottom: 1px solid #b7b7b7;
}
.row p {
width: 140px;
height: 100%;
float: left;
padding: 0 10px;
margin-bottom: 0;
overflow: hidden;
}
.row p img {
height: 100%;
border-top-left-radius: 6px;
border-top-right-radius: 6px;
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
-webkit-border-top-left-radius: 6px;
-webkit-border-top-right-radius: 6px;
-webkit-border-bottom-left-radius: 6px;
-webkit-border-bottom-right-radius: 6px;
}
.row ul {
height: 100%;
padding-right: 10px;
margin-bottom: 0;
overflow: hidden;
zoom: 1;
position: relative;
color: #5a5a5a;
font-size: 15px;
}
.row ul li {
height: 18px;
line-height: 18px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.row ul li span {
margin-right: 15px;
}
.row ul li span:last-child {
margin-right: 0;
}
.row ul li.address {
height: 22px;
line-height: 22px;
margin-top: 2px;
}
.row ul li.address span:nth-child(1) {
color: #000000;
font-size: 19px;
font-weight: bold;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 85%;
margin-right: 0;
display: inline-block;
}
.row ul li:last-child {
position: absolute;
left: 0;
right: 10px;
bottom: 0;
font-size: 0;
}
.row ul li:last-child .label {
color: #ff0000;
padding: 1px 4px;
font-size: 9px;
border: 1px solid #acacac;
margin: 0 5px 0 0;
vertical-align: middle;
border-top-left-radius: 3px;
border-top-right-radius: 3px;
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
-webkit-border-top-left-radius: 3px;
-webkit-border-top-right-radius: 3px;
-webkit-border-bottom-left-radius: 3px;
-webkit-border-bottom-right-radius: 3px;
}
.row ul li:last-child span {
color: #000000;
font-size: 15px;
}
.row ul li:last-child span em {
font-style: normal;
}
.row ul li:last-child span em:nth-child(1) {
color: #ff0000;
font-size: 19px;
font-weight: bold;
}
.row ul li:last-child span em:nth-child(2) {
font-size: 7px;
vertical-align: top;
}
.row ul li.multiLine_omit {
color: #000000;
font-weight: bold;
height: 36px;
margin-top: 0;
-webkit-line-clamp: 2;
display: -webkit-box;
-webkit-box-orient: vertical;
white-space: normal;
}
.row:active {
background-color: #e9e9e9;
}
.modal .modal-dialog {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
width: 280px;
height: 130px;
}
.modal .modal-dialog .modal-content {
color: #000000;
font-size: 16px;
border: 0;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
-webkit-border-top-left-radius: 8px;
-webkit-border-top-right-radius: 8px;
-webkit-border-bottom-left-radius: 8px;
-webkit-border-bottom-right-radius: 8px;
box-shadow: none;
-webkit-box-shadow: none;
}
.modal .modal-dialog .modal-content h4 {
font-size: 19px;
font-weight: bold;
margin: 0 20px;
padding-top: 15px;
}
.modal .modal-dialog .modal-content p {
margin: 12px 20px 14px;
}
.modal .modal-dialog .modal-content p:nth-of-type(2) {
margin: 0;
font-size: 0;
}
.modal .modal-dialog .modal-content p:nth-of-type(2) .btn {
width: 50%;
}
.modal .modal-dialog .modal-content p:nth-of-type(2) .btn:nth-child(2) {
border-left-color: #cfd0d0;
}
.modal .modal-dialog .modal-content .btn {
border-top-color: #cfd0d0;
background-color: transparent;
font-weight: bold;
border-top-left-radius: 0;
border-top-right-radius: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
-webkit-border-top-left-radius: 0;
-webkit-border-top-right-radius: 0;
-webkit-border-bottom-left-radius: 0;
-webkit-border-bottom-right-radius: 0;
}
.modal .modal-dialog .modal-content .btn:active {
background-color: #e9e9e9;
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
-webkit-border-bottom-left-radius: 8px;
-webkit-border-bottom-right-radius: 8px;
box-shadow: none;
-webkit-box-shadow: none;
}
.modal .modal-dialog .modal-content .btn:focus {
outline: 0;
}
.loading {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 1040;
background-color: rgba(0, 0, 0, 0.5);
}
.loading ul {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
width: 40px;
height: 40px;
}
.loading ul li {
position: absolute;
width: 100%;
height: 100%;
}
.loading ul li:nth-child(1) p:nth-child(2) {
animation-delay: -0.9s;
-webkit-animation-delay: -0.9s;
}
.loading ul li:nth-child(1) p:nth-child(3) {
animation-delay: -0.6s;
-webkit-animation-delay: -0.6s;
}
.loading ul li:nth-child(1) p:nth-child(4) {
animation-delay: -0.3s;
-webkit-animation-delay: -0.3s;
}
.loading ul li:nth-child(2) {
transform: rotateZ(45deg);
-webkit-transform: rotateZ(45deg);
}
.loading ul li:nth-child(2) p:nth-child(1) {
animation-delay: -1.1s;
-webkit-animation-delay: -1.1s;
}
.loading ul li:nth-child(2) p:nth-child(2) {
animation-delay: -0.8s;
-webkit-animation-delay: -0.8s;
}
.loading ul li:nth-child(2) p:nth-child(3) {
animation-delay: -0.5s;
-webkit-animation-delay: -0.5s;
}
.loading ul li:nth-child(2) p:nth-child(4) {
animation-delay: -0.2s;
-webkit-animation-delay: -0.2s;
}
.loading ul li:nth-child(3) {
transform: rotateZ(90deg);
-webkit-transform: rotateZ(90deg);
}
.loading ul li:nth-child(3) p:nth-child(1) {
animation-delay: -1s;
-webkit-animation-delay: -1s;
}
.loading ul li:nth-child(3) p:nth-child(2) {
animation-delay: -0.7s;
-webkit-animation-delay: -0.7s;
}
.loading ul li:nth-child(3) p:nth-child(3) {
animation-delay: -0.4s;
-webkit-animation-delay: -0.4s;
}
.loading ul li:nth-child(3) p:nth-child(4) {
animation-delay: -0.1s;
-webkit-animation-delay: -0.1s;
}
.loading ul li p {
width: 10px;
height: 10px;
margin-bottom: 0;
border-top-left-radius: 50%;
border-top-right-radius: 50%;
border-bottom-left-radius: 50%;
border-bottom-right-radius: 50%;
-webkit-border-top-left-radius: 50%;
-webkit-border-top-right-radius: 50%;
-webkit-border-bottom-left-radius: 50%;
-webkit-border-bottom-right-radius: 50%;
position: absolute;
background-color: #ffffff;
animation: bouncedelay 1.2s infinite ease-in-out both;
-webkit-animation: bouncedelay 1.2s infinite ease-in-out both;
}
.loading ul li p:nth-child(1) {
top: 0;
left: 0;
}
.loading ul li p:nth-child(2) {
top: 0;
right: 0;
}
.loading ul li p:nth-child(3) {
bottom: 0;
right: 0;
}
.loading ul li p:nth-child(4) {
bottom: 0;
left: 0;
}
@keyframes bouncedelay {
0%,
80%,
100% {
transform: scale(0);
-webkit-transform: scale(0);
}
40% {
transform: scale(1);
-webkit-transform: scale(1);
}
}
@-webkit-keyframes bouncedelay {
0%,
80%,
100% {
transform: scale(0);
-webkit-transform: scale(0);
}
40% {
transform: scale(1);
-webkit-transform: scale(1);
}
}
html,
body {
width: 100%;
height: 100%;
}
body {
user-select: none;
-webkit-user-select: none;
tap-highlight-color: rgba(0, 0, 0, 0);
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
color: #707070;
background-color: #f9f9f9;
}
a:hover {
text-decoration: none;
}
.container-fluid {
width: 100%;
height: 100%;
background: url("../img/formBg.jpg") no-repeat;
background-size: 100% 100%;
-webkit-background-size: 100% 100%;
padding: 0 35px;
}
ul li {
color: #ffffff;
font-size: 20px;
}
ul li:first-child {
width: 100%;
height: 110px;
background: url("../img/my_head.png") no-repeat;
background-size: auto 100%;
-webkit-background-size: auto 100%;
background-position: center;
}
ul li:nth-child(odd) {
margin-top: 20%;
}
ul li:nth-child(even) {
margin-top: 10%;
}
ul li .btn {
background-color: #238cdb;
color: #ffffff;
font-size: 22px;
font-weight: bold;
border-top-left-radius: 16px;
border-top-right-radius: 16px;
border-bottom-left-radius: 16px;
border-bottom-right-radius: 16px;
-webkit-border-top-left-radius: 16px;
-webkit-border-top-right-radius: 16px;
-webkit-border-bottom-left-radius: 16px;
-webkit-border-bottom-right-radius: 16px;
box-shadow: 0 2px 0 0 #117bb9;
-webkit-box-shadow: 0 2px 0 0 #117bb9;
}
ul li .btn:active {
background-color: #117bb9;
}
ul li .btn:hover {
color: #ffffff;
}
......@@ -459,6 +459,9 @@ a:hover {
#wrapper #scroller .btn:active {
background-color: #117bb9;
}
#wrapper #scroller .btn:hover {
color: #ffffff;
}
#wrapper #scroller .btn:focus {
outline: 0;
}
......@@ -58,6 +58,10 @@ function page_template($template)
case 'sale':
$page = $theme . '/sale.php';
break;
case 'logout':
wp_logout();
return;
break;
}
return $page;
} else {
......@@ -252,7 +256,10 @@ function new_login_redirect($redirect_to, $request, $user)
add_action('wp_logout', 'auto_redirect_after_logout');
function auto_redirect_after_logout()
{
header('Location: ' . home_url('/?page=manager'));
$page = "manager";
if(isset($_REQUEST['reception']))
$page = "login";
header('Location: ' . home_url('/?page='.$page));
exit;
}
......
......@@ -6,7 +6,10 @@ $context['theme'] = get_template_directory_uri();
$context['register'] = $const_register_page;
$context['forget'] = $const_forget_page;
if (is_user_logged_in()) {
wp_redirect($const_my_page);
global $current_user;
get_currentuserinfo();
$context["name"] = $current_user->display_name;
Timber::render('self.html', $context);
} else {
if ($_POST) {
$phone = $_POST['phone'];
......@@ -31,7 +34,7 @@ if (is_user_logged_in()) {
$creds['remember'] = true;
$user = wp_signon($creds, false);
if (!is_wp_error($user)) {
wp_redirect($const_my_page);
wp_redirect($const_login_page);
} else if ($user->get_error_code() == 'invalid_username') {
$context['error'] = '此手机号码/帐号尚未注册';
} else if ($user->get_error_code() == 'incorrect_password') {
......@@ -39,7 +42,7 @@ if (is_user_logged_in()) {
}
}
}
Timber::render('login.html', $context);
}
Timber::render('login.html', $context);
?>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=360, user-scalable=0"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<meta name="format-detection" content="telephone=no"/>
<title>我的</title>
<!--CSS-->
<link rel="stylesheet" type="text/css" href="{{ theme }}/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="{{ theme }}/css/my.css">
<script type="text/javascript" src="{{ theme }}/js/jquery.min.js"></script>
<script type="text/javascript" src="{{ theme }}/js/bootstrap.min.js"></script>
<script type="text/javascript" src="{{ theme }}/js/jquery.mobile.custom.min.js"></script>
</head>
<body ontouchstart="">
<div class="container-fluid">
<ul class="list-unstyled text-center">
<li></li>
<li>ID:{{name}}</li>
<li>
<button id="foget" type="button" class="btn btn-lg btn-block">忘记密码</button>
</li>
<li>
<button id="logout" type="button" class="btn btn-lg btn-block">登出</button>
</li>
</ul>
</div>
<script>
$(document).ready(function () {
$('#foget').tap(function () {
window.location.href = "?page=forget";
});
$('#logout').tap(function () {
window.location.href = "?page=logout&reception=true";
});
});
</script>
</body>
</html>
\ 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