提交 cd97652d authored 作者: 吴德鹏's avatar 吴德鹏

首页统计

上级 9fdfaa3c
......@@ -319,7 +319,13 @@ public class TbCfOrderController extends AbstractController {
amount = amount.setScale(2, BigDecimal.ROUND_UP);
return R.ok().put("amount", amount);
}
@GetMapping("/getOrderSumAmount")
@ResponseBody
public R getOrderSumAmount() {
BigDecimal amount = tbCfOrderService.getOrderSumAmount();
amount = amount.setScale(2, BigDecimal.ROUND_UP);
return R.ok().put("amount", amount);
}
//==========================================================================================================
/**
......
......@@ -94,4 +94,6 @@ public interface TbCfOrderDao extends BaseDao<TbCfOrderEntity> {
BigDecimal getAverageSales();
BigDecimal getOrderSumAmount();
}
......@@ -114,4 +114,5 @@ public interface TbCfOrderService {
BigDecimal getAverageSales();
BigDecimal getOrderSumAmount();
}
......@@ -190,5 +190,10 @@ public class TbCfOrderServiceImpl implements TbCfOrderService {
return tbCfOrderDao.getAverageSales();
}
@Override
public BigDecimal getOrderSumAmount() {
return tbCfOrderDao.getOrderSumAmount();
}
}
......@@ -137,6 +137,14 @@
WHERE
pay_status = 20
</select>
<select id="getOrderSumAmount" resultType="java.math.BigDecimal">
SELECT
sum( total_price )
FROM
tb_cf_order
WHERE
pay_status = 20
</select>
<select id="queryList" resultType="com.platform.entity.TbCfOrderEntity">
select
i.order_item_id ordersId,
......
......@@ -11,350 +11,412 @@
#parse("sys/header.html")
<style>
/* common_css */
:root{
--themeColor:#f9f9f9;
--minorFontColor:rgba(0, 0, 0, 0.427450980392157);
--majarFontColor:rgba(0, 0, 0, 0.847058823529412);
--borderColor:#eee;
--borderColorActive:#3BA1FF;
--cardBgColor:white;
}
.center{
:root {
--themeColor: #f9f9f9;
--minorFontColor: rgba(0, 0, 0, 0.427450980392157);
--majarFontColor: rgba(0, 0, 0, 0.847058823529412);
--borderColor: #eee;
--borderColorActive: #3BA1FF;
--cardBgColor: white;
}
.center {
text-align: center;
}
.flex-abs-center{
.flex-abs-center {
display: flex;
justify-content: center;
}
.flex-mill-center{
.flex-mill-center {
display: flex;
align-items: center;
}
.flex-center{
.flex-center {
display: flex;
justify-content: center;
align-items: center;
}
.flex-abs-space-between{
.flex-abs-space-between {
display: flex;
justify-content: center;
justify-content: space-between;
align-items: center;
}
.flex-abs-space-around{
.flex-abs-space-around {
display: flex;
justify-content: center;
justify-content:space-around;
justify-content: space-around;
align-items: center;
}
.active-blue{
.active-blue {
color: var(--borderColorActive);
border-bottom: 2px solid var(--borderColorActive);
}
ul li{
ul li {
list-style: none;
text-align: center;
}
#app{
#app {
box-sizing: border-box;
width: 1200px;
/* margin:0 auto; */
background: #f9f9f9;
}
.minor-container{
width:100%;
height:auto;
.minor-container {
width: 100%;
height: auto;
padding: 20px;
}
/* 卡片统一样式 */
.minor-card{
width:265px;
height:187px;
.minor-card {
width: 265px;
height: 187px;
border-radius: 2px;
background: var(--cardBgColor);
padding:20px;
padding: 20px;
position: relative;
box-sizing: border-box;
overflow: hidden;
}
.m-card-title{
.m-card-title {
font-size: 12px;
color: var(--minorFontColor);
line-height: 22px;
}
.m-card-title>img{
.m-card-title > img {
cursor: help;
}
.m-card-main-text{
.m-card-main-text {
font-size: 30px;
color: var(--majarFontColor);
line-height: 38px;
}
.m-card-bottom{
.m-card-bottom {
position: absolute;
bottom: 0;
left:0;
height:36px;
left: 0;
height: 36px;
padding: 0 20px;
font-size: 14px;
width: 100%;
box-sizing: border-box;
}
.m-card-bottom>span{
.m-card-bottom > span {
display: inline-block;
border-top: 1px solid #eee;
width:100%;
width: 100%;
line-height: 36px;
}
.m-card-functionzone{
.m-card-functionzone {
height: 70px;
font-size: 14px;
color: var(--minorFontColor);
}
/* 小卡片不同样式 */
.svg-icon{
width:10px;
height:10px;
.svg-icon {
width: 10px;
height: 10px;
margin: 0 6px;
}
/* 控制图标旋转 */
.desc-icon{
.desc-icon {
transform: rotate(180deg);
}
.pillar{
height:15px;
width:100%;
background:#F0F2F5;
.pillar {
height: 15px;
width: 100%;
background: #F0F2F5;
position: relative;
z-index: 2;
}
.pillar>.TodaySchedule{
.pillar > .TodaySchedule {
position: absolute;
height:15px;
left:0;
top:0;
width:10px;
height: 15px;
left: 0;
top: 0;
width: 10px;
background: #1890FF;
cursor:help;
cursor: help;
}
.pillar>.YesterdayTheNew{
.pillar > .YesterdayTheNew {
position: absolute;
height:26px;
left:30px;
top:50%;
height: 26px;
left: 30px;
top: 50%;
transform: translateY(-50%);
width:2px;
width: 2px;
background: #1890FF;
z-index: 0;
cursor:help;
cursor: help;
}
/* 中间柱状图 */
.middleEcharts{
width:1200px;
height:400px;
.middleEcharts {
width: 1200px;
height: 400px;
background: var(--themeColor);
padding:20px;
padding-top:0;
padding: 20px;
padding-top: 0;
border-radius: 2px;
}
.middleEcharts>nav{
height:55px;
width:100%;
.middleEcharts > nav {
height: 55px;
width: 100%;
background: var(--cardBgColor);
border-bottom: 1px solid var(--borderColor);
padding:0 20px;
padding: 0 20px;
}
.right-functionzone{
height:55px;
width:auto;
.right-functionzone {
height: 55px;
width: auto;
display: flex;
align-items: center;
}
.right-functionzone>span{
.right-functionzone > span {
display: inline-block;
width:40px;
height:55px;
width: 40px;
height: 55px;
line-height: 55px;
cursor: pointer;
}
.showReport{
margin-left:20px;
.showReport {
margin-left: 20px;
cursor: pointer;
}
.middleEcharts-container{
height:350px;
width:100%;
.middleEcharts-container {
height: 350px;
width: 100%;
background: var(--cardBgColor);
padding:20px;
padding: 20px;
box-sizing: border-box;
}
#middleEcharts-in{
width:100%;
height:100%;
#middleEcharts-in {
width: 100%;
height: 100%;
}
.bottomEcharts{
width:1200px;
.bottomEcharts {
width: 1200px;
background: var(--themeColor);
padding: 20px;
}
.bottomEcharts>div{
width:555px;
height:523px;
background:var(--cardBgColor);
.bottomEcharts > div {
width: 555px;
height: 523px;
background: var(--cardBgColor);
border-radius: 2px;
}
.selectBox{
width:80px;
height:54px;
.selectBox {
width: 80px;
height: 54px;
display: inline-block;
text-align: center;
line-height: 55px;
font-size: 16px;
cursor: pointer;
transition: opacity 0.3s;
margin:0 10px;
margin: 0 10px;
}
.selectBox:hover{
.selectBox:hover {
color: var(--borderColorActive);
border-bottom: 2px solid var(--borderColorActive);
opacity: 0.5;
}
.bottomEcharts .bottomEcharts-title{
height:55px;
.bottomEcharts .bottomEcharts-title {
height: 55px;
border-bottom: 1px solid var(--borderColor);
padding:0 20px;
padding: 0 20px;
}
.bottomEcharts-container{
width:100%;
.bottomEcharts-container {
width: 100%;
height: calc(100% - 55px);
padding:20px;
padding: 20px;
}
.bottom-echats-box-wrapper{
height:110px;
.bottom-echats-box-wrapper {
height: 110px;
}
.bottom-echats-box{
width:216px;
height:auto;
.bottom-echats-box {
width: 216px;
height: auto;
}
.bottom-echats-box>p{
padding:0 10px;
margin-top:6px;
.bottom-echats-box > p {
padding: 0 10px;
margin-top: 6px;
}
.bottom-echats-box>p>span{
.bottom-echats-box > p > span {
vertical-align: middle;
}
.bottom-echats-box>p>:first-child{
.bottom-echats-box > p > :first-child {
font-size: 24px;
margin-right: 24px;
}
.bottom-echats-box>p>:last-child{
.bottom-echats-box > p > :last-child {
color: var(--minorFontColor);
}
.bottom-echats-in{
margin-top:10px;
width:100%;
height:46px;
.bottom-echats-in {
margin-top: 10px;
width: 100%;
height: 46px;
}
.bottom-hot-table{
height:228px;
margin-top:25px;
overflow-y:scroll;
.bottom-hot-table {
height: 228px;
margin-top: 25px;
overflow-y: scroll;
}
.bottom-hot-table>table{
width:100%;
.bottom-hot-table > table {
width: 100%;
border-collapse: collapse;
}
.bottom-hot-table tr{
height:38px;
.bottom-hot-table tr {
height: 38px;
background: var(--cardBgColor);
border-bottom: 1px solid var(--borderColor);
}
.bottom-hot-table td{
padding:0 20px;
.bottom-hot-table td {
padding: 0 20px;
}
.bottom-hot-table>table>thead{
.bottom-hot-table > table > thead {
color: var(--majarFontColor);
}
.bottom-hot-table>table>thead>tr{
background: #FAFAFA!important;
.bottom-hot-table > table > thead > tr {
background: #FAFAFA !important;
}
.active-color{
color:#1890FF;
.active-color {
color: #1890FF;
}
.bottom-Classifier{
height:85px;
.bottom-Classifier {
height: 85px;
}
.bottom-category{
height:75px;
width:100%;
.bottom-category {
height: 75px;
width: 100%;
display: flex;
justify-content: start;
align-items: center;
padding-left:20px;
padding-left: 20px;
}
.bottom-category>select{
.bottom-category > select {
margin-right: 10px;
width:100px;
height:25px;
width: 100px;
height: 25px;
border-radius: 0;
}
.bottom-category>select>option{
width:100px;
height:25px;
.bottom-category > select > option {
width: 100px;
height: 25px;
}
.bottom-category-echarts-container{
padding:20px;
.bottom-category-echarts-container {
padding: 20px;
}
.category-echarts-wrapper{
height:352px;
.category-echarts-wrapper {
height: 352px;
}
.category-echarts{
width:250px;
width:100%;
height:250px;
.category-echarts {
width: 250px;
width: 100%;
height: 250px;
}
.category-echarts-right-detail{
height:352px;
flex:1;
.category-echarts-right-detail {
height: 352px;
flex: 1;
flex-wrap: wrap;
padding:47px 0;
padding: 47px 0;
align-content: flex-start;
align-content: center;
}
.category-echarts-right-detail>div{
width:260px;
.category-echarts-right-detail > div {
width: 260px;
padding-left: 40px;
height:22px;
height: 22px;
display: flex;
justify-content: space-between;
margin-bottom:12px;
margin-bottom: 12px;
}
.category-echarts-right-detail>div>span{
.category-echarts-right-detail > div > span {
display: inline-block;
width:60px;
overflow:hidden;
white-space:nowrap;
width: 60px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-size: 14px;
}
.category-echarts-right-detail>div>span:nth-child(1){
width:80px;
.category-echarts-right-detail > div > span:nth-child(1) {
width: 80px;
}
.category-echarts-right-detail>div>span:nth-child(2){
color:rgba(0, 0, 0, 0.427450980392157);
.category-echarts-right-detail > div > span:nth-child(2) {
color: rgba(0, 0, 0, 0.427450980392157);
}
.category-echarts-right-detail>div>span:nth-child(3){
.category-echarts-right-detail > div > span:nth-child(3) {
text-align: end;
}
.circle{
.circle {
display: inline-block;
width:8px;
height:8px;
width: 8px;
height: 8px;
border-radius: 50%;
background: white;
}
......@@ -569,26 +631,34 @@
<td>
<span>128%</span>
<!-- 升 -->
<svg v-if='el%2===0' xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="8" height="9" viewBox="0 0 30 33">
<svg v-if='el%2===0' xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" width="8" height="9"
viewBox="0 0 30 33">
<metadata><?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c142 79.160924, 2017/07/13-01:06:39 ">
<x:xmpmeta xmlns:x="adobe:ns:meta/"
x:xmptk="Adobe XMP Core 5.6-c142 79.160924, 2017/07/13-01:06:39 ">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""/>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?></metadata>
<image id="图层_0" data-name="图层 0" x="1" y="1" width="28" height="32" xlink:href="data:img/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAgCAMAAAA2a+hwAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAA4VBMVEUAAAAAqlUAq1cAqFQAtm0AzGYAqFQAqVUAtlsAqVUAqVUAuV0A/4AAqVYAqFQAv2AA//8AqVQAqVUAqlUAqVYAqFQAv4AAqVYAqFUAqVQAqVQAqFUAqFUAqVYAqVUAqFUAqFQAqFUAqlUAqVYAqVYAqVQAqVQAqVYAqVYAqVQAqVYAqVYAqFUAqVYAqVQAqFUAqlUAqFUAqVUAqVYAqlUArl4AqVUAqVYAqFcAq1gAqVUAqVQAqFQAqVUAs2YAqVUAqFUArl0AqlUAs1kAqFQArlcAqVUAqVUAqVYAqFQAAADh8uU1AAAASXRSTlMAA09bBwWzyQ6swwsCpLwIAZ20BpWtBIz0+/6lhIC44mqce4l0lHOSfYubhoFio5B4/auYbxP5oS9AuqltsQr83BYJFMgmzedKEIfY/QAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfkAxoNKyvrEallAAAA30lEQVQoz+3SyVbCQBAF0BchKBChQQSTKIqKDCqDKOAEIijU//+QVWSgCbBk59vUcM/J6U4CaDEOYnHsiJkgOjzabkaSOKn0NrOOaZlMdtNUjvzkTzawQGFOixEryfaMyHa4utaanYtdlIkur6SrKM2uZXMDQdxKX13Zncw1eIi6TI3Alk9qqgBxL/ODZ49yhpacwUe0RTvSxbrcPRnQED3RZ+ClzzVhYg3VgJfOEK9c3vxvESKMd15/QH3a7ghRhJkbf024fodX0hCY6i8iitH84/6Qf4DZTvz5nS/0+Q+pfDoqy9j1ggAAAABJRU5ErkJggg=="/>
<image id="图层_0" data-name="图层 0" x="1" y="1" width="28" height="32"
xlink:href="data:img/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAgCAMAAAA2a+hwAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAA4VBMVEUAAAAAqlUAq1cAqFQAtm0AzGYAqFQAqVUAtlsAqVUAqVUAuV0A/4AAqVYAqFQAv2AA//8AqVQAqVUAqlUAqVYAqFQAv4AAqVYAqFUAqVQAqVQAqFUAqFUAqVYAqVUAqFUAqFQAqFUAqlUAqVYAqVYAqVQAqVQAqVYAqVYAqVQAqVYAqVYAqFUAqVYAqVQAqFUAqlUAqFUAqVUAqVYAqlUArl4AqVUAqVYAqFcAq1gAqVUAqVQAqFQAqVUAs2YAqVUAqFUArl0AqlUAs1kAqFQArlcAqVUAqVUAqVYAqFQAAADh8uU1AAAASXRSTlMAA09bBwWzyQ6swwsCpLwIAZ20BpWtBIz0+/6lhIC44mqce4l0lHOSfYubhoFio5B4/auYbxP5oS9AuqltsQr83BYJFMgmzedKEIfY/QAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAHdElNRQfkAxoNKyvrEallAAAA30lEQVQoz+3SyVbCQBAF0BchKBChQQSTKIqKDCqDKOAEIijU//+QVWSgCbBk59vUcM/J6U4CaDEOYnHsiJkgOjzabkaSOKn0NrOOaZlMdtNUjvzkTzawQGFOixEryfaMyHa4utaanYtdlIkur6SrKM2uZXMDQdxKX13Zncw1eIi6TI3Alk9qqgBxL/ODZ49yhpacwUe0RTvSxbrcPRnQED3RZ+ClzzVhYg3VgJfOEK9c3vxvESKMd15/QH3a7ghRhJkbf024fodX0hCY6i8iitH84/6Qf4DZTvz5nS/0+Q+pfDoqy9j1ggAAAABJRU5ErkJggg=="/>
</svg>
<!-- 降 -->
<svg v-else xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="8" height="9" viewBox="0 0 30 33">
<svg v-else xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" width="8" height="9"
viewBox="0 0 30 33">
<metadata><?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c142 79.160924, 2017/07/13-01:06:39 ">
<x:xmpmeta xmlns:x="adobe:ns:meta/"
x:xmptk="Adobe XMP Core 5.6-c142 79.160924, 2017/07/13-01:06:39 ">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""/>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?></metadata>
<image id="图层_0" data-name="图层 0" x="1" width="28" height="32" xlink:href="data:img/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAgCAMAAAA2a+hwAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAA51BMVEUAAADyQzbwQjTxQTXxQTfyQTTxQTTxQjTwQTX/VTnyTUD////xQjXxQTXxQjX/TU3/ZmbwQjXxQjXwQjXzRjrzRDjxQjT/SUn/VVXxQjXxQjbyQzbxQjTxQjXxQzT0QTbxQzXxQjTwQjTwQTXxQzXyQTTxQTTxQjX/gIDxQjXwQjXxQzXwQjXyQzXxQTXyQzXxQjTxQTXwQjXwQjbwQTTyQjXxQTXxQjTxQjbxQzTwQTTwQjXwQjTxQTXwQjX/gEDwQzbxQjT/VVXxQTXwQTX/YEDwQTXxQTTxQjT/STfyRDfwQTQAAADVUJXCAAAAS3RSTlMAJs3nSpjIueMJFAGx+6UKBZ783RZAugcDqW0T+bOhL1v9q5lvYv6jApB4apuGgXOSfYt7iXSUhIBrnIz0la0EnbUGpLwIrMPJDk+GsGe3AAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB+QDGg0uJAbZQLEAAADQSURBVCjP7ZHFFsJADEWDyyDFizsUd3eX/P//MDk9hba0W1Zkk/feXUwmAVCVxWqzg1k5EJ2m0IXo/sOfQY8x9DIA5vMHgt9QCIUjUYghYjyhh2KSxylIZ3jLClrIcjzEPEChyHtJ1MAysQqpao2ruqSCDWJN+YEW6TZ7ww75rjJ1j1xfgQNyw89XR+THMpyQnqoXMaNkTnBBask0a1pRtkb003QBSbfEDb5ru9Mvne0Vdjh+n0Q6yex8MTqYeCV2C4JhCVnE+8Ps2OKzkFD7F58HOHvJ70P7AAAAAElFTkSuQmCC"/>
<image id="图层_0" data-name="图层 0" x="1" width="28" height="32"
xlink:href="data:img/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAgCAMAAAA2a+hwAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAA51BMVEUAAADyQzbwQjTxQTXxQTfyQTTxQTTxQjTwQTX/VTnyTUD////xQjXxQTXxQjX/TU3/ZmbwQjXxQjXwQjXzRjrzRDjxQjT/SUn/VVXxQjXxQjbyQzbxQjTxQjXxQzT0QTbxQzXxQjTwQjTwQTXxQzXyQTTxQTTxQjX/gIDxQjXwQjXxQzXwQjXyQzXxQTXyQzXxQjTxQTXwQjXwQjbwQTTyQjXxQTXxQjTxQjbxQzTwQTTwQjXwQjTxQTXwQjX/gEDwQzbxQjT/VVXxQTXwQTX/YEDwQTXxQTTxQjT/STfyRDfwQTQAAADVUJXCAAAAS3RSTlMAJs3nSpjIueMJFAGx+6UKBZ783RZAugcDqW0T+bOhL1v9q5lvYv6jApB4apuGgXOSfYt7iXSUhIBrnIz0la0EnbUGpLwIrMPJDk+GsGe3AAAAAWJLR0QAiAUdSAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB+QDGg0uJAbZQLEAAADQSURBVCjP7ZHFFsJADEWDyyDFizsUd3eX/P//MDk9hba0W1Zkk/feXUwmAVCVxWqzg1k5EJ2m0IXo/sOfQY8x9DIA5vMHgt9QCIUjUYghYjyhh2KSxylIZ3jLClrIcjzEPEChyHtJ1MAysQqpao2ruqSCDWJN+YEW6TZ7ww75rjJ1j1xfgQNyw89XR+THMpyQnqoXMaNkTnBBask0a1pRtkb003QBSbfEDb5ru9Mvne0Vdjh+n0Q6yex8MTqYeCV2C4JhCVnE+8Ps2OKzkFD7F58HOHvJ70P7AAAAAElFTkSuQmCC"/>
</svg>
</td>
</tr>
......@@ -596,7 +666,7 @@
</table>
</div>
<div class="bottom-Classifier flex-center">
<Page :total="40" :page-size-opts="[5,10,20]" size="small" show-elevator show-sizer />
<Page :total="40" :page-size-opts="[5,10,20]" size="small" show-elevator show-sizer/>
</div>
</div>
</div>
......@@ -605,21 +675,21 @@
<h3>销售额类别占比</h3>
</div>
<div class="bottom-category">
<select>
<option>一级分类</option>
<option>2</option>
<option>3</option>
</select>
<select>
<option>二级分类</option>
<option>2</option>
<option>3</option>
</select>
<select>
<option>三级分类</option>
<option>2</option>
<option>3</option>
</select>
<i-select placeholder="一级分类" @on-change="changeGoodstype">
<i-option v-for="category in categoryList" :value="category.goodstypeId">{{category.goodstypeTitle}}
</i-option>
</i-select>
<i-select placeholder="二级分类"
@on-change="changeGoodstype2" v-model="category2">
<i-option v-for="(el,i) in Goodstype2" :key='i'
:value="el.goodstwotypeId">{{el.goodstwotypeTitle}}
</i-option>
</i-select>
<i-select placeholder="三级分类" v-model="category3">
<i-option v-for="(el,i) in Goodstype3" :key='i'
:value="el.descripitionId">{{el.descripitionName}}
</i-option>
</i-select>
</div>
<div class="bottom-category-echarts-container">
<h3>图标标题</h3>
......@@ -651,5 +721,4 @@
<script src="${rc.contextPath}/js/sys/main.js?_${date.systemTime}"></script>
</html>
\ No newline at end of file
......@@ -2,6 +2,8 @@ let app = new Vue({
el: '#app',
data() {
return {
category2: null,
category3: null,
amount: 0,
orderRate: 0,
ForturnoverNumber: 0,
......@@ -236,7 +238,10 @@ let app = new Vue({
{value: 1548, name: 'Sport', price: 123, itemStyle: {color: '#36CBCB'}}
]
}
]
],
categoryList: [],
Goodstype2: [],
Goodstype3: []
}
},
computed: {
......@@ -251,6 +256,42 @@ let app = new Vue({
}
},
methods: {
//获取二级分类
changeGoodstype(id) {
let url = "../tbcfstationitem/queryByItemType?typeId=" + id;
let that = this;
Ajax.request({
url: url,
type: "get",
contentType: "application/json",
successCallback: function (r) {
if (r.code === 0) {
that.Goodstype2 = r.list
// e?setTimeout(()=>{that.changeGoodstype2()},0):void(0);
if (r.list.length === 0) {
that.category2 = null
}
}
}
});
},
changeGoodstype2(id) {
let url = "../tbcfstationitem/queryByItemTypeTwo?typeTwoId=" + id;
let that = this;
Ajax.request({
url: url,
type: "get",
contentType: "application/json",
successCallback: function (r) {
if (r.code === 0) {
that.Goodstype3 = r.descripiton
if (r.descripiton.length === 0) {
that.category3 = null
}
}
}
});
},
templateMethod(url) {
$.get(url, res => {
this.initEchartsMiddleData[0].data = []
......@@ -687,20 +728,14 @@ let app = new Vue({
}
},
getOrderNum() {
let orderNum = 0;
$.get('../tbcforder/getOrderNum', res => {
orderNum = res.count
TweenLite.to(this.$data, 1, {ForturnoverNumber: res.count});
$.get('../tbcforder/getOrderSumAmount', res => {
TweenLite.to(this.$data, 1, {ForturnoverNumber: res.amount});
})
return orderNum;
},
getOrderPaidNum() {
let orderPaidNum = 0;
$.get('../tbcforder/getOrderNum?status=20', res => {
orderPaidNum = res.count
TweenLite.to(this.$data, 1, {FrequencyOfPaymentNumber: res.count});
})
return orderPaidNum;
},
getOrderRate() {
let orderNum = 0;
......@@ -709,7 +744,6 @@ let app = new Vue({
orderNum = res.count
$.get('../tbcforder/getOrderNum?status=20', res => {
orderPaidNum = res.count
console.log(orderNum + "---" + orderPaidNum)
this.orderRate = this.Percentage(orderPaidNum, orderNum)
})
})
......@@ -724,10 +758,16 @@ let app = new Vue({
$.get('../tbcforder/getAverageSales', res => {
this.amount = res.amount;
})
},
getCategory() {
$.get('../tbcfgoodstype/queryAll', res => {
this.categoryList = res.list;
console.log(this.categoryList)
})
}
},
created() {
this.getCategory();
},
mounted() {
this.initEchartsPV();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论