Commit 8b3d2ccb by qinjianhui

fix: loading 修改

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