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
acff90d9
Commit
acff90d9
authored
Jun 19, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
最终实收计算
parent
9a069bce
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
17 deletions
+53
-17
Finance.php
application/index/controller/Finance.php
+4
-3
commissionTotal.js
public/resource/js/commissionTotal.js
+47
-7
commissionTotal_template_tpl.html
public/resource/template/commissionTotal_template_tpl.html
+2
-7
No files found.
application/index/controller/Finance.php
View file @
acff90d9
...
@@ -1069,13 +1069,14 @@ class Finance extends Basic
...
@@ -1069,13 +1069,14 @@ class Finance extends Basic
if
(
empty
(
$this
->
params
[
'excel'
])
&&
$this
->
params
[
'excel'
]
!=
1
)
{
if
(
empty
(
$this
->
params
[
'excel'
])
&&
$this
->
params
[
'excel'
]
!=
1
)
{
$fields
=
'f.income_time,a.create_time,a.id,a.agent_id,sum(b.fee) as fee,sum(c.practical_fee) as practical_fee,sum(c.cash) as cash,'
;
$fields
=
'f.income_time,a.create_time,a.id,a.agent_id,sum(b.fee) as fee,sum(c.practical_fee) as practical_fee,sum(c.cash) as cash,'
;
$fields
.=
'sum(
c.service_charge) as service_charge,sum(
b.fee) as fee,sum(c.real_fee) as real_fee,'
;
$fields
.=
'sum(b.fee) as fee,sum(c.real_fee) as real_fee,'
;
$fields
.=
'd.name,d.phone'
;
$fields
.=
'd.name,d.phone'
;
$data
[
'data'
][
'list'
]
=
$m_bargain
->
getCommissionTotalList
(
$pageNo
,
$pageSize
,
'a.id desc'
,
$fields
,
$where
,
$whereOr
);
$data
[
'data'
][
'list'
]
=
$m_bargain
->
getCommissionTotalList
(
$pageNo
,
$pageSize
,
'a.id desc'
,
$fields
,
$where
,
$whereOr
);
foreach
(
$data
[
'data'
][
'list'
]
as
$k
=>
$v
)
{
foreach
(
$data
[
'data'
][
'list'
]
as
$k
=>
$v
)
{
$data
[
'data'
][
'list'
][
$k
][
'income_date'
]
=
$income_date
;
$data
[
'data'
][
'list'
][
$k
][
'income_date'
]
=
$income_date
;
$data
[
'data'
][
'list'
][
$k
][
'operation_date'
]
=
$operation_date
;
$data
[
'data'
][
'list'
][
$k
][
'operation_date'
]
=
$operation_date
;
$data
[
'data'
][
'list'
][
$k
][
'over_fee'
]
=
$v
[
'practical_fee'
]
-
$v
[
'fee'
];
}
}
$data
[
'data'
][
'total'
]
=
$m_bargain
->
getCommissionTotalListTotal
(
$where
,
$whereOr
);
$data
[
'data'
][
'total'
]
=
$m_bargain
->
getCommissionTotalListTotal
(
$where
,
$whereOr
);
...
@@ -1084,7 +1085,7 @@ class Finance extends Basic
...
@@ -1084,7 +1085,7 @@ class Finance extends Basic
//导出Excel
//导出Excel
$fields
=
'f.income_time,a.create_time,sum(b.fee) as fee,sum(f.money) as money,sum(c.cash) as cash,'
;
$fields
=
'f.income_time,a.create_time,sum(b.fee) as fee,sum(f.money) as money,sum(c.cash) as cash,'
;
$fields
.=
'sum(c.service_charge) as service_charge,a.agent_id,'
;
$fields
.=
'sum(c.service_charge) as service_charge,a.agent_id,
sum(c.practical_fee) as practical_fee,
'
;
$fields
.=
'd.name,d.phone,sum(c.charity_fund) as charity_fund, sum(should_commission) as should_commission'
;
$fields
.=
'd.name,d.phone,sum(c.charity_fund) as charity_fund, sum(should_commission) as should_commission'
;
$pageSize
=
25000
;
$pageSize
=
25000
;
...
@@ -1101,7 +1102,7 @@ class Finance extends Basic
...
@@ -1101,7 +1102,7 @@ class Finance extends Basic
$excel_data
[
$k
][
'charity_fund'
]
=
$v
[
'charity_fund'
];
//慈善基金
$excel_data
[
$k
][
'charity_fund'
]
=
$v
[
'charity_fund'
];
//慈善基金
$excel_data
[
$k
][
'money'
]
=
$v
[
'money'
];
//实收佣金
$excel_data
[
$k
][
'money'
]
=
$v
[
'money'
];
//实收佣金
$excel_data
[
$k
][
'fee'
]
=
$v
[
'fee'
];
//税费
$excel_data
[
$k
][
'fee'
]
=
$v
[
'fee'
];
//税费
$excel_data
[
$k
][
'over_fee'
]
=
$v
[
'
real_fee'
]
-
$v
[
'charity_fund
'
];
$excel_data
[
$k
][
'over_fee'
]
=
$v
[
'
practical_fee'
]
-
$v
[
'fee
'
];
}
}
$num
=
count
(
$excel_data
)
+
2
;
$num
=
count
(
$excel_data
)
+
2
;
...
...
public/resource/js/commissionTotal.js
View file @
acff90d9
...
@@ -457,9 +457,6 @@ define(['doT', 'text!temp/commissionTotal_template_tpl.html', 'css!style/home.cs
...
@@ -457,9 +457,6 @@ define(['doT', 'text!temp/commissionTotal_template_tpl.html', 'css!style/home.cs
});
});
},
},
exportList
:
function
(
pageNo
)
{
exportList
:
function
(
pageNo
)
{
console
.
log
(
2
);
business
.
pageNo
=
pageNo
;
var
excel_two
=
1
;
var
name
=
$
(
'#user_name'
).
val
();
var
name
=
$
(
'#user_name'
).
val
();
var
phone
=
$
(
'#user_phone'
).
val
();
var
phone
=
$
(
'#user_phone'
).
val
();
var
income_start_date
=
$
(
'#create_time'
).
val
();
var
income_start_date
=
$
(
'#create_time'
).
val
();
...
@@ -469,10 +466,52 @@ define(['doT', 'text!temp/commissionTotal_template_tpl.html', 'css!style/home.cs
...
@@ -469,10 +466,52 @@ define(['doT', 'text!temp/commissionTotal_template_tpl.html', 'css!style/home.cs
var
operation_start_date
=
$
(
'#create_ticketTime'
).
val
();
var
operation_start_date
=
$
(
'#create_ticketTime'
).
val
();
var
operation_end_date
=
$
(
'#end_ticketTime'
).
val
();
var
operation_end_date
=
$
(
'#end_ticketTime'
).
val
();
var
district_id
=
$
(
"#qx-store option:selected"
).
val
();
//部门id 添加字段
var
district_id
=
$
(
"#qx-store option:selected"
).
val
();
//部门id 添加字段
var
store_name
=
$
(
'#store_name'
).
val
();
var
store_id
=
$
(
'#store_name'
).
val
();
window
.
open
(
'/index/getCommissionTotalList?'
+
'excel='
+
excel_two
+
'&name='
+
name
+
'&phone='
+
phone
+
'&income_start_date='
+
income_start_date
+
'&income_end_date='
+
income_end_date
+
'&bargain_start_date='
+
bargain_start_date
+
'&bargain_end_date='
+
bargain_end_date
+
'&operation_start_date='
+
operation_start_date
+
'&operation_end_date='
+
operation_end_date
+
'&district_id='
+
district_id
+
'&store_name='
+
store_name
);
var
str
=
'/index/getCommissionTotalList?excel=1'
;
},
if
(
name
)
{
str
+=
'&name='
+
name
;
}
if
(
phone
)
{
str
+=
'&phone='
+
phone
;
}
if
(
income_start_date
)
{
str
+=
'&income_start_date='
+
income_start_date
;
}
if
(
income_end_date
)
{
str
+=
'&income_end_date='
+
income_end_date
;
}
if
(
bargain_start_date
)
{
str
+=
'&bargain_start_date='
+
bargain_start_date
;
}
if
(
bargain_end_date
)
{
str
+=
'&bargain_end_date='
+
bargain_end_date
;
}
if
(
operation_start_date
)
{
str
+=
'&operation_start_date='
+
operation_start_date
;
}
if
(
operation_end_date
)
{
str
+=
'&operation_end_date='
+
operation_end_date
;
}
if
(
district_id
)
{
str
+=
'&district_id='
+
district_id
;
}
if
(
store_id
)
{
str
+=
'&store_name='
+
store_name
;
}
window
.
open
(
str
)
}
};
};
return
business
;
return
business
;
});
});
\ No newline at end of file
public/resource/template/commissionTotal_template_tpl.html
View file @
acff90d9
...
@@ -8,14 +8,9 @@
...
@@ -8,14 +8,9 @@
<
td
>
[
%=
it
[
item
][
'name'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'name'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'practical_fee'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'practical_fee'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'cash'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'cash'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'service_charge'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'practical_fee'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'practical_fee'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'fee'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'fee'
]
%
]
<
/td
>
<!--<
td
>
[
%=
it
[
item
][
'service_charge'
]
%
]
<
/td>--
>
<
td
>
[
%=
it
[
item
][
'over_fee'
]
%
]
<
/td
>
<!--<
td
>
<
a
class
=
"btn1 btn-info edit"
href
=
"#modal-details"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
详情
<
/a
>
<
a
class
=
"btn1 btn-info timeline"
href
=
"#modal-linetime"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
时间轴
<
/a
>
<
/td>--
>
<
/tr
>
<
/tr
>
[
%
}
%
]
[
%
}
%
]
[
%
}
else
{
%
]
[
%
}
else
{
%
]
...
@@ -23,5 +18,5 @@
...
@@ -23,5 +18,5 @@
<
td
colspan
=
"9"
style
=
"text-align:center;"
>
暂无数据
<
/td
>
<
td
colspan
=
"9"
style
=
"text-align:center;"
>
暂无数据
<
/td
>
<
/tr
>
<
/tr
>
[
%
}
%
]
[
%
}
%
]
</script>
</script>
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