From a1131357b9e38c86e734816bae42d2fafcd48222 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期一, 23 三月 2026 11:01:41 +0800
Subject: [PATCH] fix: 客户3.22提出的修改需求
---
src/pages/inventoryManagement/dispatchLog/index.vue | 66 +++------------------------------
1 files changed, 6 insertions(+), 60 deletions(-)
diff --git a/src/pages/inventoryManagement/dispatchLog/index.vue b/src/pages/inventoryManagement/dispatchLog/index.vue
index 1ab16fe..5c37172 100644
--- a/src/pages/inventoryManagement/dispatchLog/index.vue
+++ b/src/pages/inventoryManagement/dispatchLog/index.vue
@@ -2,19 +2,6 @@
<view class="dispatch-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">
@@ -54,13 +41,8 @@
<view class="row"><text class="l">瑙勬牸鍨嬪彿</text><text class="r">{{ item.model }}</text></view>
<view class="row"><text class="l">鍗曚綅</text><text class="r">{{ item.unit }}</text></view>
<view class="row"><text class="l">鍑哄簱鏁伴噺</text><text class="r highlight">{{ item.stockOutNum }}</text></view>
- <view class="row"><text class="l">鍑哄簱浜�</text><text class="r">{{ item.createBy }}</text></view>
+ <view class="row"><text class="l">閲囪喘鍛�</text><text class="r">{{ item.purchaser || item.createBy }}</text></view>
<view class="row" v-if="item.recordType !== undefined"><text class="l">鏉ユ簮</text><text class="r">{{ getRecordType(item.recordType) || item.recordType }}</text></view>
- <view class="row"><text class="l">姣涢噸(鍚�)</text><text class="r">{{ item.grossWeight ?? '-' }}</text></view>
- <view class="row"><text class="l">鐨噸(鍚�)</text><text class="r">{{ item.tareWeight ?? '-' }}</text></view>
- <view class="row"><text class="l">鍑�閲�(鍚�)</text><text class="r">{{ item.netWeight ?? '-' }}</text></view>
- <view class="row"><text class="l">杩囩鏃ユ湡</text><text class="r">{{ item.weighingDate || '-' }}</text></view>
- <view class="row"><text class="l">杩囩鍛�</text><text class="r">{{ item.weighingOperator || '-' }}</text></view>
</view>
</view>
<view class="card-actions">
@@ -78,21 +60,16 @@
</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 { getStockOutPage, delStockOut } from '@/api/inventoryManagement/stockOutRecord.js'
import {
- findAllQualifiedStockOutRecordTypeOptions,
- findAllUnQualifiedStockOutRecordTypeOptions
+ findAllQualifiedStockOutRecordTypeOptions
} 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)
const loadStatus = ref('loadmore')
@@ -104,18 +81,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'
- ? findAllUnQualifiedStockOutRecordTypeOptions
- : findAllQualifiedStockOutRecordTypeOptions
- api()
+ findAllQualifiedStockOutRecordTypeOptions()
.then(res => {
const list = res.data != null ? res.data : res
stockRecordTypeOptions.value = Array.isArray(list) ? list : []
@@ -168,13 +140,6 @@
getList()
}
-watch(activeTab, () => {
- page.current = 1
- loadStatus.value = 'loadmore'
- stockRecordTypeOptions.value = []
- getList()
-})
-
const handleQuery = () => {
page.current = 1
loadStatus.value = 'loadmore'
@@ -186,7 +151,7 @@
try {
uni.setStorageSync('dispatchDetailItem', JSON.stringify({
item,
- type: currentType()
+ type: '0'
}))
} catch (e) {}
uni.navigateTo({
@@ -224,25 +189,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;
--
Gitblit v1.9.3