李天标 2 anos atrás
pai
commit
b42c4f2ccf

+ 9 - 1
common/lang/en.js

@@ -80,6 +80,7 @@ export default {
 		rebootTip:'whether or not to reboot?',
 		sleepTip:'whether or not to sleep?',
 		onoffTip:'whether to turn it off?',
+		wuliaoTip:'Are you sure?',
 		onoff:'boot/shut down....',
 		kaiji:'In the boot',
 		guanji:'Shut down the',
@@ -104,6 +105,8 @@ export default {
 		stick:'stick',
 		water:'water',
 		wasteWater:'wasteWater',
+		buliao:'one click to complete materials',
+		buliaoT:'implement'
 	},
 	equipmentStatics:{
 		title:'Machine Sales Ranking',
@@ -120,7 +123,8 @@ export default {
 		bindLogout:'exit',
 		equipmentname:'modify device name',
 		remote:'remote operation',
-		equipmentlist:'machine details'
+		equipmentlist:'machine details',
+		bangji:'machine connection server'
 	},
 	equipmentname:{
 		title:'modify device name',
@@ -236,5 +240,9 @@ export default {
 		A35:'Color elf-mini',
 		name:'productName',
 		price:'price'
+	},
+	bangdingMachine:{
+		clientId:'clientId',
+		equimentType:'equimentType'
 	}
 }

+ 11 - 3
common/lang/zh.js

@@ -64,8 +64,8 @@ export default {
 		title:'机器状态',
 		red:'红色代表机器报警',
 		green:'绿色代表机器正常',
-		sleep:'睡眠状态:机器已睡眠',
-		unsleep:'睡眠状态:未睡眠',
+		sleep:'睡眠状态:已开启睡眠模式',
+		unsleep:'睡眠状态:已关闭睡眠模式',
 		on:'开/关炉头:已开启',
 		off:'开/关炉头:已关闭',
 		equipmentNo:'机器唯一码',
@@ -78,6 +78,7 @@ export default {
 		rebootTip:'是否重启?',
 		sleepTip:'是否休眠?',
 		onoffTip:'是否关机?',
+		wuliaoTip:'是否补料?',
 		onoff:'开/关机中',
 		kaiji:'开机中',
 		guanji:'关机中',
@@ -102,6 +103,8 @@ export default {
 		stick:'棍子',
 		water:'清水',
 		wasteWater:'废水',
+		buliao:'一键补料',
+		buliaoT:'补料'
 	},
 	equipmentStatics:{
 		title:'机器销售排行',
@@ -118,7 +121,8 @@ export default {
 		bindLogout:'退出',
 		equipmentname:'修改设备名称',
 		remote:'远程操作',
-		equipmentlist:'机器详情'
+		equipmentlist:'机器详情',
+		bangji:'机器连接服务器'
 	},
 	equipmentname:{
 		title:'修改设备名称',
@@ -234,5 +238,9 @@ export default {
 		A35:'彩色精灵mini',
 		name:'商品',
 		price:'价格'
+	},
+	bangdingMachine:{
+		clientId:'设备编号',
+		equimentType:'机型'
 	}
 }

+ 2 - 2
configs/env.js

@@ -9,8 +9,8 @@ let configs = {
 if (process.env.NODE_ENV === 'development') {
 	// 测试环境
 	configs = Object.assign(configs, {
-		baseUrl: 'https://app.sunzee.com.cn/ShenzeeServer',
-		// baseUrl: 'http://127.0.0.1:8090',
+		// baseUrl: 'https://app.sunzee.com.cn/ShenzeeServer',
+		baseUrl: 'http://127.0.0.1:8090',
 	});
 }
 

+ 2 - 2
main.js

@@ -56,8 +56,8 @@ const i18n = new VueI18n({
 });
 
 App.mpType = 'app'
-// Vue.prototype.serverurl="http://127.0.0.1:8090";67.5
-Vue.prototype.serverurl="https://app.sunzee.com.cn/ShenzeeServer";
+Vue.prototype.serverurl="http://127.0.0.1:8090";
+// Vue.prototype.serverurl="https://app.sunzee.com.cn/ShenzeeServer";
 Vue.prototype.$store = store;
 Vue.prototype._i18n = i18n;
 const app = new Vue({

+ 20 - 8
packageA/pages/remote/flowerShow.vue

@@ -245,6 +245,7 @@
 			},
 			//按糖颜色去筛选花型的显示
 			changeShowList(nameNum) {
+				debugger
 				var arr = nameNum.split("-");
 				var name = arr[0];
 				var num = arr[1];
@@ -253,27 +254,38 @@
 				var products = [];
 				//修改所有蓝色的花型
 				if (name == 'blue') {
-					products = ['精灵蝶梦', '夏日倾城', '百花齐放', '星空幻想', '坠入星空', '花飞蝶舞', '花样年华', '五彩缤纷', '幽兰爱恋', '冰美人', '海洋之心',
-						'彩色精灵'
+					// products = ['精灵蝶梦', '夏日倾城', '百花齐放', '星空幻想', '坠入星空', '花飞蝶舞', '花样年华', '五彩缤纷', '幽兰爱恋', '冰美人', '海洋之心',
+					// 	'彩色精灵'
+					// ];
+					products = ['A19', 'A20', 'A21', 'A24', 'A25', 'A28', 'A29', 'A03', 'A09', 'A12', 'A15',
+						'A17'
 					];
 				}
+				
 				if (name == 'yellow') {
-					products = ['精灵蝶梦', '夏日倾城', '百花齐放', '蜂缠蝶恋', '星空幻想', '坠入星空', '花飞蝶舞',
-						'花样年华', '心花怒放', '五彩缤纷', '美梦成真', '夏日爱恋', '国色天香', '彩色精灵',
+					// products = ['精灵蝶梦', '夏日倾城', '百花齐放', '蜂缠蝶恋', '星空幻想', '坠入星空', '花飞蝶舞',
+					// 	'花样年华', '心花怒放', '五彩缤纷', '美梦成真', '夏日爱恋', '国色天香', '彩色精灵',
+					// ];
+					products = ['A19', 'A20', 'A21', 'A22', 'A24', 'A25', 'A28',
+						'A29', 'A30', 'A03', 'A07', 'A11', 'A13', 'A17',
 					];
 				}
 				if (name == 'red') {
-					products = ['精灵蝶梦', '夏日倾城', '百花齐放','星空幻想', '蜂缠蝶恋', '豆蔻年华', '花飞蝶舞', '花样年华', '心花怒放',
-						'玫瑰精灵', '童心未泯', '五彩缤纷', '烈焰红唇', '美梦成真', '一见钟情', '赤子之心', '彩色精灵'
+					// products = ['精灵蝶梦', '夏日倾城', '百花齐放','星空幻想', '蜂缠蝶恋', '豆蔻年华', '花飞蝶舞', '花样年华', '心花怒放',
+					// 	'玫瑰精灵', '童心未泯', '五彩缤纷', '烈焰红唇', '美梦成真', '一见钟情', '赤子之心', '彩色精灵'
+					// ];
+					products = ['A19', 'A20', 'A21','A24', 'A22', 'A23', 'A28', 'A29', 'A30',
+						'A01', 'A02', 'A03', 'A06', 'A07', 'A08', 'A14', 'A17'
 					];
 				}
 				if (name == 'white') {
-					products = ['蜂缠蝶恋', '雪花飞舞', '春暖花开', '天雪恋舞', '心花怒放','水中芙蓉', '幽兰爱恋', '心之守护', '水晶之恋', '小棉袄'];
+					// products = ['蜂缠蝶恋', '雪花飞舞', '春暖花开', '天雪恋舞', '心花怒放','水中芙蓉', '幽兰爱恋', '心之守护', '水晶之恋', '小棉袄'];
+					products = ['A22', 'A26', 'A27', 'A04', 'A30','A05', 'A09', 'A10', 'A16', 'A18'];
 				}
 				for (var j = 0; j < products.length; j++) {
 					for (var i = 0; i < productList.length; i++) {
 						var product = productList[i];
-						if (products[j] == product.productName) {
+						if (products[j] == product.no) {
 							product.showType = num;
 							// list.push(product);
 						}

+ 49 - 3
packageA/pages/user/orderEit.vue

@@ -19,7 +19,7 @@
 			</view>
 			<view class="select-input">
 				<input class="input" style="display:none;" />
-				<text>商品价格:</text><input class="input" name="price" disabled :value="price" />	
+				<text>已支付金额:</text><input class="input" name="price" disabled :value="price" />	
 			</view>
 			<view class="select-input">
 				<input class="input" style="display:none;" />
@@ -27,12 +27,29 @@
 			</view>
 			<view class="select-input">
 				<input class="input" style="display:none;" />
+				<text>明细:</text><input class="input" name="note" disabled :value="note"/>	
+			</view>
+			<view class="select-input">
+				<input class="input" style="display:none;" />
 				<text>退款时间:</text><input class="input" name="refundDate" disabled :value="refundDate"/>	
 			</view>
 			<view class="select-input">
 				<input class="input" style="display:none;" />
+				<text>已退款金额:</text><input class="input" name="refundPrice" disabled :value="refundPrice" />	
+			</view>
+			<view class="select-input">
+				<input class="input" style="display:none;" />
 				<text>订单状态:</text><input class="input" name="status" disabled :value="status==1?('已支付'):(status==2?'退款中':'已退款')" />	
 			</view>
+			<view class="select-input">
+				<input class="input" style="display:none;" />
+				<text>退款金额:</text><input class="input2" @focus="setStyle()" @blur="setStyle2()" v-model="refundAmount"  />
+			</view>
+			<p id="p2" class="p2" :style="{display:showOrNo}">请慎重对待!</p>
+			<view class="select-input">
+				<input class="input" style="display:none;" />
+				<text>PS:退款金额可修改</text>
+			</view>
 			<view class="btn-area">
 				<button type="primary" formType="submit" >退款</button>
 			</view>
@@ -53,6 +70,10 @@
 				refundDate:null,
 				status:null,
 				altMainBalance:0,
+				refundAmount:0,
+				refundPrice:0,
+				showOrNo: null,
+				note:null,
 				production:0
 			}
 		},
@@ -75,6 +96,9 @@
 			this.payDate = order.payDate;
 			this.refundDate = order.refundDate;
 			this.status = order.status;
+			this.note = order.note;
+			this.refundPrice = order.refundAmount;
+			this.refundAmount = order.price;
 		},
 		onShow() {
 			this.mch();
@@ -86,8 +110,8 @@
 				var production = this.production;
 				var altMainBalance = this.altMainBalance;
 				var refusePrice = price*production/100;
-				// console.log("refusePrice="+refusePrice)
-				if(altMainBalance<refusePrice){
+				console.log("refusePrice="+refusePrice)
+				if(altMainBalance<refusePrice.toFixed(2)){
 					uni.showToast({
 					    title: '余额不足',
 					    duration: 2000
@@ -100,12 +124,14 @@
 					success: (res) => {
 						if (res.confirm) {
 							var order = this.order;
+							var refundAmount = this.refundAmount;
 							var token = uni.getStorageSync("token");
 							uni.request({
 								url: this.serverurl + '/TOrder/refund',
 								data: {
 									"sn": order.sn,
 									"id": order.id,
+									"refundAmount":refundAmount
 								},
 								header: {
 									'token': token
@@ -148,6 +174,12 @@
 						this.altMainBalance = date.altMainBalance;
 					},
 				});
+			},
+			setStyle() {
+				this.showOrNo = "block";
+			},
+			setStyle2() {
+				this.showOrNo = "none";
 			}
 		}
 	}
@@ -199,4 +231,18 @@
 			}
 		}
 	}
+	.input2{
+		box-shadow: 0upx 0upx 20upx #D3D3D3;
+		border-radius: 5upx;
+	}
+	.p2 {
+		color: #DD524D;
+		display: none;
+		width: 300upx;
+		height: 50upx;
+		border: 1px;
+		margin-left: auto;
+		margin-right: auto;
+		padding-left: 30upx;
+	}
 </style>

+ 283 - 0
packageB/pages/user/bangdingMachine.vue

@@ -0,0 +1,283 @@
+<template>
+	<view class="content">
+		<form @submit="selectSubmit" class="form">
+			<view class="select-input">
+				<input class="input" style="display:none;" />
+				<text>{{$t('bangdingMachine.clientId')}}:{{clientId}}</text>
+			</view>
+			<view class="select-input">
+				<input class="input" style="display:none;" />
+				<text>{{$t('bangdingMachine.equimentType')}}:{{equimentType}}</text>
+				<!-- <button type="primary" @click="saoma()" class="button1">
+					<p class="p">扫码</p>
+				</button> -->
+			</view>
+			<!-- <view class="select-input">
+				<input class="input" style="display:none;" />
+				<text>状态:{{status}}</text>
+			</view> -->
+			<view class="btn-area">
+				<!-- <button type="primary" @click="saoma()">扫码</button> -->
+				<button type="default" @click="scanCode">扫码</button>
+				<!-- <button type="primary" @click="tran()" >提交</button> -->
+			</view>
+			<view class="btn-area">
+				<button type="primary" formType="submit">申请绑定</button>
+				<!-- <button type="primary" @click="tran()" >提交</button> -->
+			</view>
+		</form>
+	</view>
+</template>
+
+<script>
+	let Qrcode = require('../../utils/reqrcode.js')
+	import MxDatePicker from '../../components/mx-datepicker/mx-datepicker.vue';
+	import {
+		dateUtils
+	} from '@/common/util.js';
+	// import uniCollapse from '@/components/uni-collapse/uni-collapse.vue';
+	// import uniCollapseItem from '@/components/uni-collapse-item/uni-collapse-item.vue';
+	// import uniList from '../../uni_modules/uni-list/components/uni-list/uni-list.vue';
+	// import uniListItem from '../../uni_modules/uni-list/components/uni-list-item/uni-list-item.vue';
+	// import uniIcons from '../../uni_modules/uni-icons/components/uni-icons/uni-icons.vue';
+	export default {
+		components: {
+			MxDatePicker
+			// uniCollapse,
+			// uniCollapseItem,
+			// uniList,
+			// uniListItem,
+			// uniIcons
+		},
+		data() {
+			return {
+				//时间选择器
+				clientId:'',
+				status:'',
+				equimentType:'',
+				gtclientId:'123456'
+
+			};
+		},
+		onShow() {
+			var date = new Date();
+		},
+		computed: {
+
+		},
+		methods: {
+			
+			selectSubmit(e) {
+				if (this.clientId != "" && this.equimentType  != "" ) {
+					var token = uni.getStorageSync("token");
+					var globalUser = uni.getStorageSync("globalUser");
+					uni.request({
+						url: this.serverurl + '/TEquipment/initNew?clientId='+this.clientId+'&adminIda='+globalUser.id+
+						'&gtClientId='+this.gtclientId+'&equimentType='+this.equimentType,
+						// data: {
+						// 	"clientId": this.clientId,
+						// 	"adminIda": globalUser.id,
+						// 	"gtclientId": this.gtclientId,
+						// 	"equimentType": this.equimentType,
+						// },
+						header: {
+							'token': token
+						},
+						method: "GET",
+						success: (res) => {
+							console.log(res.data)
+							uni.showModal({
+								title: '提示',
+								content: res.data,
+								success: function(res) {
+									if (res.confirm) {} else if (res.cancel) {}
+								}
+							});
+						},
+					});
+				} else {
+					uni.showModal({
+						title: '提示',
+						content: '信息不能为空',
+						success: function(res) {
+							if (res.confirm) {} else if (res.cancel) {}
+						}
+					});
+					return;
+				}
+
+
+			},
+			saomaWeixin() {
+				var that = this;
+				// 允许从相机和相册扫码
+				uni.scanCode({
+					success(res) {
+						var message = res.result;
+						var mes = [];
+						mes = message.split("+");
+						if(mes.length>0){
+							for(var i = 0;i<mes.length;i++){
+								if(i==0){
+									that.clientId = mes[i];
+								}
+								if(i==1){
+									that.equimentType = mes[i];
+								}
+								if(i==2){
+									that.gtclientId = mes[i];
+								}
+							}
+						}
+						console.log('条码内容:' + res.result);
+					}
+				});
+			},
+			
+			scanCodeH5() {
+			    let that = this
+				// 调用uni提供的调用相机api
+				uni.chooseImage({
+					sizeType: ['original'],
+					count: 1,
+					success: res => {
+						const tempFilePaths = res.tempFilePaths[0] // 获取到二维码图片的链接
+						Qrcode.qrcode.decode(tempFilePaths); // 解析二维码图片
+						Qrcode.qrcode.callback = res1 => {
+							if (res1 == "error decoding QR Code") {
+								uni.showToast({
+									title: "识别二维码失败,请重新上传!",
+									duration: 2000,
+									icon: 'none'
+								})
+							} else {
+							    // 解析成功返回二维码链接
+								// console.log(res1) // 这打印的是扫码扫出来的东西
+								var mes = [];
+								mes = res1.split("+");
+								if(mes.length>0){
+									for(var i = 0;i<mes.length;i++){
+										if(i==0){
+											that.clientId = mes[i];
+										}
+										if(i==1){
+											that.equimentType = mes[i];
+										}
+										if(i==2){
+											that.gtclientId = mes[i];
+										}
+									}
+								}
+							}
+					    }
+					}
+				});
+			},
+			// 扫码
+			scanCode() {
+				// #ifdef MP
+				this.saomaWeixin()
+				// #endif
+				
+				// #ifdef H5
+				this.scanCodeH5()
+				// #endif
+			},
+			// H5通过拉起相机拍照来识别二维码
+			scanCodeH51() {
+				uni.chooseImage({
+					count: 1,
+					success: imgRes => {
+						Qrcode.qrcode.decode(this.getObjectURL(imgRes.tempFiles[0]))
+						Qrcode.qrcode.callback = (codeRes) => {
+							if (codeRes.indexOf('error') >= 0) {
+								// 二维码识别失败
+								this.qrCodeRes = '不合法二维码:' + codeRes
+							} else {
+								// 二维码识别成功
+								let r = this.decodeStr(codeRes)
+								this.qrCodeRes = r;
+								var mes = [];
+								mes = r.split("+");
+								if(mes.length>0){
+									for(var i = 0;i<mes.length;i++){
+										if(i==0){
+											that.clientId = mes[i];
+										}
+										if(i==1){
+											that.equimentType = mes[i];
+										}
+										if(i==2){
+											that.gtclientId = mes[i];
+										}
+									}
+								}
+							}
+						}
+					}
+				})
+			},
+			// 获取文件地址函数
+			getObjectURL(file) {
+				var url = null
+				if (window.createObjectURL !== undefined) { // basic
+					url = window.createObjectURL(file)
+				} else if (window.URL !== undefined) { // mozilla(firefox)
+					url = window.URL.createObjectURL(file)
+				} else if (window.webkitURL !== undefined) { // webkit or chrome
+					url = window.webkitURL.createObjectURL(file)
+				}
+				return url
+			},
+			// 解码,输出:中文
+			decodeStr(str) {
+				var out, i, len, c;
+				var char2, char3;
+				out = "";
+				len = str.length;
+				i = 0;
+				while (i < len) {
+					c = str.charCodeAt(i++);
+					switch (c >> 4) {
+						case 0:
+						case 1:
+						case 2:
+						case 3:
+						case 4:
+						case 5:
+						case 6:
+						case 7:
+							// 0xxxxxxx
+							out += str.charAt(i - 1);
+							break;
+						case 12:
+						case 13:
+							// 110x xxxx 10xx xxxx
+							char2 = str.charCodeAt(i++);
+							out += String.fromCharCode(((c & 0x1F) << 6) | (char2 & 0x3F));
+							break;
+						case 14:
+							// 1110 xxxx 10xx xxxx 10xx xxxx
+							char2 = str.charCodeAt(i++);
+							char3 = str.charCodeAt(i++);
+							out += String.fromCharCode(((c & 0x0F) << 12) |
+								((char2 & 0x3F) << 6) |
+								((char3 & 0x3F) << 0));
+							break;
+					}
+				}
+				return out;
+			},
+
+		}
+
+	}
+</script>
+
+<style lang="scss">
+	@import "../../static/common/selectOrder.scss";
+	// @import "selectOrder.scss";
+		.container{
+			padding: 10px;
+		}
+</style>

+ 144 - 0
packageB/static/common/selectOrder.scss

@@ -0,0 +1,144 @@
+.body {
+		background-color: #FFFFFF;
+		font-size: 16px;
+		display: flex;
+		flex-direction: row;
+		justify-content: flex-start;
+	}
+	.select-input{
+		display: flex;
+		flex-direction: row;
+		justify-content: flex-start;
+		font-size: 16px;
+		margin: 20upx 0 50upx 30upx;
+		input {
+			padding-left: 20upx;
+			padding-top: 10upx;
+			background-color: #FFFFFF;
+			width: 400upx;
+			height: 50upx;
+			box-shadow: 0upx 0upx 20upx #D3D3D3;
+			border-radius: 5upx;
+		}
+	}
+	.select-input2{
+		display: flex;
+		flex-direction: row;
+		justify-content: flex-start;
+		font-size: 26upx;
+		margin: 20upx 0 50upx 30upx;
+		input {
+			padding-left: 20upx;
+			padding-top: 10upx;
+			background-color: #FFFFFF;
+			width: 400upx;
+			height: 50upx;
+			box-shadow: 0upx 0upx 20upx #D3D3D3;
+			border-radius: 5upx;
+		}
+	}
+	.item {
+		box-sizing: border-box;
+		width: 100%;
+		height: 40px;
+		line-height: 40px;
+		background-color: #ffffff;
+		position: relative;
+		padding: 0 10upx 0 200upx;
+		text-align: right;
+	}
+	
+	.item .lable {
+		position: absolute;
+		left: 30upx;
+		top: 0px;
+		font-size: 16px;
+	}
+	
+	uni-picker-view-column {
+		font-size: 24rpx;
+	}
+	
+	.filter_input {
+		height: 92rpx;
+		padding-top: 10rpx;
+	}
+	
+	.date_item {
+		float: left;
+		width: 240upx;
+		overflow: hidden;
+		display: inline-block;
+		text-align: center;
+		border: 1px solid #ececec;
+		height: 72rpx;
+		line-height: 72rpx;
+	
+		// font-size: 28rpx;
+		&:last-child {
+			// float: right;
+		}
+	
+		input {
+			height: 72rpx;
+	
+			.uni-input-placeholder {
+				color: #b5b8c2;
+			}
+		}
+	}
+	
+	.filter_inputline {
+		float: left;
+		margin: 0 4rpx;
+		line-height: 72rpx;
+	
+		&:after {
+			content: '—';
+			font-size: 28rpx;
+			color: #848b9a;
+		}
+	}
+	form{
+		width: calc(100% - 100upx);
+		padding: 50upx;
+		.section{
+			margin:50upx 0;
+		}
+		
+		.btn-area{
+			padding: 50upx;
+			padding-top:0upx;
+			button{
+				background-color:#007AFF;
+			}
+		}
+	}
+.select-text{
+	color: #F0AD4E;
+}
+	.button1 {
+		margin: auto;
+		width: 75upx;
+		height: 50upx;
+	}
+
+	.p {
+		/* #ifdef H5 */
+		top: -13%;
+		/* #endif */
+		width: 50upx;
+		height: 30upx;
+		font-size: 25upx;
+		padding-right: 9upx;
+		padding-top: 6upx;
+		/* #ifndef H5 */
+		/* padding-top: 10upx; */
+		/* #endif */
+
+		position: absolute;
+		/* 水平居中 */
+		left: 50%;
+		-webkit-transform: translateX(-50%);
+		transform: translateX(-50%);
+	}

Diferenças do arquivo suprimidas por serem muito extensas
+ 2608 - 0
packageB/utils/reqrcode.js


+ 6 - 0
pages.json

@@ -358,6 +358,12 @@
 					"style": {
 						"navigationBarTitleText": "统计图表"
 					}
+				},
+				{
+					"path": "pages/user/bangdingMachine",
+					"style": {
+						"navigationBarTitleText": "绑定机器"
+					}
 				}
 			]
 		}

+ 137 - 49
pages/User/equipmentStatusList.vue

@@ -14,49 +14,67 @@
 						<view v-if="merchant.equipmentList.length==0" style="text-align: center;">暂无数据</view>
 						<view v-if="merchant.equipmentList.length>0">
 							<uni-collapse :show-animation="true">
-								<view style="position: relative;" v-for="equipment in merchant.equipmentList" :key="equipment.id">
-									<span class="status-css" :class="equipment.hasTodayAlarm===true?statusError : statusNormal"></span>
+								<view style="position: relative;" v-for="equipment in merchant.equipmentList"
+									:key="equipment.id">
+									<span class="status-css"
+										:class="equipment.hasTodayAlarm===true?statusError : statusNormal"></span>
 									<uni-collapse-item :title="getEquipmentTitle(equipment)">
 										<view style="padding: 20upx;background-color: antiquewhite;">
 											<view class="swithBox" v-if="equipment.isSleep">
 												<view class="swichFont">睡眠状态:机器已睡眠</view>
 												<view class="switch">
-													<switch style="transform:scale(0.65)" checked @change="change(equipment.id,0)" />
+													<switch style="transform:scale(0.65)" checked
+														@change="change(equipment.id,0)" />
 												</view>
 											</view>
 											<view class="swithBox" v-else>
 												<view class="swichFont">睡眠状态:未睡眠</view>
 												<view class="switch">
-													<switch style="transform:scale(0.65)" :checked="sleepChecked" @change="change(equipment.id,1)" />
+													<switch style="transform:scale(0.65)" :checked="sleepChecked"
+														@change="change(equipment.id,1)" />
 												</view>
 											</view>
 											<view class="line1"></view>
 											<view class="swithBox" v-if="equipment.eqeStatus==0">
 												<view class="swichFont">关机:已关机</view>
 												<view class="switch">
-													<switch style="transform:scale(0.65)" checked @change="OnOff(equipment.id,1)" />
+													<switch style="transform:scale(0.65)" checked
+														@change="OnOff(equipment.id,1)" />
 												</view>
 											</view>
 											<view class="swithBox" v-else>
 												<view class="swichFont">关机:未关机</view>
 												<view class="switch">
-													<switch style="transform:scale(0.65)" :checked="onffChecked" @change="OnOff(equipment.id,0)" />
+													<switch style="transform:scale(0.65)" :checked="onffChecked"
+														@change="OnOff(equipment.id,0)" />
 												</view>
 											</view>
 											<view class="line1"></view>
 											<view><span>机器唯一码:</span><span>{{equipment.clientId}}</span></view>
-											<view><span>所在地:</span><span>{{equipment.fullName?equipment.fullName:''}}</span></view>
-											<view><span>炉头温度:</span><span>{{equipment.furnaceTm?equipment.furnaceTm:''}}</span></view>
-											<view><span>柜内湿度:</span><span>{{equipment.cabinetHd?equipment.cabinetHd:''}}</span></view>
-											<view><span>柜内温度:</span><span>{{equipment.cabinetTm?equipment.cabinetTm:''}}</span></view>
+											<view>
+												<span>所在地:</span><span>{{equipment.fullName?equipment.fullName:''}}</span>
+											</view>
+											<view>
+												<span>炉头温度:</span><span>{{equipment.furnaceTm?equipment.furnaceTm:''}}</span>
+											</view>
+											<view>
+												<span>柜内湿度:</span><span>{{equipment.cabinetHd?equipment.cabinetHd:''}}</span>
+											</view>
+											<view>
+												<span>柜内温度:</span><span>{{equipment.cabinetTm?equipment.cabinetTm:''}}</span>
+											</view>
 											<view v-if="equipment.hasTodayAlarm">
 												<view><span>报警内容:</span></view>
 												<view v-for="(alarm,index) in equipment.alarmList" :key="index">
-													<view><span class="baojing">{{alarm.occurrenceTime?alarm.occurrenceTime:''}} {{alarm.alarmContent}}
-															<button v-if="alarm.isEliminate==1" style="color:#BEBEBE;" @click="eliminate(alarm.id)" class="eliminateButton">
+													<view><span
+															class="baojing">{{alarm.occurrenceTime?alarm.occurrenceTime:''}}
+															{{alarm.alarmContent}}
+															<button v-if="alarm.isEliminate==1" style="color:#BEBEBE;"
+																@click="eliminate(alarm.id)" class="eliminateButton">
 																<p class="p">已消除</p>
 															</button>
-															<button v-if="alarm.isEliminate!=1" type="primary" @click="eliminate(alarm.id)" class="eliminateButton">
+															<button v-if="alarm.isEliminate!=1" type="primary"
+																@click="eliminate(alarm.id)" class="eliminateButton">
 																<p class="p">消除</p>
 															</button>
 														</span></view>
@@ -84,7 +102,8 @@
 				<image class="img" src="../../static/img/green.png"></image>
 				<font class="wenziT">{{$t('equipmentStatusList.green')}}</font>
 			</view>
-			<view class="titlelist" style="position: relative;" v-for="equipment in merchantList[0].equipmentList" :key="equipment.id">
+			<view class="titlelist" style="position: relative;" v-for="equipment in merchantList[0].equipmentList"
+				:key="equipment.id">
 				<span class="status-css" :class="equipment.hasTodayAlarm===true?statusError : statusNormal"></span>
 				<uni-collapse-item :title="getEquipmentTitle(equipment)">
 					<!-- 睡眠 -->
@@ -98,7 +117,8 @@
 						<view class="swithBox" v-else>
 							<view class="swichFont">{{$t('equipmentStatusList.unsleep')}}</view>
 							<view class="switch">
-								<switch style="transform:scale(0.65)" :checked="sleepChecked" @change="change(equipment.id,1)" />
+								<switch style="transform:scale(0.65)" :checked="sleepChecked"
+									@change="change(equipment.id,1)" />
 							</view>
 						</view>
 						<view class="line1"></view>
@@ -162,39 +182,72 @@
 						<!-- 查看定位 -->
 						<view class="opendoor"><span>{{$t('equipmentStatusList.gps')}}:</span>
 							<view class="">
-								<button type="primary" @click="lookMap(equipment.id,equipment.longitude,equipment.latitude)" class="button">
+								<button type="primary"
+									@click="lookMap(equipment.id,equipment.longitude,equipment.latitude)"
+									class="button">
 									<p class="p">{{$t('equipmentStatusList.look')}}</p>
 								</button>
 							</view>
 						</view>
-						<view><span>{{$t('equipmentStatusList.equipmentNo')}}:</span><span>{{equipment.clientId}}</span></view>
-						<view><span>{{$t('equipmentStatusList.area')}}:</span><span>{{equipment.fullName?equipment.fullName:''}}</span></view>
-						<view><span>{{$t('equipmentStatusList.temperature')}}:</span><span>{{equipment.furnaceTm?equipment.furnaceTm:''}}</span></view>
-						<view><span>{{$t('equipmentStatusList.humidity')}}:</span><span>{{equipment.cabinetHd?equipment.cabinetHd:''}}</span></view>
-						<view><span>{{$t('equipmentStatusList.equipmentTemperature')}}:</span><span>{{equipment.cabinetTm?equipment.cabinetTm:''}}</span></view>
+						<view><span>{{$t('equipmentStatusList.equipmentNo')}}:</span><span>{{equipment.clientId}}</span>
+						</view>
+						<view>
+							<span>{{$t('equipmentStatusList.area')}}:</span><span>{{equipment.fullName?equipment.fullName:''}}</span>
+						</view>
+						<view>
+							<span>{{$t('equipmentStatusList.temperature')}}:</span><span>{{equipment.furnaceTm?equipment.furnaceTm:''}}</span>
+						</view>
+						<view>
+							<span>{{$t('equipmentStatusList.humidity')}}:</span><span>{{equipment.cabinetHd?equipment.cabinetHd:''}}</span>
+						</view>
+						<view>
+							<span>{{$t('equipmentStatusList.equipmentTemperature')}}:</span><span>{{equipment.cabinetTm?equipment.cabinetTm:''}}</span>
+						</view>
+						<view><span>plcVersion:</span><span>{{equipment.plcVersion}}</span></view>
 						<!-- 物料 -->
 						<view v-show="equipment.isMaterialUse==1">
-							<span>{{$t('equipmentStatusList.whiteSugar')}}:</span><span>{{equipment.whiteSugar?equipment.whiteSugar:''}}% -- </span>
-							<span>{{$t('equipmentStatusList.redSugar')}}:</span><span>{{equipment.redSugar?equipment.redSugar:''}}% -- </span>
-							<span>{{$t('equipmentStatusList.yellowSugar')}}:</span><span>{{equipment.yellowSugar?equipment.yellowSugar:''}}% -- </span>
-							<span>{{$t('equipmentStatusList.blueSugar')}}:</span><span>{{equipment.blueSugar?equipment.blueSugar:''}}% </span>
+							<span>{{$t('equipmentStatusList.whiteSugar')}}:</span><span>{{equipment.whiteSugar?equipment.whiteSugar:''}}%
+								-- </span>
+							<span>{{$t('equipmentStatusList.redSugar')}}:</span><span>{{equipment.redSugar?equipment.redSugar:''}}%
+								-- </span>
+							<span>{{$t('equipmentStatusList.yellowSugar')}}:</span><span>{{equipment.yellowSugar?equipment.yellowSugar:''}}%
+								-- </span>
+							<span>{{$t('equipmentStatusList.blueSugar')}}:</span><span>{{equipment.blueSugar?equipment.blueSugar:''}}%
+							</span>
 						</view>
-						<view v-show="equipment.isMaterialUse==1"><span>{{$t('equipmentStatusList.stick')}}:</span><span>{{equipment.stick?equipment.stick:''}}% </span></view>
 						<view v-show="equipment.isMaterialUse==1">
-							<span>{{$t('equipmentStatusList.water')}}:</span><span>{{equipment.water?equipment.water:''}}%  -- </span>
+							<span>{{$t('equipmentStatusList.stick')}}:</span><span>{{equipment.stick?equipment.stick:''}}%
+							</span></view>
+						<view v-show="equipment.isMaterialUse==1">
+							<span>{{$t('equipmentStatusList.water')}}:</span><span>{{equipment.water?equipment.water:''}}%
+								-- </span>
 							<span>{{$t('equipmentStatusList.wasteWater')}}:</span><span>{{equipment.wasteWater?equipment.wasteWater:''}}%</span>
 						</view>
-						<view><span>{{$t('equipmentStatusList.refreshTime')}}:</span><span>{{equipment.lastUpdateTime}}</span></view>
-						<view><span>{{$t('equipmentStatusList.volume')}}:</span><span>{{equipment.volume?equipment.volume:''}}</span></view>
+						<view class="opendoor" v-show="equipment.isMaterialUse==1"><span>{{$t('equipmentStatusList.buliao')}}:</span>
+							<view class="">
+								<button type="primary" @click="buliao(equipment.id)" class="button">
+									<p class="p">{{$t('equipmentStatusList.buliaoT')}}</p>
+								</button>
+							</view>
+						</view>
+						<view>
+							<span>{{$t('equipmentStatusList.refreshTime')}}:</span><span>{{equipment.lastUpdateTime}}</span>
+						</view>
+						<view>
+							<span>{{$t('equipmentStatusList.volume')}}:</span><span>{{equipment.volume?equipment.volume:''}}</span>
+						</view>
 						<view class="" v-if="equipment.hasTodayAlarm">
 							<view><span>{{$t('equipmentStatusList.alarm')}}:</span></view>
 							<view v-for="(alarm,index) in equipment.alarmList" :key="index">
 								<view>
-									<span class="baojing">{{alarm.occurrenceTime?alarm.occurrenceTime:''}} {{alarm.alarmContent}}
-										<button v-if="alarm.isEliminate==1" style="color:#BEBEBE;" @click="eliminate(alarm.id)" class="eliminateButton">
+									<span class="baojing">{{alarm.occurrenceTime?alarm.occurrenceTime:''}}
+										{{alarm.alarmContent}}
+										<button v-if="alarm.isEliminate==1" style="color:#BEBEBE;"
+											@click="eliminate(alarm.id)" class="eliminateButton">
 											<p class="p">{{$t('equipmentStatusList.yixiaochu')}}</p>
 										</button>
-										<button v-if="alarm.isEliminate!=1" type="primary" @click="eliminate(alarm.id)" class="eliminateButton">
+										<button v-if="alarm.isEliminate!=1" type="primary" @click="eliminate(alarm.id)"
+											class="eliminateButton">
 											<p class="p">{{$t('equipmentStatusList.xiaochu')}}</p>
 										</button>
 									</span>
@@ -310,21 +363,23 @@
 					}, _ => void uni.stopPullDownRefresh());
 			},
 			//查看经纬度
-			lookMap(id,longitude,latitude){
-				var item={};
+			lookMap(id, longitude, latitude) {
+				var item = {};
 				item["id"] = id;
 				item["longitude"] = longitude;
 				item["latitude"] = latitude;
 				var globalUser = uni.getStorageSync("globalUser");
 				var ifForeign = globalUser.ifForeign;
-				if(ifForeign==0){
+				if (ifForeign == 0) {
 					uni.navigateTo({
-						url:'../../packageA/pages/equipmentStatus/map?item='+ encodeURIComponent(JSON.stringify(item))
+						url: '../../packageA/pages/equipmentStatus/map?item=' + encodeURIComponent(JSON.stringify(
+							item))
 					});
 				}
-				if(ifForeign==1){
+				if (ifForeign == 1) {
 					uni.navigateTo({
-						url:'../../packageA/pages/equipmentStatus/GoogleMap?item='+ encodeURIComponent(JSON.stringify(item))
+						url: '../../packageA/pages/equipmentStatus/GoogleMap?item=' + encodeURIComponent(JSON
+							.stringify(item))
 					});
 				}
 				// uni.navigateTo({
@@ -335,7 +390,7 @@
 				// });
 			},
 			//一键重启
-			reboot(id){
+			reboot(id) {
 				var that = this;
 				uni.showModal({
 					title: that.$t('equipmentStatusList.tip'),
@@ -362,21 +417,20 @@
 										uni.showModal({
 											title: that.$t('equipmentStatusList.kaiji'),
 											content: '发送成功',
-											success: function(res) {
-											}
+											success: function(res) {}
 										})
 									} else {
 										uni.showModal({
 											title: that.$t('equipmentStatusList.error'),
-											content: that.$t('equipmentStatusList.kaijierror'),
-											success: function(res) {
-											}
+											content: that.$t(
+												'equipmentStatusList.kaijierror'),
+											success: function(res) {}
 										})
 									}
 								}
 							});
 						}
-						
+
 					}
 				})
 			},
@@ -428,8 +482,10 @@
 										that.getEquipmentListData();
 										if (list == 'SUCCESS') {
 											uni.showModal({
-												title: that.$t('equipmentStatusList.guanji'),
-												content: that.$t('equipmentStatusList.tishi'),
+												title: that.$t(
+													'equipmentStatusList.guanji'),
+												content: that.$t(
+													'equipmentStatusList.tishi'),
 												success: function(res) {
 													that.getEquipmentListData();
 													setTimeout(function() {
@@ -439,8 +495,10 @@
 											})
 										} else {
 											uni.showModal({
-												title: that.$t('equipmentStatusList.error'),
-												content: that.$t('equipmentStatusList.guanjierror'),
+												title: that.$t(
+													'equipmentStatusList.error'),
+												content: that.$t(
+													'equipmentStatusList.guanjierror'),
 												success: function(res) {
 													that.onffChecked = true;
 													that.getEquipmentListData();
@@ -573,6 +631,36 @@
 					}
 				});
 			},
+			buliao(id) {
+				var that = this;
+				var token = uni.getStorageSync("token");
+				uni.showModal({
+					title: this.$t('equipmentStatusList.tip'),
+					content: this.$t('equipmentStatusList.wuliaoTip'),
+					success: function(res) {
+						uni.request({
+							url: that.serverurl + '/TEquipment/buliao',
+							data: {
+								"equipmentId": id
+							},
+							method: "POST",
+							header: {
+								'token': token
+							},
+							success: (res) => {
+								uni.showModal({
+									title: '提示Tip',
+									content: res.data.message,
+									success: function(res) {
+										that.getEquipmentListData();
+									}
+								})
+							}
+						})
+					}
+				})
+
+			},
 			change(id, code) {
 				var that = this;
 				var code1 = code;

+ 9 - 1
pages/User/user.vue

@@ -51,6 +51,9 @@
 				<view v-if="shenheShow">
 					<uni-list-item title="审核" @click="examine()" />
 				</view>
+				<view >
+					<uni-list-item :title="$t('user.bangji')" @click="bangding()" />
+				</view>
 			</uni-list>
 		</view>
 		<view class="xiugai2">
@@ -116,7 +119,7 @@
 			var globalUser = uni.getStorageSync("globalUser");
 			var gid = globalUser.id;
 			var name = globalUser.name;
-			
+			this.id = gid;
 			if (gid != 1) {
 				this.gid = true;
 				this.show = true;
@@ -173,6 +176,11 @@
 					url:'../../packageA/pages/remote/remoteList',
 				});
 			},
+			bangding(){
+				uni.navigateTo({
+					url:'../../packageB/pages/user/bangdingMachine',
+				});
+			},
 			updataName() {
 				uni.navigateTo({
 					url: '../../packageA/pages/user/equipmentName',