包装新增页面

This commit is contained in:
2026-06-11 15:49:17 +08:00
parent 780814bad4
commit 5b3fc66a36
6 changed files with 239 additions and 37 deletions
+11 -7
View File
@@ -95,7 +95,6 @@ n <!-- 新增按钮 -->
<script setup>
import {
ref,
onMounted,
computed
} from 'vue'
import {
@@ -110,7 +109,8 @@ n <!-- 新增按钮 -->
import {
reqPackagingInformationList
} from '@/api/hj.js'
import {
onShow } from '@dcloudio/uni-app'
const userStore = useUserStore()
const {
currentProject
@@ -174,10 +174,14 @@ n <!-- 新增按钮 -->
hasTrainNumber: hasTrainNumber.value
})
const pageData = res.data?.getDataList || []
const pageData = res.data?.list || res.data?.getDataList || []
hasMore.value = pageData.length === pageSize
listData.value = [...listData.value, ...pageData]
if (isRefresh) {
listData.value = pageData
} else {
listData.value = [...listData.value, ...pageData]
}
} catch (error) {
console.error('加载数据失败:', error)
uni.showToast({
@@ -241,7 +245,7 @@ n <!-- 新增按钮 -->
}
// ===== 生命周期 =====
onMounted(() => {
fetchData(true)
onShow(() => {
resetAndLoad()
})
</script>