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/index.vue |  213 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 213 insertions(+), 0 deletions(-)

diff --git a/pages/wareHouse/packing/index.vue b/pages/wareHouse/packing/index.vue
new file mode 100644
index 0000000..0b915b7
--- /dev/null
+++ b/pages/wareHouse/packing/index.vue
@@ -0,0 +1,213 @@
+<template>
+	<view class="wrap">
+		<view class="search">
+			<u-search v-model="keywords" placeholder="璇疯緭鍏ョ紪鍙�" @clear="search" @custom="search" @search="search">
+			</u-search>
+		</view>
+		<scroll-view class="scroll-list" scroll-y="true" @scrolltolower="loadMore">
+			<u-cell-group class="list" :border="false">
+				<view class="content" v-for="(item, index) in list" :key="item.id" :index="index" >
+					<view class="row-list">
+						<view class="_label">
+							缂栧彿:
+						</view>
+						<view class="_content">
+							{{ item.no }}
+						</view>
+					</view>
+					<view class="row-list">
+						<view class="_label">
+							鐗╂枡缂栫爜:
+						</view>
+						<view class="_content">
+							{{ item.cusMaterialCode }}
+						</view>
+					</view>
+					<view class="row-list">
+						<view class="_label">
+							鍖呰灏哄:
+						</view>
+						<view class="_content">
+							{{ item.packSize }}
+						</view>
+					</view>
+					<view class="row-list">
+						<view class="_label">
+							鍖呰:
+						</view>
+						<view class="_content">
+							{{ item.packMaterial }}
+						</view>
+					</view>
+					<view class="row-list">
+						<view class="_label">
+							鍖呰閲嶉噺:
+						</view>
+						<view class="_content">
+							{{ item.packWeight }}
+						</view>
+					</view>
+					<view class="row-list bottom-btn">
+						<view class="_label" style="flex:1;">
+							<button class="_btn" style="height: 80rpx;line-height: 80rpx;" @click="selectNo(item)">绉诲簱</button>
+						</view>
+						<view class="_content" style="flex:1;">
+							<button class="_btn" style="height: 80rpx;line-height: 80rpx;" @click="weightHandle(item)">绉伴噸</button>
+						</view>
+					</view>
+				</view>
+			</u-cell-group>
+			<view class="loadmore" @click="loadMore">
+				<u-loadmore :status="loadStatus"></u-loadmore>
+			</view>
+		</scroll-view>
+		<view class="btn-plus" @click="cardClick()">
+			<u-icon name="plus-circle-fill" size="90" color="#3d87ff"></u-icon>
+		</view>
+	</view>
+</template>
+<script>
+	export default {
+		data() {
+			return {
+				keywords: '',
+				list: [],
+				count: 0,
+				loadStatus: 'loadmore',
+				query: {
+					current: 1,
+					size: 20,
+					isConfirm:false,
+					no:"",
+					criteria:{
+						dateTimeFilters:{},
+						multiSearchFilter:{},
+						orderBy:{
+							column:'createTime',
+							direction:'desc'
+						}
+					}
+				},
+			};
+		},
+		onLoad() {
+			this.loadList();
+		},
+		onShow() {
+			if (uni.getStorageSync('refreshList') === true) {
+				uni.removeStorageSync('refreshList');
+				this.search('');
+			}
+		},
+		methods: {
+			loadList() {
+				this.$u.api.pigxPacking.fetchList(this.query).then(res => {
+					if (!res.data.records || res.data.records.length == 0) {
+						this.loadStatus = "nomore";
+						return;
+					}									
+					this.list = this.list.concat(res.data.records);
+					this.total = res.data.total;
+					this.query.current = res.data.current;
+					this.query.size = res.data.size;
+					this.loadStatus = "loadmore";
+				});
+			},			
+			loadMore() {
+				this.loadStatus = "loading";
+				setTimeout(() => {
+					this.query.current += 1;
+					this.loadList();
+				}, 100);
+			},
+			search(value) {
+				let that = this
+				that.list = [];
+				that.total = 0;
+				
+				that.query= {
+					current: 1,
+					size: 20,
+					isConfirm:false,
+					no:value,
+					criteria:{
+						dateTimeFilters:{},
+						multiSearchFilter:{},
+						orderBy:{
+							column:'createTime',
+							direction:'desc'
+						}
+					},
+				}
+				that.loadList()
+				
+			},
+			cardClick() {
+				uni.navigateTo({
+					url: '/pages/wareHouse/packing/form'
+				})
+			},
+			selectNo(e)
+			{
+				uni.navigateTo({
+					url: '/pages/wareHouse/packing/detail?item=' + encodeURIComponent(JSON.stringify(e))
+				})
+			},
+			weightHandle(item)
+			{
+				let that = this
+				that.$u.api.pigxPacking.updWeight(item).then(res => {
+					
+					setTimeout(() => {
+					  uni.showModal({
+					    title: '鎻愮ず',
+					    content: '绉伴噸鏇存柊鎴愬姛',
+					    showCancel: false,
+					    success: function () {
+					     that.loadList();
+					    }
+					  })
+					}, 200)
+					
+				})
+				
+			}
+		}
+	};
+</script>
+<style lang="scss">
+	.list .content {
+		font-size: 12px;
+		background-color: #efefef;
+		box-sizing: border-box;
+		border-radius: 14rpx;
+		margin: 8px;
+		padding: 5px 10px;
+		box-shadow: none;
+	}
+	
+	.row-list {
+		display: flex;
+		flex-direction: row;
+	}
+	
+	.row-list ._label {
+		flex: 0.8;
+		color: #909399;
+	}
+	
+	.row-list ._content {
+		flex: 1.5;
+		text-align: right;
+	}	
+
+	._btn {
+		background: #3A80F4;
+		color: #FFF;
+		margin: 0 7px;
+		justify-content: center;
+		height: 28px;
+		line-height: 28px;
+		font-size: 12px;
+	}
+</style>

--
Gitblit v1.9.3