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
ddb6e597
Commit
ddb6e597
authored
Sep 25, 2023
by
王礼鸿 Baimax Wang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/ld_databoard_fix' into ld_databoard_fix
parents
3aa561ef
5eb4ab13
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
411 additions
and
2 deletions
+411
-2
apiList.js
src/module/api/apiList.js
+9
-0
lostAddCustomer.js
src/module/databoard/databoard/js/lostAddCustomer.js
+50
-0
lost-add-customer.vue
src/module/databoard/databoard/lost-add-customer.vue
+78
-0
lost_add_customer.json
...odule/databoard/databoard/mockData/lost_add_customer.json
+265
-0
index.vue
src/module/databoard/index.vue
+2
-2
index_router.js
src/module/index/router/index_router.js
+7
-0
No files found.
src/module/api/apiList.js
View file @
ddb6e597
...
...
@@ -110,3 +110,12 @@ export const getOrderLoseAddCustomer = (cur_day) => fetch('/api/query/*/action/g
cur_day
:
cur_day
}
},
'POST'
);
//流失客户 & 新增客户-明细
export
const
getOrderAddCustomerDetail
=
(
cur_day
,
type
)
=>
fetch
(
'/api/query/*/action/get_order_add_customer_detail'
,
{
aux
:
{
cur_day
:
cur_day
,
type
:
type
}
},
'POST'
);
src/module/databoard/databoard/js/lostAddCustomer.js
0 → 100644
View file @
ddb6e597
import
{
getOrderAddCustomerDetail
}
from
"./../../../api/apiList"
;
import
{
conver_amont
}
from
"./../../../utils/numUtil"
;
import
moment
from
'moment'
//天维度数据转换
export
const
getAllDatas
=
async
function
(
cur_day
,
type
)
{
let
res
=
await
getOrderAddCustomerDetail
(
cur_day
,
type
);
let
lostAdd
=
resultProcess
(
res
.
data
);
return
lostAdd
;
};
/**
* 后端接口数据处理
* @param detailList
* @returns {Promise<void>}
*/
export
const
resultProcess
=
function
(
detailList
)
{
let
lostAddDataList
=
new
Array
();
for
(
let
key
in
detailList
)
{
let
resData
=
detailList
[
key
];
let
lostAdd
=
adapterLostAdd
(
resData
)
lostAddDataList
.
push
(
lostAdd
)
}
return
lostAddDataList
}
/**
* 数据处理
* @param data
* @returns
*/
export
const
adapterLostAdd
=
function
(
data
)
{
let
lostAddData
=
{};
lostAddData
[
'title'
]
=
data
.
entrust_agency_name
;
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"
)
lostAddData
[
'column'
]
=
lostAddDataCol
;
return
lostAddData
;
}
export
const
adapterLostAddCol
=
function
(
key
,
val
,
styleColor
)
{
let
lostAddDataCol
=
new
Object
();
lostAddDataCol
.
key
=
key
;
lostAddDataCol
.
value
=
val
;
lostAddDataCol
.
valStyle
=
{
"color"
:
styleColor
}
return
lostAddDataCol
;
}
src/module/databoard/databoard/lost-add-customer.vue
0 → 100644
View file @
ddb6e597
<
template
>
<div
class=
"page"
>
<div
class=
"content"
>
<display-board
class=
"content_card"
:title=
"lostCustomerTitle"
title_size=
"large"
>
<winners-list
style=
"height: 100%"
id=
"ar_company_list"
:rows=
"lostCustomer"
/>
</display-board>
<display-board
class=
"content_card"
:title=
"addCustomerTitle"
title_size=
"large"
>
<winners-list
style=
"height: 100%"
id=
"ar_company_list"
:rows=
"addCustomer"
/>
</display-board>
</div>
</div>
</
template
>
<
script
>
import
data
from
"./mockData/lost_add_customer.json"
;
import
DisplayBoard
from
"../components/container/display-board.vue"
;
import
WinnersList
from
"../components/card/winners-list.vue"
;
import
{
getAllDatas
}
from
"./js/lostAddCustomer"
export
default
{
name
:
"LostAddCustomer"
,
components
:
{
WinnersList
,
DisplayBoard
},
data
()
{
return
{
today
:
'2022-06-26'
,
lostCustomerTitle
:
"流失客户(较去年)"
,
lostCustomer
:
[],
addCustomerTitle
:
"新增客户(较去年)"
,
addCustomer
:
[],
currentData
:
{},
mockData
:
data
.
list
,
chart
:
null
,
currentCard
:
null
,
listTitle
:
"流失客户(较去年)"
,
currentBtn
:
{
date
:
"day"
,
subdivide
:
"domain"
,
},
}
},
methods
:
{
back
()
{
this
.
$router
.
push
({
path
:
'/'
});
},
},
async
mounted
()
{
this
.
lostCustomer
=
await
getAllDatas
(
this
.
today
,
1
)
console
.
log
(
this
.
lostCustomer
)
this
.
addCustomer
=
await
getAllDatas
(
this
.
today
,
2
)
console
.
log
(
this
.
addCustomer
)
},
}
</
script
>
<
style
scoped
>
.page
{
width
:
100%
;
height
:
100%
;
}
.content
{
width
:
100%
;
height
:
80%
;
display
:
flex
;
float
:
left
;
justify-content
:
space-evenly
;
padding
:
0
2rem
2rem
2rem
;
}
.content_card
{
width
:
30%
;
margin-top
:
5%
;
height
:
100%
;
}
</
style
>
src/module/databoard/databoard/mockData/lost_add_customer.json
0 → 100644
View file @
ddb6e597
{
"list"
:
[
{
"title"
:
"上海欧也股份有限公司"
,
"column"
:
[
{
"key"
:
"订单量(万吨)"
,
"value"
:
"202,012"
,
"valStyle"
:
{
"color"
:
"red"
}
},
{
"key"
:
"订单件数"
,
"value"
:
"202,012"
,
"valStyle"
:
{
"color"
:
"#eaa749"
}
},
{
"key"
:
"营销额(万元)"
,
"value"
:
"202,012"
,
"valStyle"
:
{
"color"
:
"#49eb29"
}
}
]
},
{
"title"
:
"上海欧也股份有限公司"
,
"column"
:
[
{
"key"
:
"订单量(万吨)"
,
"value"
:
"202,012"
,
"valStyle"
:
{
"color"
:
"red"
}
},
{
"key"
:
"订单件数"
,
"value"
:
"202,012"
,
"valStyle"
:
{
"color"
:
"#eaa749"
}
},
{
"key"
:
"营销额(万元)"
,
"value"
:
"202,012"
,
"valStyle"
:
{
"color"
:
"#49eb29"
}
}
]
},
{
"title"
:
"上海欧也股份有限公司"
,
"column"
:
[
{
"key"
:
"订单量(万吨)"
,
"value"
:
"202,012"
,
"valStyle"
:
{
"color"
:
"red"
}
},
{
"key"
:
"订单件数"
,
"value"
:
"202,012"
,
"valStyle"
:
{
"color"
:
"#eaa749"
}
},
{
"key"
:
"营销额(万元)"
,
"value"
:
"202,012"
,
"valStyle"
:
{
"color"
:
"#49eb29"
}
}
]
},
{
"title"
:
"上海欧也股份有限公司"
,
"column"
:
[
{
"key"
:
"订单量(万吨)"
,
"value"
:
"202,012"
,
"valStyle"
:
{
"color"
:
"red"
}
},
{
"key"
:
"订单件数"
,
"value"
:
"202,012"
,
"valStyle"
:
{
"color"
:
"#eaa749"
}
},
{
"key"
:
"营销额(万元)"
,
"value"
:
"202,012"
,
"valStyle"
:
{
"color"
:
"#49eb29"
}
}
]
},
{
"title"
:
"上海欧也股份有限公司"
,
"column"
:
[
{
"key"
:
"订单量(万吨)"
,
"value"
:
"202,012"
,
"valStyle"
:
{
"color"
:
"red"
}
},
{
"key"
:
"订单件数"
,
"value"
:
"202,012"
,
"valStyle"
:
{
"color"
:
"#eaa749"
}
},
{
"key"
:
"营销额(万元)"
,
"value"
:
"202,012"
,
"valStyle"
:
{
"color"
:
"#49eb29"
}
}
]
},
{
"title"
:
"上海欧也股份有限公司"
,
"column"
:
[
{
"key"
:
"订单量(万吨)"
,
"value"
:
"202,012"
,
"valStyle"
:
{
"color"
:
"red"
}
},
{
"key"
:
"订单件数"
,
"value"
:
"202,012"
,
"valStyle"
:
{
"color"
:
"#eaa749"
}
},
{
"key"
:
"营销额(万元)"
,
"value"
:
"202,012"
,
"valStyle"
:
{
"color"
:
"#49eb29"
}
}
]
},{
"title"
:
"上海欧也股份有限公司"
,
"column"
:
[
{
"key"
:
"订单量(万吨)"
,
"value"
:
"202,012"
,
"valStyle"
:
{
"color"
:
"red"
}
},
{
"key"
:
"订单件数"
,
"value"
:
"202,012"
,
"valStyle"
:
{
"color"
:
"#eaa749"
}
},
{
"key"
:
"营销额(万元)"
,
"value"
:
"202,012"
,
"valStyle"
:
{
"color"
:
"#49eb29"
}
}
]
},{
"title"
:
"上海欧也股份有限公司"
,
"column"
:
[
{
"key"
:
"订单量(万吨)"
,
"value"
:
"202,012"
,
"valStyle"
:
{
"color"
:
"red"
}
},
{
"key"
:
"订单件数"
,
"value"
:
"202,012"
,
"valStyle"
:
{
"color"
:
"#eaa749"
}
},
{
"key"
:
"营销额(万元)"
,
"value"
:
"202,012"
,
"valStyle"
:
{
"color"
:
"#49eb29"
}
}
]
},{
"title"
:
"上海欧也股份有限公司"
,
"column"
:
[
{
"key"
:
"订单量(万吨)"
,
"value"
:
"202,012"
,
"valStyle"
:
{
"color"
:
"red"
}
},
{
"key"
:
"订单件数"
,
"value"
:
"202,012"
,
"valStyle"
:
{
"color"
:
"#eaa749"
}
},
{
"key"
:
"营销额(万元)"
,
"value"
:
"202,012"
,
"valStyle"
:
{
"color"
:
"#49eb29"
}
}
]
},{
"title"
:
"上海欧也股份有限公司"
,
"column"
:
[
{
"key"
:
"订单量(万吨)"
,
"value"
:
"202,012"
,
"valStyle"
:
{
"color"
:
"red"
}
},
{
"key"
:
"订单件数"
,
"value"
:
"202,012"
,
"valStyle"
:
{
"color"
:
"#eaa749"
}
},
{
"key"
:
"营销额(万元)"
,
"value"
:
"202,012"
,
"valStyle"
:
{
"color"
:
"#49eb29"
}
}
]
}
]
}
src/module/databoard/index.vue
View file @
ddb6e597
...
...
@@ -110,7 +110,7 @@
content-style=
"font-size: 16px;"
mark-style=
"font-size: 10px;"
:content=
"mockData.yl.amount"
mark=
"万元"
/>
</showcase>
<showcase
style=
"width: 18%;"
title=
"流失客户"
>
<showcase
style=
"width: 18%;"
title=
"流失客户"
@
click
.
native=
"routerTo('/lost-add-customer')"
>
<title-content-mark
style=
"float:left;width: 100%;height: 50%;color: #5eeef4;padding: 0 15%;font-size: 16px;"
content-style=
"font-size: 16px;"
mark-style=
"font-size: 10px;"
:content=
"lskh.weight"
...
...
@@ -119,7 +119,7 @@
content-style=
"font-size: 16px;"
mark-style=
"font-size: 10px;"
:content=
"lskh.amount"
mark=
"万元"
/>
</showcase>
<showcase
style=
"width: 18%;"
title=
"新增客户"
>
<showcase
style=
"width: 18%;"
title=
"新增客户"
@
click
.
native=
"routerTo('/lost-add-customer')"
>
<title-content-mark
style=
"float:left;width: 100%;height: 50%;color: #5eeef4;padding: 0 15%;font-size: 16px;"
content-style=
"font-size: 16px;"
mark-style=
"font-size: 10px;"
:content=
"xzkh.weight"
...
...
src/module/index/router/index_router.js
View file @
ddb6e597
...
...
@@ -8,6 +8,8 @@ import ArCompanyMonthlyBar from "../../databoard/components/chart/ar-company-mon
import
ArMonthlyCompanyBar
from
"../../databoard/components/chart/ar-monthly-company-bar.vue"
;
import
TurnoverDetail
from
"../../databoard/databoard/turnover-detail.vue"
;
import
OrderProportion
from
"../../databoard/databoard/order-proportion.vue"
;
import
LostAddCustomer
from
"../../databoard/databoard/lost-add-customer.vue"
;
Vue
.
use
(
Router
)
...
...
@@ -62,6 +64,11 @@ export default new Router({
path
:
'/order-proportion'
,
name
:
'OrderProportion'
,
component
:
OrderProportion
},
{
path
:
'/lost-add-customer'
,
name
:
'lostAddCustomer'
,
component
:
LostAddCustomer
}
]
})
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