From 3ea1ff641e1c680a5a1727fb4034797bfe65d93e Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期三, 18 三月 2026 15:29:17 +0800
Subject: [PATCH] fix: 质量、耗材物流

---
 src/pages/inventoryManagement/receiptManagement/index.vue |   70 ++++++----------------------------
 1 files changed, 13 insertions(+), 57 deletions(-)

diff --git a/src/pages/inventoryManagement/receiptManagement/index.vue b/src/pages/inventoryManagement/receiptManagement/index.vue
index 60a3ccc..e3625b6 100644
--- a/src/pages/inventoryManagement/receiptManagement/index.vue
+++ b/src/pages/inventoryManagement/receiptManagement/index.vue
@@ -2,19 +2,6 @@
   <view class="receipt-page">
     <PageHeader title="鍏ュ簱绠$悊" @back="goBack" />
 
-    <!-- 鏍囩锛氬悎鏍煎叆搴� / 涓嶅悎鏍煎叆搴� -->
-    <view class="tabs-wrap">
-      <view
-        v-for="tab in tabs"
-        :key="tab.name"
-        class="tab-item"
-        :class="{ active: activeTab === tab.name }"
-        @click="activeTab = tab.name"
-      >
-        <text>{{ tab.label }}</text>
-      </view>
-    </view>
-
     <!-- 鎼滅储鍖哄煙 -->
     <view class="search-section">
       <view class="search-row">
@@ -34,7 +21,7 @@
       </view>
     </view>
 
-    <!-- 鍒楄〃锛堝悎鏍�/涓嶅悎鏍煎叡鐢ㄦ帴鍙� type 鍖哄垎锛� -->
+    <!-- 鍒楄〃 -->
     <view class="list-section" v-if="activeTab !== 'custom'">
       <view v-if="tableData.length > 0">
         <view
@@ -73,7 +60,7 @@
 </template>
 
 <script setup>
-import { ref, reactive, toRefs, watch } from 'vue'
+import { ref, reactive, toRefs } from 'vue'
 import { onShow, onReachBottom } from '@dcloudio/uni-app'
 import PageHeader from '@/components/PageHeader.vue'
 import {
@@ -81,16 +68,11 @@
   batchDeleteStockInRecords
 } from '@/api/inventoryManagement/stockInRecord.js'
 import {
-  findAllQualifiedStockInRecordTypeOptions,
-  findAllUnQualifiedStockInRecordTypeOptions
+  findAllQualifiedStockInRecordTypeOptions
 } from '@/api/basicData/enum.js'
 
-const activeTab = ref('qualified')
 const stockRecordTypeOptions = ref([])
-const tabs = [
-  { label: '鍚堟牸鍏ュ簱', name: 'qualified', type: '0' },
-  { label: '涓嶅悎鏍煎叆搴�', name: 'unqualified', type: '1' }
-]
+const currentType = () => '0'
 
 const tableData = ref([])
 const total = ref(0)
@@ -104,18 +86,13 @@
 })
 const { searchForm } = toRefs(data)
 
-const currentType = () => tabs.find(t => t.name === activeTab.value)?.type || '0'
-
 function getRecordType(recordType) {
   if (recordType == null || recordType === '') return ''
   return stockRecordTypeOptions.value.find(item => item.value === recordType)?.label || ''
 }
 
 function fetchRecordTypeOptions() {
-  const api = currentType() === '1'
-    ? findAllUnQualifiedStockInRecordTypeOptions
-    : findAllQualifiedStockInRecordTypeOptions
-  api()
+  findAllQualifiedStockInRecordTypeOptions()
     .then(res => {
       const data = res.data != null ? res.data : res
       stockRecordTypeOptions.value = Array.isArray(data) ? data : []
@@ -126,7 +103,6 @@
 }
 
 const getList = () => {
-  if (activeTab.value === 'custom') return
   const isFirstPage = page.current === 1
   if (isFirstPage) {
     uni.showLoading({ title: '鍔犺浇涓�...', mask: true })
@@ -170,13 +146,6 @@
   getList()
 }
 
-watch(activeTab, () => {
-  page.current = 1
-  loadStatus.value = 'loadmore'
-  stockRecordTypeOptions.value = []
-  getList()
-})
-
 const handleQuery = () => {
   page.current = 1
   loadStatus.value = 'loadmore'
@@ -188,7 +157,7 @@
   try {
     uni.setStorageSync('receiptDetailItem', JSON.stringify({
       item,
-      type: currentType()
+      type: '0'
     }))
   } catch (e) {}
   uni.navigateTo({
@@ -218,7 +187,7 @@
 const goBack = () => uni.navigateBack()
 
 onShow(() => {
-  if (activeTab.value !== 'custom') getList()
+  getList()
 })
 
 onReachBottom(() => {
@@ -231,25 +200,6 @@
   min-height: 100vh;
   background: #f5f5f5;
   padding-bottom: 40rpx;
-}
-.tabs-wrap {
-  display: flex;
-  background: #fff;
-  padding: 24rpx;
-  gap: 24rpx;
-}
-.tab-item {
-  flex: 1;
-  text-align: center;
-  padding: 20rpx;
-  border-radius: 12rpx;
-  background: #f0f0f0;
-  font-size: 28rpx;
-  color: #666;
-}
-.tab-item.active {
-  background: #2979ff;
-  color: #fff;
 }
 .search-section {
   background: #fff;
@@ -340,11 +290,17 @@
   display: flex;
   justify-content: center;
   align-items: center;
+  width: 100%;
+  text-align: center;
 }
 .btn-delete {
   font-size: 28rpx;
   color: #f56c6c;
   padding: 12rpx 32rpx;
+  margin: 0 auto;
+  display: inline-flex;
+  align-items: center;
+  justify-content: center;
 }
 .no-data {
   text-align: center;

--
Gitblit v1.9.3