Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
shld-databoard-ui
Project
Project
Details
Activity
Releases
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
潘自豪 Rambo Pan
shld-databoard-ui
Commits
da4b48d1
Commit
da4b48d1
authored
Sep 27, 2023
by
潘自豪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
营业额明显页面修改
parent
46ede36b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
132 deletions
+45
-132
fetch.js
src/module/api/fetch.js
+0
-3
lostAddCustomer.js
src/module/databoard/databoard/js/lostAddCustomer.js
+1
-1
lost-add-customer.vue
src/module/databoard/databoard/lost-add-customer.vue
+2
-2
turnoverDetail.js
src/module/databoard/databoard/turnoverDetail.js
+42
-126
No files found.
src/module/api/fetch.js
View file @
da4b48d1
...
...
@@ -44,9 +44,6 @@ export default async (url = '', data = {}, type = 'GET', method = 'fetch') => {
try
{
const
response
=
await
fetch
(
url
,
requestConfig
);
const
responseJson
=
await
response
.
json
();
if
(
response
.
status
===
403
){
parent
.
window
.
location
=
"/"
;
}
return
responseJson
}
catch
(
error
)
{
throw
new
Error
(
error
)
...
...
src/module/databoard/databoard/js/lostAddCustomer.js
View file @
da4b48d1
...
...
@@ -36,7 +36,7 @@ export const adapterLostAdd = function (data) {
let
lostAddDataCol
=
new
Array
();
lostAddDataCol
[
0
]
=
adapterLostAddCol
(
"订单量(万吨) "
,
conver_amont
(
data
.
unit_weight
),
"red"
)
lostAddDataCol
[
1
]
=
adapterLostAddCol
(
"订单件数"
,
data
.
qty
,
"#eaa749"
)
lostAddDataCol
[
2
]
=
adapterLostAddCol
(
"营
销
额(万元)"
,
conver_amont
(
data
.
sell_settle_amount
),
"#49eb29"
)
lostAddDataCol
[
2
]
=
adapterLostAddCol
(
"营
业
额(万元)"
,
conver_amont
(
data
.
sell_settle_amount
),
"#49eb29"
)
lostAddData
[
'column'
]
=
lostAddDataCol
;
return
lostAddData
;
}
...
...
src/module/databoard/databoard/lost-add-customer.vue
View file @
da4b48d1
...
...
@@ -3,11 +3,13 @@
<div
class=
"content"
>
<display-board
class=
"content_card"
:title=
"lostCustomerTitle"
title_size=
"large"
>
<winners-list
style=
"height: 100%;overflow: auto;"
id=
"ar_company_list"
:columns-style=
"
{'title':{'width':'45%'}}"
:rows="lostCustomer"
/>
</display-board>
<display-board
class=
"content_card"
:title=
"addCustomerTitle"
title_size=
"large"
>
<winners-list
style=
"height: 100%;overflow: auto;"
id=
"ar_company_list"
:columns-style=
"
{'title':{'width':'45%'}}"
:rows="addCustomer"
/>
</display-board>
...
...
@@ -50,9 +52,7 @@ export default {
},
async
mounted
()
{
this
.
lostCustomer
=
await
getAllDatas
(
this
.
today
,
2
)
console
.
log
(
this
.
lostCustomer
)
this
.
addCustomer
=
await
getAllDatas
(
this
.
today
,
1
)
console
.
log
(
this
.
addCustomer
)
},
}
</
script
>
...
...
src/module/databoard/databoard/turnoverDetail.js
View file @
da4b48d1
...
...
@@ -136,64 +136,33 @@ export const adapterSumDataDay = function (type, data) {
turnOver
.
title
=
'营业额'
turnOver
.
amount
=
conver_amont
(
data
.
cur_sell_settle_amount
);
//昨日环比
if
(
data
.
pre_sell_settle_amount
)
{
let
yesterday
=
new
Object
()
yesterday
.
title
=
'昨日'
yesterday
.
amount
=
conver_amont
(
data
.
pre_sell_settle_amount
);
yesterday
.
rate
=
calc_hb_str
(
data
.
cur_sell_settle_amount
,
data
.
pre_sell_settle_amount
);
turnOver
[
hb
].
push
(
yesterday
)
}
let
yesterday
=
initRate
(
'昨日'
,
conver_amont
(
data
.
pre_sell_settle_amount
),
calc_hb_str
(
data
.
cur_sell_settle_amount
,
data
.
pre_sell_settle_amount
))
hb
.
push
(
yesterday
)
//昨日环比
if
(
data
.
pre_month_sell_settle_amount
)
{
let
premonth
=
new
Object
()
premonth
.
title
=
'上月'
premonth
.
amount
=
conver_amont
(
data
.
pre_month_sell_settle_amount
);
premonth
.
rate
=
calc_tb_str
(
data
.
cur_sell_settle_amount
,
data
.
pre_month_sell_settle_amount
);
turnOver
[
hb
].
push
(
premonth
)
}
let
premonth
=
initRate
(
'上月'
,
conver_amont
(
data
.
pre_month_sell_settle_amount
),
calc_tb_str
(
data
.
cur_sell_settle_amount
,
data
.
pre_month_sell_settle_amount
))
hb
.
push
(
premonth
)
}
if
(
type
==
'cb'
)
{
turnOver
.
title
=
'成本'
turnOver
.
amount
=
conver_amont
(
data
.
cur_buy_settle_amount
);
//昨日环比
if
(
data
.
pre_buy_settle_amount
)
{
let
yesterday
=
new
Object
()
yesterday
.
title
=
'昨日'
yesterday
.
amount
=
conver_amont
(
data
.
pre_buy_settle_amount
);
yesterday
.
rate
=
calc_hb_str
(
data
.
cur_buy_settle_amount
,
data
.
pre_buy_settle_amount
);
turnOver
[
hb
].
push
(
yesterday
)
}
let
yesterday
=
initRate
(
'昨日'
,
conver_amont
(
data
.
pre_buy_settle_amount
),
calc_hb_str
(
data
.
cur_buy_settle_amount
,
data
.
pre_buy_settle_amount
))
hb
.
push
(
yesterday
)
//昨日环比
if
(
data
.
pre_month_buy_settle_amount
)
{
let
premonth
=
new
Object
()
premonth
.
title
=
'上月'
premonth
.
amount
=
conver_amont
(
data
.
pre_month_buy_settle_amount
);
premonth
.
rate
=
calc_tb_str
(
data
.
cur_buy_settle_amount
,
data
.
pre_month_buy_settle_amount
);
turnOver
[
hb
].
push
(
premonth
)
}
let
premonth
=
initRate
(
'上月'
,
conver_amont
(
data
.
pre_month_buy_settle_amount
),
calc_tb_str
(
data
.
cur_buy_settle_amount
,
data
.
pre_month_buy_settle_amount
))
hb
.
push
(
premonth
)
}
if
(
type
==
'ml'
)
{
turnOver
.
title
=
'毛利'
turnOver
.
amount
=
conver_amont
(
data
.
cur_gross_profit_amount
);
//昨日环比
if
(
data
.
pre_gross_profit_amount
)
{
let
yesterday
=
new
Object
()
yesterday
.
title
=
'昨日'
yesterday
.
amount
=
conver_amont
(
data
.
pre_gross_profit_amount
);
yesterday
.
rate
=
calc_hb_str
(
data
.
cur_gross_profit_amount
,
data
.
pre_gross_profit_amount
);
turnOver
[
hb
].
push
(
yesterday
)
}
let
yesterday
=
initRate
(
'昨日'
,
conver_amont
(
data
.
pre_gross_profit_amount
),
calc_hb_str
(
data
.
cur_gross_profit_amount
,
data
.
pre_gross_profit_amount
))
hb
.
push
(
yesterday
)
//昨日环比
if
(
data
.
pre_month_gross_profit_amount
)
{
let
premonth
=
new
Object
()
premonth
.
title
=
'上月'
premonth
.
amount
=
conver_amont
(
data
.
pre_month_gross_profit_amount
);
premonth
.
rate
=
calc_tb_str
(
data
.
cur_gross_profit_amount
,
data
.
pre_month_gross_profit_amount
);
turnOver
[
hb
].
push
(
premonth
)
}
let
premonth
=
initRate
(
'上月'
,
conver_amont
(
data
.
pre_month_gross_profit_amount
),
calc_tb_str
(
data
.
cur_gross_profit_amount
,
data
.
pre_month_gross_profit_amount
))
hb
.
push
(
premonth
)
}
turnOver
[
'hb'
]
=
hb
return
turnOver
;
}
...
...
@@ -205,22 +174,18 @@ export const initSumDataDay = function () {
let
turnOver
=
new
Object
()
turnOver
.
title
=
'营业额'
turnOver
.
amount
=
"0.0"
let
hb
=
new
Array
()
let
yesterday
=
new
Object
()
yesterday
.
title
=
'昨日'
yesterday
.
amount
=
"0.0"
yesterday
.
rate
=
"0.0"
hb
.
push
(
yesterday
)
yesterday
=
new
Object
()
yesterday
.
title
=
'上月'
yesterday
.
amount
=
"0.0"
yesterday
.
rate
=
"0.0"
hb
.
push
(
yesterday
)
turnOver
.
hb
=
hb
return
turnOver
;
}
export
const
initRate
=
function
(
title
,
amount
,
rate
)
{
let
rateVo
=
new
Object
()
rateVo
.
title
=
title
rateVo
.
amount
=
amount
?
amount
:
"0.0"
rateVo
.
rate
=
rate
?
rate
:
"0%"
return
rateVo
;
}
/**
* 月维度汇总
* @param type
...
...
@@ -231,67 +196,35 @@ export const adapterSumDataMonth = function (type, data) {
let
hb
=
new
Array
()
if
(
type
==
'yye'
)
{
turnOver
.
title
=
'营业额'
turnOver
.
amount
=
conver_amont
(
data
.
cur_month_
buy
_settle_amount
);
turnOver
.
amount
=
conver_amont
(
data
.
cur_month_
sell
_settle_amount
);
//昨日环比
if
(
data
.
pre_month_sell_settle_amount
)
{
let
yesterday
=
new
Object
()
yesterday
.
title
=
'上月'
yesterday
.
amount
=
conver_amont
(
data
.
pre_month_sell_settle_amount
);
yesterday
.
rate
=
calc_hb_str
(
data
.
cur_month_buy_settle_amount
,
data
.
pre_month_sell_settle_amount
);
turnOver
[
hb
].
push
(
yesterday
)
}
let
yesterday
=
initRate
(
'上月'
,
conver_amont
(
data
.
pre_month_sell_settle_amount
),
calc_hb_str
(
data
.
cur_month_sell_settle_amount
,
data
.
pre_month_sell_settle_amount
))
hb
.
push
(
yesterday
)
//昨日环比
if
(
data
.
pre_year_sell_settle_amount
)
{
let
premonth
=
new
Object
()
premonth
.
title
=
'去年'
premonth
.
amount
=
conver_amont
(
data
.
pre_year_sell_settle_amount
);
premonth
.
rate
=
calc_tb_str
(
data
.
cur_sell_settle_amount
,
data
.
pre_year_sell_settle_amount
);
turnOver
[
hb
].
push
(
premonth
)
}
let
premonth
=
initRate
(
'去年'
,
conver_amont
(
data
.
pre_year_sell_settle_amount
),
calc_tb_str
(
data
.
cur_month_sell_settle_amount
,
data
.
pre_year_sell_settle_amount
))
hb
.
push
(
premonth
)
}
if
(
type
==
'cb'
)
{
turnOver
.
title
=
'成本'
turnOver
.
amount
=
conver_amont
(
data
.
cur_month_buy_settle_amount
);
//上月环比
if
(
data
.
pre_month_buy_settle_amount
)
{
let
yesterday
=
new
Object
()
yesterday
.
title
=
'上月'
yesterday
.
amount
=
conver_amont
(
data
.
pre_month_buy_settle_amount
);
yesterday
.
rate
=
calc_hb_str
(
data
.
cur_month_buy_settle_amount
,
data
.
pre_month_buy_settle_amount
);
turnOver
[
hb
].
push
(
yesterday
)
}
let
yesterday
=
initRate
(
'上月'
,
conver_amont
(
data
.
pre_month_buy_settle_amount
),
calc_hb_str
(
data
.
cur_month_buy_settle_amount
,
data
.
pre_month_buy_settle_amount
))
hb
.
push
(
yesterday
)
//去年环比
if
(
data
.
pre_year_buy_settle_amount
)
{
let
premonth
=
new
Object
()
premonth
.
title
=
'去年'
premonth
.
amount
=
conver_amont
(
data
.
pre_year_buy_settle_amount
);
premonth
.
rate
=
calc_tb_str
(
data
.
cur_month_buy_settle_amount
,
data
.
pre_year_buy_settle_amount
);
turnOver
[
hb
].
push
(
premonth
)
}
let
premonth
=
initRate
(
'去年'
,
conver_amont
(
data
.
pre_year_buy_settle_amount
),
calc_tb_str
(
data
.
cur_month_buy_settle_amount
,
data
.
pre_year_buy_settle_amount
))
hb
.
push
(
premonth
)
}
if
(
type
==
'ml'
)
{
turnOver
.
title
=
'毛利'
turnOver
.
amount
=
conver_amont
(
data
.
cur_month_gross_profit_amount
);
//昨日环比
if
(
data
.
pre_month_gross_profit_amount
)
{
let
yesterday
=
new
Object
()
yesterday
.
title
=
'上月'
yesterday
.
amount
=
conver_amont
(
data
.
pre_month_gross_profit_amount
);
yesterday
.
rate
=
calc_hb_str
(
data
.
cur_month_gross_profit_amount
,
data
.
pre_month_gross_profit_amount
);
turnOver
[
hb
].
push
(
yesterday
)
}
let
yesterday
=
initRate
(
'上月'
,
conver_amont
(
data
.
pre_month_gross_profit_amount
),
calc_hb_str
(
data
.
cur_month_gross_profit_amount
,
data
.
pre_month_gross_profit_amount
))
hb
.
push
(
yesterday
)
//昨日环比
if
(
data
.
pre_year_gross_profit_amount
)
{
let
premonth
=
new
Object
()
premonth
.
title
=
'去年'
premonth
.
amount
=
conver_amont
(
data
.
pre_year_gross_profit_amount
);
premonth
.
rate
=
calc_tb_str
(
data
.
cur_month_gross_profit_amount
,
data
.
pre_year_gross_profit_amount
);
turnOver
[
hb
].
push
(
premonth
)
}
let
premonth
=
initRate
(
'去年'
,
conver_amont
(
data
.
pre_year_gross_profit_amount
),
calc_tb_str
(
data
.
cur_month_gross_profit_amount
,
data
.
pre_year_gross_profit_amount
))
hb
.
push
(
premonth
)
}
turnOver
[
'hb'
]
=
hb
return
turnOver
;
}
...
...
@@ -307,41 +240,24 @@ export const adapterSumDataYear = function (type, data) {
turnOver
.
title
=
'营业额'
turnOver
.
amount
=
conver_amont
(
data
.
cur_year_sell_settle_amount
);
//昨日环比
if
(
data
.
pre_year_sell_settle_amount
)
{
let
yesterday
=
new
Object
()
yesterday
.
title
=
'去年'
yesterday
.
amount
=
conver_amont
(
data
.
pre_year_sell_settle_amount
);
yesterday
.
rate
=
calc_hb_str
(
data
.
cur_year_sell_settle_amount
,
data
.
pre_year_sell_settle_amount
);
turnOver
[
hb
].
push
(
yesterday
)
}
let
yesterday
=
initRate
(
'去年'
,
conver_amont
(
data
.
pre_year_sell_settle_amount
),
calc_hb_str
(
data
.
cur_year_sell_settle_amount
,
data
.
pre_year_sell_settle_amount
))
hb
.
push
(
yesterday
)
}
if
(
type
==
'cb'
)
{
turnOver
.
title
=
'成本'
turnOver
.
amount
=
conver_amont
(
data
.
cur_year_buy_settle_amount
);
//上月环比
if
(
data
.
pre_year_buy_settle_amount
)
{
let
yesterday
=
new
Object
()
yesterday
.
title
=
'去年'
yesterday
.
amount
=
conver_amont
(
data
.
pre_year_buy_settle_amount
);
yesterday
.
rate
=
calc_hb_str
(
data
.
cur_year_buy_settle_amount
,
data
.
pre_year_buy_settle_amount
);
turnOver
[
hb
].
push
(
yesterday
)
}
let
yesterday
=
initRate
(
'去年'
,
conver_amont
(
data
.
pre_year_buy_settle_amount
),
calc_hb_str
(
data
.
cur_year_buy_settle_amount
,
data
.
pre_year_buy_settle_amount
))
hb
.
push
(
yesterday
)
}
if
(
type
==
'ml'
)
{
turnOver
.
title
=
'毛利'
turnOver
.
amount
=
conver_amont
(
data
.
cur_year_gross_profit_amount
);
//昨日环比
if
(
data
.
pre_year_gross_profit_amount
)
{
let
yesterday
=
new
Object
()
yesterday
.
title
=
'去年'
yesterday
.
amount
=
conver_amont
(
data
.
pre_year_gross_profit_amount
);
yesterday
.
rate
=
calc_hb_str
(
data
.
cur_year_gross_profit_amount
,
data
.
pre_year_gross_profit_amount
);
turnOver
[
hb
].
push
(
yesterday
)
}
let
yesterday
=
initRate
(
'去年'
,
conver_amont
(
data
.
pre_year_gross_profit_amount
),
calc_hb_str
(
data
.
cur_year_gross_profit_amount
,
data
.
pre_year_gross_profit_amount
))
hb
.
push
(
yesterday
)
}
turnOver
[
'hb'
]
=
hb
return
turnOver
;
}
...
...
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