dedsudiyu 2 weeks ago
parent
commit
5605342001

+ 2 - 1
api/request/config.js

@@ -3,6 +3,7 @@ const config = {
 	
 	// base_url: 'http://192.168.1.43/api', //43服务器
 	// base_url: 'http://192.168.1.8/api',//1.8服务器
+	base_url: 'http://192.168.1.88/labSystem',//1.88服务器
 	// base_url: 'http://192.168.1.9:8080',//柴
 	// base_url: 'http://192.168.1.24:8080',//林总
 	// base_url: 'http://192.168.1.7:8080',//刘波
@@ -13,7 +14,7 @@ const config = {
 	// base_url: 'http://192.168.1.29:8080',//何成
 	// base_url: 'https://demo.zjznai.com/xzgd/',
 	// base_url: 'https://lab.zjznai.com/labNhSystem/',//43服务器高升测试
-	base_url: 'https://lab.zjznai.com/labTest/',//1.8外网
+	// base_url: 'https://lab.zjznai.com/labTest/',//1.8外网
 	// base_url: 'https://lab.zjznai.com/labapp/',//43服务器线上
 	// base_url: 'https://lab.zjznai.com/appTest/',//88服务器线上
 	// base_url: 'https://lab.zjznai.com/labSystem/', //矿大地址

+ 8 - 0
pages.json

@@ -25,6 +25,14 @@
 			}
 		},
 		{
+			"path": "pages/views/login/gasCylinderSupplierLogin", //账号密码登录
+			"style": {
+				"navigationBarTitleText": "供应商登录",
+				"navigationBarTextStyle": "white", //导航文字颜色
+				"navigationBarBackgroundColor": "#0183FA" //导航背景色
+			}
+		},
+		{
 			"path": "pages/views/login/ssoLogin", //统一认证页面
 			"style": {
 				"navigationBarTitleText": "统一身份认证",

+ 8 - 0
pages/api/index.js

@@ -10,6 +10,14 @@ export const login = (data) => {
 		data: { ...data }
 	})
 };
+//供应商登录
+export const gasSupplierLogin = (data) => {
+	return apiResquest({
+		url: `/auth/gasSupplierLogin`,
+		method: 'POST',
+		data: { ...data }
+	})
+};
 //退出登录
 export const logout  = (data) => {
     return apiResquest({

+ 8 - 4
pages/views/home/home.vue

@@ -1,8 +1,8 @@
 <template>
 	<view id="home">
-		<!-- <teacherHome class="flex-box-page" v-if="userType==1"></teacherHome> -->
-		<!-- <pupilHome class="flex-box-page" v-if="userType==2"></pupilHome> -->
-		<supplierHome class="flex-box-page"></supplierHome>
+		<teacherHome class="flex-box-page" v-if="userType==1"></teacherHome>
+		<pupilHome class="flex-box-page" v-if="userType==2"></pupilHome>
+		<supplierHome class="flex-box-page" v-if="userType=='none'"></supplierHome>
 	</view>
 </template>
 <script>
@@ -42,7 +42,11 @@
 		onShow() {
 			uni.removeStorageSync('planSensorList');
 			if (uni.getStorageSync('token') && uni.getStorageSync('userId') && uni.getStorageSync('userType')) {
-				this.systemUserPersonalData();
+				if(uni.getStorageSync('userType') != 'none'){
+					this.systemUserPersonalData();
+				}else{
+					this.$set(this,'userType','none');
+				}
 				//写入用户
 			} else {
 				uni.removeStorageSync('token');

+ 564 - 0
pages/views/login/gasCylinderSupplierLogin.vue

@@ -0,0 +1,564 @@
+<!-- 登录 -->
+<template>
+	<view id="gasCylinderSupplierLogin">
+		<img class="login-max-big" :src="loginBanner">
+		<view class="login-box">
+			<view class="tabTitle">
+				<view class="tabTitle_li" @tap="tabClick(index)" :key="index" v-for="(item,index) in tabText">
+					<view :class="{on:curTab==index}" class="tabTitle_text">{{item}}</view>
+					<!-- <view :class="{on:curTab==index}" class="tabTitle_across"></view> -->
+				</view>
+			</view>
+			<view class="input-max-box-one">
+				<view class="input-box">
+					<img :src="imagesUrl('commonality/img_log_in_account.png')">
+					<input type="text" v-model="username" placeholder="请输入账号" maxlength="20">
+				</view>
+			</view>
+			<view class="input-max-box-two">
+				<view class="input-box">
+					<img :src="imagesUrl('commonality/img_log_in_password.png')">
+					<input type="password" v-model="password" placeholder="请输入密码" maxlength="20">
+				</view>
+			</view>
+			<view class="check-box" @click="checkboxChange()">
+				<img v-if="checkedType" :src="imagesUrl('commonality/icon_13.png')">
+				<img v-if="!checkedType" :src="imagesUrl('commonality/icon_12.png')"/>
+				<view>记住我</view>
+			</view>
+			<view class="button-box" @click="gasSupplierLogin()">登录</view>
+			<!-- <view class="passwrod-button-box" @click="forgotPasswordButton()">忘记密码?</view> -->
+		</view>
+		<view class="loginButton" @click="backButton()">统一身份认证登录</view>
+	</view>
+</template>
+
+<script>
+	import md5 from '@/utils/md5.js'
+	import {
+		config
+	} from '@/api/request/config.js'
+	import {
+		gasSupplierLogin,
+		configInfo,
+		getConfigByType,
+		systemAppletRolePermission,
+		systemSubjectCheckIsAdminOrSafeUser,
+		securityDataStatisticsGetUserIdentity
+	} from '@/pages/api/index.js'
+	import {
+		Encrypt,
+		Decrypt
+	} from '@/utils/secret.js'
+	export default {
+		onShareAppMessage(res) {
+			return {
+				title: '实验室安全智慧化管控系统',
+				path: '/pages/views/login/login'
+			}
+		},
+		data() {
+			return {
+				identityStatus: 1,
+				username: "",
+				password: "",
+				checkedType: false,
+				loginBanner: uni.getStorageSync('loginBanner'),
+				infoList: [], //模板消息Id
+				tabText: ['师生登录'],
+				curTab: 0,
+				pageType: 0,
+				supplierType: false,
+			}
+		},
+
+		onLoad(option) {
+			//供应商注册成功后返回到供应商注册页面
+			if (option.status) {
+				this.identityStatus = 2
+			}
+			if (uni.getStorageSync('userName') && uni.getStorageSync('password')) {
+				this.username = uni.getStorageSync('userName');
+				this.password = uni.getStorageSync('password');
+				this.checkedType = true;
+			}
+		},
+		onShow() {
+			this.getConfigInfo();
+		},
+		methods: {
+			backButton(){
+				uni.navigateBack();
+			},
+			//顶部tab点击
+			tabClick(index) {
+				this.curTab = index;
+			},
+			//跳转忘记密码
+			forgotPasswordButton(){
+				uni.navigateTo({
+					url: '/pages_basics/views/forgotPassword/forgotPassword',
+				});
+			},
+			//登录
+			async gasSupplierLogin() {
+				let self = this;
+				let obj = {
+					account: this.username,
+					password: md5.hex_md5(this.password),
+					tenantId:0,
+				}
+				const {
+					data
+				} = await gasSupplierLogin(obj)
+				if (data.code == 200) {
+					if(data.data.userType == null){
+						uni.setStorageSync('dataBoardType', false);
+						uni.setStorageSync('token', data.data.token);
+						uni.setStorageSync('userId', data.data.userId);
+						uni.setStorageSync('isInitPwd', true);
+						uni.setStorageSync('supplierUserName', data.data.userName);
+						// userType 0-系统 1-教职工 2-学生 3-大屏
+						uni.setStorageSync('userType', data.data.userType == 0 || data.data.userType == 1 ? '1' :
+							(data.data.userType == 2 ? '2' : (data.data.userType == 3 ? '3' : 'none')));
+						if (this.checkedType) {
+							uni.setStorageSync('userName', this.username)
+							uni.setStorageSync('password', this.password)
+						} else {
+							uni.removeStorageSync('userName')
+							uni.removeStorageSync('password')
+						}
+						//等待配置与字段获取到后跳转
+						Promise.all([
+							//获取开发配置
+							this.getConfigByType(),
+							//获取权限字段
+							this.systemAppletRolePermission(),
+							//查询是否是管理员/安全员
+							this.systemSubjectCheckIsAdminOrSafeUser(),
+							//查询身份
+							this.securityDataStatisticsGetUserIdentity()
+						]).then((result) => {
+							if (uni.getStorageSync('codeData')) {
+								uni.redirectTo({
+									url: '/pages/views/saoCode/saoCode',
+								});
+							} else if (uni.getStorageSync('warningId')) {
+								uni.reLaunch({
+									url: '/pages_basics/views/earlyWarningManage/earlyWarningDetail',
+								});
+							} else if (uni.getStorageSync('manageCation')) {
+								uni.reLaunch({
+									url: '/pages_manage/views/accessQualification/accessQualificationInfo?item=' + uni.getStorageSync('manageCation')
+								})
+							} else if (uni.getStorageSync('studentCation')) {
+								uni.reLaunch({
+									url: '/pages_student/views/accessApplication/applicationDetails?item=' + uni.getStorageSync('studentCation')
+								})
+							} else if(uni.getStorageSync('recyclingReportRecord')){
+								//短信跳转-危废回收-报备
+								uni.removeStorageSync('recyclingReportRecord')
+								uni.reLaunch({
+									url: "/pages_hazardousWasteRecycling/views/recyclingReportRecord/index",
+								});
+							} else if(uni.getStorageSync('permissionApply')){
+								//短信跳转-危废回收-申请列表
+								uni.removeStorageSync('permissionApply')
+								uni.reLaunch({
+									url: "/pages_hazardousWasteRecycling/views/permissionApply/listPage",
+								});
+							} else {
+								uni.reLaunch({
+									url: '/pages/views/home/home',
+								});
+							}
+						}).catch((error) => {
+							wx.showToast({
+								title: '数据异常,请稍候再试!',
+								icon: "none",
+								duration: 3000
+							});
+						})
+					}else{
+						wx.showToast({
+							title: '非供应商,无法登录本系统.',
+							icon: "none",
+							duration: 3000
+						});
+					}
+				}
+			},
+			//获取权限字段
+			async systemAppletRolePermission() {
+				let self = this;
+				const {
+					data
+				} = await systemAppletRolePermission();
+				if (data.code == 200) {
+					uni.setStorageSync('permissions', data.data.data)
+					uni.setStorageSync('controlsRestrict', data.data.roleKeys ? data.data.roleKeys : [])
+					uni.setStorageSync('user', data.data.userInfo)
+				}
+			},
+			switchClick() {
+				if (this.identityStatus == 1) {
+					this.identityStatus = 2;
+				} else {
+					this.identityStatus = 1;
+				}
+			},
+			//查询公共配置
+			async getConfigInfo() {
+				const {
+					data
+				} = await configInfo({
+					type: '1,2,4'
+				});
+				if (data.code == 200) {
+					let list = JSON.parse(data.data)
+					let newData = {};
+					list.forEach((item) => {
+						let obj = JSON.parse(item.configValue)
+						newData = {
+							...newData,
+							...obj
+						}
+					})
+					uni.setStorageSync('circularLogo', config.base_url + newData.circularLogo)
+					uni.setStorageSync('rectangleLogo', config.base_url + newData.rectangleLogo)
+					uni.setStorageSync('videoCover', config.base_url + newData.videoCover)
+					this.$set(this, 'loginBanner', config.base_url + newData.loginBanner);
+					uni.setStorageSync('loginBanner', config.base_url + newData.loginBanner)
+					this.$set(this, 'supplierType', newData.supplier);
+					uni.setStorageSync('supplierType', newData.supplier)
+					uni.setStorageSync('homepageBanner', config.base_url + newData.homepageBanner)
+				}
+			},
+			//获取开发配置
+			async getConfigByType() {
+				const {
+					data
+				} = await getConfigByType({
+					category: 2,
+					configType: 5
+				});
+				if (data.code == 200) {
+					let obj = JSON.parse(data.data.configValue)
+					//文件预览地址
+					uni.setStorageSync('filePreviewUrl', 'https://' + obj.fileExtranetUrl)
+					//小程序视频地址
+					uni.setStorageSync('cameraExtranetAgent', 'https://' + obj.cameraExtranetAgent)
+					//MQTT地址
+					uni.setStorageSync('mqttUrl', Decrypt(obj.mqttExtranetUrl))
+					//MQTT地址-内网
+					uni.setStorageSync('mqttIntranetUrl', Decrypt(obj.mqttIntranetUrl))
+					//MQTT账号
+					uni.setStorageSync('mqttUser', Decrypt(obj.mqttExtranetUser))
+					//MQTT密码
+					uni.setStorageSync('mqttPassword', Decrypt(obj.mqttExtranetPassword))
+					//版本号
+					if(config.weChatProgramVersion === obj.weChatProgramVersion){
+						uni.setStorageSync('weChatProgramVersion', true)
+					}else{
+						uni.setStorageSync('weChatProgramVersion', false)
+					}
+					//文件浏览环境
+					uni.setStorageSync('fileBrowseEnvironment','http://'+Decrypt(obj.fileBrowseEnvironment))
+					uni.setStorageSync('fileBrowseEnvironmentExtranet','https://'+Decrypt(obj.fileBrowseEnvironmentExtranet))
+				}
+			},
+			//查询是否是管理员/安全员
+			async systemSubjectCheckIsAdminOrSafeUser(){
+				let self = this;
+				const {
+					data
+				} = await systemSubjectCheckIsAdminOrSafeUser();
+				if (data.code == 200) {
+					if(data.data.isSafe || data.data.isAdmin){
+						uni.setStorageSync('subAdmin','1');
+					}else{
+						uni.setStorageSync('subAdmin','0');
+					}
+				}
+			},
+			//查询身份
+			async securityDataStatisticsGetUserIdentity(routeUrl) {
+				let self = this;
+				const {
+					data
+				} = await securityDataStatisticsGetUserIdentity();
+				if(data.schoolAdmin){
+					//校级管理员
+					uni.setStorageSync('identityData',{
+						type:'schoolAdmin'
+					});
+				}else if(data.collegeAdmin){
+					//院级管理员
+					uni.setStorageSync('identityData',{
+						type:'collegeAdmin'
+					});
+				}else if(data.schoolGroup){
+					//校级督导组
+					uni.setStorageSync('identityData',{
+						type:'schoolGroup',
+						groupIds:data.groupIds
+					});
+				}else if(data.collegeGroup){
+					//院级督导组
+					uni.setStorageSync('identityData',{
+						type:'collegeGroup',
+						groupIds:data.groupIds
+					});
+				}else{
+					uni.removeStorageSync('identityData');
+				}
+			},
+			checkboxChange() {
+				this.checkedType = !this.checkedType;
+			},
+
+		},
+
+	}
+</script>
+
+<style lang="stylus" scoped>
+	#gasCylinderSupplierLogin {
+		height: 100%;
+		width: 100%;
+
+		background #f5f5f5;
+		position relative;
+		.login-max-big {
+			width: 750rpx;
+			height: 1177rpx;
+			z-index: 0;
+		}
+
+		.login-box {
+			z-index: 3;
+			position: absolute;
+			top: 430rpx;
+			left: 46rpx;
+			width: 658rpx;
+			height: 700rpx;
+
+			// background #fff
+			/* 切换按钮 */
+			.tabTitle {
+				display flex;
+				width: 100%;
+				height: 100rpx;
+				position: absolute;
+				// top: 50rpx;
+				justify-content: center;
+
+				.tabTitle_li {
+					width: 168rpx;
+					text-align center;
+
+					.tabTitle_text {
+						display: inline-block;
+						font-size: 32rpx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #333333;
+						line-height: 90rpx;
+
+						&.on {
+							color: #0183FA;
+						}
+					}
+
+					.tabTitle_across {
+						width: 100rpx;
+						height: 4rpx;
+						background: #0183FA;
+						border-radius: 2rpx;
+						margin-left 30rpx;
+						display none;
+
+						&.on {
+							display block;
+						}
+					}
+
+				}
+			}
+
+			border-radius:20rpx;
+
+			.input-max-box-one {
+				overflow: hidden;
+				// margin-top: 68rpx;
+
+				.input-box {
+					display flex;
+					width: 600rpx;
+					height: 80rpx;
+					border: 1rpx solid #e0e0e0;
+					border-radius: 40rpx;
+					margin: 147rpx auto 0;
+
+					img {
+						width: 28rpx;
+						height: 32rpx;
+						margin: 24rpx 31rpx;
+					}
+
+					input {
+						flex: 1;
+						font-size: 24rpx;
+						height: 80rpx;
+						line-height: 80rpx;
+						margin-right: 31rpx;
+					}
+				}
+
+				.text-box {
+					height: 59rpx;
+					line-height: 59rpx;
+					color: #DC1616;
+					font-size: 24rpx;
+					margin-left: 102rpx;
+				}
+			}
+
+			.input-max-box-two {
+				margin-top: 40rpx;
+
+				.input-box {
+					display flex;
+					width: 600rpx;
+					height: 80rpx;
+					border: 1rpx solid #e0e0e0;
+					border-radius: 40rpx;
+					margin: 0 auto 0;
+
+					img {
+						width: 30rpx;
+						height: 32rpx;
+						margin: 24rpx 30rpx;
+					}
+
+					input {
+						flex: 1;
+						font-size: 24rpx;
+						height: 80rpx;
+						line-height: 80rpx;
+						margin-right: 31rpx;
+					}
+				}
+
+				.text-box {
+					height: 59rpx;
+					line-height: 59rpx;
+					color: #DC1616;
+					font-size: 24rpx;
+					margin-left: 102rpx;
+				}
+			}
+
+			.check-box {
+				margin: 30rpx 0 30rpx 104rpx;
+				width: 300rpx;
+				height: 50rpx;
+				display: flex;
+
+				img {
+					margin-top: 10rpx;
+					width: 32rpx;
+					height: 32rpx;
+					margin-right: 10rpx;
+				}
+
+				view {
+					font-size: 24rpx;
+					line-height: 50rpx;
+				}
+			}
+
+			.button-box {
+				width: 600rpx;
+				line-height: 80rpx;
+				background: #0183FA;
+				border-radius: 40rpx;
+				font-size: 36rpx;
+				color: #fff;
+				text-align center;
+				margin: 0 auto 0;
+			}
+			.passwrod-button-box{
+				line-height:60rpx;
+				width:120rpx;
+				margin:20rpx 0 0 40rpx;
+				color:#333;
+				font-size:24rpx;
+			}
+			/* 供应商注册 */
+			.supplier {
+				display: flex;
+				justify-content: space-between;
+				margin: 30rpx 40rpx 0;
+
+				.supplier_l {
+					font-size: 24rpx;
+					font-family: PingFang SC;
+					font-weight: 400;
+					color: #333333;
+					line-height: 24rpx;
+				}
+
+				.supplier_r {
+					font-size: 24rpx;
+					font-family: PingFang SC;
+					font-weight: 400;
+					color: #333333;
+					line-height: 24rpx;
+
+					>text {
+						color: #0183FA;
+					}
+				}
+			}
+
+			/* 供应商切换 */
+			.switch_btn {
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				font-size: 24rpx;
+				font-family: PingFang SC;
+				font-weight: 400;
+				color: #0183FA;
+				line-height: 24rpx;
+				margin-top: 60rpx;
+
+				>img {
+					width: 24rpx;
+					height: 24rpx;
+					margin-left: 12rpx;
+				}
+			}
+		}
+		.loginButton{
+			position: absolute;
+			bottom:40rpx;
+			left:295rpx;
+			width:300;
+			height:80rpx;
+			line-height:80rpx;
+			text-align: center;
+			color:#0183fa;
+			font-size:28rpx;
+		}
+		.top-back {
+			z-index: 2;
+			position: absolute;
+			top: 261rpx;
+			left: 375rpx;
+			height: 296rpx;
+			width: 366rpx;
+		}
+	}
+</style>

+ 6 - 0
pages/views/login/login.vue

@@ -8,6 +8,8 @@
 		<view class="ssoButton" @click="goPage('ssoLogin')">统一身份认证登录</view>
 		<view class="accountButton" v-if="!weChatProgramVersion"
 		@click="goPage('accountLogin')">账号密码登录</view>
+		<view class="accountButton"
+		@click="goPage('gasCylinderSupplierLogin')">供应商登录</view>
 		<view class="position-top-right-box"></view>
 		<view class="position-bottom-left-box" @click="verificationButton(5)"></view>
 	</view>
@@ -51,6 +53,10 @@
 					uni.navigateTo({
 						url: '/pages/views/login/accountLogin'
 					});
+				}else if(type == 'gasCylinderSupplierLogin'){
+					uni.navigateTo({
+						url: '/pages/views/login/gasCylinderSupplierLogin'
+					});
 				}
 			},
 			//查询公共配置

+ 3 - 3
pages/views/mine/mine.vue

@@ -1,9 +1,9 @@
 <!-- 我的 -->
 <template>
 	<view id="mine">
-		<!-- <teacherMine class="flex-box-page" ref="teacherMine" v-if="userType==1"></teacherMine> -->
-		<!-- <pupilMine class="flex-box-page" ref="pupilMine" v-if="userType==2"></pupilMine> -->
-		<supplierMine class="flex-box-page" ref="supplierMine"></supplierMine>
+		<teacherMine class="flex-box-page" ref="teacherMine" v-if="userType==1"></teacherMine>
+		<pupilMine class="flex-box-page" ref="pupilMine" v-if="userType==2"></pupilMine>
+		<supplierMine class="flex-box-page" ref="supplierMine" v-if="userType=='none'"></supplierMine>
 	</view>
 </template>
 

+ 6 - 19
pages/views/supplierCylinderManagement/mine.vue

@@ -7,7 +7,7 @@
 			<view class="left-img-box">
 				<img v-if="userData.avatar" class="avatar-img" :src="baseUrl+userData.avatar">
 				<img v-else class="avatar-img" :src="imagesUrl('commonality/icon_01.png')">
-				<img class="edit-img" :src="imagesUrl('commonality/icon_wd_bj@1x.png')">
+				<!-- <img class="edit-img" :src="imagesUrl('commonality/icon_wd_bj@1x.png')"> -->
 			</view>
 			<view class="right-name-box">
 				<view class="right-name-top-box">
@@ -47,7 +47,9 @@
 		data() {
 			return {
 				baseUrl: config.base_url,
-				userData: {},
+				userData: {
+					userName:'',
+				},
 				bonusPoints: null,
 				creditScore: null,
 				faceImg:'',
@@ -57,26 +59,11 @@
 		created() {
 		},
 		mounted() {
+			this.$set(this.userData,'userName',uni.getStorageSync('supplierUserName'));
 		},
 		onShow(){
 		},
 		methods: {
-			initialize(){
-				this.systemUserProfile();
-			},
-			//获取个人信息
-			async systemUserProfile() {
-				const {
-					data
-				} = await systemUserProfile();
-				if (data.code == 200) {
-					this.$set(this, 'userData', data.data)
-					this.faceImg=data.data.faceImg;
-					this.signatureUrl=data.data.signature
-					uni.setStorageSync('faceImg', data.data.faceImg);
-					
-				}
-			},
 			//退出按钮
 			clickOut() {
 				let self = this;
@@ -166,7 +153,7 @@
 
 				.right-name-top-box {
 					display: flex;
-
+					margin-top:30rpx;
 					view:nth-child(1) {
 						height: 68rpx;
 						line-height: 62rpx;

+ 68 - 0
pages_supplierCylinderManagement/api/index.js

@@ -0,0 +1,68 @@
+import {
+	apiResquest,
+	apiResquestForm,
+	apiResquestJsonList,
+	apiResquestFormVideo,
+	apiResquestTimer
+} from '@/api/request/request.js'
+//气瓶选择分页
+export const airbottleNewQpAppletBottlePage = (data) => {
+	return apiResquest({
+		url: '/airbottle-new/qp/applet/bottle/page',
+		method: 'POST',
+		data: data,
+	})
+};
+//实验室选择分页
+export const airbottleNewQpAppletBottleSubjectsPage = (data) => {
+	return apiResquest({
+		url: '/airbottle-new/qp/applet/bottle/subjects/page',
+		method: 'POST',
+		data: data,
+	})
+};
+//气瓶详情
+export const airbottleNewQpAppletBottleDetail = (data) => {
+	return apiResquest({
+		url: '/airbottle-new/qp/applet/bottle/detail',
+		method: 'GET',
+		data: data,
+	})
+};
+//气瓶字典查询
+export const airBottleNewQpDictList = (data) => {
+	return apiResquest({
+		url: '/airbottle-new/qp/dict/list',
+		method: 'GET',
+		data: data,
+	})
+};
+
+
+/*查询用户列表-下拉列表 - 无权限
+ * userName : '', 名称
+ * userType: '',  0.系统 1.老师 2.学生
+ */
+export const systemUserSelectUser = (data) => {
+	return apiResquest({
+		url: '/system/user/dropList',
+		method: 'POST',
+		data: data,
+	})
+};
+//查询学院列表
+export const getDeptDropList = (data) => {
+	return apiResquest({
+		url: '/system/dept/dropList',
+		method: 'POST',
+		data: data,
+	})
+};
+//楼栋楼层
+export const systemBuildingGetTreeList = (data) => {
+	return apiResquest({
+		url: '/system/building/getTreeList',
+		method: 'POST',
+		data: data,
+	})
+};

+ 173 - 23
pages_supplierCylinderManagement/views/gasCylinderManagement/inbound.vue

@@ -69,7 +69,7 @@
 				</view>
 				<view class="content-max-input-box">
 					<view class="name-box">签收人</view>
-					<input class="uni-input input-box" v-model="newData.newData13" maxlength="20" placeholder="请输入" />
+					<view class="input-box" style="color:#808080;" @click='shadeButton(1)'>{{newData.newData13?newData.newData13:'请选择'}}</view>
 				</view>
 				<view class="content-max-input-box">
 					<view class="name-box">费用</view>
@@ -97,6 +97,22 @@
 			</view>
 			<view class="bottom-button-p" @click="submitButton()">确认入库</view>
 		</view>
+		<view class="shade-max-big-box" v-if="shadeType">
+			<view class="shade-big-top-box" @click="shadeButton(2)"></view>
+			<view class="shade-big-bottom-box">
+				<view class="shade-input-max-box">
+					<uni-icons type="search" class="icons-box" size="20"></uni-icons>
+					<input class="uni-input input-box" v-model="inputData" maxlength="20" placeholder="请输入" />
+					<view class="button-box" @click="searchButton()">搜索</view>
+				</view>
+				<view class="list-max-box">
+					<view @click="checkUserButton(item)"
+						v-for="(item,index) in userList" :key="index">
+					{{item.userName}}({{item.account}})
+					</view>
+				</view>
+			</view>
+		</view>
 	</view>
 </template>
 
@@ -104,6 +120,9 @@
 	import {
 		config
 	} from '@/api/request/config.js'
+	import {
+		systemUserSelectUser
+	} from '@/pages_supplierCylinderManagement/api/index.js'
 	export default {
 		data() {
 			return {
@@ -118,29 +137,40 @@
 					newData7: '',
 					newData8: '',
 					newData9: '',
+					newData91: '',
+					newData92: '',
 					newData10: '',
 					newData11: '',
 					newData12: '',
 					newData13: '',
+					newData133: '',
 					newData14: '',
 					newData15: [],
 					newData16: '',
-				}
+				},
+				inputData: '',
+				userList:[],
+				shadeType:false,
 			}
 		},
 		onLoad(options) {
-			if(options.pageType){
-				let obj = decodeURIComponent(options.form);
-				if(options.pageType == 1){
-					this.$set(this.newData,'newData1',obj.data1);
-					this.$set(this.newData,'newData2',obj.data2);
-					this.$set(this.newData,'newData3',obj.data3);
-					this.$set(this.newData,'newData4',obj.data4);
-				}else if(options.pageType == 2){
-					this.$set(this.newData,'newData5',obj.data5);
-					this.$set(this.newData,'newData6',obj.data6);
-					this.$set(this.newData,'newData7',obj.data7);
-					this.$set(this.newData,'newData8',obj.data8);
+			if (options.pageType) {
+				let obj = JSON.parse(decodeURIComponent(options.form));
+				if (options.pageType == 1) {
+					this.$set(this.newData, 'newData1', obj.id);
+					this.$set(this.newData, 'newData2', obj.bottleCode);
+					this.$set(this.newData, 'newData3', obj.gasName);
+					this.$set(this.newData, 'newData4', obj.specification);
+					this.$set(this.newData, 'newData5', obj.gasCategory);
+					this.$set(this.newData, 'newData6', obj.pressure);
+					this.$set(this.newData, 'newData7', obj.purity);
+				} else if (options.pageType == 2) {
+					this.$set(this.newData, 'newData8', obj.subId);
+					this.$set(this.newData, 'newData9', obj.subName);
+					this.$set(this.newData, 'newData92', obj.deptId);
+					this.$set(this.newData, 'newData10', obj.buildName);
+					this.$set(this.newData, 'newData11', obj.floorName);
+					this.$set(this.newData, 'newData12', obj.roomNum);
 				}
 			}
 		},
@@ -161,25 +191,25 @@
 				}
 			},
 			//提交方法
-			submitButton(){
+			submitButton() {
 				uni.showModal({
 					title: '确认入库',
 					content: '确认后,该气体气瓶的当前状态将变更为已入库。',
-					showCancel: true, 
+					showCancel: true,
 					cancelText: '关闭',
 					confirmText: '确认入库',
-					confirmColor:'#2684D8',
+					confirmColor: '#2684D8',
 					success: (res) => {
 						if (res.confirm) {
 							uni.showToast({
-								title:'入库完成',
-								icon:"success",
-								mask:true,
+								title: '入库完成',
+								icon: "success",
+								mask: true,
 								duration: 2000
 							});
-							setTimeout(function(){
+							setTimeout(function() {
 								uni.navigateBack();
-							},2000);
+							}, 2000);
 						}
 					}
 				});
@@ -197,7 +227,7 @@
 					return
 				}
 				uni.chooseImage({
-					count:1,
+					count: 1,
 					sizeType: ["original", "compressed"],
 					sourceType: ["album", "camera"],
 					success: function(res) {
@@ -255,6 +285,48 @@
 					urls: [imageUrl] // 必须包裹成数组
 				});
 			},
+			searchButton(){
+				if(this.inputData !== '' && this.inputData.length>1){
+					this.systemUserSelectUser();
+				}else{
+					uni.showToast({
+						title: '请输入至少2个字符',
+						icon: "none",
+						mask: true,
+						duration: 2000
+					});
+				}
+			},
+			//搜索用户
+			async systemUserSelectUser() {
+				const {
+					data
+				} = await systemUserSelectUser({
+					"userName": this.inputData,
+					'userType': '1'
+				});
+				if (data.code == 200) {
+					this.$set(this,'userList',data.data);
+				}
+			},
+			//选择用户
+			checkUserButton(item){
+				this.$set(this.newData,'newData13',item.userName);
+				this.$set(this.newData,'newData133',item.userId);
+				this.$set(this,'shadeType',false);
+			},
+			//遮罩层开关
+			shadeButton(type){
+				if(type == 1){
+					if(this.newData.newData13){
+						this.$set(this,'inputData',this.newData.newData13);
+						this.systemUserSelectUser();
+					}
+					this.$set(this,'shadeType',true);
+				}else if(type == 2){
+					this.$set(this,'shadeType',false);
+				}
+			}
 		}
 	}
 </script>
@@ -443,5 +515,83 @@
 				border-radius: 16rpx;
 			}
 		}
+
+		.shade-max-big-box {
+			position: absolute;
+			top: 0;
+			left: 0;
+			height: 100%;
+			width: 100%;
+			display: flex;
+			flex-direction: column;
+			overflow: hidden;
+			z-index: 10;
+			background-color: rgba(0, 0, 0, 0.2);
+
+			.shade-big-top-box {
+				flex: 1;
+			}
+
+			.shade-big-bottom-box {
+				height:800rpx;
+				background-color: #fff;
+				border-top-left-radius: 30rpx;
+				border-top-right-radius: 30rpx;
+
+				.shade-input-max-box {
+					display: flex;
+					margin: 40rpx 60rpx;
+
+					.icons-box {
+						border-top-left-radius: 30rpx;
+						border-bottom-left-radius: 30rpx;
+						width: 80rpx;
+						text-align: center;
+						height: 60rpx;
+						line-height: 60rpx;
+						background-color: #eeeeee;
+					}
+
+					.input-box {
+						flex: 1;
+						padding: 0 20rpx 0 0;
+						height: 60rpx;
+						line-height: 60rpx;
+						background-color: #eeeeee;
+						font-size: 28rpx;
+					}
+
+					.button-box {
+						background-color: #0183FA;
+						color: #fff;
+						width: 120rpx;
+						text-align: center;
+						line-height: 60rpx;
+						font-size: 28rpx;
+						border-top-right-radius: 30rpx;
+						border-bottom-right-radius: 30rpx;
+					}
+				}
+
+				.list-max-box {
+					height:660rpx;
+					overflow-y: scroll;
+					border-top: 1rpx solid #dedede;
+					view:nth-child(1){
+						border:none;
+					}
+					view{
+						font-size:28rpx;
+						padding:20rpx 40rpx;
+						line-height:60rpx;
+						border-top:1rpx solid #dedede;
+						display block;
+						overflow hidden;
+						text-overflow ellipsis;
+						white-space nowrap;
+					}
+				}
+			}
+		}
 	}
 </style>

+ 164 - 16
pages_supplierCylinderManagement/views/gasCylinderManagement/outbound.vue

@@ -81,7 +81,8 @@
 				</view>
 				<view class="content-max-input-box">
 					<view class="name-box">签出人</view>
-					<input class="uni-input input-box" v-model="newData.newData13" maxlength="20" placeholder="请输入" />
+					<view class="input-box" style="color:#808080;" @click='shadeButton(1)'>
+						{{newData.newData13?newData.newData13:'请选择'}}</view>
 				</view>
 				<view class="content-max-up-box">
 					<view class="name-box">出库单</view>
@@ -104,6 +105,21 @@
 			</view>
 			<view class="bottom-button-p" @click="submitButton()">确认出库</view>
 		</view>
+		<view class="shade-max-big-box" v-if="shadeType">
+			<view class="shade-big-top-box" @click="shadeButton(2)"></view>
+			<view class="shade-big-bottom-box">
+				<view class="shade-input-max-box">
+					<uni-icons type="search" class="icons-box" size="20"></uni-icons>
+					<input class="uni-input input-box" v-model="inputData" maxlength="20" placeholder="请输入" />
+					<view class="button-box" @click="searchButton()">搜索</view>
+				</view>
+				<view class="list-max-box">
+					<view @click="checkUserButton(item)" v-for="(item,index) in userList" :key="index">
+						{{item.userName}}({{item.account}})
+					</view>
+				</view>
+			</view>
+		</view>
 	</view>
 </template>
 
@@ -111,11 +127,14 @@
 	import {
 		config
 	} from '@/api/request/config.js'
+	import {
+		systemUserSelectUser
+	} from '@/pages_supplierCylinderManagement/api/index.js'
 	export default {
 		data() {
 			return {
 				baseUrl: config.base_url,
-				detailsType:false,
+				detailsType: false,
 				newData: {
 					newData1: '',
 					newData2: '',
@@ -130,23 +149,30 @@
 					newData11: '',
 					newData12: '',
 					newData13: '',
+					newData133: '',
 					newData14: '',
 					newData15: [],
 					newData16: '',
 					newData17: '',
 				},
 				array: ['空瓶出库', '满瓶出库'],
+				inputData: '',
+				userList:[],
+				shadeType:false,
 			}
 		},
 		onLoad(options) {
 			if (options.pageType) {
-				let obj = decodeURIComponent(options.form);
+				let obj = JSON.parse(decodeURIComponent(options.form));
 				if (options.pageType == 1) {
 					//选择气瓶
-					this.$set(this.newData, 'newData1', obj.data1);
-					this.$set(this.newData, 'newData2', obj.data2);
-					this.$set(this.newData, 'newData3', obj.data3);
-					this.$set(this.newData, 'newData4', obj.data4);
+					this.$set(this.newData, 'newData1', obj.id);
+					this.$set(this.newData, 'newData2', obj.bottleCode);
+					this.$set(this.newData, 'newData3', obj.gasName);
+					this.$set(this.newData, 'newData4', obj.specification);
+					this.$set(this.newData, 'newData4', obj.gasCategory);
+					this.$set(this.newData, 'newData4', obj.pressure);
+					this.$set(this.newData, 'newData4', obj.purity);
 				} else if (options.pageType == 2) {
 					//选择实验室
 					this.$set(this.newData, 'newData5', obj.data5);
@@ -155,7 +181,7 @@
 					this.$set(this.newData, 'newData8', obj.data8);
 				} else if (options.pageType == 3) {
 					//历史记录-气瓶出库
-					this.$set(this,'detailsType',true);
+					this.$set(this, 'detailsType', true);
 					this.$set(this.newData, 'newData1', "1");
 					this.$set(this.newData, 'newData8', "1");
 				}
@@ -189,21 +215,21 @@
 				uni.showModal({
 					title: '确认出库',
 					content: '确认后,该气体气瓶的当前状态将变更为已出库。',
-					showCancel: true, 
+					showCancel: true,
 					cancelText: '关闭',
 					confirmText: '确认出库',
-					confirmColor:'#2684D8',
+					confirmColor: '#2684D8',
 					success: (res) => {
 						if (res.confirm) {
 							uni.showToast({
-								title:'出库完成',
-								icon:"success",
-								mask:true,
+								title: '出库完成',
+								icon: "success",
+								mask: true,
 								duration: 2000
 							});
-							setTimeout(function(){
+							setTimeout(function() {
 								uni.navigateBack();
-							},2000);
+							}, 2000);
 						}
 					}
 				});
@@ -221,7 +247,7 @@
 					return
 				}
 				uni.chooseImage({
-					count:1,
+					count: 1,
 					sizeType: ["original", "compressed"],
 					sourceType: ["album", "camera"],
 					success: function(res) {
@@ -279,6 +305,48 @@
 					urls: [imageUrl] // 必须包裹成数组
 				});
 			},
+			searchButton() {
+				if (this.inputData !== '' && this.inputData.length > 1) {
+					this.systemUserSelectUser();
+				} else {
+					uni.showToast({
+						title: '请输入至少2个字符',
+						icon: "none",
+						mask: true,
+						duration: 2000
+					});
+				}
+			},
+			//搜索用户
+			async systemUserSelectUser() {
+				const {
+					data
+				} = await systemUserSelectUser({
+					"userName": this.inputData,
+					'userType': '1'
+				});
+				if (data.code == 200) {
+					this.$set(this, 'userList', data.data);
+				}
+			},
+			//选择用户
+			checkUserButton(item) {
+				this.$set(this.newData, 'newData13', item.userName);
+				this.$set(this.newData, 'newData133', item.userId);
+				this.$set(this, 'shadeType', false);
+			},
+			//遮罩层开关
+			shadeButton(type) {
+				if (type == 1) {
+					if (this.newData.newData13) {
+						this.$set(this, 'inputData', this.newData.newData13);
+						this.systemUserSelectUser();
+					}
+					this.$set(this, 'shadeType', true);
+				} else if (type == 2) {
+					this.$set(this, 'shadeType', false);
+				}
+			}
 		}
 	}
 </script>
@@ -467,5 +535,85 @@
 				border-radius: 16rpx;
 			}
 		}
+
+		.shade-max-big-box {
+			position: absolute;
+			top: 0;
+			left: 0;
+			height: 100%;
+			width: 100%;
+			display: flex;
+			flex-direction: column;
+			overflow: hidden;
+			z-index: 10;
+			background-color: rgba(0, 0, 0, 0.2);
+
+			.shade-big-top-box {
+				flex: 1;
+			}
+
+			.shade-big-bottom-box {
+				height: 800rpx;
+				background-color: #fff;
+				border-top-left-radius: 30rpx;
+				border-top-right-radius: 30rpx;
+
+				.shade-input-max-box {
+					display: flex;
+					margin: 40rpx 60rpx;
+
+					.icons-box {
+						border-top-left-radius: 30rpx;
+						border-bottom-left-radius: 30rpx;
+						width: 80rpx;
+						text-align: center;
+						height: 60rpx;
+						line-height: 60rpx;
+						background-color: #eeeeee;
+					}
+
+					.input-box {
+						flex: 1;
+						padding: 0 20rpx 0 0;
+						height: 60rpx;
+						line-height: 60rpx;
+						background-color: #eeeeee;
+						font-size: 28rpx;
+					}
+
+					.button-box {
+						background-color: #0183FA;
+						color: #fff;
+						width: 120rpx;
+						text-align: center;
+						line-height: 60rpx;
+						font-size: 28rpx;
+						border-top-right-radius: 30rpx;
+						border-bottom-right-radius: 30rpx;
+					}
+				}
+
+				.list-max-box {
+					height: 660rpx;
+					overflow-y: scroll;
+					border-top: 1rpx solid #dedede;
+
+					view:nth-child(1) {
+						border: none;
+					}
+
+					view {
+						font-size: 28rpx;
+						padding: 20rpx 40rpx;
+						line-height:60rpx;
+						border-top: 1rpx solid #dedede;
+						display block;
+						overflow hidden;
+						text-overflow ellipsis;
+						white-space nowrap;
+					}
+				}
+			}
+		}
 	}
 </style>

+ 130 - 83
pages_supplierCylinderManagement/views/gasCylinderManagement/selectCylinder.vue

@@ -6,6 +6,7 @@
 				<uni-icons type="search" class="icon-box" color="#7C7C7C" size="25"></uni-icons>
 				<input class="uni-input input-min" confirm-type="search" @confirm="getList()"
 					v-model="inputData" maxlength="20" placeholder="搜索关键字" />	
+				<view class="button-p" @click="resetButton()">重置</view>
 			</view>
 			<view class="picker-box">
 				<picker @change="bindPickerChangeA" :value="indexA" :range="arrayA">
@@ -22,41 +23,44 @@
 				</picker>
 			</view>
 		</view>
-		<view class="content-box">
+		<scroll-view scroll-y @scrolltolower="scrollGet" class="content-box">
 			<view class="null-p" v-if="!dataList[0]">暂无数据</view>
 			<view class="for-max-big-box" @click="checkButton(item)"
 			v-for="(item,index) in dataList" :key="index">
-				<view class="for-title-box" v-if="item.data7 == 1">
+				<view class="for-title-box" v-if="item.specialGases == 0">
 					<view>气瓶编码:</view>
-					<view>{{item.data1}}</view>
+					<view>{{item.bottleCode}}</view>
 				</view>
 				<view class="for-text-box">
 					<view>气体:</view>
-					<view>{{item.data2}}</view>
+					<view>{{item.gasName}}</view>
 				</view>
 				<view class="for-text-box">
 					<view>气瓶规格:</view>
-					<view>{{item.data3}}</view>
+					<view>{{item.specification}}</view>
 				</view>
 				<view class="for-text-box">
 					<view>气体类别:</view>
-					<view>{{item.data4}}</view>
+					<view>{{item.gasCategory}}</view>
 				</view>
-				<view class="for-text-box" v-if="item.data7 == 1">
+				<view class="for-text-box" v-if="item.specialGases == 0">
 					<view>压力:</view>
-					<view>{{item.data5}}</view>
+					<view>{{item.pressure}}</view>
 				</view>
 				<view class="for-text-box">
 					<view>纯度:</view>
-					<view>{{item.data6}}</view>
+					<view>{{item.purity}}</view>
 				</view>
 			</view>
-		</view>
+		</scroll-view>
 		<uni-icons class="sao-code-box" type="scan" color="#fff" size="25"></uni-icons>
 	</view>
 </template>
 
 <script>
+	import {
+		airbottleNewQpAppletBottlePage,airBottleNewQpDictList,
+	} from '@/pages_supplierCylinderManagement/api/index.js'
 	export default {
 		data() {
 			return {
@@ -66,98 +70,131 @@
 				indexA:null,
 				arrayB:[],
 				indexB:null,
-				dataList:[
-					{
-						data1:'1231315',
-						data2:'氢气',
-						data3:'8L',
-						data4:'易燃气体',
-						data5:'15Mpa',
-						data6:'99.99%',
-						data7:'1',
-					},
-					{
-						data1:'1231315',
-						data2:'氢气',
-						data3:'8L',
-						data4:'易燃气体',
-						data5:'15Mpa',
-						data6:'99.99%',
-						data7:'2',
-					},
-					{
-						data1:'1231315',
-						data2:'氢气',
-						data3:'8L',
-						data4:'易燃气体',
-						data5:'15Mpa',
-						data6:'99.99%',
-						data7:'1',
-					},
-					{
-						data1:'1231315',
-						data2:'氢气',
-						data3:'8L',
-						data4:'易燃气体',
-						data5:'15Mpa',
-						data6:'99.99%',
-						data7:'1',
-					},
-					{
-						data1:'1231315',
-						data2:'氢气',
-						data3:'8L',
-						data4:'易燃气体',
-						data5:'15Mpa',
-						data6:'99.99%',
-						data7:'2',
-					},
-					{
-						data1:'1231315',
-						data2:'氢气',
-						data3:'8L',
-						data4:'易燃气体',
-						data5:'15Mpa',
-						data6:'99.99%',
-						data7:'1',
-					},
-					{
-						data1:'1231315',
-						data2:'氢气',
-						data3:'8L',
-						data4:'易燃气体',
-						data5:'15Mpa',
-						data6:'99.99%',
-						data7:'1',
-					},
-				],
+				dataList:[],
+				// 查询参数
+				getDataType: false,
+				queryParams: {
+					page: 1,
+					pageSize: 10,
+				},
+				total:0,
 			}
 		},
 		onLoad(options) {
 			this.fromPage = options.from;
 		},
 		onShow() {
-
+			this.airBottleNewQpDictList1();
+			this.airBottleNewQpDictList2();
+			this.getList();
 		},
-
 		methods: {
 			bindPickerChangeA(e) {
 				this.indexA = e.detail.value
+				this.$set(this.queryParams,'page',1);
+				this.getList();
 			},
 			bindPickerChangeB(e) {
 				this.indexB = e.detail.value
+				this.$set(this.queryParams,'page',1);
+				this.getList();
 			},
-			getList(){
-				
+			//滚动加载事件
+			scrollGet() {
+				let self = this;
+				if (self.total / self.queryParams.pageSize <= self.queryParams.page) {
+					this.$set(this, 'getDataType', true);
+				} else {
+					this.queryParams.page += 1;
+					this.$nextTick(() => {
+						this.getList();
+					})
+				}
+			},
+			//搜索用户
+			async getList() {
+				let self = this;
+				let obj = {
+					page:this.queryParams.page,
+					pageSize:this.queryParams.pageSize,
+					searchValue:this.inputData,
+					gasName:this.indexA==null?'':this.arrayA[this.indexA],
+					gasCategory:this.indexB==null?'':this.arrayB[this.indexB],
+				};
+				const {
+					data
+				} = await airbottleNewQpAppletBottlePage(obj);
+				if (data.code == 200) {
+					if(self.queryParams.page == 1){
+						this.dataList = data.data.records;
+						this.total = data.data.total;
+						if (data.data.total / self.queryParams.pageSize <= self.queryParams.page) {
+							this.$set(this, 'getDataType', true);
+						}
+					}else{
+						this.dataList = [...this.dataList, ...data.data.records]
+						this.total = data.data.total;
+						if (data.data.total / self.queryParams.pageSize <= self.queryParams.page) {
+							this.$set(this, 'getDataType', true);
+						}
+					}
+				}
+			},
+			async airBottleNewQpDictList1() {
+				const {
+					data
+				} = await airBottleNewQpDictList({"typeCode":'gas'});
+				if (data.code == 200) {
+					let list = [];
+					for(let i=0;i<data.data.length;i++){
+						list.push(data.data[i].name);
+					}
+					this.$set(this,'arrayA',list);
+				}
+			},
+			async airBottleNewQpDictList2() {
+				const {
+					data
+				} = await airBottleNewQpDictList({"typeCode":'gas_category'});
+				if (data.code == 200) {
+					let list = [];
+					for(let i=0;i<data.data.length;i++){
+						list.push(data.data[i].name);
+					}
+					this.$set(this,'arrayB',list);
+				}
+			},
+			//重置
+			resetButton(){
+				this.$set(this,'inputData','');
+				this.$set(this,'indexA',null);
+				this.$set(this,'indexB',null);
+				this.$set(this,'dataList',[]);
+				this.$set(this,'getDataType',false);
+				this.$set(this,'queryParams',{
+					page: 1,
+					pageSize: 10,
+				});
+				this.$set(this,'total',0);
+				this.getList();
 			},
 			checkButton(item){
+				let obj = {
+					id:item.id,
+					bottleCode:item.bottleCode,
+					gasName:item.gasName,
+					specification:item.specification,
+					gasCategory:item.gasCategory,
+					pressure:item.pressure,
+					purity:item.purity,
+				}
 				if(this.fromPage == 1){
 					uni.redirectTo({
-						url: '/pages_supplierCylinderManagement/views/gasCylinderManagement/inbound?form='+encodeURIComponent(JSON.stringify(item))+'&pageType=1'
+						url: '/pages_supplierCylinderManagement/views/gasCylinderManagement/inbound?form='+encodeURIComponent(JSON.stringify(obj))+'&pageType=1'
 					});
 				}else if(this.fromPage == 2){
 					uni.redirectTo({
-						url: '/pages_supplierCylinderManagement/views/gasCylinderManagement/outbound?form='+encodeURIComponent(JSON.stringify(item))+'&pageType=1'
+						url: '/pages_supplierCylinderManagement/views/gasCylinderManagement/outbound?form='+encodeURIComponent(JSON.stringify(obj))+'&pageType=1'
 					});
 				}
 			},
@@ -178,7 +215,7 @@
 			.input-box{
 				display: flex;
 				border-radius:40rpx;
-				background-color: #D4D4D4;
+				background-color: #eeeeee;
 				margin:20rpx 20rpx 0 20rpx;
 				color:#7C7C7C;
 				.icon-box{
@@ -189,6 +226,16 @@
 					line-height:80rpx;
 					flex:1;
 				}
+				.button-p{
+					line-height:80rpx;
+					width:120rpx;
+					text-align: center;
+					color:#333;
+					font-size:28rpx;
+					background-color: #D4D4D4;
+					border-top-right-radius:40rpx;
+					border-bottom-right-radius:40rpx;
+				}
 			}
 			.picker-box{
 					display: flex;
@@ -208,7 +255,7 @@
 			display flex ;
 			flex-direction column;
 			overflow: scroll;
-			padding-bottom:200rpx;
+			padding-bottom:40rpx;
 			.null-p{
 				text-align: center;
 				line-height:300rpx;

+ 330 - 143
pages_supplierCylinderManagement/views/gasCylinderManagement/selectLab.vue

@@ -4,8 +4,9 @@
 		<view class="top-input-max-box">
 			<view class="input-box">
 				<uni-icons type="search" class="icon-box" color="#7C7C7C" size="25"></uni-icons>
-				<input class="uni-input input-min" confirm-type="search" @confirm="getList()"
-					v-model="inputData" maxlength="20" placeholder="搜索实验室" />	
+				<input class="uni-input input-min" confirm-type="search" @confirm="getList()" v-model="inputData" maxlength="20"
+					placeholder="搜索实验室" />
+				<view class="button-p" @click="resetButton()">重置</view>
 			</view>
 			<view class="picker-box">
 				<picker @change="bindPickerChangeA" :value="indexA" :range="arrayA">
@@ -14,138 +15,294 @@
 						<uni-icons type="down" class="icon-box" size="15"></uni-icons>
 					</view>
 				</picker>
-				<picker @change="bindPickerChangeB" :value="indexB" :range="arrayB">
+				<picker mode="multiSelector" @change="bindPickerChangeB" @columnchange="bindColumnChangeB" :value="multiIndexB"
+					:range="multiArrayB" range-key="name"> <!-- ⚠️ 请替换为你接口中实际用于展示的字段名 -->
+
 					<view class="picker-min-box">
-						<view>{{indexB==null?'楼栋':arrayB[indexB]}}</view>
+						<!-- 展示当前选中的 校区-楼栋-楼层 -->
+						<view v-if="multiIndexB[0]==null && multiIndexB[1]==null && multiIndexB[2]==null">请选择楼层</view>
+						<!-- <view v-else>
+							{{ multiArrayB[0][multiIndexB[0]].name }} -
+							{{ multiArrayB[1][multiIndexB[1]].name }} -
+							{{ multiArrayB[2][multiIndexB[2]].name }}
+						</view> -->
+						<view v-else>
+							{{ multiArrayB[2][multiIndexB[2]].name }}
+						</view>
 						<uni-icons type="down" class="icon-box" size="15"></uni-icons>
 					</view>
 				</picker>
-				<picker @change="bindPickerChangeC" :value="indexC" :range="arrayC">
+				<!-- <picker @change="bindPickerChangeB" :value="indexB" :range="arrayB" mode="multiSelector"
+					range-key="buildFloorVoList">
+					<view class="picker-min-box">
+						<view>{{indexB==null?'楼栋':arrayB[indexB]}}</view>
+						<uni-icons type="down" class="icon-box" size="15"></uni-icons>
+					</view>
+				</picker> -->
+				<!-- <picker @change="bindPickerChangeC" :value="indexC" :range="arrayC">
 					<view class="picker-min-box">
 						<view>{{indexC==null?'楼层':arrayC[indexC]}}</view>
 						<uni-icons type="down" class="icon-box" size="15"></uni-icons>
 					</view>
-				</picker>
+				</picker> -->
 			</view>
 		</view>
-		<view class="content-box">
+		<scroll-view scroll-y @scrolltolower="scrollGet" class="content-box">
 			<view class="null-p" v-if="!dataList[0]">暂无数据</view>
-			<view class="for-max-big-box" @click="checkButton(item)"
-			v-for="(item,index) in dataList" :key="index">
+			<view class="for-max-big-box" @click="checkButton(item)" v-for="(item,index) in dataList" :key="index">
 				<view class="for-title-box">
 					<view>实验室名称:</view>
-					<view>{{item.data1}}</view>
+					<view>{{item.subName}}</view>
 				</view>
 				<view class="for-text-box">
 					<view>楼栋:</view>
-					<view>{{item.data2}}</view>
+					<view>{{item.buildName}}</view>
 				</view>
 				<view class="for-text-box">
 					<view>楼层:</view>
-					<view>{{item.data3}}</view>
+					<view>{{item.floorName}}</view>
 				</view>
 				<view class="for-text-box">
 					<view>房间号:</view>
-					<view>{{item.data4}}</view>
+					<view>{{item.roomNum}}</view>
 				</view>
 			</view>
-		</view>
+		</scroll-view>
 		<uni-icons class="sao-code-box" type="scan" color="#fff" size="25"></uni-icons>
 	</view>
 </template>
 
 <script>
+	import {
+		getDeptDropList,
+		systemBuildingGetTreeList,
+		airbottleNewQpAppletBottleSubjectsPage,
+	} from '@/pages_supplierCylinderManagement/api/index.js'
 	export default {
 		data() {
 			return {
-				fromPage:'',
-				inputData:'',
-				arrayA:[],
-				indexA:null,
-				arrayB:[],
-				indexB:null,
-				arrayC:[],
-				indexC:null,
-				dataList:[
-					{
-						data1:'实验室A',
-						data2:'名义楼',
-						data3:'8L',
-						data4:'803',
-					},
-					{
-						data1:'实验室A',
-						data2:'名义楼',
-						data3:'8L',
-						data4:'803',
-					},
-					{
-						data1:'实验室A',
-						data2:'名义楼',
-						data3:'8L',
-						data4:'803',
-					},
-					{
-						data1:'实验室A',
-						data2:'名义楼',
-						data3:'8L',
-						data4:'803',
-					},
-					{
-						data1:'实验室A',
-						data2:'名义楼',
-						data3:'8L',
-						data4:'803',
-					},
-					{
-						data1:'实验室A',
-						data2:'名义楼',
-						data3:'8L',
-						data4:'803',
-					},
-					{
-						data1:'实验室A',
-						data2:'名义楼',
-						data3:'8L',
-						data4:'803',
-					},
-					{
-						data1:'实验室A',
-						data2:'名义楼',
-						data3:'8L',
-						data4:'803',
-					},
+				fromPage: '',
+				inputData: '',
+				listA: [],
+				arrayA: [],
+				indexA: null,
+				// 三维数组:[ [所有校区], [当前选中校区下的楼栋], [当前选中楼栋下的楼层] ]
+				multiArrayB: [
+					[],
+					[],
+					[]
 				],
+				// 当前选中的索引,初始为 null 表示未选择
+				multiIndexB: [null, null, null],
+				// 存储完整的原始树形数据
+				optionListB: [],
+				dataList: [],
+				// 查询参数
+				getDataType: false,
+				queryParams: {
+					page: 1,
+					pageSize: 10,
+				},
+				total: 0,
 			}
 		},
 		onLoad(options) {
 			this.fromPage = options.from;
 		},
 		onShow() {
-
+			this.getDeptDropList();
+			this.systemBuildingGetTreeList();
+			this.getList();
 		},
 
 		methods: {
 			bindPickerChangeA(e) {
 				this.indexA = e.detail.value
+				this.$set(this.queryParams, 'page', 1);
+				this.getList();
 			},
-			bindPickerChangeB(e) {
-				this.indexB = e.detail.value
+			//滚动加载事件
+			scrollGet() {
+				let self = this;
+				if (self.total / self.queryParams.pageSize <= self.queryParams.page) {
+					this.$set(this, 'getDataType', true);
+				} else {
+					this.queryParams.page += 1;
+					this.$nextTick(() => {
+						this.getList();
+					})
+				}
+			},
+			//搜索用户
+			async getList() {
+				let self = this;
+				let obj = {
+					page: this.queryParams.page,
+					pageSize: this.queryParams.pageSize,
+					searchValue: this.inputData,
+					deptId: this.indexA == null ? '' : this.listA[this.indexA].deptId,
+					buildId: this.multiIndexB[1] == null ? '' : this.multiArrayB[1][this.multiIndexB[1]].id,
+					floorId: this.multiIndexB[2] == null ? '' : this.multiArrayB[2][this.multiIndexB[2]].id,
+				};
+				const {
+					data
+				} = await airbottleNewQpAppletBottleSubjectsPage(obj);
+				if (data.code == 200) {
+					if (self.queryParams.page == 1) {
+						this.dataList = data.data.records;
+						this.total = data.data.total;
+						if (data.data.total / self.queryParams.pageSize <= self.queryParams.page) {
+							this.$set(this, 'getDataType', true);
+						}
+					} else {
+						this.dataList = [...this.dataList, ...data.data.records]
+						this.total = data.data.total;
+						if (data.data.total / self.queryParams.pageSize <= self.queryParams.page) {
+							this.$set(this, 'getDataType', true);
+						}
+					}
+				}
+			},
+			async getDeptDropList() {
+				const {
+					data
+				} = await getDeptDropList({
+					deptName: '',
+					level: 2,
+					deptType: 1
+				});
+				if (data.code == 200) {
+					let list = [];
+					for (let i = 0; i < data.data.length; i++) {
+						list.push(data.data[i].deptName);
+					}
+					this.$set(this, 'listA', data.data);
+					this.$set(this, 'arrayA', list);
+				}
 			},
-			bindPickerChangeC(e) {
-				this.indexC = e.detail.value
+			async systemBuildingGetTreeList() {
+				const {
+					data
+				} = await systemBuildingGetTreeList({});
+				if (data.code == 200) {
+					let list = JSON.parse(JSON.stringify(data.data));
+
+					// 执行你原有的过滤逻辑
+					this.pushNode(list);
+
+					this.optionListB = list;
+
+					// ✅ 核心:将树形结构转换为 multiSelector 需要的三维数组
+					if (list.length > 0) {
+						// 第一列:提取所有校区
+						const campuses = list.map(item => item);
+						// 第二列:默认取第一个校区下的楼栋列表
+						const buildings = list[0].buildFloorVoList || [];
+						// 第三列:默认取第一个楼栋下的楼层列表
+						const floors = (buildings.length > 0) ? buildings[0].buildFloorVoList || [] : [];
+
+						this.multiArrayB = [campuses, buildings, floors];
+						// 重置选中索引为 null,实现默认不选中
+						this.multiIndexB = [null, null, null];
+					}
+				}
 			},
-			getList(){
-				
+			// 辅助方法:你原有的树形节点过滤逻辑
+			pushNode(list) {
+				for (let i = 0; i < list.length; i++) {
+					if (list[i].type != 3 && (!list[i].buildFloorVoList || list[i].buildFloorVoList.length === 0)) {
+						list.splice(i, 1);
+						i--;
+					} else if (list[i].type == 3) {
+						delete list[i].buildFloorVoList;
+					} else {
+						this.pushNode(list[i].buildFloorVoList);
+					}
+				}
 			},
-			checkButton(item){
-				if(this.fromPage == 1){
+
+			// 2. 监听列变化(联动核心)
+			bindColumnChangeB(e) {
+				const column = e.detail.column; // 改变的列号 (0:校区, 1:楼栋, 2:楼层)
+				const value = e.detail.value; // 改变后的索引
+
+				// 更新当前列的索引
+				this.multiIndexB[column] = value;
+
+				if (column === 0) {
+					// --- 第一列(校区)变化 ---
+					// 1. 更新第二列(楼栋)的数据
+					const currentCampus = this.optionListB[value];
+					this.$set(this.multiArrayB, 1, currentCampus.buildFloorVoList || []);
+
+					// 2. 更新第三列(楼层)的数据(基于新的楼栋列表的第一个)
+					const newBuildings = this.multiArrayB[1];
+					const newFloors = (newBuildings.length > 0) ? newBuildings[0].buildFloorVoList || [] : [];
+					this.$set(this.multiArrayB, 2, newFloors);
+
+					// 3. 重置后续列的索引
+					this.multiIndexB[1] = 0;
+					this.multiIndexB[2] = 0;
+
+				} else if (column === 1) {
+					// --- 第二列(楼栋)变化 ---
+					// 1. 更新第三列(楼层)的数据
+					const currentBuilding = this.multiArrayB[1][value];
+					this.$set(this.multiArrayB, 2, currentBuilding.buildFloorVoList || []);
+
+					// 2. 重置后续列的索引
+					this.multiIndexB[2] = 0;
+				}
+				// 如果是第三列(楼层)变化,则无需更新其他列
+			},
+
+			// 3. 确认选择
+			bindPickerChangeB(e) {
+				this.multiIndexB = e.detail.value;
+
+				// 获取最终选中的完整对象
+				const selectedCampus = this.multiArrayB[0][this.multiIndexB[0]];
+				const selectedBuilding = this.multiArrayB[1][this.multiIndexB[1]];
+				const selectedFloor = this.multiArrayB[2][this.multiIndexB[2]];
+				this.$set(this.queryParams, 'page', 1);
+				this.getList();
+				// 在这里将值赋值给表单字段
+				// this.newData.campusId = selectedCampus.id;
+				// this.newData.buildingId = selectedBuilding.id;
+				// this.newData.floorId = selectedFloor.id;
+			},
+			//重置
+			resetButton() {
+				this.$set(this, 'inputData', '');
+				this.$set(this, 'indexA', null);
+				this.$set(this, 'multiIndexB', [null, null, null]);
+				this.$set(this, 'dataList', []);
+				this.$set(this, 'getDataType', false);
+				this.$set(this, 'queryParams', {
+					page: 1,
+					pageSize: 10,
+				});
+				this.$set(this, 'total', 0);
+				this.getList();
+			},
+			checkButton(item) {
+				let obj = {
+					subId:item.subId,
+					deptId:item.deptId,
+					subName:item.subName,
+					buildName:item.buildName,
+					floorName:item.floorName,
+					roomNum:item.roomNum,
+				}
+				if (this.fromPage == 1) {
 					uni.redirectTo({
-						url: '/pages_supplierCylinderManagement/views/gasCylinderManagement/inbound?form='+encodeURIComponent(JSON.stringify(item))+'&pageType=2'
+						url: '/pages_supplierCylinderManagement/views/gasCylinderManagement/inbound?form=' + encodeURIComponent(
+							JSON.stringify(obj)) + '&pageType=2'
 					});
-				}else if(this.fromPage == 2){
+				} else if (this.fromPage == 2) {
 					uni.redirectTo({
-						url: '/pages_supplierCylinderManagement/views/gasCylinderManagement/outbound?form='+encodeURIComponent(JSON.stringify(item))+'&pageType=2'
+						url: '/pages_supplierCylinderManagement/views/gasCylinderManagement/outbound?form=' + encodeURIComponent(
+							JSON.stringify(obj)) + '&pageType=2'
 					});
 				}
 			},
@@ -157,100 +314,130 @@
 	#gasCylinderSelectLab {
 		height: 100%;
 		width: 100%;
-		display flex ;
+		display flex;
 		flex-direction column;
 		overflow: hidden;
 		position: relative;
-		.top-input-max-box{
+
+		.top-input-max-box {
 			background-color: #fff;
-			.input-box{
+
+			.input-box {
 				display: flex;
-				border-radius:40rpx;
-				background-color: #D4D4D4;
-				margin:20rpx 20rpx 0 20rpx;
-				color:#7C7C7C;
-				.icon-box{
-					margin:15rpx;
+				border-radius: 40rpx;
+				background-color: #eeeeee;
+				margin: 20rpx 20rpx 0 20rpx;
+				color: #7C7C7C;
+
+				.icon-box {
+					margin: 15rpx;
+				}
+
+				.input-min {
+					height: 80rpx;
+					line-height: 80rpx;
+					flex: 1;
 				}
-				.input-min{
-					height:80rpx;
-					line-height:80rpx;
-					flex:1;
+
+				.button-p {
+					line-height: 80rpx;
+					width: 120rpx;
+					text-align: center;
+					color: #333;
+					font-size: 28rpx;
+					background-color: #D4D4D4;
+					border-top-right-radius: 40rpx;
+					border-bottom-right-radius: 40rpx;
 				}
 			}
-			.picker-box{
-					display: flex;
-				.picker-min-box{
-					height:80rpx;
-					line-height:80rpx;
+
+			.picker-box {
+				display: flex;
+
+				.picker-min-box {
+					height: 80rpx;
+					line-height: 80rpx;
 					display: flex;
-					padding:0 30rpx;
-					.icon-box{
-						margin-left:10rpx;
+					padding: 0 30rpx;
+
+					.icon-box {
+						margin-left: 10rpx;
 					}
 				}
 			}
 		}
-		.content-box{
-			flex:1;
-			display flex ;
+
+		.content-box {
+			flex: 1;
+			display flex;
 			flex-direction column;
-			overflow: scroll
-			padding-bottom:200rpx;
-			.null-p{
+			overflow: scroll;
+			padding-bottom: 40rpx;
+
+			.null-p {
 				text-align: center;
-				line-height:300rpx;
-				color:#999;
+				line-height: 300rpx;
+				color: #999;
 			}
-			.for-max-big-box{
-				padding:20rpx 30rpx;
+
+			.for-max-big-box {
+				padding: 20rpx 30rpx;
 				background-color: #fff;
-				border-radius:10rpx;
-				margin:25rpx 25rpx 0;
-				.for-title-box{
+				border-radius: 10rpx;
+				margin: 25rpx 25rpx 0;
+
+				.for-title-box {
 					display: flex;
-					margin-bottom:20rpx;
-					view{
-						padding-bottom:20rpx;
-						line-height: 60rpx
-						border-bottom:1rpx solid #dedede;
-						font-weight:700;
+					margin-bottom: 20rpx;
+
+					view {
+						padding-bottom: 20rpx;
+						line-height: 60rpx;
+						border-bottom: 1rpx solid #dedede;
+						font-weight: 700;
 					}
-					view:nth-child(1){
-						color:#666666;
+
+					view:nth-child(1) {
+						color: #666666;
 					}
-					view:nth-child(2){
-						flex:1;
+
+					view:nth-child(2) {
+						flex: 1;
 						text-align: right;
 					}
 				}
-				.for-text-box{
+
+				.for-text-box {
 					display: flex;
-					view{
-						line-height: 60rpx
-						font-weight:700;
+
+					view {
+						line-height: 60rpx;
+						font-weight: 700;
 					}
-					view:nth-child(1){
-						color:#666666;
+
+					view:nth-child(1) {
+						color: #666666;
 					}
-					view:nth-child(2){
-						flex:1;
+
+					view:nth-child(2) {
+						flex: 1;
 						text-align: right;
 					}
 				}
 			}
 		}
-		.sao-code-box{
-			width:100rpx;
-			height:100rpx;
-			line-height:100rpx;
+
+		.sao-code-box {
+			width: 100rpx;
+			height: 100rpx;
+			line-height: 100rpx;
 			text-align: center;
 			background-color: #266FFF;
-			border-radius:50%;
+			border-radius: 50%;
 			position: absolute;
-			bottom:60rpx;
-			left:50%;
-			margin-left:-50rpx;
+			bottom: 60rpx;
+			left: 50%;
+			margin-left: -50rpx;
 		}
 	}
 </style>