Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
ad7f962d
Commit
ad7f962d
authored
May 09, 2020
by
zhaoxiqing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
a43b1d99
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
118 additions
and
23 deletions
+118
-23
bpo-admin/app/base/controller/impl/busistatCtl.js
+52
-1
bpo-admin/app/base/service/impl/busistatSve.js
+30
-0
bpo-admin/app/front/vues/pages/bpodepartmentstat/bpodepartmentstat.html
+34
-20
bpo-admin/app/front/vues/pages/bpodepartmentstat/bpodepartmentstat.js
+2
-2
No files found.
bpo-admin/app/base/controller/impl/busistatCtl.js
View file @
ad7f962d
var
system
=
require
(
"../../system"
)
var
system
=
require
(
"../../system"
)
var
settings
=
require
(
"../../../config/settings"
);
var
settings
=
require
(
"../../../config/settings"
);
const
CtlBase
=
require
(
"../ctl.base"
);
const
CtlBase
=
require
(
"../ctl.base"
);
const
moment
=
require
(
"moment"
);
class
BusistatCtl
extends
CtlBase
{
class
BusistatCtl
extends
CtlBase
{
constructor
()
{
constructor
()
{
super
(
CtlBase
.
getServiceName
(
BusistatCtl
));
super
(
CtlBase
.
getServiceName
(
BusistatCtl
));
this
.
departmentSve
=
system
.
getObject
(
"service.departmentSve"
)
this
.
departmentSve
=
system
.
getObject
(
"service.departmentSve"
);
this
.
excelClient
=
system
.
getObject
(
"util.excelClient"
);
}
}
async
suggest
(
query
,
qobj
,
req
){
async
suggest
(
query
,
qobj
,
req
){
...
@@ -16,7 +18,56 @@ class BusistatCtl extends CtlBase {
...
@@ -16,7 +18,56 @@ class BusistatCtl extends CtlBase {
var
list
=
await
this
.
departmentSve
.
suggestByName
(
name
);
var
list
=
await
this
.
departmentSve
.
suggestByName
(
name
);
return
system
.
getResult2
(
list
);
return
system
.
getResult2
(
list
);
}
}
async
signList
(
queryobj
,
qobj
,
req
)
{
var
params
=
qobj
.
search
;
try
{
var
page
=
await
this
.
service
.
signPage
(
params
);
return
system
.
getResult2
(
page
);
}
catch
(
e
)
{
console
.
log
(
e
);
return
system
.
getErrResult2
(
"您的网络不稳, 请稍后重试"
);
}
}
async
signExport
(
pobj
,
req
,
res
)
{
var
params
=
JSON
.
parse
(
pobj
.
search
);
try
{
params
.
currentPage
=
1
;
params
.
pageSize
=
60000
;
var
page
=
await
this
.
service
.
signPage
(
params
);
var
csvobj
=
{
fileName
:
"发薪统计-"
+
moment
().
format
(
"YYYYMMDD"
)
+
".csv"
,
rows
:
page
.
rows
,
opts
:
{
fields
:
[
'id'
,
'busi_id'
,
'busi_name'
,
'user_name'
,
'user_department_name'
,
'times'
,
'amt'
,
'actual_amt'
,
'deduct_amt'
,
'income_tax'
,
'service_tax'
,
'added_value_tax'
],
unwind
:
[
'busistat'
],
excelStrings
:
true
,
unwindBlank
:
true
},
headers
:
{
"id"
:
"编号"
,
'busi_id'
:
"商户id"
,
'busi_name'
:
"企业名称"
,
'user_name'
:
"业务员姓名"
,
'user_department_name'
:
"业务员部门"
,
'times'
:
"发薪次数"
,
'amt'
:
"申请发薪金额"
,
'actual_amt'
:
"实发金额"
,
'deduct_amt'
:
"扣除金额"
,
'income_tax'
:
"个税"
,
'service_tax'
:
"服务费"
,
'added_value_tax'
:
"增值税"
},
};
await
this
.
excelClient
.
exportCsv
(
req
,
res
,
csvobj
);
}
catch
(
e
)
{
console
.
log
(
e
);
return
system
.
getErrResult2
(
"您的网络不稳, 请稍后重试"
);
}
}
}
}
}
...
...
bpo-admin/app/base/service/impl/busistatSve.js
View file @
ad7f962d
...
@@ -6,6 +6,36 @@ class BusistatService extends ServiceBase {
...
@@ -6,6 +6,36 @@ class BusistatService extends ServiceBase {
super
(
ServiceBase
.
getDaoName
(
BusistatService
));
super
(
ServiceBase
.
getDaoName
(
BusistatService
));
}
}
async
signPage
(
params
)
{
var
currentPage
=
Number
(
params
.
currentPage
||
0
);
var
pageSize
=
Number
(
params
.
pageSize
||
10
);
var
where
=
{};
if
(
params
.
busi_name
)
{
where
.
busi_name
=
{
[
this
.
db
.
Op
.
like
]:
"%"
+
params
.
busi_name
+
"%"
};
}
if
(
params
.
user_department_name
)
{
where
.
user_department_name
=
params
.
user_department_name
;
}
var
orderby
=
[
[
"id"
,
'desc'
]
];
var
page
=
await
this
.
getPageList
(
currentPage
,
pageSize
,
where
,
orderby
);
if
(
page
&&
page
.
rows
)
{
for
(
var
row
of
page
.
rows
)
{
this
.
handleDate
(
row
,
[
"created_at"
,
"updated_at"
]);
}
// await this.setCompany(page.rows);
// await this.setMain(page.rows);
}
return
page
;
}
}
}
module
.
exports
=
BusistatService
;
module
.
exports
=
BusistatService
;
bpo-admin/app/front/vues/pages/bpodepartmentstat/bpodepartmentstat.html
View file @
ad7f962d
...
@@ -3,22 +3,36 @@
...
@@ -3,22 +3,36 @@
<div
style=
"height: auto;min-width: 1000px; max-width: 1500px;"
>
<div
style=
"height: auto;min-width: 1000px; max-width: 1500px;"
>
<el-card
style=
"background-color: #FFFFFF;padding:10px 10px 30px 10px;margin-top: 20px;"
>
<el-card
style=
"background-color: #FFFFFF;padding:10px 10px 30px 10px;margin-top: 20px;"
>
<div
style=
"width:100%;line-height: 40px;"
>
<div
style=
"width:100%;line-height: 40px;"
>
<div
style=
"float:left;width: 300px;"
>
<div
style=
"width:100%;line-height: 40px;"
>
<span
style=
"color:2F2F2F;font-size: 14px;"
>
开始时间:
</span>
<div
style=
"float:left;width: 400px;"
>
<el-input
v-model=
"search.name"
placeholder=
"请输入开始时间"
maxlength=
"100"
clearable
style=
"max-width:200px;height: 36px;"
></el-input>
<span
style=
"color:2F2F2F;font-size: 14px; float:left;"
>
统计日期:
</span>
</div>
<el-date-picker
<div
style=
"float:left;width: 300px;"
>
v-model=
"search.applyBegin"
<span
style=
"color:2F2F2F;font-size: 14px;"
>
结束时间:
</span>
type=
"date"
<el-input
v-model=
"search.name"
placeholder=
"请输入结束时间"
maxlength=
"100"
clearable
style=
"max-width:200px;height: 36px;"
></el-input>
placeholder=
"开始时间"
style=
"width:140px;height: 36px;float:left;"
format=
"yyyy-MM-dd"
value-format=
"yyyy-MM-dd"
default-value=
""
>
</el-date-picker>
<el-date-picker
v-model=
"search.applyEnd"
type=
"date"
style=
"width:140px;height: 36px;margin-left: 16px;float:left;"
placeholder=
"结束时间"
format=
"yyyy-MM-dd"
value-format=
"yyyy-MM-dd"
default-value=
""
>
</el-date-picker>
</div>
</div>
<div
style=
"float:left;width: 300px;"
>
<div
style=
"float:left;width: 300px;"
>
<span
style=
"color:2F2F2F;font-size: 14px;"
>
企业名称:
</span>
<span
style=
"color:2F2F2F;font-size: 14px;"
>
企业名称:
</span>
<el-input
v-model=
"search.name"
placeholder=
"请输入模板名称"
maxlength=
"100"
clearable
style=
"max-width:200px;height: 36px;"
></el-input>
<el-input
v-model=
"search.
busi_
name"
placeholder=
"请输入模板名称"
maxlength=
"100"
clearable
style=
"max-width:200px;height: 36px;"
></el-input>
</div>
</div>
<div
style=
"float:left;"
>
<div
style=
"float:left;"
>
<span
style=
"color:2F2F2F;font-size: 14px;"
>
部门:
</span>
<span
style=
"color:2F2F2F;font-size: 14px;"
>
部门:
</span>
<el-select
<el-select
v-model=
"search.
ecompanyN
ame"
v-model=
"search.
user_department_n
ame"
filterable
filterable
remote
remote
clearable
clearable
...
@@ -62,17 +76,17 @@
...
@@ -62,17 +76,17 @@
header-cell-style=
"background-color: #F5F5F5;color: #2F2F2F;font-size: 14px;font-weight:400;"
header-cell-style=
"background-color: #F5F5F5;color: #2F2F2F;font-size: 14px;font-weight:400;"
row-style=
"height:50px;"
>
row-style=
"height:50px;"
>
<el-table-column
prop=
"id"
label=
"序号"
:formatter=
"onColFormater"
width=
"80"
align=
"center"
></el-table-column>
<el-table-column
prop=
"id"
label=
"序号"
:formatter=
"onColFormater"
width=
"80"
align=
"center"
></el-table-column>
<el-table-column
prop=
"name"
label=
"部门名称"
:formatter=
"onColFormater"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
user_department_
name"
label=
"部门名称"
:formatter=
"onColFormater"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
ecompany.
name"
label=
"业务员"
:formatter=
"onColFormater"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
user_
name"
label=
"业务员"
:formatter=
"onColFormater"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
ecompanyMain.alias
"
label=
"商户号"
:formatter=
"onColFormater"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
busi_id
"
label=
"商户号"
:formatter=
"onColFormater"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
ecompanyMain.alias
"
label=
"商户名称"
:formatter=
"onColFormater"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
busi_id
"
label=
"商户名称"
:formatter=
"onColFormater"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
ecompanyMain.alias
"
label=
"公司名称"
:formatter=
"onColFormater"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
busi_name
"
label=
"公司名称"
:formatter=
"onColFormater"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
ecompanyMain.alias
"
label=
"实发金额"
:formatter=
"onColFormater"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
actual_amt
"
label=
"实发金额"
:formatter=
"onColFormater"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
ecompanyMain.alias
"
label=
"服务费金额"
:formatter=
"onColFormater"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
service_tax
"
label=
"服务费金额"
:formatter=
"onColFormater"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
ecompanyMain.alias
"
label=
"总扣除金额"
:formatter=
"onColFormater"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
deduct_amt
"
label=
"总扣除金额"
:formatter=
"onColFormater"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
ecompanyMain.alias
"
label=
"个税金额"
:formatter=
"onColFormater"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
income_tax
"
label=
"个税金额"
:formatter=
"onColFormater"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
ecompanyMain.alias
"
label=
"增值税金额"
:formatter=
"onColFormater"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
added_value_tax
"
label=
"增值税金额"
:formatter=
"onColFormater"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
ecompanyMain.alia
s"
label=
"发薪笔数"
:formatter=
"onColFormater"
align=
"center"
></el-table-column>
<el-table-column
prop=
"
time
s"
label=
"发薪笔数"
:formatter=
"onColFormater"
align=
"center"
></el-table-column>
</el-table>
</el-table>
<div
style=
"width:100%;text-align: center;margin-top: 20px"
>
<div
style=
"width:100%;text-align: center;margin-top: 20px"
>
<el-pagination
<el-pagination
...
...
bpo-admin/app/front/vues/pages/bpodepartmentstat/bpodepartmentstat.js
View file @
ad7f962d
...
@@ -95,7 +95,7 @@
...
@@ -95,7 +95,7 @@
getList
()
{
getList
()
{
var
self
=
this
;
var
self
=
this
;
var
params
=
this
.
getParams
();
var
params
=
this
.
getParams
();
this
.
$root
.
postReq
(
"/web/
etemplate
Ctl/signList"
,
{
this
.
$root
.
postReq
(
"/web/
busistat
Ctl/signList"
,
{
search
:
params
search
:
params
}).
then
(
function
(
d
)
{
}).
then
(
function
(
d
)
{
if
(
d
.
status
==
0
)
{
if
(
d
.
status
==
0
)
{
...
@@ -106,7 +106,7 @@
...
@@ -106,7 +106,7 @@
});
});
},
},
exportList
()
{
exportList
()
{
window
.
open
(
"/web/
etemplate
Ctl/signExport"
+
this
.
getExportParams
());
window
.
open
(
"/web/
busistat
Ctl/signExport"
+
this
.
getExportParams
());
},
},
getParams
()
{
getParams
()
{
var
params
=
{};
var
params
=
{};
...
...
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