Browse Source

修复前端展示功能bug

oyq28 2 years ago
parent
commit
33212acbc8

+ 2 - 2
imcs-bt-fe/imcs-bt-fe/uni-mall/pages/device/device.vue

@@ -163,12 +163,12 @@
 	}
 	
 	.device-list .status .exception {
-		color: #ff0000;
+		color: #666;
 		font-size: 40rpx;
 	}
 	
 	.device-list .status .lack {
-		color: #ffff00;
+		color: #ff0000;
 		font-size: 40rpx;
 	}
 	

+ 18 - 5
imcs-bt-fe/imcs-bt-fe/uni-mall/pages/device/deviceDetail.vue

@@ -48,7 +48,8 @@
 				<view class="h">
 					<view class="l">料筒物料</view>
 					<view class="r">
-						<text class="tip">缺料、过期</text>
+						<text class="tip">{{statusMap.barrelLackNum && statusMap.barrelLackNum>0? '缺料':''}} {{statusMap.barrelExprNum && statusMap.barrelExprNum>0? '过期':''}}
+						</text>
 						<image class="icon" src="/static/images/go.png" />
 					</view>
 				</view>
@@ -57,7 +58,7 @@
 				<view class="h">
 					<view class="l">杯子物料</view>
 					<view class="r">
-						<text class="tip">缺料</text>
+						<text class="tip">{{statusMap.cupLackNum && statusMap.cupLackNum>0? '缺料':''}} {{statusMap.cupExprNum && statusMap.cupExprNum>0? '过期':''}}</text>
 						<image class="icon" src="/static/images/go.png" />
 					</view>
 				</view>
@@ -96,7 +97,8 @@
 					"todayNum": "0",
 					"todayAmount": "0.00",
 					"errMsgNum": "0"
-				}
+				},
+				statusMap: {}
 			}
 		},
 		methods: {
@@ -120,11 +122,22 @@
 					}
 				});
 			},
+			getDevStatus(equId) {
+				let that = this;
+				util.request(api.DevStatusMap, {
+					equId: equId
+				}, 'GET', 'application/json').then(function(res) {
+					if (res.code === 0) {
+						that.statusMap = res.data;
+					}
+				});
+			},
 			onLoad: function(option) {
 				let equId = option.id? option.id : ""
 				if(equId){
 					this.getDeviceDetail(equId);
 					this.getStatistics(equId);
+					this.getDevStatus(equId);
 				}else{
 					util.toast("传参为空");
 					uni.redirectTo({
@@ -213,11 +226,11 @@
 	}
 
 	.a-popular .b .status.exception {
-		color: #ff0000;
+		color: #666;
 	}
 
 	.a-popular .b .status.lack {
-		color: #ffff00;
+		color: #ff0000;
 	}
 
 	.m-menu {

+ 2 - 2
imcs-bt-fe/imcs-bt-fe/uni-mall/pages/index/index.vue

@@ -621,11 +621,11 @@
 	}
 
 	.a-popular .b .status.exception {
-		color: #ff0000;
+		color: #666;
 	}
 
 	.a-popular .b .status.lack {
-		color: #ffff00;
+		color: #ff0000;
 	}
 
 	.a-topic .b {

+ 1 - 1
imcs-bt-fe/imcs-bt-fe/uni-mall/pages/material/cup.vue

@@ -43,7 +43,7 @@
 					<uni-th align="center">到期日期</uni-th>
 				</uni-tr>
 				<uni-tr v-for="(item, index) in records" :key="item.id">
-					<uni-td align="center">{{item.barrelCode}}</uni-td>
+					<uni-td align="center">{{item.barrelCode||''}}</uni-td>
 					<uni-td align="center">{{item.mtName||'空'}}</uni-td>
 					<uni-td align="center">{{item.surplus||'0'}}</uni-td>
 					<uni-td align="center">{{item.mtrName||'空'}}</uni-td>

+ 1 - 1
imcs-bt-fe/imcs-bt-fe/uni-mall/pages/material/material.vue

@@ -43,7 +43,7 @@
 					<uni-th align="center">到期日期</uni-th>
 				</uni-tr>
 				<uni-tr v-for="(item, index) in records" :key="item.id">
-					<uni-td align="center">{{item.barrelCode}}</uni-td>
+					<uni-td align="center">{{item.barrelCode||''}}</uni-td>
 					<uni-td align="center">{{item.mtName||'空'}}</uni-td>
 					<uni-td align="center">{{item.surplus|| '0'}}</uni-td>
 					<uni-td align="center">{{item.mtrName||'空'}}</uni-td>

+ 1 - 1
imcs-bt-fe/imcs-bt-fe/uni-mall/pages/ucenter/index/index.vue

@@ -62,7 +62,7 @@
 					<text class="txt">意见反馈</text>
 				</navigator>
 			</view>
-			<view class="item item-bottom" v-if="!hasMobile">
+			<view class="item item-bottom" v-if="!hasMobile" v-show="false">
 				<navigator url="/pages/auth/mobile/mobile" class="a">
 					<text class="icon phone"></text>
 					<text class="txt">绑定手机</text>

+ 3 - 3
imcs-bt-fe/imcs-bt-fe/uni-mall/pages/ucenter/order/order.vue

@@ -105,7 +105,7 @@
 				array: [{
 					id: "",
 					name: '全部'
-				},{id:"0", name: '未支付'},{id:"1", name: '已支付'},{id:"2", name:'已取消'},{id:"3", name:'生产完成'},{id:"4", name: '异常'},{id:"5", name: '转入退款'},],
+				},{id:"0", name: '未支付'},{id:"1", name: '已支付'},{id:"2", name:'已取消'},{id:"3", name:'生产完成'},{id:"4", name: '异常'},{id:"5", name: '转入退款'},{id:"6", name: '其它'}],
 				orderList: [
 					/*{
 					name: '美式咖啡',
@@ -238,13 +238,12 @@
 				}else if(that.index==''){
 					that.queryParams.model.orderStatus =''
 				}
-				console.log(that.range)
 				if (that.range.length > 0) {
 					that.queryParams.map.createTime_st = that.range[0];
 					that.queryParams.map.createTime_ed = that.range[1];
 				}
 				util.request(api.OrderList, that.queryParams, 'post', 'application/json').then(function(res) {
-					if (res.code === 0) {						
+					if (res.code === 0) {
 						res.data.records = res.data.records.filter(item=>{
 							if(item.id==null){							   
 							   that.orderSum = item.orderSum;
@@ -253,6 +252,7 @@
 							return true;
 						})						
 						that.orderList = that.orderList.concat(res.data.records);
+						console.log(that.orderList)
 						//that.page = res.data.currentPage + 1
 						that.totalPages = res.data.pages
 						that.orderCount = res.data.total

+ 1 - 0
imcs-bt-fe/imcs-bt-fe/uni-mall/utils/api.js

@@ -25,6 +25,7 @@ module.exports = {
 	
 	DeviceList: 'getEquList', //设备列表
 	DeviceDetail: 'equDetails', //设备详情
+	DevStatusMap: 'getDevStatusMap', //设备状态
 
 	CartList: 'cart/index', //获取购物车的数据
 	CartAdd: 'cart/add', // 添加商品到购物车