|
@@ -17,19 +17,38 @@
|
|
</view>
|
|
</view>
|
|
<view class="a-section a-topic">
|
|
<view class="a-section a-topic">
|
|
<view class="m-menu">
|
|
<view class="m-menu">
|
|
- <navigator class="item" v-for="(item, index) in statisticsList" :key="index" :url="item.url">
|
|
|
|
- <text class="val">{{item.value}}</text>
|
|
|
|
- <text class="txt">{{item.name}}</text>
|
|
|
|
|
|
+ <navigator class="item">
|
|
|
|
+ <text class="val">{{statistics.todayNum}}</text>
|
|
|
|
+ <text class="txt">今日订单</text>
|
|
|
|
+ </navigator>
|
|
|
|
+ <navigator class="item">
|
|
|
|
+ <text class="val">{{statistics.exceptNum}}</text>
|
|
|
|
+ <text class="txt">异常订单</text>
|
|
|
|
+ </navigator>
|
|
|
|
+ <navigator class="item">
|
|
|
|
+ <text class="val">{{statistics.errMsgNum}}</text>
|
|
|
|
+ <text class="txt">异常消息</text>
|
|
|
|
+ </navigator>
|
|
|
|
+ <navigator class="item">
|
|
|
|
+ <text class="val">{{statistics.todayAmount}}</text>
|
|
|
|
+ <text class="txt">今日销售总额</text>
|
|
|
|
+ </navigator>
|
|
|
|
+ <navigator class="item">
|
|
|
|
+ <text class="val">{{statistics.sevenAmount}}</text>
|
|
|
|
+ <text class="txt">最近七天销售总额</text>
|
|
|
|
+ </navigator>
|
|
|
|
+ <navigator class="item">
|
|
|
|
+ <text class="val">{{statistics.sevenNum}}</text>
|
|
|
|
+ <text class="txt">最近七天订单</text>
|
|
</navigator>
|
|
</navigator>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="a-section material">
|
|
<view class="a-section material">
|
|
- <text>操作</text>
|
|
|
|
- <navigator :url="'../material/material?id='+item.id" v-for="(item, index) in materialList" :key="item.id">
|
|
|
|
|
|
+ <navigator :url="'../material/material?id='+device.id">
|
|
<view class="h">
|
|
<view class="h">
|
|
- <view class="l">{{item.name}}</view>
|
|
|
|
|
|
+ <view class="l">料筒物料</view>
|
|
<view class="r">
|
|
<view class="r">
|
|
- {{item.content}}
|
|
|
|
|
|
+ <image class="icon" src="/static/images/go.png" />
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</navigator>
|
|
</navigator>
|
|
@@ -60,25 +79,14 @@
|
|
status: "1",
|
|
status: "1",
|
|
pic_url: "http://yanxuan.nosdn.127.net/c1c62211a17b71a634fa0c705d11fb42.png"
|
|
pic_url: "http://yanxuan.nosdn.127.net/c1c62211a17b71a634fa0c705d11fb42.png"
|
|
},
|
|
},
|
|
- statisticsList: [{
|
|
|
|
- name: "今日订单",
|
|
|
|
- value: "3"
|
|
|
|
- }, {
|
|
|
|
- name: "异常订单",
|
|
|
|
- value: "1"
|
|
|
|
- }, {
|
|
|
|
- name: "异常消息",
|
|
|
|
- value: "1"
|
|
|
|
- }, {
|
|
|
|
- name: "今日销售总额",
|
|
|
|
- value: "500.00"
|
|
|
|
- }, {
|
|
|
|
- name: "最近七天销售总额",
|
|
|
|
- value: "500.00"
|
|
|
|
- }, {
|
|
|
|
- name: "最近七天订单",
|
|
|
|
- value: "500"
|
|
|
|
- }],
|
|
|
|
|
|
+ statistics: {
|
|
|
|
+ "sevenAmount": "0.00",
|
|
|
|
+ "exceptNum": "0",
|
|
|
|
+ "sevenNum": "0",
|
|
|
|
+ "todayNum": "0",
|
|
|
|
+ "todayAmount": "0.00",
|
|
|
|
+ "errMsgNum": "0"
|
|
|
|
+ },
|
|
materialList: [{
|
|
materialList: [{
|
|
id: 1,
|
|
id: 1,
|
|
name: "料筒物料",
|
|
name: "料筒物料",
|
|
@@ -90,30 +98,41 @@
|
|
}]
|
|
}]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- methods: {
|
|
|
|
- getDeviceDetail(){
|
|
|
|
|
|
+ methods: {
|
|
|
|
+ getDeviceDetail() {
|
|
let that = this;
|
|
let that = this;
|
|
util.request(api.DeviceDetail, {
|
|
util.request(api.DeviceDetail, {
|
|
equId: this.$route.query.id
|
|
equId: this.$route.query.id
|
|
- },'GET','application/json').then(function(res) {
|
|
|
|
|
|
+ }, 'GET', 'application/json').then(function(res) {
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
that.device = res.data;
|
|
that.device = res.data;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- getMaterialData(){
|
|
|
|
|
|
+ getStatistics() {
|
|
|
|
+ let that = this;
|
|
|
|
+ util.request(api.OrderStatistic, {
|
|
|
|
+ equId: this.$route.query.id
|
|
|
|
+ }, 'GET', 'application/json').then(function(res) {
|
|
|
|
+ if (res.code === 0) {
|
|
|
|
+ that.statistics = res.data;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ getMaterialData() {
|
|
let that = this;
|
|
let that = this;
|
|
util.request(api.MaterialList, {
|
|
util.request(api.MaterialList, {
|
|
equId: this.$route.query.id
|
|
equId: this.$route.query.id
|
|
- },'GET','application/json').then(function(res) {
|
|
|
|
- if (res.errno === 0) {
|
|
|
|
|
|
+ }, 'GET', 'application/json').then(function(res) {
|
|
|
|
+ if (res.code === 0) {
|
|
that.materialList = res.data;
|
|
that.materialList = res.data;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- onLoad: function() {
|
|
|
|
|
|
+ onLoad: function() {
|
|
this.getDeviceDetail();
|
|
this.getDeviceDetail();
|
|
this.getMaterialData();
|
|
this.getMaterialData();
|
|
|
|
+ this.getStatistics();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -242,13 +261,11 @@
|
|
|
|
|
|
.m-menu .item .val {
|
|
.m-menu .item .val {
|
|
font-size: 50rpx;
|
|
font-size: 50rpx;
|
|
- padding: 40rpx;
|
|
|
|
- margin-left: 33%;
|
|
|
|
|
|
+ padding: 40rpx;
|
|
}
|
|
}
|
|
|
|
|
|
.m-menu .item .txt {
|
|
.m-menu .item .txt {
|
|
- font-size: 25rpx;
|
|
|
|
- margin-left: 33%;
|
|
|
|
|
|
+ font-size: 25rpx;
|
|
}
|
|
}
|
|
|
|
|
|
.material {
|
|
.material {
|
|
@@ -285,4 +302,9 @@
|
|
height: 60rpx;
|
|
height: 60rpx;
|
|
line-height: 60rpx;
|
|
line-height: 60rpx;
|
|
}
|
|
}
|
|
|
|
+ .icon {
|
|
|
|
+ margin: 30rpx auto 0 auto;
|
|
|
|
+ width: 40rpx;
|
|
|
|
+ height: 40rpx;
|
|
|
|
+ }
|
|
</style>
|
|
</style>
|