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

diff --git a/pages/wareHouse/inventory/index.vue b/pages/wareHouse/inventory/index.vue
new file mode 100644
index 0000000..dedccde
--- /dev/null
+++ b/pages/wareHouse/inventory/index.vue
@@ -0,0 +1,272 @@
+<template>
+	<view class="page">
+	  <view class="inventory-list-bg"/>
+	  <u-navbar title="鐩樼偣鍒楄〃" :background="background" :border-bottom="false" :title-bold="true" title-color="#000" back-icon-color="#000"/>
+	  <view class="inventory-list-search">
+	  	<u-search v-model="query.inyNo" 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="wrap">
+		<scroll-view class="inventory-list-scroll-list" scroll-y="true" @scrolltolower="loadMore">
+			<u-cell-group class="inventory-list-scroll-list-group" :border="false">
+				<view class="content" v-for="(item, index) in list" :key="index" :index="index"
+					@click="goDetail(item)">
+				    <view class="content-header">
+						<view class="content-header-left">
+							<view class="content-header-icon"></view>
+							<view class="content-header-title">鐩樼偣缂栧彿锛歿{ item.inyNo }}</view>
+						</view>
+						<view class="content-header-right">
+							{{item.inyStatus=='finished'?'宸插畬鎴�':'鑽夌'}}
+						</view>
+				    </view>
+				    <view class="content-body">
+				    	<view class="row-list">
+				    		<view class="_label">
+				    			<view class="_label-icon-1">
+				    			</view>
+				    			<view class="_label-name">鐩樼偣鎻忚堪锛�</view>	
+				    		</view>
+				    		<view class="_content">
+				    			{{ item.inyDesc||'鏃�' }}
+				    		</view>
+				    	</view>
+				    	<view class="row-list">
+				    		<view class="_label">
+				    			<view class="_label-icon-2">
+				    			</view>
+				    			<view class="_label-name">鍒� 寤� 浜猴細</view>	
+				    		</view>
+				    		<view class="_content">
+				    			{{ item.createUser }}
+				    		</view>
+				    	</view>
+				    	<view class="row-list">
+				    		<view class="_label">
+				    			<view class="_label-icon-3">
+				    			</view>
+				    			<view class="_label-name">鍒涘缓鏃堕棿锛�</view>	
+				    		</view>
+				    		<view class="_content">
+				    			{{ item.createTime }}
+				    		</view>
+				    	</view>
+				    </view>
+				</view>
+			</u-cell-group>
+			<view class="loadmore" @click="loadMore">
+				<u-loadmore :status="loadStatus"></u-loadmore>
+			</view>
+		</scroll-view>
+	</view>
+    </view>
+</template>
+<script>
+	import content_bg from '@/static/custom/inventory/locNoBg.png'
+	export default {
+		data() {
+			return {
+				background:{
+					backgroundImage: `url(${content_bg})`,
+					backgroundAttachment: 'fixed',
+					backgroundSize: '100% auto',
+					backgroundRepeat: 'no-repeat',
+				},
+				keywords: '',
+				query: {
+					current: 1,
+					size: 20,
+					criteria:JSON.stringify({
+						orderBy:{
+							column:'createTime',
+							direction:'desc'
+						}
+					})
+				},
+				list: [],
+				count: 0,
+				loadStatus: 'loading'
+			};
+		},
+		onLoad() {
+			this.loadList();
+		},
+		onShow() {
+
+		},
+		filters: {
+			inyStatus(val) {
+				let inyStatus = {
+					finished: '宸插畬鎴�',
+					draft: '鑽夌',
+				}
+				return inyStatus[val]
+			}
+		},
+		methods: {
+			loadMore() {
+				if(this.loadStatus == "nomore"){
+					return
+				}
+				this.loadStatus = "loading";
+				setTimeout(() => {
+					this.query.current += 1;
+					this.loadList();
+				}, 100);
+			},
+			loadList() {
+				this.$u.api.inventory.getMain(this.query).then(res => {
+					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";
+					if (!res.data.records || res.data.records.length < this.query.size) {
+						this.loadStatus = "nomore";
+					}
+				});
+			},
+			search(value) {
+				this.list = [];
+				this.query.current = 1;
+				this.loadList();
+			},
+			goDetail(item) {
+				if(item.inyStatus === 'finished'){
+					uni.showToast({
+						title: "鐩樼偣宸插畬鎴愩��",
+						icon: "none"
+					});
+					return
+				}
+				uni.navigateTo({
+					url: `/pages/wareHouse/inventory/detail?id=${item.id}&no=${item.inyNo}`
+				})
+			}
+		}
+	};
+</script>
+<style scoped lang="scss">
+	.inventory-list-bg{
+		background-color: #F6F9FF;
+		background-image: url('~@/static/custom/inventory/locNoBg.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;
+	}
+	
+	.inventory-list-search{
+		padding: 40rpx 30rpx 20rpx 30rpx;
+	}
+	.wrap .inventory-list-scroll-list{
+		height:calc(100vh - var(--window-top) - var(--window-bottom) - 242rpx);
+	    width:100%;
+	}
+	.inventory-list-scroll-list-group{
+		::v-deep .u-cell-item-box {
+			background-color:rgba(250,252,255,0.36) !important;
+			padding:0rpx 30rpx ;
+	    }
+		.content {
+			font-size: 12px;
+			background-color: #FFFFFF;
+			box-sizing: border-box;
+			border-radius: 10rpx;
+			margin: 0rpx 0rpx 16rpx;
+			height: 298rpx;
+			padding: 10rpx 20rpx;
+			box-shadow: none;
+			.content-header{
+				height: 90rpx;
+				display: flex;
+				align-items:center;
+				justify-content: space-between;
+				.content-header-left{
+					display: flex;
+					align-items:center;
+					.content-header-icon{
+						background-image: url('~@/static/custom/inventory/icon_5.png');
+						background-size: 100% auto;
+						background-repeat: no-repeat;
+						height:28rpx;
+						width:28rpx;
+					}
+					.content-header-title{
+						margin-left: 11rpx;
+						font-size: 28rpx;
+						font-weight: bold;
+						color: #333333;
+					}
+				}
+				.content-header-right{
+					text-align: right;
+					font-weight: bold;
+					color: #FB5B25;
+				}
+			}
+			.content-body{
+				height:184rpx;
+				background: #F5F9FF;
+				border-radius: 10rpx;
+				padding: 0rpx 23rpx;
+				.row-list {
+					height: 60rpx;
+					display: flex;
+					flex-direction: row;
+					padding: 0px;
+					align-items: center;
+				}
+				.row-list ._label {
+					display: flex;
+					flex: 0.6;
+					color: #909399;
+					align-items: center;
+					._label-icon-1{
+						background-image: url('~@/static/custom/inventory/label-icon-1.png');
+						background-size: 100% auto;
+						background-repeat: no-repeat;
+						height:26rpx;
+						width:26rpx;
+					}
+					._label-icon-2{
+						background-image: url('~@/static/custom/inventory/icon3.png');
+						background-size: 100% auto;
+						background-repeat: no-repeat;
+						height:26rpx;
+						width:26rpx;
+					}
+					._label-icon-3{
+						background-image: url('~@/static/custom/inventory/icon4.png');
+						background-size: 100% auto;
+						background-repeat: no-repeat;
+						height:26rpx;
+						width:26rpx;
+					}
+					._label-name{
+						margin-left: 11rpx;
+						font-size: 26rpx;
+						font-weight: 500;
+						color: #909399;
+						
+					}
+				}
+				
+				.row-list ._content {
+					flex: 1.5;
+					color: #666666;
+					font-size: 24rpx;
+				}
+				.row-list .s1 {
+					color:#D35651;
+				}
+			}
+		}
+	}
+</style>

--
Gitblit v1.9.3