Jelajahi Sumber

更新首页查询规则

李天标 3 tahun lalu
induk
melakukan
f3cbb0233a

+ 1 - 1
common/lang/zh.js

@@ -56,7 +56,7 @@ export default {
 	},
 	equipmentStatusList:{
 		reset:'重启',
-		reboot:'一键重启',
+		reboot:'一键重启炉头',
 		door:'远程开门',
 		open:'开门',
 		opensuccess:'开门成功',

+ 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',
 	});
 }
 

+ 345 - 0
flowerShow.vue

@@ -0,0 +1,345 @@
+<template>
+	<view>
+		<view class="search">
+			<view class="search-title">
+				输入机器编码
+			</view>
+			<view class="search-input">
+				<input type="text" placeholder='输入设备编码后6位' v-model="searchClientId" />
+			</view>
+			<view class="search-button">
+				<button type="primary" class="" @click="search()">
+					<p class="">搜索</P>
+				</button>
+			</view>
+		</view>
+		<view class="td-right">
+			<view class="uni-list">
+				<view class="uni-list-cell">
+					<view class="uni-list-cell-left">
+						点击选择机器
+					</view>
+					<view class="uni-list-cell-db" style="overflow: hidden;text-overflow: ellipsis;">
+						<picker @change="changeEquipment" :value="index" :range="equipmentNameList">
+							<view class="uni-input">{{equipmentNameList[index]}}</view>
+						</picker>
+					</view>
+				</view>
+				<!-- <view class="uni-list-cell">
+					<view class="uni-list-cell-left">
+						点击选择商品
+					</view>
+					<view class="uni-list-cell-db" style="overflow: hidden;text-overflow: ellipsis;">
+						<picker @change="changeProduct" :value="index2" :range="productList">
+							<view class="uni-input">{{productList[index2]}}</view>
+						</picker>
+					</view>
+				</view> -->
+			</view>
+		</view>
+		<!-- <view class="p">
+			<p style="text-align:right" @click=sugarList()>今日做糖列表>>></p>
+		</view> -->
+		<view class="tr">
+			<button type="primary" formType="submit" @click="dosugar()" class="button">
+				<p class="p1">提交</p>
+			</button>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState,
+		mapActions,
+		mapMutations
+	} from 'vuex'
+	export default {
+		data() {
+			return {
+				globalUser: {},
+				index: null,
+				index2: null,
+				equipmentName: null,
+				equipmentNameList: [],
+				products: [],
+				productList: [],
+				productName: null,
+				equipmentId: null,
+				searchClientId:null
+			}
+		},
+		onShow() {
+			this.globalUser = uni.getStorageSync("globalUser");
+			// uni.setNavigationBarTitle({
+			// 	title: this.$t('equipmentStatusList.title')
+			// });
+			// uni.setTabBarItem({
+			// 	index: 3,
+			// 	text: this.$t('tabs.tab4')
+			// });
+			var token = uni.getStorageSync("token");
+			if (token.length > 1) {
+				this.getEquipmentListData();
+			} else {
+				uni.reLaunch({
+					url: '../Login/Login',
+				});
+			}
+
+		},
+		methods: {
+			...mapActions('chart', ['getEquipmentListByUser']),
+			getEquipmentListData() {
+				this.getEquipmentListByUser(this.globalUser)
+					.then(data => {
+						this.merchantList = data;
+						var listName = data[0].equipmentList;
+						var equipmentNameList = [];
+						for (var i = 0; i < listName.length; i++) {
+							equipmentNameList.push("名称:" + listName[i].name + " 编号:" + listName[i].clientId.substring(
+								listName[i].clientId.length - 6, listName[i].clientId.length));
+						}
+						this.equipmentNameList = equipmentNameList;
+						var listId = data[0].id;
+						if (listId != null && listId != '1') {
+							uni.setStorageSync("listName", listName);
+						}
+						uni.stopPullDownRefresh();
+					}, _ => void uni.stopPullDownRefresh());
+			},
+			search(){
+				var clientId = this.searchClientId;
+				var list = uni.getStorageSync("listName");
+				var n = 0;
+				for (var i = 0; i < list.length; i++) {
+					var code = list[i].clientId.substring(list[i].clientId.length - 6, list[i].clientId.length);
+					if(code==clientId){
+						n++;
+						this.index = i;
+						var id = list[i].id;
+						this.getProName(id);
+						this.equipmentId = id;
+						this.productName = null;
+						this.index2 = null;
+						break;
+					}
+				}
+				if(n==0){
+					uni.showModal({
+						title: "提示",
+						content: "找不到该机器",
+						success: (res) => {
+					
+						}
+					})
+				}
+			},
+			sugarList() {
+				uni.navigateTo({
+					url: 'sugarList',
+				});
+			},
+			//改变机器
+			changeEquipment: function(e) {
+				this.index = e.target.value;
+				// console.log("index="+this.index)
+				var list = uni.getStorageSync("listName");
+				this.getProName(list[e.target.value].id);
+				this.equipmentId = list[e.target.value].id;
+				this.productName = null;
+				this.index2 = null;
+				this.searchClientId = null;
+			},
+			changeProduct: function(e) {
+				this.index2 = e.target.value;
+				// console.log("index="+this.index2)
+				var list = this.products;
+				this.productName = list[this.index2].productName;
+			},
+			//获取商品列表
+			getProName(equipmentId) {
+				// console.log("equipmentId="+equipmentId)
+				var token = uni.getStorageSync("token");
+				uni.request({
+					url: this.serverurl + '/TProduct/selectProducts',
+					data: {
+						"equimentId": equipmentId
+					},
+					header: {
+						'token': token
+					},
+					method: "GET",
+					success: (res) => {
+						var listName = res.data.data;
+						this.products = listName;
+						var productList = [];
+						for (var i = 0; i < listName.length; i++) {
+							productList.push(listName[i].productName);
+						}
+						this.productList = productList;
+					},
+				});
+			},
+			dosugar() {
+				uni.showModal({
+					title: "提示",
+					content: "是否远程做糖?",
+					success: (res) => {
+						if (res.confirm) {
+							var that = this;
+							var token = uni.getStorageSync("token");
+							var productName = this.productName;
+							if (productName == null) {
+								return;
+							}
+							var adminId = uni.getStorageSync("globalUser").id;
+							var equipmentId = this.equipmentId;
+							if (equipmentId == null) {
+								return;
+							}
+							uni.request({
+								url: this.serverurl + '/TSugarDo/doSugar',
+								data: {
+									"equipmentId": equipmentId,
+									"adminId": adminId,
+									"productName": productName
+								},
+								header: {
+									'token': token
+								},
+								method: "GET",
+								success: (res) => {
+									var code = res.data.code;
+									if (code == true) {
+										uni.showToast({
+											title: "发送成功",
+											duration: 2000
+										});
+										var sugar = res.data.data;
+										console.log(sugar.no);
+										var no = sugar.no;
+										setTimeout(function() {
+											that.selectSugar(no);
+										}, 7000);
+										// this.selectSugar(sugar.no)
+									} else {
+										uni.showToast({
+											title: res.data.message,
+											duration: 2000
+										});
+									}
+								},
+							});
+						} else if (res.cancel) {}
+
+					}
+				})
+			},
+			selectSugar(no) {
+				var token = uni.getStorageSync("token");
+				uni.request({
+					url: this.serverurl + '/TSugarDo/selectSugarStatus',
+					data: {
+						"no": no
+					},
+					header: {
+						'token': token
+					},
+					method: "GET",
+					success: (res) => {
+						var code = res.data.code;
+						if (code == true) {
+							uni.showModal({
+								title: "提示",
+								content: res.data.message,
+								success: (res) => {
+
+								}
+							})
+
+							// var sugar = res.data.data;
+						} else {
+							uni.showModal({
+								title: "提示",
+								content: res.data.message,
+								confirmText: "重新查询",
+								success: (res) => {
+									if (res.confirm) {
+										this.selectSugar(no);
+									} else if (res.cancel) {}
+								}
+							})
+						}
+					},
+				});
+			}
+		}
+	}
+</script>
+
+<style>
+	.search{
+		width: 100%;
+		padding-top: 10upx;
+		display: flex;
+		flex-direction: row;
+		justify-content: flex-start;
+	}
+	.search-title{
+		width: 28%;
+		text-align: center;
+		font-size: 26upx;
+		font-family: "PingFang-SC-Bold";
+	}
+	.search-input{
+		width: 45%;
+		text-align: center;
+		font-size: 26upx;
+		font-family: "PingFang-SC-Bold";
+		box-shadow: 0upx 0upx 20upx #D3D3D3;
+		border-radius: 5upx;
+	}
+	.search-button{
+		width: 20%;
+		padding-left: 7upx;
+		text-align: center;
+	}
+	.tr {
+		padding-top: 15upx;
+		display: flex;
+		flex-direction: row;
+		justify-content: flex-start;
+		font-size: 48upx;
+		font-family: "PingFang-SC-Bold";
+		position: fixed;
+		bottom: 100upx;
+		width: 100%;
+	}
+
+	.button {
+		margin: auto;
+		width: 60%;
+		height: 100upx;
+	}
+.p2 {
+		font-size: 30upx;
+		/* #ifndef H5 */
+		padding-top: 3upx;
+		/* #endif */
+		position: absolute;
+		/* 水平居中 */
+		left: 50%;
+		-webkit-transform: translateX(-50%);
+		transform: translateX(-50%);
+	}
+	.p1 {
+		font-size: 48upx;
+	}
+
+	.p {
+		align: right;
+		color: #007AFF;
+		padding-top: 30upx;
+	}
+</style>

+ 21 - 0
packageA/pages/remote/alarmClockItem.vue

@@ -52,6 +52,15 @@
 				<switch :checked="status" @change="switchChange" />
 			</view>
 		</view>
+		<view class="search">
+			<view class="search-title">
+				闹钟名称:
+			</view>
+			<view class="search-input2">
+				<input type="text"  v-model="name" />
+			</view>
+		</view>
+		<view class="line"></view>
 		<!-- //提交按钮 -->
 		<view class="tr">
 			<button v-if="clock=='add'" type="primary" formType="submit" @click="add()" class="button">
@@ -103,6 +112,7 @@
 				Thursday: true,
 				Friday: true,
 				Saturday: true,
+				name:'',
 				week: '1,2,3,4,5,6,7,',
 				searchClientId: null,
 				equipmentName: null,
@@ -217,6 +227,7 @@
 							}
 							var equipmentIds = alarmClock.equipmentIds;
 							that.addEids(equipmentIds);
+							this.name = alarmClock.name;
 							var week = alarmClock.week;
 							this.week = week;
 							if (week != null || week != '') {
@@ -456,6 +467,7 @@
 				const param = {};
 				param['week'] = this.week;
 				param['hour'] = this.time;
+				param['name'] = this.name;
 				if (this.status) {
 					param['status'] = "1";
 				} else {
@@ -517,6 +529,7 @@
 				const param = {};
 				param['id'] = this.clock;
 				param['week'] = this.week;
+				param['name'] = this.name;
 				param['hour'] = this.time;
 				if (this.status) {
 					param['status'] = "1";
@@ -670,6 +683,14 @@
 		box-shadow: 0upx 0upx 20upx #D3D3D3;
 		border-radius: 5upx;
 	}
+	.search-input2 {
+		width: 65%;
+		text-align: center;
+		font-size: 26upx;
+		font-family: "PingFang-SC-Bold";
+		box-shadow: 0upx 0upx 20upx #D3D3D3;
+		border-radius: 5upx;
+	}
 
 	.search-button {
 		width: 20%;

+ 1 - 1
packageA/pages/remote/alarmClockList.vue

@@ -12,7 +12,7 @@
 			<uni-collapse :accordion="true">
 				<uni-list>
 					<view v-for="(alarmClock,index) in alarmClockList" :key="index">
-						<uni-list-item :title="alarmClock.hour" :note="alarmClock.week+'---'+alarmClock.type"
+						<uni-list-item :title="alarmClock.hour+'--'+alarmClock.name" :note="alarmClock.week+'---'+alarmClock.type"
 							:rightText="alarmClock.status" clickable @click="onClick(alarmClock.id)" />
 					</view>
 				</uni-list>

+ 369 - 0
packageA/pages/remote/flowerShow.vue

@@ -0,0 +1,369 @@
+<template>
+	<view>
+		<view class="search">
+			<view class="search-title">
+				输入机器编码
+			</view>
+			<view class="search-input">
+				<input type="text" placeholder='输入设备编码后6位' v-model="searchClientId" />
+			</view>
+			<view class="search-button">
+				<button type="primary" class="" @click="search()">
+					<p class="">搜索</P>
+				</button>
+			</view>
+		</view>
+		<view class="td-right">
+			<view class="uni-list">
+				<view class="uni-list-cell">
+					<view class="uni-list-cell-left">
+						点击选择机器
+					</view>
+					<view class="uni-list-cell-db" style="overflow: hidden;text-overflow: ellipsis;">
+						<picker @change="changeEquipment" :value="index" :range="equipmentNameList">
+							<view class="uni-input">{{equipmentNameList[index]}}</view>
+						</picker>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="product" v-for="(item,index) in products" :key="index">
+			<P class="productName">花型:{{item.productName}} </P>
+				<radio-group :name="item.productName">
+					<label>
+						<radio @click="changeShow(item.productName+'-0')" value="0" :checked='item.showType==null || item.showType==0' /><text>显示</text>
+					</label>
+					<label>
+						<radio @click="changeShow(item.productName+'-1')" value="1" :checked='item.showType==1' /><text>屏蔽</text>
+					</label>
+				</radio-group>
+		</view>
+		<view class="tr">
+			<button type="primary" formType="submit" @click="updateProducts()" class="button">
+				<p class="p1">提交</p>
+			</button>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState,
+		mapActions,
+		mapMutations
+	} from 'vuex'
+	export default {
+		data() {
+			return {
+				globalUser: {},
+				index: null,
+				index2: null,
+				equipmentName: null,
+				equipmentNameList: [],
+				products: [],
+				productList: [],
+				productName: null,
+				equipmentId: null,
+				searchClientId: null,
+				showType: 0
+			}
+		},
+		onShow() {
+			this.globalUser = uni.getStorageSync("globalUser");
+			// uni.setNavigationBarTitle({
+			// 	title: this.$t('equipmentStatusList.title')
+			// });
+			// uni.setTabBarItem({
+			// 	index: 3,
+			// 	text: this.$t('tabs.tab4')
+			// });
+			var token = uni.getStorageSync("token");
+			if (token.length > 1) {
+				this.getEquipmentListData();
+			} else {
+				uni.reLaunch({
+					url: '../Login/Login',
+				});
+			}
+
+		},
+		methods: {
+			...mapActions('chart', ['getEquipmentListByUser']),
+			getEquipmentListData() {
+				this.getEquipmentListByUser(this.globalUser)
+					.then(data => {
+						this.merchantList = data;
+						var listName = data[0].equipmentList;
+						var equipmentNameList = [];
+						for (var i = 0; i < listName.length; i++) {
+							equipmentNameList.push("名称:" + listName[i].name + " 编号:" + listName[i].clientId.substring(
+								listName[i].clientId.length - 6, listName[i].clientId.length));
+						}
+						this.equipmentNameList = equipmentNameList;
+						var listId = data[0].id;
+						if (listId != null && listId != '1') {
+							uni.setStorageSync("listName", listName);
+						}
+						uni.stopPullDownRefresh();
+					}, _ => void uni.stopPullDownRefresh());
+			},
+			search() {
+				var clientId = this.searchClientId;
+				var list = uni.getStorageSync("listName");
+				var n = 0;
+				for (var i = 0; i < list.length; i++) {
+					var code = list[i].clientId.substring(list[i].clientId.length - 6, list[i].clientId.length);
+					if (code == clientId) {
+						n++;
+						this.index = i;
+						var id = list[i].id;
+						this.getProName(id);
+						this.equipmentId = id;
+						this.productName = null;
+						this.index2 = null;
+						break;
+					}
+				}
+				if (n == 0) {
+					uni.showModal({
+						title: "提示",
+						content: "找不到该机器",
+						success: (res) => {
+
+						}
+					})
+				}
+			},
+			sugarList() {
+				uni.navigateTo({
+					url: 'sugarList',
+				});
+			},
+			//改变机器
+			changeEquipment: function(e) {
+				this.index = e.target.value;
+				// console.log("index="+this.index)
+				var list = uni.getStorageSync("listName");
+				this.getProName(list[e.target.value].id);
+				this.equipmentId = list[e.target.value].id;
+				this.productName = null;
+				this.index2 = null;
+				this.searchClientId = null;
+			},
+			changeProduct: function(e) {
+				this.index2 = e.target.value;
+				// console.log("index="+this.index2)
+				var list = this.products;
+				this.productName = list[this.index2].productName;
+			},
+			//获取商品列表
+			getProName(equipmentId) {
+				// console.log("equipmentId="+equipmentId)
+				var token = uni.getStorageSync("token");
+				uni.request({
+					url: this.serverurl + '/TProduct/selectProducts',
+					data: {
+						"equimentId": equipmentId
+					},
+					header: {
+						'token': token
+					},
+					method: "GET",
+					success: (res) => {
+						var listName = res.data.data;
+						this.products = listName;
+						var productList = [];
+						for (var i = 0; i < listName.length; i++) {
+							productList.push(listName[i].productName);
+						}
+						this.productList = productList;
+					},
+				});
+			},
+			changeShow(nameNum) {
+				var arr = nameNum.split("-");
+				var name = arr[0];
+				var num = arr[1];
+				var list = [];
+				var productList = this.products;
+				for (var i = 0; i < productList.length; i++) {
+					var product = productList[i];
+					if (name==product.productName) {
+						product.showType = num;
+					}
+					list.push(product);
+				}
+				this.products = list;
+				// console.log(name + '-' + num);
+			},
+			updateProducts() {
+				uni.showModal({
+					title: "提示",
+					content: "是否修改?",
+					success: (res) => {
+						if (res.confirm) {
+							// var that = this;
+							var token = uni.getStorageSync("token");
+							var products = this.products;
+							if (products == null) {
+								return;
+							}
+							// encodeURIComponent(JSON.stringify(products))
+							var list = JSON.stringify(products);
+							uni.request({
+								url: this.serverurl + '/TProduct/updateProductsShow',
+								data: {
+									"productList": list
+								},
+								header: {
+									'token': token
+								},
+								method: "POST",
+								success: (res) => {
+									var code = res.data.code;
+									if (code == true) {
+										uni.showToast({
+											title: "发送成功",
+											duration: 2000
+										});
+									} else {
+										uni.showToast({
+											title: res.data.message,
+											duration: 2000
+										});
+									}
+								},
+							});
+						} else if (res.cancel) {}
+
+					}
+				})
+			},
+			selectSugar(no) {
+				var token = uni.getStorageSync("token");
+				uni.request({
+					url: this.serverurl + '/TSugarDo/selectSugarStatus',
+					data: {
+						"no": no
+					},
+					header: {
+						'token': token
+					},
+					method: "GET",
+					success: (res) => {
+						var code = res.data.code;
+						if (code == true) {
+							uni.showModal({
+								title: "提示",
+								content: res.data.message,
+								success: (res) => {
+
+								}
+							})
+
+							// var sugar = res.data.data;
+						} else {
+							uni.showModal({
+								title: "提示",
+								content: res.data.message,
+								confirmText: "重新查询",
+								success: (res) => {
+									if (res.confirm) {
+										this.selectSugar(no);
+									} else if (res.cancel) {}
+								}
+							})
+						}
+					},
+				});
+			}
+		}
+	}
+</script>
+
+<style>
+	.search {
+		width: 100%;
+		padding-top: 10upx;
+		display: flex;
+		flex-direction: row;
+		justify-content: flex-start;
+	}
+
+	.search-title {
+		width: 28%;
+		text-align: center;
+		font-size: 26upx;
+		font-family: "PingFang-SC-Bold";
+	}
+
+	.search-input {
+		width: 45%;
+		text-align: center;
+		font-size: 26upx;
+		font-family: "PingFang-SC-Bold";
+		box-shadow: 0upx 0upx 20upx #D3D3D3;
+		border-radius: 5upx;
+	}
+
+	.search-button {
+		width: 20%;
+		padding-left: 7upx;
+		text-align: center;
+	}
+
+	.tr {
+		padding-top: 15upx;
+		display: flex;
+		flex-direction: row;
+		justify-content: flex-start;
+		font-size: 48upx;
+		font-family: "PingFang-SC-Bold";
+		/* position: fixed; */
+		bottom: 100upx;
+		width: 100%;
+	}
+
+	.product {
+		font-family: "PingFang-SC-Bold";
+		font-size: 38upx;
+		padding-top: 15upx;
+		display: flex;
+		flex-direction: row;
+		justify-content: flex-start;
+	}
+
+	.productName {
+		width: 70%;
+		padding-left: 40upx;
+		padding-right: 10upx;
+	}
+
+	.button {
+		margin: auto;
+		width: 60%;
+		height: 100upx;
+	}
+
+	.p2 {
+		font-size: 30upx;
+		/* #ifndef H5 */
+		padding-top: 3upx;
+		/* #endif */
+		position: absolute;
+		/* 水平居中 */
+		left: 50%;
+		-webkit-transform: translateX(-50%);
+		transform: translateX(-50%);
+	}
+
+	.p1 {
+		font-size: 48upx;
+	}
+
+	.p {
+		align: right;
+		color: #007AFF;
+		padding-top: 30upx;
+	}
+</style>

+ 8 - 0
packageA/pages/remote/remoteList.vue

@@ -6,6 +6,9 @@
 					<view v-show="show">
 						<uni-list-item title="远程做糖" @click="sugar()" />
 					</view>
+					<view v-show="show">
+						<uni-list-item title="屏蔽/显示售卖花型" @click="flowers()" />
+					</view>
 					<view v-show="show2">
 						<uni-list-item title="参数调整" @click="parameters()" />
 					</view>
@@ -51,6 +54,11 @@
 					url: 'dosugar',
 				});
 			},
+			flowers(){
+				uni.navigateTo({
+					url:'flowerShow'
+				})
+			},
 			parameters() {
 				uni.navigateTo({
 					url: './parameters',

+ 112 - 25
packageA/pages/user/modify/joinpayMchCheck.vue

@@ -1,27 +1,46 @@
 <template>
 	<view class="content">
 		<view class="body user-insert">账号:{{joinpayMchCheck.userName}}</view>
-		<form >
-			<view class="body user-insert-line">旧银行卡号:{{oldJoinpayMchCheck.bankAccountNo}}</view>
-			<view class="body user-insert-line">旧银行账户名:{{oldJoinpayMchCheck.bankAccountName}}</view>
-			<view class="body user-insert-line">旧法人姓名:{{oldJoinpayMchCheck.legalPerson}}</view>
-			<view class="body user-insert-line">旧身份证:{{oldJoinpayMchCheck.idCardNo}}</view>
-			<view class="body user-insert-line">旧银联号:{{oldJoinpayMchCheck.bankChannelNo}}</view></br>
-			<!-- <view class="body user-insert-line">旧提交时间:{{oldJoinpayMchCheck.createDate}}</view> -->
-		</form>
-		<view class="body user-insert">-------------------------------</view>
-		<form >
-			<view class="body user-insert-line">新银行卡号:{{joinpayMchCheck.bankAccountNo}}</view>
-			<view class="body user-insert-line">新银行账户名:{{joinpayMchCheck.bankAccountName}}</view>
-			<view class="body user-insert-line">新法人姓名:{{joinpayMchCheck.legalPerson}}</view>
-			<view class="body user-insert-line">新身份证:{{joinpayMchCheck.idCardNo}}</view>
-			<view class="body user-insert-line">新银联号:{{joinpayMchCheck.bankChannelNo}}</view>
-			<view class="body user-insert-line">提交时间:{{joinpayMchCheck.createDate}}</view>
-			<view class="btn-area">
-				<button type="primary" @click="agree(joinpayMchCheck.id)" style="margin-right: 20px;" >通过</button>
-				<button type="primary"  @click="unagree(joinpayMchCheck.id)" >撤销</button>
-			</view>
-		</form>
+		<view class="" v-if="joinpayMchCheck.idCardNo!=null">
+			<form >
+				<view class="body user-insert-line">旧银行卡号:{{oldJoinpayMchCheck.bankAccountNo}}</view>
+				<view class="body user-insert-line">旧银行账户名:{{oldJoinpayMchCheck.bankAccountName}}</view>
+				<view class="body user-insert-line">旧法人姓名:{{oldJoinpayMchCheck.legalPerson}}</view>
+				<view class="body user-insert-line">旧身份证:{{oldJoinpayMchCheck.idCardNo}}</view>
+				<view class="body user-insert-line">旧银联号:{{oldJoinpayMchCheck.bankChannelNo}}</view></br>
+			</form>
+			<view class="body user-insert">-------------------------------</view>
+			<form >
+				<view class="body user-insert-line">新银行卡号:{{joinpayMchCheck.bankAccountNo}}</view>
+				<view class="body user-insert-line">新银行账户名:{{joinpayMchCheck.bankAccountName}}</view>
+				<view class="body user-insert-line">新法人姓名:{{joinpayMchCheck.legalPerson}}</view>
+				<view class="body user-insert-line">新身份证:{{joinpayMchCheck.idCardNo}}</view>
+				<view class="body user-insert-line">新银联号:{{joinpayMchCheck.bankChannelNo}}</view>
+				<view class="body user-insert-line">提交时间:{{joinpayMchCheck.createDate}}</view>
+				<view class="btn-area">
+					<button type="primary" @click="agree(joinpayMchCheck.id)" style="margin-right: 20px;" >通过</button>
+					<button type="primary"  @click="unagree(joinpayMchCheck.id)" >撤销</button>
+				</view>
+			</form>
+		</view>
+		<view class="" v-else>
+			<form >
+				<view class="body user-insert-line">旧杉德宝账号:{{oldJoinpayMchCheck.bankAccountNo}}</view>
+				<view class="body user-insert-line">旧杉德宝账户名:{{oldJoinpayMchCheck.bankAccountName}}</view>
+				<view class="body user-insert-line">旧杉德宝类型:{{oldJoinpayMchCheck.bankAccountType==0?'企业':'个人'}}</view>
+			</form>
+			<view class="body user-insert">-------------------------------</view>
+			<form >
+				<view class="body user-insert-line">新杉德宝账号:{{joinpayMchCheck.bankAccountNo}}</view>
+				<view class="body user-insert-line">新杉德宝账户名:{{joinpayMchCheck.bankAccountName}}</view>
+				<view class="body user-insert-line">新杉德宝类型:{{joinpayMchCheck.bankAccountType==0?'企业':'个人'}}</view>
+				<view class="body user-insert-line">提交时间:{{joinpayMchCheck.createDate}}</view>
+				<view class="btn-area">
+					<button type="primary" @click="agreeShande(joinpayMchCheck.id)" style="margin-right: 20px;" >通过</button>
+					<button type="primary"  @click="unagreeShande(joinpayMchCheck.id)" >撤销</button>
+				</view>
+			</form>
+		</view>
 	</view>
 </template>
 
@@ -30,11 +49,12 @@
 		data(){
 			return{
 				oldJoinpayMchCheck:{},
-				joinpayMchCheck:{}
+				joinpayMchCheck:{},
 			}
 		},
 		onLoad: function(option) {
 			const joinpayMchCheck = JSON.parse(decodeURIComponent(option.joinpayMchCheck));
+			//idCardNo
 			this.joinpayMchCheck = joinpayMchCheck;
 			this.getOldJoinpayMch(joinpayMchCheck.adminId);
 		},
@@ -43,9 +63,24 @@
 		methods: {
             getOldJoinpayMch(adminId){
 				var token = uni.getStorageSync("token");
-				// var globalUser = uni.getStorageSync("globalUser");
-				uni.request({
-					url: this.serverurl + '/TJoinpayMch/getMch',
+				if(this.joinpayMchCheck.idCardNo!=null){
+					uni.request({
+						url: this.serverurl + '/TJoinpayMch/getMch',
+						data: {
+							"adminId": adminId,
+						},
+						header: {
+							'token': token
+						},
+						method: "POST",
+						success: (res) => {
+							var date  = res.data.data;
+							this.oldJoinpayMchCheck = date;
+						},
+					});
+				}else{
+					uni.request({
+					url: this.serverurl + '/TShandeMch/getMch',
 					data: {
 						"adminId": adminId,
 					},
@@ -58,6 +93,8 @@
 						this.oldJoinpayMchCheck = date;
 					},
 				});
+				}
+				
 			},
 			agree(id){
 				var that = this;
@@ -108,6 +145,56 @@
 						} else if (res.cancel) {}
 					}
 				});
+			},
+			agreeShande(id){
+				var that = this;
+				uni.showModal({
+					title: '提示',
+					content: '是否通过?',
+					success: function(res) {
+						if (res.confirm) {
+							var token = uni.getStorageSync("token");
+							uni.request({
+								url: that.serverurl + '/TShandeMchCheck/agree?id=' + id,
+								header: {
+									'token': token
+								},
+								method: "GET",
+								success: (res) => {
+									uni.showToast({
+										title: res.data.message,
+										duration: 2000
+									});
+								},
+							});
+						} else if (res.cancel) {}
+					}
+				});
+			},
+			unagreeShande(id){
+				var that = this;
+				uni.showModal({
+					title: '提示',
+					content: '是否不通过?',
+					success: function(res) {
+						if (res.confirm) {
+							var token = uni.getStorageSync("token");
+							uni.request({
+								url: that.serverurl + '/TShandeMchCheck/unagree?id=' + id,
+								header: {
+									'token': token
+								},
+								method: "GET",
+								success: (res) => {
+									uni.showToast({
+										title: res.data.message,
+										duration: 2000
+									});
+								},
+							});
+						} else if (res.cancel) {}
+					}
+				});
 			}
 		}
 	}

+ 1 - 0
pages/Charts/elseStatistics.vue

@@ -39,6 +39,7 @@
 			this.equipmentId = option['equipmentId'];
 			this.adminId = option['adminId'];
 			this.pname = option['pname'];
+			uni.setStorageSync('test',0);
 		},
 		mounted() {
 		},

+ 143 - 105
pages/Charts/mainStatistics.vue

@@ -195,14 +195,14 @@
 		</view>
 		<view v-show="noticeShow">
 			<uni-popup id="popupDialog" ref="popupDialog" type="dialog">
-				<uni-popup-dialog :type="msgType" title="通知" content="欢迎使用 unisdfdd-popup!"
-								  :before-close="true" @confirm="dialogConfirm(noticeId)" @close="dialogClose">
-					<scroll-view  scroll-y="true" class="scroll-Y" :style="{height:scrollHeight*0.8+'px'}">
+				<uni-popup-dialog :type="msgType" title="通知" content="欢迎使用 unisdfdd-popup!" :before-close="true"
+					@confirm="dialogConfirm(noticeId)" @close="dialogClose">
+					<scroll-view scroll-y="true" class="scroll-Y" :style="{height:scrollHeight*0.8+'px'}">
 						<view class="scroll-view-item ">
-							{{noticeTitle}}<br/>
+							{{noticeTitle}}<br />
 							<p v-html="noticeNote">{{noticeNote}}</p>
 						</view>
-					
+
 					</scroll-view>
 				</uni-popup-dialog>
 			</uni-popup>
@@ -261,15 +261,15 @@
 				admins: [],
 				index: 0,
 				id: 0,
-				length:0,
-				type:null,
-				noticeShow:false,
-				noticeTRUE:true,
-				noticeTitle:'',
-				noticeNote:'',
-				noticeId:'',
+				length: 0,
+				type: null,
+				noticeShow: false,
+				noticeTRUE: true,
+				noticeTitle: '',
+				noticeNote: '',
+				noticeId: '',
 				msgType: 'success',
-				scrollHeight:uni.getSystemInfoSync().windowHeight - 130,
+				scrollHeight: uni.getSystemInfoSync().windowHeight - 130,
 			}
 		},
 		onReady() {
@@ -295,13 +295,14 @@
 				index: 0,
 				text: this.$t('tabs.tab1')
 			});
+			// uni.setStorageSync('test',1);
 			this.id = 0;
 			this.index = 0;
 			var test = uni.getStorageSync('test');
 			var globalUser = uni.getStorageSync("globalUser");
 			//test 判断是不是初次登陆
-			if(globalUser.id!=1&&test==1){
-				setTimeout(()=>{
+			if (globalUser.id != 1 && test == 1) {
+				setTimeout(() => {
 					this.getNOtice();
 				}, 5000);
 			}
@@ -314,7 +315,7 @@
 				});
 			}
 			if (globalUser.toString().length > 1) {
-				if (globalUser.type > 0&&globalUser.type<4) {
+				if (globalUser.type > 0 && globalUser.type < 4) {
 					this.getAdmin();
 				}
 				this.id = globalUser.id;
@@ -325,7 +326,10 @@
 		mounted() {
 			var token = uni.getStorageSync("token");
 			if (token.toString().length > 1) {
-				this.init();
+				var test = uni.getStorageSync('test');
+				if (test > 1||test==0) {
+					this.init();
+				}
 			} else {
 				uni.reLaunch({
 					url: '../Login/Login',
@@ -349,23 +353,26 @@
 				this.cHeight = uni.upx2px(370);
 
 				await this.getMainStatisticsData();
+				var test = uni.getStorageSync('test');
+				await this.initDateRang(new Date(), 'day', 0);
+				if (test == null || test < 2) {
+					await this.initDateRang(new Date(), 'week', 0);
+					await this.initDateRang(new Date(), 'month', 0);
+					await this.initDateRang(new Date(), 'year', 0);
+				}
 
-				await this.initDateRang(new Date(), 'day');
-				await this.initDateRang(new Date(), 'week');
-				await this.initDateRang(new Date(), 'month');
-				await this.initDateRang(new Date(), 'year');
 				var test = uni.getStorageSync('test');
 				var globalUser = uni.getStorageSync("globalUser");
 				//初次登陆跳转后,把test变成2
 				uni.setStorageSync('test', '2');
 
 			},
-			getNOtice(){
+			getNOtice() {
 				// console.log("notice")
 				var globalUser = uni.getStorageSync("globalUser");
 				var token = uni.getStorageSync("token");
 				uni.request({
-					url: this.serverurl + '/TNotice/getNotice?id='+globalUser.id,
+					url: this.serverurl + '/TNotice/getNotice?id=' + globalUser.id,
 					// data: {
 					// 	"id": globalUser.id
 					// },
@@ -374,15 +381,15 @@
 					},
 					method: "POST",
 					success: (res) => {
-						if(res.data.code){
-							if(res.data.message=='1'){
+						if (res.data.code) {
+							if (res.data.message == '1') {
 								var notice = res.data.data;
-								this.noticeTitle =notice.title,
-								this.noticeNote = notice.note,
-								this.noticeId = notice.id,
-								this.noticeTRUE = false,
-								this.noticeShow = true,
-								this.$refs.popupDialog.open()
+								this.noticeTitle = notice.title,
+									this.noticeNote = notice.note,
+									this.noticeId = notice.id,
+									this.noticeTRUE = false,
+									this.noticeShow = true,
+									this.$refs.popupDialog.open()
 							}
 						}
 					},
@@ -414,7 +421,7 @@
 						if (res.data.code) {
 							var admins = res.data.data;
 							// this.admins = admins;
-							var adminss = []; 
+							var adminss = [];
 							var adminList = [];
 							adminList.push('本商户');
 							if (admins.length > 0) {
@@ -422,10 +429,10 @@
 								adminList.push('所有下级');
 								for (var i = 0; i < admins.length; i++) {
 									// console.log(admins[i].name)
-									if(i==0){
+									if (i == 0) {
 										var globalUser = uni.getStorageSync("globalUser");
 										var id = admins[i].id;
-										if(id==globalUser.id){
+										if (id == globalUser.id) {
 											continue;
 										}
 									}
@@ -448,25 +455,26 @@
 						}
 					},
 				});
-				
+
 			},
 			// 改变商家
-			changeAdmin: function(e){
+			changeAdmin: function(e) {
 				this.index = e.target.value;
 				var id = '';
-				if(e.target.value>1){
-					id = this.admins[e.target.value-2].id;
+				if (e.target.value > 1) {
+					id = this.admins[e.target.value - 2].id;
 				}
-				if(e.target.value==1){
+				if (e.target.value == 1) {
 					id = 'all';
 				}
-				if(e.target.value==0){
+				if (e.target.value == 0) {
 					id = 0;
 				}
 				// console.log("adminID="+id);
 				this.id = id;
+				uni.setStorageSync('test', 1);
 				this.init();
-				 
+
 			},
 			equipmentStatus() {
 				var that = this;
@@ -504,7 +512,7 @@
 					},
 				});
 			},
-			initDateRang(day, chartType) {
+			initDateRang(day, chartType, type) {
 				const daystr = dateUtils.formateDate(day, 'yyyy/MM/dd');
 				if (chartType === 'day') {
 					this.startDate1 = dateUtils.formateDate(day, 'yyyy/MM/dd');
@@ -522,7 +530,7 @@
 					this.endDate4 = dateUtils.formateDate(dateUtils.getCurrentYearLastDate(day), 'yyyy/MM/dd');
 				}
 
-				return this.getStatisticsData(chartType);
+				return this.getStatisticsData(chartType, type);
 			},
 			/**上一个 */
 			pre(chartType) {
@@ -543,7 +551,7 @@
 					day = new Date(this.startDate4);
 					day.setFullYear(day.getFullYear() - 1);
 				}
-				this.initDateRang(day, chartType);
+				this.initDateRang(day, chartType, 1);
 			},
 			/**下一个 */
 			next(chartType) {
@@ -565,9 +573,10 @@
 					day.setFullYear(day.getFullYear() + 1);
 				}
 
-				this.initDateRang(day, chartType);
+				this.initDateRang(day, chartType, 1);
 			},
-			getStatisticsData(chartType) {
+			getStatisticsData(chartType, type) {
+				//type=0 头顶统计数字变,type=1 头顶统计数字不变
 				const param = {
 					'chartType': chartType
 				};
@@ -602,38 +611,87 @@
 				if (this.equipmentId) {
 					param['equipmentId'] = this.equipmentId;
 				}
-				if (this.id!=1) {
+				if (this.id != 1) {
 					var id = this.id;
-				}else{
+				} else {
 					var id = 0;
 				}
-				if(id=='all'){
+				if (id == 'all') {
 					param['adminId'] = null;
-					if(this.type==1){
+					if (this.type == 1) {
 						param['agencyId'] = globalUser.id;
 					}
-					if(this.type==2){
+					if (this.type == 2) {
 						param['merchantId'] = globalUser.id;
 					}
-				}else if(id==0){
-					
-				}else{
+				} else if (id == 0) {
+
+				} else {
 					param['adminId'] = id;
 				}
+				var type = type;
 				return this.getStatistics(param)
 					.then(data => {
 						uni.stopPullDownRefresh();
+						var date = new Date();
+						var num = date.getDay(); //'日一二三四五六'0123456
+						var categories = data.categories;
+						var series = data.series;
 						if (param['chartType'] == 'day') {
 							canvaColumn1 = this.initChart('canvaColumn1', data);
+							if (type == 0) {
+								var dayTotalMoney = 0;
+								var dayTotalNum = 0;
+								for (var i = 0; i < series[0].data.length; i++) {
+									dayTotalMoney = dayTotalMoney + series[1].data[i];
+									dayTotalNum = dayTotalNum + series[0].data[i]
+								}
+								this.dayTotalNum = dayTotalNum;
+								this.dayTotalMoney = dayTotalMoney;
+							}
+
 						}
 						if (param['chartType'] == 'week') {
 							canvaColumn2 = this.initChart('canvaColumn2', data);
+							if (type == 0) {
+								var weekTotalMoney = 0;
+								var weekTotalNum = 0;
+								for (var i = 0; i < series[0].data.length; i++) {
+									weekTotalMoney = weekTotalMoney + series[1].data[i];
+									weekTotalNum = weekTotalNum + series[0].data[i]
+								}
+								this.weekTotalMoney = weekTotalMoney;
+								this.weekTotalNum = weekTotalNum;
+							}
+
 						}
 						if (param['chartType'] == 'month') {
 							canvaColumn3 = this.initChart('canvaColumn3', data);
+							if (type == 0) {
+								var monthTotalMoney = 0;
+								var monthTotalNum = 0;
+								for (var i = 0; i < series[0].data.length; i++) {
+									monthTotalMoney = monthTotalMoney + series[1].data[i];
+									monthTotalNum = monthTotalNum + series[0].data[i]
+								}
+								this.monthTotalMoney = monthTotalMoney;
+								this.monthTotalNum = monthTotalNum;
+							}
+
 						}
 						if (param['chartType'] == 'year') {
 							canvaColumn4 = this.initChart('canvaColumn4', data);
+							if (type == 0) {
+								var yearTotalMoney = 0;
+								var yearTotalNum = 0;
+								for (var i = 0; i < series[0].data.length; i++) {
+									yearTotalMoney = yearTotalMoney + series[1].data[i];
+									yearTotalNum = yearTotalNum + series[0].data[i]
+								}
+								this.yearTotalMoney = yearTotalMoney;
+								this.yearTotalNum = yearTotalNum;
+							}
+
 						}
 
 					}, _ => {
@@ -767,23 +825,23 @@
 				if (this.equipmentId) {
 					param['equipmentId'] = this.equipmentId;
 				}
-				if (this.id!=1) {
+				if (this.id != 1) {
 					var id = this.id;
-				}else{
+				} else {
 					var id = 0;
 				}
 				var aid = param.adminId;
-				if(id=='all'){
+				if (id == 'all') {
 					param['adminId'] = null;
-					if(this.type==1){
+					if (this.type == 1) {
 						param['agencyId'] = globalUser.id;
 					}
-					if(this.type==2){
+					if (this.type == 2) {
 						param['merchantId'] = globalUser.id;
 					}
-				}else if(id==0){
-					
-				}else{
+				} else if (id == 0) {
+
+				} else {
 					param['adminId'] = id;
 					aid = id;
 				}
@@ -792,6 +850,8 @@
 				var equipmentId = this.equipmentId;
 				var serverurl = this.serverurl;
 				var token = uni.getStorageSync("token");
+				var test = uni.getStorageSync("test");
+				param['test'] = test;
 				uni.request({
 					url: serverurl + '/TEquipment/getMachineNum',
 					data: {
@@ -808,38 +868,16 @@
 						this.machineUseNum = list[1];
 					}
 				});
-				uni.request({
-					url: serverurl + '/TOrder/getMainStatistics',
-					data: param,
-					method: "POST",
-					header: {
-						'token': token
-					},
-					success: (res) => {
-						var list = res.data.data;
-						for (let bean of list) {
-							if (bean['categorie'] === 'day') {
-								this.dayTotalMoney = bean['salePrice'];
-								this.dayTotalNum = bean['saleNum'];
-							}
-							if (bean['categorie'] === 'week') {
-								this.weekTotalMoney = bean['salePrice'];
-								this.weekTotalNum = bean['saleNum'];
-							}
-							if (bean['categorie'] === 'month') {
-								this.monthTotalMoney = bean['salePrice'];
-								this.monthTotalNum = bean['saleNum'];
-							}
-							if (bean['categorie'] === 'year') {
-								this.yearTotalMoney = bean['salePrice'];
-								this.yearTotalNum = bean['saleNum'];
-							}
-						}
-					}
-				});
-				// return this.getMainStatistics(param)
-				// 	.then(data => {
-				// 		for (let bean of data) {
+				// uni.request({
+				// 	url: serverurl + '/TOrder/getMainStatistics',
+				// 	data: param,
+				// 	method: "POST",
+				// 	header: {
+				// 		'token': token
+				// 	},
+				// 	success: (res) => {
+				// 		var list = res.data.data;
+				// 		for (let bean of list) {
 				// 			if (bean['categorie'] === 'day') {
 				// 				this.dayTotalMoney = bean['salePrice'];
 				// 				this.dayTotalNum = bean['saleNum'];
@@ -857,9 +895,9 @@
 				// 				this.yearTotalNum = bean['saleNum'];
 				// 			}
 				// 		}
-				// 		uni.stopPullDownRefresh();
-				// 	}, _ => void uni.stopPullDownRefresh());
-					
+				// 	}
+				// });
+
 			},
 
 			touchLine1(e) {
@@ -947,12 +985,12 @@
 				}
 			},
 			// 点击确定
-			dialogConfirm(id){
+			dialogConfirm(id) {
 				this.noticeTRUE = true;
 				var adminId = uni.getStorageSync("globalUser").id;
 				var token = uni.getStorageSync("token");
 				uni.request({
-					url: this.serverurl + '/TNotice/updateNotice?adminId='+adminId+'&noticeId='+id,
+					url: this.serverurl + '/TNotice/updateNotice?adminId=' + adminId + '&noticeId=' + id,
 					// data: {
 					// 	"adminId": adminId,
 					// 	"noticeId":id
@@ -966,7 +1004,7 @@
 							title: "提示",
 							content: res.data.message,
 							success: (res) => {
-						
+
 							}
 						})
 					},
@@ -974,12 +1012,12 @@
 				this.$refs.popupDialog.close()
 			},
 			//点击取消
-			dialogClose(done){
+			dialogClose(done) {
 				this.noticeTRUE = true,
-				// this.msgType = 'success'
-				// 需要执行 done 才能关闭对话框
-				this.$refs.popupDialog.close()
-			}	
+					// this.msgType = 'success'
+					// 需要执行 done 才能关闭对话框
+					this.$refs.popupDialog.close()
+			}
 		}
 	}
 </script>

+ 35 - 48
pages/User/equipmentStatusList.vue

@@ -317,58 +317,47 @@
 					title: that.$t('equipmentStatusList.tip'),
 					content: that.$t('equipmentStatusList.rebootTip'),
 					success: function(res) {
-						var serverurl = that.serverurl;
-						var code = "1";
-						var equipmentId = id;
-						var token = uni.getStorageSync("token");
-						uni.request({
-							url: serverurl + '/TEquipment/onOff',
-							data: {
-								"adminId": code,
-								"equipmentId": equipmentId
-							},
-							method: "POST",
-							header: {
-								'token': token
-							},
-							success: (res) => {
-								var list = res.data.data;
-								if (list == "SUCCESS") {
-									uni.showModal({
-										title: that.$t('equipmentStatusList.kaiji'),
-										content: '发送成功',
-										success: function(res) {
-										}
-									})
-								} else {
-									uni.showModal({
-										title: that.$t('equipmentStatusList.error'),
-										content: that.$t('equipmentStatusList.kaijierror'),
-										success: function(res) {
-										}
-									})
+						if (res.confirm) {
+							var serverurl = that.serverurl;
+							var code = "1";
+							var equipmentId = id;
+							var token = uni.getStorageSync("token");
+							uni.request({
+								url: serverurl + '/TEquipment/onOff',
+								data: {
+									"adminId": code,
+									"equipmentId": equipmentId
+								},
+								method: "POST",
+								header: {
+									'token': token
+								},
+								success: (res) => {
+									var list = res.data.data;
+									if (list == "SUCCESS") {
+										uni.showModal({
+											title: that.$t('equipmentStatusList.kaiji'),
+											content: '发送成功',
+											success: function(res) {
+											}
+										})
+									} else {
+										uni.showModal({
+											title: that.$t('equipmentStatusList.error'),
+											content: that.$t('equipmentStatusList.kaijierror'),
+											success: function(res) {
+											}
+										})
+									}
 								}
-							}
-						});
+							});
+						}
+						
 					}
 				})
 			},
 			OnOff(id, code) {
 				var that = this;
-				// var token = uni.getStorageSync("token");
-				// uni.request({
-				// 	url: that.serverurl + '/TEquipment/onoffStatus',
-				// 	data: {
-				// 		"equipmentId": id
-				// 	},
-				// 	header:{
-				// 		'token':token
-				// 	},
-				// 	method: "POST",
-				// 	success: (res) => {
-
-				// 	},
-				// });
 				var ddd = this.timeAll.get(id);
 				if (that.timeAll.get(id) != null) {
 					var stamp = Date.parse(new Date());
@@ -412,7 +401,6 @@
 										var timestamp = Date.parse(new Date());
 										that.timeAll.set(id, timestamp);
 										var oo = that.timeAll;
-										// that.time = timestamp;
 										that.getEquipmentListData();
 										if (list == 'SUCCESS') {
 											uni.showModal({
@@ -466,7 +454,6 @@
 							var timestamp = Date.parse(new Date());
 							that.timeAll.set(id, timestamp);
 							var oo = that.timeAll;
-							// that.time = timestamp;
 							if (list == "SUCCESS") {
 								uni.showModal({
 									title: that.$t('equipmentStatusList.kaiji'),