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
750fedc3
Commit
750fedc3
authored
Oct 24, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
56a6a474
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
29 deletions
+5
-29
OPartialCommission.php
application/model/OPartialCommission.php
+5
-29
No files found.
application/model/OPartialCommission.php
View file @
750fedc3
...
@@ -48,43 +48,19 @@ class OPartialCommission extends BaseModel
...
@@ -48,43 +48,19 @@ class OPartialCommission extends BaseModel
$m_real
=
new
ORealIncome
();
$m_real
=
new
ORealIncome
();
$fields_str
=
'a.id,a.name,a.phone,b.store_name,c.district_name'
;
$fields_str
=
'a.id,a.name,a.phone,b.store_name,c.district_name'
;
foreach
(
$data
as
$k
=>
$v
)
{
foreach
(
$data
as
$k
=>
$v
)
{
$result
[
$k
]
=
$v
;
if
(
isset
(
$v
[
'agent_id'
]))
{
if
(
isset
(
$v
[
'agent_id'
]))
{
$agent_data
=
$m_agent
->
getStoreDistrict
(
$fields_str
,
[
'a.id'
=>
$v
[
'agent_id'
]
]);
$agent_data
=
$m_agent
->
getStoreDistrict
(
$fields_str
,
[
'a.id'
=>
$v
[
'agent_id'
]
]);
$
result
[
$k
][
'agent'
]
=
$agent_data
[
'name'
]
.
'-'
.
$agent_data
[
'phone'
];
$
data
[
$k
][
'agent'
]
=
$agent_data
[
'name'
]
.
'-'
.
$agent_data
[
'phone'
];
$
result
[
$k
][
'district_store'
]
=
$agent_data
[
'district_name'
]
.
'-'
.
$agent_data
[
'store_name'
];
$
data
[
$k
][
'district_store'
]
=
$agent_data
[
'district_name'
]
.
'-'
.
$agent_data
[
'store_name'
];
}
}
if
(
isset
(
$v
[
'role'
]))
{
switch
(
$v
[
'role'
])
{
case
1
:
$data
[
$k
][
'role_name'
]
=
'盘方'
;
break
;
case
2
:
$data
[
$k
][
'role_name'
]
=
'客方'
;
break
;
case
3
:
$data
[
$k
][
'role_name'
]
=
'反签'
;
break
;
case
4
:
$data
[
$k
][
'role_name'
]
=
'独家'
;
break
;
case
5
:
$data
[
$k
][
'role_name'
]
=
'合作方'
;
break
;
default
:
$data
[
$k
][
'role_name'
]
=
'无'
;
}
}
if
(
$v
[
'father_id'
]
!=
0
)
{
if
(
$v
[
'father_id'
]
!=
0
)
{
$
result
[
$k
][
'bargain_id'
]
=
$v
[
'father_id'
];
$
data
[
$k
][
'bargain_id'
]
=
$v
[
'father_id'
];
}
}
//分佣ID
//分佣ID
$
result
[
$k
][
'commission_id'
]
=
$v
[
"bargain_
id"
]
;
$
data
[
$k
][
'commission_id'
]
=
$v
[
"
id"
]
;
}
}
return
$
result
;
return
$
data
;
}
}
/**
/**
...
...
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