Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-app-operator-master
Commits
a663b9f5
Commit
a663b9f5
authored
May 09, 2024
by
lanbaoming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-05-09待办刷新
parent
beda2dfe
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
167 additions
and
96 deletions
+167
-96
salesreport.js
src/api/report/salesreport.js
+11
-0
index.vue
src/views/report/sales_analysis/index.vue
+0
-1
index.vue
src/views/report/salesreport/index.vue
+155
-95
vue.config.js
vue.config.js
+1
-0
No files found.
src/api/report/salesreport.js
View file @
a663b9f5
...
@@ -19,6 +19,15 @@ export function FirstCustomerCount(data) {
...
@@ -19,6 +19,15 @@ export function FirstCustomerCount(data) {
})
})
}
}
//获取一段时间客户成交数目
export
function
CustomerTargetCount
(
query
)
{
return
request
({
url
:
'
/Report/SalesReport/CustomerTargetCount
'
,
method
:
'
get
'
,
params
:
query
})
}
//销售分析统计列表 lanbm 2024-04-01 add
//销售分析统计列表 lanbm 2024-04-01 add
export
function
SalesReportList
(
data
)
{
export
function
SalesReportList
(
data
)
{
return
request
({
return
request
({
...
@@ -28,6 +37,8 @@ export function SalesReportList(data) {
...
@@ -28,6 +37,8 @@ export function SalesReportList(data) {
})
})
}
}
//获取销售分析图表数据
//获取销售分析图表数据
export
function
getEChartData
(
query
)
{
export
function
getEChartData
(
query
)
{
return
request
({
return
request
({
...
...
src/views/report/sales_analysis/index.vue
View file @
a663b9f5
...
@@ -366,7 +366,6 @@
...
@@ -366,7 +366,6 @@
</el-card>
</el-card>
</el-col>
</el-col>
</el-row>
</el-row>
<!-- 列表 -->
<!-- 列表 -->
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"排名"
align=
"center"
prop=
"px"
/>
<el-table-column
label=
"排名"
align=
"center"
prop=
"px"
/>
...
...
src/views/report/salesreport/index.vue
View file @
a663b9f5
...
@@ -8,10 +8,11 @@
...
@@ -8,10 +8,11 @@
v-show=
"showSearch"
v-show=
"showSearch"
label-width=
"100px"
label-width=
"100px"
>
>
<el-form-item
label=
"选择日期"
prop=
"
testName
"
>
<el-form-item
label=
"选择日期"
prop=
"
DateQuery
"
>
<el-date-picker
<el-date-picker
v-model=
"queryParams.sDate"
v-model=
"queryParams.sDate"
type=
"month"
type=
"month"
style=
"width: 150px"
value-format=
"yyyy-MM"
value-format=
"yyyy-MM"
clearable
clearable
placeholder=
"请输起始月"
placeholder=
"请输起始月"
...
@@ -19,6 +20,7 @@
...
@@ -19,6 +20,7 @@
<el-date-picker
<el-date-picker
v-model=
"queryParams.eDate"
v-model=
"queryParams.eDate"
type=
"month"
type=
"month"
style=
"width: 150px"
value-format=
"yyyy-MM"
value-format=
"yyyy-MM"
clearable
clearable
placeholder=
"请输截止月"
placeholder=
"请输截止月"
...
@@ -28,12 +30,13 @@
...
@@ -28,12 +30,13 @@
<el-date-picker
<el-date-picker
v-model=
"queryParams.duibiYear"
v-model=
"queryParams.duibiYear"
type=
"year"
type=
"year"
style=
"width: 150px"
value-format=
"yyyy"
value-format=
"yyyy"
placeholder=
"请选择同比年份"
placeholder=
"请选择同比年份"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"部门"
prop=
"deptid"
>
<el-form-item
label=
"部门"
prop=
"deptid"
v-show=
"showDept"
>
<treeselect
<treeselect
v-model=
"queryParams.deptid"
v-model=
"queryParams.deptid"
:options=
"deptOptions"
:options=
"deptOptions"
...
@@ -42,7 +45,7 @@
...
@@ -42,7 +45,7 @@
:normalizer=
"normalizer"
:normalizer=
"normalizer"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"客户经理"
prop=
"salesmanid"
>
<el-form-item
label=
"客户经理"
prop=
"salesmanid"
v-show=
"showCustomsManage"
>
<user-selector
<user-selector
manage
manage
v-model=
"queryParams.salesmanid"
v-model=
"queryParams.salesmanid"
...
@@ -58,39 +61,23 @@
...
@@ -58,39 +61,23 @@
<el-button
icon=
"el-icon-refresh"
@
click=
"resetQuery"
>
重置
</el-button>
<el-button
icon=
"el-icon-refresh"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<el-row
:gutter=
"
40"
class=
"panel-group
"
>
<el-row
:gutter=
"
10"
class=
"panel-group"
style=
"margin: 5px
"
>
<el-col
:xs=
"12"
:sm=
"12"
:lg=
"6"
class=
"card-panel-col"
>
<el-col
:xs=
"12"
:sm=
"12"
:lg=
"6"
class=
"card-panel-col"
>
<div
<div
class=
"card-panel"
@
click=
"handleGoTo"
>
class=
"card-panel"
<div
class=
"card-panel-icon-wrapper icon-shopping"
>
@
click=
"
<svg-icon
icon-class=
"shopping"
class-name=
"card-panel-icon"
/>
checkPermi(['member:user'])
? $router.push('/member/member-user')
: $alert($t('暂无权限'))
"
>
<div
class=
"card-panel-icon-wrapper icon-people"
>
<svg-icon
icon-class=
"peoples"
class-name=
"card-panel-icon"
/>
</div>
</div>
<div
class=
"card-panel-description"
>
<div
class=
"card-panel-description"
>
<div
class=
"card-panel-text"
>
<div
class=
"card-panel-text"
>
{{
$t
(
"
业绩总览
"
)
}}
{{
$t
(
"
业绩总览
Total
"
)
}}
</div>
</div>
<count-to
<div
class=
"card-panel-num"
>
{{
allsumvolume
}}
</div>
:start-val=
"0"
<div
style=
"text-align: right"
>
同比:13%
</div>
:end-val=
"100"
:duration=
"2600"
class=
"card-panel-num"
/>
</div>
</div>
</div>
</div>
</el-col>
</el-col>
<el-col
:xs=
"12"
:sm=
"12"
:lg=
"6"
class=
"card-panel-col"
>
<el-col
:xs=
"12"
:sm=
"12"
:lg=
"6"
class=
"card-panel-col"
>
<div
<div
class=
"card-panel"
@
click=
"handleGoTo"
>
class=
"card-panel"
@
click=
"
$router.push('/system/internalMessage/my-internal-message?status=0')
"
>
<div
class=
"card-panel-icon-wrapper icon-message"
>
<div
class=
"card-panel-icon-wrapper icon-message"
>
<svg-icon
icon-class=
"message"
class-name=
"card-panel-icon"
/>
<svg-icon
icon-class=
"message"
class-name=
"card-panel-icon"
/>
</div>
</div>
...
@@ -98,17 +85,13 @@
...
@@ -98,17 +85,13 @@
<div
class=
"card-panel-text"
>
<div
class=
"card-panel-text"
>
{{
$t
(
"
海运拼柜
"
)
}}
{{
$t
(
"
海运拼柜
"
)
}}
</div>
</div>
<count-to
<div
class=
"card-panel-num"
>
{{
sumvolume1
}}
</div>
:start-val=
"0"
<div
style=
"text-align: right"
>
同比:13%
</div>
:end-val=
"200"
:duration=
"3000"
class=
"card-panel-num"
/>
</div>
</div>
</div>
</div>
</el-col>
</el-col>
<el-col
:xs=
"12"
:sm=
"12"
:lg=
"6"
class=
"card-panel-col"
>
<el-col
:xs=
"12"
:sm=
"12"
:lg=
"6"
class=
"card-panel-col"
>
<div
class=
"card-panel"
@
click=
"
$router.push('/task/todo')
"
>
<div
class=
"card-panel"
@
click=
"
handleGoTo
"
>
<div
class=
"card-panel-icon-wrapper icon-money"
>
<div
class=
"card-panel-icon-wrapper icon-money"
>
<svg-icon
icon-class=
"date"
class-name=
"card-panel-icon"
/>
<svg-icon
icon-class=
"date"
class-name=
"card-panel-icon"
/>
</div>
</div>
...
@@ -116,40 +99,29 @@
...
@@ -116,40 +99,29 @@
<div
class=
"card-panel-text"
>
<div
class=
"card-panel-text"
>
{{
$t
(
"
专线空运
"
)
}}
{{
$t
(
"
专线空运
"
)
}}
</div>
</div>
<count-to
<div
class=
"card-panel-num"
>
{{
sumweight3
}}
</div>
:start-val=
"0"
<div
style=
"text-align: right"
>
同比:13%
</div>
:end-val=
"500"
:duration=
"3200"
class=
"card-panel-num"
/>
</div>
</div>
</div>
</div>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
:gutter=
"
40"
class=
"panel-group
"
>
<el-row
:gutter=
"
10"
class=
"panel-group"
style=
"margin: 5px
"
>
<el-col
:xs=
"12"
:sm=
"12"
:lg=
"6"
class=
"card-panel-col"
>
<el-col
:xs=
"12"
:sm=
"12"
:lg=
"6"
class=
"card-panel-col"
>
<div
class=
"card-panel"
@
click=
"
$router.push('/order/mine')
"
>
<div
class=
"card-panel"
@
click=
"
handleGoTo
"
>
<div
class=
"card-panel-icon-wrapper icon-
shopping
"
>
<div
class=
"card-panel-icon-wrapper icon-
people
"
>
<svg-icon
icon-class=
"
shopping
"
class-name=
"card-panel-icon"
/>
<svg-icon
icon-class=
"
peoples
"
class-name=
"card-panel-icon"
/>
</div>
</div>
<div
class=
"card-panel-description"
>
<div
class=
"card-panel-description"
>
<div
class=
"card-panel-text"
>
<div
class=
"card-panel-text"
>
{{
$t
(
"
成交总览
"
)
}}
{{
$t
(
"
成交总览
Total
"
)
}}
</div>
</div>
<count-to
<div
class=
"card-panel-num"
>
{{
sumCustomerCount
}}
</div>
:start-val=
"0"
<div
style=
"text-align: right"
>
同比:13%
</div>
:end-val=
"700"
:duration=
"3600"
class=
"card-panel-num"
/>
</div>
</div>
</div>
</div>
</el-col>
</el-col>
<el-col
:xs=
"12"
:sm=
"12"
:lg=
"6"
class=
"card-panel-col"
>
<el-col
:xs=
"12"
:sm=
"12"
:lg=
"6"
class=
"card-panel-col"
>
<div
<div
class=
"card-panel"
@
click=
"handleGoTo"
>
class=
"card-panel"
@
click=
"$router.push('/member/member/under-review')"
>
<div
class=
"card-panel-icon-wrapper icon-shopping"
>
<div
class=
"card-panel-icon-wrapper icon-shopping"
>
<svg-icon
icon-class=
"time-range"
class-name=
"card-panel-icon"
/>
<svg-icon
icon-class=
"time-range"
class-name=
"card-panel-icon"
/>
</div>
</div>
...
@@ -157,12 +129,8 @@
...
@@ -157,12 +129,8 @@
<div
class=
"card-panel-text"
>
<div
class=
"card-panel-text"
>
{{
$t
(
"
首次成交
"
)
}}
{{
$t
(
"
首次成交
"
)
}}
</div>
</div>
<count-to
<div
class=
"card-panel-num"
>
{{
fisCustomerCount
}}
</div>
:start-val=
"0"
<div
style=
"text-align: right"
>
同比:13%
</div>
:end-val=
"100"
:duration=
"3600"
class=
"card-panel-num"
/>
</div>
</div>
</div>
</div>
</el-col>
</el-col>
...
@@ -182,16 +150,40 @@ import Treeselect from "@riophae/vue-treeselect";
...
@@ -182,16 +150,40 @@ import Treeselect from "@riophae/vue-treeselect";
import
"
@/assets/styles/vue-treeselect.css
"
;
import
"
@/assets/styles/vue-treeselect.css
"
;
import
{
listSimpleDepts
}
from
"
@/api/system/dept
"
;
import
{
listSimpleDepts
}
from
"
@/api/system/dept
"
;
//报表权限接口
//报表权限接口
import
{
getCurUserPermission
}
from
"
@/api/report/EcwReportPermission
"
;
import
{
getCurUserPermission
,
getDeptChild
}
from
"
@/api/report/EcwReportPermission
"
;
import
{
import
{
SalesReportCount
,
SalesReportCount
,
FirstCustomerCount
,
FirstCustomerCount
,
CustomerTargetCount
,
getEChartData
,
getEChartData
,
}
from
"
@/api/report/salesreport
"
;
}
from
"
@/api/report/salesreport
"
;
import
*
as
echarts
from
"
echarts
"
;
import
*
as
echarts
from
"
echarts
"
;
require
(
"
echarts/theme/macarons
"
);
require
(
"
echarts/theme/macarons
"
);
import
resize
from
"
../../dashboard/mixins/resize
"
;
import
resize
from
"
../../dashboard/mixins/resize
"
;
import
SalesPanelGroup
from
"
../../dashboard/SalesPanelGroup
"
;
import
SalesPanelGroup
from
"
../../dashboard/SalesPanelGroup
"
;
import
{
MessageBox
}
from
"
element-ui
"
;
const
CurDate
=
new
Date
();
function
currentTime
()
{
var
date
=
new
Date
();
var
year
=
date
.
getFullYear
();
//月份从0~11,所以加一
let
month
=
date
.
getMonth
()
+
1
;
//如果格式是MM则需要此步骤,如果是M格式则此处注释掉
if
(
month
>=
1
&&
month
<=
9
)
{
month
=
"
0
"
+
month
;
}
let
strDate
=
year
+
"
-
"
+
month
;
return
strDate
;
}
function
getLastYear
()
{
//获取上一年份
var
date
=
new
Date
();
date
.
setFullYear
(
date
.
getFullYear
()
-
1
);
let
year
=
date
.
getFullYear
();
return
year
.
toString
();
}
//2024-05-01合并
//2024-05-01合并
export
default
{
export
default
{
...
@@ -228,21 +220,22 @@ export default {
...
@@ -228,21 +220,22 @@ export default {
exportLoading
:
false
,
exportLoading
:
false
,
// 显示搜索条件
// 显示搜索条件
showSearch
:
true
,
showSearch
:
true
,
showCustomsManage
:
true
,
showCustomsManage
:
true
,
//是否显示客户经理查询条件
showDept
:
true
,
showDept
:
true
,
//是否显示部门查询条件
chart
:
null
,
chart
:
null
,
allsumvolume
:
undefined
,
allsumvolume
:
undefined
,
//总V值
sumvolume1
:
undefined
,
sumvolume1
:
undefined
,
//海运拼柜
sumweight3
:
undefined
,
sumweight3
:
undefined
,
//专线空运
sumCustomerCount
:
undefined
,
//成交客户总数
sumCustomerCount
:
undefined
,
//成交客户总数
fisCustomerCount
:
undefined
,
//首次成交客户户数
fisCustomerCount
:
undefined
,
//首次成交客户户数
dateRangeCreateTime
:
[],
dateRangeCreateTime
:
[],
SalesReportRespShow
:[],
queryParams
:
{
queryParams
:
{
salesmanid
:
undefined
,
//销售经理
salesmanid
:
undefined
,
//销售经理
deptid
:
undefined
,
//部门
deptid
:
undefined
,
//部门
sDate
:
undefined
,
//开始日期
sDate
:
CurDate
.
getFullYear
()
+
"
-01
"
,
//开始日期
eDate
:
undefined
,
//结束日期
eDate
:
currentTime
()
,
//结束日期
duibiYear
:
undefined
,
//对比年份
duibiYear
:
getLastYear
()
,
//对比年份
},
},
deptOptions
:
[],
deptOptions
:
[],
deptData
:
[],
deptData
:
[],
...
@@ -253,30 +246,7 @@ export default {
...
@@ -253,30 +246,7 @@ export default {
watch
:
{},
watch
:
{},
mounted
()
{},
mounted
()
{},
created
()
{
created
()
{
//获取当前用户报表权限
this
.
handleQuery
();
getCurUserPermission
().
then
((
response
)
=>
{
this
.
objEcwReportPermission
=
response
.
data
;
if
(
this
.
objEcwReportPermission
.
permissionFw
==
1
)
{
//本人权限
this
.
showCustomsManage
=
false
;
this
.
showDept
=
false
;
this
.
queryParams
.
salesmanid
=
this
.
objEcwReportPermission
.
userId
;
}
else
if
(
this
.
objEcwReportPermission
.
permissionFw
==
2
)
{
this
.
showCustomsManage
=
true
;
this
.
showDept
=
true
;
this
.
queryParams
.
deptid
=
parseInt
(
this
.
objEcwReportPermission
.
deptId
);
}
else
if
(
this
.
objEcwReportPermission
.
permissionFw
==
3
)
{
//全公司权限
this
.
showCustomsManage
=
true
;
this
.
showDept
=
true
;
}
this
.
getTreeselect
();
//this.getSalesReportCount();
// this.getFirstCustomerCount();
//获取权限后再初始化统计图表
this
.
initChart
();
});
},
},
beforeDestroy
()
{
beforeDestroy
()
{
if
(
!
this
.
chart
)
{
if
(
!
this
.
chart
)
{
...
@@ -291,6 +261,22 @@ export default {
...
@@ -291,6 +261,22 @@ export default {
//this.deptData.add
//this.deptData.add
});
});
},
},
getCustomerTargetCount
()
{
CustomerTargetCount
(
this
.
queryParams
).
then
((
response
)
=>
{
this
.
sumCustomerCount
=
response
.
data
;
});
},
getSalesReportCount
()
{
//获取运输方式统计数 lanbm 2024-04-01 add
SalesReportCount
(
this
.
queryParams
).
then
((
response
)
=>
{
//业绩总览
this
.
allsumvolume
=
response
.
data
.
allsumvolume
;
//海运拼柜
this
.
sumvolume1
=
response
.
data
.
sumvolume1
;
//专线空运
this
.
sumweight3
=
response
.
data
.
sumweight3
;
});
},
getSalesReportCount
()
{
getSalesReportCount
()
{
//获取运输方式统计数 lanbm 2024-04-01 add
//获取运输方式统计数 lanbm 2024-04-01 add
SalesReportCount
(
this
.
queryParams
).
then
((
response
)
=>
{
SalesReportCount
(
this
.
queryParams
).
then
((
response
)
=>
{
...
@@ -337,7 +323,44 @@ export default {
...
@@ -337,7 +323,44 @@ export default {
});
});
});
});
},
},
handleQuery
()
{},
isChinese
()
{
//基础函数,判断系统显示语言是中文还是英文
return
this
.
$i18n
.
locale
===
"
zh_CN
"
;
},
handleQuery
()
{
if
(
this
.
isRight
()
==
false
)
return
;
this
.
loading
=
true
;
//获取当前用户报表权限
getCurUserPermission
().
then
((
response
)
=>
{
this
.
objEcwReportPermission
=
response
.
data
;
if
(
this
.
objEcwReportPermission
.
permissionFw
==
1
)
{
//本人权限
this
.
showCustomsManage
=
false
;
this
.
showDept
=
false
;
this
.
queryParams
.
salesmanid
=
this
.
objEcwReportPermission
.
userId
;
}
else
if
(
this
.
objEcwReportPermission
.
permissionFw
==
2
)
{
//本部门权限
this
.
showCustomsManage
=
true
;
this
.
showDept
=
true
;
this
.
queryParams
.
deptid
=
parseInt
(
this
.
objEcwReportPermission
.
deptId
);
}
else
if
(
this
.
objEcwReportPermission
.
permissionFw
==
3
)
{
//全公司权限
this
.
showCustomsManage
=
true
;
this
.
showDept
=
true
;
}
this
.
getTreeselect
();
this
.
getSalesReportCount
();
this
.
getFirstCustomerCount
();
//获取成交客户数,出重结果
this
.
getCustomerTargetCount
();
//获取权限后再初始化统计图表
this
.
initChart
();
this
.
loading
=
false
;
});
},
getList
()
{},
getList
()
{},
resetQuery
()
{
resetQuery
()
{
this
.
queryParams
=
{
this
.
queryParams
=
{
...
@@ -348,6 +371,43 @@ export default {
...
@@ -348,6 +371,43 @@ export default {
duibiYear
:
undefined
,
//对比年份
duibiYear
:
undefined
,
//对比年份
};
};
},
},
handleGoTo
()
{
if
(
this
.
isRight
()
==
false
)
return
;
let
p
=
{};
Object
.
assign
(
p
,
this
.
queryParams
);
this
.
$router
.
push
({
path
:
"
/report/sales_analysis
"
,
query
:
p
,
});
},
isRight
()
{
//校验查询参数 lanbm 2024-05-09 add
if
(
this
.
queryParams
.
sDate
==
undefined
)
{
MessageBox
(
"
请输入起始月份。
"
);
return
false
;
}
if
(
this
.
queryParams
.
eDate
==
undefined
)
{
MessageBox
(
"
请输入截止月份。
"
);
return
false
;
}
if
(
this
.
queryParams
.
duibiYear
==
undefined
)
{
MessageBox
(
"
请输入对比年份。
"
);
return
false
;
}
else
{
let
y
=
parseInt
(
this
.
queryParams
.
duibiYear
);
if
(
y
<
2023
)
{
MessageBox
(
"
对比年份只能选2023年和2023年之后的年份。
"
);
return
false
;
}
var
date
=
new
Date
();
var
year
=
date
.
getFullYear
();
if
(
y
>
year
)
{
MessageBox
(
"
对比年份只能选当前年份之前的年份。
"
);
return
false
;
}
}
return
true
;
},
handleAdd
()
{},
handleAdd
()
{},
handleExport
()
{},
handleExport
()
{},
/** 查询部门下拉树结构 + 岗位下拉 */
/** 查询部门下拉树结构 + 岗位下拉 */
...
...
vue.config.js
View file @
a663b9f5
...
@@ -47,6 +47,7 @@ module.exports = {
...
@@ -47,6 +47,7 @@ module.exports = {
disableHostCheck
:
true
disableHostCheck
:
true
},
},
css
:
{
css
:
{
sourceMap
:
true
,
// 开启 CSS source maps
loaderOptions
:
{
loaderOptions
:
{
sass
:
{
sass
:
{
sassOptions
:
{
outputStyle
:
"
expanded
"
}
sassOptions
:
{
outputStyle
:
"
expanded
"
}
...
...
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