Commit f55f4b78 authored by 罗超's avatar 罗超

1

parent e1398836
......@@ -291,11 +291,8 @@ export default {
fontSize: 11,
padding: [5, 15, 15, 15],
legend: {
show: true,
show: false,
position: "top",
float: "center",
itemGap: 30,
borderWidth: 1,
},
dataLabel: true,
dataPointShape: true,
......@@ -307,33 +304,32 @@ export default {
enableScroll: true,
xAxis: {
rotateLabel: true,
disableGrid: false,
disableGrid: true,
type: "grid",
gridType: "dash",
itemCount: 24,
itemCount: 4,
labelCount: chartData.categories.length,
scrollShow: true,
scrollAlign: "right",
dashLength: 8,
gridColor: "#FFFFFF",
},
yAxis: {
gridType: "dash",
splitNumber: 5,
min: 0,
max: 180,
format: (val) => {
return val.toFixed(0.1);
}, //如不写此方法,Y轴刻度默认保留两位小数
disabled: true,
},
width: _self.cWidth * _self.pixelRatio,
height: _self.cHeight * _self.pixelRatio,
extra: {
column: {
type: "group",
width:
(_self.cWidth * _self.pixelRatio * 0.45) /
chartData.categories.length,
line: {
type: "curve",
},
},
tooltip: {
horizentalLine: true,
xAxisLabel: true,
yAxisLabel: true,
labelFontColor: "#ffffff",
},
});
},
touchColumn(e) {
......@@ -349,7 +345,47 @@ export default {
});
canvaColumn.showToolTip(e, {
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 {
"/api/Tenant/MallIndexStatistics",
this.basicQMsg,
(res) => {
console.log("11111", res);
this.loading = false;
if (res.resultCode == 1) {
//基础数据统计
this.basicData = res.data.basicData;
console.log("基础数据统计", this.basicData);
//销售情况统计
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 = {
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);
}
}
......
......@@ -118,8 +118,8 @@
</view>
<view class="tabbox">
<u-tabs
:list="list"
:is-scroll="false"
:list="orderStatusList"
name="Name"
:current="currentTab"
@change="changeTab"
></u-tabs>
......@@ -222,14 +222,28 @@ export default {
msg: {
pageIndex: 1,
pageSize: 15,
OrderId: 0,
Name: "",
OrderSource: 0,
OrderType: 0,
DeliveryMethod: 0,
OrderId: 0,
StartTime: "",
EndTime: "",
OrderStatus: 0,
OrderNo: "",
MerchantsNo: "",
UserName: "",
UserId: "",
GoodsName: "",
Consignee: "",
Mobile: "",
ProductCode: "",
Recycled: 2,
AnchorName: "",
IsSelectPayMoney: 0,
IsOffline: -1,
},
orderStatusList: [],
};
},
methods: {
......@@ -249,22 +263,39 @@ export default {
},
changeTab(index) {
this.currentTab = index;
this.msg.OrderStatus=this.orderStatusList[index].Id
console.log(this.msg.OrderStatus)
},
lower(e) {
if (this.msg.pageIndex < this.page_count) {
this.msg.pageIndex++;
this.status = "loading";
this.init();
this.getList();
} else {
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() {
this.timeStr = this.timeArr[0].name;
uni.setNavigationBarTitle({
title: "订单管理",
});
this.getList();
this.getOrderStatus();
},
};
</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