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
7eed985e
Commit
7eed985e
authored
Feb 09, 2018
by
刘丹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
市区
parent
59a9ff50
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
244 additions
and
490 deletions
+244
-490
index.html
application/index/view/store/index.html
+213
-85
storeList.js
public/resource/js/storeList.js
+24
-356
store_template_tpl.html
public/resource/template/store_template_tpl.html
+7
-49
No files found.
application/index/view/store/index.html
View file @
7eed985e
{layout name="global/frame_tpl" /}
{layout name="global/frame_tpl" /}
<input
type=
"hidden"
class=
"page-load"
id=
"storeList"
/>
<input
type=
"hidden"
class=
"page-load"
id=
"storeList"
/>
<style>
/*获取百度经纬度样式*/
/*********************************************************百度定位页面iframe引入*************************************/
#position_box
{
height
:
750px
;
background-color
:
#f0f0f0
;
overflow
:
scroll
;
position
:
relative
;
}
div
.address-header-bar
{
overflow
:
hidden
;
float
:
left
;
}
#address_city_title
{
float
:
left
;
width
:
150px
;
line-height
:
60px
;
font-size
:
30px
;
color
:
#333
;
text-align
:
center
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
display
:
none
;
}
.crile
{
float
:
left
;
width
:
570px
;
overflow
:
hidden
;
position
:
relative
;
}
.crile
>
input
{
line-height
:
60px
;
box-sizing
:
border-box
;
padding
:
0
;
border-width
:
1px
;
width
:
100%
;
display
:
block
;
border-radius
:
30px
;
background
:
#f5f5f5
url('/resource/image/search_ic.png')
no-repeat
30px
center
;
background-size
:
28px
;
text-indent
:
60px
;
font-size
:
28px
;
outline
:
none
;
}
.crile
>
input
::-webkit-search-cancel-button
{
-webkit-appearance
:
none
;
}
img
.cancel-pic
{
width
:
28px
;
height
:
28px
;
position
:
absolute
;
right
:
0
;
top
:
0
;
box-sizing
:
content-box
;
padding
:
15px
;
}
#main_ul
{
padding
:
0
30px
;
background-color
:
white
;
font-size
:
30px
;
}
#main_ul
>
ul
{
padding-left
:
0
;
}
#main_ul
>
ul
>
li
{
cursor
:
pointer
;
list-style
:
none
;
}
#main_ul
>
ul
>
li
+
li
{
border-top
:
1px
solid
#e0e0e0
;
}
#main_ul
>
ul
>
li
>
p
:nth-of-type
(
1
)
{
color
:
#333
;
padding
:
20px
0
10px
;
margin
:
0
;
}
#main_ul
>
ul
>
li
>
p
:nth-of-type
(
2
)
{
color
:
#999
;
padding-bottom
:
20px
;
margin
:
0
;
}
.loading_pic
{
font-size
:
20px
;
text-align
:
center
;
width
:
100%
;
position
:
absolute
;
top
:
150px
;
display
:
none
;
}
.loading_pic
>
img
{
width
:
120px
;
display
:
block
;
margin
:
0
auto
;
}
.loading_pic
>
p
{
font-size
:
20px
;
color
:
#333
;
text-align
:
center
;
margin-top
:
10px
;
color
:
rgb
(
51
,
51
,
51
);
}
.no_more
{
font-size
:
30px
;
height
:
50px
;
line-height
:
50px
;
text-align
:
center
;
display
:
none
;
}
/**/
</style>
<div
id=
"page-content-wrapper"
>
<div
id=
"page-content-wrapper"
>
<div
class=
"container"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"row"
>
...
@@ -25,15 +153,8 @@
...
@@ -25,15 +153,8 @@
<td
colspan=
"9"
>
<td
colspan=
"9"
>
<form
id=
"form_search"
>
<form
id=
"form_search"
>
<select
class=
"form-control btn2"
id=
"leased"
>
<option
value=
""
class=
"successModel"
>
选择市
</option>
<option
value=
"0"
>
已租
</option>
<option
value=
"1"
>
待租
</option>
</select>
<select
class=
"form-control btn2"
id=
"area"
>
<select
class=
"form-control btn2"
id=
"area"
>
<option
value=
""
class=
"successModel"
>
选择区
</option>
<option
value=
""
class=
"successModel"
>
选择区
</option>
<option
value=
"0"
>
已租
</option>
<option
value=
"1"
>
待租
</option>
</select>
</select>
<input
class=
"form-control btn2"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"mend_name"
placeholder=
"门店名称"
type=
"text"
value=
""
>
<input
class=
"form-control btn2"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"mend_name"
placeholder=
"门店名称"
type=
"text"
value=
""
>
...
@@ -90,32 +211,6 @@
...
@@ -90,32 +211,6 @@
</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 fade"
id=
"modal-anch"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-dialog"
>
...
@@ -149,8 +244,8 @@
...
@@ -149,8 +244,8 @@
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!-- /.modal -->
</div>
</div>
<!--
操作记录
-->
<!--
编辑
-->
<div
class=
"modal fade"
id=
"modal-
record
"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal fade"
id=
"modal-
edit
"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<div
class=
"modal-header"
>
...
@@ -158,66 +253,66 @@
...
@@ -158,66 +253,66 @@
×
×
</button>
</button>
<h4
class=
"modal-title"
>
<h4
class=
"modal-title"
>
操作记录
编辑信息
</h4>
</h4>
</div>
</div>
<div
class=
"modal-body"
>
<div
class=
"modal-body"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<form
class=
"form-horizontal"
>
<thead>
<div
class=
"form-group"
>
<tr>
<label
class=
"col-sm-3 control-label"
>
对内地址
</label>
<th
class=
"text-center"
>
盘方修改记录
</th>
<button
type=
"button"
class=
"btn btn-primary"
data-toggle=
"modal"
data-target=
".bs-example-modal-lg"
id=
"position_btn"
>
选择地址定位
</button>
<th
class=
"text-center"
>
操作人
</th>
<!--<select class="form-control" id="province_internal" name="province_internal"></select>
<th
class=
"text-center"
>
操作时间
</th>
<select class="form-control" id="city_internal" name="city_internal"></select>
</tr>
<select class="form-control" id="disc_internal" name="disc_internal"></select>-->
</thead>
<tbody
class=
"text-center"
id=
"caozuo_table"
>
</table>
</div>
</div>
</div>
<!-- /.modal-content -->
<div
class=
"form-group"
>
</div>
<!-- /.modal -->
<label
class=
"col-sm-3 control-label"
></label>
</div>
<input
type=
"text"
class=
"form-control btn6"
data-toggle=
"modal"
data-target=
".bs-example-modal-lg"
title=
"通过地址定位获取"
readonly=
"readonly"
id=
"province_internal"
/>
<!--是否独家-->
<div
class=
"modal fade"
id=
"modal-dujia"
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>
<div
class=
"modal-body"
>
<form
class=
"form-horizontal"
>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
是否独家:
</label>
<label
class=
"col-sm-3 control-label"
></label>
<select
class=
"form-control btn6"
id=
"sel_dujia"
>
<input
type=
"text"
class=
"form-control btn6"
data-toggle=
"modal"
data-target=
".bs-example-modal-lg"
title=
"通过地址定位获取"
readonly=
"readonly"
id=
"city_internal"
/>
<option
value=
"null"
class=
"successModel"
>
请选择
</option>
<option
value=
"1"
>
是
</option>
<option
value=
"0"
>
否
</option>
</select>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
独家合同上传(小于10张):
</label>
<label
class=
"col-sm-3 control-label"
></label>
<span
id=
"liudan_pic_pre"
></span>
<input
type=
"text"
class=
"form-control btn6"
data-toggle=
"modal"
data-target=
".bs-example-modal-lg"
title=
"通过地址定位获取"
readonly=
"readonly"
id=
"disc_internal"
/>
<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>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
独家代理有效期:
</label>
<label
class=
"col-sm-3 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"
>
<input
type=
"text"
class=
"form-control btn6"
data-toggle=
"modal"
data-target=
".bs-example-modal-lg"
title=
"通过地址定位获取"
readonly=
"readonly"
id=
"longitude"
name=
"longitude"
data-alert=
"请通过地址定位获取经纬度!"
>
<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>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
独家方:
</label>
<label
class=
"col-sm-3 control-label"
>
纬度
</label>
<input
class=
"form-control btn6"
data-rule-buga=
"false"
data-rule-required=
"true"
name=
"exclusive"
placeholder=
"请输入姓名或手机号码"
type=
"text"
value=
""
id=
"exclusive"
>
<input
type=
"text"
class=
"form-control btn6"
data-toggle=
"modal"
data-target=
".bs-example-modal-lg"
title=
"通过地址定位获取"
readonly=
"readonly"
id=
"latitude"
name=
"latitude"
data-alert=
"请通过地址定位获取经纬度!"
>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
详细地址:
</label>
<input
type=
"text"
value=
""
name=
"address"
class=
"form-control btn6"
placeholder=
"请输入详细地址"
>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
公司名:
</label>
<input
type=
"text"
value=
""
name=
"name"
class=
"form-control btn6"
placeholder=
"请输入公司名"
>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
分店名:
</label>
<input
type=
"text"
value=
""
name=
"fd-name"
class=
"form-control btn6"
placeholder=
"请输入分店名"
>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
规模:
</label>
<select
class=
"form-control btn6"
name=
"pid"
id=
"pid"
>
<option
class=
"successModel"
value=
""
>
请选择
</option>
<option
value=
"0"
>
1-10人
</option>
<option
value=
"1"
>
11-20人
</option>
<option
value=
"2"
>
20人以上
</option>
</select>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
店长:
</label>
<input
type=
"text"
value=
""
name=
"store-name"
class=
"form-control btn6"
placeholder=
"请输入店长"
>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
所属部门:
</label>
<input
type=
"text"
value=
""
name=
"ss-store"
class=
"form-control btn6"
placeholder=
"所属部门"
>
</div>
</div>
</form>
</form>
...
@@ -225,10 +320,43 @@
...
@@ -225,10 +320,43 @@
<div
class=
"modal-footer"
>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
</button>
<button
type=
"button"
class=
"btn btn-primary submit_
follow2
"
data-dismiss=
"modal"
>
<button
type=
"button"
class=
"btn btn-primary submit_
edit
"
data-dismiss=
"modal"
>
提交
提交
</button>
</button>
</div>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!-- /.modal -->
</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>
public/resource/js/storeList.js
View file @
7eed985e
...
@@ -12,14 +12,13 @@ define (['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css','ckfin
...
@@ -12,14 +12,13 @@ define (['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css','ckfin
valueCurrent
:
''
,
valueCurrent
:
''
,
ajaxObj
:
''
,
ajaxObj
:
''
,
stopstatus
:
true
,
stopstatus
:
true
,
ldHtml
:
$
(
'.phone_list'
),
boxphoto
:
''
,
boxphoto
:
''
,
init
:
function
()
{
init
:
function
()
{
//初始化dot
//初始化dot
$
(
"body"
).
append
(
template
);
$
(
"body"
).
append
(
template
);
store
.
getList
();
store
.
getList
();
store
.
event
();
store
.
event
();
store
.
resetLoad
();
store
.
getRegionsDisc
();
},
},
event
:
function
()
{
event
:
function
()
{
$
(
"#search"
).
click
(
function
()
{
$
(
"#search"
).
click
(
function
()
{
...
@@ -34,338 +33,30 @@ define (['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css','ckfin
...
@@ -34,338 +33,30 @@ define (['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css','ckfin
store
.
id
=
$
(
this
).
attr
(
"data-id"
);
store
.
id
=
$
(
this
).
attr
(
"data-id"
);
});
});
$
(
document
).
delegate
(
".anch"
,
"click"
,
function
()
{
//点击设置案场权限人
store
.
house_id
=
$
(
this
).
attr
(
"data-id"
);
store
.
type
=
"1"
;
store
.
Anch
();
//获取手机号名字的
});
$
(
document
).
delegate
(
".add_applies"
,
"click"
,
function
()
{
//点击设置案场权限人
store
.
house_id
=
$
(
this
).
attr
(
"data-id"
);
store
.
type
=
"2"
;
store
.
Anch
();
});
$
(
document
).
delegate
(
".dujia"
,
"click"
,
function
()
{
//点击独家
store
.
house_id
=
$
(
this
).
attr
(
"data-id"
);
store
.
type
=
"3"
;
store
.
Dujia
();
});
$
(
document
).
delegate
(
".caozuo"
,
"click"
,
function
()
{
//点击操作记录
store
.
house_id
=
$
(
this
).
attr
(
"data-id"
);
store
.
Caozuo
();
});
$
(
document
).
delegate
(
".submit_follow2"
,
"click"
,
function
()
{
//提交独家
store
.
Dujianew
();
});
$
(
document
).
delegate
(
".submit_follow"
,
"click"
,
function
()
{
//提交按钮设置案场权限人
store
.
Submit_follow
();
});
$
(
document
).
delegate
(
"#confirm_delete"
,
"click"
,
function
()
{
store
.
delstore
();
});
$
(
document
).
delegate
(
".jia"
,
"click"
,
function
()
{
//加号
store
.
jiabox
();
});
$
(
document
).
delegate
(
".addphone"
,
"click"
,
function
()
{
//加号
store
.
addphone
(
this
);
});
$
(
document
).
delegate
(
".jian"
,
"click"
,
function
()
{
//叉号
store
.
jianbox
();
});
$
(
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
!=
''
){
store
.
resetLoad
(
1
);
store
.
loadMain
(
valueCurrent
,
_this
.
next
());
console
.
log
(
_this
.
next
());
}
else
{
store
.
ldHtml
.
html
(
''
);
return
false
;
}
});
$
(
document
).
delegate
(
".is_show"
,
"click"
,
function
()
{
//推荐至首页
if
(
!
confirm
(
'是否继续?'
))
{
return
;
}
store
.
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
(
'推荐至首页'
);
}
$
.
ajax
({
//推荐至首页
'type'
:
'POST'
,
'url'
:
'/index/carefullyChosen'
,
data
:
{
"houses_id"
:
store
.
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
();
img_url
+=
' <img src="'
+
url
+
'" class="jai_dujia" data-img="'
+
alt_img
+
'">'
;
$
(
"#liudan_pic_pre"
).
append
(
img_url
);
});
});
},
Anch
:
function
(){
//获取手机号名字的
$
.
ajax
({
'type'
:
'GET'
,
'url'
:
'/index/getAgentsTohouses'
,
data
:
{
"houses_id"
:
store
.
house_id
,
"type"
:
store
.
type
},
dataType
:
"json"
,
success
:
function
(
data
){
if
(
data
.
code
==
200
){
if
(
data
.
data
)
{
$
(
".jian_class"
).
html
(
''
);
//写入
$
.
each
(
data
.
data
,
function
(
i
,
data
)
{
store
.
jiabox_data
(
data
[
'id'
],
data
[
'name'
],
data
[
'phone'
]);
});
store
.
jiabox
();
}
}
else
{
alert
(
'请登录!'
);
}
}
});
},
Dujia
:
function
(){
//获取独家的信息
$
.
ajax
({
'type'
:
'GET'
,
'url'
:
'/index/getExclusive'
,
data
:
{
"houses_id"
:
store
.
house_id
},
dataType
:
"json"
,
success
:
function
(
data
){
if
(
data
.
code
==
200
){
if
(
data
.
data
)
{
$
(
"#sel_dujia"
).
val
(
data
.
data
.
is_exclusive_type
);
//是否独家
$
(
"#start_date_dujia"
).
val
(
data
.
data
.
agent_start_time
);
//上传时间
$
(
"#end_date_dujia"
).
val
(
data
.
data
.
agent_end_time
);
$
(
"#exclusive"
).
val
(
data
.
data
.
name
);
exclusive_id
=
data
.
data
.
id
;
var
img_url
=
""
;
$
.
each
(
data
[
'data'
][
'exclusive_img'
],
function
(
i
,
item
)
{
var
local_img
=
location
.
origin
+
'/resource/lib/Attachments/'
+
item
.
img_name
;
img_url
+=
'<img src="'
+
local_img
+
'" class="jai_dujia" data-img="'
+
item
.
img_name
+
'" >'
;
});
$
(
"#liudan_pic_pre"
).
html
(
img_url
);
}
}
else
{
alert
(
'获取失败!'
);
}
}
});
},
Dujianew
:
function
(){
//提交独家的信息
var
images
=
[];
//图片
var
imgs
=
$
(
".jai_dujia"
);
for
(
var
j
=
0
;
j
<
imgs
.
length
;
j
++
){
images
.
push
(
imgs
[
j
].
getAttribute
(
"data-img"
))
}
$
.
ajax
({
'type'
:
'POST'
,
'url'
:
'/index/editExclusive'
,
data
:
{
"houses_id"
:
store
.
house_id
,
//楼盘Id
"is_exclusive_type"
:
$
(
"#sel_dujia"
).
val
(),
//是否独家
"exclusive_id"
:
exclusive_id
,
//经纪人id
"agent_start_time"
:
$
(
"#start_date_dujia"
).
val
(),
//开始时间
"agent_end_time"
:
$
(
"#end_date_dujia"
).
val
(),
//结束时间
"exclusive_img"
:
images
//图片
},
dataType
:
"json"
,
success
:
function
(
data
){
if
(
data
.
code
==
200
){
}
else
{
alert
(
'获取失败!'
);
}
}
});
},
Caozuo
:
function
(){
//获取独家的信息
var
caozuo_table
=
""
;
$
.
ajax
({
'type'
:
'GET'
,
'url'
:
'/index/getRecords'
,
//获取操作记录
data
:
{
"houses_id"
:
store
.
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>'
})
$
(
"#caozuo_table"
).
html
(
caozuo_table
);
}
}
else
{
alert
(
'获取失败!'
);
}
}
});
},
},
Submit_follow
:
function
(){
//提交案场权限人数据
getRegionsDisc
:
function
(
name
)
{
var
agents_id
=
""
;
var
params
=
{};
var
_agents_id
=
""
;
params
.
parent_code
=
310100
;
$
(
"input[name='ues_id']"
).
each
(
function
()
{
//拼接经纪人id
$
.
ajax
({
var
s
=
$
(
this
).
val
();
url
:
'/index/regions'
,
var
m
=
s
.
match
(
/
[^
-
]
+
(?=[
-
])
/g
);
type
:
'GET'
,
if
(
m
===
null
){
async
:
true
,
return
false
;
data
:
params
,
}
else
{
dataType
:
'json'
,
agents_id
+=
","
+
m
[
0
];
success
:
function
(
data
)
{
_agents_id
=
agents_id
.
substring
(
1
);
if
(
data
.
code
==
200
)
{
}
});
$
.
ajax
({
'type'
:
'POST'
,
'url'
:
'/index/addHousesAgents'
,
data
:
{
"houses_id"
:
store
.
house_id
,
"type"
:
store
.
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
(
store
.
ajaxObj
){
store
.
ajaxObj
.
abort
();
}
store
.
ldHtml
.
html
(
''
);
store
.
stopstatus
=
true
;
},
loadMain
:
function
(
phone
,
obj
)
{
//手机号
store
.
ajaxObj
=
$
.
ajax
({
type
:
"GET"
,
url
:
'/index/getBroker_new'
,
data
:
{
'phone'
:
phone
},
timeout
:
10000
,
dataType
:
"json"
,
beforeSend
:
function
()
{
},
success
:
function
(
data
)
{
if
(
data
.
code
===
200
){
var
_html
=
''
;
var
_html
=
''
;
$
.
each
(
data
.
data
,
function
(
i
,
data
)
{
$
.
each
(
data
.
data
,
function
(
i
,
n
)
{
_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>'
;
_html
+=
'<option value="'
+
n
.
fullName
+
'">'
+
n
.
fullName
+
'</option>'
;
});
obj
.
html
(
_html
);
}
},
error
:
function
()
{
},
complete
:
function
(
xhr
,
textStatus
)
{
if
(
textStatus
===
"timeout"
)
{
//处理超时的逻辑
alert
(
"请求超时"
);
}
}
});
});
},
$
(
"#area"
).
append
(
_html
);
addphone
:
function
(
obj
){
//list消失
var
phone_name
=
$
(
obj
).
find
(
".phone_name"
).
html
();
console
.
log
(
phone_name
);
var
phone_phone
=
$
(
obj
).
find
(
".phone-phone"
).
html
();
var
phone_span
=
$
(
obj
).
find
(
".phone_span"
).
html
();
var
id
=
$
(
obj
).
find
(
".id"
).
html
();
$
(
obj
).
parent
().
prev
().
val
(
id
+
phone_name
+
phone_span
+
phone_phone
);
$
(
obj
).
parent
().
hide
();
store
.
ldHtml
.
html
(
''
);
return
false
;
},
jiabox
:
function
()
{
//加输入框
store
.
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
(
store
.
boxphoto
);
//写入
store
.
jianbox
();
},
jiabox_data
:
function
(
id
,
name
,
phone
)
{
//显示已经获取的数据
store
.
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
(
store
.
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"
:
store
.
house_id
},
dataType
:
"json"
,
success
:
function
(
data
){
if
(
data
.
code
==
200
){
}
else
{
}
else
{
alert
(
"删除失败"
);
alert
(
'请求省市区错误'
);
}
}
});
}
}
else
{
}
}
});
});
},
},
getList
:
function
(
pageNo
)
{
getList
:
function
(
pageNo
)
{
...
@@ -373,30 +64,24 @@ define (['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css','ckfin
...
@@ -373,30 +64,24 @@ define (['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css','ckfin
var
params
=
{};
var
params
=
{};
params
.
pageNo
=
store
.
pageNo
;
params
.
pageNo
=
store
.
pageNo
;
params
.
pageSize
=
store
.
pageSize
;
params
.
pageSize
=
store
.
pageSize
;
params
.
is_carefully_chosen
=
$
(
'#is_carefully_chosen option:selected'
)
.
val
();
//首页显示
params
.
district
=
$
(
'#area option:selected'
)
.
val
();;
//城市区
params
.
is_show
=
$
(
'#is_show option:selected'
)
.
val
();
//c端显示
params
.
store_name
=
$
(
'#mend_name'
)
.
val
();
//门店名
params
.
shop_type
=
$
(
'#shop_type option:selected'
)
.
val
();
//商铺类型
params
.
agents_name
=
$
(
'#name'
)
.
val
();
//店长名
params
.
leased
=
$
(
'#leased option:selected'
)
.
val
();
//商铺状态
params
.
agents_phone
=
$
(
'#phone'
)
.
val
();
//手机号
params
.
rent_price
=
$
(
'#rent_price option:selected'
)
.
val
();
//月租金
params
.
is_exclusive_type
=
$
(
'#is_exclusive_type option:selected'
)
.
val
();
//是否独家
params
.
internal_title
=
$
(
'#internal_title'
)
.
val
();
//商铺名称
params
.
industry_type
=
$
(
'#industry_type'
)
.
val
();
//业态
params
.
dish
=
$
(
'#dish'
)
.
val
();
//盘方
params
.
id
=
$
(
'#id'
)
.
val
();
//店铺编号
params
.
start_date
=
$
(
'#start_date'
)
.
val
();
//时间1
params
.
end_date
=
$
(
'#end_date'
)
.
val
();
//时间2
$
.
ajax
({
$
.
ajax
({
url
:
'/index/
getHouseList.html
'
,
//获取列表
url
:
'/index/
storeList
'
,
//获取列表
type
:
'GET'
,
type
:
'GET'
,
async
:
true
,
async
:
true
,
data
:
params
,
data
:
params
,
dataType
:
'json'
,
dataType
:
'json'
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
var
temp
=
document
.
getElementById
(
'house_list_tpl'
).
innerHTML
;
console
.
log
(
data
.
data
);
var
temp
=
document
.
getElementById
(
'store_list_tpl'
).
innerHTML
;
var
doTtmpl
=
doT
.
template
(
temp
);
var
doTtmpl
=
doT
.
template
(
temp
);
$
(
"#store_list"
).
html
(
doTtmpl
(
data
.
data
.
list
));
$
(
"#store_list"
).
html
(
doTtmpl
(
data
.
data
.
list
));
/*分页代码*/
/*分页代码*/
$
(
"#pagediv"
).
pagination
({
$
(
"#pagediv"
).
pagination
({
length
:
data
.
data
.
total
,
length
:
data
.
data
.
total
,
...
@@ -408,23 +93,6 @@ define (['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css','ckfin
...
@@ -408,23 +93,6 @@ define (['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css','ckfin
});
});
}
}
});
});
},
delstore
:
function
()
{
$
.
ajax
({
url
:
'/index/houseDel'
,
type
:
'POST'
,
async
:
true
,
data
:
{
"id"
:
store
.
id
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
store
.
getList
(
1
);
$
(
"#modal-delete"
).
modal
(
'hide'
);
}
else
{
$
(
"#del_msg"
).
html
(
'<span style="color: red">删除失败!</span>'
);
}
}
});
}
}
};
};
return
store
;
return
store
;
...
...
public/resource/template/store_template_tpl.html
View file @
7eed985e
...
@@ -2,57 +2,15 @@
...
@@ -2,57 +2,15 @@
[
%
if
(
it
)
{
%
]
[
%
if
(
it
)
{
%
]
[
%
for
(
var
item
in
it
){
%
]
[
%
for
(
var
item
in
it
){
%
]
<
tr
class
=
"text-center"
>
<
tr
class
=
"text-center"
>
<
td
>
[
%=
it
[
item
][
'id'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'district_name'
]
%
]
<
/td
>
<
td
>
[
%
if
(
it
[
item
][
"shop_type"
]
==
0
)
{
%
]
商场
[
%
}
else
{
%
]
街铺
[
%
}
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'internal_title'
]
%
]
<
/td
>
<
td
>
[
%
if
(
it
[
item
][
"rent_price"
]
==
0
)
{
%
]
30000
以上
[
%
}
else
if
(
it
[
item
][
"rent_price"
]
==
1
)
{
%
]
10000
-
30000
[
%
}
else
{
%
]
10000
以下
[
%
}
%
]
<
/td
>
<
td
>
[
%
if
(
it
[
item
][
"is_show"
]
==
0
)
{
%
]
是
[
%
}
else
{
%
]
否
[
%
}
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'create_time'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'create_time'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'id'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'store_name'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'agents_name'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'agents_total'
]
%
]
<
/td
>
<
td
>
<
td
>
[
%
if
(
it
[
item
][
"leased"
]
==
0
)
{
%
]
<
a
class
=
"btn1 btn-success edit"
href
=
"#modal-edit"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
编辑
<
/a
>
已租
<
a
class
=
"btn1 btn-info"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
拜访记录
<
/a
>
[
%
}
else
{
%
]
待租
[
%
}
%
]
<
/td
>
<
td
>
[
%
if
(
it
[
item
][
"dish_name"
]
==
""
)
{
%
]
<
a
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
href
=
"#modal-anch"
class
=
"btn1 btn-danger add_applies"
>
修改
<
/a
>
[
%
}
else
{
%
]
[
%=
it
[
item
][
'dish_name'
]
%
]
<
a
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
href
=
"#modal-anch"
class
=
"btn1 btn-danger add_applies"
>
修改
<
/a
>
[
%
}
%
]
<
/td
>
<
td
>
<
a
class
=
"btn1 btn-success "
href
=
"/admin.php/index/houseEdit?id=[%= it[item]['id']%]"
data
-
toggle
=
"modal"
>
编辑
<
/a
>
<
a
class
=
"btn1 btn-success is_show"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
推荐至首页
<
/a
>
<
a
class
=
"btn1 btn-success anch"
data
-
target
=
"#modal-anch"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
设置案场权限人
<
/a
>
<
a
class
=
"btn1 btn-success dujia"
href
=
"#modal-dujia"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
是否独家
<
/a
>
<
a
class
=
"btn1 btn-success caozuo"
href
=
"#modal-record"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
操作记录
<
/a
>
<
a
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
href
=
"#modal-delete"
class
=
"btn1 btn-danger add_applies del_modal"
>
删除
<
/a
>
<
/td
>
<
/td
>
<
/tr
>
<
/tr
>
...
...
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