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
70570468
Commit
70570468
authored
Jul 27, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改分佣方记录
parent
1d9e1c51
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
19 deletions
+47
-19
Finance.php
application/index/controller/Finance.php
+27
-7
AAgents.php
application/model/AAgents.php
+3
-2
OBargainModel.php
application/model/OBargainModel.php
+16
-9
route.php
application/route.php
+1
-1
No files found.
application/index/controller/Finance.php
View file @
70570468
...
...
@@ -468,7 +468,6 @@ class Finance extends Basic
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* @throws \think\exception\PDOException
*/
public
function
overRule
()
{
...
...
@@ -1038,7 +1037,7 @@ class Finance extends Basic
$data
[
'code'
]
=
200
;
$data
[
'msg'
]
=
""
;
$
whereOr
=
$
data
[
'data'
]
=
$excel_data
=
[];
$data
[
'data'
]
=
$excel_data
=
[];
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
15
:
$this
->
params
[
'pageSize'
];
...
...
@@ -1400,13 +1399,16 @@ class Finance extends Basic
return
$this
->
response
(
$result
[
'code'
],
$result
[
'msg'
]);
}
/**
* 成交报告分佣方详情
*
* @return type
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getBargain
o
Commission
()
{
public
function
getBargainCommission
()
{
if
(
empty
(
$this
->
params
[
'bargain_id'
]))
{
return
$this
->
response
(
101
,
'成交报告id为空'
);
}
...
...
@@ -1430,7 +1432,25 @@ class Finance extends Basic
$update
[
'agent_id'
]
=
$this
->
params
[
'agent_id'
];
$update
[
'scale'
]
=
$this
->
params
[
'scale'
];
$data
=
$m_bargain
->
updateBargainById
(
$this
->
params
[
'bargain_id'
],
$update
);
/*记录日志 start*/
$bargain_data
=
$m_bargain
->
selectBargainByOrderNo
(
'agent_id,father_id'
,
[
'id'
=>
$this
->
params
[
'bargain_id'
]]);
$father_id
=
$this
->
params
[
'bargain_id'
];
if
(
$bargain_data
[
0
][
'father_id'
]
!=
0
)
{
$father_id
=
$bargain_data
[
0
][
'father_id'
];
}
$agent_id
[
0
]
=
$bargain_data
[
0
][
'agent_id'
];
$agent_id
[
1
]
=
$this
->
params
[
'agent_id'
];
$m_agent
=
new
AAgents
();
$agent_data
=
$m_agent
->
getAgentById
(
'id,name,phone'
,
[
'in_id'
=>
$agent_id
]);
$content
=
'修改成交报告【编号:'
.
$father_id
.
'】【分佣方:'
.
$agent_data
[
0
][
'name'
]
.
'-'
.
$agent_data
[
0
][
'phone'
]
.
'修改为:'
.
$agent_data
[
1
][
'name'
]
.
'-'
.
$agent_data
[
1
][
'phone'
]
.
'】'
;
$this
->
editRecordLog
(
$this
->
params
[
'bargain_id'
],
$content
);
/*记录日志 end*/
return
$this
->
response
(
200
,
'修改成功'
,
$data
);
}
}
application/model/AAgents.php
View file @
70570468
...
...
@@ -272,8 +272,9 @@ class AAgents extends BaseModel
if
(
isset
(
$params
[
"level"
]))
{
$where_
[
"level"
]
=
$params
[
"level"
];
}
if
(
isset
(
$params
[
'in_id'
]))
{
$where_
[
'id'
]
=
[
'in'
,
$params
[
'in_id'
]];
}
$result
=
$this
->
field
(
$field
)
->
where
(
$where_
)
->
select
();
...
...
application/model/OBargainModel.php
View file @
70570468
...
...
@@ -98,7 +98,9 @@ class OBargainModel extends Model
if
(
isset
(
$params
[
"agent_id"
]))
{
$where_
[
"agent_id"
]
=
$params
[
"agent_id"
];
}
if
(
isset
(
$params
[
'id'
]))
{
$where_
[
'id'
]
=
$params
[
'id'
];
}
return
$this
->
db_
->
field
(
$filed
)
->
where
(
$where_
)
...
...
@@ -108,8 +110,12 @@ class OBargainModel extends Model
/**
* 根据商铺号查询成交报告中业态
*
* @param $house_id
* @return false|\PDOStatement|string|\think\Collection
* @return string
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
selectBargainListByHouseId
(
$house_id
)
{
...
...
@@ -1113,14 +1119,15 @@ class OBargainModel extends Model
->
where
(
'a.id'
,
$id
)
->
find
();
}
/**
* 成交报告分佣方详情
*
* @param type $param
* @return boolean
* 成交报告分佣方详情
*
* @param $filed
* @param $params
* @return array|bool|false|\PDOStatement|string|Model
*/
public
function
getBargainPartialDetail
(
$filed
,
$param
)
{
public
function
getBargainPartialDetail
(
$filed
,
$param
s
)
{
$where_
=
$whereOr_
=
[];
if
(
isset
(
$param
[
"bargain_id"
]))
{
$where_
[
"a.id"
]
=
$params
[
"bargain_id"
];
...
...
@@ -1128,7 +1135,7 @@ class OBargainModel extends Model
}
if
(
isset
(
$param
[
'id'
]))
{
$where_
[
'a.id'
]
=
$param
[
'id'
];
$where_
[
'a.id'
]
=
$param
s
[
'id'
];
}
try
{
...
...
application/route.php
View file @
70570468
...
...
@@ -234,7 +234,7 @@ Route::group('index', [
'checkOver'
=>
[
'index/Finance/checkOver'
,
[
'method'
=>
'POST'
]
],
//财务结单
'delPartialCommission'
=>
[
'index/Finance/delPartialCommission'
,
[
'method'
=>
'POST'
]
],
//删除分佣方
'delTaxes'
=>
[
'index/Finance/delTaxes'
,
[
'method'
=>
'POST'
]
],
//删除开票税费
'getBargain
oCommission'
=>
[
'index/Finance/getBargaino
Commission'
,
[
'method'
=>
'GET|POST'
]
],
//获取成交报告分佣方佣金和修改
'getBargain
Commission'
=>
[
'index/Finance/getBargain
Commission'
,
[
'method'
=>
'GET|POST'
]
],
//获取成交报告分佣方佣金和修改
'addReceiptImg'
=>
[
'index/Collection/addReceiptImg'
,
[
'method'
=>
'post|get'
]
],
//收款图片信息保存
'deleteReceiptImg'
=>
[
'index/Collection/deleteReceiptImg'
,
[
'method'
=>
'post|get'
]
],
//删除收款图片
'receiptImgList'
=>
[
'index/Collection/receiptImgList'
,
[
'method'
=>
'post|get'
]
],
//收款列表-收款图片列表
...
...
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