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
346646bb
Commit
346646bb
authored
Jul 11, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除分佣方
parent
33ef0b9f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
17 deletions
+30
-17
Finance.php
application/index/controller/Finance.php
+30
-4
GHouses.php
application/model/GHouses.php
+0
-13
No files found.
application/index/controller/Finance.php
View file @
346646bb
...
...
@@ -65,7 +65,7 @@ class Finance extends Basic
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
15
:
$this
->
params
[
'pageSize'
];
$check_status
=
$this
->
params
[
'check_status'
];
$fields
=
'a.id,a.create_time,a.trade_type,b.user_phone,b.user_name,d.internal_title,d.internal_address,
a.commission,a.practical_fee,a.scale_fee,a.order_no,a.order_id,content,house_number'
;
a.commission,a.practical_fee,a.scale_fee,a.order_no,a.order_id,content,house_number
,a.is_open
'
;
$where
[
'a.father_id'
]
=
0
;
// $where['c.is_del'] = 0;
$where
[
'a.status'
]
=
11
;
...
...
@@ -238,7 +238,7 @@ class Finance extends Basic
}
if
(
empty
(
$this
->
params
[
'estimated_receipt_date'
]))
{
return
$this
->
response
(
101
,
'预计收款时间为空'
);
return
$this
->
response
(
101
,
'预计收款时间为空'
);
}
//应收总佣金
...
...
@@ -289,7 +289,7 @@ class Finance extends Basic
if
(
empty
(
$item
[
'fee'
])
||
empty
(
$item
[
'operation_date'
]))
{
$update_real_arr
[
$i
][
'id'
]
=
$item
[
'fee_id'
];
$update_real_arr
[
$i
][
'is_del'
]
=
1
;
$log_data
[
$i
]
=
'[删除实收佣金:'
.
$item
[
'fee'
]
.
',收佣日期'
.
$item
[
'operation_date'
]
.
']'
;
//
$log_data
[
$i
]
=
'[删除实收佣金:'
.
$item
[
'fee'
]
.
',收佣日期'
.
$item
[
'operation_date'
]
.
']'
;
//
$i
++
;
}
elseif
(
$item
[
"fee_id"
]
>
0
)
{
$update_real_arr
[
$i
][
'id'
]
=
$item
[
'fee_id'
];
...
...
@@ -304,7 +304,7 @@ class Finance extends Basic
$add_real_arr
[
$j
][
'operation_id'
]
=
$this
->
userId
;
$add_real_arr
[
$j
][
'money'
]
=
$item
[
'fee'
];
$add_real_arr
[
$j
][
'income_time'
]
=
$item
[
'operation_date'
];
$log_data
[
$j
]
=
'[新增实收佣金:'
.
$item
[
'fee'
]
.
',收佣日期'
.
$item
[
'operation_date'
]
.
']'
;
$log_data
[
$j
]
=
'[新增实收佣金:'
.
$item
[
'fee'
]
.
',收佣日期'
.
$item
[
'operation_date'
]
.
']'
;
$j
++
;
}
}
...
...
@@ -1328,4 +1328,30 @@ class Finance extends Basic
$m_bargain
=
new
OBargainLogModel
();
return
$m_bargain
->
addLog
(
$insert_data
);
}
/**
* 删除分佣方
*
* @return \think\Response
*/
public
function
delPartialCommission
()
{
if
(
empty
(
$this
->
params
[
'partial_id'
]))
return
$this
->
response
(
101
,
'参数错误'
);
$partial_id
=
$this
->
params
[
'partial_id'
];
$m_partial
=
new
OPartialCommission
();
$data
[
'is_del'
]
=
1
;
$num
=
$m_partial
->
editData
(
$data
,
$partial_id
);
if
(
$num
>
1
)
{
$result
[
'code'
]
=
200
;
$result
[
'msg'
]
=
'删除成功'
;
}
else
{
$result
[
'code'
]
=
101
;
$result
[
'msg'
]
=
'删除失败'
;
}
return
$this
->
response
(
$result
[
'code'
],
$result
[
'msg'
]);
}
}
application/model/GHouses.php
View file @
346646bb
...
...
@@ -184,12 +184,6 @@ class GHouses extends BaseModel
foreach
(
$data
as
$k
=>
$v
)
{
$house_id
[
$k
]
=
$v
[
'id'
];
$v
->
create_time
=
date
(
'Y-m-d'
,
strtotime
(
$v
->
create_time
));
$opening_date
=
$house_ext
->
where
(
'house_id'
,
$v
[
'id'
])
->
value
(
'opening_date'
);
if
(
empty
(
$opening_date
))
{
$data
[
$k
][
'is_open'
]
=
0
;
}
else
{
$data
[
$k
][
'is_open'
]
=
1
;
}
}
$result
=
array
();
...
...
@@ -231,13 +225,6 @@ class GHouses extends BaseModel
}
else
{
$result
[
$k
][
'auth_edit_house'
]
=
0
;
}
$opening_date
=
$house_ext
->
where
(
'house_id'
,
$v
[
'id'
])
->
value
(
'opening_date'
);
if
(
empty
(
$opening_date
))
{
$data
[
$k
][
'is_open'
]
=
0
;
}
else
{
$data
[
$k
][
'is_open'
]
=
1
;
}
}
}
...
...
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