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
06d9282a
Commit
06d9282a
authored
Jul 08, 2019
by
clone
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '0703-v3.3.4' of
https://gitee.com/zwyjjc/tl_estate
into 0703-v3.3.4
parents
a8ea05d0
eda976fb
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
187 additions
and
9 deletions
+187
-9
AppointmentTime.php
application/api/controller/AppointmentTime.php
+5
-3
agent.html
application/index/view/broker/agent.html
+33
-1
index.html
application/index/view/office/index.html
+1
-1
Users.php
application/model/Users.php
+17
-0
agent.js
public/resource/js/agent.js
+77
-1
buildingDictionary.js
public/resource/js/buildingDictionary.js
+7
-2
agent_template_tpl.html
public/resource/template/agent_template_tpl.html
+4
-0
building_dictionary_list_template_tpl.html
...ource/template/building_dictionary_list_template_tpl.html
+5
-1
phoneBinding_template_tpl.html
public/resource/template/phoneBinding_template_tpl.html
+38
-0
No files found.
application/api/controller/AppointmentTime.php
View file @
06d9282a
...
...
@@ -67,7 +67,7 @@ class AppointmentTime extends Basic
//todo 验证楼盘信息
if
(
isset
(
$params
[
"house_id"
])
&&
isset
(
$params
[
"house_title"
]))
{
$where_
[
"id"
]
=
$params
[
"house_id"
];
$houseInfo
=
$this
->
houseInfoModel
->
getHouseDetail
(
"id"
,
$where_
);
$houseInfo
=
$this
->
houseInfoModel
->
getHouseDetail
(
"id
,city
"
,
$where_
);
if
(
count
(
$houseInfo
)
<=
0
)
{
return
$this
->
response
(
"101"
,
"楼盘ID或楼盘名错误"
);
}
...
...
@@ -83,10 +83,12 @@ class AppointmentTime extends Basic
return
$this
->
response
(
"101"
,
"预约时间为空,或者小于当前时间"
);
}
$m_user
=
new
Users
();
$appoint_agent_id
=
$m_user
->
get
UserByWhereValue
(
'agent_id'
,
[
'id'
=>
$this
->
userId
]);
if
(
empty
(
$appoint_agent_id
))
{
$appoint_agent_id
=
$m_user
->
get
AgentBySiteIdCity
(
'c.id'
,
[
'a.id'
=>
$this
->
userId
,
'd.city'
=>
$houseInfo
[
'city'
]
]);
if
(
empty
(
$appoint_agent_id
[
'id'
]
))
{
$m_house_agent
=
new
GHousesToAgents
();
$appoint_agent_id
=
$m_house_agent
->
getAgentHouseValue
(
'agents_id'
,[
'houses_id'
=>
$params
[
"house_id"
],
'type'
=>
2
]);
}
else
{
$appoint_agent_id
=
$appoint_agent_id
[
'id'
];
}
$addPrams
=
array
(
'expect_time'
=>
date
(
"Y-m-d H:i:s"
,
$params
[
"expect_time"
]
/
1000
),
...
...
application/index/view/broker/agent.html
View file @
06d9282a
...
...
@@ -378,7 +378,38 @@
</div>
<!-- /.modal -->
</div>
<!--转勤 修改手机号-->
<div
class=
"modal fade"
id=
"modal-editPhone"
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"
>
<form
class=
"form-horizontal"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-4 control-label"
>
电话(登录账号):
</label>
<input
type=
"number"
class=
"form-control btn6"
id=
"edit-phone"
value=
""
placeholder=
"填写手机号"
>
</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 edit-phone-save"
>
提交
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!--变更角色-->
<div
class=
"modal fade"
id=
"modal-user"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
...
...
@@ -427,6 +458,7 @@
<div
class=
"modal-body"
>
<form
class=
"form-horizontal"
>
<div
class=
"form-group"
>
<button
type=
"button"
class=
"btn btn-primary del-record"
style=
"margin: 6px;"
>
清空解绑设备记录
</button>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<thead>
<tr>
...
...
application/index/view/office/index.html
View file @
06d9282a
...
...
@@ -270,7 +270,7 @@
<div
class=
"pull-right"
>
<ul
class=
"bread_btn"
>
<li>
<a
class=
"btn btn-default add"
href=
"#modal_add_loupan"
data-toggle=
"modal"
>
新增楼盘
</a>
<a
class=
"btn btn-default add"
href=
"#modal_add_loupan"
data-toggle=
"modal"
style=
"display: none;"
>
新增楼盘
</a>
</li>
</ul>
</div>
...
...
application/model/Users.php
View file @
06d9282a
...
...
@@ -1096,5 +1096,22 @@ class Users extends Model
->
limit
(
1
)
->
select
();
}
/**
* @param $field
* @param $params
* @return false|\PDOStatement|string|\think\Collection
*/
public
function
getAgentBySiteIdCity
(
$field
,
$params
){
return
Db
::
name
(
$this
->
table
)
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
"u_user_agent b"
,
"a.id = b.user_id"
,
"left"
)
->
join
(
"a_agents c"
,
"a.agent_id=b.id"
,
"left"
)
->
join
(
'a_site d'
,
'c.site_id = d.id'
,
'left'
)
->
where
(
$params
)
->
limit
(
1
)
->
select
();
}
}
public/resource/js/agent.js
View file @
06d9282a
...
...
@@ -5,6 +5,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
agent_id
:
0
,
idArray
:
''
,
confirm_old
:
''
,
//是否转勤
editObj
:
''
,
//编辑返回的对象
init
:
function
()
{
//初始化dot
$
(
"body"
).
append
(
template
+
template_binding
+
pctemplate_binding
);
...
...
@@ -121,10 +122,21 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
$
(
document
).
on
(
"click"
,
".black-list"
,
function
()
{
//点击黑名单
agent
.
agent_id
=
$
(
this
).
attr
(
"data-id"
);
});
$
(
document
).
on
(
"click"
,
".edit-phone-btn"
,
function
()
{
//点击修改手机号
agent
.
agent_id
=
$
(
this
).
attr
(
"data-id"
);
agent
.
Edit
();
//获取编辑内容
});
$
(
document
).
on
(
"click"
,
".edit-phone-save"
,
function
()
{
//保存修改手机号
agent
.
Submit_edit_phone
();
//获取编辑内容
});
$
(
document
).
on
(
"click"
,
".phone-bundling"
,
function
()
{
//点击绑定手机
agent
.
agent_id
=
$
(
this
).
attr
(
"data-id"
);
agent
.
getPhoneBindingList
(
browser_version
);
});
$
(
document
).
on
(
"click"
,
".del-record"
,
function
()
{
//点击绑定电脑(清除绑定)
agent
.
getPhoneBindingDelList
();
});
$
(
document
).
on
(
"click"
,
".pc-bundling"
,
function
()
{
//点击绑定电脑
agent
.
agent_id
=
$
(
this
).
attr
(
"data-id"
);
agent
.
getPcBindingList
();
...
...
@@ -454,6 +466,8 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
if
(
data
.
code
==
200
)
{
if
(
data
.
data
)
{
agent
.
editObj
=
data
.
data
;
$
(
"#edit-phone"
).
val
(
data
.
data
.
phone
);
$
(
"input[name = id]"
).
val
(
data
.
data
.
id
);
$
(
"input[name = phone]"
).
val
(
data
.
data
.
phone
);
$
(
"input[name = name]"
).
val
(
data
.
data
.
name
);
...
...
@@ -557,6 +571,46 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
}
});
},
Submit_edit_phone
:
function
()
{
//修改手机号
//提交编辑的信息
var
params
=
{}
params
.
id
=
agent
.
agent_id
;
params
.
name
=
agent
.
editObj
.
name
;
params
.
password
=
agent
.
editObj
.
password
;
params
.
district_id
=
agent
.
editObj
.
district_id
;
params
.
store_id
=
agent
.
editObj
.
store_id
;
params
.
phone
=
$
(
"#edit-phone"
).
val
();
params
.
admin_off
=
agent
.
editObj
.
admin_off
;
params
.
sex
=
agent
.
editObj
.
sex
;
params
.
remarks
=
agent
.
editObj
.
remarks
;
if
(
params
.
phone
==
''
)
{
alert
(
'手机号必填!'
);
return
false
;
}
if
(
params
.
phone
.
length
!=
11
)
{
alert
(
'手机号码错误!'
);
return
false
;
}
$
.
ajax
({
'type'
:
'POST'
,
'url'
:
'/index/saveAgent'
,
data
:
params
,
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
alert
(
'提交成功'
);
$
(
"#modal-editPhone"
).
modal
(
'hide'
);
}
else
if
(
data
.
code
==
101
){
alert
(
data
.
msg
);
}
else
{
}
}
});
},
Submit_edit
:
function
()
{
//提交编辑的信息
...
...
@@ -832,6 +886,27 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
}
})
},
//手机绑定权限(清除绑定)
getPhoneBindingDelList
:
function
(
pageNo
)
{
var
params
=
{};
params
.
agent_id
=
agent
.
agent_id
;
$
.
ajax
({
url
:
'/index/deviceList'
,
//电脑绑定权限
type
:
'GET'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
var
temp
=
document
.
getElementById
(
'phone_del_binding_tpl'
).
innerHTML
;
var
doTempl
=
doT
.
template
(
temp
);
$
(
"#agent_phone_binding"
).
html
(
doTempl
(
data
.
data
));
console
.
log
(
555
)
/*分页代码*/
add_page
(
data
.
data
.
total
,
pageNo
,
agent
.
pageSize
,
agent
.
getList
);
$
(
'.J_preview'
).
preview
();
}
})
},
//电脑绑定权限
getPcBindingList
:
function
(
pageNo
)
{
var
params
=
{};
...
...
@@ -845,13 +920,14 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
success
:
function
(
data
)
{
var
temp
=
document
.
getElementById
(
'pc_binding_tpl'
).
innerHTML
;
var
doTempl
=
doT
.
template
(
temp
);
$
(
"#agent_pc_binding"
).
html
(
doTempl
(
data
.
data
));
//
$("#agent_pc_binding").html(doTempl(data.data));
/*分页代码*/
add_page
(
data
.
data
.
total
,
pageNo
,
agent
.
pageSize
,
agent
.
getList
);
$
(
'.J_preview'
).
preview
();
}
})
},
//记录状态
stateRecordList
:
function
(
pageNo
)
{
var
params
=
{};
...
...
public/resource/js/buildingDictionary.js
View file @
06d9282a
...
...
@@ -38,9 +38,14 @@ define(['doT', 'text!temp/building_dictionary_list_template_tpl.html','css!style
init
:
function
()
{
//初始化dot
$
(
"body"
).
append
(
template
);
//初始化城市 区域筛选
// 商铺列表 默认显示求租房源
//商铺列表 默认显示求租房源
$
(
'#lease_state'
).
val
(
1
);
//新增楼盘字典权限
if
(
check_auth
(
'office_index/houseDictionaryAdd'
)){
$
(
".add"
).
show
()
}
else
{
$
(
".add"
).
hide
()
}
business
.
getList
(
1
);
business
.
event
();
//显示 隐藏城市 默认显示 当前账号 所在城市
...
...
public/resource/template/agent_template_tpl.html
View file @
06d9282a
...
...
@@ -37,6 +37,7 @@
<
td
class
=
"number-evaluation text-center"
data
-
id
=
'[%= it[item]["id"] %]'
>--<
/td
>
<
td
class
=
"score-evaluation text-center"
data
-
id
=
'[%= it[item]["id"] %]'
>--<
/td
>
<
td
class
=
"text-center"
>
[
%
if
(
it
[
item
][
"status"
]
!=
3
)
{
%
]
<
a
class
=
"btn1 btn-success edit"
href
=
"#modal-edit"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
编辑
<
/a
>
[
%
if
(
it
[
item
][
"status"
]
==
2
)
{
%
]
<
a
class
=
"btn1 btn-warning yetai_checkbox isCheck"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
data
-
status
=
'[%= it[item]["status"] %]'
>
已离职
<
/a
>
...
...
@@ -73,6 +74,9 @@
[
%
}
%
]
<
a
class
=
"btn1 btn-default btn-default-hide-caozuo btn-default-hide-display"
><<<<
/a
>
[
%
}
else
{
%
]
<
a
class
=
"btn1 btn-success edit-phone-btn"
href
=
"#modal-editPhone"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
修改手机号
<
/a
>
[
%
}
%
]
<
/td
>
...
...
public/resource/template/building_dictionary_list_template_tpl.html
View file @
06d9282a
...
...
@@ -34,7 +34,11 @@
<
/td
>
<
td
>
<
a
class
=
"btn1 btn-success edit"
href
=
"#modal_add_loupan"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
编辑
<
/a
>
[
%
if
(
check_auth
(
'office_index/houseDictionaryEdit'
)){
%
]
<
a
class
=
"btn1 btn-success edit"
href
=
"#modal_add_loupan"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
编辑
<
/a
>
[
%
}
%
]
<
/td
>
<
/tr
>
[
%
}
%
]
...
...
public/resource/template/phoneBinding_template_tpl.html
View file @
06d9282a
...
...
@@ -31,4 +31,41 @@
<
td
colspan
=
"8"
style
=
"text-align:center;"
>
暂无数据
<
/td
>
<
/tr
>
[
%
}
%
]
</script>
<script
id=
"phone_del_binding_tpl"
type=
"text/template"
>
[
%
if
(
it
)
{
%
]
[
%
for
(
var
item
in
it
){
%
]
<
tr
class
=
"text-center"
>
[
%
if
(
it
[
item
][
"is_forbidden"
]
!=
1
){
%
]
<
td
>
[
%
if
(
it
[
item
][
"is_pc"
]
==
1
)
{
%
]
电脑端
[
%
}
else
if
(
it
[
item
][
"is_pc"
]
==
0
)
{
%
]
手机端
[
%
}
else
if
(
it
[
item
][
"is_pc"
]
==
2
){
%
]
Windows
客户端
[
%
}
else
{
%
]
其他
[
%
}
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"model"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"create_time"
]
%
]
<
/td
>
<
td
>
[
%
if
(
it
[
item
][
"is_forbidden"
]
==
0
)
{
%
]
<
a
class
=
"btn1 btn-default is_show2"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
解绑
<
/a
>
[
%
}
else
if
(
it
[
item
][
"is_forbidden"
]
==
1
)
{
%
]
<
a
class
=
"btn1 btn-info is_show2"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
允许
<
/a
>
[
%
}
else
{
%
]
<
a
class
=
"btn1 btn-default"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
离职
<
/a
>
[
%
}
%
]
<!--<
a
class
=
"btn1 btn-info review-images"
href
=
"#modal-time"
data
-
toggle
=
"modal"
data
-
img
=
'[%= it[item]["scene_photo"] %]'
>
允许
<
/a>--
>
<
/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