Commit d1ed5c87 by wusiyi

fix: 配货区添加loading

parent 6e20223c
...@@ -303,6 +303,7 @@ export interface SortingList { ...@@ -303,6 +303,7 @@ export interface SortingList {
warehouseId: number warehouseId: number
warehouseName: string warehouseName: string
autoPrint: boolean autoPrint: boolean
defaultWarehouse: 0 | 1
} }
// 配货分拣 详情 // 配货分拣 详情
......
<template> <template>
<div class="page card h-100 flex-gap-10 overflow-hidden flex"> <div
v-loading="loading"
class="page card h-100 flex-gap-10 overflow-hidden flex"
>
<div class="search-form flex flex-column w-100 flex-1 overflow-hidden"> <div class="search-form flex flex-column w-100 flex-1 overflow-hidden">
<el-form :model="searchForm" inline> <el-form :model="searchForm" inline>
<el-form-item label="仓库"> <el-form-item label="仓库">
...@@ -171,7 +174,7 @@ const editData = ref<SortingRuleDetail>() ...@@ -171,7 +174,7 @@ const editData = ref<SortingRuleDetail>()
const addAreaDialogVisible = ref(false) const addAreaDialogVisible = ref(false)
const logVisible = ref(false) const logVisible = ref(false)
const logList = ref<LogListData[]>([]) const logList = ref<LogListData[]>([])
const loading = ref(false)
const searchForm = ref({ const searchForm = ref({
warehouseId: 0, warehouseId: 0,
warehouseName: '', warehouseName: '',
...@@ -231,11 +234,13 @@ const updateConfig = async () => { ...@@ -231,11 +234,13 @@ const updateConfig = async () => {
// 查询列表 // 查询列表
const getSortingRuleList = async () => { const getSortingRuleList = async () => {
loading.value = true
const res = await getSortingRuleListApi({ const res = await getSortingRuleListApi({
warehouseId: searchForm.value.warehouseId, warehouseId: searchForm.value.warehouseId,
}) })
if (res.code !== 200) return if (res.code !== 200) return
sortingList.value = res.data.records sortingList.value = res.data.records
loading.value = false
} }
// 新增/编辑 // 新增/编辑
...@@ -260,6 +265,7 @@ const addArea = async (row?: SortingList) => { ...@@ -260,6 +265,7 @@ const addArea = async (row?: SortingList) => {
// 删除配货区 // 删除配货区
const deleteArea = async (id: number) => { const deleteArea = async (id: number) => {
loading.value = true
await ElMessageBox.confirm('确定要删除吗?', '提示', { await ElMessageBox.confirm('确定要删除吗?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
...@@ -270,6 +276,7 @@ const deleteArea = async (id: number) => { ...@@ -270,6 +276,7 @@ const deleteArea = async (id: number) => {
ElMessage.success('删除成功') ElMessage.success('删除成功')
await getSortingRuleList() await getSortingRuleList()
}) })
loading.value = false
} }
// 查看日志 // 查看日志
......
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