Commit 6c51be76 authored by hujun's avatar hujun

Merge branch '0813-v2.7.0' into test

# Conflicts: # application/api_broker/controller/Shop.php # application/index/controller/Houses.php # application/index/controller/Remark.php # application/index/view/member/users_list.html # application/index/view/realtime/realtimePerformance.html # application/index/view/remark/remark_follow_index.html # application/model/UPhoneFollowPp.php # application/route.php # public/resource/js/RemarkFollowIndex.js # public/resource/js/realtimePerformance.js
parents 747f68e5 a66f0071
<?php
namespace app\api\controller;
use app\api\extend\Basic;
use app\extra\RedisExt;
/**
* Created by PhpStorm.
* User : zw
* Date : 2018/8/13
* Time : 11:31
* Intro:
*/
class Location extends Basic
{
private $redis_;
const CITY_USER = "user_city_";
public function __construct($request = null)
{
parent::__construct($request);
$this->redis_ = RedisExt::getRedis();
}
public function saveSiteCity()
{
$params = $this->params;
/* $params = array(
"user_id" => 1,
"city" => "上海市"
);*/
$checkResult = $this->validate($params, "RegisterValidate.saveSiteCityVerify");
if (true !== $checkResult) {
return $this->response("101", $checkResult);
}
$city = "上海市";
$user_id = $params["user_id"];
if ($params["city"] == "杭州市" || $params["city"] == "杭州") {
$city = "杭州市";
}
if ($this->redis_) {
$this->redis_->set(self::CITY_USER . $user_id, $city);
} else {
return $this->response("101", "redis service not found");
}
return $this->response("200", "success", []);
}
}
\ No newline at end of file
......@@ -20,6 +20,7 @@ class RegisterValidate extends Validate
'code' => 'require|number',
'device_id' => 'require',
'phone' => [ 'regex' => '/^((13[0-9])|(14[0-9])|(15[0-9])|(18[0-9])|(16[0-9])|(17[0-9])|(19[0-9]))\\d{8}$/i' ],
'city' => 'require',
];
protected $message = [
......@@ -32,13 +33,15 @@ class RegisterValidate extends Validate
'phone.regex' => '手机号格式不正确',
'device_id.require' => '设备id不能为空',
'code.require' => 'code为必填字段',
'code.number' => 'code只能为数字'
'code.number' => 'code只能为数字',
'city.require' => 'city为必填字段',
];
protected $scene = [
'verify' => [ 'phone', 'device_id' ],
'register' => [ 'phone', 'device_id', 'code' ],
'removeBind' => [ 'user_id', 'buyer_id' ],
'bind' => [ 'wx_union_id','phone' ],
'verify' => [ 'phone', 'device_id' ],
'register' => [ 'phone', 'device_id', 'code' ],
'removeBind' => [ 'user_id', 'buyer_id' ],
'bind' => [ 'wx_union_id', 'phone' ],
'saveSiteCityVerify' => [ 'user_id', 'city' ],
];
}
\ No newline at end of file
......@@ -10,6 +10,7 @@ use app\model\AAgents;
use app\model\ACollectHouse;
use app\model\AttentionModel;
use app\model\GHouses;
use app\model\GHousesExt;
use app\model\GHousesFollowUp;
use app\model\GHousesImgs;
use app\model\GHousesToAgents;
......@@ -53,7 +54,7 @@ class Shop extends Basic
header('Access-Control-Allow-Origin:*');
$params = $this->params;
/*$params = array(
/* $params = array(
"site_area" => 4, //来源 1c首页 2c搜索 3b首页 4b搜索 5b报备
// "title" => "vv", //1,2 external_title ,3,4internal_title
"house_id" => 4,
......@@ -71,6 +72,7 @@ class Shop extends Basic
"status" => 1, //1上架or2下架
"start_time" => "2018-05-25",
"end_time" => "2018-05-30",
"landlord_phone" => "17621970093",
"pageNo" => 1,
"pageSize" => 15
);*/
......@@ -84,7 +86,7 @@ class Shop extends Basic
,shop_area_start,shop_area_end,shop_type,residue_num,shop_sign,is_carefully_chosen,rent_type,rent_price";
} else {
$field = "id,internal_title as title,internal_address as address,city,disc,business_district_id,status,industry_type
$field = "id,internal_title as title,internal_address as address,city,disc,business_district_id,status,industry_type
,shop_area_start,shop_area_end,shop_type,residue_num,shop_sign,is_carefully_chosen,rent_type,rent_price";
$conditions["city"] = trim($this->city);
......@@ -108,8 +110,18 @@ class Shop extends Basic
$conditions['internal_address'] = array( "like", "%" . trim($params['address']) . "%" );
}
$houseIds = "";
if (isset($params['landlord_phone'])) {
$houseIds = $this->returnHouseId($params['landlord_phone']);
if (empty($houseIds)) {
return $this->response("200", "此条件没有找到数据");
}
}
if (isset($params['house_id'])) {
$conditions['id'] = array( "eq", $params['house_id'] );
$houseIds = $params['house_id'];
}
if (!empty($houseIds)) {
$conditions['id'] = array( "in", $houseIds );
}
if (isset($params['start_time']) && isset($params['end_time'])) {
......@@ -204,6 +216,7 @@ class Shop extends Basic
foreach ($result as $key => $val) {
$result[$key]["api_path"] = CK_IMG_URL . 'images/';
$result[$key]["rent_price"] = $val["rent_price"] * 0.01;
$result[$key]["title"] = $val["city"] . $result[$key]["title"];
$param["house_id"] = $val["id"];
$param["img_type"] = 1; //默认主图
......@@ -222,6 +235,20 @@ class Shop extends Basic
return $this->response("200", 'request success', $result);
}
private function returnHouseId($landlord_phone)
{
$houseExtModel = new GHousesExt();
$houseIds = $houseExtModel->getHouseId($landlord_phone);
$ids = "";
if (count($houseIds) > 0) {
foreach ($houseIds as $item) {
$ids .= $item["house_id"] . ",";
}
$ids = rtrim($ids, ",");
}
return $ids;
}
/**
* 楼盘详情
......@@ -426,7 +453,7 @@ class Shop extends Basic
$check = $validate->check($this->params);
}
if(true !== $check){
if (true !== $check) {
return $this->response(101, $validate->getError());
}
$house_id = $this->gHousesModel->app_addV2($this->params, $this->agentId); //添加或编辑商铺
......
......@@ -61,7 +61,7 @@ class User extends Basic
public function searchUser()
{
$params = $this->params;
/* $params = array(
/*$params = array(
"user_status" => 0,//客户状态(0:求租;1:已租;-1:无效)
"yetai" => "休闲娱乐",
"area_start" => 1,//面积起始范围 room_area2
......@@ -74,9 +74,9 @@ class User extends Basic
"user_name" => "12312",
"user_phone" => "138171212",
"pageNo" => 1,
//"agent_id" => 5741,//传经纪人id代表我得客户
"agent_id" => 5741,//传经纪人id代表我得客户
"pageSize" => 15,
"status" => -1,
"status" => 0,
);*/
$field = "id as user_id,sex,user_name,user_phone,user_status,agent_id,create_time,industry_type,price_demand,area_demand,vip";
......@@ -131,9 +131,6 @@ class User extends Basic
$start_time = date('Y-m-d H:i:s', $params['start_time']);
$end_time = date('Y-m-d H:i:s', $params['end_time']);
$conditions['create_time'] = array( 'between', array( $start_time, $end_time ) );
} else if (empty($params["agent_id"]) && empty($params["id"]) && empty($params["user_phone"])) {
$time_ = date('Y-m-d H:i:s', strtotime("-1 day"));
$conditions['create_time'] = array( 'lt', $time_ );
}
if (isset($params['status'])) {
......@@ -145,7 +142,6 @@ class User extends Basic
$conditions['agent_id'] = $params['agent_id'];
}
$userList = $this->userModel->selectUserList($field, $conditions, $pageNo, $pageSize, "id desc");
if (empty($userList)) {
return $this->response("200", "此条件没有找到数据");
......@@ -158,6 +154,12 @@ class User extends Basic
foreach ($userList as $k => $v) {
$is_show = $clientService->dialTotal($v["user_id"]);
if ($is_show) {
//判断客户是否超过24小时保护期间 0:保护器内 1:超过保护期
$is_outstrip_twenty_four_hours = 0;
if((time() - strtotime($v['create_time'])) > (60*60*24)){
$is_outstrip_twenty_four_hours = 1;
}
$v['is_outstrip_twenty_four_hours']=$is_outstrip_twenty_four_hours;
array_push($list, $v);
}
}
......
......@@ -141,6 +141,27 @@
<section v-show="dataCode==102">查看数量已达上限</section>
<section v-show="dataCode!=200"></section>
</main>
<div id="call_modal">
<div class="call-modal-main">
<p class="call-modal-main-title">选择本机手机号</p>
<ol id="call_modal_phone_list">
<li class="call-select"><input placeholder="请输入本机手机号" maxlength="11" type="tel" id="call_modal_phone_self" readonly="" />
<div class="call-edit-icon">完成</div>
<div class="call-submit-ing-icon">提交中ing</div>
<div class="call-select-icon"><img src="/app/images/ic_duigou_gre.png" /></div>
</li>
</ol>
<div id="add_phone_btn">增加手机号</div>
<p class="call-modal-main-tip">请确认选择的手机号和本机号码相同,否则提示为空号</p>
</div>
<div class="call-btn-area">
<div id="call_btn_cancel">取消</div>
<div id="call_btn_ok">确认</div>
<div id="call_btn_ok_temp">等待拨打 ing</div>
</div>
</div>
<div class="modal-area" v-show="maskShowFlag">
<div class="call-hide-area" v-show="callShowFlag">
<p>请使用{{user_info_obj.phone}}的手机拨打该虚拟号:</p>
......
<?php
namespace app\index\controller;
use app\index\extend\Basic;
use app\model\HouseInfos;
use think\Request;
/**
* Description of HouseInfo
*
* @author : fuju
* @date : 2018-1-15 11:09:56
* @internal : description
*/
class HouseInfo extends Basic{
protected $house_infos;
public function __construct(Request $request) {
parent::__construct($request);
$this->house_infos = new HouseInfos();
}
public function index() {
return $this->house_infos->select();
}
}
......@@ -18,6 +18,7 @@ use app\model\GHouses;
use app\model\GHousesExt;
use app\model\GHousesImgs;
use app\model\GHousesToAgents;
use app\model\GLandlordPhone;
use app\model\GOperatingRecords;
use app\model\SubletModel;
use think\Request;
......@@ -228,7 +229,7 @@ class Houses extends Basic
}
$fields = 'id,shop_type,internal_title,rent_price,is_show,create_time,residue_num,rent_type,
shop_area_start,shop_area_end,industry_type,disc';
shop_area_start,shop_area_end,industry_type,disc,is_carefully_chosen';
/*楼盘编号*/
if ($this->params['id'] != NULL) {
......@@ -537,4 +538,39 @@ class Houses extends Basic
return $this->response($data['status'], $data['msg'], $data['data']);
}
/**
* 转换房东手机号
*
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function transformLandlord() {
$time = time();
$m_landlord = new GLandlordPhone();
$m_house = new GHousesExt();
$total = $m_house->getTotal();
$page = ceil($total/5000);
$where[] = ['EXP','landlord_phone IS NOT NULL AND landlord_phone != ""'];
$kk = 0;
for ($i=1; $i<= $page; $i++) {
$data = $m_house->getList($i,5000,'id asc','house_id,landlord_phone', $where);
foreach ($data as $k=>$v) {
$landlord_data = json_decode($v['landlord_phone'], true);
foreach ($landlord_data as $k2=>$v2) {
$insert[$kk]['name'] = $v2['name'];
$insert[$kk]['phone'] = (int)$v2['phone'];
$insert[$kk]['house_id'] = $v['house_id'];
$kk++;
}
}
$m_landlord->saveAll($insert);
}
echo time() - $time .'秒';
}
}
\ No newline at end of file
......@@ -274,7 +274,7 @@ class Member extends Basic{
$where['a.disc'] = $params['disc'];
}
$fields = 'a.id,a.user_nick,a.user_name,a.user_phone,a.user_pic,a.create_time,a.user_pswd,a.referrer_id,a.user_label,
$fields = 'a.id,a.user_nick,a.create_time,a.user_name,a.user_phone,a.user_pic,a.create_time,a.user_pswd,a.referrer_id,a.user_label,
a.user_name,a.status,a.first_login_time,a.last_login_time,a.agent_id,a.vip,a.price_demand,a.industry_type,a.area_demand,a.user_status,a.source';
try {
......@@ -299,6 +299,14 @@ class Member extends Basic{
}
}
//判断客户是否超过24小时保护期间 0:保护器内 1:超过保护期
$is_outstrip_twenty_four_hours = 0;
if((time() - strtotime($v['create_time'])) > (60*60*24)){
$is_outstrip_twenty_four_hours = 1;
}
$data_list[$k]['is_outstrip_twenty_four_hours']=$is_outstrip_twenty_four_hours;
$is_show = true;
if( $if_search_user == false){
$is_show = $clientService->dialTotal($v["id"]);
......
......@@ -365,8 +365,8 @@
<!--客户详情 客户跟进 不可编辑-->
<div class="modal fade" id="modal-record" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content modal-body-details">
<div class="modal-dialog modal-body-details">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
×
......@@ -376,8 +376,8 @@
<a href="javascript:;" class="btn btn-info caozuo-yue">约带看</a>
</h4>
<div class="user_up_con">
<span id="user_up" class="ld-Marheight text-primary ld-Marheight">上一条客户</span>
<span id="user_down" class="ld-Marheight text-primary ld-Marheight">下一条客户</span>
<!--<span id="user_up" class="ld-Marheight text-primary ld-Marheight">上一条客户</span>
<span id="user_down" class="ld-Marheight text-primary ld-Marheight">下一条客户</span>-->
</div>
</div>
<div class="modal-body modal-body1">
......
......@@ -20,6 +20,10 @@
<span class="hidden-phone">同联商业后台管理中心</span>
</a>
</div>
<select class="form-control btn2 ld-Marheight-city" id="user_city_choose">
<option value="310100" selected="selected">上海市</option>
<option value="330100">杭州市</option>
</select>
<div class="dropdown">
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<span class="caret"></span>
......
......@@ -46,6 +46,10 @@
margin-top: 20px;
text-align: center;
}
.ld-Marheight-city{
margin-top: 8px;
}
</style>
<div id="page-content-wrapper">
<div class="container">
......@@ -64,6 +68,9 @@
<tr>
<td colspan="10">
<form id="form_search">
<select class="form-control btn2 ld-Marheight" id="shop_area_id">
<option value="" selected="selected">区域筛选</option>
</select>
<span class="fore-span ld-Marheight">跟进时间:</span>
<input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="create_time_start" name="start_date1" type="date">
<span class="fore-span ld-Marheight">-</span>
......@@ -77,19 +84,17 @@
<select class="form-control btn4 ld-Marheight input" name="" id="guest_stores" value="">
</select>-->
<!--<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="user_name" placeholder="跟进人姓名" type="text" value="">-->
<input class="form-control btn4 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="user_phone" placeholder="跟进人姓名电话" type="text" value="">
<!--<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="user_name" placeholder="跟进人姓名" type="text" value="">-->
<input class="form-control btn4 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="user_phone" placeholder="跟进人姓名/电话" type="text" value="">
<div class="clear"></div>
<select class="form-control btn2 ld-Marheight" id="shop_city_id">
<!--<div class="clear"></div>-->
<!--<select class="form-control btn2 ld-Marheight" id="shop_city_id">
<option value="" selected="selected">城市筛选</option>
<option value="310100">上海市</option>
<option value="330100">杭州市</option>
</select>
<select class="form-control btn2 ld-Marheight" id="shop_area_id">
<option value="" selected="selected">区域筛选</option>
</select>
</select>-->
<span class="btn btn-info btn3 ld-Marheight" id="search">搜索</span>
<span class="btn btn-info btn3 ld-Marheight" id="reset">重置</span>
</form>
......
......@@ -55,6 +55,18 @@
margin-top: 20px;
text-align: center;
}
.ld-Marheight-city{
margin-top: 8px;
}
/*控制放大镜的 收款图片显示*/
#preview{
z-index: 9999!important;
}
#preview img{
width: 600px;
}
</style>
<div id="page-content-wrapper">
<div class="container">
......@@ -81,6 +93,9 @@
<tr>
<td colspan="10">
<form id="form_search">
<select class="form-control btn2" id="shop_area_id">
<option value="" selected="selected">区域</option>
</select>
<select class="form-control btn11" id="is_carefully_chosen">
<option value="-1"">是否显示在首页</option>
<option value="1"></option>
......@@ -107,25 +122,25 @@
<option value="2" >10000-30000</option>
<option value="3">30000以上</option>
</select>
<select class="form-control btn2" id="is_exclusive_type">
<br style="clear: both;" />
<select class="form-control btn2 ld-Marheight" id="is_exclusive_type">
<option value="-1">是否独家</option>
<option value="1"></option>
<option value="0"></option>
</select>
<br style="clear: both;" />
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="id" placeholder="商铺编号" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="shop_address" placeholder="商铺地址" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="internal_title" placeholder="对内商铺名称" type="text" value="">
<!--新加筛选-->
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="internal_title_open" placeholder="对外商铺名称" type="text" value="">
<select class="form-control btn2 ld-Marheight" id="shop_city_id">
<!--<select class="form-control btn2 ld-Marheight" id="shop_city_id">
<option value="" selected="selected">城市筛选</option>
<option value="310100">上海市</option>
<option value="330100">杭州市</option>
</select>
<select class="form-control btn2 ld-Marheight" id="shop_area_id">
<option value="" selected="selected">区域筛选</option>
</select>
</select>-->
<select class="form-control btn2 ld-Marheight" id="area_id">
<option value="" selected="selected">面积筛选</option>
......
......@@ -344,8 +344,8 @@
</div>
<!--客户详情 客户跟进 不可编辑-->
<div class="modal fade" id="modal-record" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content modal-body-details">
<div class="modal-dialog modal-body-details">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
×
......@@ -355,8 +355,8 @@
<a href="javascript:;" class="btn btn-info caozuo-yue">约带看</a>
</h4>
<div class="user_up_con">
<span id="user_up" class="ld-Marheight text-primary ld-Marheight">上一条客户</span>
<span id="user_down" class="ld-Marheight text-primary ld-Marheight">下一条客户</span>
<!--<span id="user_up" class="ld-Marheight text-primary ld-Marheight">上一条客户</span>
<span id="user_down" class="ld-Marheight text-primary ld-Marheight">下一条客户</span>-->
</div>
</div>
<div class="modal-body modal-body1">
......@@ -798,8 +798,8 @@
</div>
<!--客户编辑-->
<div class="modal fade" id="modal-record-edit" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content modal-body-details">
<div class="modal-dialog modal-body-details">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
×
......
......@@ -91,8 +91,8 @@
</div>
<!-- 弹出框 门店业绩排行 详情 -->
<div class="modal fade" id="modal-store" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content modal-body-width">
<div class="modal-dialog modal-body-width-w">
<div class="modal-content modal-body-width-h">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
×
......@@ -114,8 +114,8 @@
<!-- 弹出框 经纪人业绩排行 详情 -->
<div class="modal fade" id="modal-agent" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content modal-body-width">
<div class="modal-dialog modal-body-width-w">
<div class="modal-content modal-body-width-h">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
×
......@@ -137,8 +137,8 @@
<!-- (点击门店名字)弹出框 经纪人业绩(二级)排行 详情 -->
<div class="modal fade" id="modal-agent-two" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content modal-body-width-two">
<div class="modal-dialog modal-body-width-two-w">
<div class="modal-content modal-body-width-two-h">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
×
......
......@@ -9,7 +9,25 @@
namespace app\model;
use Think\Db;
class GHousesExt extends BaseModel
{
protected $table = 'g_houses_ext';
private $db_;
public function __construct($data = [])
{
parent::__construct($data);
$this->db_ = Db::table($this->table);
}
public function getHouseId($landlord_phone)
{
$params["landlord_phone"] = array( "like", '%' . $landlord_phone . '%' );
return $this->db_
->field("house_id")
->where($params)
->select();
}
}
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: hu jun
* Date: 2018/8/13
* Time: 15:56
*/
namespace app\model;
class GLandlordPhone extends BaseModel
{
protected $table = 'g_landlord_phone';
}
\ No newline at end of file
......@@ -593,7 +593,7 @@ class Users extends Model
->page($pageNo)
->limit($pageSize)
->select();
// echo $this->getLastSql();
//echo $this->getLastSql();
return $result;
}
......
This diff is collapsed.
......@@ -143,21 +143,43 @@ header .icon-link{
.sec-dynamic>ul>li.li-sp-active{
background-color: #fcba38;
}
.sec-dynamic>ul>li.li-sp-active-top{
background-color: #fcba38;
}
.first-sec-active{
position: absolute;
top: .98rem;
left: 0;
width: 1.31rem;
height: .37rem;
background: url(/app/images/icon_dynamic@2x.png) no-repeat center center/1.31rem .37rem;
}
.sec-dynamic>ul>li{
position: relative;
}
.li-top{
overflow: hidden;
}
.sec-dynamic>ul>li>.li-top>div{
float: left;
}
.sec-dynamic>ul>li>.li-top>div.li-top-right{
width: 6.05rem;
/*width: 6.05rem;*/
width: 5.7rem;
}
.li-top-left{
overflow: hidden;
padding-right: .2rem;
box-sizing: border-box;
position: relative;
}
.li-top-left>img{
float: left;
width: .65rem;
height: .65rem;
/*width: .65rem;
height: .65rem;*/
width: 1rem;
height: 1rem;
border-radius: 50%;
object-fit: cover;
}
......@@ -165,7 +187,8 @@ header .icon-link{
color: #999;
font-size: .32rem;
overflow: hidden;
width: 6.05rem;
/*width: 6.05rem;*/
width: 5.7rem;
}
.li-top-right-header>div:nth-of-type(1){
float: left;
......
......@@ -93,3 +93,137 @@ tbody>tr:nth-of-type(16){
color: white;
}
/*拨打电话模态框*/
html{
font-size: 55.2px;
}
#call_modal{
position: fixed;
background-color: rgba(0,0,0,.7);
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 102;
display: none;
}
.call-modal-main{
width: 6.6rem;
height: 6.54rem;
padding: .4rem .3rem;
margin-top: 2.8rem;
margin-left: calc(50vw - 182px);
background-color: white;
font-size: .3rem;
box-sizing: border-box;
}
.call-modal-main>p.call-modal-main-title{
font-size: .3rem;
color: #333;
text-align: center;
padding-bottom: .3rem;
}
.call-modal-main>p.call-modal-main-tip{
font-size: .24rem;
color: #F13D2F;
text-align: center;
padding-top: .3rem;
}
.call-modal-main>ol{
padding-bottom: .3rem;
}
.call-modal-main>ol>li{
height: .8rem;
line-height: .8rem;
background-color: #f0f0f0;
margin-bottom: .3rem;
box-sizing: border-box;
padding: 0 .2rem;
cursor: pointer;
}
.call-modal-main>ol>li>input{
float: left;
line-height: .8rem;
height: .8rem;
width: 3.5rem;
font-size: .28rem;
color: #333;
}
.call-modal-main>ol>li>div{
float: right;
}
.call-modal-main>ol>li>.call-select-icon{
overflow: hidden;
padding-top: .23rem;
display: none;
}
.call-modal-main>ol>li>.call-select-icon>img{
float: left;
width: .34rem;
height: .34rem;
}
.call-modal-main>ol>li>.call-edit-icon,
.call-modal-main>ol>li>.call-submit-ing-icon{
width: .8rem;
height: .5rem;
line-height: .5rem;
border-radius: .14rem;
text-align: center;
font-size: .24rem;
color: white;
background-color: #F13D2F;
margin-top: .15rem;
display: none;
cursor: pointer;
}
.call-modal-main>ol>li>.call-submit-ing-icon{
width: 1.2rem;
background-color: #333;
}
.call-modal-main>ol>li.call-select>.call-select-icon,
.call-modal-main>ol>li.call-add>.call-edit-icon{
display: block;
}
.call-modal-main>ol>li.call-select>.call-edit-icon,
.call-modal-main>ol>li.call-add>.call-select-icon{
display: none!important;
}
.call-modal-main>div{
text-align: center;
color: #FF9419;
box-sizing: border-box;
border: 1px solid #FF9419;
line-height: .8rem;
height: .8rem;
}
.call-btn-area{
overflow: hidden;
margin-left: calc(50vw - 182px);
margin-top: .3rem;
}
.call-btn-area>div{
float: left;
width: 3.15rem;
height: .8rem;
line-height: .8rem;
border-radius: .08rem;
text-align: center;
font-size: .32rem;
}
.call-btn-area>div#call_btn_cancel{
background-color: white;
color: #FF9419;
}
.call-btn-area>div#call_btn_ok{
background-color: #FF9419;
color: white;
margin-left: .3rem;
}
.call-btn-area>div#call_btn_ok_temp{
background-color: #ccc;
color: white;
margin-left: .3rem;
display: none;
}
......@@ -2,6 +2,17 @@ var _doc = $(document),
_token = getUrlParam("token"),
_customerId = getUrlParam('customerId');
/******
*
report 报备
march_in 进场
follow_up_log 跟进
pay_log 收款
refund 退款
bargain 成交报告
*
*****/
$(function(){
$(document.body).show();
......@@ -57,6 +68,7 @@ function loadMain(){
_selectPhone = '',//拨号列表里选择的号码,也是当前用户对应的手机号,可能和_userPhone是一样的
_customerPhone = '',//当前客户的手机号
_backPhone = '';//绑定之后返回的号码
_user_status = '';//状态标签上次的值
if(_userId){
......@@ -192,7 +204,35 @@ function loadMain(){
});
};
var _htmlTemp = '';
if(data['data']['user_date'] && data['data']['user_date'].length > 0){
var _tempArr = data['data']['user_date'].filter(function(item, index, array){
/**********
*
report 报备
march_in 进场
follow_up_log 跟进
pay_log 收款
refund 退款
bargain 成交报告
*
* **********/
return (item['step_name']=='report' || item['step_name']=='march_in' || item['step_name']=='pay_log' || item['step_name']=='bargain');
});
console.log(_tempArr);
if(_tempArr.length>0){
_htmlTemp += '<li class="{7}"><div class="li-top"><div class="li-top-left"><img src="{0}" onerror="javascript:this.src=\'/app/images/ic_default_headpic.png\'" /></div><div class="li-top-right"><div class="li-top-right-header"><div>{1}</div><div>{3}</div></div><p>{2}{5}</p>{6}</div></div><div class="first-sec-active"></div></li>'.stringFormatObj({
'0': data['data']['agent_path']+_tempArr[0]['img'],
'1': _tempArr[0]['name'],
'2': _tempArr[0]['step_name']=='phone_fllow_up'?'电话跟进:':(_tempArr[0]['step_name']=='fllow_up'?'跟进:':''),
'3': (_tempArr[0]['create_time']==null?null:_tempArr[0]['create_time']),
'5': _tempArr[0]['step'],
'6': _tempArr[0]['step_name']=='follow_up_log'?dealSp(_tempArr[0]):(_tempArr[0]['step_name']=='report'?dealSpYdk(_tempArr[0]):''),
'7': 'li-sp-active-top'
});
};
$.each(data['data']['user_date'], function(i, item) {
_htmlTemp += '<li class="{7}"><div class="li-top"><div class="li-top-left"><img src="{0}" onerror="javascript:this.src=\'/app/images/ic_default_headpic.png\'" /></div><div class="li-top-right"><div class="li-top-right-header"><div>{1}</div><div>{3}</div></div><p>{2}{5}</p>{6}</div></div></li>'.stringFormatObj({
'0': data['data']['agent_path']+item['img'],
......@@ -296,11 +336,12 @@ function loadMain(){
});
//标签没有默认状态了
// if(data['data']['user_info']['user_status'] == 0 || data['data']['user_info']['user_status'] == 1 || data['data']['user_info']['user_status'] == -1 ){
// _markAreaObj.find('a[data-markid="'+data['data']['user_info']['user_status']+'"]').addClass('genjin-mark-active').siblings().removeClass('genjin-mark-active');
// }else{
// layerTipsX('状态标签返回有误');
// }
var _data_user_status = data['data']['user_info']['user_status'];
if(_data_user_status == 0 || _data_user_status == 1 || _data_user_status == -1 ){
_user_status = _data_user_status;
}else{
layerTipsX('状态标签返回有误');
}
}else {
layerTipsX(data['msg']);
......@@ -391,24 +432,27 @@ function loadMain(){
e.preventDefault();
e.stopPropagation();
var _this = $(this);
// if((_this.attr('data-markid') == '1') || (_this.attr('data-markid') == '4')){
// //如果选择了未打通,或取消拨打,则直接关闭
// if(_this.parent().parent().index() === 0){
// //只有在.genjin-mark-area-putong,电话跟进特有,下的标签才会隐藏
// _genjinModal.hide();//跟进模态框关闭
// return false;
// }
// };
if(!_this.hasClass('genjin-mark-active')){
_this.addClass('genjin-mark-active').siblings().removeClass('genjin-mark-active');
};
if(_this.attr('data-markid') == '1'){
//如果选择了未打通,则直接关闭
if(_this.parent().parent().index() === 0){
//只有在.genjin-mark-area-putong,电话跟进特有,下的标签才会隐藏
genjinSave('sp1');
return false;
}
};
});
//跟进的提交按钮点击事件
_btnSave.click(function(e){
e.preventDefault();
e.stopPropagation();
genjinSave();
});
function genjinSave(type){
var _genjinMarkOBj = $('.genjin-mark-area-zhuangtai .genjin-mark-active'),
_genjinMarkOBj2 = $('.genjin-mark-area-putong .genjin-mark-active'),
_beizhuObjVal = $.trim(_beizhuObj.val()),
......@@ -424,20 +468,14 @@ function loadMain(){
// return false;
// };
// if((_genjinMarkOBj2.attr('data-markid') == '1') || (_genjinMarkOBj2.attr('data-markid') == '4')){
//
// }else{
// if(_genjinMarkOBj.length == 0){
// layerTipsX('请选择状态跟进标签');
// return false;
// };
// };
if(_genjinMarkOBj.length == 0){
layerTipsX('请选择状态跟进标签');
return false;
if((_genjinMarkOBj2.attr('data-markid') == '1') || (_genjinMarkOBj2.attr('data-markid') == '4')){
}else{
if(_genjinMarkOBj.length == 0){
layerTipsX('请选择状态跟进标签');
return false;
};
};
var _data = {
'AuthToken': _token,
'content': _beizhuObjVal,
......@@ -445,6 +483,17 @@ function loadMain(){
'agent_id': _userId,
'user_status': _genjinMarkOBj.attr('data-markid')
};
if(type === 'sp1'){
if(_beizhuObjVal){
}else{
_data['content'] = '未打通';
};
if(_genjinMarkOBj.length == 0){
_data['user_status'] = _user_status;
};
};
if(isCallFlag){
//电话跟进
if(_genjinMarkOBj2.length == 0){
......@@ -510,8 +559,7 @@ function loadMain(){
};
}
});
});
}
function freePhone(obj){
$.ajax({
......@@ -788,4 +836,4 @@ function loadMain(){
});
};
});
};
\ No newline at end of file
};
......@@ -391,27 +391,24 @@ function loadMain(){
e.preventDefault();
e.stopPropagation();
var _this = $(this);
// if((_this.attr('data-markid') == '1') || (_this.attr('data-markid') == '4')){
// //如果选择了未打通,或取消拨打,则直接关闭
// if(_this.parent().parent().index() === 0){
// //只有在.genjin-mark-area-putong,电话跟进特有,下的标签才会隐藏
// _genjinModal.hide();//跟进模态框关闭
// return false;
// }
// };
if(!_this.hasClass('genjin-mark-active')){
_this.addClass('genjin-mark-active').siblings().removeClass('genjin-mark-active');
};
if(_this.attr('data-markid') == '1'){
//如果选择了未打通,则直接关闭
if(_this.parent().parent().index() === 0){
//只有在.genjin-mark-area-putong,电话跟进特有,下的标签才会隐藏
genjinSave('sp1');
return false;
}
};
});
//跟进的提交按钮点击事件
_btnSave.click(function(e){
e.preventDefault();
e.stopPropagation();
genjinSave();
});
function genjinSave(type){
var _genjinMarkOBj = $('.genjin-mark-area-zhuangtai .genjin-mark-active'),
_genjinMarkOBj2 = $('.genjin-mark-area-putong .genjin-mark-active'),
_beizhuObjVal = $.trim(_beizhuObj.val()),
......@@ -427,14 +424,20 @@ function loadMain(){
// return false;
// };
if((_genjinMarkOBj2.attr('data-markid') == '1') || (_genjinMarkOBj2.attr('data-markid') == '4')){
}else{
if(_genjinMarkOBj.length == 0){
layerTipsX('请选择状态跟进标签');
return false;
};
// if((_genjinMarkOBj2.attr('data-markid') == '1') || (_genjinMarkOBj2.attr('data-markid') == '4')){
//
// }else{
// if(_genjinMarkOBj.length == 0){
// layerTipsX('请选择状态跟进标签');
// return false;
// };
// };
if(_genjinMarkOBj.length == 0){
layerTipsX('请选择状态跟进标签');
return false;
};
var _data = {
'AuthToken': _token,
'content': _beizhuObjVal,
......@@ -442,17 +445,6 @@ function loadMain(){
'agent_id': _userId,
'user_status': _genjinMarkOBj.attr('data-markid')
};
if(type === 'sp1'){
if(_beizhuObjVal){
}else{
_data['content'] = '未打通';
};
if(_genjinMarkOBj.length == 0){
_data['user_status'] = '-1';
};
};
if(isCallFlag){
//电话跟进
if(_genjinMarkOBj2.length == 0){
......@@ -518,7 +510,8 @@ function loadMain(){
};
}
});
}
});
function freePhone(obj){
$.ajax({
......@@ -795,4 +788,4 @@ function loadMain(){
});
};
});
};
};
\ No newline at end of file
This diff is collapsed.
......@@ -371,4 +371,12 @@ a:hover{
}
.file-upload-area>.btn-area>button{
z-index: 2;
}
\ No newline at end of file
}
.ld-Marheight-city{
margin-top: 8px;
}
.follow-up-home{
word-break: break-all;
word-wrap: break-word;
overflow: hidden;
}
\ No newline at end of file
......@@ -17,6 +17,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'ckfinder', 'ckfinde
init: function() {
//初始化dot
$("body").append(template);
//初始化时间
var myDate = new Date();
var y = myDate.getFullYear();
......@@ -25,6 +26,27 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'ckfinder', 'ckfinde
var day_end = y + '-' + (m < 10 ? ('0' + m) : m) + '-' + (d < 10 ? ('0' + d) : d);
$('#start_date').val(day_end);
$('#end_date').val(day_end);//商铺跟进 添加 默认时间 一个月
//初始化城市 区域筛选
if($("#user_city_choose").val() == 310100){
var city_id=310100;
}
if($("#user_city_choose").val() == 330100){
var city_id=330100;
}
//区域 渲染
if(city_id) {
user.getCityAreaList(city_id, function(_data) {
var _str = '<option value="">区域</option>';
$.each(_data, function(i, item) {
_str += '<option value="' + item.fullName + '">' + item.fullName + '</option>';
});
$("#user_area_choose").html(_str);
});
} else {
};
user.getList();
user.event();
//时间控件初始化
......@@ -80,25 +102,37 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'ckfinder', 'ckfinde
e.stopPropagation();
$(this).parent().remove();
});
//城市 区域 二级联动 筛选
_doc.on('input', '#user_city_choose', function() {
user.getList();
var _this = $(this);
var _id = _this.val();
$('#user_area_choose').html(''); //先清空
if(_id && _id != '0') {
user.getCityAreaList(_id, function(_data) {
// var _str = '';
var _str = '<option value="">区域</option>';
$.each(_data, function(i, item) {
_str += '<option value="' + item.fullName + '">' + item.fullName + '</option>';
});
$('#user_area_choose').html(_str);
});
} else {};
});
//城市 区域 筛选
_doc.on('input', '#user_city_add,#user_city_edit,#user_city_choose', function() {
console.log(222);
_doc.on('input', '#user_city_add,#user_city_edit', function() {
var _this = $(this);
var _id = _this.val();
_this.next().html(''); //先清空
//新增 编辑
var _objTemp = _this.parent().next().find('select');
_objTemp.html(''); //先清空
if(_id && _id != '0') {
user.getCityAreaList(_id, function(_data) {
// var _str = '';
var _str = '<option value="">全部</option>';
var _str = '<option value="">区域</option>';
$.each(_data, function(i, item) {
_str += '<option value="' + item.fullName + '">' + item.fullName + '</option>';
});
_objTemp.html(_str);
_this.next().html(_str);
});
} else {};
});
......@@ -664,27 +698,39 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'ckfinder', 'ckfinde
return false;
}
$.ajax({
url: '/index/pcAddFollow',
type: 'POST',
async: true,
data: {
"user_id": user.user_id,
"content": genj_text,
"user_status": user_status
},
dataType: 'json',
success: function(data) {
if(data.code == 200) {
alert('修改成功');
user.getGenjincon();
$('#genj_text').val('');
// $("#modal-record").modal('hide');
} else {
alert(data.msg);
}
}
});
if(!user.isAjaxSaving){
user.isAjaxSaving = true;
$.ajax({
url: '/index/pcAddFollow',
type: 'POST',
async: true,
timeout: 30000,
data: {
"user_id": user.user_id,
"content": genj_text,
"user_status": user_status
},
beforeSend: function() {},
dataType: 'json',
success: function(data) {
if(data.code == 200) {
alert('修改成功');
user.isAjaxSaving = false;//请求结束,再改为初始状态
user.getGenjincon();
$('#genj_text').val('');
// $("#modal-record").modal('hide');
} else {
alert(data.msg);
}
},
complete: function(xhr, textStatus){
if(textStatus === 'timeout'){
layerTipsX('请求超时');
};
}
});
}
},
//
......@@ -772,7 +818,7 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'ckfinder', 'ckfinde
//区域 渲染
if(city_id) {
user.getCityAreaList(city_id, function(_data) {
var _str = '<option value="0">全部</option>';
var _str = '<option value="">区域</option>';
$.each(_data, function(i, item) {
_str += '<option value="' + item.fullName + '">' + item.fullName + '</option>';
});
......@@ -1137,7 +1183,11 @@ define(['doT', 'text!temp/remark_follow_template_tpl.html', 'ckfinder', 'ckfinde
//客户动态 即跟进
var caozuo_table = "";
$.each(data['data']['user_date'], function(i, item) {
caozuo_table += '<tr><td class="text-left" width="70%">' + item.step + '</td><td>' + item.name + '</td><td>' + item.create_time + '</td></tr>';
if(item.step_name=='report'){
caozuo_table += '<tr><td class="text-left follow-up-home" width="70%">' + item.step+'到场时间:'+ item.predict_see_time +'备注:'+item.intro+ '</td><td>' + item.name + '</td><td>' + item.create_time + '</td></tr>';
}else{
caozuo_table += '<tr><td class="text-left follow-up-home" width="70%">' + item.step+ '</td><td>' + item.name + '</td><td>' + item.create_time + '</td></tr>';
}
});
if(caozuo_table){
$("#caozuo_table2").html(caozuo_table);
......
......@@ -66,6 +66,25 @@ define(['doT', 'text!temp/followHouseUp_template_tpl.html', 'css!style/home.css'
var day_start = getPreMonth(day_end);
$('#create_time_start').val(day_start);
$('#create_time_end').val(day_end);//商铺跟进 添加 默认时间 一个月
//初始化城市 区域筛选
if($("#user_city_choose").val() == 310100){
var city_id=310100;
}
if($("#user_city_choose").val() == 330100){
var city_id=330100;
}
//区域 渲染
if(city_id) {
house.getCityAreaList(city_id, function(_data) {
var _str = '<option value="">区域</option>';
$.each(_data, function(i, item) {
_str += '<option value="' + item.fullName + '">' + item.fullName + '</option>';
});
$("#shop_area_id").html(_str);
});
} else {
};
house.getList(0);//商铺跟进列表
......@@ -130,7 +149,8 @@ define(['doT', 'text!temp/followHouseUp_template_tpl.html', 'css!style/home.css'
house.followupAdd();
});
//城市 区域 筛选
_doc.on('input', '#shop_city_id', function() {
_doc.on('input', '#user_city_choose', function() {
house.getList();
var _this = $(this);
var _id = _this.val();
_this.next().html(''); //先清空
......@@ -139,12 +159,12 @@ define(['doT', 'text!temp/followHouseUp_template_tpl.html', 'css!style/home.css'
_objTemp.html(''); //先清空
if(_id && _id != '0') {
house.getCityAreaList(_id, function(_data) {
var _str = '<option value="">全部</option>';
var _str = '<option value="">区域</option>';
$.each(_data, function(i, item) {
_str += '<option value="' + item.fullName + '">' + item.fullName + '</option>';
});
_objTemp.html(_str);
_this.next().html(_str);
$('#shop_area_id').html(_str);
});
} else {};
......@@ -190,15 +210,20 @@ define(['doT', 'text!temp/followHouseUp_template_tpl.html', 'css!style/home.css'
// params.store_id = $('#guest_stores').val() * 1;
// params.user_name = $('#user_name').val();
params.name_or_phone = $('#user_phone').val();
if(params.name_or_phone.length == 1){
alert('跟进人姓名的搜素必须2字及2字以上');
return;
}
// params.report_agent_phone = $('#report_agent_phone').val();
params.search_content = $('#follow_up_con').val();
params.pageNo = house.pageNo;
params.pageSize = house.pageSize;
params.AuthToken = user_info_obj.AuthToken;
if($('#shop_city_id').val() == 310100){
if($('#user_city_choose').val() == 310100){
params.city = '上海市' ;
}
if($('#shop_city_id').val() == 330100){
if($('#user_city_choose').val() == 330100){
params.city = '杭州市' ;
}
params.disc = $('#shop_area_id').val(); //区域筛选
......
......@@ -2,7 +2,7 @@
* Created by 刘丹 on 2017/12/11.
*/
define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfinder', 'ckfinderStart', 'pagination', 'bootstrapJs'], function(doT, template) {
define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfinder', 'ckfinderStart', 'pagination', 'bootstrapJs','blow-up'], function(doT, template) {
business = {
pageNo: 1,
/*第几页*/
......@@ -27,7 +27,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
//初始化dot
business.getDistrict();
$("body").append(template);
$('.J_preview').preview();//放大收款图片
function  getPreMonth(date)  {            
var  arr  =  date.split('-');            
var  year  =  arr[0];             
......@@ -62,6 +62,25 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
var day_start = getPreMonth(day_end);
// $('#start_date').val(day_start);
// $('#end_date').val(day_end);//去掉默认时间
//初始化城市 区域筛选
if($("#user_city_choose").val() == 310100){
var city_id=310100;
}
if($("#user_city_choose").val() == 330100){
var city_id=330100;
}
//区域 渲染
if(city_id) {
business.getDistrictStoreList(city_id, function(_data) {
var _str = '<option value="">区域</option>';
$.each(_data, function(i, item) {
_str += '<option value="' + item.fullName + '">' + item.fullName + '</option>';
});
$("#shop_area_id").html(_str);
});
} else {
};
business.getList(1);
business.event();
business.resetLoad();
......@@ -153,28 +172,24 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
}
});
});
//城市 区域 筛选
_doc.on('input', '#shop_city_id', function() {
console.log(222);
var _this = $(this);
var _id = _this.val();
_this.next().html(''); //先清空
//新增 编辑
var _objTemp = _this.parent().next().find('select');
_objTemp.html(''); //先清空
if(_id && _id != '0') {
business.getDistrictStoreList(_id, function(_data) {
// var _str = '';
var _str = '<option value="">全部</option>';
$.each(_data, function(i, item) {
_str += '<option value="' + item.fullName + '">' + item.fullName + '</option>';
});
_objTemp.html(_str);
_this.next().html(_str);
//城市 区域 二级联动 筛选
_doc.on('input', '#user_city_choose', function() {
business.getList();
var _this = $(this);
var _id = _this.val();
$('#user_area_choose').html(''); //先清空
if(_id && _id != '0') {
business.getDistrictStoreList(_id, function(_data) {
// var _str = '';
var _str = '<option value="">区域</option>';
$.each(_data, function(i, item) {
_str += '<option value="' + item.fullName + '">' + item.fullName + '</option>';
});
} else {};
});
$('#shop_area_id').html(_str);
});
} else {};
});
//查看弹出框里的tab点击事件,查看商铺,商铺跟进
_doc.on('click', '.detail-modal-header-tab>a', function(e){
e.preventDefault();
......@@ -427,9 +442,11 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
var img_url = "";
$.each(data['data']['exclusive_img'], function(i, item) {
var local_img = location.origin + '/resource/lib/Attachments/images/' + item.img_name;
img_url += '<img src="' + local_img + '" class="jai_dujia" data-img="' + item.img_name + '" >';
img_url += '<img src="' + local_img + '" data-bimg="' + local_img + '" class="jai_dujia diagram-image J_preview" data-img="' + item.img_name + '" >';
});
$("#liudan_pic_pre").html(img_url);
$('.J_preview').preview();//放大图片
}
} else {
alert('获取失败!');
......@@ -750,10 +767,10 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
params.internal_title = $('#internal_title').val(); //对内商铺名称
params.external_title = $('#internal_title_open').val(); //对外商铺名称
params.area = $('#area_id').val(); //面积筛选
if($('#shop_city_id').val() == 310100){
if($('#user_city_choose').val() == 310100){
params.city = '上海市' ;
}
if($('#shop_city_id').val() == 330100){
if($('#user_city_choose').val() == 330100){
params.city = '杭州市' ;
}
params.disc = $('#shop_area_id').val(); //区域筛选
......@@ -818,7 +835,6 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
$('#district_id').append(str_district);
$('#area_id').append(str_area);
$('#yetai_id').append(str_yetai);
fn && fn();
}
}
});
......
......@@ -17,6 +17,25 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
init: function() {
//初始化dot
$("body").append(template);
//初始化城市 区域筛选
if($("#user_city_choose").val() == 310100){
var city_id=310100;
}
if($("#user_city_choose").val() == 330100){
var city_id=330100;
}
//区域 渲染
if(city_id) {
user.getCityAreaList(city_id, function(_data) {
var _str = '<option value="">区域</option>';
$.each(_data, function(i, item) {
_str += '<option value="' + item.fullName + '">' + item.fullName + '</option>';
});
$("#user_area_choose").html(_str);
});
} else {
};
user.getList();
user.event();
//新增 默认上海
......@@ -120,8 +139,26 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
}
});
});
//城市 区域 二级联动 筛选
_doc.on('input', '#user_city_choose', function() {
user.getList();
var _this = $(this);
var _id = _this.val();
$('#user_area_choose').html(''); //先清空
if(_id && _id != '0') {
user.getCityAreaList(_id, function(_data) {
// var _str = '';
var _str = '<option value="">区域</option>';
$.each(_data, function(i, item) {
_str += '<option value="' + item.fullName + '">' + item.fullName + '</option>';
});
$('#user_area_choose').html(_str);
});
} else {};
});
//城市 区域 筛选
_doc.on('input', '#user_city_add,#user_city_edit,#user_city_choose', function() {
_doc.on('input', '#user_city_add,#user_city_edit', function() {
var _this = $(this);
var _id = _this.val();
_this.next().html(''); //先清空
......@@ -662,6 +699,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
params.industry_type = $(".industry_type_two_1").val();
params.price_demand = $(".price_demand_1").val();
params.area_demand = $(".area_demand_1").val();
if($('#user_city_edit').val() == 310100){
params.city = '上海市' ;
params.province = '上海市' ;
......@@ -707,28 +745,39 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
alert('状态标签未选中');
return false;
}
$.ajax({
url: '/index/pcAddFollow',
type: 'POST',
async: true,
data: {
"user_id": user.user_id,
"content": genj_text,
"user_status": user_status
},
dataType: 'json',
success: function(data) {
if(data.code == 200) {
alert('修改成功');
user.getGenjincon();
$('#genj_text').val('');
// $("#modal-record").modal('hide');
} else {
alert(data.msg);
}
}
if(!user.isAjaxSaving){
user.isAjaxSaving = true;
$.ajax({
url: '/index/pcAddFollow',
type: 'POST',
async: true,
timeout: 30000,
data: {
"user_id": user.user_id,
"content": genj_text,
"user_status": user_status
},
beforeSend: function() {},
dataType: 'json',
success: function(data) {
if(data.code == 200) {
alert('修改成功');
user.isAjaxSaving = false;//请求结束,再改为初始状态
user.getGenjincon();
$('#genj_text').val('');
// $("#modal-record").modal('hide');
} else {
alert(data.msg);
}
},
complete: function(xhr, textStatus){
if(textStatus === 'timeout'){
layerTipsX('请求超时');
};
}
});
}
},
//
......@@ -1055,6 +1104,11 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
$("#user_vip").focus();
return;
}
if(params.agents_id==''){
alert('请选择正确的客方');
return;
}
......@@ -1197,9 +1251,9 @@ define(['doT', 'text!temp/user_template_tpl.html', 'ckfinder', 'ckfinderStart',
var caozuo_table = "";
$.each(data['data']['user_date'], function(i, item) {
if(item.step_name=='report'){
caozuo_table += '<tr><td class="text-left" width="70%">' + item.step+'到场时间:'+ item.predict_see_time +'备注:'+item.intro+ '</td><td>' + item.name + '</td><td>' + item.create_time + '</td></tr>';
caozuo_table += '<tr><td class="text-left follow-up-home" width="70%">' + item.step+'到场时间:'+ item.predict_see_time +'备注:'+item.intro+ '</td><td>' + item.name + '</td><td>' + item.create_time + '</td></tr>';
}else{
caozuo_table += '<tr><td class="text-left" width="70%">' + item.step+ '</td><td>' + item.name + '</td><td>' + item.create_time + '</td></tr>';
caozuo_table += '<tr><td class="text-left follow-up-home" width="70%">' + item.step+ '</td><td>' + item.name + '</td><td>' + item.create_time + '</td></tr>';
}
});
......
This diff is collapsed.
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