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
8ea42836
Commit
8ea42836
authored
Dec 17, 2018
by
zw
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/1210-v3.0.2' into 1210-v3.0.2
parents
527ed7a0
a946d8d0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
55 deletions
+41
-55
Finance.php
application/index/controller/Finance.php
+35
-4
OPayLogModel.php
application/model/OPayLogModel.php
+4
-50
route.php
application/route.php
+1
-0
receivables.js
public/resource/js/receivables.js
+1
-1
No files found.
application/index/controller/Finance.php
View file @
8ea42836
...
@@ -2436,8 +2436,9 @@ class Finance extends Basic
...
@@ -2436,8 +2436,9 @@ class Finance extends Basic
if
(
$v
[
'type'
]
==
92
)
{
if
(
$v
[
'type'
]
==
92
)
{
//案场费 对应业务员:盘方
//案场费 对应业务员:盘方
$current_agent_name
=
$m_agent_house
->
getHousesAgents
(
$v
[
'house_id'
],
'b.name,b.store_id'
,
[
'a.type'
=>
2
]);
$current_agent_name
=
$m_agent_house
->
getHousesAgents
(
$v
[
'house_id'
],
'b.name,b.store_id'
,
[
'a.type'
=>
2
]);
$list
[
$k
][
'current_agent_name'
]
=
$current_agent_name
[
'name'
];
$list
[
$k
][
'current_agent_name'
]
=
empty
(
$current_agent_name
[
'name'
])
?
''
:
$current_agent_name
[
'name'
];
$list
[
$k
][
'store_name'
]
=
$m_store
->
getStoreKeyById
(
'store_name'
,
[
'id'
=>
$current_agent_name
[
'store_id'
]]);
$store_name
=
$m_store
->
getStoreKeyById
(
'store_name'
,
[
'id'
=>
$current_agent_name
[
'store_id'
]]);
$list
[
$k
][
'store_name'
]
=
empty
(
$store_name
)
?
''
:
$store_name
;
}
}
if
(
$v
[
'type'
]
==
10
||
$v
[
'type'
]
==
30
||
$v
[
'type'
]
==
91
)
{
if
(
$v
[
'type'
]
==
10
||
$v
[
'type'
]
==
30
||
$v
[
'type'
]
==
91
)
{
...
@@ -2445,9 +2446,10 @@ class Finance extends Basic
...
@@ -2445,9 +2446,10 @@ class Finance extends Basic
//中介费 对应业务员:约带看的人 即 反签方
//中介费 对应业务员:约带看的人 即 反签方
$current_agent_name
=
$m_march
->
getInfo
(
'reception_name,reception_id'
,
[
'order_id'
=>
$v
[
'order_id'
]]);
$current_agent_name
=
$m_march
->
getInfo
(
'reception_name,reception_id'
,
[
'order_id'
=>
$v
[
'order_id'
]]);
if
(
!
empty
(
$current_agent_name
[
'reception_id'
]))
{
if
(
!
empty
(
$current_agent_name
[
'reception_id'
]))
{
$list
[
$k
][
'store_name'
]
=
$m_agent
->
getAgentByIdV2
(
'b.store_name'
,
[
'a.id'
=>
$current_agent_name
[
'reception_id'
]]);
$store_name
=
$m_agent
->
getAgentByIdV2
(
'b.store_name'
,
[
'a.id'
=>
$current_agent_name
[
'reception_id'
]]);
$list
[
$k
][
'store_name'
]
=
empty
(
$store_name
)
?
''
:
$store_name
;
}
}
$list
[
$k
][
'current_agent_name'
]
=
empty
(
$current_agent_name
[
'reception_name'
])
?
""
:
$current_agent_name
[
'reception_name'
];
$list
[
$k
][
'current_agent_name'
]
=
empty
(
$current_agent_name
[
'reception_name'
])
?
''
:
$current_agent_name
[
'reception_name'
];
}
}
if
(
!
empty
(
$v
[
'income_time'
]))
{
if
(
!
empty
(
$v
[
'income_time'
]))
{
...
@@ -3320,4 +3322,33 @@ class Finance extends Basic
...
@@ -3320,4 +3322,33 @@ class Finance extends Basic
}
}
return
empty
(
$price
)
?
''
:
$price
;
return
empty
(
$price
)
?
''
:
$price
;
}
}
/**
* 删除收款
*
* @return \think\Response
*/
public
function
delPayLog
()
{
$code
=
101
;
$msg
=
''
;
if
(
empty
(
$this
->
params
[
'pay_id'
]))
{
return
$this
->
response
(
$code
,
'参数错误'
);
}
$m_pay_adjustment
=
new
OPayLogAdjustment
();
$pay_id
=
$m_pay_adjustment
->
getFieldValue
(
'id'
,
[
'paylog_id'
=>
$this
->
params
[
'pay_id'
]]);
if
(
$pay_id
)
{
return
$this
->
response
(
$code
,
'该收款有调整信息,不能删除'
);
}
$m_pay
=
new
OPayLogModel
();
$num
=
$m_pay
->
updatePayLog
([
'is_del'
=>
1
,
'id'
=>
$this
->
params
[
'pay_id'
]]);
if
(
$num
>
0
)
{
$code
=
200
;
}
else
{
$code
=
101
;
$msg
=
'删除失败'
;
}
return
$this
->
response
(
$code
,
$msg
);
}
}
}
application/model/OPayLogModel.php
View file @
8ea42836
...
@@ -332,40 +332,16 @@ class OPayLogModel extends Model
...
@@ -332,40 +332,16 @@ class OPayLogModel extends Model
public
function
getAddPayLogOrderListLimit
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
=
''
,
$params
=
''
)
public
function
getAddPayLogOrderListLimit
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
=
''
,
$params
=
''
)
{
{
$params
[
"a.is_del"
]
=
0
;
$params
[
"a.is_del"
]
=
0
;
if
(
isset
(
$params
[
'e.name'
])
||
isset
(
$params
[
'f.store_name'
])
||
isset
(
$params
[
'e.phone'
]))
{
return
$this
->
db_
->
field
(
$field
)
$data
=
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.order_id = b.id"
,
"left"
)
// ->join("o_report c", "b.f_id = c.id", "left")
->
join
(
'g_houses d'
,
'b.house_id = d.id'
,
'left'
)
->
join
(
'a_agents e'
,
'a.agent_id=e.id'
,
'left'
)
// ->join('a_store f', 'e.store_id=f.id', 'left')
// ->join('a_district g', 'f.district_id=g.id', 'left')
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
order
(
$order_
)
->
where
(
$params
)
->
select
();
}
else
{
$data
=
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
alias
(
"a"
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.order_id = b.id"
,
"left"
)
->
join
(
"o_order b"
,
"a.order_id = b.id"
,
"left"
)
// ->join("o_report c", "b.f_id = c.id", "left")
->
join
(
'g_houses d'
,
'b.house_id = d.id'
,
'left'
)
->
join
(
'g_houses d'
,
'b.house_id = d.id'
,
'left'
)
->
join
(
'a_agents e'
,
'a.agent_id=e.id'
,
'left'
)
->
join
(
'a_agents e'
,
'a.agent_id=e.id'
,
'left'
)
// ->join('a_store f', 'e.store_id=f.id', 'left')
// ->join('a_district g', 'f.district_id=g.id', 'left')
->
limit
(
$pageSize
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
page
(
$pageNo
)
->
order
(
$order_
)
->
order
(
$order_
)
->
where
(
$params
)
->
where
(
$params
)
->
select
();
->
select
();
}
return
$data
;
}
}
/**
/**
...
@@ -377,28 +353,12 @@ class OPayLogModel extends Model
...
@@ -377,28 +353,12 @@ class OPayLogModel extends Model
public
function
getAddPayLogOrderListLimitTotal
(
$params
=
''
)
public
function
getAddPayLogOrderListLimitTotal
(
$params
=
''
)
{
{
$params
[
"a.is_del"
]
=
0
;
$params
[
"a.is_del"
]
=
0
;
if
(
isset
(
$params
[
'e.name'
])
||
isset
(
$params
[
'f.store_name'
])
||
isset
(
$params
[
'e.phone'
]))
{
return
$this
->
db_
->
alias
(
"a"
)
$data
=
Db
::
table
(
$this
->
table
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.order_id = b.id"
,
"left"
)
// ->join("o_report c", "b.f_id = c.id", "left")
->
join
(
'g_houses d'
,
'b.house_id = d.id'
,
'left'
)
->
join
(
'a_agents e'
,
'a.agent_id=e.id'
,
'left'
)
// ->join('a_store f', 'e.store_id=f.id', 'left')
// ->join('a_district g', 'f.district_id=g.id', 'left')
->
where
(
$params
)
->
count
();
}
else
{
$data
=
Db
::
table
(
$this
->
table
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.order_id = b.id"
,
"left"
)
->
join
(
"o_order b"
,
"a.order_id = b.id"
,
"left"
)
// ->join("o_report c", "b.f_id = c.id", "left")
->
join
(
'g_houses d'
,
'b.house_id = d.id'
,
'left'
)
->
join
(
'g_houses d'
,
'b.house_id = d.id'
,
'left'
)
->
join
(
'a_agents e'
,
'a.agent_id=e.id'
,
'left'
)
->
join
(
'a_agents e'
,
'a.agent_id=e.id'
,
'left'
)
// ->join('a_store f', 'e.store_id=f.id', 'left')
// ->join('a_district g', 'f.district_id=g.id', 'left')
->
where
(
$params
)
->
where
(
$params
)
->
count
();
->
count
();
}
return
$data
;
}
}
/**
/**
...
@@ -416,22 +376,16 @@ class OPayLogModel extends Model
...
@@ -416,22 +376,16 @@ class OPayLogModel extends Model
$data
=
Db
::
table
(
$this
->
table
)
$data
=
Db
::
table
(
$this
->
table
)
->
alias
(
"a"
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.order_id = b.id"
,
"left"
)
->
join
(
"o_order b"
,
"a.order_id = b.id"
,
"left"
)
// ->join("o_report c", "b.f_id = c.id", "left")
->
join
(
'g_houses d'
,
'b.house_id = d.id'
,
'left'
)
->
join
(
'g_houses d'
,
'b.house_id = d.id'
,
'left'
)
->
join
(
'a_agents e'
,
'c.report_agent_id=e.id'
,
'left'
)
->
join
(
'a_agents e'
,
'a.agent_id=e.id'
,
'left'
)
// ->join('a_store f', 'e.store_id=f.id', 'left')
// ->join('a_district g', 'f.district_id=g.id', 'left')
->
where
(
$where
)
->
where
(
$where
)
->
sum
(
$field
);
->
sum
(
$field
);
}
else
{
}
else
{
$data
=
Db
::
table
(
$this
->
table
)
$data
=
Db
::
table
(
$this
->
table
)
->
alias
(
"a"
)
->
alias
(
"a"
)
->
join
(
"o_order b"
,
"a.order_id = b.id"
,
"left"
)
->
join
(
"o_order b"
,
"a.order_id = b.id"
,
"left"
)
// ->join("o_report c", "b.f_id = c.id", "left")
->
join
(
'g_houses d'
,
'b.house_id = d.id'
,
'left'
)
->
join
(
'g_houses d'
,
'b.house_id = d.id'
,
'left'
)
->
join
(
'a_agents e'
,
'c.report_agent_id=e.id'
,
'left'
)
->
join
(
'a_agents e'
,
'a.agent_id=e.id'
,
'left'
)
// ->join('a_store f', 'e.store_id=f.id', 'left')
// ->join('a_district g', 'f.district_id=g.id', 'left')
->
where
(
$where
)
->
where
(
$where
)
->
sum
(
$field
);
->
sum
(
$field
);
...
...
application/route.php
View file @
8ea42836
...
@@ -281,6 +281,7 @@ Route::group('index', [
...
@@ -281,6 +281,7 @@ Route::group('index', [
'delAdjustment'
=>
[
'index/Finance/delAdjustment'
,
[
'method'
=>
'post'
]],
//撤销调整
'delAdjustment'
=>
[
'index/Finance/delAdjustment'
,
[
'method'
=>
'post'
]],
//撤销调整
'getAdjustmentDetail'
=>
[
'index/Finance/getAdjustmentDetail'
,
[
'method'
=>
'get'
]],
//调整详情
'getAdjustmentDetail'
=>
[
'index/Finance/getAdjustmentDetail'
,
[
'method'
=>
'get'
]],
//调整详情
'getPayLogTotalPrice'
=>
[
'index/Finance/getPayLogTotalPrice'
,
[
'method'
=>
'get'
]],
//佣金统计
'getPayLogTotalPrice'
=>
[
'index/Finance/getPayLogTotalPrice'
,
[
'method'
=>
'get'
]],
//佣金统计
'delPayLog'
=>
[
'index/Finance/delPayLog'
,
[
'method'
=>
'POST'
]],
//删除收款
'performanceInfo'
=>
[
'index/PerformanceInfo/performanceInfo'
,
[
'method'
=>
'post|get'
]],
//业绩明细
'performanceInfo'
=>
[
'index/PerformanceInfo/performanceInfo'
,
[
'method'
=>
'post|get'
]],
//业绩明细
'getPerformanceInfoExcel'
=>
[
'index/PerformanceInfo/getPerformanceInfoExcel'
,
[
'method'
=>
'post|get'
]],
//业绩明细
'getPerformanceInfoExcel'
=>
[
'index/PerformanceInfo/getPerformanceInfoExcel'
,
[
'method'
=>
'post|get'
]],
//业绩明细
...
...
public/resource/js/receivables.js
View file @
8ea42836
...
@@ -571,7 +571,7 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
...
@@ -571,7 +571,7 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
that
.
listData
=
data
.
data
.
list
;
that
.
listData
=
data
.
data
.
list
;
var
doTtmpl
=
doT
.
template
(
document
.
getElementById
(
'receivables_template_tpl'
).
innerHTML
);
var
doTtmpl
=
doT
.
template
(
document
.
getElementById
(
'receivables_template_tpl'
).
innerHTML
);
$
(
"#order_list"
).
html
(
doTtmpl
(
data
.
data
.
list
));
$
(
"#order_list"
).
html
(
doTtmpl
(
data
.
data
.
list
));
//
$("#money_total").html(data.data.money_total)
$
(
"#money_total"
).
html
(
data
.
data
.
money_total
)
/*分页代码*/
/*分页代码*/
add_page
(
data
.
data
.
total
,
no
,
that
.
pageSize
,
that
.
getList
);
add_page
(
data
.
data
.
total
,
no
,
that
.
pageSize
,
that
.
getList
);
...
...
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