Commit d1ed5c87 by wusiyi

fix: 配货区添加loading

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