Commit 8b3d2ccb by qinjianhui

fix: loading 修改

parent 0e653ece
......@@ -308,7 +308,7 @@
</div>
</template>
<template #bottom>
<el-tabs v-model="tabsValue" @tab-click="tabsClick">
<el-tabs v-loading="showDetailLoading" v-model="tabsValue" @tab-click="tabsClick">
<el-tab-pane name="0" label="入库商品">
<div class="table-wrap">
<ElTable size="small" :data="detailList" height="100%" border>
......@@ -888,7 +888,7 @@ import {
} from '@/api/warehouse'
import { filePath } from '@/api/axios.ts'
import BigNumber from 'bignumber.js'
import { ref, onMounted, watch, nextTick } from 'vue'
import { ref, onMounted, watch, nextTick, computed } from 'vue'
import 'element-plus/dist/index.css'
import {
warehouseSearchForm,
......@@ -1034,6 +1034,10 @@ const tabsValue = ref<string>('0')
const singleTableRef = ref<InstanceType<typeof ElTable>>()
const currentRow = ref<InterWarehousePage | null>(null)
const logList = ref<LogListData[]>([])
const detailLoading = ref(false)
const showDetailLoading = computed(() => {
return detailLoading.value && !newDialogVisible.value
})
const rules = {
warehouseId: [{ required: true, message: '请选择仓库', trigger: 'change' }],
}
......@@ -1752,19 +1756,25 @@ const nodeClick = (data: InterWarehouseTree) => {
// total: 0,
// })
const searchDetail = async () => {
detailLoading.value = true
try {
const res = await getWarehouseInRecordDetailApi(currentRow.value?.id)
detailList.value = res.data?.productList || []
} catch (e) {
console.error(e)
} finally {
detailLoading.value = false
}
}
const getLogList = async () => {
detailLoading.value = true
try {
const res = await getInRecordLogApi(currentRow.value?.id)
logList.value = res.data
} catch (e) {
console.error(e)
} finally {
detailLoading.value = false
}
}
const locationList = ref<ILocation[]>([])
......@@ -2028,7 +2038,6 @@ $border: solid 1px #ddd;
::v-deep(.el-tree-node) {
cursor: pointer;
margin-bottom: 5px;
}
::v-deep(.el-tree-node__label) {
......
......@@ -2287,7 +2287,6 @@ $border: solid 1px #ddd;
::v-deep(.el-tree-node) {
cursor: pointer;
margin-bottom: 5px;
}
::v-deep(.el-tree-node__label) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment