Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
3bf94893
Commit
3bf94893
authored
May 29, 2019
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
办公楼列表
parent
6d653a59
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
4760 additions
and
465 deletions
+4760
-465
OfficeBuilding.php
application/index/controller/OfficeBuilding.php
+30
-0
officeBuildingList.html
...ication/index/view/officeBuilding/officeBuildingList.html
+714
-0
officeEdit.html
application/index/view/officeBuilding/officeEdit.html
+705
-0
route.php
application/route.php
+3
-0
officeBuildingList.js
public/resource/js/officeBuildingList.js
+1696
-0
officeEdit.js
public/resource/js/officeEdit.js
+1427
-0
复制 schoolBusinessNew.js
public/resource/js/复制 schoolBusinessNew.js
+0
-465
office_building_list_template_tpl.html
.../resource/template/office_building_list_template_tpl.html
+185
-0
No files found.
application/index/controller/OfficeBuilding.php
0 → 100644
View file @
3bf94893
<?php
namespace
app\index\controller
;
/**
* Created by PhpStorm.
* User: liu yin ping
* Date: 2018/8/7
* Time: 15:48
*/
use
app\index\extend\Basic
;
class
OfficeBuilding
extends
Basic
{
public
function
officeBuildingList
()
{
if
(
!
$this
->
request
->
isAjax
())
{
return
view
(
'officeBuilding/officeBuildingList'
);
}
}
public
function
officeEdit
()
{
if
(
!
$this
->
request
->
isAjax
())
{
return
view
(
'officeBuilding/officeEdit'
);
}
}
}
\ No newline at end of file
application/index/view/officeBuilding/officeBuildingList.html
0 → 100644
View file @
3bf94893
{layout name="global/frame_two_tpl" /}
<input
type=
"hidden"
class=
"page-load"
id=
"officeBuildingList"
/>
<style>
video
{
outline
:
none
;
}
.clear
{
clear
:
both
;
}
.modal.fade.in.yz
{
opacity
:
0
;
}
.modal-backdrop.fade.in
{
opacity
:
0
;
}
#batch
{
float
:
left
;
height
:
34px
;
line-height
:
34px
;
}
.ld-Marheight
{
margin-top
:
15px
;
}
.phone_list
{
margin-top
:
32px
;
width
:
182px
;
margin-left
:
-182px
;
}
.phone_jia1
{
float
:
left
;
width
:
182px
;
}
.phone_list
li
{
height
:
22px
;
line-height
:
22px
;
}
.phone_list
li
:nth-of-type
(
even
)
{
display
:
none
;
}
.modal-dialog-one
{
width
:
668px
;
}
.main_table_th_tr
>
th
:nth-of-type
(
2
)
{
width
:
50px
;
}
.main_table_th_tr
>
th
:nth-of-type
(
4
)
{
width
:
86px
;
}
.main_table_th_tr
>
th
:nth-of-type
(
5
)
{
width
:
86px
;
}
.main_table_th_tr
>
th
:nth-of-type
(
7
)
{
width
:
100px
;
}
.main_table_th_tr
>
th
:nth-of-type
(
8
)
{
width
:
50px
;
}
.btn-top-house
{
margin-top
:
20px
;
text-align
:
center
;
}
.ld-Marheight-city
{
margin-top
:
8px
;
}
/*控制放大镜的 收款图片显示*/
#preview
{
z-index
:
9999
!important
;
}
#preview
img
{
width
:
580px
;
max-height
:
720px
;
}
.main-select
{
display
:
none
;
}
.btn2
{
width
:
10%
!important
;
}
.btn4
{
width
:
16%
!important
;
}
/*适配 不同屏幕*/
@media
screen
and
(
min-width
:
1680px
){
.btn4
{
width
:
12%
!important
;
}
.btn2
{
width
:
8%
!important
;
}
}
/*上传附件 的 样式*/
.img-pre-ul
>
li
{
list-style
:
no
;
float
:
left
;
width
:
210px
;
height
:
170px
;
overflow
:
hidden
;
margin-right
:
10px
;
margin-top
:
10px
;
}
.img-pre-ul
>
li
.pdf-pre-li
{
height
:
70px
;
}
.img-pre-ul
>
li
>
img
{
float
:
left
;
width
:
210px
;
height
:
140px
;
object-fit
:
contain
;
cursor
:
pointer
;
}
.img-pre-ul
>
li
>
a
{
float
:
left
;
width
:
210px
;
text-align
:
center
;
line-height
:
30px
;
}
.img-pre-ul
>
li
>
a
.pdf-pre-a
{
line-height
:
20px
;
word-break
:
break-all
;
}
.delet-pic-btn
{
color
:
red
;
}
.img-pre-ul
{
padding-left
:
0
;
overflow
:
hidden
;
}
.modal-dialog-dujia
{
width
:
856px
;
}
.phone_list_dujia
{
margin-top
:
34px
;
width
:
257px
;
margin-left
:
-256px
;
}
.file-upload-area
>
.btn-area
{
position
:
relative
;
width
:
82px
;
height
:
34px
;
}
.iframe-shop-detail-scroll
{
height
:
600px
;
overflow-y
:
scroll
;
}
/*盘方员工 姓名 下拉式 搜索*/
/*经纪人 搜索 下拉式*/
.left-phone
{
margin-left
:
10px
;
float
:
left
;
width
:
230px
;
position
:
relative
;
}
.user-ul-agent
{
width
:
223px
;
height
:
auto
;
float
:
left
;
position
:
absolute
;
background
:
#fff
;
border
:
.5px
solid
#ccc
;
border-top
:
none
;
left
:
11px
;
z-index
:
999
;
}
.user-ul-agent
li
{
list-style
:
none
;
line-height
:
30px
;
margin-left
:
-28px
;
}
/*加载图标*/
#main_loading_pic
{
position
:
fixed
;
top
:
50%
;
left
:
50%
;
width
:
100px
;
height
:
100px
;
margin-left
:
50px
;
margin-top
:
-100px
;
overflow
:
hidden
;
display
:
none
;
}
/*推广链接 弹窗*/
#link_content
{
font-size
:
14px
;
font-weight
:
bold
;
margin
:
0
20px
;
}
.modal-dialog-tuiguang
{
width
:
1080px
;
}
/*搜索条件的margain变小*/
.ld-Marheight
{
margin-top
:
5px
;
}
/*商铺详情 样式优化*/
.btn-info-liu
{
font-size
:
18px
;
color
:
#FF8018
;
}
.btn-default-liu
{
opacity
:
0.4
;
font-size
:
18px
;
color
:
#1F3865
;
}
.detail-modal-header-tab
span
{
cursor
:
pointer
;
margin-left
:
30px
;
font-weight
:
600
;
}
.upload-image-btn
{
width
:
82px
;
height
:
40px
;
position
:
relative
;
opacity
:
0
;
z-index
:
66
;
}
.btn-default-liu-css
{
position
:
relative
;
left
:
-80px
;
z-index
:
6
;
}
</style>
<div
id=
"page-content-wrapper"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
""
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading breadcrumb"
>
<li><a
href=
"#"
>
办公楼列表
</a></li>
<div
class=
"pull-right"
>
<ul
class=
"bread_btn"
>
<li>
<a
href=
"/admin.php/index/officeEdit"
class=
"btn btn-default"
><i
class=
"icon-plus"
></i>
新增办公楼
</a>
</li>
</ul>
</div>
</div>
<div
class=
"panel-body"
>
<div
class=
"table-responsive"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<thead>
<tr>
<td
colspan=
"16"
>
<form
id=
"form_search"
>
<div
class=
"col-xs-12"
style=
"padding:0px"
>
<select
class=
"form-control btn2-city shop_city_choose_site_list ld-Marheight"
></select>
<select
class=
"form-control btn2 ld-Marheight"
id=
"shop_area_id"
>
<option
value=
""
selected=
"selected"
>
区域
</option>
</select>
<select
class=
"form-control btn2 ld-Marheight"
id=
"business_circle_id"
>
<option
value=
""
selected=
"selected"
>
商圈
</option>
</select>
<select
class=
"form-control btn2 ld-Marheight"
id=
"shop_type"
>
<option
value=
"-1"
>
房源类型
</option>
<option
value=
"0"
>
写字楼
</option>
<option
value=
"1"
>
高端洋房
</option>
</select>
<select
class=
"form-control btn2 ld-Marheight"
id=
"leased"
>
<option
value=
""
>
办公楼状态
</option>
<option
value=
"1"
>
上架
</option>
<option
value=
"2"
>
下架
</option>
<option
value=
"3"
>
无效
</option>
</select>
<select
class=
"form-control btn2 ld-Marheight"
id=
"lease_state"
>
<option
value=
""
>
出租状态
</option>
<option
value=
"1"
>
求租
</option>
<option
value=
"2"
>
已租
</option>
</select>
<select
class=
"form-control btn2 ld-Marheight"
id=
"lease_state"
>
<option
value=
""
>
面积筛选
</option>
<option
value=
"1"
>
30
</option>
<option
value=
"2"
>
30
</option>
<option
value=
"2"
>
30
</option>
</select>
<!--<select class="form-control btn2 " id="yetai_id">
<option value="" selected="selected">业态筛选</option>
</select>-->
<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=
""
autocomplete=
"off"
>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"landlord_phone"
placeholder=
"房东手机号"
type=
"tel"
value=
""
>
<span
class=
"fore-span ld-Marheight"
>
租金总价(元/月):
</span>
<input
class=
"form-control btn2 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"price_start"
name=
""
type=
"text"
placeholder=
"请输入"
>
<span
class=
"fore-span ld-Marheight"
>
-
</span>
<input
class=
"form-control btn2 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"price_end"
name=
""
type=
"text"
placeholder=
"请输入"
>
<span
class=
"fore-span ld-Marheight"
>
租金单价(元/㎡/天):
</span>
<input
class=
"form-control btn2 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"price_start"
name=
""
type=
"text"
placeholder=
"请输入"
>
<span
class=
"fore-span ld-Marheight"
>
-
</span>
<input
class=
"form-control btn2 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"price_end"
name=
""
type=
"text"
placeholder=
"请输入"
>
<span
class=
"fore-span ld-Marheight"
>
面积m²:
</span>
<input
class=
"form-control btn2 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"area_start"
name=
""
type=
"text"
placeholder=
"请输入"
>
<span
class=
"fore-span ld-Marheight"
>
-
</span>
<input
class=
"form-control btn2 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"area_end"
name=
""
type=
"text"
placeholder=
"请输入"
>
<span
class=
"fore-span ld-Marheight"
>
可容纳工位:
</span>
<input
class=
"form-control btn2 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"area_start"
name=
""
type=
"text"
placeholder=
"请输入"
>
<span
class=
"fore-span ld-Marheight"
>
-
</span>
<input
class=
"form-control btn2 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"area_end"
name=
""
type=
"text"
placeholder=
"请输入"
>
<!--<input class="form-control btn2 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="suitable_yetai_input" name="" type="text" placeholder="最适合业态">-->
</div>
<div
class=
"main-select col-xs-12"
style=
"padding:0px;"
>
<!--<select class="form-control btn11 ld-Marheight" id="is_carefully_chosen">
<option value="-1"">是否显示在首页</option>
<option value="0">否</option>
<option value="1">是</option>
</select>
<select class="form-control btn11 ld-Marheight" id="is_show">
<option value="-1">是否给商户看</option>
<option value="0">是</option>
<option value="1">否</option>
</select>-->
<select
class=
"form-control btn2 ld-Marheight"
id=
"is_exclusive_type"
>
<option
value=
"-1"
>
是否独家
</option>
<option
value=
"1"
>
是
</option>
<option
value=
"0"
>
否
</option>
</select>
<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 btn4 ld-Marheight input"
name=
""
id=
"district_id_panfang"
>
<option
value=
""
>
盘方部门
</option>
</select>
<select
class=
"form-control btn4 ld-Marheight input"
name=
""
id=
"guest_stores_panfang"
value=
""
>
</select>
<div
class=
"left-phone"
>
<input
class=
"form-control ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"dish_name"
placeholder=
"盘方(员工)姓名"
type=
"text"
value=
""
>
<ul
class=
"user-ul-agent"
></ul>
</div>
<!--盘方员工姓名 下拉式 搜索-->
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"dish_phone"
placeholder=
"盘方(员工)手机号"
type=
"tel"
value=
""
>
<span
class=
"fore-span ld-Marheight"
>
创建时间:
</span>
<input
class=
"form-control btn4 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"start_date"
name=
"start_date"
type=
"date"
>
<span
class=
"fore-span ld-Marheight"
>
-
</span>
<input
class=
"form-control btn4 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"end_date"
name=
"end_date"
type=
"date"
>
<select
class=
"form-control btn2 ld-Marheight"
id=
"is_lock_plate"
>
<option
value=
"-1"
>
是否锁盘
</option>
<option
value=
"1"
>
是
</option>
<option
value=
"0"
>
否
</option>
</select>
<select
class=
"form-control btn2 ld-Marheight"
id=
"is_vip_plate"
>
<option
value=
"-1"
>
是否VIP盘
</option>
<option
value=
"1"
>
是
</option>
<option
value=
"0"
>
否
</option>
</select>
</div>
<div
class=
"col-xs-12"
style=
"padding : 0px;"
>
<span
class=
"btn btn-info btn3 ld-Marheight"
id=
"search"
>
搜索
</span>
<span
class=
"btn btn-info btn3 ld-Marheight"
id=
"reset"
>
重置
</span>
<!-- 批量修改盘方 -->
<a
href=
"#modal_modify_user"
data-toggle=
"modal"
class=
"btn btn-info btn3 ld-Marheight"
><i
class=
"icon-plus"
></i>
批量修改盘方
</a>
<!-- 本人商铺 -->
<span
class=
"btn btn-info btn3 ld-Marheight"
id=
"persional_shop"
title=
"点击切换到本人商铺"
>
本人房源
</span>
<!-- 生成推广链接 -->
<!--<a href="#modal_link" data-toggle="modal" class="btn btn-info btn3 ld-Marheight link_shop_c">生成推广链接</a>-->
<!-- 高级搜索 -->
<span
class=
"btn btn-info btn3 ld-Marheight"
id=
"main_select"
title=
"高级搜索"
>
高级搜索
</span>
</div>
</form>
</td>
</tr>
<tr
class=
"main_table_th_tr"
>
<th
class=
"text-center"
>
房源编号
</th>
<th
class=
"text-center"
>
类型
</th>
<th
class=
"text-center"
>
区域
</th>
<th
class=
"text-center"
>
商圈
</th>
<th
class=
"text-center"
>
楼盘名称
</th>
<th
class=
"text-center"
>
楼层
</th>
<th
class=
"text-center"
>
租金总价
</th>
<th
class=
"text-center"
>
租金单价
</th>
<th
class=
"text-center"
>
面积
</th>
<th
class=
"text-center"
>
工位
</th>
<th
class=
"text-center"
>
上下架
</th>
<th
class=
"text-center"
>
出租状态
</th>
<th
class=
"text-center"
>
对客户展示
</th>
<th
class=
"text-center"
>
盘方
</th>
<th
class=
"text-center"
>
创建时间
</th>
<th
class=
"text-center"
>
操作
</th>
</tr>
</thead>
<tbody
class=
"text-center"
id=
"business_list"
></tbody>
</table>
</div>
<!-- /#page-content-wrapper -->
<div
class=
"text-right"
id=
"pagediv"
>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"modal fade"
id=
"modal-delete"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title"
>
删除
</h4>
</div>
<div
class=
"modal-body"
>
<div
class=
"modal-body"
id=
"del_msg"
>
确认删除吗?
</div>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
<button
type=
"button"
class=
"btn btn-primary"
id=
"confirm_delete"
>
删除
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!--设置案场权限人,修改盘方-->
<div
class=
"modal fade"
id=
"modal-anch"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title"
id=
"myModalLabel"
>
</h4>
</div>
<!--号码匹配名字 输入框666-->
<div
class=
"modal-body"
>
<form
id=
"submit_agent"
>
<div
class=
"jian_class"
>
<input
name=
"ues_id"
placeholder=
"请输入"
type=
"tel"
value=
""
class=
"phone_jia"
>
<ul
class=
"phone_list"
></ul>
</div>
<!-- <img src="/resource/image/jia2@2x.png" class="jia"> -->
<input
type=
"hidden"
name=
"ues_id"
class=
"houseinfos_id"
>
</form>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
<button
type=
"button"
class=
"btn btn-primary submit_follow"
data-dismiss=
"modal"
>
提交
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!--是否独家-->
<div
class=
"modal fade"
id=
"modal-dujia"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog modal-dialog-dujia"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title"
>
独家合同
</h4>
</div>
<div
class=
"modal-body"
>
<form
class=
"form-horizontal"
>
<div
class=
"form-group is_dujia_select"
>
<label
class=
"col-sm-2 control-label"
>
是否独家:
</label>
<select
class=
"form-control btn6"
id=
"sel_dujia"
disabled
>
<option
value=
"null"
class=
"successModel"
>
请选择
</option>
<option
value=
"1"
>
是
</option>
<option
value=
"0"
>
否
</option>
</select>
</div>
<div
class=
"form-group is_dujia"
>
<label
class=
"col-sm-2 control-label"
>
独家合同上传(小于10张):
</label>
<span
id=
"liudan_pic_pre"
></span>
<!--<input readonly="readonly" type="hidden" name="liudan_pic_pre" class="form-control btn6" placeholder="请选择图片">
<button class="btn btn-default liudan_pic_btn" id="liudan_pic_btn" type="button">选择图片</button>-->
<input
class=
"upload-image-btn"
id=
"xiangqing_pic_btn"
type=
"file"
data-limittop=
"10"
style=
"display: inline-block;"
>
<button
class=
"btn btn-default btn-default-liu-css"
>
选择图片
</button>
</div>
<div
class=
"form-group is_dujia"
>
<label
class=
"col-sm-2 control-label"
>
独家代理有效期:
</label>
<input
class=
"form-control btn5 "
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"start_date_dujia"
name=
"start_date_dujia"
type=
"date"
>
<span
class=
"fore-span"
>
-
</span>
<input
class=
"form-control btn5 "
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"end_date_dujia"
name=
"end_date_dujia"
type=
"date"
>
</div>
<div
class=
"form-group is_dujia"
>
<label
class=
"col-sm-2 control-label"
>
独家方:
</label>
<input
class=
"form-control btn7 phone_jia"
data-rule-buga=
"false"
data-rule-required=
"true"
name=
"exclusive"
placeholder=
"请输入姓名或手机号码"
type=
"text"
value=
""
id=
"exclusive"
>
<ul
class=
"phone_list phone_list_dujia"
></ul>
</div>
<!--上传PDF-->
<div
class=
"form-group is_dujia"
>
<label
class=
"col-sm-2 control-label"
>
附件(格式为pdf,选填,上限为3个):
</label>
<div
class=
"col-sm-9"
>
<div
class=
"file-upload-area"
style=
"padding-left:15px!important"
>
<div
class=
"btn-area"
>
<input
type=
"file"
id=
"file_input"
class=
""
data-limittop=
"3"
/>
<!--修改上传文件的最大数字-->
<button
class=
"btn btn-default"
>
选择附件
</button>
</div>
<ul
class=
"img-pre-ul"
id=
"fujian_ul"
></ul>
<p><b>
点击文件名称即可下载
</b></p>
</div>
</div>
</div>
</form>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
<button
type=
"button"
class=
"btn btn-primary submit_follow2"
>
提交
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!--生成推广链接-->
<div
class=
"modal fade"
id=
"modal_link"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog modal-dialog-one modal-dialog-tuiguang"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title"
>
生成推广链接
</h4>
</div>
<div
class=
"modal-body modal-body-one"
>
<div
class=
"tuiguang-type"
>
<a
href=
"javascript:;"
class=
"btn btn-info"
>
百度推广
</a>
<a
href=
"javascript:;"
class=
"btn btn-default"
>
腾讯推广
</a>
<a
href=
"javascript:;"
class=
"btn btn-default"
>
今日头条推广
</a>
<a
href=
"javascript:;"
class=
"btn btn-default"
>
其他
</a>
</div>
<br>
<br>
<br>
<div>
<input
type=
"text"
id=
"hide-input-value"
style=
"opacity: 0;width: 6px;"
/>
<span
id=
"link_content"
>
https://www.tonglianjituan.com/shop_link.html?type=1
&
city=1
&
str=
</span>
<button
type=
"button"
class=
"btn btn-primary copy_link_content"
data-dismiss=
"modal"
>
复制
</button>
</div>
<br><br><br>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!-- #批量修改客方-->
<div
class=
"modal fade"
id=
"modal_modify_user"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog modal-dialog-one"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title"
>
批量修改盘方
</h4>
</div>
<div
class=
"modal-body modal-body-one"
>
<br>
<!-- ============添加========== -->
<div
class=
"jian_class1"
>
<input
name=
"ues_id"
placeholder=
"请输入经纪人姓名"
type=
"tel"
value=
""
class=
"phone_jia1 old_agents form-control"
>
<ul
class=
"phone_list"
></ul>
</div>
<span
class=
"btn3"
id=
"batch"
>
批量修改为
</span>
<div
class=
"jian_class1"
>
<input
name=
"ues_id"
placeholder=
"请输入经纪人姓名"
type=
"tel"
value=
""
class=
"phone_jia1 new_agents form-control"
>
<ul
class=
"phone_list"
></ul>
</div>
<br><br><br>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
<button
type=
"button"
class=
"btn btn-primary"
id=
"modify_add"
data-dismiss=
"modal"
>
提交
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!-- #查看-->
<div
class=
"modal fade modal_followup"
id=
"modal_shop_detail"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog modal-dialog-one"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title detail-modal-header-tab"
>
<span
class=
"btn-info-liu"
>
查看商铺
</span>
<span
class=
"btn-default-liu"
>
商铺跟进
</span>
<span
class=
"btn-default-liu"
>
盘方记录
</span>
<span
class=
"btn-default-liu"
>
查看日志
</span>
<span
class=
"btn-default-liu"
>
编辑日志
</span>
<span
class=
"btn-default-liu"
>
商铺视频
</span>
</h4>
</div>
<div
class=
"modal-body modal-body-one"
style=
"padding-top: 0;"
>
<div
class=
"detail-modal-body-sec"
>
<iframe
class=
"iframe-shop-detail"
></iframe>
</div>
<div
class=
"detail-modal-body-sec"
>
<div
class=
"followup-modal-list-area"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<tbody
class=
""
id=
"modal_followup_table_list"
>
<tr>
<td>
电话跟进:测试测试测试测试测试测试测试测试测试测试测试测试
</td>
<td>
刘丹丹
</td>
<td>
2017-09-05 15:22:33
</td>
</tr>
<tr>
<td
colspan=
"3"
>
2017-09-05 15:22:33
</td>
</tr>
</tbody>
</table>
</div>
<div
class=
"followup-modal-comment-area"
>
<textarea></textarea>
</div>
<div
class=
"btn-top-house"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
<button
type=
"button"
class=
"btn btn-primary"
id=
"modal_followup_submit_btn"
>
提交
</button>
</div>
</div>
<!--操作记录-->
<div
class=
"detail-modal-body-sec iframe-shop-detail-scroll"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<thead>
<tr>
<th
class=
"text-center"
>
盘方修改记录
</th>
<th
class=
"text-center"
>
操作人
</th>
<th
class=
"text-center"
>
操作时间
</th>
</tr>
</thead>
<tbody
class=
"text-center"
id=
"caozuo_table"
>
</table>
</div>
<!--查看日志-->
<div
class=
"detail-modal-body-sec iframe-shop-detail-scroll"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<thead>
<tr>
<th
class=
"text-center"
>
查看时间
</th>
<th
class=
"text-center"
>
商铺ID
</th>
<th
class=
"text-center"
>
查看人
</th>
</tr>
</thead>
<tbody
class=
"text-center"
id=
"caozuo_table_log"
>
</table>
</div>
<!--编辑日志-->
<div
class=
"detail-modal-body-sec iframe-shop-detail-scroll"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<thead>
<tr>
<th
class=
"text-center"
>
编辑时间
</th>
<th
class=
"text-center"
>
编辑人
</th>
<th
class=
"text-center"
>
编辑内容
</th>
</tr>
</thead>
<tbody
class=
"text-center"
id=
"caozuo_table_edit"
>
</table>
</div>
<div
class=
"detail-modal-body-sec iframe-shop-detail-scroll"
>
<table>
<tbody
class=
"text-center"
id=
"shop-details-video"
>
</table>
</div>
</div>
</div>
</div>
</div>
<!--加载图标-->
<div
id=
"main_loading_pic"
>
<img
src=
"/resource/image/jz2.gif"
>
</div>
\ No newline at end of file
application/index/view/officeBuilding/officeEdit.html
0 → 100644
View file @
3bf94893
{layout name="global/frame_two_tpl" /}
<input
type=
"hidden"
class=
"page-load"
id=
"officeEdit"
/>
<style>
.half
{
width
:
50%
!important
;
}
.p-t-10
{
margin-top
:
10px
;
}
.upload-image-btn
{
width
:
82px
;
height
:
40px
;
position
:
relative
;
opacity
:
0
;
z-index
:
66
;
}
.btn-default-liu
{
position
:
relative
;
left
:
-80px
;
z-index
:
6
;
}
</style>
<!--默认#page-content-wrapper是隐藏的-->
<div
id=
"page-content-wrapper"
style=
"display: none;"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
""
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
>
新增/编辑办公楼
</div>
<div
class=
"panel-body"
>
<form
class=
"form-inline"
id=
"main_form"
>
<ul
class=
"list-group"
>
<li
class=
"list-group-item"
>
<div
class=
"form-group"
>
<label
for=
"shangpuType"
>
商铺类型
</label>
<select
class=
"form-control"
name=
"shangpuType"
id=
"shangpuType"
data-alert=
"请选择商铺类型"
>
<option
value=
""
>
请选择
</option>
<option
value=
"1"
>
街铺
</option>
<option
value=
"0"
>
商场
</option>
</select>
</div>
<!--<div class="form-group">-->
<div
class=
"form-group"
style=
"display: none;"
>
<label
for=
"show_all"
>
是否给商户公开
</label>
<select
class=
"form-control"
name=
"showCd"
id=
"showCd"
disabled=
""
>
<option
value=
""
>
请选择
</option>
<option
value=
"0"
>
是
</option>
<option
value=
"1"
>
否
</option>
</select>
</div>
<div
class=
"form-group"
>
<label
for=
"exclusiveType"
>
是否独家
</label>
<select
class=
"form-control"
name=
"exclusiveType"
id=
"exclusiveType"
data-alert=
"请选择是否独家"
>
<option
value=
""
>
请选择
</option>
<option
value=
"0"
>
否
</option>
<option
value=
"1"
>
是
</option>
</select>
</div>
<div
class=
"form-group"
>
<label
for=
"exclusiveType"
>
来源
</label>
<select
class=
"form-control"
name=
"exclusiveType"
id=
"laiyuan"
data-alert=
"请选择是否独家"
>
<option
value=
"-1"
>
请选择
</option>
<option
value=
"0"
>
无
</option>
<option
value=
"1"
>
网络
</option>
<option
value=
"2"
>
客户介绍
</option>
<option
value=
"3"
>
朋友介绍
</option>
<option
value=
"4"
>
上门挂牌
</option>
<option
value=
"5"
>
打跟进
</option>
<option
value=
"6"
>
驻守
</option>
<option
value=
"7"
>
其它
</option>
</select>
</div>
</li>
<!-- 案场人电话添加多个手机号-->
<!--<li class="list-group-item" id="li_acr_phone">
<div class="form-group phone-list-container" style="width: 70px;">
<label for="">案场人电话</label>
</div>
<div class="form-group phone-list-container">
<input type="tel" class="form-control phone_jia" placeholder="请输入">
<ul></ul>
</div>
<img src="/resource/image/jia2@2x.png" data-hideid='1' class="input-add-tel" id="acr_tel_jia" />
</li>-->
<li
class=
"list-group-item"
id=
"li_pf_phone"
>
<div
class=
"form-group phone-list-container"
style=
"width: 70px;"
>
<label
for=
""
>
盘方
</label>
</div>
<div
class=
"form-group phone-list-container panfang"
>
<input
type=
"tel"
class=
"form-control phone_jia"
placeholder=
"请输入"
id=
"panfang_data"
>
<ul></ul>
</div>
<img
src=
"/resource/image/jia2@2x.png"
data-hideid=
'0'
class=
"input-add-tel"
id=
"pf_tel_jia"
/>
</li>
<li
class=
"list-group-item"
id=
"li_acqx_phone"
>
<div
class=
"form-group phone-list-container"
style=
"width: 70px;"
>
<label
for=
""
>
案场权限人
</label>
</div>
<div
class=
"form-group phone-list-container anchang "
>
<input
type=
"tel"
class=
"form-control phone_jia"
placeholder=
"请输入"
>
<ul></ul>
</div>
<img
src=
"/resource/image/jia2@2x.png"
data-hideid=
'0'
class=
"input-add-tel"
id=
"acqx_tel_jia"
/>
</li>
<li
class=
"list-group-item"
>
<label
for=
""
>
业态(可多选)
</label>
<label
class=
"checkbox-inline"
>
<input
type=
"checkbox"
class=
"yetai"
value=
"商场美食"
>
商场美食
</label>
<label
class=
"checkbox-inline"
>
<input
type=
"checkbox"
class=
"yetai"
value=
"沿街餐饮"
>
沿街餐饮
</label>
<label
class=
"checkbox-inline"
>
<input
type=
"checkbox"
class=
"yetai"
value=
"百货超市"
>
百货超市
</label>
<label
class=
"checkbox-inline"
>
<input
type=
"checkbox"
class=
"yetai"
value=
"服饰鞋包"
>
服饰鞋包
</label>
<label
class=
"checkbox-inline"
>
<input
type=
"checkbox"
class=
"yetai"
value=
"休闲娱乐"
>
休闲娱乐
</label>
<label
class=
"checkbox-inline"
>
<input
type=
"checkbox"
class=
"yetai"
value=
"亲子教育"
>
亲子教育
</label>
<label
class=
"checkbox-inline"
>
<input
type=
"checkbox"
class=
"yetai"
value=
"办公"
>
办公
</label>
<label
class=
"checkbox-inline"
>
<input
type=
"checkbox"
class=
"yetai"
value=
"其他"
>
其他
</label>
<!--楼层新增-->
<label
style=
"margin-left: 128px;"
>
楼层:
</label>
<input
type=
"text"
class=
"form-control"
id=
"loucengfloor"
placeholder=
"请输入楼层"
data-alert=
"请输入楼层!"
>
</li>
<li
class=
"list-group-item"
>
<div
class=
"suitable-yetai"
>
<label>
最适合业态(3个):
</label><input
type=
"input"
class=
"suitable-yetai-input form-control"
value=
""
placeholder=
"例如麻辣烫、水饺等"
data-alert=
'请输入3个最适合业态'
><input
type=
"input"
class=
"suitable-yetai-input form-control"
value=
""
placeholder=
"请输入"
data-alert=
'请输入3个最适合业态'
><input
type=
"input"
class=
"suitable-yetai-input form-control"
value=
""
placeholder=
"请输入"
data-alert=
'请输入3个最适合业态'
>
</div>
</li>
<li
class=
"list-group-item"
id=
"shangpu_tags_area"
>
<label
for=
""
>
商铺标签(可多选)
</label>
<!--<label class="checkbox-inline">
<input type="checkbox" class="roomTag" id="" value="购物广场" name="shangpu_tags[]">购物广场
</label>
<label class="checkbox-inline">
<input type="checkbox" class="roomTag" id="" value="临近地铁" name="shangpu_tags[]">临近地铁
</label>
<label class="checkbox-inline">
<input type="checkbox" class="roomTag" id="" value="临街旺铺" name="shangpu_tags[]">临街旺铺
</label>
<label class="checkbox-inline">
<input type="checkbox" class="roomTag" id="" value="无进场费"name="shangpu_tags[]">无进场费
</label>
<label class="checkbox-inline">
<input type="checkbox" class="roomTag" id="" value="办公室配套" name="shangpu_tags[]">办公室配套
</label>
<label class="checkbox-inline">
<input type="checkbox" class="roomTag" id="" value="5A景区游客量大" name="shangpu_tags[]">5A景区游客量大
</label>
<label class="checkbox-inline">
<input type="checkbox" class="roomTag" id="" value="餐饮综合体" name="shangpu_tags[]">餐饮综合体
</label>
<label class="checkbox-inline">
<input type="checkbox" class="roomTag" id="" value="强大案场阵容"name="shangpu_tags[]">强大案场阵容
</label>
<label class="checkbox-inline">
<input type="checkbox" class="roomTag" id="" value="综合市场" name="shangpu_tags[]">综合市场
</label>
<label class="checkbox-inline">
<input type="checkbox" class="roomTag" id="" value="超高佣金" name="shangpu_tags[]">超高佣金
</label>
<label class="checkbox-inline">
<input type="checkbox" class="roomTag" id="" value="居民区十字路口" name="shangpu_tags[]">居民区十字路口
</label>
<label class="checkbox-inline">
<input type="checkbox" class="roomTag" id="" value="写字楼底商"name="shangpu_tags[]">写字楼底商
</label>
<label class="checkbox-inline">
<input type="checkbox" class="roomTag" id="" value="住宅配套" name="shangpu_tags[]">住宅配套
</label>
<label class="checkbox-inline">
<input type="checkbox" class="roomTag" id="" value="沿街一单收佣9.5w" name="shangpu_tags[]">沿街一单收佣9.5w
</label>
<label class="checkbox-inline">
<input type="checkbox" class="roomTag" id="" value="黄兴路1750" name="shangpu_tags[]">黄兴路1750
</label>
<label class="checkbox-inline">
<input type="checkbox" class="roomTag" id="" value="大学门口"name="shangpu_tags[]">大学门口
</label>
<label class="checkbox-inline">
<input type="checkbox" class="roomTag" id="" value="广灵二路" name="shangpu_tags[]">广灵二路
</label>
<label class="checkbox-inline">
<input type="checkbox" class="roomTag" id="" value="40831" name="shangpu_tags[]">40831
</label>-->
</li>
<li
class=
"list-group-item"
>
<div
class=
"col-xs-12 form-group"
>
<div
class=
"col-xs-3 p-t-10"
>
<label
>
面
宽:
</label>
<input
type=
"number"
class=
"form-control half"
id=
"miankuan"
placeholder=
"请输入"
data-alert=
"请输入面宽!"
>
米
</div>
<div
class=
"col-xs-3 p-t-10"
>
<label
class=
""
>
进
深:
</label>
<input
type=
"number"
class=
"form-control half"
id=
"jinshen"
placeholder=
"请输入"
data-alert=
"请输入进深!"
>
米
</div>
<div
class=
"col-xs-3 p-t-10"
>
<label
class=
""
>
电
量:
</label>
<input
type=
"number"
class=
"form-control half"
id=
"dianliang"
placeholder=
"请输入"
data-alert=
"请输入电量!"
>
千瓦
</div>
<div
class=
"col-xs-3 p-t-10"
>
<label
class=
""
>
电
压 :
</label>
<select
class=
"form-control half"
name=
"dianya"
id=
"dianya"
data-alert=
"请选择电压"
>
<option
value=
""
>
请选择
</option>
<option
value=
"220"
>
220v
</option>
<option
value=
"380"
>
380v
</option>
</select>
</div>
<div
class=
"col-xs-3 p-t-10"
>
<label
class=
""
>
燃
气:
</label>
<select
class=
" form-control half"
id=
"hasGas"
data-alert=
"请选择燃气!"
>
<option
value=
""
selected=
"selected"
>
请选择
</option>
<option
value=
"0"
>
有
</option>
<option
value=
"1"
>
无
</option>
</select>
</div>
<div
class=
"col-xs-3 p-t-10"
>
<label
class=
""
>
烟
管
道:
</label>
<select
class=
" form-control half"
id=
"yanguandao"
data-alert=
"请选择烟管道!"
>
<option
value=
""
selected=
"selected"
>
请选择
</option>
<option
value=
"1"
>
有
</option>
<option
value=
"0"
>
无
</option>
</select>
</div>
<div
class=
"col-xs-3 p-t-10"
>
<label
class=
""
>
上
水:
</label>
<select
class=
" form-control half"
id=
"shangshui"
data-alert=
"请选择上水!"
>
<option
value=
""
selected=
"selected"
>
请选择
</option>
<option
value=
"1"
>
有
</option>
<option
value=
"0"
>
无
</option>
</select>
</div>
<div
class=
"col-xs-3 p-t-10"
>
<label
class=
""
>
下
水 :
</label>
<select
class=
" form-control half"
id=
"xiashui"
data-alert=
"请选择下水!"
>
<option
value=
""
selected=
"selected"
>
请选择
</option>
<option
value=
"1"
>
有
</option>
<option
value=
"0"
>
无
</option>
</select>
</div>
<div
class=
"col-xs-3 p-t-10"
>
<label
class=
""
>
交付装修 :
</label>
<select
class=
" form-control half"
id=
"zuhangxiu"
data-alert=
"请选择交付装修!"
>
<option
value=
""
selected=
"selected"
>
请选择
</option>
<option
value=
"1"
>
毛胚
</option>
<option
value=
"2"
>
现状
</option>
<option
value=
"3"
>
简单装修
</option>
<option
value=
"4"
>
精装修
</option>
</select>
</div>
<div
class=
"col-xs-6 p-t-10"
>
<label
class=
""
>
目前证照经营范围:
</label>
<input
type=
"text"
class=
"form-control "
id=
"id_run_round"
placeholder=
"请输入"
data-alert=
"请填写目前证照经营范围!"
>
</div>
</div>
</li>
<li
class=
"list-group-item"
>
<div
class=
"form-group"
id=
"li_landlord_phone_input"
>
<label>
房东称呼和手机号
</label>
<div
class=
"landlord-form-group"
>
<div
class=
"form-group phone-list-container"
>
<input
type=
"text"
class=
"form-control landlord-name-input"
placeholder=
"请输入房东称呼"
/>
<input
type=
"tel"
class=
"form-control landlord-phone-input"
placeholder=
"请输入房东手机号"
name=
"landlordPhone"
id=
"landlordPhone"
data-alert=
"请填写房东手机号!"
>
</div>
</div>
<img
src=
"/resource/image/jia2@2x.png"
class=
"input-add-tel-landlord"
id=
"landlord_tel_jia"
/>
</div>
</li>
<li
class=
"list-group-item"
>
<div
class=
"form-group"
>
<label
for=
"shangpuType"
>
付款规则
</label>
<span>
付
</span>
<select
class=
"form-control"
name=
"guizeFu"
id=
"guizeFu"
data-alert=
"请选择付款规则付多少"
>
<option
value=
""
>
请选择
</option>
<option
value=
"1"
>
1
</option>
<option
value=
"2"
>
2
</option>
<option
value=
"3"
>
3
</option>
<option
value=
"4"
>
4
</option>
<option
value=
"5"
>
5
</option>
<option
value=
"6"
>
6
</option>
<option
value=
"7"
>
7
</option>
<option
value=
"8"
>
8
</option>
<option
value=
"9"
>
9
</option>
<option
value=
"10"
>
10
</option>
<option
value=
"11"
>
11
</option>
<option
value=
"12"
>
12
</option>
</select>
<span>
押
</span>
<select
class=
"form-control"
name=
"guizeYa"
id=
"guizeYa"
data-alert=
"请选择付款规则押多少"
>
<option
value=
""
>
请选择
</option>
<option
value=
"1"
>
1
</option>
<option
value=
"2"
>
2
</option>
<option
value=
"3"
>
3
</option>
<option
value=
"4"
>
4
</option>
<option
value=
"5"
>
5
</option>
<option
value=
"6"
>
6
</option>
<option
value=
"7"
>
7
</option>
<option
value=
"8"
>
8
</option>
<option
value=
"9"
>
9
</option>
<option
value=
"10"
>
10
</option>
<option
value=
"11"
>
11
</option>
<option
value=
"12"
>
12
</option>
</select>
</div>
<div
class=
"form-group"
>
<label
for=
""
>
签约年限
</label>
<div
class=
"input-group"
>
<input
type=
"number"
class=
"form-control input-100-width"
id=
"qianyueNianxian"
placeholder=
"请填写"
data-alert=
"请填写签约年限上限!"
>
<div
class=
"input-group-addon"
>
至
</div>
<input
type=
"number"
class=
"form-control input-100-width"
id=
"qianyueNianxian2"
placeholder=
"请输入"
data-alert=
"请填写签约年限下限!"
>
<div
class=
"input-group-addon"
>
年
</div>
</div>
</div>
</li>
<li
class=
"list-group-item"
>
<div
class=
"form-group"
>
<label
for=
"internalName"
>
对内商铺名称
</label>
<input
type=
"text"
class=
"form-control"
placeholder=
"请输入XX路靠近XX路"
name=
"internalName"
id=
"internalName"
data-alert=
"请填写对内商铺名称!"
>
<span
class=
"text-danger"
>
(会直接对客户展示为地址,请注意不要造成信息泄露!)
</span>
</div>
<div
class=
"form-group shangchang-show-part"
>
<label
for=
"projectName"
>
项目(大厦)名称
</label>
<input
type=
"text"
class=
"form-control"
placeholder=
"请输入"
name=
"projectName"
id=
"projectName"
data-alert=
"请填写项目(大厦)名称!"
>
</div>
<!--<div class="form-group show-c-part">
<label for="foreignName">对商户显示的商铺名称</label>
<input type="text" class="form-control" placeholder="请输入" name="foreignName" id="foreignName" data-alert="请填写对外商铺名称!">
</div>-->
</li>
<li
class=
"list-group-item"
>
<div
class=
"form-group"
>
<label
for=
"group"
>
租金模式
</label>
<select
class=
"form-control"
name=
"zujinType"
id=
"zujinType"
>
<option
value=
"1"
selected=
"selected"
>
月租金
</option>
<option
value=
"2"
>
营业额扣点
</option>
<option
value=
"3"
>
每平方米日租金
</option>
<option
value=
"4"
>
年租金
</option>
<option
value=
"5"
>
每平方米月租金
</option>
</select>
</div>
<div
class=
"form-group"
>
<label
class=
""
for=
"price"
>
租金均价
</label>
<div
class=
"input-group"
>
<div
class=
"input-group-addon"
style=
"display: none;"
>
营业额扣点
</div>
<input
type=
"number"
class=
"form-control input-100-width"
name=
"moonPrice"
id=
"moonPrice"
placeholder=
"请输入"
data-alert=
"请填写月租均价!"
>
<div
class=
"input-group-addon"
>
元/月
</div>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
"management_fee"
>
物业管理费
</label>
<div
class=
"input-group"
>
<input
type=
"number"
class=
"form-control input-100-width"
name=
"wuyePrice"
id=
"wuyePrice"
placeholder=
"请输入"
data-alert=
"请填写物业管理费!"
>
<div
class=
"input-group-addon"
>
元/月
</div>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
""
>
进场费
</label>
<div
class=
"input-group"
>
<input
type=
"number"
class=
"form-control input-100-width"
id=
"jinchangPrice"
placeholder=
"请输入"
data-alert=
"请填写进场费!"
>
<div
class=
"input-group-addon"
>
元
</div>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
""
>
对商户显示的转让费
</label>
<label
class=
"checkbox-inline"
>
<input
type=
"checkbox"
id=
"foreignZhuanrangFace"
value=
"面议"
>
面议
</label>
<div
class=
"input-group"
>
<input
type=
"number"
class=
"form-control input-100-width"
id=
"foreignZhuanrangPrice"
placeholder=
"请输入"
data-alert=
"请填写对商户显示的转让费!"
>
<div
class=
"input-group-addon"
>
元
</div>
</div>
<span>
(选择面议,则不要填写金额)
</span>
</div>
</li>
<!--<li class="list-group-item">
</li>-->
<li
class=
"list-group-item"
>
<div
class=
"form-group"
>
<label
for=
""
>
剩余铺数
</label>
<input
type=
"number"
class=
"form-control input-100-width"
id=
"roomShengyuNum"
placeholder=
"请输入"
data-alert=
"请填写剩余铺数!"
>
</div>
<div
class=
"form-group"
>
<label
for=
""
>
总铺数
</label>
<input
type=
"number"
class=
"form-control input-100-width"
id=
"roomAllNum"
placeholder=
"请输入"
data-alert=
"请填写总铺数!"
>
</div>
<div
class=
"form-group"
>
<label
for=
""
>
商铺面积
</label>
<div
class=
"input-group"
>
<input
type=
"number"
class=
"form-control input-100-width"
id=
"roomArea1"
placeholder=
"请输入"
data-alert=
"请填写商铺面积!"
>
<div
class=
"input-group-addon shangchang-show-part"
>
至
</div>
<input
type=
"number"
class=
"form-control input-100-width shangchang-show-part"
id=
"roomArea2"
placeholder=
"请输入"
data-alert=
"请填写商铺面积!"
>
<div
class=
"input-group-addon"
>
m²
</div>
</div>
</div>
<div
class=
"form-group"
>
<label
for=
""
>
项目总面积
</label>
<div
class=
"input-group"
>
<input
type=
"number"
class=
"form-control input-100-width"
id=
"businessArea"
placeholder=
"请输入"
data-alert=
"请填写项目总面积!"
>
<div
class=
"input-group-addon"
>
m²
</div>
</div>
</div>
</li>
<li
class=
"list-group-item address-relate-area"
>
<div>
<div
class=
"form-group"
>
<label
for=
""
>
对内地址
</label>
<button
type=
"button"
class=
"btn btn-primary area-choose-btn-modal"
data-toggle=
"modal"
data-target=
".bs-example-modal-lg"
id=
"position_btn"
>
选择地址定位
</button>
<!--<select class="form-control" id="province_internal" name="province_internal"></select>
<select class="form-control" id="city_internal" name="city_internal"></select>
<select class="form-control" id="disc_internal" name="disc_internal"></select>-->
<input
type=
"text"
class=
"form-control input-100-width address-relate area-choose-btn-modal"
data-toggle=
"modal"
data-target=
".bs-example-modal-lg"
title=
"通过地址定位获取"
readonly=
"readonly"
id=
"province_internal"
/>
<input
type=
"text"
class=
"form-control input-100-width address-relate area-choose-btn-modal"
data-toggle=
"modal"
data-target=
".bs-example-modal-lg"
title=
"通过地址定位获取"
readonly=
"readonly"
id=
"city_internal"
/>
<input
type=
"text"
class=
"form-control input-100-width address-relate area-choose-btn-modal"
data-toggle=
"modal"
data-target=
".bs-example-modal-lg"
title=
"通过地址定位获取"
readonly=
"readonly"
id=
"disc_internal"
/>
</div>
<div
class=
"form-group"
>
<label
for=
"longitude"
>
经度
</label>
<input
type=
"text"
class=
"form-control input-100-width address-relate"
data-toggle=
"modal"
data-target=
".bs-example-modal-lg"
title=
"通过地址定位获取"
readonly=
"readonly"
id=
"longitude"
name=
"longitude"
data-alert=
"请通过地址定位获取经纬度!"
>
</div>
<div
class=
"form-group"
>
<label
for=
""
>
纬度
</label>
<input
type=
"text"
class=
"form-control input-100-width address-relate"
data-toggle=
"modal"
data-target=
".bs-example-modal-lg"
title=
"通过地址定位获取"
readonly=
"readonly"
id=
"latitude"
name=
"latitude"
data-alert=
"请通过地址定位获取经纬度!"
>
</div>
<div
class=
"form-group"
>
<label
for=
""
>
商圈
</label>
<select
id=
"business_rong"
class=
"form-control btn4"
>
<option
value=
"-1"
>
请选择商圈
</option>
</select>
</div>
</div>
<div>
<div
class=
"form-group"
>
<input
type=
"text"
class=
"form-control area-choose-btn-modal"
id=
"address_internal"
placeholder=
"详细地址(格式xx路xx号xx)"
data-alert=
"请填写正确格式的对内详细地址(xx路xx号xx)!"
>
<div
id=
"address_internal_input_text_box"
>
<ul></ul>
<p>
<span>
存在的相似商铺
</span>
<button
type=
"button"
class=
"btn btn-primary"
>
确认无重盘
</button>
</p>
</div>
</div>
</div>
</li>
<!--<li class="list-group-item show-c-part">
<div class="form-group">
<label for="">对商户显示的地址</label>
<input type="text" class="form-control input-100-width address-relate" data-toggle="modal" data-target=".bs-example-modal-lg" title="与对内地址一致,通过地址定位获取" readonly="readonly" id="province_external" />
<input type="text" class="form-control input-100-width address-relate" data-toggle="modal" data-target=".bs-example-modal-lg" title="与对内地址一致,通过地址定位获取" readonly="readonly" id="city_external" />
<input type="text" class="form-control input-100-width address-relate" data-toggle="modal" data-target=".bs-example-modal-lg" title="与对内地址一致,通过地址定位获取" readonly="readonly" id="disc_external" />
<input type="text" class="form-control" id="address_external" placeholder="请输入详细地址" data-alert="请填写对外详细地址!">
</div>
</li>-->
<li
class=
"list-group-item"
>
<div
class=
"form-group full-width-100"
>
<label
for=
""
>
交通
</label>
<textarea
class=
"form-control textarea-500-width"
rows=
"3"
id=
"traffic"
data-alert=
"请填写交通内容!"
placeholder=
"请输入"
></textarea>
</div>
<!--<div class="form-group full-width-100">
<label for="" class="has-housed">已入驻</label>
<textarea class="form-control textarea-500-width" rows="3" id="hasMoved" data-alert="请填写已入住内容!" placeholder="请输入"></textarea>
</div>-->
</li>
<li
class=
"list-group-item"
>
<div
class=
"form-group"
>
<label
for=
""
>
营业时间
</label>
<input
type=
"text"
class=
"form-control"
id=
"yingyeTime"
data-alert=
"请填写营业时间!"
placeholder=
"请输入"
>
</div>
<div
class=
"form-group shangchang-show-part"
>
<label
for=
""
>
招商时间
</label>
<input
type=
"date"
class=
"form-control"
id=
"kaipanTime"
data-alert=
"请填写招商时间!"
>
</div>
<div
class=
"form-group shangchang-show-part"
>
<label
for=
""
>
开业时间
</label>
<input
type=
"date"
class=
"form-control"
id=
"kaiyeTime"
data-alert=
"请填写开业时间!"
>
</div>
<!--<div class="form-group">
<label for="">是否有燃气</label>
<select class="form-control" id="hasGas">
<option value="0" selected="selected">有</option>
<option value="1">没有</option>
</select>
</div>-->
</li>
<li
class=
"list-group-item"
>
<div
class=
"form-group full-width-100"
>
<label
for=
""
>
佣金规则
</label>
<textarea
class=
"form-control textarea-500-width"
rows=
"3"
id=
"yongjinRule"
data-alert=
"请填写佣金规则!"
placeholder=
"请输入"
></textarea>
</div>
<!--<div class="form-group full-width-100">
<label for="">对内项目优势</label>
<textarea class="form-control textarea-500-width" rows="3" id="internalYoushi" data-alert="请输入该商铺周边配套、所处地段和该商铺的优势!" placeholder="请输入"></textarea>
</div>-->
<div
class=
"form-group full-width-100"
>
<label
for=
""
>
周边配套
</label>
<textarea
class=
"form-control textarea-500-width"
rows=
"3"
id=
"zhoubianpeitao"
data-alert=
"请输入该商铺周边配套"
placeholder=
"例如:附近有XXX商场XX小区"
></textarea>
</div>
<div
class=
"form-group full-width-100"
>
<label
for=
""
>
所处地段
</label>
<textarea
class=
"form-control textarea-500-width"
rows=
"3"
id=
"suoshudiduan"
data-alert=
"请输入该商铺所处地段"
placeholder=
"例如:店铺位于商圈中心,地段繁华,交通便利。商铺在商场一楼,便于顾客进店。"
></textarea>
</div>
<div
class=
"form-group full-width-100"
>
<label
for=
""
>
附近人流
</label>
<textarea
class=
"form-control textarea-500-width"
rows=
"3"
id=
"fujinrenliu"
data-alert=
"请输入该商铺附近人流"
placeholder=
"例如:店铺周围客流量大,人群消费意愿强。"
></textarea>
</div>
<div
class=
"form-group full-width-100"
>
<label
for=
""
>
其他补充
</label>
<textarea
class=
"form-control textarea-500-width"
rows=
"3"
id=
"qitabuchong"
data-alert=
"请输入其他补充"
placeholder=
"例如:有证照,省去开店前置手续。可以签长期租约,便于稳定经营。"
></textarea>
</div>
</li>
<!--<li class="list-group-item">-->
<!--<div class="form-group full-width-100">
<label for="">签约规则</label>
<textarea class="form-control textarea-500-width" rows="3" id="qianyueRule" data-alert="请填写签约规则!"></textarea>
</div>-->
<!--</li>-->
<!--<li class="list-group-item">
<div class="form-group full-width-100 full-pic-area">
<label for="">列表页封面图(1张)</label>
<input readonly="readonly" type="text" name="liebiao_pic_input" class="form-control" style="width: 150px !important;display:none" id="liebiao_pic_input" placeholder="请选择图片">
<button class="btn btn-default upload-image-btn" id="liebiao_pic_btn" type="button" data-limittop="1">选择图片</button>
<span class="tip"></span>
</div>
<ul class="img-pre-ul" id="liebiao_pic_ul"></ul>
</li>-->
<li
class=
"list-group-item"
>
<div
class=
"form-group full-width-100 full-pic-area"
>
<label
for=
""
>
详情页轮播图(至少2张)
</label>
<input
readonly=
"readonly"
type=
"text"
name=
"xiangqing_pic_input"
class=
"form-control"
style=
"display: none"
id=
"xiangqing_pic_input"
placeholder=
"请选择图片"
>
<input
class=
"upload-image-btn"
id=
"xiangqing_pic_btn"
type=
"file"
data-limittop=
"20"
style=
"display: inline-block;"
>
<button
class=
"btn btn-default btn-default-liu"
>
选择图片
</button>
<span
class=
"tip"
></span>
<label
for=
"isShowShopDetail"
>
是否对客户展示对内详情图
</label>
<select
class=
"form-control"
name=
"isShowShopDetail"
id=
"isShowShopDetail"
data-alert=
"请选择是否对客户展示对内详情图"
>
<option
value=
"-1"
>
请选择
</option>
<option
value=
"1"
>
是
</option>
<option
value=
"0"
>
否
</option>
</select>
</div>
<ul
class=
"img-pre-ul"
id=
"xiangqing_pic_ul"
></ul>
</li>
<li
class=
"list-group-item"
>
<div
class=
"form-group full-width-100 full-pic-area"
>
<label
for=
""
>
楼层平面图(选填)
</label>
<input
readonly=
"readonly"
type=
"text"
name=
"louceng_pic_input"
class=
"form-control"
style=
"display: none"
id=
"louceng_pic_input"
placeholder=
"请选择图片"
>
<input
readonly=
"readonly"
class=
"upload-image-btn"
id=
"louceng_pic_btn"
type=
"file"
data-limittop=
"20"
style=
"display: inline-block;"
>
<button
class=
"btn btn-default btn-default-liu"
>
选择图片
</button>
<span
class=
"tip"
></span>
</div>
<ul
class=
"img-pre-ul"
id=
"louceng_pic_ul"
></ul>
</li>
<li
class=
"list-group-item"
>
<div
class=
"form-group full-width-100 full-pic-area"
>
<label
for=
""
>
附件上传(pdf格式,选填,1个)
</label>
<input
readonly=
"readonly"
type=
"text"
name=
"fujian_pre"
class=
"form-control"
style=
"display: none"
id=
"fujian_pre"
placeholder=
"请选择图片"
>
<input
class=
"upload-image-btn"
id=
"fujian_btn"
type=
"file"
data-limittop=
"1"
data-spfile=
"pdf"
style=
"display: inline-block;"
>
<button
class=
"btn btn-default btn-default-liu"
>
选择附件
</button>
<span
class=
"tip"
></span>
</div>
<ul
class=
"img-pre-ul"
id=
"fujian_ul"
></ul>
</li>
<li
class=
"list-group-item"
>
<div
class=
"form-group"
>
<label
for=
""
>
微楼书(选填)
</label>
<div
class=
"input-group"
>
<input
type=
"text"
class=
"form-control input-360-width"
id=
"weilouLink"
placeholder=
"请填入微楼书网页链接"
data-alert=
"请填写微楼书链接!"
>
<div
class=
"input-group-addon"
>
如(https://www.tonglianjituan.com)
</div>
</div>
</div>
</li>
<li
class=
"list-group-item"
>
<div
class=
"form-group"
style=
"width: 100%;"
>
<label
for=
""
style=
"width: 100%;"
>
大讲堂(选填)
</label>
<div
class=
"input-group"
style=
"width: 100%;"
id=
"dajiangtang"
>
<?php
if (CURRENT_URL == 'https://api.tonglianjituan.com/') {
$url = IMAGES_URL;
} else {
$url = 'https://pre2.tonglianjituan.com/';
}
create_editor('da_jiang_tang','', ['filebrowserUploadUrl'=> $url.'index/uploadEditor?type=house_img']);
?>
</div>
</div>
</li>
<li
class=
"list-group-item li_dujia_area"
>
<div
class=
"form-group"
>
<label
for=
""
>
独家代理有效期
</label>
<div
class=
"input-group"
>
<input
type=
"date"
class=
"form-control"
id=
"exclusiveDate1"
data-alert=
"请填写独家代理有效期开始时间!"
placeholder=
"请输入"
>
<div
class=
"input-group-addon"
>
至
</div>
<input
type=
"date"
class=
"form-control"
id=
"exclusiveDate2"
data-alert=
"请填写独家代理有效期结束时间!"
placeholder=
"请输入"
>
</div>
</div>
<div
class=
"form-group phone-list-container"
style=
"width: 45px;margin-right: 0;"
>
<label
for=
""
>
独家方
</label>
</div>
<div
class=
"form-group phone-list-container"
>
<input
type=
"tel"
class=
"form-control phone_jia"
id=
"exclusiveTel"
data-alert=
"请填写独家方!"
placeholder=
"请输入"
>
<ul></ul>
</div>
</li>
<li
class=
"list-group-item li_dujia_area"
>
<div
class=
"form-group full-width-100 full-pic-area"
>
<label
for=
""
>
独家合同上传
</label>
<input
readonly=
"readonly"
type=
"text"
name=
"dujia_pic_input"
class=
"form-control"
style=
"display: none"
id=
"dujia_pic_input"
placeholder=
"请选择图片"
>
<input
class=
"upload-image-btn"
id=
"dujia_pic_btn"
type=
"file"
data-limittop=
"20"
style=
"display: inline-block;"
>
<button
class=
"btn btn-default btn-default-liu"
>
选择图片
</button>
<span
class=
"tip"
></span>
</div>
<ul
class=
"img-pre-ul"
id=
"dujia_pic_ul"
></ul>
</li>
<li
class=
"list-group-item"
style=
"text-align: center;"
><button
type=
"submit"
class=
"btn btn-primary"
id=
"saveBtn"
>
保存
</button></li>
</ul>
</form>
</div>
</div>
</div>
</div>
</div>
<!--百度定位的弹出框更改-->
<div
class=
"modal fade bs-example-modal-lg"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myLargeModalLabel"
>
<div
class=
"modal-dialog modal-lg"
role=
"document"
>
<div
class=
"modal-content"
style=
"width: 780px;"
>
<div
class=
"modal-header address-search-head-div"
>
<div
class=
"address-header-bar"
>
<div
id=
"address_city_title"
>
上海市
</div>
<div
class=
"crile"
>
<input
class=
"main-input"
id=
"search_input"
type=
"search"
placeholder=
"请输入地址"
/>
<img
src=
"/resource/image/search_gb.png"
class=
"cancel-pic"
/>
</div>
</div>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"Close"
style=
"font-size: 42px;"
><span
aria-hidden=
"true"
>
×
</span></button>
</div>
<div
class=
"modal-body"
style=
"height: 780px;"
>
<div
id=
"position_box"
>
<div
id=
"main_ul"
>
<ul></ul>
</div>
<div
id=
"loading_pic"
class=
"loading_pic"
>
<img
src=
"/resource/image/jz2.gif"
/>
<p>
正在加载...
</p>
</div>
<div
id=
"no_more"
class=
"no_more"
>
没有更多了
</div>
</div>
</div>
</div>
</div>
</div>
<script
type=
"text/javascript"
src=
"https://api.map.baidu.com/api?v=2.0&ak=RTimRTxtj23AYTCkSsPvNDuQkGpR2fPX"
></script>
<!--图片点击查看大图-->
<div
id=
"img_mask_area"
title=
"点击任意位置可关闭"
>
<img
/>
</div>
<!--整夜页面的加载图标区域-->
<div
id=
"main_loading_pic"
>
<img
src=
"/resource/image/jz2.gif"
/>
</div>
</div>
<script
id=
"my_tpl_landlord_phone1"
type=
"text/template"
>
<
div
class
=
"form-group phone-list-container"
>
<
input
type
=
"text"
class
=
"form-control landlord-name-input"
value
=
"{name}"
placeholder
=
"请输入房东称呼"
/>
<
input
type
=
"tel"
class
=
"form-control landlord-phone-input"
value
=
"{phone}"
placeholder
=
"请输入房东手机号"
data
-
id
=
"{id}"
name
=
"landlordPhone"
data
-
alert
=
"请填写房东手机号!"
>
<
img
src
=
"/resource/image/search_gb.png"
class
=
"input-cancel-pic"
><
/div
>
<
/div
>
</script>
\ No newline at end of file
application/route.php
View file @
3bf94893
...
...
@@ -363,6 +363,9 @@ Route::group('index', [
'myCollectionShopList'
=>
[
'index/myCollectionShop/myCollectionShopList'
,
[
'method'
=>
'POST|GET'
]],
//我收藏的客户liu
'dayAchievementsReport'
=>
[
'index/PerformanceReport/dayAchievementsReportList'
,
[
'method'
=>
'POST|GET'
]],
//日报liu
'weekAchievementsReport'
=>
[
'index/PerformanceReport/weekAchievementsReportList'
,
[
'method'
=>
'POST|GET'
]],
//周报liu
'officeBuildingList'
=>
[
'index/OfficeBuilding/officeBuildingList'
,
[
'method'
=>
'POST|GET'
]],
//办公楼liu
'officeEdit'
=>
[
'index/OfficeBuilding/officeEdit'
,
[
'method'
=>
'POST|GET'
]],
//办公楼liu
//‘页面的地址’ =》 index/控制器名称/使用的方法
'inviteStatistics'
=>
[
'index/InviteStatistics/inviteStatisticsList'
,
[
'method'
=>
'POST|GET'
]],
//邀请注册liu
'operationalData'
=>
[
'index/OperationalData/operationalDataList'
,
[
'method'
=>
'POST|GET'
]],
//运营数据统计liu
...
...
public/resource/js/officeBuildingList.js
0 → 100644
View file @
3bf94893
/**
* Created by 刘丹 on 2017/12/11.
*/
// if(window === window.parent){//没有菜单 给提醒
// alert('请清除缓存重新登录');
// location.replace(location.origin);
// };
define
([
'doT'
,
'text!temp/office_building_list_template_tpl.html'
,
'css!style/home.css'
,
'ckfinder'
,
'ckfinderStart'
,
'pagination'
,
'bootstrapJs'
,
'blow-up'
],
function
(
doT
,
template
)
{
//处理文件名,长度过长时处理
function
dealFileName
(
str
)
{
//如果文件超过30的长度,则用*代替
if
(
str
.
length
>
26
)
{
return
str
.
slice
(
0
,
23
)
+
'***'
+
str
.
slice
(
-
4
);
}
else
{
return
str
;
};
};
var
user_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
)));
//读取缓存
console
.
log
(
user_info_obj
);
business
=
{
pageNo
:
1
,
/*第几页*/
pageSize
:
10
,
AuthToken
:
''
,
agent_id
:
0
,
agent_phone
:
''
,
agent_name
:
''
,
/*每页显示多少条*/
id
:
''
,
house_id
:
''
,
type
:
''
,
valueCurrent
:
''
,
ajaxObj
:
''
,
stopstatus
:
true
,
ldHtml
:
$
(
'.phone_list'
),
boxphoto
:
''
,
exclusive_id
:
0
,
isFollowupSaving
:
false
,
detailTabIndex
:
0
,
//查看 弹出框 tab切换 初始化
all_shop
:
true
,
// false: 本人商铺,true:所有商铺
is_exclusive_type
:
0
,
//0非独家 1:独家
auth_edit_exclusive
:
0
,
//0:无独家权限 1:有独家权限
main_select
:
false
,
// true : 开启高级搜索 ,false :关闭高级搜索
file_id_str
:
''
,
file_id_arr
:[],
agent_id_choose
:
''
,
agent_id_choose_p
:
''
,
generalize_id
:
1
,
detailTabIndexTuiGuang
:
0
,
init
:
function
()
{
//初始化dot
business
.
getDistrict
();
$
(
"body"
).
append
(
template
);
function
getPreMonth
(
date
)
{
var
arr
=
date
.
split
(
'-'
);
var
year
=
arr
[
0
];
var
month
=
arr
[
1
];
var
day
=
arr
[
2
];
var
days
=
new
Date
(
year
,
month
,
0
);
days
=
days
.
getDate
();
var
year2
=
year
;
var
month2
=
parseInt
(
month
)
-
1
;
if
(
month2
==
0
)
{
year2
=
parseInt
(
year2
)
-
1
;
month2
=
12
;
}
var
day2
=
day
;
var
days2
=
new
Date
(
year2
,
month2
,
0
);
days2
=
days2
.
getDate
();
if
(
day2
>
days2
)
{
day2
=
days2
;
}
if
(
month2
<
10
)
{
month2
=
'0'
+
month2
;
}
var
t2
=
year2
+
'-'
+
month2
+
'-'
+
day2
;
return
t2
;
}
//初始化时间
var
myDate
=
new
Date
();
var
y
=
myDate
.
getFullYear
();
var
m
=
myDate
.
getMonth
()
+
1
;
var
d
=
myDate
.
getDate
();
var
day_end
=
y
+
'-'
+
(
m
<
10
?
(
'0'
+
m
)
:
m
)
+
'-'
+
(
d
<
10
?
(
'0'
+
d
)
:
d
);
var
day_start
=
getPreMonth
(
day_end
);
// $('#start_date').val(day_start);
// $('#end_date').val(day_end);//去掉默认时间
//初始化城市 区域筛选
// business.initializationCityFunction();
// 商铺列表 默认显示求租房源
$
(
'#lease_state'
).
val
(
1
);
business
.
getList
(
1
);
business
.
event
();
business
.
resetLoad
();
//显示 隐藏城市 默认显示 当前账号 所在城市
$
.
ajax
({
url
:
'/index/getAgentGroupSite'
,
type
:
'GET'
,
async
:
true
,
data
:
{
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
.
length
!=
0
)
{
var
str
=
'<option value="">选择城市</option>'
;
$
.
each
(
data
.
data
,
function
(
i
,
item
)
{
str
+=
'<option value="'
+
item
.
city
+
'">'
+
item
.
city
+
'</option>'
;
});
$
(
".shop_city_choose_site_list"
).
append
(
str
);
}
else
{
var
_city
=
user_info_obj
.
city
;
var
_str1
=
'<option value="">选择城市</option>'
;
var
_str
=
_str1
+
'<option value="'
+
_city
+
'">'
+
_city
+
'</option>'
;
$
(
".shop_city_choose_site_list"
).
append
(
_str
);
}
}
});
},
event
:
function
()
{
var
_doc
=
$
(
document
);
var
user_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
)));
//读取缓存
business
.
AuthToken
=
user_info_obj
.
AuthToken
;
business
.
agent_id
=
user_info_obj
.
id
;
business
.
phone
=
user_info_obj
.
phone
;
business
.
name
=
user_info_obj
.
name
;
$
(
"#search"
).
click
(
function
()
{
checkLogin
();
business
.
getList
(
1
);
});
$
(
"#reset"
).
click
(
function
()
{
//重置
document
.
getElementById
(
"form_search"
).
reset
();
$
(
'#business_circle_id'
).
html
(
''
);
business
.
agent_id_choose
=
''
;
business
.
agent_id_choose_p
=
''
;
});
_doc
.
on
(
"input"
,
"#dish_name"
,
function
()
{
//客户列表 客方员工姓名 下拉式搜索
if
(
$
(
"#dish_name"
).
val
()
==
''
)
{
business
.
agent_id_choose
=
''
;
business
.
agent_id_choose_p
=
''
;
$
(
".user-ul-agent"
).
html
(
''
);
}
else
{
business
.
search_phone_agent
();
}
});
_doc
.
delegate
(
".addphone-agent"
,
"click"
,
function
()
{
//客户列表 客户员工 下拉式 搜索 点击li事件 获取id ul消失
business
.
addphoneAgent
(
this
);
});
//切换 不同的推广 类型
_doc
.
on
(
'click'
,
'.tuiguang-type>a'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
_this
.
removeClass
(
'btn-default'
).
addClass
(
'btn-info'
).
siblings
().
removeClass
(
'btn-info'
).
addClass
(
'btn-default'
);
business
.
detailTabIndexTuiGuang
=
_this
.
index
();
if
(
business
.
detailTabIndexTuiGuang
==
0
){
business
.
generalize_id
=
1
;
};
if
(
business
.
detailTabIndexTuiGuang
==
1
){
business
.
generalize_id
=
3
;
};
if
(
business
.
detailTabIndexTuiGuang
==
2
){
business
.
generalize_id
=
2
;
};
if
(
business
.
detailTabIndexTuiGuang
==
3
){
business
.
generalize_id
=
4
;
};
var
p_district_id
=
$
(
'#district_id_panfang'
).
val
();
var
p_store_id
=
$
(
'#guest_stores_panfang'
).
val
();
var
p_agent_id
=
business
.
agent_id_choose_p
;
var
type
=
$
(
'#shop_type'
).
val
();
var
city
=
$
(
'.shop_city_choose_site_list'
).
val
();
//推广杭州所有商铺
if
(
city
==
'杭州市'
){
p_district_id
=
''
;
p_store_id
=
''
;
p_agent_id
=
''
;
};
if
(
p_store_id
==
null
){
p_store_id
=
''
;
}
var
_shopLink
=
'https://www.tonglianjituan.com/shop_link.html?'
+
'p_district_id'
+
'='
+
p_district_id
+
'&'
+
'p_store_id'
+
'='
+
p_store_id
+
'&'
+
'p_agent_id'
+
'='
+
p_agent_id
+
'&'
+
'type'
+
'='
+
(
type
==
-
1
?
1
:
type
)
+
'&'
+
'city'
+
'='
+
encodeURIComponent
(
city
==
""
?
'上海市'
:
city
)
+
'&'
+
'generalizeId'
+
'='
+
business
.
generalize_id
;
if
((
city
==
'杭州市'
)
||
p_district_id
||
p_store_id
||
p_agent_id
){
$
(
'#link_content'
).
html
(
_shopLink
);
}
else
{
$
(
'#link_content'
).
html
(
'进行部门 门店 个人筛选 才会有 推广链接产生'
);
}
});
_doc
.
on
(
'click'
,
'.link_shop_c'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
var
p_district_id
=
$
(
'#district_id_panfang'
).
val
();
var
p_store_id
=
$
(
'#guest_stores_panfang'
).
val
();
var
p_agent_id
=
business
.
agent_id_choose_p
;
var
type
=
$
(
'#shop_type'
).
val
();
var
city
=
$
(
'.shop_city_choose_site_list'
).
val
();
//推广杭州所有商铺
if
(
city
==
'杭州市'
){
p_district_id
=
''
;
p_store_id
=
''
;
p_agent_id
=
''
;
};
if
(
p_store_id
==
null
){
p_store_id
=
''
;
}
var
_shopLink
=
'https://www.tonglianjituan.com/shop_link.html?'
+
'p_district_id'
+
'='
+
p_district_id
+
'&'
+
'p_store_id'
+
'='
+
p_store_id
+
'&'
+
'p_agent_id'
+
'='
+
p_agent_id
+
'&'
+
'type'
+
'='
+
(
type
==
-
1
?
1
:
type
)
+
'&'
+
'city'
+
'='
+
encodeURIComponent
(
city
==
""
?
'上海市'
:
city
)
+
'&'
+
'generalizeId'
+
'='
+
business
.
generalize_id
;
if
((
city
==
'杭州市'
)
||
p_district_id
||
p_store_id
||
p_agent_id
){
$
(
'#link_content'
).
html
(
_shopLink
);
}
else
{
$
(
'#link_content'
).
html
(
'进行部门 门店 个人筛选 才会有 推广链接产生'
);
}
});
//点击复制按钮 复制推广 链接
_doc
.
on
(
'click'
,
'.copy_link_content'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
$
(
'#hide-input-value'
).
val
(
$
(
'#link_content'
).
text
());
var
d_copy
=
document
.
getElementById
(
"hide-input-value"
);
d_copy
.
select
();
document
.
execCommand
(
"Copy"
);
alert
(
"复制成功!"
);
});
//部门 门店 二级联动
business
.
getDistrictPanFang
(
function
(){
//有了列表 点击 调用门店列表
_doc
.
on
(
'input'
,
'#district_id_panfang'
,
function
(){
var
_this
=
$
(
this
);
var
_id
=
_this
.
val
();
_this
.
next
().
html
(
''
);
//先清空
if
(
_id
&&
_id
!=
'0'
){
business
.
getDistrictStoreListPanFang
(
_id
,
function
(
_data
){
var
_str
=
'<option value="">盘方门店</option>'
;
$
.
each
(
_data
,
function
(
i
,
item
)
{
_str
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
store_name
+
'</option>'
;
});
_this
.
next
().
html
(
_str
);
});
}
else
{
};
});
});
$
(
'#modal-dujia'
).
on
(
'show.bs.modal'
,
function
()
{
business
.
showOrHideDujia
();
});
$
(
'#sel_dujia'
).
change
(
function
(){
business
.
showOrHideDujia
();
});
$
(
'#persional_shop'
).
unbind
(
'click'
).
bind
(
'click'
,
function
(){
if
(
business
.
all_shop
){
$
(
'#persional_shop'
).
html
(
"所有商铺"
);
$
(
'#persional_shop'
).
attr
(
"title"
,
"点击切换到所有商铺"
);
}
else
{
$
(
'#persional_shop'
).
html
(
"本人商铺"
);
$
(
'#persional_shop'
).
attr
(
"title"
,
"点击切换到本人商铺"
);
}
business
.
all_shop
=
!
business
.
all_shop
;
checkLogin
();
business
.
getList
(
1
);
});
$
(
'#main_select'
).
unbind
(
'click'
).
bind
(
'click'
,
function
(){
business
.
main_select
=
!
business
.
main_select
;
if
(
business
.
main_select
){
$
(
'.main-select'
).
show
();
$
(
'#main_select'
).
html
(
"关闭高级搜索"
);
}
else
{
$
(
'.main-select'
).
hide
();
$
(
'#main_select'
).
html
(
"高级搜索"
);
}
});
$
(
document
).
delegate
(
".del_modal"
,
"click"
,
function
()
{
business
.
id
=
$
(
this
).
attr
(
"data-id"
);
});
$
(
document
).
delegate
(
".anch"
,
"click"
,
function
()
{
//点击设置案场权限人
$
(
"#myModalLabel"
).
html
(
"设置案场权限人"
);
// 传入data-id
business
.
house_id
=
$
(
this
).
attr
(
"data-id"
);
business
.
auth_edit_exclusive
=
$
(
this
).
attr
(
"data-exclusive"
);
business
.
type
=
"1"
;
checkLogin
();
business
.
Anch
();
//获取手机号名字的
});
// 点击设置案场权限人(盘方)
$
(
document
).
delegate
(
".add_applies"
,
"click"
,
function
()
{
//点击设置案场权限人
$
(
"#myModalLabel"
).
html
(
"设置盘方"
);
business
.
house_id
=
$
(
this
).
attr
(
"data-id"
);
business
.
type
=
"2"
;
checkLogin
();
business
.
Anch
();
});
$
(
document
).
delegate
(
".dujia"
,
"click"
,
function
()
{
//点击独家
business
.
house_id
=
$
(
this
).
attr
(
"data-id"
);
business
.
type
=
"3"
;
checkLogin
();
business
.
Dujia
();
});
$
(
document
).
delegate
(
".caozuo"
,
"click"
,
function
()
{
//点击操作记录
checkLogin
();
business
.
Caozuo
();
});
$
(
document
).
delegate
(
".submit_follow2"
,
"click"
,
function
(
e
)
{
//提交独家
e
.
preventDefault
();
e
.
stopPropagation
();
checkLogin
();
business
.
Dujianew
();
});
//收藏 取消收藏
$
(
document
).
delegate
(
".is_show_shoucang"
,
"click"
,
function
()
{
//点击禁用
// if(!confirm('是否继续?')) {
// return;
// }
business
.
house_id
=
$
(
this
).
attr
(
"data-id"
);
var
params
=
{
};
params
.
id
=
$
(
this
).
attr
(
"data-id"
);
var
str
=
$
.
trim
(
$
(
this
).
html
());
if
(
str
==
"收藏"
)
{
$
(
this
).
attr
(
'class'
,
'btn1 btn-default is_show_shoucang'
);
params
.
type
=
1
;
$
(
this
).
html
(
'取消收藏'
);
}
else
if
(
str
==
"取消收藏"
)
{
$
(
this
).
attr
(
'class'
,
'btn1 btn-info is_show_shoucang'
);
params
.
type
=
2
;
$
(
this
).
html
(
'收藏'
);
}
else
{
params
.
type
=
3
;
}
checkLogin
();
var
user_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
)));
//读取缓存
$
.
ajax
({
//禁用
'type'
:
'POST'
,
'url'
:
'/broker/addCollectHouse'
,
//商铺收藏 取消收藏
data
:
{
"agents_id"
:
user_info_obj
.
id
,
"status"
:
params
.
type
,
"house_id"
:
business
.
house_id
,
"AuthToken"
:
user_info_obj
.
AuthToken
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
!=
200
)
{
alert
(
"禁用失败!"
)
}
}
});
});
//锁盘 取消锁盘
$
(
document
).
delegate
(
".is_show_lock_plate"
,
"click"
,
function
()
{
//点击禁用
if
(
!
confirm
(
'是否继续?'
))
{
return
;
}
business
.
house_id
=
$
(
this
).
attr
(
"data-id"
);
var
params
=
{
};
params
.
id
=
$
(
this
).
attr
(
"data-id"
);
var
str
=
$
.
trim
(
$
(
this
).
html
());
if
(
str
==
"锁盘"
)
{
$
(
this
).
attr
(
'class'
,
'btn1 btn-default is_show_lock_plate btn-default-hide-display'
);
params
.
type
=
1
;
$
(
this
).
html
(
'已锁盘'
);
}
else
if
(
str
==
"已锁盘"
)
{
$
(
this
).
attr
(
'class'
,
'btn1 btn-info is_show_lock_plate btn-default-hide-display'
);
params
.
type
=
0
;
$
(
this
).
html
(
'锁盘'
);
}
else
{
}
checkLogin
();
var
user_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
)));
//读取缓存
$
.
ajax
({
//禁用
'type'
:
'POST'
,
'url'
:
'/index/lockHouse'
,
//商铺锁盘,取消锁盘
data
:
{
"is_lock"
:
params
.
type
,
"house_id"
:
business
.
house_id
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
!=
200
)
{
alert
(
data
.
msg
)
}
}
});
});
//vip盘 取消vip盘
$
(
document
).
delegate
(
".is_vip_plate"
,
"click"
,
function
()
{
//点击禁用
if
(
!
confirm
(
'是否继续?'
))
{
return
;
}
business
.
house_id
=
$
(
this
).
attr
(
"data-id"
);
var
params
=
{
};
params
.
id
=
$
(
this
).
attr
(
"data-id"
);
var
str
=
$
.
trim
(
$
(
this
).
html
());
if
(
str
==
"VIP盘"
)
{
$
(
this
).
attr
(
'class'
,
'btn1 btn-default is_vip_plate btn-default-hide-display'
);
params
.
type
=
1
;
$
(
this
).
html
(
'取消VIP盘'
);
}
else
if
(
str
==
"取消VIP盘"
)
{
$
(
this
).
attr
(
'class'
,
'btn1 btn-info is_vip_plate btn-default-hide-display'
);
params
.
type
=
0
;
$
(
this
).
html
(
'VIP盘'
);
}
else
{
}
checkLogin
();
var
user_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
)));
//读取缓存
$
.
ajax
({
//禁用
'type'
:
'POST'
,
'url'
:
'/index/vipHouse'
,
//商铺vip,取消vip盘
data
:
{
"vip"
:
params
.
type
,
"id"
:
business
.
house_id
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
!=
200
)
{
alert
(
data
.
msg
)
}
}
});
});
//城市 区域 二级联动 筛选
_doc
.
on
(
'input'
,
'.shop_city_choose_site_list'
,
function
()
{
$
(
'#shop_area_id'
).
val
(
''
);
$
(
'#business_circle_id'
).
val
(
''
);
var
_this
=
$
(
this
);
var
_id
=
_this
.
val
();
$
(
'#shop_area_id'
).
html
(
''
);
//先清空
$
(
'#business_circle_id'
).
html
(
''
);
//先清空
if
(
_id
&&
_id
!=
'0'
)
{
business
.
getDistrictStoreList
(
_id
,
function
(
_data
)
{
var
_str
=
'<option value="">区域</option>'
;
$
.
each
(
_data
,
function
(
i
,
item
)
{
_str
+=
'<option value="'
+
item
.
name
+
'">'
+
item
.
name
+
'</option>'
;
});
$
(
'#shop_area_id'
).
html
(
_str
);
});
}
else
{};
});
//点击 区域 获取 商圈
_doc
.
on
(
'input'
,
'#shop_area_id'
,
function
()
{
var
_this
=
$
(
this
);
var
_id
=
_this
.
val
();
var
_province
=
$
(
'#user_city_choose'
).
val
();
var
_city
=
$
(
'#shop_area_id'
).
val
();
if
(
_province
==
310100
){
_province
=
'上海市'
;
_city
=
'上海市'
;
};
if
(
_province
==
330100
){
_province
=
'浙江省'
;
_city
=
'杭州市'
;
};
$
(
'#business_circle_id'
).
html
(
''
);
//先清空
if
(
_id
&&
_id
!=
'0'
)
{
business
.
getBusinessCircle
(
_id
,
_province
,
_city
,
function
(
_data
)
{
console
.
log
(
22
)
var
_str
=
'<option value="">商圈</option>'
;
$
.
each
(
_data
,
function
(
i
,
item
)
{
_str
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
name
+
'</option>'
;
});
$
(
'#business_circle_id'
).
html
(
_str
);
});
}
else
{};
});
//查看弹出框里的tab点击事件,查看商铺,商铺跟进
_doc
.
on
(
'click'
,
'.detail-modal-header-tab>span'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
_this
.
removeClass
(
'btn-default-liu'
).
addClass
(
'btn-info-liu'
).
siblings
().
removeClass
(
'btn-info-liu'
).
addClass
(
'btn-default-liu'
);
business
.
detailTabIndex
=
_this
.
index
();
$
(
'.detail-modal-body-sec:nth-of-type('
+
(
business
.
detailTabIndex
+
1
)
+
')'
).
show
().
siblings
().
hide
();
if
(
business
.
detailTabIndex
==
0
){
checkLogin
();
$
(
'.iframe-shop-detail'
).
attr
(
'src'
,
'/app_broker/shop_detail_pc?shop_id='
+
business
.
id
);
}
else
if
(
business
.
detailTabIndex
==
1
){
checkLogin
();
$
(
'.followup-modal-comment-area>textarea'
).
val
(
''
);
//清空跟进框内容
business
.
getFollowupList
();
};
if
(
business
.
detailTabIndex
==
2
){
business
.
Caozuo
();
};
if
(
business
.
detailTabIndex
==
3
){
business
.
Caozuolog
();
};
if
(
business
.
detailTabIndex
==
4
){
business
.
Caozuoedit
();
};
if
(
business
.
detailTabIndex
==
5
){
//商铺视频
business
.
shopVideo
();
};
});
// 提交按钮设置案场权限人
$
(
document
).
delegate
(
".submit_follow"
,
"click"
,
function
()
{
//提交按钮设置案场权限人
var
myModalLabel
=
$
(
"#myModalLabel"
).
html
();
if
(
myModalLabel
==
'设置案场权限人'
)
{
checkLogin
();
business
.
Submit_follow
();
}
else
{
checkLogin
();
business
.
Submit_follow2
();
// 提交按钮设置盘方
}
});
$
(
document
).
delegate
(
"#confirm_delete"
,
"click"
,
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
checkLogin
();
business
.
delBusiness
();
});
$
(
document
).
delegate
(
".jia"
,
"click"
,
function
()
{
//加号
business
.
jiabox
();
});
$
(
document
).
delegate
(
".addphone"
,
"click"
,
function
()
{
//加号
business
.
addphone
(
this
);
});
$
(
document
).
delegate
(
".jian"
,
"click"
,
function
()
{
//叉号
business
.
jianbox
();
});
// 批量修改客方
$
(
document
).
delegate
(
"#modify_add"
,
"click"
,
function
()
{
checkLogin
();
business
.
modify_add
();
});
// 批量修改客方
$
(
document
).
on
(
'input'
,
'.phone_jia,.phone_add'
,
function
(
e
)
{
//搜索手机号码/加号搜索
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
_this
.
next
().
css
(
"display"
,
"block"
);
valueCurrent
=
_this
.
val
();
if
(
valueCurrent
!=
''
)
{
business
.
resetLoad
(
1
);
business
.
loadMain
(
valueCurrent
,
_this
.
next
());
}
else
{
business
.
ldHtml
.
html
(
''
);
return
false
;
}
});
$
(
document
).
delegate
(
".is_show"
,
"click"
,
function
()
{
//推荐至首页
if
(
!
confirm
(
'是否继续?'
))
{
return
;
}
business
.
id
=
$
(
this
).
attr
(
"data-id"
);
var
params
=
{
};
params
.
id
=
$
(
this
).
attr
(
"data-id"
);
var
str
=
$
.
trim
(
$
(
this
).
html
());
if
(
str
===
"推荐至首页"
)
{
params
.
type
=
1
;
$
(
this
).
html
(
'已推荐'
);
}
else
{
params
.
type
=
0
;
$
(
this
).
html
(
'推荐至首页'
);
}
checkLogin
();
$
.
ajax
({
//推荐至首页
'type'
:
'POST'
,
'url'
:
'/index/carefullyChosen'
,
data
:
{
"houses_id"
:
business
.
id
,
"is_carefully_chosen"
:
params
.
type
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
data
)
{}
}
else
{
alert
(
"推荐失败!"
)
}
}
});
});
// $(document).delegate("#liudan_pic_btn", "click", function() { //上传图片
// var img_url = "";
// BrowseServer('liudan_pic_btn', function(url) {
// var alt_img = $("#liudan_pic_btn").val();
// alt_img = alt_img.replace('images/', '');
// img_url += ' <img src="' + url + '" class="jai_dujia" data-img="' + alt_img + '">';
// $("#liudan_pic_pre").append(img_url);
// });
// });
// 下拉列表
var
_ajaxObjTel
=
null
;
_doc
.
on
(
'input'
,
'.phone_jia1'
,
function
()
{
var
_this
=
$
(
this
),
_thisVal
=
$
.
trim
(
_this
.
val
());
_this
.
removeAttr
(
'data-id'
);
//移除之前携带的信息
if
(
_thisVal
!=
''
)
{
_ajaxObjTel
&&
_ajaxObjTel
.
abort
();
_ajaxObjTel
=
$
.
ajax
({
type
:
'GET'
,
url
:
'/index/getBroker_new'
,
data
:
{
'phone'
:
$
.
trim
(
_this
.
val
()),
'site_id'
:
user_info_obj
.
site_id
},
timeout
:
30000
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
success
:
function
(
data
)
{
if
(
typeof
data
===
'object'
)
{
if
(
data
.
code
==
200
)
{
if
(
data
[
'data'
].
length
>
0
)
{
var
_htmlTemp
=
''
;
$
.
each
(
data
[
'data'
],
function
(
i
,
item
)
{
_htmlTemp
+=
'<li data-id="{3}">{2}{0}-{1}<li>'
.
stringFormatObj
({
'0'
:
item
[
'name'
],
'1'
:
item
[
'phone'
],
'2'
:
_this
.
parent
().
nextAll
(
'.input-add-tel'
).
data
(
'hideid'
)
?
''
:
(
item
[
'id'
]
+
'-'
),
'3'
:
item
[
'id'
]
});
});
// 输出trim
_this
.
next
().
show
().
html
(
_htmlTemp
);
}
else
{
_this
.
next
().
html
(
''
);
};
}
else
{
alert
(
data
[
'msg'
]);
};
}
else
{
alert
(
'数据错误'
);
};
},
error
:
function
()
{
//alert('error');
},
complete
:
function
(
xhr
,
textStatus
)
{
if
(
textStatus
===
'timeout'
)
{
alert
(
'请求超时'
);
};
}
});
};
});
_doc
.
on
(
'click'
,
'.jian_class1>ul>li'
,
function
()
{
var
_this
=
$
(
this
);
_this
.
parent
().
prev
().
val
(
_this
.
html
()).
attr
(
'data-id'
,
_this
.
attr
(
'data-id'
));
_this
.
parent
().
html
(
''
).
hide
();
});
//点击查看,触发定位事件
_doc
.
on
(
'click'
,
'[href="#modal_detail"]'
,
function
(){
var
_this
=
$
(
this
);
if
(
_this
.
hasClass
(
'btn-success'
)){
_this
.
removeClass
(
'btn-success'
).
addClass
(
'btn-warning'
);
};
});
//点击跟进,获取商铺跟进动态的接口
_doc
.
on
(
'click'
,
'[href="#modal_followup"]'
,
function
(){
business
.
id
=
$
(
this
).
attr
(
"data-id"
);
$
(
'.followup-modal-comment-area>textarea'
).
val
(
''
);
//清空跟进框内容
checkLogin
();
business
.
getFollowupList
();
});
//独家 附件上传删除键事件
_doc
.
on
(
'click'
,
'.delet-pic-btn'
,
function
(
e
)
{
var
_this
=
$
(
this
);
e
.
preventDefault
();
e
.
stopPropagation
();
if
(
confirm
(
'确定删除该文件吗?'
))
{
var
file_id
=
$
(
this
).
parent
(
'li'
).
attr
(
'id'
)
*
1
;
if
(
file_id
){
business
.
file_id_arr
.
push
(
file_id
);
business
.
file_id_str
=
business
.
file_id_arr
.
join
(
','
);
}
_this
.
parent
().
remove
();
};
});
//点击商铺跟进保存按钮,保存数据的接口
_doc
.
on
(
'click'
,
'#modal_followup_submit_btn'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
checkLogin
();
business
.
followupAdd
();
});
//查看点击事件
_doc
.
on
(
'click'
,
'a[href="#modal_shop_detail"]'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
_this
.
removeClass
(
'btn-success'
).
addClass
(
'btn-warning'
);
var
_id
=
_this
.
attr
(
'data-id'
);
business
.
id
=
_id
;
$
(
'.detail-modal-header-tab>span:nth-of-type(1)'
).
removeClass
(
'btn-default-liu'
).
addClass
(
'btn-info-liu'
).
siblings
().
removeClass
(
'btn-info-liu'
).
addClass
(
'btn-default-liu'
);
business
.
detailTabIndex
=
0
;
$
(
'.detail-modal-body-sec:nth-of-type(1)'
).
show
().
siblings
().
hide
();
$
(
'.followup-modal-comment-area>textarea'
).
val
(
''
);
//清空跟进框内容
business
.
house_id
=
$
(
this
).
attr
(
"data-id"
);
checkLogin
();
// business.getFollowupList();
$
(
'.iframe-shop-detail'
).
attr
(
'src'
,
'/app_broker/shop_detail_pc?shop_id='
+
_id
);
});
//是否独家 下载附件 附件上传处理事件
$
(
"#file_input"
).
change
(
function
()
{
var
_this
=
$
(
this
),
_spFile
=
_this
.
data
(
'spfile'
),
_limitTop
=
_this
.
data
(
'limittop'
),
_fileNum
=
_this
.
parent
().
next
().
find
(
'.delet-pic-btn'
).
length
;
//根据删除按钮的个数,确定文件的个数
if
(
_limitTop
&&
(
_fileNum
<
_limitTop
))
{
var
formData
=
new
FormData
();
formData
.
append
(
'type'
,
'exclusive_file'
);
formData
.
append
(
'image'
,
_this
[
0
].
files
[
0
]);
$
.
ajax
({
type
:
'post'
,
url
:
'/index/uploadImg'
,
data
:
formData
,
dataType
:
'json'
,
contentType
:
false
,
cache
:
false
,
processData
:
false
,
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
if
(
_data
.
code
==
200
)
{
var
_url
=
_data
.
data
.
internet_img_name
;
_this
.
parent
().
next
().
prepend
(
'<li class="pdf-pre-li"><a data-filename="{3}" class="pdf-pre-a" href="javascript:;" title="保存之后才可以点击下载">{2}</a><a href="javascript:;" class="delet-pic-btn">删除</a></li>'
.
stringFormatObj
({
'0'
:
_url
,
'1'
:
decodeURI
(
_url
.
slice
(
_url
.
lastIndexOf
(
'/'
)
+
1
)),
'2'
:
dealFileName
(
decodeURI
(
_url
.
slice
(
_url
.
lastIndexOf
(
'/'
)
+
1
))),
//dealFileName不要忘记
'3'
:
_data
.
data
.
img_path
}));
}
else
{
alert
(
_data
.
msg
);
};
},
error
:
function
()
{
alert
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
)
{
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
alert
(
'请求超时,请重试'
);
};
}
});
}
else
{
alert
(
'上传上限为 '
+
_limitTop
);
return
false
;
};
});
//独家合同,图片上传
$
(
".upload-image-btn"
).
change
(
function
()
{
var
_this
=
$
(
this
),
_limitTop
=
_this
.
data
(
'limittop'
);
if
(
_limitTop
)
{
var
formData
=
new
FormData
();
formData
.
append
(
'type'
,
'house_img'
);
formData
.
append
(
'image'
,
_this
[
0
].
files
[
0
]);
$
.
ajax
({
type
:
'post'
,
url
:
ServerHostImageLiu
+
'/index/uploadImg'
,
data
:
formData
,
dataType
:
'json'
,
contentType
:
false
,
cache
:
false
,
processData
:
false
,
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
if
(
_data
.
code
==
200
)
{
$
(
"#liudan_pic_pre"
).
append
(
'<li><img title="点击查看大图" class="jai_dujia" src="{0}" data-img="{1}"/></li>'
.
stringFormatObj
({
'0'
:
ServerHostImageLiu
+
'/resource/lib/Attachments/images/'
+
_data
.
data
.
internet_img_name
,
'1'
:
_data
.
data
.
internet_img_name
}));
}
else
{
alert
(
_data
.
msg
);
};
},
error
:
function
()
{
alert
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
)
{
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
alert
(
'请求超时,请重试'
);
};
}
});
}
else
{
alert
(
'上传上限为 '
+
_limitTop
);
return
false
;
};
});
},
// 获取信息 手机号 名字
Anch
:
function
()
{
//获取手机号名字的
$
.
ajax
({
'type'
:
'GET'
,
'url'
:
'/index/getAgentsTohouses'
,
data
:
{
"houses_id"
:
business
.
house_id
,
"type"
:
business
.
type
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
data
)
{
$
(
".jian_class"
).
html
(
''
);
//写入
$
.
each
(
data
.
data
,
function
(
i
,
data
)
{
business
.
jiabox_data
(
data
[
'id'
],
data
[
'name'
],
data
[
'phone'
]);
});
business
.
jiabox
();
}
}
else
{
alert
(
'请登录!'
);
}
}
});
},
Dujia
:
function
()
{
//获取独家的信息
business
.
file_id_arr
=
[];
//置空删除附件id
business
.
file_id_str
=
''
;
//置空删除的id
$
(
"#modal-dujia"
).
removeClass
(
"yz"
);
$
.
ajax
({
'type'
:
'GET'
,
'url'
:
'/index/getExclusive'
,
data
:
{
"houses_id"
:
business
.
house_id
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
data
)
{
$
(
"#sel_dujia"
).
val
(
data
.
data
.
is_exclusive_type
);
//是否独家
business
.
showOrHideDujia
();
$
(
"#start_date_dujia"
).
val
(
data
.
data
.
agent_start_time
);
//上传时间
$
(
"#end_date_dujia"
).
val
(
data
.
data
.
agent_end_time
);
$
(
"#exclusive"
).
val
(
data
.
data
.
name
);
business
.
exclusive_id
=
data
.
data
.
id
;
business
.
is_exclusive_type
=
data
.
data
.
is_exclusive_type
;
//是否独家
var
img_url
=
""
;
$
.
each
(
data
[
'data'
][
'exclusive_img'
],
function
(
i
,
item
)
{
var
local_img
=
ServerHostImageLiu
+
'/resource/lib/Attachments/images/'
+
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
);
if
(
check_auth
(
'index/editExclusive'
))
{
$
(
'.is_dujia'
).
find
(
'input'
).
removeAttr
(
"readonly"
);
$
(
'.is_dujia_select'
).
find
(
'select'
).
removeAttr
(
"disabled"
);
}
else
if
(
(
business
.
name
+
'-'
+
business
.
phone
)
===
data
.
data
.
name
)
{
$
(
'.is_dujia'
).
find
(
'input'
).
removeAttr
(
"readonly"
);
$
(
'.is_dujia_select'
).
find
(
'select'
).
removeAttr
(
"disabled"
);
}
else
{
//$('.is_dujia').find('input').removeAttr("readonly");
$
(
'.is_dujia'
).
find
(
'input'
).
attr
(
"readonly"
,
"readonly"
);
if
(
$
(
'#sel_dujia'
).
val
()
==
1
){
$
(
'.is_dujia_select'
).
find
(
'select'
).
attr
(
"disabled"
,
"disabled"
);
}
else
{
$
(
'.is_dujia_select'
).
find
(
'select'
).
removeAttr
(
"disabled"
);
$
(
'.is_dujia'
).
find
(
'input'
).
removeAttr
(
"readonly"
);
}
};
var
_data
=
data
.
data
;
$
(
'#fujian_ul'
).
html
(
''
);
//获取附件 对接口
var
file_paths
=
_data
[
'exclusive_file'
];
if
(
file_paths
){
for
(
var
i
=
0
;
i
<
file_paths
.
length
;
i
++
){
var
_tempArr
=
file_paths
[
i
][
'file_name'
].
split
(
'/'
);
file_paths
[
i
][
'file_name'
]
&&
$
(
'#fujian_ul'
).
append
(
'<li class="pdf-pre-li" id='
+
file_paths
[
i
][
'id'
]
+
'><a class="pdf-pre-a" download="{1}" href="{0}" title="点击可下载">{1}</a><a href="javascript:;" class="delet-pic-btn">删除</a></li>'
.
stringFormatObj
({
'0'
:
file_paths
[
i
][
'file_name'
],
'1'
:
dealFileName
(
decodeURI
(
_tempArr
[
_tempArr
.
length
-
1
]))
}));
};
}
}
}
else
{
alert
(
'获取失败!'
);
}
}
});
},
addDeleteNewsEvent
:
function
(
id
){
//删除独家 附件
$
.
ajax
({
url
:
'/index/delNewsFile'
,
type
:
'POST'
,
async
:
true
,
data
:
{
'file_id'
:
id
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
alert
(
'文件删除成功'
);
}
}
});
},
Dujianew
:
function
()
{
//提交独家的信息
var
images
=
[];
//图片
var
imgs
=
$
(
".jai_dujia"
);
for
(
var
j
=
0
;
j
<
imgs
.
length
;
j
++
)
{
images
.
push
(
imgs
[
j
].
getAttribute
(
"data-img"
))
};
//附件相关 2.9版本
var
_data
=
[];
var
_fujianObj
=
$
(
'#fujian_ul'
).
find
(
'li>a.pdf-pre-a'
);
//附件看的是删除按钮的个数
if
(
_fujianObj
.
length
>
0
){
//判断附件存在,同时,附件可能存在0到5个
for
(
var
i
=
0
;
i
<
_fujianObj
.
length
;
i
++
){
var
one_name
=
_fujianObj
[
i
].
getAttribute
(
'data-filename'
);
//附件取得是data-filename
if
(
one_name
){
_data
[
i
]
=
one_name
;
}
}
}
var
exclusive_file_str
=
_data
.
join
(
','
);
if
(
$
(
"#sel_dujia"
).
val
()
==
null
)
{
alert
(
"请选择是否独家"
);
return
;
}
if
(
$
(
"#sel_dujia"
).
val
()
==
1
&&
imgs
.
length
==
0
)
{
alert
(
"请选择图片"
);
return
;
}
if
(
$
(
"#start_date_dujia"
).
val
()
==
""
&&
$
(
"#sel_dujia"
).
val
()
==
1
)
{
alert
(
"请选择独家代理的时间"
);
return
;
}
if
(
$
(
"#end_date_dujia"
).
val
()
==
""
&&
$
(
"#sel_dujia"
).
val
()
==
1
)
{
alert
(
"请选择独家代理的时间"
);
return
;
}
if
(
$
(
"#exclusive"
).
val
()
==
""
&&
$
(
"#sel_dujia"
).
val
()
==
1
)
{
alert
(
"请选择姓名或者手机号"
);
return
;
}
$
(
"#modal-dujia"
).
addClass
(
"yz"
);
var
url
=
""
;
if
(
business
.
is_exclusive_type
==
0
){
if
(
business
.
auth_edit_exclusive
==
0
)
{
url
=
"/index/editExclusive"
}
else
{
url
=
"/index/addExclusive"
}
}
else
if
(
business
.
is_exclusive_type
==
1
){
url
=
"/index/editExclusive"
}
else
{
// nothing to do ;
}
$
.
ajax
({
'type'
:
'POST'
,
'url'
:
url
,
data
:
{
"houses_id"
:
business
.
house_id
,
//楼盘Id
"is_exclusive_type"
:
$
(
"#sel_dujia"
).
val
(),
//是否独家
"exclusive_ids"
:
business
.
exclusive_id
,
//经纪人id
"agent_start_time"
:
$
(
"#start_date_dujia"
).
val
(),
//开始时间
"agent_end_time"
:
$
(
"#end_date_dujia"
).
val
(),
//结束时间
"exclusive_img"
:
images
,
//独家图片
"exclusive_file"
:
exclusive_file_str
,
//独家附件
"del_file_id"
:
business
.
file_id_str
//独家附件
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
alert
(
'修改成功'
);
$
(
"#modal-dujia"
).
modal
(
'hide'
);
}
else
{
alert
(
'获取失败!'
);
}
}
});
},
showOrHideDujia
:
function
(){
var
_this
=
this
;
if
(
$
(
'#sel_dujia'
).
val
()
==
0
)
{
$
(
'.is_dujia'
).
hide
();
}
else
{
$
(
'.is_dujia'
).
show
();
}
},
Caozuo
:
function
()
{
//获取独家的信息
var
caozuo_table
=
""
;
$
.
ajax
({
'type'
:
'GET'
,
'url'
:
'/index/getRecords'
,
//获取操作记录
data
:
{
"houses_id"
:
business
.
house_id
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
data
)
{
$
.
each
(
data
.
data
,
function
(
i
,
item
)
{
caozuo_table
+=
'<tr><td>'
+
item
.
remark
+
'</td> <td>'
+
item
.
name
+
'</td> <td>'
+
item
.
create_time
+
'</td></tr>'
});
if
(
caozuo_table
){
$
(
"#caozuo_table"
).
html
(
caozuo_table
);
}
else
{
$
(
"#caozuo_table"
).
html
(
'<tr><td colspan="3">暂无数据</td></tr>'
);
}
}
}
else
{
alert
(
'获取失败!'
);
}
}
});
},
Caozuolog
:
function
()
{
//获取查看日志
var
caozuo_table
=
""
;
$
.
ajax
({
'type'
:
'GET'
,
'url'
:
'/index/lookShopIndex'
,
//获取操作记录
data
:
{
"house_id"
:
business
.
house_id
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
data
.
list
)
{
$
.
each
(
data
.
data
.
list
,
function
(
i
,
item
)
{
caozuo_table
+=
'<tr><td>'
+
item
.
look_time
+
'</td> <td>'
+
item
.
house_id
+
'</td> <td>'
+
item
.
agent_name
+
'</td></tr>'
});
if
(
caozuo_table
){
$
(
"#caozuo_table_log"
).
html
(
caozuo_table
);
}
else
{
$
(
"#caozuo_table_log"
).
html
(
'<tr><td colspan="3">暂无数据</td></tr>'
);
}
}
}
else
{
alert
(
'获取失败!'
);
}
}
});
},
Caozuoedit
:
function
()
{
//获取编辑日志
var
caozuo_table
=
""
;
$
.
ajax
({
'type'
:
'GET'
,
'url'
:
'/index/getEditLog'
,
//获取操作记录
data
:
{
"house_id"
:
business
.
house_id
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
data
)
{
$
.
each
(
data
.
data
,
function
(
i
,
item
)
{
caozuo_table
+=
'<tr><td>'
+
item
.
create_time
+
'</td> <td>'
+
item
.
name
+
'</td> <td>'
+
item
.
remark
+
'</td></tr>'
});
if
(
caozuo_table
){
$
(
"#caozuo_table_edit"
).
html
(
caozuo_table
);
}
else
{
$
(
"#caozuo_table_edit"
).
html
(
'<tr><td colspan="3">暂无数据</td></tr>'
);
}
}
}
else
{
alert
(
'获取失败!'
);
}
}
});
},
Submit_follow
:
function
()
{
//提交案场权限人数据
var
agents_id
=
""
;
var
_agents_id
=
""
;
$
(
"input[name='ues_id']"
).
each
(
function
()
{
//拼接经纪人id
var
s
=
$
(
this
).
val
();
var
m
=
s
.
match
(
/
[^
-
]
+
(?=[
-
])
/g
);
if
(
m
===
null
)
{
return
false
;
}
else
{
agents_id
+=
","
+
m
[
0
];
_agents_id
=
agents_id
.
substring
(
1
);
}
});
$
.
ajax
({
'type'
:
'POST'
,
'url'
:
'/index/addHousesAgents'
,
data
:
{
"houses_id"
:
business
.
house_id
,
"type"
:
business
.
type
,
"agents_id"
:
_agents_id
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
data
)
{
$
(
"#modal-anch"
).
hide
;
}
}
else
{
$
(
"#modal-anch"
).
hide
;
}
}
});
},
resetLoad
:
function
()
{
//手机号
if
(
business
.
ajaxObj
)
{
business
.
ajaxObj
.
abort
();
}
business
.
ldHtml
.
html
(
''
);
business
.
stopstatus
=
true
;
},
Submit_follow2
:
function
()
{
//提交盘方
var
agents_id
=
""
;
var
_agents_id
=
""
;
$
(
"input[name='ues_id']"
).
each
(
function
()
{
//拼接经纪人id
var
s
=
$
(
this
).
val
();
var
m
=
s
.
match
(
/
[^
-
]
+
(?=[
-
])
/g
);
if
(
m
===
null
)
{
return
false
;
}
else
{
agents_id
+=
","
+
m
[
0
];
_agents_id
=
agents_id
.
substring
(
1
);
}
});
$
.
ajax
({
'type'
:
'POST'
,
'url'
:
'/index/addHousesAgentsDish'
,
data
:
{
"houses_id"
:
business
.
house_id
,
"type"
:
business
.
type
,
"agents_id"
:
_agents_id
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
data
)
{
$
(
"#modal-anch"
).
hide
;
}
}
else
{
$
(
"#modal-anch"
).
hide
;
}
}
});
},
resetLoad
:
function
()
{
//手机号
if
(
business
.
ajaxObj
)
{
business
.
ajaxObj
.
abort
();
}
business
.
ldHtml
.
html
(
''
);
business
.
stopstatus
=
true
;
},
// 下拉列表
loadMain
:
function
(
phone
,
obj
)
{
//手机号
business
.
ajaxObj
=
$
.
ajax
({
type
:
"GET"
,
url
:
'/index/getBroker_new'
,
data
:
{
'phone'
:
phone
,
'site_id'
:
user_info_obj
.
site_id
},
timeout
:
10000
,
dataType
:
"json"
,
beforeSend
:
function
()
{},
success
:
function
(
data
)
{
if
(
data
.
code
===
200
)
{
var
_html
=
''
;
$
.
each
(
data
.
data
,
function
(
i
,
data
)
{
_html
+=
'<li class="addphone"><span class="id">'
+
data
[
'id'
]
+
'-</span><span class="phone_name">'
+
data
[
'name'
]
+
'</span><span class="phone_span">-</span><span class="phone-phone">'
+
data
[
'phone'
]
+
'</span> </li>'
;
});
obj
.
html
(
_html
);
}
},
error
:
function
()
{
},
complete
:
function
(
xhr
,
textStatus
)
{
if
(
textStatus
===
"timeout"
)
{
//处理超时的逻辑
alert
(
"请求超时"
);
}
}
});
},
addphone
:
function
(
obj
)
{
//list消失
var
phone_name
=
$
(
obj
).
find
(
".phone_name"
).
html
();
var
phone_phone
=
$
(
obj
).
find
(
".phone-phone"
).
html
();
var
phone_span
=
$
(
obj
).
find
(
".phone_span"
).
html
();
var
id
=
$
(
obj
).
find
(
".id"
).
html
();
business
.
exclusive_id
=
id
.
substr
(
0
,
id
.
length
-
1
);
$
(
obj
).
parent
().
prev
().
val
(
id
+
phone_name
+
phone_span
+
phone_phone
);
$
(
obj
).
parent
().
hide
();
business
.
ldHtml
.
html
(
''
);
return
;
},
jiabox
:
function
()
{
//加输入框
business
.
boxphoto
=
'<input name="ues_id" placeholder="请输入" type="tel" style="margin-left: 10px;float: left" class="phone_add">'
+
'<ul class="phone_list1"></ul>'
+
'<img src="/resource/image/qdao-sha.png" class="jian">'
;
$
(
".jian_class"
).
append
(
business
.
boxphoto
);
//写入
business
.
jianbox
();
},
jiabox_data
:
function
(
id
,
name
,
phone
)
{
//显示已经获取的数据
business
.
boxphoto
=
'<input name="ues_id" placeholder="请输入" value='
+
id
+
'-'
+
name
+
'-'
+
phone
+
' type="tel" style="margin-left: 10px;float: left" class="phone_add">'
+
'<ul class="phone_list1"></ul>'
+
'<img src="/resource/image/qdao-sha.png" class="jian"><input type="hidden" value="'
+
id
+
'">'
;
$
(
".jian_class"
).
append
(
business
.
boxphoto
);
//写入
},
jianbox
:
function
()
{
$
(
".jian"
).
click
(
function
()
{
//删除经纪人数据
var
ss
=
$
(
this
).
prev
().
prev
().
val
();
var
mm
=
ss
.
match
(
/
[^
-
]
+
(?=[
-
])
/g
);
if
(
mm
===
null
)
{
$
(
this
).
prev
().
prev
().
remove
();
$
(
this
).
prev
().
remove
();
$
(
this
).
remove
();
return
false
;
}
else
{
var
mm_id
=
mm
[
0
];
}
var
r
=
confirm
(
"确定删除吗!"
);
if
(
r
==
true
)
{
$
(
this
).
prev
().
prev
().
remove
();
$
(
this
).
prev
().
remove
();
$
(
this
).
remove
();
$
.
ajax
({
'type'
:
'POST'
,
'url'
:
'/index/delTohouses'
,
data
:
{
"id"
:
mm_id
,
"houses_id"
:
business
.
house_id
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
}
else
{
alert
(
"删除失败"
);
}
}
});
}
else
{
}
});
},
//
// 批量修改客方
modify_add
:
function
()
{
//modify_add批量修改客方
var
old_agents_text
=
$
(
'.old_agents'
).
val
();
var
new_agents_text
=
$
(
'.new_agents'
).
val
();
if
(
old_agents_text
==
''
)
{
alert
(
'请输入经纪人内容为空'
);
return
false
;
}
if
(
new_agents_text
==
''
)
{
alert
(
'请输入经纪人内容为空'
);
return
false
;
}
$
.
ajax
({
url
:
'/index/batchChangDish'
,
type
:
'POST'
,
async
:
true
,
data
:
{
"old_agents_id"
:
$
(
'.phone_jia1:eq(0)'
).
attr
(
'data-id'
),
"agents_id"
:
$
(
'.phone_jia1:eq(1)'
).
attr
(
'data-id'
),
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
}
}
});
},
getList
:
function
(
pageNo
,
type
)
{
//商铺列表 搜索
var
user_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
)));
business
.
pageNo
=
pageNo
;
var
params
=
{};
// 商铺列表 默认时间显示
var
user_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
)));
//读取缓存
params
.
agent_id
=
user_info_obj
.
id
;
params
.
pageNo
=
business
.
pageNo
;
params
.
pageSize
=
business
.
pageSize
;
params
.
is_carefully_chosen
=
$
(
'#is_carefully_chosen option:selected'
).
val
();
//首页显示
params
.
is_show
=
$
(
'#is_show option:selected'
).
val
();
//c端显示
params
.
shop_type
=
$
(
'#shop_type option:selected'
).
val
();
//商铺类型
// params.leased = $('#leased option:selected').val(); 商铺状态
params
.
status
=
$
(
'#leased option:selected'
).
val
();
//商铺状态 上架 下架
params
.
is_exclusive_type
=
$
(
'#is_exclusive_type option:selected'
).
val
();
//是否独家
params
.
id
=
$
(
'#id'
).
val
();
//商铺编号
params
.
internal_address
=
$
(
'#shop_address'
).
val
();
//商铺地址,即对内地址
params
.
internal_title
=
$
(
'#internal_title'
).
val
();
//对内商铺名称
params
.
external_title
=
$
(
'#internal_title_open'
).
val
();
//对外商铺名称
params
.
is_lock
=
$
(
'#is_lock_plate'
).
val
();
//锁盘筛选
params
.
vip
=
$
(
'#is_vip_plate'
).
val
();
//VIP盘筛选
//添加个人商铺和所有商铺选择功能
params
.
dish_id
=
business
.
all_shop
?
''
:
user_info_obj
.
id
;
params
.
city
=
$
(
'.shop_city_choose_site_list'
).
val
();
//城市筛选
params
.
disc
=
$
(
'#shop_area_id'
).
val
();
//区域筛选
params
.
business_id
=
$
(
'#business_circle_id'
).
val
();
//商圈筛选
params
.
industry_type
=
$
(
'#yetai_id'
).
val
();
//业态筛选
params
.
dish_phone
=
$
(
'#dish_phone'
).
val
();
//盘方手机号
params
.
landlord_phone
=
$
(
'#landlord_phone'
).
val
();
//房东手机号
params
.
start_date
=
$
(
'#start_date'
).
val
();
//时间1
params
.
end_date
=
$
(
'#end_date'
).
val
();
//时间2
params
.
dish_district_id
=
$
(
'#district_id_panfang'
).
val
();
//盘方 部门 id
params
.
dish_store_id
=
$
(
'#guest_stores_panfang'
).
val
();
//盘方 门店 id
params
.
dish_name
=
business
.
agent_id_choose
;
//盘方姓名 下拉式
params
.
area_start
=
$
(
'#area_start'
).
val
();
//面积开始
params
.
area_end
=
$
(
'#area_end'
).
val
();
//面积结束
params
.
price_start
=
$
(
'#price_start'
).
val
();
//月租金开始
params
.
price_end
=
$
(
'#price_end'
).
val
();
//月租金结束
params
.
fit_industry_type
=
$
(
'#suitable_yetai_input'
).
val
();
//适合业态
params
.
residue_type
=
$
(
'#lease_state'
).
val
();
//求租 已租 无效 筛选
$
.
ajax
({
url
:
'/index/getHouseList.html'
,
//获取列表
type
:
'GET'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
beforeSend
:
function
()
{
$
(
'#main_loading_pic'
).
show
();
},
success
:
function
(
data
)
{
// $('#user_city_choose').show();
var
temp
=
document
.
getElementById
(
'office_building_list_tpl'
).
innerHTML
;
var
doTtmpl
=
doT
.
template
(
temp
);
$
(
"#business_list"
).
html
(
doTtmpl
(
data
.
data
.
list
));
//显示优化
var
_tempObj
=
$
(
'.btn-default-show-caozuo'
);
$
.
each
(
_tempObj
,
function
(
i
,
v
)
{
var
_$this
=
$
(
v
);
_$this
.
nextAll
().
hide
();
//默认按钮只显示两个
if
(
_$this
.
index
()
==
0
){
_$this
.
click
();
}
});
/*分页代码*/
add_page
(
data
.
data
.
total
,
pageNo
,
business
.
pageSize
,
business
.
getList
);
/* $ ("#pagediv").pagination ({
length: data.data.total,
current: pageNo,
every: business.pageSize,
onClick: function (el) {
business.getList (el.num.current);
}
});*/
},
complete
:
function
(){
$
(
'#main_loading_pic'
).
hide
();
}
});
},
// 获取视频
shopVideo
:
function
()
{
var
user_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
)));
var
params
=
{};
params
.
id
=
business
.
id
;
params
.
site_area
=
4
;
params
.
AuthToken
=
user_info_obj
.
AuthToken
;
$
.
ajax
({
url
:
'/broker/getShopDetail'
,
//获取列表
type
:
'GET'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
beforeSend
:
function
()
{
},
success
:
function
(
data
)
{
var
temp
=
document
.
getElementById
(
'shop_video_list_tpl'
).
innerHTML
;
var
doTtmpl
=
doT
.
template
(
temp
);
$
(
"#shop-details-video"
).
html
(
doTtmpl
(
data
.
data
.
shop_videos
));
},
complete
:
function
(){
}
});
},
getDistrict
:
function
(
fn
)
{
$
.
ajax
({
url
:
'/api/filtrateCondition'
,
type
:
'GET'
,
async
:
true
,
data
:
{
"pageSize"
:
1000
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
var
str_district
=
''
;
var
str_area
=
''
;
var
str_yetai
=
''
;
//面积筛选
$
.
each
(
data
.
data
.
acreage
,
function
(
i
,
item
)
{
if
(
item
.
id
!=-
1
){
str_area
+=
'<option value="'
+
(
item
.
id
*
1
+
1
)
+
'">'
+
item
.
value
+
'</option>'
;
}
});
//业态筛选
$
.
each
(
data
.
data
.
yetai
,
function
(
i
,
item
)
{
if
(
item
!=
'全部'
){
str_yetai
+=
'<option value="'
+
item
+
'">'
+
item
+
'</option>'
;
}
});
$
(
'#district_id'
).
append
(
str_district
);
$
(
'#area_id'
).
append
(
str_area
);
$
(
'#yetai_id'
).
append
(
str_yetai
);
}
}
});
},
//城市 区域 筛选
getDistrictStoreList
:
function
(
id
,
fn
)
{
$
.
ajax
({
url
:
'/index/getAllDisc'
,
type
:
'GET'
,
async
:
true
,
data
:
{
'city'
:
id
,
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
fn
&&
fn
(
data
.
data
);
}
}
});
},
//商圈 筛选
getBusinessCircle
:
function
(
id
,
province
,
city
,
fn
)
{
$
.
ajax
({
url
:
'/index/getBusinessAll'
,
type
:
'GET'
,
async
:
true
,
data
:
{
'city'
:
$
(
'.shop_city_choose_site_list'
).
val
(),
'disc'
:
$
(
'#shop_area_id'
).
val
()
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
fn
&&
fn
(
data
.
data
);
}
}
});
},
getDistrictPanFang
:
function
(
fn
)
{
//调用接口 产生列表 部门
$
.
ajax
({
url
:
'/index/getDistrict'
,
type
:
'GET'
,
async
:
true
,
data
:
{
"pageSize"
:
1000
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
var
str
=
''
;
$
.
each
(
data
.
data
,
function
(
i
,
item
)
{
str
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
district_name
+
'</option>'
;
});
$
(
"#district_id_panfang"
).
append
(
str
);
fn
&&
fn
();
}
}
});
},
getDistrictStoreListPanFang
:
function
(
id
,
fn
){
$
.
ajax
({
url
:
'/index/getDistrictStoreList'
,
type
:
'GET'
,
async
:
true
,
data
:
{
'id'
:
id
,
"pageSize"
:
1000
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
fn
&&
fn
(
data
.
data
);
}
}
});
},
search_phone_agent
:
function
()
{
//客户列表 客方员工 姓名的下拉式搜索
$
.
ajax
({
url
:
'/index/getAgentsTohouses'
,
type
:
'GET'
,
async
:
true
,
data
:
{
"type"
:
2
,
"agent_name"
:
$
(
'#dish_name'
).
val
()
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
var
user_ul
=
""
;
$
.
each
(
data
.
data
.
data
,
function
(
i
,
item
)
{
user_ul
+=
'<li class="addphone-agent" data-id="'
+
item
.
name
+
'"'
+
'data-ids="'
+
item
.
id
+
'">'
+
item
.
id
+
'-'
+
item
.
name
+
'-'
+
item
.
phone
+
'</li>'
;
});
$
(
".user-ul-agent"
).
html
(
user_ul
);
}
else
{
alert
(
data
.
msg
);
}
}
});
},
addphoneAgent
:
function
(
obj
)
{
//客户列表 客方姓名 搜索 input赋值
var
user_ht
=
$
(
obj
).
html
();
$
(
"#dish_name"
).
val
(
user_ht
);
$
(
".user-ul-agent"
).
html
(
''
);
business
.
agent_id_choose
=
$
(
obj
).
attr
(
"data-id"
);
business
.
agent_id_choose_p
=
$
(
obj
).
attr
(
"data-ids"
);
},
//初始化 城市 获取区域 传给后端字段 可以不接收
initializationCityFunction
:
function
(
params
)
{
$
.
ajax
({
url
:
'/index/getCurrentCity'
,
type
:
'GET'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
data
.
city
==
'上海市'
){
$
(
"#user_city_choose"
).
val
(
'310100'
);
};
if
(
data
.
data
.
city
==
'杭州市'
){
$
(
"#user_city_choose"
).
val
(
'330100'
);
};
var
city_id
=
$
(
"#user_city_choose"
).
val
();
if
(
1
)
{
business
.
getDistrictStoreList
(
city_id
,
function
(
_data
)
{
var
_str
=
'<option value="">区域</option>'
;
$
.
each
(
_data
,
function
(
i
,
item
)
{
_str
+=
'<option value="'
+
item
.
name
+
'">'
+
item
.
name
+
'</option>'
;
});
$
(
"#shop_area_id"
).
html
(
_str
);
});
}
else
{};
business
.
getList
(
1
);
}
});
},
//设置 城市
setUpCityFunction
:
function
(
city
)
{
if
(
city
==
310100
){
city
=
'上海市'
;
};
if
(
city
==
330100
){
city
=
'杭州市'
;
};
$
.
ajax
({
url
:
'/index/settingCity'
,
type
:
'POST'
,
async
:
true
,
data
:
{
'city'
:
city
},
dataType
:
'json'
,
success
:
function
(
data
)
{
}
});
},
delBusiness
:
function
()
{
$
.
ajax
({
url
:
'/index/houseDel'
,
type
:
'POST'
,
async
:
true
,
data
:
{
"id"
:
business
.
id
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
alert
(
'删除成功'
);
$
(
"#modal-delete"
).
modal
(
'hide'
);
}
else
{
$
(
"#del_msg"
).
html
(
'<span style="color: red">删除失败!</span>'
);
}
}
});
},
getFollowupList
:
function
(){
$
.
ajax
({
'type'
:
'get'
,
'url'
:
'/broker/getListByHouseId'
,
data
:
{
'house_id'
:
business
.
id
,
'AuthToken'
:
business
.
AuthToken
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
data
&&
Array
.
isArray
(
data
.
data
)
&&
data
.
data
.
length
>
0
)
{
var
_htmlTemp
=
''
;
$
.
each
(
data
.
data
,
function
(
i
,
v
)
{
_htmlTemp
+=
'<tr><td>{0}</td><td>{1}</td><td>{2}</td></tr>'
.
stringFormatObj
({
'0'
:
dealPunctuation
(
v
.
step
),
'1'
:
v
.
agent_name
,
'2'
:
v
.
create_time
})
});
$
(
'#modal_followup_table_list'
).
html
(
_htmlTemp
);
}
else
{
$
(
'#modal_followup_table_list'
).
html
(
'<tr><td class="text-center">暂无数据</td></tr>'
);
}
//判断用户是否有权限跟进
if
(
check_auth
(
'broker/addShopFollowUp'
)){
$
(
'#modal_followup_submit_btn'
).
show
();
}
else
{
$
(
'#modal_followup_submit_btn'
).
hide
();
}
}
else
{
alert
(
'请登录!'
);
}
}
});
},
followupAdd
:
function
(){
var
_tareaObjVal
=
$
(
'.followup-modal-comment-area>textarea'
).
val
();
if
(
_tareaObjVal
==
''
){
alert
(
'内容不能为空'
);
return
false
;
};
if
(
!
business
.
isFollowupSaving
){
business
.
isFollowupSaving
=
true
;
$
.
ajax
({
'type'
:
'post'
,
'url'
:
'/broker/addShopFollowUp'
,
data
:
{
'house_id'
:
business
.
id
,
'AuthToken'
:
business
.
AuthToken
,
'agent_id'
:
business
.
agent_id
,
'agent_phone'
:
business
.
agent_phone
,
'agent_name'
:
business
.
agent_name
,
'follow_up_info'
:
_tareaObjVal
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
alert
(
'添加成功'
);
business
.
isFollowupSaving
=
false
;
$
(
".modal_followup"
).
modal
(
'hide'
);
}
else
{
alert
(
'请登录!'
);
}
}
});
}
}
};
return
business
;
});
\ No newline at end of file
public/resource/js/officeEdit.js
0 → 100644
View file @
3bf94893
define
([
'doT'
,
'css!style/shop_edit.css'
,
'ckfinder'
,
'ckfinderStart'
],
function
(
doT
)
{
var
user_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
)));
//读取缓存
var
user
=
{
del_value_panfang
:
''
,
del_value_anchang
:
''
,
initShopRong
:
false
,
//判断是否是需要加载商圈
init
:
function
()
{
//初始化dot
user
.
event
();
$
(
'#pf_tel_jia'
).
hide
();
},
upload_id
:
0
,
event
:
function
()
{
$
(
'#page-content-wrapper'
).
show
();
var
_objThis
=
this
,
//user对象
_id
=
getUrlParam
(
'id'
),
//地址栏获取的商铺或者街铺id
_source
=
getUrlParam
(
'source'
),
_sublet_id
=
getUrlParam
(
'sublet_id'
),
_doc
=
$
(
document
),
_tpl_landlord_phone1
=
$
(
'#my_tpl_landlord_phone1'
).
html
(),
//手机号码添加的位置模板
_urlCut
=
ServerHostImageLiu
+
'/resource/lib/Attachments/images/'
,
//要截取的部分url
_loadMainItem
=
$
(
'#main_loading_pic'
),
//整个页面的加载图标
_shangpuTypeObj
=
$
(
'#shangpuType'
),
//商铺类型
_showCdObj
=
$
(
'#showCd'
),
//显示给C端用户看
_exclusiveTypeObj
=
$
(
'#exclusiveType'
),
//是否独家
_yetaiObj
=
$
(
'.yetai'
),
//业态
_miankuanObj
=
$
(
'#miankuan'
),
//面宽
_loucengfloorObj
=
$
(
'#loucengfloor'
),
//楼层
_jinshenObj
=
$
(
'#jinshen'
),
//进深
_dianliangObj
=
$
(
'#dianliang'
),
//电量
_dianyaObj
=
$
(
'#dianya'
),
//电压
_hasGasObj
=
$
(
'#hasGas'
),
//是否有燃气
_yanguandaoObj
=
$
(
'#yanguandao'
),
//是否有烟管道
_shangshuiObj
=
$
(
'#shangshui'
),
//是否有上水
_xiashuiObj
=
$
(
'#xiashui'
),
//是否有下水
_zuhangxiuObj
=
$
(
'#zuhangxiu'
),
//交付装修状态
_idRunRoundObj
=
$
(
'#id_run_round'
),
//目前证照经营范围
_roomTagObj
,
//商铺标签,初始化
_landlordPhoneObj
=
$
(
'.li_landlord_phone input'
),
//房东手机号
_internalNameObj
=
$
(
'#internalName'
),
//对内商铺名称
_suitableYetaiInputObj1
=
$
(
'.suitable-yetai-input:nth-of-type(1)'
),
//最适合业态
_suitableYetaiInputObj2
=
$
(
'.suitable-yetai-input:nth-of-type(2)'
),
//最适合业态
_suitableYetaiInputObj3
=
$
(
'.suitable-yetai-input:nth-of-type(3)'
),
//最适合业态
_projectNameObj
=
$
(
'#projectName'
),
//项目(大厦)名称
_zujinTypeObj
=
$
(
'#zujinType'
),
//租金模式
_moonPriceObj
=
$
(
'#moonPrice'
),
//月租均价
_wuyePriceObj
=
$
(
'#wuyePrice'
),
//物业管理费
_jinchangPriceObj
=
$
(
'#jinchangPrice'
),
//进场费,对内转让费
_foreignZhuanrangPriceObj
=
$
(
'#foreignZhuanrangPrice'
),
//对商户显示的转让费
_foreignZhuanrangFaceObj
=
$
(
'#foreignZhuanrangFace'
),
//对商户显示的转让费面议
_roomShengyuNumObj
=
$
(
'#roomShengyuNum'
),
//剩余铺数
_roomAllNumObj
=
$
(
'#roomAllNum'
),
//总铺数
_roomArea1Obj
=
$
(
'#roomArea1'
),
//商铺面积起始值
_roomArea2Obj
=
$
(
'#roomArea2'
),
//商铺面积结束值
_businessAreaObj
=
$
(
'#businessArea'
),
//商业面积,项目总面积,建筑面积
_provinceInternalObj
=
$
(
'#province_internal'
),
//对内地址省
_cityInternalObj
=
$
(
'#city_internal'
),
//对内地址市
_discInternalObj
=
$
(
'#disc_internal'
),
//对内地址区
_addressInternalObj
=
$
(
'#address_internal'
),
//对内地址详细地址
_longitudeObj
=
$
(
'#longitude'
),
//经度
_latitudeObj
=
$
(
'#latitude'
),
//纬度
_trafficObj
=
$
(
'#traffic'
),
//交通
// _hasMovedObj = $('#hasMoved'), 已入住
_yingyeTimeObj
=
$
(
'#yingyeTime'
),
//营业时间
_kaipanTimeObj
=
$
(
'#kaipanTime'
),
//开盘时间,即招商时间
_kaiyeTimeObj
=
$
(
'#kaiyeTime'
),
//开业时间
_yongjinRuleObj
=
$
(
'#yongjinRule'
),
//佣金规则
_guizeFuObj
=
$
(
'#guizeFu'
),
//签约规则,付
_guizeYaObj
=
$
(
'#guizeYa'
),
//签约规则,押
_qianyueNianxianObj
=
$
(
'#qianyueNianxian'
),
//签约年限
_qianyueNianxian2Obj
=
$
(
'#qianyueNianxian2'
),
//签约年限下限
_foreignYoushiObj
=
$
(
'#zhoubianpeitao'
),
//周边配套,以前的对外项目优势
_suoshudiduanObj
=
$
(
'#suoshudiduan'
),
//所处地段
_fujinrenliuObj
=
$
(
'#fujinrenliu'
),
//附近人流
_qitabuchongObj
=
$
(
'#qitabuchong'
),
//其他补充
_qianyueRuleObj
=
$
(
'#qianyueRule'
),
//签约规则
//_imgUploadLiebiao = $('#liebiao_pic_ul'), //列表页封面图ul
_imgUploadLunbo
=
$
(
'#xiangqing_pic_ul'
),
//详情页轮播图ul
_imgUploadLouceng
=
$
(
'#louceng_pic_ul'
),
//楼层平面图ul
_pdfUploadFujian
=
$
(
'#fujian_ul'
),
//附件ul
_weilouLinkObj
=
$
(
'#weilouLink'
),
//微楼书
_dajiangtangObj
=
$
(
'#dajiangtang'
),
//大讲堂
_exclusiveDate1Obj
=
$
(
'#exclusiveDate1'
),
//独家代理有效期开始时间
_exclusiveDate2Obj
=
$
(
'#exclusiveDate2'
),
//独家代理有效期结束时间
_exclusiveTelObj
=
$
(
'#exclusiveTel'
),
//独家方电话
_imgUploadDujia
=
$
(
'#dujia_pic_ul'
),
//独家合同ul
_imgMaskObj
=
$
(
'#img_mask_area'
),
//预览大图的mask
_laiyuanObj
=
$
(
'#laiyuan'
),
// 来源
_isshowshopDetailObj
=
$
(
'#isShowShopDetail'
),
// 对内显示详情图
_repeatShopList
=
$
(
'#address_internal_input_text_box>ul'
);
//搜索有无重铺的显示列表
//对商户显示的装让费默认隐藏
_foreignZhuanrangPriceObj
.
closest
(
'.form-group'
).
hide
();
//处理文件名,长度过长时处理
function
dealFileName
(
str
)
{
//如果文件超过30的长度,则用*代替
if
(
str
.
length
>
26
)
{
return
str
.
slice
(
0
,
23
)
+
'***'
+
str
.
slice
(
-
4
);
}
else
{
return
str
;
};
};
//定义获取商铺标签方法
function
getShangpuTags
(
fn
)
{
$
.
ajax
({
type
:
'GET'
,
url
:
'/index/getLabelsList'
,
data
:
{
'pageNo'
:
1
,
'pageSize'
:
500
},
timeout
:
30000
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
if
(
typeof
_data
===
'object'
)
{
if
(
_data
[
'code'
]
==
'200'
)
{
var
_htmlTemp
=
''
;
$
.
each
(
_data
.
data
.
list
,
function
(
i
,
item
)
{
_htmlTemp
+=
'<label class="checkbox-inline"><input type="checkbox" class="roomTag" id="" value="{0}" data-id="{1}" name="shangpu_tags[]">{0}</label>'
.
stringFormatObj
({
'0'
:
item
.
name
,
'1'
:
item
.
id
});
});
$
(
'#shangpu_tags_area'
).
append
(
_htmlTemp
);
fn
&&
fn
();
}
else
{
alert
(
_data
[
'msg'
]);
}
}
else
{
alert
(
'数据错误'
);
};
},
error
:
function
()
{
alert
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
)
{
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
alert
(
'请求超时,请重试'
);
};
}
});
};
var
_pcUserInfo
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
)));
console
.
log
(
_pcUserInfo
);
//$('#panfang_data').val(_pcUserInfo.id + '-' + _pcUserInfo.name + '-' + _pcUserInfo.phone).attr('data-id', _pcUserInfo.id);
$
(
'#acqx_tel_jia'
).
prev
().
find
(
'input'
).
val
(
_pcUserInfo
.
id
+
'-'
+
_pcUserInfo
.
name
+
'-'
+
_pcUserInfo
.
phone
).
attr
(
'data-id'
,
_pcUserInfo
.
id
);
//获取商铺标签之后在进行其他操作
getShangpuTags
(
function
()
{
if
(
_id
!=
null
||
_source
!=
null
)
{
var
_data
=
{};
if
(
_id
!=
null
)
{
_data
[
'id'
]
=
_id
;
}
else
if
(
_source
)
{
_data
[
'source'
]
=
_source
;
_data
[
'sublet_id'
]
=
_sublet_id
;
}
else
{};
checkLogin
();
$
.
ajax
({
type
:
'GET'
,
url
:
'/index/houseEdit'
,
data
:
_data
,
timeout
:
30000
,
dataType
:
'json'
,
beforeSend
:
function
()
{
_loadMainItem
.
show
();
},
success
:
function
(
data
)
{
if
(
typeof
data
===
'object'
)
{
var
_data
=
data
[
'data'
];
_roomTagObj
=
$
(
'.roomTag'
);
//商铺标签,重新获取一次
if
(
data
.
code
==
200
)
{
_foreignYoushiObj
.
val
(
_data
[
'rim_mating'
]);
//对外项目优势
_suoshudiduanObj
.
val
(
_data
[
'section'
]);
//所属地段
_fujinrenliuObj
.
val
(
_data
[
'crowd'
]);
//附近人流
_qitabuchongObj
.
val
(
_data
[
'other'
]);
//其他补充
_objThis
.
upload_id
=
_data
[
'upload_id'
];
if
(
_data
[
'shop_type'
]
!==
undefined
)
{
//.change()之后,自动执行相关显示隐藏操作
_shangpuTypeObj
.
val
(
_data
[
'shop_type'
]).
change
().
attr
({
'disabled'
:
'disabled'
,
'title'
:
'商铺类型暂不支持修改'
});
}
_showCdObj
.
val
(
_data
[
'is_show'
]).
parent
().
show
();
_exclusiveTypeObj
.
val
(
_data
[
'is_exclusive_type'
]).
change
();
if
(
_data
[
'shop_type'
]
==
'0'
)
{
//如果是商场
_roomArea2Obj
.
val
(
_data
[
'shop_area_end'
]);
//商铺面积范围上限值
_projectNameObj
.
val
(
_data
[
'project_name'
]);
//项目(大厦)名称
};
if
(
_data
[
'shop_type'
]
==
'1'
){
//如果是街铺,且对商户公开
if
(
_data
[
'external_slotting_fee'
]
==
'-1'
){
_foreignZhuanrangFaceObj
.
attr
(
'checked'
,
'checked'
);
_foreignZhuanrangPriceObj
.
val
(
''
).
attr
(
'disabled'
,
'disabled'
);
}
else
{
_foreignZhuanrangPriceObj
.
val
(
_data
[
'external_slotting_fee'
]);
};
};
if
(
_data
[
'is_exclusive_type'
]
==
'1'
)
{
//如果是独家
_exclusiveDate1Obj
.
val
(
_data
[
'agent_start_time'
].
split
(
' '
)[
0
]);
_exclusiveDate2Obj
.
val
(
_data
[
'agent_end_time'
].
split
(
' '
)[
0
]);
//独家方
for
(
var
i
in
_data
[
'exclusive_name'
])
{
_exclusiveTelObj
.
val
(
_data
[
'exclusive_name'
][
i
]).
attr
(
'data-id'
,
_data
[
'exclusive_name'
][
i
].
split
(
'-'
)[
0
]);
};
//独家合同
var
exclusive_img_str
=
''
;
for
(
var
i
in
_data
[
'exclusive_img'
])
{
exclusive_img_str
+=
'<li data-imgid="{id}"><img title="点击查看大图" src="{0}" /><a href="javascript:;" class="delet-pic-btn">删除</a></li>'
.
stringFormatObj
({
'0'
:
_urlCut
+
_data
[
'exclusive_img'
][
i
][
'img_name'
],
'id'
:
_data
[
'exclusive_img'
][
i
][
'id'
]
});
};
_imgUploadDujia
.
html
(
exclusive_img_str
);
};
//盘方
var
_panfangNum
=
0
;
for
(
var
i
in
_data
[
'dish_name'
])
{
if
(
_panfangNum
==
0
)
{
console
.
log
(
_data
[
'dish_name'
][
i
])
$
(
'#pf_tel_jia'
).
prev
().
find
(
'input'
).
val
(
_data
[
'dish_name'
][
i
]).
attr
(
'data-id'
,
_data
[
'dish_name'
][
i
].
split
(
'-'
)[
0
]);
}
else
{
$
(
'#pf_tel_jia'
).
before
(
'<div class="form-group phone-list-container"><input type="tel" class="form-control phone_jia" placeholder="请输入" value="{0}" data-id="{1}"><ul></ul><img src="/resource/image/search_gb.png" class="input-cancel-pic panfang-del-id"></div>'
.
stringFormatObj
({
'0'
:
_data
[
'dish_name'
][
i
],
'1'
:
_data
[
'dish_name'
][
i
].
split
(
'-'
)[
0
]
}));
//$('#panfang_data').val(_data['dish_name'][i]).attr('data-id', _data['dish_name'][i].split('-')[0]);
};
_panfangNum
++
;
};
//案场权限人
var
_acqxNum
=
0
;
for
(
var
i
in
_data
[
'agents_name'
])
{
if
(
_acqxNum
==
0
)
{
$
(
'#acqx_tel_jia'
).
prev
().
find
(
'input'
).
val
(
_data
[
'agents_name'
][
i
]).
attr
(
'data-id'
,
_data
[
'agents_name'
][
i
].
split
(
'-'
)[
0
]);
}
else
{
$
(
'#acqx_tel_jia'
).
before
(
'<div class="form-group phone-list-container"><input type="tel" class="form-control phone_jia" placeholder="请输入" value="{0}" data-id="{1}"><ul></ul><img src="/resource/image/search_gb.png" class="input-cancel-pic shangchang-del-id"></div>'
.
stringFormatObj
({
'0'
:
_data
[
'agents_name'
][
i
],
'1'
:
_data
[
'agents_name'
][
i
].
split
(
'-'
)[
0
]
}));
};
_acqxNum
++
;
};
$
.
each
(
_yetaiObj
,
function
(
i
,
item
)
{
~
_data
[
'industry_type'
].
indexOf
(
item
.
value
)
&&
(
item
.
checked
=
'checked'
);
});
_data
[
'shop_sign'
]
&&
$
.
each
(
_roomTagObj
,
function
(
i
,
item
)
{
~
_data
[
'shop_sign'
].
indexOf
(
item
.
value
)
&&
(
item
.
checked
=
'checked'
);
});
//房东手机号
console
.
log
()
_data
[
'landlord_phone_array'
]
&&
$
.
each
(
_data
[
'landlord_phone_array'
],
function
(
i
,
item
)
{
if
(
i
===
0
)
{
$
(
'#landlordPhone'
).
val
(
item
.
phone
).
prev
().
val
(
item
.
name
);
$
(
'#landlordPhone'
).
attr
(
'data-id'
,
item
.
id
);
//加属性 id
}
else
{
$
(
'#landlord_tel_jia'
).
prev
().
append
(
_tpl_landlord_phone1
.
stringFormatObj
({
'name'
:
item
.
name
,
'phone'
:
item
.
phone
,
'id'
:
item
.
id
}));
};
});
$
.
ajax
({
type
:
'GET'
,
url
:
'getBusinessAll'
,
data
:
{
"disc"
:
_data
[
'disc'
]},
timeout
:
30000
,
// traditional: true,
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
typeof
data
===
'object'
)
{
if
(
data
.
code
==
200
)
{
var
tag
=
""
;
$
.
each
(
data
.
data
,
function
(
i
,
target
){
if
(
target
.
id
==
_data
[
'business_district_id'
]){
tag
+=
'<option value="'
+
target
.
id
+
'" selected>'
+
target
.
name
+
'</option>'
}
else
{
tag
+=
'<option value="'
+
target
.
id
+
'">'
+
target
.
name
+
'</option>'
}
});
$
(
'#business_rong'
).
append
(
tag
);
user
.
initShopRong
=
false
;
}
else
{
alert
(
data
[
'msg'
]);
};
}
else
{
alert
(
'数据错误'
);
};
},
error
:
function
()
{
alert
(
'error'
);
},
complete
:
function
(
xhr
,
textStatus
)
{
_loadMainItem
.
hide
();
if
(
textStatus
===
'timeout'
)
{
alert
(
'请求超时'
);
};
}
});
user
.
del_value_anchang
=
''
;
user
.
del_value_panfang
=
''
;
_landlordPhoneObj
.
val
(
_data
[
'landlord_phone'
]);
//房东手机号
_internalNameObj
.
val
(
_data
[
'internal_title'
]);
//对内商铺名称
var
_fit_industry_type
=
_data
[
'fit_industry_type'
].
split
(
','
);
_suitableYetaiInputObj1
.
val
(
_fit_industry_type
[
0
]);
//最适合业态
_suitableYetaiInputObj2
.
val
(
_fit_industry_type
[
1
]);
//最适合业态
_suitableYetaiInputObj3
.
val
(
_fit_industry_type
[
2
]);
//最适合业态
_zujinTypeObj
.
val
(
_data
[
'rent_type'
]);
//租金模式
_zujinTypeObj
.
change
();
//触发change事件
_moonPriceObj
.
val
(
_data
[
'rent_price'
]);
//月租均价
_wuyePriceObj
.
val
(
_data
[
'management_fee'
]);
//物业管理费
_jinchangPriceObj
.
val
(
_data
[
'slotting_fee'
]);
//进场费(对内转让费)
_roomShengyuNumObj
.
val
(
_data
[
'residue_num'
]);
//剩余铺数
_roomAllNumObj
.
val
(
_data
[
'total'
]);
//总铺数
_roomArea1Obj
.
val
(
_data
[
'shop_area_start'
]);
//商铺面积起始值
_businessAreaObj
.
val
(
_data
[
'market_area'
]);
//商业面积
_provinceInternalObj
.
val
(
_data
[
'province'
]);
//对内省
_cityInternalObj
.
val
(
_data
[
'city'
]);
//对内市
_discInternalObj
.
val
(
_data
[
'disc'
]);
//对内区
_addressInternalObj
.
val
(
_data
[
'internal_address'
]);
//对内详细地址
_longitudeObj
.
val
(
_data
[
'longitude'
]),
//经度
_latitudeObj
.
val
(
_data
[
'latitude'
]),
//纬度
_trafficObj
.
val
(
_data
[
'traffic'
]);
//交通
// _hasMovedObj.val(_data['enter_num']); //已入住
_yingyeTimeObj
.
val
(
_data
[
'do_business_date'
]);
//营业时间
_data
[
'opening_date'
]
&&
_kaipanTimeObj
.
val
(
_data
[
'opening_date'
].
split
(
' '
)[
0
]);
//开盘时间
_data
[
'start_business_date'
]
&&
_kaiyeTimeObj
.
val
(
_data
[
'start_business_date'
].
split
(
' '
)[
0
]);
//开业时间
_hasGasObj
.
val
(
_data
[
'is_has_gas'
]);
//是否有燃气
_yongjinRuleObj
.
val
(
_data
[
'fee_rule'
]);
//佣金规则
_guizeFuObj
.
val
(
_data
[
'payment_month'
]);
//签约规则,付
_guizeYaObj
.
val
(
_data
[
'deposit_month'
]);
//签约规则,押
_qianyueNianxianObj
.
val
(
_data
[
'age_limit'
].
split
(
'-'
)[
0
]);
//签约年限上限
_qianyueNianxian2Obj
.
val
(
_data
[
'age_limit'
].
split
(
'-'
)[
1
]);
//签约年限下限
_weilouLinkObj
.
val
(
_data
[
'tiny_brochure_url'
]);
//微楼书
_miankuanObj
.
val
(
_data
[
'area_width'
]);
//面宽
_loucengfloorObj
.
val
(
_data
[
'floor'
]);
//楼层
_jinshenObj
.
val
(
_data
[
'depth'
]);
//进深
_dianliangObj
.
val
(
_data
[
'electric_quantity'
]);
//电量
_dianyaObj
.
val
((
_data
[
'voltage'
]
==
220
||
_data
[
'voltage'
]
==
380
)?
_data
[
'voltage'
]:
''
);
//电压
_yanguandaoObj
.
val
(
_data
[
'exhaust_fume'
]);
//是否有烟管道
_shangshuiObj
.
val
(
_data
[
'running_water'
]);
//是否有上水
_xiashuiObj
.
val
(
_data
[
'downriver'
]);
//是否有下水
_zuhangxiuObj
.
val
(
_data
[
'decoration'
]);
//交付装修状态
_idRunRoundObj
.
val
(
_data
[
'business_scope'
]);
//目前证照经营范围
_laiyuanObj
.
val
(
_data
[
'source'
]);
//来源
_isshowshopDetailObj
.
val
(
_data
[
'is_show_image'
]);
// 是否对客户展示对内详情图
//大讲堂调用共用方法赋值与取值
setCKeditorValue
(
'da_jiang_tang'
,
_data
[
'auditorium'
]);
//大讲堂
//列表页封面图
/*if(_data['cover']){
_imgUploadLiebiao.html('<li><img title="点击查看大图" src="{0}" /><a href="javascript:;" class="delet-pic-btn">删除</a></li>'.stringFormatObj({
'0': _urlCut + _data['cover']
}));
};*/
//详情页轮播图
for
(
var
i
in
_data
[
'slide_show'
])
{
_imgUploadLunbo
.
append
(
'<li data-imgid="{id}"><img title="点击查看大图" src="{0}" /><a href="javascript:;" class="delet-pic-btn">删除</a></li>'
.
stringFormatObj
({
'0'
:
_urlCut
+
_data
[
'slide_show'
][
i
][
'img_name'
],
'id'
:
_data
[
'slide_show'
][
i
][
'id'
]
}));
};
//楼层平面图
for
(
var
i
in
_data
[
'plan'
])
{
_imgUploadLouceng
.
append
(
'<li data-imgid="{id}"><img title="点击查看大图" src="{0}" /><a href="javascript:;" class="delet-pic-btn">删除</a></li>'
.
stringFormatObj
({
'0'
:
_urlCut
+
_data
[
'plan'
][
i
][
'img_name'
],
'id'
:
_data
[
'plan'
][
i
][
'id'
]
}));
};
//附件
_data
[
'file_path'
]
&&
_pdfUploadFujian
.
html
(
'<li class="pdf-pre-li"><a class="pdf-pre-a" href="{0}" target="_blank" title="点击查看">{1}</a><a href="javascript:;" class="delet-pic-btn">删除</a></li>'
.
stringFormatObj
({
'0'
:
_urlCut
+
_data
[
'file_path'
],
'1'
:
dealFileName
(
decodeURI
(
_data
[
'file_path'
].
slice
(
_data
[
'file_path'
].
lastIndexOf
(
'/'
)
+
1
)))
}));
}
else
{
alert
(
data
[
'msg'
]);
};
}
else
{
alert
(
'数据错误'
);
};
},
error
:
function
()
{
alert
(
'error'
);
},
complete
:
function
(
xhr
,
textStatus
)
{
_loadMainItem
.
hide
();
if
(
textStatus
===
'timeout'
)
{
alert
(
'请求超时'
);
};
}
});
}
else
{
//fn();
};
});
$
(
'.area-choose-btn-modal'
).
click
(
function
(){
user
.
initShopRong
=
true
;
});
$
(
'.bs-example-modal-lg'
).
on
(
'hidden.bs.modal'
,
function
(){
if
(
user
.
initShopRong
){
if
(
$
(
'#disc_internal'
).
val
()
){
$
.
ajax
({
type
:
'GET'
,
url
:
'getBusinessAll'
,
data
:
{
"disc"
:
$
(
'#disc_internal'
).
val
()},
timeout
:
30000
,
// traditional: true,
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
typeof
data
===
'object'
)
{
if
(
data
.
code
==
200
)
{
$
(
'#business_rong'
).
html
(
''
);
//置空 商圈列表 重新渲染
var
tag
=
""
;
$
.
each
(
data
.
data
,
function
(
i
,
target
){
tag
+=
'<option value="'
+
target
.
id
+
'">'
+
target
.
name
+
'</option>'
});
$
(
'#business_rong'
).
append
(
tag
);
user
.
initShopRong
=
false
;
}
else
{
alert
(
data
[
'msg'
]);
};
}
else
{
alert
(
'数据错误'
);
};
},
error
:
function
()
{
alert
(
'error'
);
},
complete
:
function
(
xhr
,
textStatus
)
{
_loadMainItem
.
hide
();
if
(
textStatus
===
'timeout'
)
{
alert
(
'请求超时'
);
};
}
});
}
}
else
{
user
.
initShopRong
=
false
;
}
});
//图片上传,附件上传处理事件
$
(
".upload-image-btn"
).
change
(
function
()
{
var
_this
=
$
(
this
),
_spFile
=
_this
.
data
(
'spfile'
),
_limitTop
=
_this
.
data
(
'limittop'
),
_fileNum
=
_this
.
parent
().
next
().
find
(
'.delet-pic-btn'
).
length
;
//根据删除按钮的个数,确定文件的个数
if
(
_limitTop
&&
(
_fileNum
<
_limitTop
))
{
//区分图片 轮播图 平面图 pdf 独家合同
var
formData
=
new
FormData
();
formData
.
append
(
'type'
,
'house_img'
);
formData
.
append
(
'image'
,
_this
[
0
].
files
[
0
]);
$
.
ajax
({
type
:
'post'
,
url
:
ServerHostImageLiu
+
'/index/uploadImg'
,
data
:
formData
,
dataType
:
'json'
,
contentType
:
false
,
cache
:
false
,
processData
:
false
,
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
if
(
_data
.
code
==
200
)
{
if
(
_spFile
==
'pdf'
){
_this
.
parent
().
next
().
prepend
(
'<li class="pdf-pre-li"><a class="pdf-pre-a" href="{0}" target="_blank" title="点击查看">{1}</a><a href="javascript:;" class="delet-pic-btn">删除</a></li>'
.
stringFormatObj
({
'0'
:
ServerHostImageLiu
+
'/resource/lib/Attachments/images/'
+
_data
.
data
.
internet_img_name
,
'1'
:
_data
.
data
.
imgformer_name
}));
}
else
{
_this
.
parent
().
next
().
prepend
(
'<li><img title="点击查看大图" src="{0}" /><a href="javascript:;" class="delet-pic-btn">删除</a></li>'
.
stringFormatObj
({
'0'
:
ServerHostImageLiu
+
'/resource/lib/Attachments/images/'
+
_data
.
data
.
internet_img_name
}));
}
}
else
{
alert
(
_data
.
msg
);
};
},
error
:
function
()
{
alert
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
)
{
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
alert
(
'请求超时,请重试'
);
};
}
});
}
else
{
alert
(
'上传上限为 '
+
_limitTop
);
return
false
;
};
});
//图片上传删除键事件
_doc
.
on
(
'click'
,
'.delet-pic-btn'
,
function
(
e
)
{
var
_this
=
$
(
this
);
e
.
preventDefault
();
e
.
stopPropagation
();
if
(
confirm
(
'确定删除该文件吗?'
)){
var
_imgId
=
_this
.
parent
().
attr
(
'data-imgid'
);
if
(
_imgId
){
checkLogin
();
$
.
ajax
({
type
:
'POST'
,
url
:
'/index/delHouseFile'
,
data
:
{
'id'
:
_imgId
,
'house_id'
:
_id
},
timeout
:
30000
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
if
(
typeof
_data
===
'object'
)
{
if
(
_data
[
'code'
]
==
'200'
)
{
_this
.
parent
().
remove
();
}
else
{
alert
(
_data
[
'msg'
]);
}
}
else
{
alert
(
'数据错误'
);
};
},
error
:
function
()
{
alert
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
){
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
alert
(
'请求超时,请重试'
);
};
}
});
}
else
{
_this
.
parent
().
remove
();
}
};
});
//图片预览点击放大事件
_doc
.
on
(
'click'
,
'.img-pre-ul>li>img'
,
function
(
e
)
{
_imgMaskObj
.
show
().
find
(
'img'
).
attr
(
'src'
,
this
.
src
);
});
_imgMaskObj
.
click
(
function
(
e
)
{
this
.
style
.
display
=
'none'
;
});
/************************************************百度地址定位相关*************************************************************/
var
ulHtml
=
$
(
'#main_ul>ul'
),
loadItem
=
$
(
"#loading_pic"
),
noMoreItem
=
$
(
"#no_more"
),
_inputObj
=
$
(
'#search_input'
),
valueCurrent
=
''
;
//初始化,百度地图相关对象
var
LocalSearch
=
new
BMap
.
LocalSearch
(),
myGeo
=
new
BMap
.
Geocoder
();
$
(
'#position_btn'
).
click
(
function
()
{
});
//搜索地址的回调
LocalSearch
.
setSearchCompleteCallback
(
function
(
data
)
{
if
(
LocalSearch
.
getStatus
()
==
BMAP_STATUS_SUCCESS
)
{
console
.
log
(
data
);
var
_html
=
""
;
for
(
var
i
=
0
;
i
<
data
.
getCurrentNumPois
();
i
++
)
{
_html
+=
'<li data-city="{2}" data-lat="{3}" data-lng="{4}" data-dismiss="modal"><p>{0}</p><p>{1}</p></li>'
.
stringFormatObj
({
'0'
:
data
.
getPoi
(
i
)[
"title"
],
'1'
:
data
.
getPoi
(
i
)[
"address"
],
'2'
:
data
.
getPoi
(
i
)[
"city"
],
'3'
:
data
.
getPoi
(
i
)[
"point"
][
"lat"
],
'4'
:
data
.
getPoi
(
i
)[
"point"
][
"lng"
]
});
};
ulHtml
.
html
(
_html
);
loadItem
.
hide
();
noMoreItem
.
show
();
};
});
_inputObj
.
on
(
'input'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
valueCurrent
=
$
(
this
).
val
();
if
(
valueCurrent
!=
''
)
{
addressResetLoad
();
addressLoadMain
(
valueCurrent
);
}
else
{
ulHtml
.
html
(
''
);
loadItem
.
hide
();
noMoreItem
.
show
();
return
false
;
}
});
//输入框的取消图标点击事件
$
(
'.cancel-pic'
).
click
(
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
_inputObj
.
val
(
''
).
focus
();
addressResetLoad
();
});
_doc
.
on
(
'click'
,
'#main_ul>ul>li'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
),
_city
=
_this
.
data
(
'city'
),
_lng
=
Number
(
_this
.
data
(
'lng'
)),
//经度
_lat
=
Number
(
_this
.
data
(
'lat'
));
//纬度
getDistrict
(
_lng
,
_lat
,
function
(
data
)
{
console
.
log
(
data
);
if
(
data
[
'city'
])
{
_provinceInternalObj
.
val
(
data
[
'province'
]);
_cityInternalObj
.
val
(
data
[
'city'
]);
_discInternalObj
.
val
(
data
[
'district'
]);
var
_htmlOri
=
_this
.
find
(
'p:nth-of-type(2)'
).
html
(),
_htmlDeal
=
''
,
_index1
=
_htmlOri
.
indexOf
(
'市'
),
_index2
=
_htmlOri
.
indexOf
(
'区'
);
if
((
_index1
>
0
)
&&
(
_index2
>
2
)
&&
(
_index2
>
_index1
))
{
_htmlDeal
=
_htmlOri
.
slice
(
_index2
+
1
);
}
else
{
_htmlDeal
=
_htmlOri
;
}
_addressInternalObj
.
val
(
_htmlDeal
);
_longitudeObj
.
val
(
_lng
);
_latitudeObj
.
val
(
_lat
);
searchRepeatShop
();
//调用搜索有无重盘的接口
// $('#position_box').hide();
}
else
{
alert
(
'请重新选择地址'
);
return
false
;
}
});
//根据经纬度获取城市区域名
});
function
addressResetLoad
()
{
ulHtml
.
html
(
''
);
loadItem
.
hide
();
noMoreItem
.
show
();
};
function
addressLoadMain
(
keyword
)
{
loadItem
.
show
();
noMoreItem
.
hide
();
LocalSearch
.
setLocation
(
'上海市'
);
LocalSearch
.
search
(
keyword
);
};
function
getDistrict
(
str1
,
str2
,
fn
)
{
myGeo
.
getLocation
(
new
BMap
.
Point
(
str1
,
str2
),
function
(
result
)
{
if
(
result
)
{
console
.
log
(
result
);
fn
(
result
[
'addressComponents'
]);
}
});
};
/************************************************百度地址定位相关****结束*************************************************************/
/***************************************************省市区选择处理结束************************************************************/
//对内地址输入后,比对有无重复商铺
var
_addressTimer
=
null
;
_addressInternalObj
.
on
(
'input'
,
function
(
e
){
var
_$this
=
$
(
this
);
var
_valCity
=
$
.
trim
(
_cityInternalObj
.
val
());
//市
if
(
!
_valCity
){
alert
(
'需要先地址定位'
);
_$this
.
val
(
''
);
return
false
;
};
var
_val
=
$
.
trim
(
_$this
.
val
());
if
(
_val
.
length
>
3
){
_addressTimer
&&
clearTimeout
(
_addressTimer
);
// 清除未执行的代码,重置回初始化状态
_addressTimer
=
setTimeout
(
searchRepeatShop
,
200
);
}
else
{
_repeatShopList
.
parent
().
hide
();
}
});
//点击确认无重盘,可关闭
_repeatShopList
.
parent
().
find
(
'button'
).
click
(
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
var
_$this
=
$
(
this
);
_repeatShopList
.
parent
().
hide
();
});
//搜索有无重铺的接口调用
var
_ajaxObjSearchRepeatShop
=
null
;
//所调用的ajax对象
function
searchRepeatShop
()
{
var
_valAddress
=
$
.
trim
(
_addressInternalObj
.
val
());
//输入的地址
if
(
_valAddress
.
length
<
4
){
_repeatShopList
.
parent
().
hide
();
return
false
;
};
var
_valCity
=
$
.
trim
(
_cityInternalObj
.
val
());
//市
if
(
!
_valCity
){
alert
(
'需要先地址定位'
);
return
false
;
};
_ajaxObjSearchRepeatShop
&&
_ajaxObjSearchRepeatShop
.
abort
();
_ajaxObjSearchRepeatShop
=
$
.
ajax
({
type
:
'GET'
,
url
:
'/broker/getHouseAddress'
,
data
:
{
'address'
:
_valAddress
,
'city'
:
_valCity
,
'AuthToken'
:
user_info_obj
.
AuthToken
},
timeout
:
30000
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
success
:
function
(
data
)
{
if
(
typeof
data
===
'object'
)
{
if
(
data
.
code
==
200
)
{
_repeatShopList
.
parent
().
show
();
//区域显示出来
if
(
data
.
data
&&
data
.
data
.
length
&&
data
.
data
.
length
>
0
){
var
_htmlTemp
=
''
;
var
_arrTemp
=
data
.
data
.
length
<
6
?
data
.
data
:
data
.
data
.
slice
(
0
,
5
);
$
.
each
(
_arrTemp
,
function
(
i
,
v
)
{
_htmlTemp
+=
'<li><span class="ellipsis">{0}</span><span>ID:{1}</span></li>'
.
stringFormatObj
({
'0'
:
v
.
address
,
'1'
:
v
.
id
});
});
_repeatShopList
.
html
(
_htmlTemp
);
}
else
{
_repeatShopList
.
html
(
'<li>暂无相似商铺</li>'
).
show
();
}
}
else
{
alert
(
data
[
'msg'
]);
};
}
else
{
alert
(
'数据错误'
);
};
},
error
:
function
()
{
//alert('error');
},
complete
:
function
(
xhr
,
textStatus
)
{
if
(
textStatus
===
'timeout'
)
{
alert
(
'请求超时'
);
};
}
});
}
//输入框联系人模糊搜索相关事件添加
$
(
'.input-add-tel'
).
click
(
function
()
{
//
//
var
_this
=
$
(
this
);
var
_maxLen
=
5
;
if
(
_this
.
parent
().
find
(
'.phone_jia'
).
length
<
_maxLen
)
{
var
type_class
=
''
;
console
.
log
(
$
(
this
).
parent
(
'li'
).
find
(
'div.phone-list-container'
).
hasClass
())
if
(
$
(
this
).
parent
(
'li'
).
find
(
'div.phone-list-container'
).
hasClass
(
'panfang'
)
){
type_class
=
'panfang-del-id'
}
else
{
type_class
=
'shangchang-del-id'
;
}
_this
.
before
(
'<div class="form-group phone-list-container{0}"><input type="tel" class="form-control phone_jia" placeholder="请输入" {2}>{1}<img src="/resource/image/search_gb.png" class="input-cancel-pic {3}" /></div>'
.
stringFormatObj
({
'0'
:
''
,
'1'
:
'<ul></ul>'
,
'2'
:
''
,
'3'
:
type_class
}));
}
else
{
alert
(
'最多添加'
+
_maxLen
+
'个'
);
return
false
;
};
});
//房东手机号加号点击事件
_doc
.
on
(
'click'
,
'#landlord_tel_jia'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
var
_maxLen
=
3
;
if
(
_this
.
prev
().
find
(
'.landlord-phone-input'
).
length
<
_maxLen
)
{
_this
.
prev
().
append
(
_tpl_landlord_phone1
.
stringFormatObj
({
'name'
:
''
,
'phone'
:
''
,
'id'
:
''
}));
}
else
{
alert
(
'最多添加'
+
_maxLen
+
'个'
);
return
false
;
}
});
//号码搜索(含房东手机号部分),点击关闭,删除父节点
_doc
.
on
(
'click'
,
'.input-cancel-pic'
,
function
()
{
user
.
del_value
+=
$
(
this
).
parent
().
find
(
'input'
).
attr
(
"data-id"
)
+
','
;
$
(
this
).
parent
().
remove
();
//案场权限人删除的id
if
(
$
(
this
).
hasClass
(
"panfang-del-id"
)){
user
.
del_value_panfang
+=
$
(
this
).
parent
().
find
(
'input'
).
attr
(
"data-id"
)
+
','
;
}
//盘方删除的id
if
(
$
(
this
).
hasClass
(
"shangchang-del-id"
)){
user
.
del_value_anchang
+=
$
(
this
).
parent
().
find
(
'input'
).
attr
(
"data-id"
)
+
','
;
}
});
//动态搜索出来的电话列表的,点击事件
_doc
.
on
(
'click'
,
'.phone-list-container>ul>li'
,
function
()
{
var
_this
=
$
(
this
);
_this
.
parent
().
prev
().
val
(
_this
.
html
()).
attr
(
'data-id'
,
_this
.
attr
(
'data-id'
));
_this
.
parent
().
html
(
''
).
hide
();
});
//动态搜索电话列表,请求事件
var
_ajaxObjTel
=
null
;
_doc
.
on
(
'input'
,
'.phone_jia'
,
function
()
{
var
_this
=
$
(
this
),
_thisVal
=
$
.
trim
(
_this
.
val
());
_this
.
removeAttr
(
'data-id'
);
//移除之前携带的信息
if
(
_thisVal
!=
''
)
{
_ajaxObjTel
&&
_ajaxObjTel
.
abort
();
_ajaxObjTel
=
$
.
ajax
({
type
:
'GET'
,
url
:
'/index/getBroker_new'
,
data
:
{
'phone'
:
$
.
trim
(
_this
.
val
()),
"site_id"
:
user_info_obj
.
site_id
},
timeout
:
30000
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
success
:
function
(
data
)
{
if
(
typeof
data
===
'object'
)
{
if
(
data
.
code
==
200
)
{
if
(
data
[
'data'
].
length
>
0
)
{
var
_htmlTemp
=
''
;
$
.
each
(
data
[
'data'
],
function
(
i
,
item
)
{
_htmlTemp
+=
'<li data-id="{3}">{2}{0}-{1}<li>'
.
stringFormatObj
({
'0'
:
item
[
'name'
],
'1'
:
item
[
'phone'
],
'2'
:
_this
.
parent
().
nextAll
(
'.input-add-tel'
).
data
(
'hideid'
)
?
''
:
(
item
[
'id'
]
+
'-'
),
'3'
:
item
[
'id'
]
});
});
_this
.
next
().
show
().
html
(
_htmlTemp
);
}
else
{
_this
.
next
().
html
(
''
);
};
}
else
{
alert
(
data
[
'msg'
]);
};
}
else
{
alert
(
'数据错误'
);
};
},
error
:
function
()
{
//alert('error');
},
complete
:
function
(
xhr
,
textStatus
)
{
if
(
textStatus
===
'timeout'
)
{
alert
(
'请求超时'
);
};
}
});
}
else
{
_this
.
next
().
hide
();
}
});
/***************************************************电话号码输入相关交互处理***************************************************/
/*********************************************是否独家************************************************************/
//是否独家选择变化事件
_exclusiveTypeObj
.
change
(
function
()
{
if
(
$
(
this
).
val
()
==
'1'
)
{
$
(
'.li_dujia_area'
).
css
(
'display'
,
'block'
);
}
else
{
$
(
'.li_dujia_area'
).
hide
();
}
});
//商铺类型选择变化事件
_shangpuTypeObj
.
change
(
function
()
{
if
(
$
(
this
).
val
()
==
'1'
)
{
//街铺
// $('.has-housed').html('当前经营');
_jinchangPriceObj
.
attr
(
'data-alert'
,
'请填写对内转让费!'
).
parent
().
prev
().
html
(
'对内转让费'
);
_roomArea1Obj
.
attr
(
'data-alert'
,
'请填写建筑面积!'
).
parent
().
prev
().
html
(
'建筑面积'
);
_businessAreaObj
.
attr
(
'data-alert'
,
'请填写使用面积!'
).
parent
().
prev
().
html
(
'使用面积'
);
$
(
'.shangchang-show-part'
).
hide
();
$
.
trim
(
_roomAllNumObj
.
val
())
==
''
&&
_roomAllNumObj
.
val
(
1
);
$
.
trim
(
_roomShengyuNumObj
.
val
())
==
''
&&
_roomShengyuNumObj
.
val
(
1
);
_foreignZhuanrangPriceObj
.
closest
(
'.form-group'
).
css
(
'display'
,
'block'
);
}
else
{
//商场
// $('.has-housed').html('已入驻');
_jinchangPriceObj
.
attr
(
'data-alert'
,
'请填写进场费!'
).
parent
().
prev
().
html
(
'进场费'
);
_roomArea1Obj
.
attr
(
'data-alert'
,
'请填写商铺面积!'
).
parent
().
prev
().
html
(
'商铺面积'
);
_businessAreaObj
.
attr
(
'data-alert'
,
'请填写项目总面积!'
).
parent
().
prev
().
html
(
'项目总面积'
);
$
(
'.shangchang-show-part'
).
show
();
_foreignZhuanrangPriceObj
.
closest
(
'.form-group'
).
hide
();
};
});
//对外转让费的选择事件
_foreignZhuanrangFaceObj
.
change
(
function
(){
var
_this
=
$
(
this
);
if
(
_this
.
is
(
':checked'
)){
_foreignZhuanrangPriceObj
.
val
(
''
).
attr
(
'disabled'
,
'disabled'
);
}
else
{
_foreignZhuanrangPriceObj
.
removeAttr
(
'disabled'
);
}
});
//月租均价文件变化事件
_zujinTypeObj
.
change
(
function
()
{
var
_this
=
$
(
this
);
if
(
_this
.
val
()
==
'1'
)
{
_moonPriceObj
.
prev
().
hide
();
_moonPriceObj
.
next
().
html
(
'元/月'
);
}
else
if
(
_this
.
val
()
==
'2'
)
{
_moonPriceObj
.
prev
().
show
();
_moonPriceObj
.
next
().
html
(
'%'
);
}
else
if
(
_this
.
val
()
==
'3'
)
{
_moonPriceObj
.
prev
().
hide
();
_moonPriceObj
.
next
().
html
(
'元/天/㎡'
);
}
else
if
(
_this
.
val
()
==
'4'
)
{
_moonPriceObj
.
prev
().
hide
();
_moonPriceObj
.
next
().
html
(
'元/年'
);
}
else
if
(
_this
.
val
()
==
'5'
)
{
_moonPriceObj
.
prev
().
hide
();
_moonPriceObj
.
next
().
html
(
'元/月/㎡'
);
}
else
{
console
.
log
(
'other value租金模式'
);
};
});
//保存按钮点击事件
$
(
'#saveBtn'
).
click
(
function
(
e
)
{
//保存大讲堂
e
.
preventDefault
();
e
.
stopPropagation
();
checkLogin
();
//多个input输入框验证标记
var
_isBreakFlag
=
false
;
//是否给商户公开,是否独家验证是否选择
$
.
each
([
_shangpuTypeObj
,
//商铺类型是否选择
_exclusiveTypeObj
,
//是否独家
],
function
(
i
,
item
)
{
if
(
$
.
trim
(
item
.
val
())
==
''
)
{
alert
(
item
.
data
(
'alert'
));
_isBreakFlag
=
true
;
return
false
;
};
});
if
(
_isBreakFlag
)
{
return
false
;
};
//验证来源是否选择
if
(
$
(
'#laiyuan'
).
val
()
==
-
1
){
alert
(
"请选择来源"
);
return
false
;
}
//验证显示对内详情图是否选择
if
(
$
(
'#isShowShopDetail'
).
val
()
==
-
1
){
alert
(
"请选择是否对客户展示对内详情图"
);
return
false
;
}
//验证盘方是否填写
var
_pfPhoneArr
=
[];
$
.
each
(
$
(
'#li_pf_phone input'
),
function
(
i
,
item
)
{
var
_id
=
item
.
getAttribute
(
'data-id'
);
if
(
_id
!==
undefined
&&
_id
!==
null
)
{
_pfPhoneArr
.
push
(
_id
);
};
});
if
(
_pfPhoneArr
.
length
<
1
)
{
alert
(
'盘方至少需要选择一个!'
);
return
false
;
};
//验证案场权限人是否填写
var
_acqxPhoneArr
=
[];
$
.
each
(
$
(
'#li_acqx_phone input'
),
function
(
i
,
item
)
{
var
_id
=
item
.
getAttribute
(
'data-id'
);
if
(
_id
!==
undefined
&&
_id
!==
null
)
{
_acqxPhoneArr
.
push
(
_id
);
};
});
if
(
_acqxPhoneArr
.
length
<
1
)
{
alert
(
'案场权限人至少需要选择一个!'
);
return
false
;
};
//业态验证
var
_yetaiArr
=
[];
$
.
each
(
$
(
'.yetai'
),
function
(
i
,
item
)
{
item
.
checked
&&
_yetaiArr
.
push
(
item
.
value
);
});
if
(
_yetaiArr
.
length
<
1
)
{
alert
(
'业态至少需要填写一个!'
);
return
false
;
};
//商铺标签验证
var
_roomTagArr
=
[];
$
.
each
(
$
(
'.roomTag'
),
function
(
i
,
item
)
{
item
.
checked
&&
_roomTagArr
.
push
(
item
.
value
);
});
if
(
_roomTagArr
.
length
<
1
)
{
alert
(
'商铺标签至少需要填写一个!'
);
return
false
;
};
//多个input输入框验证
$
.
each
([
_loucengfloorObj
,
//楼层
_miankuanObj
,
//面宽
_jinshenObj
,
//进深
_dianliangObj
,
//电量
_dianyaObj
,
//电压
_hasGasObj
,
//是否有燃气
_yanguandaoObj
,
//是否有烟管道
_shangshuiObj
,
//是否有上水
_xiashuiObj
,
//是否有下水
_zuhangxiuObj
,
//交付装修状态
_idRunRoundObj
//目前证照经营范围
],
function
(
i
,
item
)
{
if
(
$
.
trim
(
item
.
val
())
==
''
)
{
alert
(
item
.
attr
(
'data-alert'
));
_isBreakFlag
=
true
;
return
false
;
};
});
if
(
_isBreakFlag
)
{
return
false
;
};
//房东手机号相关验证
var
_landlordPhoneArr
=
[];
$
.
each
(
$
(
'#li_landlord_phone_input>div>div'
),
function
(
i
,
item
)
{
var
_valTemp1
=
$
.
trim
(
$
(
item
).
find
(
'.landlord-name-input'
).
val
());
var
_valTemp2
=
$
.
trim
(
$
(
item
).
find
(
'.landlord-phone-input'
).
val
());
var
_valTemp3
=
$
.
trim
(
$
(
item
).
find
(
'.landlord-phone-input'
).
attr
(
'data-id'
));
if
((
_valTemp1
!==
''
)
&&
(
_valTemp2
!==
''
))
{
if
(
is_mobile
(
_valTemp2
))
{
_landlordPhoneArr
.
push
({
'name'
:
_valTemp1
,
'phone'
:
_valTemp2
,
'id'
:
_valTemp3
});
}
else
{
alert
(
'填写的第'
+
(
i
+
1
)
+
'个房东信息缺少或填写有误'
);
}
};
});
if
(
_landlordPhoneArr
.
length
<
1
)
{
alert
(
'房东信息至少需要填写一个!'
);
return
false
;
};
//多个input输入框验证
$
.
each
([
_internalNameObj
,
//对内商铺名称
_suitableYetaiInputObj1
,
//最适合业态
_suitableYetaiInputObj2
,
//最适合业态
_suitableYetaiInputObj3
,
//最适合业态
_moonPriceObj
,
//月租均价
_wuyePriceObj
,
//物业管理费
_jinchangPriceObj
,
//进场费
_foreignZhuanrangPriceObj
,
//对外转让费
_roomShengyuNumObj
,
//剩余铺数
_roomAllNumObj
,
//总铺数
_roomArea1Obj
,
//商铺面积起始值
_roomArea2Obj
,
//商铺面积结束值
_projectNameObj
,
//项目(大厦)名称
_businessAreaObj
,
//商业面积
_addressInternalObj
,
//对内地址详细地址
_longitudeObj
,
//经度
_latitudeObj
,
//纬度
_trafficObj
,
//交通
// _hasMovedObj, //已入住
_yingyeTimeObj
,
//营业时间
_yongjinRuleObj
,
//佣金规则
_foreignYoushiObj
,
//周边配套,对外项目优势
_suoshudiduanObj
,
//所属地段
_fujinrenliuObj
,
//附近人流
_qitabuchongObj
,
//其他补充为必填项
_guizeFuObj
,
_guizeYaObj
,
_qianyueNianxianObj
,
_qianyueNianxian2Obj
],
function
(
i
,
item
)
{
if
(
item
===
_foreignZhuanrangPriceObj
){
if
((
_shangpuTypeObj
.
val
()
==
'1'
)){
if
(
_foreignZhuanrangFaceObj
.
is
(
':checked'
)){
}
else
{
if
(
$
.
trim
(
item
.
val
())
==
''
)
{
alert
(
item
.
attr
(
'data-alert'
));
_isBreakFlag
=
true
;
return
false
;
};
}
}
}
else
if
(
item
===
_roomArea2Obj
)
{
if
(
_shangpuTypeObj
.
val
()
==
'0'
)
{
//0为商场
if
(
_roomArea2Obj
.
val
()
==
''
)
{
alert
(
item
.
data
(
'alert'
));
_isBreakFlag
=
true
;
return
false
;
}
else
if
(
Number
(
_roomArea1Obj
.
val
())
>
Number
(
_roomArea2Obj
.
val
()))
{
alert
(
'商铺面积范围下限不能大于上限'
);
_isBreakFlag
=
true
;
return
false
;
};
}
else
{
console
.
log
(
'所选为街铺时,商铺面积上限值不需要验证'
);
}
}
else
if
(
item
===
_projectNameObj
)
{
if
(
_shangpuTypeObj
.
val
()
==
'0'
)
{
//0为商场
if
(
_projectNameObj
.
val
()
==
''
)
{
alert
(
item
.
data
(
'alert'
));
_isBreakFlag
=
true
;
return
false
;
};
}
else
{
console
.
log
(
'所选为街铺时,项目(大厦)名不需要验证'
);
}
}
else
if
(
item
===
_qianyueNianxian2Obj
)
{
if
(
_qianyueNianxian2Obj
.
val
()
==
''
)
{
alert
(
item
.
data
(
'alert'
));
_isBreakFlag
=
true
;
return
false
;
}
else
if
(
Number
(
_qianyueNianxianObj
.
val
())
>
Number
(
_qianyueNianxian2Obj
.
val
()))
{
alert
(
'签约年限范围下限不能大于上限'
);
_isBreakFlag
=
true
;
return
false
;
};
}
else
{
if
(
$
.
trim
(
item
.
val
())
==
''
)
{
alert
(
item
.
attr
(
'data-alert'
));
_isBreakFlag
=
true
;
return
false
;
};
if
(
item
===
_addressInternalObj
)
{
if
(
$
.
trim
(
item
.
val
()).
length
<
4
){
alert
(
'详细地址不能少于4个字'
);
_isBreakFlag
=
true
;
return
false
;
}
};
if
(
item
===
_moonPriceObj
){
if
(
_zujinTypeObj
.
val
()
==
1
&&
$
.
trim
(
item
.
val
())
<
1000
){
alert
(
'月租金模式不能小于1000'
);
_isBreakFlag
=
true
;
return
false
;
}
else
if
(
_zujinTypeObj
.
val
()
==
2
&&
$
.
trim
(
item
.
val
())
>
100
){
alert
(
'营业额扣点不能超过100'
);
_isBreakFlag
=
true
;
return
false
;
}
else
if
(
_zujinTypeObj
.
val
()
==
3
&&
$
.
trim
(
item
.
val
())
>
300
){
alert
(
'每天每平米租金不能超过300'
);
_isBreakFlag
=
true
;
return
false
;
}
else
if
(
_zujinTypeObj
.
val
()
==
4
&&
$
.
trim
(
item
.
val
())
<
1000
){
alert
(
'年租金模式不能小于1000'
);
_isBreakFlag
=
true
;
return
false
;
}
else
{}
};
// if(item === _addressInternalObj){
// var _vv = $.trim(item.val());
// var _index1 = _vv.indexOf('路');
// var _index2 = _vv.indexOf('号');
// if(_index1>0 && _index2>2){
//
// }else{
// alert(item.attr('data-alert'));
// _isBreakFlag = true;
// return false;
// }
// };
}
});
if
(
_isBreakFlag
)
{
return
false
;
};
if
(
$
(
'#business_rong'
).
val
()
==
-
1
){
alert
(
"请选择商圈"
);
return
false
;
}
if
(
_idRunRoundObj
.
val
().
length
>
20
){
alert
(
"目前证照经营范围不得超过20个字符"
);
return
false
;
}
//列表页封面图验证是否上传
/*var _liebiaoPicObj = _imgUploadLiebiao.find('li>img');
if(_liebiaoPicObj.length < 1) {
alert('列表页封面图需要上传');
return false;
};*/
//详情页轮播图验证是否上传
var
_xiangqingPicObj
=
_imgUploadLunbo
.
find
(
'li>img'
);
if
(
_xiangqingPicObj
.
length
<
2
)
{
alert
(
'详情页轮播图至少需要2张'
);
return
false
;
};
var
_loucengPicObj
=
_imgUploadLouceng
.
find
(
'li>img'
);
var
_fujianObj
=
_pdfUploadFujian
.
find
(
'li>a.pdf-pre-a'
);
//附件看的是删除按钮的个数
var
_dujiaPicObj
=
_imgUploadDujia
.
find
(
'li>img'
);
//大讲堂验证, 大讲堂调用共用方法赋值与取值
var
_dajiangtangVal
=
getCKeditorValue
(
'da_jiang_tang'
);
//如果选择了独家,验证独家代理有效期,独家方是否填写,独家合同是否上传
if
(
_exclusiveTypeObj
.
val
()
==
'1'
)
{
if
(
_exclusiveDate1Obj
.
val
()
==
''
||
_exclusiveDate2Obj
.
val
()
==
''
)
{
alert
(
'请填写独家代理有效期!'
);
return
false
;
}
else
if
((
new
Date
(
_exclusiveDate1Obj
.
val
()).
getTime
())
>
(
new
Date
(
_exclusiveDate2Obj
.
val
()).
getTime
()))
{
alert
(
'独家代理有效期开始时间不能大于结束时间!'
);
return
false
;
}
if
(
_exclusiveTelObj
.
attr
(
'data-id'
)
==
undefined
||
_exclusiveTelObj
.
attr
(
'data-id'
)
==
null
)
{
alert
(
'请填写独家方!'
);
return
false
;
};
if
(
_dujiaPicObj
.
length
<
1
)
{
alert
(
'独家合同需要上传'
);
return
false
;
};
};
var
_data
=
{
'shop_type'
:
_shangpuTypeObj
.
val
(),
'is_exclusive_type'
:
_exclusiveTypeObj
.
val
(),
'agent_dish'
:
_pfPhoneArr
.
join
(
','
),
'agent_data'
:
_acqxPhoneArr
.
join
(
','
),
'internal_title'
:
$
.
trim
(
_internalNameObj
.
val
()),
'fit_industry_type'
:
[
$
.
trim
(
_suitableYetaiInputObj1
.
val
()),
$
.
trim
(
_suitableYetaiInputObj2
.
val
()),
$
.
trim
(
_suitableYetaiInputObj3
.
val
())].
join
(
','
),
'rent_type'
:
_zujinTypeObj
.
val
(),
'rent_price'
:
_moonPriceObj
.
val
(),
'management_fee'
:
_wuyePriceObj
.
val
(),
'slotting_fee'
:
_jinchangPriceObj
.
val
(),
'residue_num'
:
_roomShengyuNumObj
.
val
(),
'total'
:
_roomAllNumObj
.
val
(),
'shop_area_start'
:
_roomArea1Obj
.
val
(),
'market_area'
:
_businessAreaObj
.
val
(),
'province'
:
_provinceInternalObj
.
val
(),
'city'
:
_cityInternalObj
.
val
(),
'disc'
:
_discInternalObj
.
val
(),
'internal_address'
:
$
.
trim
(
_addressInternalObj
.
val
()),
'longitude'
:
_longitudeObj
.
val
(),
'latitude'
:
_latitudeObj
.
val
(),
'traffic'
:
$
.
trim
(
_trafficObj
.
val
()),
// 'enter_num': $.trim(_hasMovedObj.val()),
'do_business_date'
:
$
.
trim
(
_yingyeTimeObj
.
val
()),
'opening_date'
:
_kaipanTimeObj
.
val
(),
'start_business_date'
:
_kaiyeTimeObj
.
val
(),
'is_has_gas'
:
_hasGasObj
.
val
(),
'fee_rule'
:
$
.
trim
(
_yongjinRuleObj
.
val
()),
'payment_month'
:
_guizeFuObj
.
val
(),
'deposit_month'
:
_guizeYaObj
.
val
(),
'age_limit'
:
_qianyueNianxianObj
.
val
()
+
'-'
+
_qianyueNianxian2Obj
.
val
(),
'sign_rule'
:
$
.
trim
(
_qianyueRuleObj
.
val
()),
'tiny_brochure_url'
:
$
.
trim
(
_weilouLinkObj
.
val
()),
'auditorium'
:
_dajiangtangVal
,
'industry_type'
:
_yetaiArr
.
join
(
','
),
'label'
:
_yetaiArr
.
join
(
','
),
'shop_sign'
:
_roomTagArr
.
join
(
','
),
'area_width'
:
_miankuanObj
.
val
(),
'floor'
:
_loucengfloorObj
.
val
(),
//楼层
'depth'
:
_jinshenObj
.
val
(),
'electric_quantity'
:
_dianliangObj
.
val
(),
'voltage'
:
_dianyaObj
.
val
(),
'exhaust_fume'
:
_yanguandaoObj
.
val
(),
'running_water'
:
_shangshuiObj
.
val
(),
'downriver'
:
_xiashuiObj
.
val
(),
'decoration'
:
_zuhangxiuObj
.
val
(),
'business_scope'
:
_idRunRoundObj
.
val
(),
'source'
:
_laiyuanObj
.
val
(),
'is_show_image'
:
_isshowshopDetailObj
.
val
(),
//是否显示 对内详情
'del_agent_data'
:
user
.
del_value_anchang
.
substr
(
0
,
user
.
del_value_anchang
.
length
-
1
),
'business_district_id'
:
$
(
'#business_rong'
).
val
(),
'business_name'
:
$
(
'#business_rong'
).
find
(
'option:selected'
).
text
(),
'del_agent_dish'
:
user
.
del_value_panfang
.
substr
(
0
,
user
.
del_value_panfang
.
length
-
1
)
};
if
(
_shangpuTypeObj
.
val
()
==
'0'
)
{
_data
[
'shop_area_end'
]
=
_roomArea2Obj
.
val
();
_data
[
'project_name'
]
=
$
.
trim
(
_projectNameObj
.
val
());
};
//_data['external_item_advantage'] = $.trim(_foreignYoushiObj.val());
_data
[
'rim_mating'
]
=
$
.
trim
(
_foreignYoushiObj
.
val
());
_data
[
'section'
]
=
$
.
trim
(
_suoshudiduanObj
.
val
());
_data
[
'crowd'
]
=
$
.
trim
(
_fujinrenliuObj
.
val
());
_data
[
'other'
]
=
$
.
trim
(
_qitabuchongObj
.
val
());
if
(
_shangpuTypeObj
.
val
()
==
'1'
){
if
(
_foreignZhuanrangFaceObj
.
is
(
':checked'
)){
_data
[
'external_slotting_fee'
]
=
-
1
;
}
else
{
_data
[
'external_slotting_fee'
]
=
$
.
trim
(
_foreignZhuanrangPriceObj
.
val
());
}
};
if
(
_exclusiveTypeObj
.
val
()
==
'1'
)
{
_data
[
'agent_start_time'
]
=
_exclusiveDate1Obj
.
val
();
_data
[
'agent_end_time'
]
=
_exclusiveDate2Obj
.
val
();
_data
[
'exclusive_ids'
]
=
_exclusiveTelObj
.
attr
(
'data-id'
);
$
.
each
(
_dujiaPicObj
,
function
(
i
,
item
)
{
_data
[
'exclusive_img['
+
i
+
']'
]
=
item
.
src
.
replace
(
_urlCut
,
''
);
});
};
_data
[
'landlord_phone'
]
=
_landlordPhoneArr
;
/*$.each(_liebiaoPicObj, function(i, item) {
_data['cover[' + i + ']'] = item.src.replace(_urlCut, '');
});*/
$
.
each
(
_xiangqingPicObj
,
function
(
i
,
item
)
{
_data
[
'slide_show['
+
i
+
']'
]
=
item
.
src
.
replace
(
_urlCut
,
''
);
});
$
.
each
(
_loucengPicObj
,
function
(
i
,
item
)
{
_data
[
'plan['
+
i
+
']'
]
=
item
.
src
.
replace
(
_urlCut
,
''
);
});
if
(
_fujianObj
.
length
===
1
)
{
_data
[
'file_path'
]
=
_fujianObj
[
0
].
href
.
replace
(
_urlCut
,
''
);
//附件取得是herf值
};
//当为编辑时,要传入id
if
(
_id
!=
null
)
{
_data
[
'id'
]
=
_id
;
_data
[
'upload_id'
]
=
_objThis
.
upload_id
;
}
else
{
_data
[
'id'
]
=
''
;
//新增时id传空
}
//当为委托转铺新增时,需要传这两个参数
if
(
_source
)
{
_data
[
'source'
]
=
_source
;
_data
[
'sublet_id'
]
=
_sublet_id
;
};
$
.
ajax
({
type
:
'POST'
,
url
:
'/index/houseEdit'
,
data
:
_data
,
timeout
:
30000
,
// traditional: true,
dataType
:
'json'
,
beforeSend
:
function
()
{
_loadMainItem
.
show
();
},
success
:
function
(
data
)
{
if
(
typeof
data
===
'object'
)
{
if
(
data
.
code
==
200
)
{
alert
(
'添加成功!'
);
location
.
replace
(
'/admin.php/index/getHouseList.html'
);
}
else
{
alert
(
data
[
'msg'
]);
return
;
window
.
location
.
href
=
'/admin.php/index/getHouseList.html'
;
};
}
else
{
alert
(
'数据错误'
);
};
},
error
:
function
()
{
alert
(
'error'
);
},
complete
:
function
(
xhr
,
textStatus
)
{
_loadMainItem
.
hide
();
if
(
textStatus
===
'timeout'
)
{
alert
(
'请求超时'
);
};
}
});
});
}
};
return
user
;
});
\ No newline at end of file
public/resource/js/复制 schoolBusinessNew.js
deleted
100644 → 0
View file @
6d653a59
define
([
'doT'
,
'text!temp/schoolBusiness_template_tpl.html'
,
'ckfinder'
,
'ckfinderStart'
,
'css!style/home.css'
,
"datetimepicker"
,
'pagination'
,
'bootstrapJs'
],
function
(
doT
,
template
)
{
//处理文件名,长度过长时处理
function
dealFileName
(
str
)
{
//如果文件超过30的长度,则用*代替
if
(
str
.
length
>
26
)
{
return
str
.
slice
(
0
,
23
)
+
'***'
+
str
.
slice
(
-
4
);
}
else
{
return
str
;
};
};
var
user
=
{
pageNo
:
1
,
/*第几页*/
pageSize
:
15
,
/*每页显示多少条*/
user_id
:
0
,
urls
:
''
,
agent_id_two
:
''
,
agent_id2
:
0
,
titlePic
:
''
,
init
:
function
()
{
//初始化dot
$
(
"body"
).
append
(
template
);
//判断 是点击编辑按钮跳转的 还是新增文章 跳转的 通过id判断
user
.
event
();
//获取学院标签
user
.
getDistrict
(
function
()
{
$
(
document
).
on
(
'input'
,
'#district_id, #district_id2'
,
function
()
{
var
_this
=
$
(
this
);
var
_id
=
_this
.
val
();
_this
.
next
().
html
(
''
);
//先清空
if
(
_id
&&
_id
!=
'0'
)
{}
else
{};
//77777
});
});
},
event
:
function
()
{
var
_doc
=
$
(
document
);
var
_imgMaskObj
=
$
(
'#img_mask_area'
);
//预览大图的mask
var
_imgUploadLunbo
=
$
(
'#xiangqing_pic_ul'
);
//详情页轮播图ul
$
(
".Bannertu"
).
click
(
function
()
{
BrowseServer
(
'cover_image'
);
});
_doc
.
on
(
'click'
,
'.add-pic'
,
function
()
{
follow
.
getaddPicList
();
});
_doc
.
on
(
'click'
,
'.pdf-pre-a-download'
,
function
()
{
var
file_id
=
$
(
this
).
parent
(
'li'
).
attr
(
'id'
)
-
0
;
var
_url
=
'/index/downloadFile'
;
window
.
open
(
_url
+
'?file_id='
+
file_id
);
});
_doc
.
on
(
'click'
,
'.pdf-pre-a-new'
,
function
()
{
alert
(
'文件未保存 暂不能下载'
)
});
$
(
"#search"
).
click
(
function
()
{
user
.
getList
(
1
);
});
$
(
"#reset"
).
click
(
function
()
{
document
.
getElementById
(
"form_search"
).
reset
();
});
$
(
"#close"
).
click
(
function
()
{
document
.
getElementById
(
"add_user_form"
).
reset
();
$
(
".user-ul"
).
empty
();
});
$
(
".close"
).
click
(
function
()
{
document
.
getElementById
(
"add_user_form"
).
reset
();
$
(
".user-ul"
).
empty
();
});
$
(
document
).
delegate
(
".announcement-del"
,
"click"
,
function
()
{
user
.
announcementdel_id
=
$
(
this
).
attr
(
"data-id"
);
console
.
log
(
user
.
announcementdel_id
);
});
$
(
document
).
delegate
(
".add_alert"
,
"click"
,
function
()
{
//新增客户
document
.
getElementById
(
"add_user_form"
).
reset
();
});
// 新增文章
$
(
document
).
delegate
(
"#add_news"
,
"click"
,
function
()
{
//保存新增文章
user
.
user_id
=
$
(
this
).
attr
(
"data-id"
);
user
.
add_news
();
});
_doc
.
on
(
'click'
,
'.jian_class>ul>li'
,
function
()
{
var
_this
=
$
(
this
);
_this
.
parent
().
prev
().
val
(
_this
.
html
()).
attr
(
'data-id'
,
_this
.
attr
(
'data-id'
));
_this
.
parent
().
html
(
''
).
hide
();
});
//图片上传,附件上传处理事件
$
(
"#upload-image-btn"
).
change
(
function
()
{
var
_this
=
$
(
this
),
_spFile
=
_this
.
data
(
'spfile'
),
_limitTop
=
1
,
//_this.data('limittop'),
_fileNum
=
$
(
'#fujian_ul'
).
find
(
'.delet-pic-btn'
).
length
;
//根据删除按钮的个数,确定文件的个数
if
(
_limitTop
&&
(
_fileNum
<
_limitTop
))
{
// BrowseServer(_this.prev().attr('id'), function(url) {
// console.log(url);
// if(_spFile == 'pdf') {
// if(/(\.pdf|\.doc|\.xls)$/i.test(url)) {
// _this.parent().next().prepend('<li class="pdf-pre-li"><a class="pdf-pre-a" download="{1}" href="javascript:;" title="点击可下载">{1}</a><a href="javascript:;" class="delet-pic-btn">删除</a></li>'.stringFormatObj({
// '0': url,
// '1': dealFileName(decodeURI(url.slice(url.lastIndexOf('/') + 1)))//dealFileName不要忘记
// }));
// } else {
// alert('所选择的格式不是pdf/doc/xls,请重新选择');
// return false;
// }
// } else {
// if(/(\.jpg|\.jpeg|\.png|\.gif|\.bmp)$/i.test(url)) {
// _this.parent().next().prepend('<li><img title="点击查看大图" src="{0}" /><a href="javascript:;" class="delet-pic-btn">删除</a></li>'.stringFormatObj({
// '0': url
// }));
// } else {
// alert('所选择的格式不正确,请重新选择');
// return false;
// }
// };
// });
var
formData
=
new
FormData
();
formData
.
append
(
'type'
,
'house_img'
);
formData
.
append
(
'image'
,
_this
[
0
].
files
[
0
]);
$
.
ajax
({
type
:
'post'
,
url
:
ServerHostImageLiu
+
'/index/uploadImg'
,
data
:
formData
,
dataType
:
'json'
,
contentType
:
false
,
cache
:
false
,
processData
:
false
,
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
if
(
_data
.
code
==
200
)
{
var
_url
=
_data
.
data
.
internet_img_name
;
var
tag
=
''
;
user
.
titlePic
=
_data
.
data
.
img_path
;
var
url
=
"http://images.tonglianjituan.com/resource/lib/Attachments/images/"
+
_url
;
if
(
_spFile
==
'pdf'
)
{
if
(
/
(\.
pdf|
\.
doc|
\.
xls
)
$/i
.
test
(
url
))
{
$
(
'#fujian_ul'
).
append
(
'<li class="pdf-pre-li"><a class="pdf-pre-a" download="{1}" href="javascript:;" title="点击可下载">{1}</a><a href="javascript:;" class="delet-pic-btn">删除</a></li>'
.
stringFormatObj
({
'0'
:
url
,
'1'
:
dealFileName
(
decodeURI
(
url
.
slice
(
url
.
lastIndexOf
(
'/'
)
+
1
)))
//dealFileName不要忘记
}));
}
else
{
alert
(
'所选择的格式不是pdf/doc/xls,请重新选择'
);
return
false
;
}
}
else
{
if
(
/
(\.
jpg|
\.
jpeg|
\.
png|
\.
gif|
\.
bmp
)
$/i
.
test
(
url
))
{
$
(
'#fujian_ul'
).
append
(
'<li><img class="titleImg" title="点击查看大图" src="{0}" data-name="{1}"/><a href="javascript:;" class="delet-pic-btn">删除</a></li>'
.
stringFormatObj
({
'0'
:
url
,
'1'
:
_data
.
data
.
img_path
}));
}
else
{
alert
(
'所选择的格式不正确,请重新选择'
);
return
false
;
}
};
// tag += '<div class="col-xs-3 pictures" id='+_data.data.img_path+'>';
// tag += ' <img src="http://images.tonglianjituan.com/'+_url+'" class="" id="" width="90%">';
// tag += ' <div style="text-align:center" id="'+_data.data.img_path+'"><a href="javascript:;" class="delet-pic-btn">删除</a></div>';
// tag += '</div>';
// $('#fujian_ul').append(tag)
}
else
{
alert
(
_data
.
msg
);
};
},
error
:
function
()
{
alert
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
)
{
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
alert
(
'请求超时,请重试'
);
};
}
});
}
else
{
alert
(
'上传上限为 '
+
_limitTop
);
return
false
;
};
});
//附件上传处理事件
$
(
"#file_input"
).
change
(
function
()
{
var
_this
=
$
(
this
),
_spFile
=
_this
.
data
(
'spfile'
),
_limitTop
=
_this
.
data
(
'limittop'
),
_fileNum
=
_this
.
parent
().
next
().
find
(
'.delet-pic-btn'
).
length
;
//根据删除按钮的个数,确定文件的个数
if
(
_limitTop
&&
(
_fileNum
<
_limitTop
))
{
var
formData
=
new
FormData
();
formData
.
append
(
'type'
,
'business_school_file'
);
formData
.
append
(
'image'
,
_this
[
0
].
files
[
0
]);
// formData.append('name', _this[0].files[0].name);
$
.
ajax
({
type
:
'post'
,
url
:
ServerHostImageLiu
+
'/index/uploadImg'
,
data
:
formData
,
dataType
:
'json'
,
contentType
:
false
,
cache
:
false
,
processData
:
false
,
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
if
(
_data
.
code
==
200
)
{
var
_url
=
_data
.
data
.
internet_img_name
;
_this
.
parent
().
next
().
prepend
(
'<li class="pdf-pre-li"><a data-filename="{3}" class="pdf-pre-a pdf-pre-a-new" href="javascript:;" title="保存之后才可以点击下载">{4}</a><a href="javascript:;" class="delet-pic-btn">删除</a></li>'
.
stringFormatObj
({
'0'
:
_url
,
'1'
:
decodeURI
(
_url
.
slice
(
_url
.
lastIndexOf
(
'/'
)
+
1
)),
'2'
:
dealFileName
(
decodeURI
(
_url
.
slice
(
_url
.
lastIndexOf
(
'/'
)
+
1
))),
//dealFileName不要忘记
'3'
:
_data
.
data
.
img_path
,
'4'
:
_data
.
data
.
imgformer_name
}));
}
else
{
alert
(
_data
.
msg
);
};
},
error
:
function
()
{
alert
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
)
{
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
alert
(
'请求超时,请重试'
);
};
}
});
}
else
{
alert
(
'上传上限为 '
+
_limitTop
);
return
false
;
};
});
//附件上传删除键事件
_doc
.
on
(
'click'
,
'.delet-pic-btn'
,
function
(
e
)
{
var
_this
=
$
(
this
);
e
.
preventDefault
();
e
.
stopPropagation
();
if
(
confirm
(
'确定删除该文件吗?'
))
{
var
_imgId
=
_this
.
parent
().
attr
(
'data-imgid'
);
var
file_id
=
$
(
this
).
parent
(
'li'
).
attr
(
'id'
)
-
0
;
_this
.
parent
().
remove
();
user
.
addDeleteNewsEvent
(
file_id
);
};
});
//图片预览点击放大事件
_doc
.
on
(
'click'
,
'.img-pre-ul>li>img'
,
function
(
e
)
{
_imgMaskObj
.
show
().
find
(
'img'
).
attr
(
'src'
,
this
.
src
);
});
_imgMaskObj
.
click
(
function
(
e
)
{
this
.
style
.
display
=
'none'
;
});
},
//筛选 获取文章列表
getList
:
function
(
pageNo
)
{
user
.
pageNo
=
pageNo
;
var
params
=
{};
params
.
start_time
=
$
(
"#start_date"
).
val
();
params
.
end_time
=
$
(
"#end_date"
).
val
();
params
.
title
=
$
(
"#release_title"
).
val
();
params
.
label_id
=
$
(
"#district_id"
).
val
();
params
.
pageNo
=
user
.
pageNo
;
params
.
pageSize
=
user
.
pageSize
;
$
.
ajax
({
url
:
'/index/business_school'
,
type
:
'GET'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
console
.
log
(
'公告'
);
var
temp
=
document
.
getElementById
(
'schoolBusiness_list_tpl'
).
innerHTML
;
var
doTtmpl
=
doT
.
template
(
temp
);
$
(
"#users_list"
).
html
(
doTtmpl
(
data
.
data
.
list
));
/*分页代码*/
add_page
(
data
.
data
.
total
,
pageNo
,
user
.
pageSize
,
user
.
getList
);
$
(
"#total_page"
).
html
(
data
.
data
.
total
);
}
});
},
//下载 pdf
// downloadPDF:function(){
// var _url = '/index/downloadFile'
// window.open(_url + 'file_id=' + excel);
// },
//点击编辑 调用的接口
text_details
:
function
()
{
var
news_id
=
getUrlParam
(
'id'
);
//地址栏获取的商铺或者街铺id
var
_imgUploadLunbo
=
$
(
'#xiangqing_pic_ul'
);
//详情页轮播图ul
var
_imgUploadLiebiao
=
$
(
'#fujian_ul'
);
//列表页封面图ul
var
_urlCut
=
location
.
origin
+
'/resource/lib/Attachments/images/'
;
//要截取的部分url
var
_dajiangtangObj
=
$
(
'#dajiangtang'
);
//大讲堂
$
.
ajax
({
'type'
:
'GET'
,
'url'
:
'/index/getNewsInfo'
,
data
:
{
'id'
:
news_id
,
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
$
(
"#announcement_title"
).
val
(
data
.
data
.
title
);
$
(
"#district_id2"
).
val
(
data
.
data
.
s_label_id
*
1
);
//商学院标签id
var
_data
=
data
[
'data'
];
if
(
_data
[
'cover_plan'
])
{
var
nameStr
=
_data
[
'cover_plan'
].
split
(
"Attachments/images"
)[
1
];
var
name
=
nameStr
.
substr
(
1
,
nameStr
.
length
-
1
);
console
.
log
(
name
);
// http://images.tonglianjituan.com/static/shop_image_depot/20190218/20190218105609841.jpg
_imgUploadLiebiao
.
html
(
'<li><img class="titleImg" data-name="'
+
name
+
'" title="点击查看大图" src="{0}" data /><a href="javascript:;" class="delet-pic-btn">删除</a></li>'
.
stringFormatObj
({
'0'
:
_data
[
'cover_plan'
]
}));
};
//获取编辑器里的内容
// setCKeditorValue(id,content)
setCKeditorValue
(
"goods_sup_id"
,
_data
[
'content'
]);
//附件
var
file_paths
=
_data
[
'file'
];
for
(
var
i
=
0
;
i
<
file_paths
.
length
;
i
++
){
console
.
log
(
file_paths
[
i
][
'file_name'
])
var
_tempArr
=
file_paths
[
i
][
'file_name'
].
split
(
'/'
);
file_paths
[
i
][
'file_name'
]
&&
$
(
'#fujian_ul_liu'
).
append
(
'<li class="pdf-pre-li" id='
+
file_paths
[
i
][
'file_id'
]
+
'><a class="pdf-pre-a pdf-pre-a-download" download="{1}" href="javascript:;" title="点击可下载">{2}</a><a href="javascript:;" class="delet-pic-btn">删除</a></li>'
.
stringFormatObj
({
'0'
:
'/'
+
file_paths
[
i
][
'show_file'
],
'1'
:
dealFileName
(
decodeURI
(
_tempArr
[
_tempArr
.
length
-
1
])),
'2'
:
file_paths
[
i
][
'file_former_name'
]?
file_paths
[
i
][
'file_former_name'
]:
dealFileName
(
decodeURI
(
_tempArr
[
_tempArr
.
length
-
1
]))
}));
}
}
else
{}
}
});
},
addDeleteNewsEvent
:
function
(
id
){
$
.
ajax
({
url
:
'/index/delNewsFile'
,
type
:
'POST'
,
async
:
true
,
data
:
{
'file_id'
:
id
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
alert
(
'文件删除成功'
);
}
}
});
},
getDistrict
:
function
(
fn
)
{
$
.
ajax
({
url
:
'/index/getNewsLabel'
,
type
:
'GET'
,
async
:
true
,
data
:
{},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
var
str
=
''
;
$
.
each
(
data
.
data
,
function
(
i
,
item
)
{
str
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
label_name
+
'</option>'
;
});
$
(
"#district_id"
).
append
(
str
);
$
(
"#district_id2"
).
append
(
str
);
if
(
getUrlParam
(
'id'
))
{
user
.
text_details
();
}
fn
&&
fn
();
}
}
});
},
add_news
:
function
()
{
//新增文章 编辑文章
if
(
$
(
'.titleImg'
))
{
var
pic
=
$
(
'.titleImg'
).
attr
(
"data-name"
);
}
var
_imgUploadLiebiao
=
$
(
'#fujian_ul'
);
//列表页封面图ul
// var _liebiaoPicObj = _imgUploadLiebiao.find('li>img');
var
_liebiaoPicObj
=
$
(
'.titleImg'
);
var
_urlCut
=
location
.
origin
+
'/resource/lib/Attachments/images/'
;
//要截取的部分url
var
_dajiangtangObj
=
$
(
'#dajiangtang'
);
//大讲堂
// var _dajiangtangVal = getCKeditorValue("goods_sup_id");
console
.
log
(
UE
.
getEditor
(
'myEditor'
).
getContent
());
// console.log(_dajiangtangVal);
if
(
_liebiaoPicObj
.
length
<
1
)
{
alert
(
'列表页封面图需要上传'
);
return
false
;
};
var
_data
=
{};
if
(
getUrlParam
(
'id'
))
{
_data
.
id
=
getUrlParam
(
'id'
);
};
console
.
log
(
$
(
'.titleImg'
).
attr
(
"srcName"
))
console
.
log
(
"1232132132132112312321321"
)
_data
.
title
=
$
(
"#announcement_title"
).
val
();
_data
.
s_label_id
=
$
(
"#district_id2"
).
val
();
//商学院标签id
_data
.
file_img
=
pic
//user.titlePic;//_liebiaoPicObj[0].src.replace(_urlCut, ''); //封面图 剪切后的字符串
_data
.
content
=
UE
.
getEditor
(
'myEditor'
).
getContent
();
//附件相关
var
_fujianObj
=
$
(
'#fujian_ul_liu'
).
find
(
'li>a.pdf-pre-a'
);
//附件看的是删除按钮的个数
if
(
_fujianObj
.
length
>
0
){
//判断附件存在,同时,附件可能存在0到5个
for
(
var
i
=
0
;
i
<
_fujianObj
.
length
;
i
++
){
var
one_name
=
_fujianObj
[
i
].
getAttribute
(
'data-filename'
);
//附件取得是data-filename
var
one_name_html
=
_fujianObj
[
i
].
innerHTML
;
//附件取得是data-filename
// _data['annex_file_name['+i+'][''']'] = one_name + ','+one_name_html;
// _data['annex_file_name['+i+'][1]'] = one_name_html;
_data
[
'annex_file_name['
+
i
+
'][file_name]'
]
=
one_name
;
_data
[
'annex_file_name['
+
i
+
'][file_former_name]'
]
=
one_name_html
;
}
}
/*if(_fujianObj.length === 1) {
_data['annex_file_name'] = _fujianObj[0].getAttribute('data-filename'); //附件取得是data-filename
};*/
$
.
ajax
({
url
:
'/index/addNews'
,
type
:
'POST'
,
async
:
true
,
data
:
_data
,
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
$
(
"#modal_add_user"
).
modal
(
'hide'
);
//提交成功 关闭模态框
// user.getList(1);
alert
(
'提交成功'
)
window
.
location
.
href
=
'/index/business_school'
;
}
else
{
alert
(
data
.
msg
);
}
}
});
},
};
return
user
;
});
\ No newline at end of file
public/resource/template/office_building_list_template_tpl.html
0 → 100644
View file @
3bf94893
<script
id=
"office_building_list_tpl"
type=
"text/template"
>
[
%
var
sw
=
function
(
s
){
switch
(
Number
(
s
)){
case
2
:
return
"btn-info"
;
case
1
:
return
"btn-default"
}};
%
]
[
%
var
sw2
=
function
(
s
){
switch
(
Number
(
s
)){
case
0
:
return
"btn-info"
;
case
1
:
return
"btn-default"
}};
%
]
[
%
var
sw3
=
function
(
s
){
switch
(
Number
(
s
)){
case
0
:
return
"btn-info"
;
case
1
:
return
"btn-default"
}};
%
]
[
%
if
(
it
&&
it
.
length
!=
0
)
{
%
]
[
%
for
(
var
item
in
it
){
%
]
<
tr
class
=
"text-center"
>
<
td
>
[
%=
it
[
item
][
'id'
]
%
]
[
%
if
(
it
[
item
][
"is_lock"
]
==
1
)
{
%
]
<
span
class
=
"btn1 btn-warning btn-xs"
>
锁盘
<
/span
>
[
%
}
%
]
[
%
if
(
it
[
item
][
"is_vip"
]
==
1
)
{
%
]
<
span
class
=
"btn1 btn-warning btn-xs"
>
VIP
盘
<
/span
>
[
%
}
%
]
<
/td
>
<
td
>
[
%
if
(
it
[
item
][
"shop_type"
]
==
0
)
{
%
]
商场
[
%
}
else
{
%
]
街铺
[
%
}
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'disc'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'internal_title'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'floor'
]
%
]
<
/td
>
<
td
>
[
%
if
(
it
[
item
][
'rent_type'
]
==
1
)
{
%
]
[
%=
it
[
item
][
"rent_price"
]
/
100
%
]
元
[
%
}
else
if
(
it
[
item
][
'rent_type'
]
==
2
)
{
%
]
[
%=
it
[
item
][
"rent_price"
]
/
100
%
]
%
[
%
}
else
if
(
it
[
item
][
'rent_type'
]
==
3
)
{
%
]
[
%=
it
[
item
][
"rent_price"
]
/
100
%
]
元
/
天
/
㎡
[
%
}
else
if
(
it
[
item
][
'rent_type'
]
==
4
)
{
%
]
[
%=
it
[
item
][
"rent_price"
]
/
100
%
]
元
/
年
[
%
}
else
if
(
it
[
item
][
'rent_type'
]
==
5
)
{
%
]
[
%=
it
[
item
][
"rent_price"
]
/
100
%
]
元
/
月
/
㎡
[
%
}
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"slotting_fee"
]
/
100
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"slotting_fee"
]
/
100
%
]
<
/td
>
<
td
>
[
%
if
(
it
[
item
][
"shop_type"
]
==
0
)
{
%
]
[
%=
it
[
item
][
"shop_area_start"
]
+
'-'
+
it
[
item
][
"shop_area_end"
]
%
]
㎡
[
%
}
else
{
%
]
[
%=
it
[
item
][
"shop_area_start"
]
%
]
㎡
[
%
}
%
]
<
/td
>
<
td
width
=
"10%"
>
[
%=
hideStr
(
it
[
item
][
'industry_type'
])
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'dish_name'
]
%
]
<
/td
>
<
td
width
=
"10%"
>
[
%=
it
[
item
][
'create_time'
]
%
]
<
/td
>
<
td
>
[
%
if
(
it
[
item
][
"status"
]
==
0
)
{
%
]
审核
[
%
}
else
if
(
it
[
item
][
"status"
]
==
1
){
%
]
上架
[
%
}
else
if
(
it
[
item
][
"status"
]
==
2
){
%
]
下架
[
%
}
else
if
(
it
[
item
][
"status"
]
==
3
){
%
]
无效
[
%
}
%
]
<
/td
>
<
td
>
[
%
if
(
it
[
item
][
"residue_num"
]
==
0
)
{
%
]
已租
[
%
}
else
{
%
]
求租
[
%
}
%
]
<
/td
>
<
td
>
[
%
if
(
it
[
item
][
"is_show"
]
==
0
)
{
%
]
是
[
%
}
else
if
(
it
[
item
][
"is_show"
]
==
1
)
{
%
]
否
[
%
}
%
]
<
/td
>
<
td
>
[
%
if
(
it
[
item
][
"is_lock"
]
==
0
||
check_auth
(
'index/lockHouse'
)
||
it
[
item
][
"auth_edit_exclusive"
]
==
1
||
it
[
item
][
"auth_edit_house"
]
==
1
)
{
%
]
<
a
class
=
"btn1 [%= (it[item]['is_look'] && it[item]['auth_edit_house'] == 0)?'btn-warning':'btn-success' %]"
href
=
"#modal_shop_detail"
data
-
id
=
'[%= it[item]["id"] %]'
data
-
toggle
=
"modal"
>
跟进
/
查看
<
/a
>
<
a
class
=
"btn1 is_show_shoucang [%= sw(it[item]['is_collect']) %]"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
[
%
if
(
it
[
item
][
"is_collect"
]
==
1
)
{
%
]
取消收藏
[
%
}
else
if
(
it
[
item
][
"is_collect"
]
==
2
)
{
%
]
收藏
[
%
}
%
]
<
/a
>
[
%
}
%
]
[
%
if
(
it
[
item
][
"is_vip"
]
==
1
)
{
%
]
[
%
if
(
check_auth
(
'index/vipHouse'
)
||
it
[
item
][
'auth_edit_house'
])
{
%
]
<
a
class
=
"btn1 btn-success"
href
=
"/admin.php/index/officeEdit?id=[%= it[item]['id']%]"
>
编辑
<
/a
>
[
%
}
%
]
[
%
}
else
{
%
]
[
%
if
(
it
[
item
][
'auth_edit_house'
]
||
check_auth
(
'index/houseEdit'
))
{
%
]
<
a
class
=
"btn1 btn-success"
href
=
"/admin.php/index/officeEdit?id=[%= it[item]['id']%]"
>
编辑
<
/a
>
[
%
}
%
]
[
%
}
%
]
<
a
class
=
"btn1 btn-default btn-default-show-caozuo"
>>>><
/a
>
[
%
if
(
check_auth
(
'index/houseEdit'
))
{
%
]
<
a
class
=
"btn1 btn-success is_show btn-default-hide-display"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
[
%
if
(
it
[
item
][
"is_carefully_chosen"
]
==
0
)
{
%
]
推荐至首页
[
%
}
else
if
(
it
[
item
][
"is_carefully_chosen"
]
==
1
)
{
%
]
已推荐
[
%
}
%
]
<
/a
>
[
%
}
%
]
[
%
if
(
check_auth
(
'index/lockHouse'
))
{
%
]
<
a
class
=
"btn1 is_show_lock_plate btn-default-hide-display [%= sw2(it[item]['is_lock']) %]"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
[
%
if
(
it
[
item
][
"is_lock"
]
==
1
)
{
%
]
已锁盘
[
%
}
else
{
%
]
锁盘
[
%
}
%
]
<
/a
>
[
%
}
%
]
[
%
if
(
it
[
item
][
"is_can_edit_only_contract"
]
==
0
)
{
%
]
<
a
class
=
"btn1 btn-success dujia btn-default-hide-display"
href
=
"#modal-dujia"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
data
-
exclusive
=
'[%= it[item]["auth_edit_exclusive"] %]'
>
是否独家
<
/a
>
[
%
}
%
]
[
%
if
(
check_auth
(
'index/houseDel'
))
{
%
]
[
%
if
((
it
[
item
][
"status"
]
!=
3
)){
%
]
<
a
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
href
=
"#modal-delete"
class
=
"btn1 btn-danger add_applies del_modal btn-default-hide-display"
>
无效
<
/a
>
[
%
}
else
{
%
]
<
a
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
class
=
"btn1 btn-default add_applies del_modal btn-default-hide-display"
>
已无效
<
/a
>
[
%
}
%
]
[
%
}
%
]
[
%
if
(
check_auth
(
'index/vipHouse'
))
{
%
]
<
a
class
=
"btn1 is_vip_plate btn-default-hide-display [%= sw3(it[item]['is_vip']) %]"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
[
%
if
(
it
[
item
][
"is_vip"
]
==
1
)
{
%
]
取消
VIP
盘
[
%
}
else
{
%
]
VIP
盘
[
%
}
%
]
<
/a
>
[
%
}
%
]
<
a
class
=
"btn1 btn-default btn-default-hide-caozuo btn-default-hide-display"
><<<<
/a
>
<
/td
>
<
/tr
>
[
%
}
%
]
[
%
}
else
{
%
]
<
tr
>
<
td
colspan
=
"16"
style
=
"text-align:center;"
>
暂无数据
<
/td
>
<
/tr
>
[
%
}
%
]
</script>
<!--商铺视频-->
<script
id=
"shop_video_list_tpl"
type=
"text/template"
>
[
%
if
(
it
)
{
%
]
[
%
for
(
var
item
in
it
){
%
]
<
tr
class
=
"text-left"
style
=
"width: 272px;float: left;"
>
<
td
style
=
"margin-right: 10px;"
>
<
video
src
=
"[%= it[item]['video_path'] %]"
controls
=
"controls"
preload
=
"none"
muted
type
=
"video/mp4"
id
=
"video-check"
style
=
"width: 260px;height: 476px;margin-right: 10px;"
poster
=
"[%= it[item]['video_image'] %]"
muted
><
/video
>
<
br
/>
上传人
:[
%=
it
[
item
][
'upload_name'
]
%
]
<
br
/>
上传时间
:[
%=
it
[
item
][
'create_time'
]
%
]
<
br
/>
审核人
:[
%=
it
[
item
][
'check_name'
]
%
]
<
br
/>
审核时间
:[
%=
it
[
item
][
'check_time'
]
%
]
<
/td
>
<
/tr
>
[
%
}
%
]
[
%
}
else
{
%
]
<
tr
>
<
td
colspan
=
"8"
style
=
"text-align:center;"
>
暂无数据
<
/td
>
<
/tr
>
[
%
}
%
]
</script>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment