Bladeren bron

处理微信小程序页面bug

oyq28 2 jaren geleden
bovenliggende
commit
c4bb688cbb

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

@@ -14,8 +14,8 @@
 					</view>					 
 				</view>
 				<view class="status">
-					<text :class="item.status==='1'? 'normal': item.status==='2'? 'exception' : 'lack'">
-					 {{item.status==='1'? '正常': (item.status==='2'? '异常' : '缺料')}}
+					<text :class="item.onlineStatus==='1'? 'normal': item.onlineStatus==='2'? 'exception' : 'lack'">
+					 {{item.onlineStatus==='1'? '正常': (item.onlineStatus==='2'? '异常' : '缺料')}}
 					</text>
 				</view>	 
 				<view class="desc">
@@ -63,7 +63,7 @@
 			getdeviceList: function(type) {
 				let that = this;
 				if(type!=null){
-					//this.queryParams.model.status = type
+					this.queryParams.model.onlineStatus = type
 				}
 				return util.request(api.DeviceList, this.queryParams, 'post', 'application/json').then(function(res) {
 					if (res.code === 0) {

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

@@ -8,8 +8,8 @@
 						<text class="name">{{device.name}}</text>
 						<text class="desc">{{device.address}}</text>
 						<text class="status"
-							:class="device.status==='1'? 'normal': device.status==='2'? 'exception' : 'lack'">
-							{{device.status==='1'? '正常': (device.status==='2'? '异常' : '缺料')}}
+							:class="device.onlineStatus==='1'? 'normal': device.onlineStatus==='2'? 'exception' : 'lack'">
+							{{device.onlineStatus==='1'? '正常': (device.onlineStatus==='2'? '异常' : '缺料')}}
 						</text>
 					</view>
 				</view>
@@ -48,6 +48,7 @@
 				<view class="h">
 					<view class="l">料筒物料</view>
 					<view class="r">
+						<text class="tip">缺料、过期</text>
 						<image class="icon" src="/static/images/go.png" />
 					</view>
 				</view>
@@ -56,6 +57,7 @@
 				<view class="h">
 					<view class="l">杯子物料</view>
 					<view class="r">
+						<text class="tip">缺料</text>
 						<image class="icon" src="/static/images/go.png" />
 					</view>
 				</view>
@@ -292,6 +294,13 @@
 		color: #b4282d;
 		font-size: 24rpx;
 	}
+	.material .r .tip{
+		margin-right: 30rpx;
+		color: #dddd6e;
+		font-size: 30rpx;
+		line-height: 60rpx;
+		height: 60rpx;		
+	}
 
 	.title {
 		margin-left: 30rpx;

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

@@ -102,8 +102,8 @@
 								<text class="name">{{item.name}}</text>
 								<text class="desc">{{item.address}}</text>								
 								<text class="status"
-									:class="item.status==='1'? 'normal': item.status==='2'? 'exception' : 'lack'">
-									{{item.status==='1'? '正常': (item.status==='2'? '异常' : '缺料')}}
+									:class="item.onlineStatus==='1'? 'normal': item.onlineStatus==='2'? 'exception' : 'lack'">
+									{{item.onlineStatus==='1'? '正常': (item.onlineStatus==='2'? '异常' : '离线')}}
 								</text>
 							</view>
 						</view>
@@ -137,8 +137,8 @@
 								<text class="name">{{item.name}}</text>
 								<text class="desc">{{item.address}}</text>
 								<text class="status"
-									:class="item.status==='1'? 'normal': item.status==='2'? 'exception' : 'lack'">
-								 {{item.status==='1'? '正常': (item.status==='2'? '异常' : '缺料')}}
+									:class="item.onlineStatus==='1'? 'normal': item.onlineStatus==='2'? 'exception' : 'lack'">
+								 {{item.onlineStatus==='1'? '正常': (item.onlineStatus==='2'? '异常' : '缺料')}}
 								</text>
 							</view>
 						</view>
@@ -349,9 +349,9 @@
 						if (res.code === 0) {
 							//that.channel = res.data.channel
 							let statistic = res.data;
-							let arr = [statistic.deviceNum,1,1, statistic.todayNum,statistic.todayAmount,statistic.exceptNum];
+							let arr = [statistic.deviceNum,statistic.exceptDevice,statistic.lackDevice, statistic.todayNum,statistic.todayAmount,statistic.exceptNum];
 							that.channel.forEach((item,i)=>{								
-								item.val = arr[i]
+								item.val = arr[i]+''
 							})
 						}
 					});

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

@@ -94,8 +94,8 @@
 				index: 0,
 				index2: 0,
 				isToday: true,
-				statusId: 0,
-				deviceId: '',
+				//statusId: '0',
+				//deviceId: '',
 				deviceList: [{
 					id: '',
 					name: '全部'
@@ -103,9 +103,9 @@
 				orderCount: 2,
 				orderSum: 0.0,
 				array: [{
-					id: 0,
+					id: "",
 					name: '全部'
-				},{id:1, name: '未支付'},{id:2, name: '已支付'},{id:3, name:'已取消'},{id:4, name:'生产完成'},{id:5, name: '异常'},{id:6, name: '转入退款'},],
+				},{id:"0", name: '未支付'},{id:"1", name: '已支付'},{id:"2", name:'已取消'},{id:"3", name:'生产完成'},{id:"4", name: '异常'},{id:"5", name: '转入退款'},],
 				orderList: [
 					/*{
 					name: '美式咖啡',
@@ -147,7 +147,7 @@
 		methods: {
 			bindPickerChange: function(e) {
 				this.index = e.detail.value
-				this.statusId = this.array[this.index].id				
+				//this.statusId = this.array[this.index].id				
 				this.orderList = []
 				this.queryParams.current = 1
 				let pages = getCurrentPages();
@@ -157,7 +157,7 @@
 			},
 			bindPickerChange2: function(e) {
 				this.index2 = e.detail.value;
-				this.deviceId = this.deviceList[this.index2].id
+				//this.deviceId = this.deviceList[this.index2].id
 				this.orderList = []
 				this.queryParams.current = 1
 				//this.queryParams.model.orderEquId = this.deviceId
@@ -224,18 +224,19 @@
 				if(type=="1"){
 					that.range=[util.getNowDate(0), util.getNowDate(1)];
 					that.isToday = true
-				}else{					
+				}else{
+					if(type=="2"){
+						that.index = 5
+					}
 					that.isToday = false					
 				}
-				if (that.deviceId) {
-					that.queryParams.model.orderEquId = that.deviceId
+				if (that.index2) {
+					that.queryParams.model.orderEquId = that.deviceList[that.index2].id
 				}
-				if(that.statusId>0){
-					that.queryParams.model.orderStatus = that.statusId - 1
-					that.index = that.statusId
-				}else if(type=="2"){
-					that.queryParams.model.orderStatus = '4'
-					that.index = 5
+				if(that.index){
+					that.queryParams.model.orderStatus = that.array[that.index].id					
+				}else if(that.index==''){
+					that.queryParams.model.orderStatus =''
 				}
 				console.log(that.range)
 				if (that.range.length > 0) {