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
31bcfa65
Commit
31bcfa65
authored
Sep 27, 2023
by
潘自豪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
流失客户bug修复
parent
aafa21a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
30 deletions
+29
-30
lost-add-customer.vue
src/module/databoard/databoard/lost-add-customer.vue
+3
-3
turnoverDetail.js
src/module/databoard/databoard/turnoverDetail.js
+26
-27
No files found.
src/module/databoard/databoard/lost-add-customer.vue
View file @
31bcfa65
...
...
@@ -49,9 +49,9 @@ export default {
},
},
async
mounted
()
{
this
.
lostCustomer
=
await
getAllDatas
(
this
.
today
,
1
)
this
.
lostCustomer
=
await
getAllDatas
(
this
.
today
,
2
)
console
.
log
(
this
.
lostCustomer
)
this
.
addCustomer
=
await
getAllDatas
(
this
.
today
,
2
)
this
.
addCustomer
=
await
getAllDatas
(
this
.
today
,
1
)
console
.
log
(
this
.
addCustomer
)
},
}
...
...
@@ -72,7 +72,7 @@ export default {
}
.content_card
{
width
:
3
0
%
;
width
:
3
5
%
;
margin-top
:
5%
;
height
:
100%
;
}
...
...
src/module/databoard/databoard/turnoverDetail.js
View file @
31bcfa65
...
...
@@ -130,7 +130,7 @@ export const adapterSumData = function (dimension, type, data) {
* @param data
*/
export
const
adapterSumDataDay
=
function
(
type
,
data
)
{
let
turnOver
=
new
Object
()
let
turnOver
=
initSumDataDay
();
let
hb
=
new
Array
()
if
(
type
==
'yye'
)
{
turnOver
.
title
=
'营业额'
...
...
@@ -141,7 +141,7 @@ export const adapterSumDataDay = function (type, data) {
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
);
hb
.
push
(
yesterday
)
turnOver
[
hb
]
.
push
(
yesterday
)
}
//昨日环比
if
(
data
.
pre_month_sell_settle_amount
)
{
...
...
@@ -149,9 +149,8 @@ export const adapterSumDataDay = function (type, data) {
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
);
hb
.
push
(
premonth
)
turnOver
[
hb
]
.
push
(
premonth
)
}
turnOver
.
hb
=
hb
;
}
if
(
type
==
'cb'
)
{
turnOver
.
title
=
'成本'
...
...
@@ -162,7 +161,7 @@ export const adapterSumDataDay = function (type, data) {
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
);
hb
.
push
(
yesterday
)
turnOver
[
hb
]
.
push
(
yesterday
)
}
//昨日环比
if
(
data
.
pre_month_buy_settle_amount
)
{
...
...
@@ -170,9 +169,9 @@ export const adapterSumDataDay = function (type, data) {
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
);
hb
.
push
(
premonth
)
turnOver
[
hb
]
.
push
(
premonth
)
}
turnOver
.
hb
=
hb
;
}
if
(
type
==
'ml'
)
{
turnOver
.
title
=
'毛利'
...
...
@@ -183,7 +182,7 @@ export const adapterSumDataDay = function (type, data) {
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
);
hb
.
push
(
yesterday
)
turnOver
[
hb
]
.
push
(
yesterday
)
}
//昨日环比
if
(
data
.
pre_month_gross_profit_amount
)
{
...
...
@@ -191,9 +190,9 @@ export const adapterSumDataDay = function (type, data) {
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
);
hb
.
push
(
premonth
)
turnOver
[
hb
]
.
push
(
premonth
)
}
turnOver
.
hb
=
hb
;
}
return
turnOver
;
}
...
...
@@ -228,7 +227,7 @@ export const initSumDataDay = function () {
* @param data
*/
export
const
adapterSumDataMonth
=
function
(
type
,
data
)
{
let
turnOver
=
new
Object
()
let
turnOver
=
initSumDataDay
()
let
hb
=
new
Array
()
if
(
type
==
'yye'
)
{
turnOver
.
title
=
'营业额'
...
...
@@ -239,7 +238,7 @@ export const adapterSumDataMonth = function (type, data) {
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
);
hb
.
push
(
yesterday
)
turnOver
[
hb
]
.
push
(
yesterday
)
}
//昨日环比
if
(
data
.
pre_year_sell_settle_amount
)
{
...
...
@@ -247,9 +246,9 @@ export const adapterSumDataMonth = function (type, data) {
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
);
hb
.
push
(
premonth
)
turnOver
[
hb
]
.
push
(
premonth
)
}
turnOver
.
hb
=
hb
;
}
if
(
type
==
'cb'
)
{
turnOver
.
title
=
'成本'
...
...
@@ -260,7 +259,7 @@ export const adapterSumDataMonth = function (type, data) {
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
);
hb
.
push
(
yesterday
)
turnOver
[
hb
]
.
push
(
yesterday
)
}
//去年环比
if
(
data
.
pre_year_buy_settle_amount
)
{
...
...
@@ -268,9 +267,9 @@ export const adapterSumDataMonth = function (type, data) {
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
);
hb
.
push
(
premonth
)
turnOver
[
hb
]
.
push
(
premonth
)
}
turnOver
.
hb
=
hb
;
}
if
(
type
==
'ml'
)
{
turnOver
.
title
=
'毛利'
...
...
@@ -281,7 +280,7 @@ export const adapterSumDataMonth = function (type, data) {
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
);
hb
.
push
(
yesterday
)
turnOver
[
hb
]
.
push
(
yesterday
)
}
//昨日环比
if
(
data
.
pre_year_gross_profit_amount
)
{
...
...
@@ -289,9 +288,9 @@ export const adapterSumDataMonth = function (type, data) {
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
);
hb
.
push
(
premonth
)
turnOver
[
hb
]
.
push
(
premonth
)
}
turnOver
.
hb
=
hb
;
}
return
turnOver
;
}
...
...
@@ -302,7 +301,7 @@ export const adapterSumDataMonth = function (type, data) {
* @param data
*/
export
const
adapterSumDataYear
=
function
(
type
,
data
)
{
let
turnOver
=
new
Object
()
let
turnOver
=
initSumDataDay
()
let
hb
=
new
Array
()
if
(
type
==
'yye'
)
{
turnOver
.
title
=
'营业额'
...
...
@@ -313,9 +312,9 @@ export const adapterSumDataYear = function (type, data) {
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
);
hb
.
push
(
yesterday
)
turnOver
[
hb
]
.
push
(
yesterday
)
}
turnOver
.
hb
=
hb
;
}
if
(
type
==
'cb'
)
{
turnOver
.
title
=
'成本'
...
...
@@ -326,9 +325,9 @@ export const adapterSumDataYear = function (type, data) {
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
);
hb
.
push
(
yesterday
)
turnOver
[
hb
]
.
push
(
yesterday
)
}
turnOver
.
hb
=
hb
;
}
if
(
type
==
'ml'
)
{
turnOver
.
title
=
'毛利'
...
...
@@ -339,9 +338,9 @@ export const adapterSumDataYear = function (type, data) {
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
);
hb
.
push
(
yesterday
)
turnOver
[
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