From f26f29d84e0a68831a6af14dab3eec5500496d2e Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期三, 28 五月 2025 16:48:52 +0800
Subject: [PATCH] 初始化项目

---
 pages/wareHouse/packing/personnelList.vue |  290 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 290 insertions(+), 0 deletions(-)

diff --git a/pages/wareHouse/packing/personnelList.vue b/pages/wareHouse/packing/personnelList.vue
new file mode 100644
index 0000000..2bc1830
--- /dev/null
+++ b/pages/wareHouse/packing/personnelList.vue
@@ -0,0 +1,290 @@
+<template>
+	<view class="page">
+		<view class="packing-personnelList-bg"/>
+				<u-navbar title="浜哄憳鍒楄〃" :background="background" :border-bottom="false" :title-bold="true" title-color="#000" back-icon-color="#000"/>
+				<view class="packing-personnelList-search">
+					<u-search v-model="keywords" shape="square" bg-color="rgba(250,252,255,0.36)" :show-action="false" placeholder="璇疯緭鍏ヤ汉鍛樺悕绉�" @clear="search" @custom="search" @search="search">
+					</u-search>
+		</view>
+		<view class="packing-personnelList-body-title">
+			<view class="title-label">妫�绱㈢粨鏋滈�夋嫨</view>
+		</view>
+	   <view class="wrap">
+		<scroll-view class="packing-personnelList-scroll-list" scroll-y="true" @scrolltolower="loadMore">
+			<u-cell-group class="packing-personnelList-scroll-list-group" :border="false">
+				<view class="content" v-for="(item, index) in list" :key="item.id" :index="index">
+					<view class="row-list" @click="switchSelected(item)">
+						<view class="row-list-item">
+							<view class="no-icon"></view>
+							<view class="no-label">浜哄憳缂栧彿锛�</view>
+							<view class="no-value">{{item.staffNo}}</view>
+						</view>
+						<view class="row-list-item">
+							<view class="name-icon"></view>
+							<view class="name-label">浜哄憳鍚嶇О锛�</view>
+							<view class="name-value">{{item.staffName}}</view>
+						</view>
+						<view :class="item.isSelected?'selected-label':'unselected-label'">
+							
+						</view>
+					</view>
+				</view>
+			</u-cell-group>
+			<view class="loadmore" @click="loadMore">
+				<u-loadmore :status="loadStatus"></u-loadmore>
+			</view>
+		</scroll-view>
+			<view class="packing-personnelList-form-footer">
+				<u-button class="btn" type="primary" @click="confirm">纭畾</u-button>
+			</view>
+	</view>
+	</view>
+</template>
+<script>
+	import content_bg from '@/static/custom/packing/backBg.png'
+	export default {
+		data() {
+			return {
+				background:{
+					backgroundImage: `url(${content_bg})`,
+					backgroundAttachment: 'fixed',
+					backgroundSize: '100% auto',
+					backgroundRepeat: 'no-repeat',
+				},
+				keywords: '',
+				alllist: [],
+				originList: [],
+				
+				query: {
+					current: 1,
+					size: 10
+				},
+				list: [],
+				count: 0,
+				loadStatus: 'loading',
+				idList:[]
+			};
+		},
+		onLoad() {
+			this.$u.api.pigxPacking.getStaff().then(res => {
+				console.log(res);
+				let resData=res.data
+				resData.forEach((item)=>{
+					item.isSelected=false
+				})
+				this.alllist = resData
+				this.originList = resData
+				this.loadList()
+			})
+		},
+		methods: {
+			change(e) {
+				this.idList = e.detail.value
+			},
+			switchSelected(item){
+				item.isSelected=!item.isSelected
+			},
+			loadMore() {
+				if(this.loadStatus == "nomore" || this.loadStatus == "loading"){
+					return
+				}
+				this.loadStatus = "loading";
+				setTimeout(() => {
+					this.query.current += 1;
+					this.loadList();
+				}, 100);
+			},
+			loadList() {
+				const data = this.originList.slice((this.query.current-1)*this.query.size,this.query.current*this.query.size)
+				this.list = this.list.concat(data);
+				this.loadStatus = "loadmore";
+				if (!data || data.length < this.query.size) {
+					this.loadStatus = "nomore";
+				}
+			},
+			search(value) {
+				this.list = [];
+				this.query.current = 1;
+				if (value) {
+					this.originList = this.alllist.filter(item => item.staffName.includes(value))
+				} else {
+					this.originList = this.alllist
+				}
+				this.loadList()
+			},
+			confirm(){
+				this.idList=[]
+				this.list.forEach((item)=>{
+					if(item.isSelected){
+						let staffInfo=item.id.toString() + ',' + item.staffName + ',' + item.staffNo
+						this.idList.push(staffInfo)
+					}
+				})
+				if(this.idList.length>0){
+					this.refreshLastPage()
+				}else{
+					this.$u.toast('璇峰厛閫夋嫨浜哄憳')
+				}
+			},
+			//鍒锋柊涓婁竴涓〉闈�
+			refreshLastPage() {
+				// 鍛婄煡 A.vue 鏇存柊鏁版嵁
+				// 鑾峰彇椤甸潰鏍�
+				let pages = getCurrentPages()
+
+				// 鑾峰彇涓婁竴椤垫爤
+				let prevPage = pages[pages.length - 2]
+
+				// 瑙﹀彂涓婁竴椤� upData 鍑芥暟(骞舵惡甯﹀弬鏁�)
+				prevPage.$vm.setNo(this.idList)
+
+				// 杩斿洖涓婁竴椤�
+				uni.navigateBack({
+					delta: 1
+				})
+			},
+		}
+	};
+</script>
+<style lang="scss">
+	.packing-personnelList-bg{
+		background-color: #F6F9FF;
+		background-image: url('~@/static/custom/packing/backBg.png');
+		// background: linear-gradient(180deg,rgba(206,227,254,1),rgba(206,227,254,1) 20%,rgba(206,227,254,0.5) 40%,rgba(206,227,254,0.25) 60%,rgba(206,227,254,0.08) 80%,rgba(206,227,254,0));
+		padding: 0 20rpx;
+		background-attachment: fixed;
+		background-size: 100% auto;
+		background-repeat: no-repeat;
+		position: fixed;
+		top: 0;
+		bottom: 0;
+		width: 100%;
+		z-index: -1;
+	}
+	
+	.packing-personnelList-search{
+		padding: 40rpx 30rpx 20rpx 30rpx;
+	}
+	
+	.packing-personnelList-body-title{
+		padding: 0rpx 30rpx 0rpx 30rpx;
+		margin-top: 20rpx;
+		margin-bottom: 26rpx;
+		.title-label{
+			font-size: 28rpx;
+			color: #6D82A1;
+		}
+	}
+	
+	.wrap .packing-personnelList-scroll-list{
+		height:calc(100vh - var(--window-top) - var(--window-bottom) - 446rpx);
+	    width:100%;
+	}
+	.packing-personnelList-scroll-list-group{
+		::v-deep .u-cell-item-box {
+			background-color:rgba(250,252,255,0.36) !important;
+			padding:0rpx 30rpx ;
+			display: flex;
+			justify-content: space-between;
+			flex-wrap:wrap;
+	    }
+		.content {
+			background-image: url('~@/static/custom/packing/person_row_bg.png');
+			background-size: 100% auto;
+			background-repeat: no-repeat;
+			height:138rpx;
+			width:336rpx;
+			font-size: 12px;
+			background-color: #FFFFFF;
+			box-sizing: border-box;
+			border-radius: 10rpx;
+			margin: 0rpx 0rpx 20rpx;
+			padding: 0rpx 16rpx 0rpx 16rpx;
+			box-shadow: none;
+			.row-list{
+				height: 100%;
+				padding-top: 30rpx;
+				padding-bottom: 24rpx;
+				display: flex;
+				flex-direction:column;
+				justify-content: space-between;
+				position: relative;
+				.row-list-item{
+					display: flex;
+					align-items: center;
+					.no-icon{
+						background-image: url('~@/static/custom/packing/icon_1.png');
+						background-size: 100% auto;
+						background-repeat: no-repeat;
+						height:26rpx;
+						width:26rpx;
+					}
+					.no-label{
+						margin-left:4rpx;
+						color: #666666;
+						font-size: 26rpx;
+					}
+					.no-value{
+						color: #333333;
+						font-size: 26rpx;
+					}
+					.name-icon{
+						background-image: url('~@/static/custom/packing/icon_2.png');
+						background-size: 100% auto;
+						background-repeat: no-repeat;
+						height:26rpx;
+						width:26rpx;
+					}
+					.name-label{
+						margin-left:4rpx;
+						color: #666666;
+						font-size: 26rpx;
+					}
+					.name-value{
+						color: #333333;
+						font-size: 26rpx;
+					}
+				}
+				.selected-label{
+					position:absolute;
+					bottom: 12rpx;
+					right: 2rpx;
+					background-image: url('~@/static/custom/packing/click-selected.png');
+					background-size: 100% auto;
+					background-repeat: no-repeat;
+					height:28rpx;
+					width:26rpx;
+				}
+				.unselected-label{
+					position:absolute;
+					bottom: 12rpx;
+					right: 2rpx;
+					background-image: url('~@/static/custom/packing/click-unselected.png');
+					background-size: 100% auto;
+					background-repeat: no-repeat;
+					height:28rpx;
+					width:26rpx;
+				}
+			}
+		}
+	}
+	
+	.packing-personnelList-form-footer{
+		display: flex;
+		margin-top: 10rpx;
+		margin-bottom: 10rpx;
+		margin-left: 20rpx;
+		margin-right: 20rpx;
+		padding-bottom: 14rpx;
+		.btn {
+		  flex: 1;
+		  margin: 10rpx;
+		  background: #214DED;
+		  box-shadow: 0rpx 6rpx 8rpx 0rpx rgba(4,49,212,0.3);
+		  font-weight: bold;
+		  color: #FEFEFE;
+		  font-family: PingFang SC;
+		}
+	}
+	
+</style>

--
Gitblit v1.9.3