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
dd346f56
Commit
dd346f56
authored
May 21, 2018
by
hujun
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test' of
https://gitee.com/zwyjjc/tl_estate
into test
parents
c46f7703
50a3251a
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
66 additions
and
21 deletions
+66
-21
.gitattributes
application/.gitattributes
+2
-0
Shop.php
application/api/controller/Shop.php
+1
-1
Shop.php
application/api_broker/controller/Shop.php
+1
-1
Statement.php
application/api_broker/controller/Statement.php
+4
-1
PerformanceService.php
application/api_broker/service/PerformanceService.php
+2
-1
StatementService.php
application/api_broker/service/StatementService.php
+7
-2
daily_my.html
application/app_broker/view/index/daily_my.html
+1
-1
database.php
application/database.php
+3
-1
Member.php
application/index/controller/Member.php
+1
-1
auth_rule_index.html
application/index/view/auth/auth_rule_index.html
+1
-1
index.html
application/index/view/store/index.html
+2
-1
AAgents.php
application/model/AAgents.php
+1
-0
OReportModel.php
application/model/OReportModel.php
+19
-0
Users.php
application/model/Users.php
+2
-2
agent.js
public/resource/js/agent.js
+15
-4
auth_rule_index.js
public/resource/js/auth_rule_index.js
+1
-1
storeList.js
public/resource/js/storeList.js
+2
-2
agent_template_tpl.html
public/resource/template/agent_template_tpl.html
+1
-1
No files found.
application/.gitattributes
0 → 100644
View file @
dd346f56
database.php merge=ours
\ No newline at end of file
application/api/controller/Shop.php
View file @
dd346f56
...
...
@@ -183,7 +183,7 @@ class Shop extends Basic
//todo 这里的是否要更改成b端后台上传的类型
$param
[
"imgtype"
]
=
2
;
$result
[
"images"
]
=
$this
->
dbImg
->
getHouseImages
(
$param
,
15
);
$param
[
"imgtype"
]
=
4
;
//图片类型:1效果图,2实景图,3样板图,4户型图,5交通图
$param
[
"imgtype"
]
=
3
;
//图片类型:1列表页封面图,2详情页轮播图,3楼层平面图,4独家合同,5,删除
$result
[
"plan_images"
]
=
$this
->
dbImg
->
getHouseImages
(
$param
,
4
);
if
(
$result
[
'room_num_left'
]
==
0
)
{
...
...
application/api_broker/controller/Shop.php
View file @
dd346f56
...
...
@@ -258,7 +258,7 @@ class Shop extends Basic
//todo 这里的是否要更改成b端后台上传的类型
$param
[
"img_type"
]
=
2
;
$result
[
"images"
]
=
$this
->
gHousesImgModel
->
getHouseImages
(
$param
,
15
);
$param
[
"img_type"
]
=
4
;
//图片类型:1效果图,2实景图,3样板图,4户型图,5交通图
$param
[
"img_type"
]
=
3
;
//图片类型:1效果图,2实景图,3样板图,4户型图,5交通图
$result
[
"plan_images"
]
=
$this
->
gHousesImgModel
->
getHouseImages
(
$param
,
1
);
if
(
$result
[
'status'
]
==
0
)
{
...
...
application/api_broker/controller/Statement.php
View file @
dd346f56
...
...
@@ -40,11 +40,14 @@ class Statement extends Basic
"time_start" => date("Y-m-d", time()),
"time_end" => date("Y-m-d", time()) . " 23:59:59",
);*/
if
(
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"time_start"
])
||
!
isset
(
$params
[
"time_end"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
$time_end
=
$params
[
"time_end"
]
.
" 23:59:59"
;
try
{
$result
=
$this
->
service_
->
selectStatementByAgentId
(
$params
[
"agent_id"
],
$params
[
"time_start"
],
$
params
[
"time_end"
]
);
$result
=
$this
->
service_
->
selectStatementByAgentId
(
$params
[
"agent_id"
],
$params
[
"time_start"
],
$
time_end
);
if
(
count
(
$result
)
>
0
)
{
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
else
{
...
...
application/api_broker/service/PerformanceService.php
View file @
dd346f56
...
...
@@ -434,8 +434,9 @@ class PerformanceService
if
(
count
(
$list
)
>
0
)
{
foreach
(
$list
as
$key
=>
$item
)
{
$fields
=
"
a
.name,b.store_name"
;
$fields
=
"
c
.name,b.store_name"
;
$where_
[
"a.store_id"
]
=
$item
[
"store_id"
];
$where_
[
"c.id"
]
=
$item
[
"agent_id"
];
$info
=
$this
->
agentModel
->
getStoreOrAgentInfo
(
$fields
,
$where_
);
if
(
count
(
$info
)
>
0
)
{
$list
[
$key
][
"store_name"
]
=
$info
[
0
][
"store_name"
];
...
...
application/api_broker/service/StatementService.php
View file @
dd346f56
...
...
@@ -5,6 +5,7 @@ namespace app\api_broker\service;
use
app\model\AAgents
;
use
app\model\FollowUpLogModel
;
use
app\model\GHouses
;
use
app\model\OReportModel
;
use
app\model\Users
;
/**
...
...
@@ -21,6 +22,7 @@ class StatementService
private
$houseModel
;
private
$userModel
;
private
$followUpModel
;
private
$reportModel
;
const
USER_LEVEL_FIST
=
0
;
//经纪人
const
USER_LEVEL_SECOND
=
1
;
//店长
...
...
@@ -32,6 +34,7 @@ class StatementService
$this
->
houseModel
=
new
GHouses
();
$this
->
userModel
=
new
Users
();
$this
->
followUpModel
=
new
FollowUpLogModel
();
$this
->
reportModel
=
new
OReportModel
();
}
/**
...
...
@@ -127,7 +130,8 @@ class StatementService
$result
[
"agent_total"
]
=
$agent_total
;
$result
[
"house_num"
]
=
$this
->
houseModel
->
getAddHouseNumByAgentId
(
$conditions
);
$result
[
"user_num"
]
=
$this
->
userModel
->
getAddUserNumByAgentId
(
$conditions
);
$result
[
"follow_up_num"
]
=
$this
->
followUpModel
->
getAddFollowUpNumByAgentId
(
$conditions
);
//$result["follow_up_num"] = $this->followUpModel->getAddFollowUpNumByAgentId($conditions);
$result
[
"follow_up_num"
]
=
$this
->
reportModel
->
getAddFollowUpNumByAgentId
(
$conditions
);
//todo
$result
[
"store_list"
]
=
$store_list
;
...
...
@@ -153,7 +157,8 @@ class StatementService
$store_list
[
"agent_name"
]
=
$agent_name
;
$store_list
[
"house_num"
]
=
$this
->
houseModel
->
getAddHouseNumByAgentId
(
$conditions_
);
$store_list
[
"user_num"
]
=
$this
->
userModel
->
getAddUserNumByAgentId
(
$conditions_
);
$store_list
[
"follow_up_num"
]
=
$this
->
followUpModel
->
getAddFollowUpNumByAgentId
(
$conditions_
);
//$store_list["follow_up_num"] = $this->followUpModel->getAddFollowUpNumByAgentId($conditions_);
$store_list
[
"follow_up_num"
]
=
$this
->
reportModel
->
getAddFollowUpNumByAgentId
(
$conditions_
);
return
$store_list
;
}
...
...
application/app_broker/view/index/daily_my.html
View file @
dd346f56
...
...
@@ -23,7 +23,7 @@
<tbody
id=
"appendArea"
>
<tr>
<th>
上传时间
</th>
<th>
周
报
</th>
<th>
日
报
</th>
</tr>
<tr
v-for=
"(item, index) in dataList"
:key=
"item.id"
>
<td>
{{item.create_time}}
</td>
...
...
application/database.php
View file @
dd346f56
...
...
@@ -25,7 +25,9 @@ return [
// 'password' => '123456',
// 端口
'hostport'
=>
'3308'
,
// 'hostport' => '',
//'hostport' => '',
// 连接dsn
'dsn'
=>
''
,
// 数据库连接参数
...
...
application/index/controller/Member.php
View file @
dd346f56
...
...
@@ -141,7 +141,7 @@ class Member extends Basic{
//注册时间
if
(
!
empty
(
$params
[
'registration_end'
])
&&
empty
(
$params
[
'registration_start'
]))
{
$where
[
'a.registration_time'
]
=
[
'< time'
,
$params
[
'registration_
start
'
]
.
' 23:59:59'
];
$where
[
'a.registration_time'
]
=
[
'< time'
,
$params
[
'registration_
end
'
]
.
' 23:59:59'
];
}
//注册时间
...
...
application/index/view/auth/auth_rule_index.html
View file @
dd346f56
...
...
@@ -8,7 +8,7 @@
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading breadcrumb"
>
<li><a
href=
"#"
>
权限管理
</a></li>
<li
class=
"active"
>
新增
</li>
<li
class=
"active"
>
新增
66
</li>
<div
class=
"pull-right"
>
<ul
class=
"bread_btn"
>
<li>
...
...
application/index/view/store/index.html
View file @
dd346f56
...
...
@@ -289,7 +289,8 @@
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
所属部门:
</label>
<!--<input type="text" value="" name="ss-store" class="form-control btn6" placeholder="所属部门">-->
<select
name=
"ss-store"
class=
"form-control btn6"
id=
"ss-store"
>
<select
name=
"ss-store"
class=
"form-control btn6"
id=
"ss-store"
>
<option
value=
""
selected=
"selected"
>
请选择
</option>
</select>
</div>
...
...
application/model/AAgents.php
View file @
dd346f56
...
...
@@ -568,6 +568,7 @@ class AAgents extends BaseModel
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
"a_store b"
,
"a.store_id = b.id"
,
"left"
)
->
join
(
"a_agents c"
,
"a.store_id = c.store_id"
,
"left"
)
->
where
(
$params
)
->
where
(
'a.level'
,
[
'='
,
20
],
[
'='
,
40
],
'or'
)
->
select
();
...
...
application/model/OReportModel.php
View file @
dd346f56
...
...
@@ -448,4 +448,22 @@ class OReportModel extends Model
->
where
(
$params
)
->
select
();
}
/**
* 获取经纪人新增带看数量
* @param $params
* @return int|string
*/
public
function
getAddFollowUpNumByAgentId
(
$params
){
$where_
=
[];
if
(
isset
(
$params
[
"agent_id"
])){
$where_
[
"report_agent_id"
]
=
$params
[
"agent_id"
];
}
if
(
isset
(
$params
[
"create_time"
])){
$where_
[
"create_time"
]
=
$params
[
"create_time"
];
}
return
Db
::
name
(
$this
->
table
)
->
where
(
$where_
)
->
count
();
}
}
\ No newline at end of file
application/model/Users.php
View file @
dd346f56
...
...
@@ -330,7 +330,7 @@ class Users extends Model
$field
=
"count(1) as num,DATE(create_time) as day"
;
$where_
=
[];
if
(
isset
(
$params
[
"agent_id"
])){
$where_
[
"
referrer
_id"
]
=
$params
[
"agent_id"
];
$where_
[
"
agent
_id"
]
=
$params
[
"agent_id"
];
}
if
(
isset
(
$params
[
"create_time"
])){
$where_
[
"create_time"
]
=
$params
[
"create_time"
];
...
...
@@ -346,7 +346,7 @@ class Users extends Model
$field
=
"count(1) as num"
;
$where_
=
[];
if
(
isset
(
$params
[
"agent_id"
])){
$where_
[
"
referrer
_id"
]
=
$params
[
"agent_id"
];
$where_
[
"
agent
_id"
]
=
$params
[
"agent_id"
];
}
if
(
isset
(
$params
[
"create_time"
])){
$where_
[
"create_time"
]
=
$params
[
"create_time"
];
...
...
public/resource/js/agent.js
View file @
dd346f56
...
...
@@ -42,9 +42,11 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
agent
.
Submit_edit
();
});
$
(
document
).
delegate
(
"#role"
,
"click"
,
function
()
{
//变更角色
$
(
document
).
delegate
(
"#role"
,
"click"
,
function
(
e
)
{
//变更角色
var
_this
=
$
(
this
);
var
_tempVal
=
_this
.
closest
(
'tr'
).
attr
(
'data-groupname'
);
agent
.
agent_id
=
$
(
this
).
attr
(
"data-id"
);
agent
.
getRole
();
agent
.
getRole
(
_tempVal
);
});
$
(
document
).
delegate
(
".submit_user"
,
"click"
,
function
()
{
//提交变更
...
...
@@ -118,6 +120,8 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
$
(
"#remarks"
).
val
(
data
.
data
.
remarks
);
$
(
"#password"
).
val
(
data
.
data
.
password
);
$
(
"input[name='password']"
).
attr
(
'form-group'
);
// store.getDistrict(data.data.district_name);
if
(
data
.
data
.
sex
==
'0'
)
{
$
(
"#sex0"
).
attr
(
'checked'
,
true
);
}
else
if
(
data
.
data
.
sex
==
'1'
)
{
...
...
@@ -146,6 +150,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
params
.
status
=
$
(
"#status"
).
val
();
params
.
password
=
$
(
"input[name='password']"
).
val
();
if
(
params
.
phone
==
''
)
{
alert
(
'手机号必填!'
);
return
false
;
...
...
@@ -202,7 +207,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
}
})
},
getRole
:
function
()
{
getRole
:
function
(
tempval
)
{
$
.
ajax
({
url
:
'/index/getAuth2'
,
type
:
'GET'
,
...
...
@@ -211,10 +216,16 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'css!style/home.css', 'pagin
dataType
:
'json'
,
success
:
function
(
data
)
{
var
User_add
=
""
;
var
_tempid
;
$
.
each
(
data
.
data
.
list
,
function
(
i
,
item
){
User_add
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
title
+
'</option>'
;
if
(
item
.
title
==
tempval
){
_tempid
=
item
.
id
;
console
.
log
(
item
.
id
);
};
});
$
(
"#edit_role"
).
html
(
User_add
);
console
.
log
(
_tempid
);
$
(
"#edit_role"
).
html
(
User_add
).
val
(
_tempid
);
}
});
...
...
public/resource/js/auth_rule_index.js
View file @
dd346f56
...
...
@@ -84,7 +84,7 @@ authRule={
dataType
:
"json"
,
success
:
function
(
data
)
{
$
(
"input[name = id]"
).
val
(
data
.
data
.
id
);
$
(
"input[name = title]"
).
val
(
data
.
data
.
title
);
$
(
"input[name = title]"
).
val
(
data
.
data
.
title
2
);
$
(
"input[name = name]"
).
val
(
data
.
data
.
name
);
$
(
"input[name = sort]"
).
val
(
data
.
data
.
sort
);
$
(
"#pid"
).
val
(
data
.
data
.
pid
);
...
...
public/resource/js/storeList.js
View file @
dd346f56
...
...
@@ -360,10 +360,10 @@ define(['doT', 'text!temp/store_template_tpl.html', 'css!style/home.css', 'ckfin
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
var
_html
=
''
;
var
_html
=
'
<option value="" selected="selected">请选择</option>
'
;
$
.
each
(
data
.
data
,
function
(
i
,
n
)
{
if
(
n
.
district_name
==
name
&&
(
typeof
name
!=
undefined
))
{
_html
+=
'<option
selected="selected
" value="'
+
n
.
id
+
'">'
+
n
.
district_name
+
'</option>'
;
_html
+=
'<option" value="'
+
n
.
id
+
'">'
+
n
.
district_name
+
'</option>'
;
}
else
{
_html
+=
'<option value="'
+
n
.
id
+
'">'
+
n
.
district_name
+
'</option>'
;
}
...
...
public/resource/template/agent_template_tpl.html
View file @
dd346f56
<script
id=
"agent_tpl"
type=
"text/template"
>
[
%
if
(
it
)
{
%
]
[
%
for
(
var
item
in
it
){
%
]
<
tr
>
<
tr
data
-
groupname
=
"[%= it[item]['groupname'] %]"
>
<
td
>
[
%=
it
[
item
][
"create_time"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"id"
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"name"
]
%
]
<
/td
>
...
...
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