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
7bfffcda
Commit
7bfffcda
authored
May 24, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
编辑实收佣金
parent
aaa6a7ca
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
10 deletions
+30
-10
Finance.php
application/index/controller/Finance.php
+17
-1
OBargainModel.php
application/model/OBargainModel.php
+2
-1
OPartialCommission.php
application/model/OPartialCommission.php
+11
-8
No files found.
application/index/controller/Finance.php
View file @
7bfffcda
...
...
@@ -296,7 +296,7 @@ class Finance extends Basic
$data
[
'msg'
]
=
'Id is null.'
;
}
else
{
$m_comm
=
new
OBargainModel
();
$fields
=
'a.id,a.role,a.agent_id,a.scale,a.scale_fee
,a.content
'
;
$fields
=
'a.id,a.role,a.agent_id,a.scale,a.scale_fee'
;
$where
[
0
]
=
[
'EXP'
,
"a.id =
{
$this
->
params
[
'id'
]
}
or a.father_id =
{
$this
->
params
[
'id'
]
}
"
];
$data
[
'data'
]
=
$m_comm
->
getBargainPartial
(
1
,
100
,
'a.id desc'
,
$fields
,
$where
);
}
...
...
@@ -588,13 +588,29 @@ class Finance extends Basic
* 增加实收佣金
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
addRealIncome
()
{
if
(
empty
(
$this
->
params
[
'bargain_id'
]))
{
return
$this
->
response
(
101
,
'新增实收参数错误'
);
}
$m_bargain
=
new
OBargainModel
();
$where
[
'status'
]
=
[
'in'
,
'10,11'
];
//10已提交 11审核成功
$where
[
'id'
]
=
$this
->
params
[
'bargain_id'
];
$bargain_data
=
$m_bargain
->
getBargainDetail
(
'id,agent_id,role'
,
$where
);
//排除成交报告其它状态
if
(
empty
(
$bargain_data
[
'id'
]))
{
return
$this
->
response
(
101
,
'新增失败,成交报告数据异常'
);
}
$m_partial
=
new
OPartialCommission
();
$insert_data
=
$this
->
params
;
$insert_data
[
'role'
]
=
$bargain_data
[
'role'
];
$insert_data
[
'agent_id'
]
=
$bargain_data
[
'agent_id'
];
$data
=
$m_partial
->
addCommission
(
$this
->
params
,
$this
->
userId
);
return
$this
->
response
(
"200"
,
"request success"
,
$data
);
}
...
...
application/model/OBargainModel.php
View file @
7bfffcda
...
...
@@ -594,8 +594,9 @@ class OBargainModel extends Model
}
}
$result
[
$k
][
'partial_commission'
]
=
$m_partial
->
field
(
'
practical_fee,cash,service_charge,charity_fund,real_fee,create_time
'
)
$result
[
$k
][
'partial_commission'
]
=
$m_partial
->
field
(
'
id,scale,practical_fee,cash,service_charge,charity_fund,real_fee,confirm_date,should_commission
'
)
->
where
(
'bargain_id'
,
$v
[
'id'
])
->
where
(
'is_del'
,
0
)
->
select
();
}
return
$result
;
...
...
application/model/OPartialCommission.php
View file @
7bfffcda
...
...
@@ -141,14 +141,17 @@ class OPartialCommission extends BaseModel
*/
public
function
addCommission
(
$data
,
$agent_id
)
{
$insert_data
[
'id'
]
=
$data
[
'id'
];
$insert_data
[
'bargain_id'
]
=
$data
[
'bargain_id'
];
$insert_data
[
'practical_fee'
]
=
$data
[
'practical_fee'
];
$insert_data
[
'cash'
]
=
$data
[
'cash'
];
$insert_data
[
'service_charge'
]
=
$data
[
'service_charge'
];
$insert_data
[
'charity_fund'
]
=
$data
[
'charity_fund'
];
$insert_data
[
'real_fee'
]
=
$data
[
'real_fee'
];
$insert_data
[
'agent_id'
]
=
$agent_id
;
$insert_data
[
'bargain_id'
]
=
$data
[
'bargain_id'
];
//成交报告id
$insert_data
[
'practical_fee'
]
=
$data
[
'practical_fee'
];
//实收佣金
$insert_data
[
'cash'
]
=
$data
[
'cash'
];
//现金奖
$insert_data
[
'service_charge'
]
=
$data
[
'service_charge'
];
//手续费
$insert_data
[
'charity_fund'
]
=
$data
[
'charity_fund'
];
//慈善基金
$insert_data
[
'real_fee'
]
=
$data
[
'real_fee'
];
//实分佣金
$insert_data
[
'operation_id'
]
=
$agent_id
;
//操作人id
$insert_data
[
'should_commission'
]
=
$data
[
'should_commission'
];
//应分佣金
$insert_data
[
'scale'
]
=
$data
[
'scale'
];
//分佣比例
$insert_data
[
'role'
]
=
$data
[
'role'
];
//分佣方 1盘方 2客方 3 反签 4独家 5合作方
$insert_data
[
'agent_id'
]
=
$data
[
'agent_id'
];
//分佣方经纪人
//确认分佣加时间 否则 只是保存分佣数据
if
(
$data
[
'confirm_date'
])
{
$insert_data
[
'confirm_date'
]
=
$data
[
'confirm_date'
];
...
...
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