From 7c917becee71c52a97ed2c8bcd52214537f9725f Mon Sep 17 00:00:00 2001 From: liuning <807852472@qq.com> Date: Thu, 12 Mar 2026 17:40:20 +0800 Subject: [PATCH] =?UTF-8?q?=C2=96=E6=96=B0=E5=A2=9E=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=87=BA=E5=BA=93=E5=88=97=E8=A1=A8=E9=A1=B5=E9=9D=A2=20?= =?UTF-8?q?=E5=92=8C=20=E5=87=BA=E5=BA=93=E8=AF=A6=E6=83=85=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=EF=BC=8C=E5=87=BA=E5=BA=93=E5=88=97=E8=A1=A8=E5=B8=A6?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/plugin/inList.vue | 71 ++++++- pages/plugin/outDetails.vue | 338 +++++++++++++++++++++++++++++++++ pages/plugin/outList.vue | 362 ++++++++++++++++++++++++++++++++++++ 3 files changed, 768 insertions(+), 3 deletions(-) create mode 100644 pages/plugin/outDetails.vue create mode 100644 pages/plugin/outList.vue diff --git a/pages/plugin/inList.vue b/pages/plugin/inList.vue index a0b9bfe..24ea8cb 100644 --- a/pages/plugin/inList.vue +++ b/pages/plugin/inList.vue @@ -3,10 +3,23 @@ 返回入库列表 + + + + 🔍 + + + - + 📦 - 暂无入库数据 + {{searchKeyword ? '未找到匹配的入库批次' : '暂无入库数据'}} @@ -57,6 +70,7 @@ name: '', duty: '', inListData: [], + searchKeyword: '', currentPage: 1, pageSize: 20, totalItems: 0, @@ -64,14 +78,28 @@ } }, computed: { + filteredInListData() { + if (!this.searchKeyword) { + return this.inListData + } + return this.inListData.filter(item => { + return item.in_ware_batch && item.in_ware_batch.includes(this.searchKeyword) + }) + }, currentPageData() { const start = (this.currentPage - 1) * this.pageSize const end = start + this.pageSize - return this.inListData.slice(start, end) + return this.filteredInListData.slice(start, end) } }, watch: { inListData(newVal) { + this.currentPage = 1 + }, + searchKeyword() { + this.currentPage = 1 + }, + filteredInListData(newVal) { this.totalItems = newVal.length this.totalPages = Math.ceil(this.totalItems / this.pageSize) if (this.currentPage > this.totalPages && this.totalPages > 0) { @@ -122,6 +150,10 @@ } else if (direction === 'next' && this.currentPage < this.totalPages) { this.currentPage++ } + }, + // 清空搜索 + clearSearch() { + this.searchKeyword = '' } } } @@ -133,6 +165,39 @@ height: 100vh; } + /* 搜索框 */ + .search-box { + margin: 12rpx; + padding: 0 24rpx; + background-color: #fff; + border-radius: 30rpx; + display: flex; + align-items: center; + box-shadow: 0 2rpx 12rpx rgba(74, 144, 226, 0.15); + border: 1px solid #e1e8f0; + } + + .search-input { + flex: 1; + height: 70rpx; + font-size: 26rpx; + color: #333; + } + + .search-placeholder { + color: #999; + } + + .search-icon, .clear-icon { + font-size: 28rpx; + margin-left: 10rpx; + } + + .clear-icon { + color: #999; + padding: 10rpx; + } + /* 空数据容器 */ .empty-container { display: flex; diff --git a/pages/plugin/outDetails.vue b/pages/plugin/outDetails.vue new file mode 100644 index 0000000..67ff12c --- /dev/null +++ b/pages/plugin/outDetails.vue @@ -0,0 +1,338 @@ + + + + + diff --git a/pages/plugin/outList.vue b/pages/plugin/outList.vue new file mode 100644 index 0000000..5afe52a --- /dev/null +++ b/pages/plugin/outList.vue @@ -0,0 +1,362 @@ + + + + +