Commit f55f4b78 authored by 罗超's avatar 罗超

1

parent e1398836
...@@ -291,11 +291,8 @@ export default { ...@@ -291,11 +291,8 @@ export default {
fontSize: 11, fontSize: 11,
padding: [5, 15, 15, 15], padding: [5, 15, 15, 15],
legend: { legend: {
show: true, show: false,
position: "top", position: "top",
float: "center",
itemGap: 30,
borderWidth: 1,
}, },
dataLabel: true, dataLabel: true,
dataPointShape: true, dataPointShape: true,
...@@ -307,33 +304,32 @@ export default { ...@@ -307,33 +304,32 @@ export default {
enableScroll: true, enableScroll: true,
xAxis: { xAxis: {
rotateLabel: true, rotateLabel: true,
disableGrid: false, disableGrid: true,
type: "grid", type: "grid",
gridType: "dash", gridType: "dash",
itemCount: 24, itemCount: 4,
labelCount: chartData.categories.length,
scrollShow: true, scrollShow: true,
scrollAlign: "right", scrollAlign: "right",
dashLength: 8, dashLength: 8,
gridColor: "#FFFFFF",
}, },
yAxis: { yAxis: {
gridType: "dash", disabled: true,
splitNumber: 5,
min: 0,
max: 180,
format: (val) => {
return val.toFixed(0.1);
}, //如不写此方法,Y轴刻度默认保留两位小数
}, },
width: _self.cWidth * _self.pixelRatio, width: _self.cWidth * _self.pixelRatio,
height: _self.cHeight * _self.pixelRatio, height: _self.cHeight * _self.pixelRatio,
extra: { extra: {
column: { line: {
type: "group", type: "curve",
width:
(_self.cWidth * _self.pixelRatio * 0.45) /
chartData.categories.length,
}, },
}, },
tooltip: {
horizentalLine: true,
xAxisLabel: true,
yAxisLabel: true,
labelFontColor: "#ffffff",
},
}); });
}, },
touchColumn(e) { touchColumn(e) {
...@@ -349,7 +345,47 @@ export default { ...@@ -349,7 +345,47 @@ export default {
}); });
canvaColumn.showToolTip(e, { canvaColumn.showToolTip(e, {
format: function (item, category) { format: function (item, category) {
return category + " " + item.name + ":" + item.data + "元"; //今日
let now = new Date();
let year = now.getFullYear(); //年
let month = now.getMonth() + 1; //月
let day = now.getDate(); //日
let nowDay = year + "-" + month + "-" + day;
//昨日
now.setTime(now.getTime() - 24 * 60 * 60 * 1000);
let yesDay =
now.getFullYear() +
"-" +
(now.getMonth() + 1) +
"-" +
now.getDate();
if (_self.clickDate == "today") {
return (
nowDay +
" " +
category +
"时" +
" " +
item.name +
":" +
item.data +
"元"
);
} else if (_self.clickDate == "yesterday") {
return (
yesDay +
" " +
category +
"时" +
" " +
item.name +
":" +
item.data +
"元"
);
} else {
return category + " " + item.name + ":" + item.data + "元";
}
}, },
}); });
}, },
...@@ -387,39 +423,44 @@ export default { ...@@ -387,39 +423,44 @@ export default {
"/api/Tenant/MallIndexStatistics", "/api/Tenant/MallIndexStatistics",
this.basicQMsg, this.basicQMsg,
(res) => { (res) => {
console.log("11111", res);
this.loading = false; this.loading = false;
if (res.resultCode == 1) { if (res.resultCode == 1) {
//基础数据统计 //基础数据统计
this.basicData = res.data.basicData; this.basicData = res.data.basicData;
console.log("基础数据统计", this.basicData);
//销售情况统计 //销售情况统计
this.salesData = res.data.salesData; this.salesData = res.data.salesData;
console.log("销售情况统计", this.salesData);
let xData = []; //x轴数据
let xDataList = [];
let orderArray = []; //订单数量
let orderIncome = []; //支付金额
let userArray = []; //支付人数
let goodArray = []; //商品件数
this.salesData.subList.forEach((item) => {
if (this.activeSell == "today") {
xData.push(nowDay + " " + item.TimeStr + "时");
}
if (this.activeSell == "first") {
xData.push(yesDay + " " + item.TimeStr + "时");
}
xDataList.push(item.TimeStr);
orderArray.push(item.OrderCount);
orderIncome.push(item.Income);
userArray.push(item.UserCount);
goodArray.push(item.GoodCount);
});
console.log(418,xData)
let chartsData = { let chartsData = {
categories: [], categories: [],
series: [{ data: xData, name: "销售情况", textColor: "#FFF" }], series: [
{
data: [],
name: "支付订单数",
textColor: "#FFF",
},
{
data: [],
name: "支付金额(元)",
textColor: "#FFF",
},
{
data: [],
name: "支付人数",
textColor: "#FFF",
},
{
data: [],
name: "支付件数",
textColor: "#FFF",
},
],
}; };
this.salesData.subList.forEach((item) => {
chartsData.categories.push(item.TimeStr);
chartsData.series[0].data.push(item.OrderCount);
chartsData.series[1].data.push(item.Income);
chartsData.series[2].data.push(item.UserCount);
chartsData.series[3].data.push(item.GoodCount);
});
this.showColumn("canvasColumn", chartsData); this.showColumn("canvasColumn", chartsData);
} }
} }
......
...@@ -118,8 +118,8 @@ ...@@ -118,8 +118,8 @@
</view> </view>
<view class="tabbox"> <view class="tabbox">
<u-tabs <u-tabs
:list="list" :list="orderStatusList"
:is-scroll="false" name="Name"
:current="currentTab" :current="currentTab"
@change="changeTab" @change="changeTab"
></u-tabs> ></u-tabs>
...@@ -222,14 +222,28 @@ export default { ...@@ -222,14 +222,28 @@ export default {
msg: { msg: {
pageIndex: 1, pageIndex: 1,
pageSize: 15, pageSize: 15,
OrderId: 0, Name: "",
OrderSource: 0,
OrderType: 0, OrderType: 0,
DeliveryMethod: 0, DeliveryMethod: 0,
OrderId: 0,
StartTime: "", StartTime: "",
EndTime: "", EndTime: "",
OrderStatus: 0, OrderStatus: 0,
OrderNo: "", OrderNo: "",
MerchantsNo: "",
UserName: "",
UserId: "",
GoodsName: "",
Consignee: "",
Mobile: "",
ProductCode: "",
Recycled: 2,
AnchorName: "",
IsSelectPayMoney: 0,
IsOffline: -1,
}, },
orderStatusList: [],
}; };
}, },
methods: { methods: {
...@@ -249,22 +263,39 @@ export default { ...@@ -249,22 +263,39 @@ export default {
}, },
changeTab(index) { changeTab(index) {
this.currentTab = index; this.currentTab = index;
this.msg.OrderStatus=this.orderStatusList[index].Id
console.log(this.msg.OrderStatus)
}, },
lower(e) { lower(e) {
if (this.msg.pageIndex < this.page_count) { if (this.msg.pageIndex < this.page_count) {
this.msg.pageIndex++; this.msg.pageIndex++;
this.status = "loading"; this.status = "loading";
this.init(); this.getList();
} else { } else {
this.status = "nomore"; this.status = "nomore";
} }
}, },
getOrderStatus() {
this.requestAdmin("/api/order/GetOrderStatusEnumList", {}, (res) => {
console.log(res)
this.orderStatusList = res.data;
});
},
getList() {
this.requestAdmin(
"/api/order/GetGoodsOrderPageList",
this.msg,
(res) => {}
);
},
}, },
onLoad() { onLoad() {
this.timeStr = this.timeArr[0].name; this.timeStr = this.timeArr[0].name;
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: "订单管理", title: "订单管理",
}); });
this.getList();
this.getOrderStatus();
}, },
}; };
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment