HuRongxin il y a 1 mois
Parent
commit
f11784a72c

+ 63 - 0
src/api/warehouse/storageLocation/index.ts

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { StorageLocationVO, StorageLocationForm, StorageLocationQuery } from '@/api/warehouse/storageLocation/types';
+
+/**
+ * 查询库位管理列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listLocation = (query?: StorageLocationQuery): AxiosPromise<StorageLocationVO[]> => {
+  return request({
+    url: '/warehouse/storageLocation/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询库位管理详细
+ * @param id
+ */
+export const getLocation = (id: string | number): AxiosPromise<StorageLocationVO> => {
+  return request({
+    url: '/warehouse/storageLocation/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增库位管理
+ * @param data
+ */
+export const addLocation = (data: StorageLocationForm) => {
+  return request({
+    url: '/warehouse/storageLocation',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改库位管理
+ * @param data
+ */
+export const updateLocation = (data: StorageLocationForm) => {
+  return request({
+    url: '/warehouse/storageLocation',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除库位管理
+ * @param id
+ */
+export const delLocation = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/warehouse/storageLocation/' + id,
+    method: 'delete'
+  });
+};

+ 56 - 0
src/api/warehouse/storageLocation/types.ts

@@ -0,0 +1,56 @@
+export interface StorageLocationVO {
+  /**
+   * 
+   */
+  id: string | number;
+
+  /**
+   * 库位名称
+   */
+  storageName: string;
+
+  /**
+   * 库位描述
+   */
+  description: string;
+
+}
+
+export interface StorageLocationForm extends BaseEntity {
+  /**
+   * 
+   */
+  id?: string | number;
+
+  /**
+   * 库位名称
+   */
+  storageName?: string;
+
+  /**
+   * 库位描述
+   */
+  description?: string;
+
+}
+
+export interface StorageLocationQuery extends PageQuery {
+
+  /**
+   * 库位名称
+   */
+  storageName?: string;
+
+  /**
+   * 库位描述
+   */
+  description?: string;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+
+
+

+ 24 - 12
src/views/warehouse/productManufacturer/index.vue

@@ -21,16 +21,16 @@
             <template #header>
                 <el-row :gutter="10" class="mb8">
                     <el-col :span="1.5">
-                        <el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:manufacturer:add']">新增生产厂商</el-button>
+                        <el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['warehouse:productManufacturer:add']">新增生产厂商</el-button>
                     </el-col>
                     <!-- <el-col :span="1.5">
-                        <el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['system:manufacturer:edit']">修改</el-button>
+                        <el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['warehouse:productManufacturer:edit']">修改</el-button>
                     </el-col>
                     <el-col :span="1.5">
-                        <el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:manufacturer:remove']">删除</el-button>
+                        <el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['warehouse:productManufacturer:remove']">删除</el-button>
                     </el-col>
                     <el-col :span="1.5">
-                        <el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['system:manufacturer:export']">导出</el-button>
+                        <el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['warehouse:productManufacturer:export']">导出</el-button>
                     </el-col> -->
                     <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
                 </el-row>
@@ -39,19 +39,31 @@
             <el-table v-loading="loading" border :data="manufacturerList" @selection-change="handleSelectionChange">
                 <el-table-column type="selection" width="55" align="center" />
                 <el-table-column label="生产厂商" align="center" prop="name" />
-                <el-table-column label="联系人名称" align="center" prop="contactName" />
-                <el-table-column label="联系人电话" align="center" prop="contactPhone" />
-                <el-table-column label="联系人地址" align="center" prop="address" />
+                <el-table-column label="联系人名称" align="center" prop="contactName">
+                    <template #default="scope">
+                        <span>{{ scope.row.contactName||'--'  }}</span>
+                    </template>
+                </el-table-column>
+                <el-table-column label="联系人电话" align="center" prop="contactPhone">
+                    <template #default="scope">
+                        <span>{{ scope.row.contactPhone||'--'  }}</span>
+                    </template>
+                </el-table-column>
+                <el-table-column label="联系人地址" align="center" prop="address">
+                    <template #default="scope">
+                        <span>{{ scope.row.address||'--'  }}</span>
+                    </template>
+                </el-table-column>
                 <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
                     <template #default="scope">
                         <el-tooltip content="编辑" placement="top">
-                            <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:manufacturer:edit']">编辑</el-button>
+                            <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['warehouse:productManufacturer:edit']">编辑</el-button>
                         </el-tooltip>
                         <el-tooltip content="详情" placement="top">
-                            <el-button link type="primary" icon="View" @click="handleDetail(scope.row)" v-hasPermi="['system:manufacturer:query']">详情</el-button>
+                            <el-button link type="primary" icon="View" @click="handleDetail(scope.row)" v-hasPermi="['warehouse:productManufacturer:query']">详情</el-button>
                         </el-tooltip>
                         <el-tooltip content="删除" placement="top">
-                            <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:manufacturer:remove']">删除</el-button>
+                            <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['warehouse:productManufacturer:remove']">删除</el-button>
                         </el-tooltip>
                     </template>
                 </el-table-column>
@@ -124,8 +136,8 @@
                 </div>
             </div>
             <template #footer>
-                <div class="dialog-footer">
-                    <el-button @click="detailDialog.visible = false">关闭</el-button>
+                <div class="dialog-footer" style="text-align: center">
+                    <el-button size="large" @click="detailDialog.visible = false">关闭</el-button>
                 </div>
             </template>
         </el-dialog>

+ 62 - 47
src/views/warehouse/productSupplier/index.vue

@@ -21,7 +21,7 @@
             <template #header>
                 <el-row :gutter="10" class="mb8">
                     <el-col :span="1.5">
-                        <el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:supplier:add']">新增供应商</el-button>
+                        <el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['warehouse:productSupplier:add']">新增供应商</el-button>
                     </el-col>
                     <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
                 </el-row>
@@ -30,19 +30,31 @@
             <el-table v-loading="loading" border :data="supplierList" @selection-change="handleSelectionChange">
                 <el-table-column type="selection" width="55" align="center" />
                 <el-table-column label="供应商" align="center" prop="name" />
-                <el-table-column label="联系人名称" align="center" prop="contactName" />
-                <el-table-column label="联系人电话" align="center" prop="contactPhone" />
-                <el-table-column label="联系人地址" align="center" prop="address" />
+                <el-table-column label="联系人名称" align="center" prop="contactName">
+                    <template #default="scope">
+                        <span>{{ scope.row.contactName||'--'  }}</span>
+                    </template>
+                </el-table-column>
+                <el-table-column label="联系人电话" align="center" prop="contactPhone">
+                    <template #default="scope">
+                        <span>{{ scope.row.contactPhone||'--'  }}</span>
+                    </template>
+                </el-table-column>
+                <el-table-column label="联系人地址" align="center" prop="address">
+                    <template #default="scope">
+                        <span>{{ scope.row.address||'--'  }}</span>
+                    </template>
+                </el-table-column>
                 <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
                     <template #default="scope">
                         <el-tooltip content="编辑" placement="top">
-                            <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:supplier:edit']">编辑</el-button>
+                            <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['warehouse:productSupplier:edit']">编辑</el-button>
                         </el-tooltip>
                         <el-tooltip content="详情" placement="top">
-                            <el-button link type="primary" icon="View" @click="handleDetail(scope.row)" v-hasPermi="['system:supplier:query']">详情</el-button>
+                            <el-button link type="primary" icon="View" @click="handleDetail(scope.row)" v-hasPermi="['warehouse:productSupplier:query']">详情</el-button>
                         </el-tooltip>
                         <el-tooltip content="删除" placement="top">
-                            <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:supplier:remove']">删除</el-button>
+                            <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['warehouse:productSupplier:remove']">删除</el-button>
                         </el-tooltip>
                     </template>
                 </el-table-column>
@@ -115,8 +127,8 @@
                 </div>
             </div>
             <template #footer>
-                <div class="dialog-footer">
-                    <el-button @click="detailDialog.visible = false">关闭</el-button>
+                <div class="dialog-footer" style="text-align: center">
+                    <el-button size="large" @click="detailDialog.visible = false">关闭</el-button>
                 </div>
             </template>
         </el-dialog>
@@ -131,43 +143,45 @@
 
     interface DialogOption {
         visible: boolean;
-        title?: string;
+        title ? : string;
     }
 
-    interface PageData<T, Q> {
+    interface PageData < T, Q > {
         form: T;
         queryParams: {
             pageNum: number;
             pageSize: number;
-            params: Record<string, any>;
+            params: Record < string,
+            any > ;
         } & Q;
-        rules?: Record<string, any[]>;
+        rules ? : Record < string,
+        any[] > ;
     }
 
     const { proxy } = getCurrentInstance() as ComponentInternalInstance;
 
-    const supplierList = ref<SupplierVO[]>([]);
+    const supplierList = ref < SupplierVO[] > ([]);
     const buttonLoading = ref(false);
     const loading = ref(true);
     const showSearch = ref(true);
-    const ids = ref<Array<string | number>>([]);
+    const ids = ref < Array < string | number >> ([]);
     const single = ref(true);
     const multiple = ref(true);
     const total = ref(0);
 
-    const queryFormRef = ref<FormInstance>();
-    const supplierFormRef = ref<FormInstance>();
+    const queryFormRef = ref < FormInstance > ();
+    const supplierFormRef = ref < FormInstance > ();
 
-    const dialog = reactive<DialogOption>({
+    const dialog = reactive < DialogOption > ({
         visible: false,
         title: ''
     });
 
-    const detailDialog = reactive<DialogOption>({
+    const detailDialog = reactive < DialogOption > ({
         visible: false
     });
 
-    const detailForm = reactive<SupplierForm>({
+    const detailForm = reactive < SupplierForm > ({
         id: undefined,
         name: undefined,
         contactName: undefined,
@@ -184,20 +198,21 @@
         address: undefined,
         description: undefined,
     }
-    const data = reactive<PageData<SupplierForm, SupplierQuery>>({
-        form: { ...initFormData },
-        queryParams: {
-            pageNum: 1,
-            pageSize: 10,
-            name: undefined,
-            params: {}
-        },
-        rules: {
-            name: [
-                { required: true, message: "供应商不能为空", trigger: "blur" }
-            ],
-        }
-    });
+    const data = reactive < PageData < SupplierForm,
+        SupplierQuery >> ({
+            form: { ...initFormData },
+            queryParams: {
+                pageNum: 1,
+                pageSize: 10,
+                name: undefined,
+                params: {}
+            },
+            rules: {
+                name: [
+                    { required: true, message: "供应商不能为空", trigger: "blur" }
+                ],
+            }
+        });
 
     const { queryParams, form, rules } = toRefs(data);
 
@@ -219,7 +234,7 @@
     /** 表单重置 */
     const reset = () => {
         form.value = { ...initFormData };
-        supplierFormRef.value?.resetFields();
+        supplierFormRef.value ?.resetFields();
     }
 
     /** 搜索按钮操作 */
@@ -230,7 +245,7 @@
 
     /** 重置按钮操作 */
     const resetQuery = () => {
-        queryFormRef.value?.resetFields();
+        queryFormRef.value ?.resetFields();
         handleQuery();
     }
 
@@ -249,9 +264,9 @@
     }
 
     /** 修改按钮操作 */
-    const handleUpdate = async (row?: SupplierVO) => {
+    const handleUpdate = async (row ? : SupplierVO) => {
         reset();
-        const _id = row?.id || ids.value[0]
+        const _id = row ?.id || ids.value[0]
         const res = await getSupplier(_id);
         Object.assign(form.value, res.data);
         dialog.visible = true;
@@ -264,13 +279,13 @@
             Object.assign(detailForm, res.data);
             detailDialog.visible = true;
         } catch (error) {
-            proxy?.$modal.msgError("获取详情失败");
+            proxy ?.$modal.msgError("获取详情失败");
         }
     };
 
     /** 提交按钮 */
     const submitForm = () => {
-        supplierFormRef.value?.validate(async (valid: boolean) => {
+        supplierFormRef.value ?.validate(async (valid: boolean) => {
             if (valid) {
                 buttonLoading.value = true;
                 if (form.value.id) {
@@ -278,7 +293,7 @@
                 } else {
                     await addSupplier(form.value).finally(() => buttonLoading.value = false);
                 }
-                proxy?.$modal.msgSuccess("操作成功");
+                proxy ?.$modal.msgSuccess("操作成功");
                 dialog.visible = false;
                 await getList();
             }
@@ -286,17 +301,17 @@
     }
 
     /** 删除按钮操作 */
-    const handleDelete = async (row?: SupplierVO) => {
-        const _ids = row?.id || ids.value;
-        await proxy?.$modal.confirm('是否确认删除供应商编号为"' + _ids + '"的数据项?').finally(() => loading.value = false);
+    const handleDelete = async (row ? : SupplierVO) => {
+        const _ids = row ?.id || ids.value;
+        await proxy ?.$modal.confirm('是否确认删除供应商编号为"' + _ids + '"的数据项?').finally(() => loading.value = false);
         await delSupplier(_ids);
-        proxy?.$modal.msgSuccess("删除成功");
+        proxy ?.$modal.msgSuccess("删除成功");
         await getList();
     }
 
     /** 导出按钮操作 */
     const handleExport = () => {
-        proxy?.download('warehouse/productSupplier/export', {
+        proxy ?.download('warehouse/productSupplier/export', {
             ...queryParams.value
         }, `supplier_${new Date().getTime()}.xlsx`)
     }
@@ -368,4 +383,4 @@
         border-top: 1px solid #dcdfe6;
         padding: 12px 20px;
     }
-</style>
+</style>

+ 295 - 0
src/views/warehouse/storageLocation/index.vue

@@ -0,0 +1,295 @@
+<template>
+    <div class="p-2">
+        <transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
+            <div v-show="showSearch" class="mb-[10px]">
+                <el-card shadow="hover">
+                    <el-form ref="queryFormRef" :model="queryParams" :inline="true" label-width="120px">
+                        <el-form-item label="库位名称" prop="storageName">
+                            <el-input v-model="queryParams.storageName" placeholder="请输入" clearable @keyup.enter="handleQuery" />
+                        </el-form-item>
+                        <el-form-item>
+                            <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
+                            <el-button icon="Refresh" @click="resetQuery">重置</el-button>
+                        </el-form-item>
+                    </el-form>
+                </el-card>
+            </div>
+        </transition>
+
+        <el-card shadow="never">
+            <template #header>
+                <el-row :gutter="10" class="mb8">
+                    <el-col :span="1.5">
+                        <el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['warehouse:storageLocation:add']">新增库位</el-button>
+                    </el-col>
+                    <!-- <el-col :span="1.5">
+            <el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['warehouse:storageLocation:edit']">修改</el-button>
+          </el-col>
+          <el-col :span="1.5">
+            <el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['warehouse:storageLocation:remove']">删除</el-button>
+          </el-col>
+          <el-col :span="1.5">
+            <el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['warehouse:storageLocation:export']">导出</el-button>
+          </el-col> -->
+                    <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
+                </el-row>
+            </template>
+
+            <el-table v-loading="loading" border :data="locationList" @selection-change="handleSelectionChange">
+                <!-- <el-table-column type="selection" width="55" align="center" /> -->
+                <el-table-column label="库位名称" align="left" prop="storageName" />
+                <el-table-column label="库位描述" align="left" prop="description">
+                    <template #defult="scope">
+                        <span>{{ scope.row.description||'--'  }}</span>
+                    </template>
+                </el-table-column>
+                <el-table-column label="操作" align="center" width="350px" class-name="small-padding fixed-width">
+                    <template #default="scope">
+                        <el-tooltip content="编辑" placement="top">
+                            <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['warehouse:storageLocation:edit']">编辑</el-button>
+                        </el-tooltip>
+                        <el-tooltip content="详情" placement="top">
+                            <el-button link type="primary" icon="View" @click="handleDetail(scope.row)" v-hasPermi="['warehouse:storageLocation:edit']">详情</el-button>
+                        </el-tooltip>
+
+                    </template>
+                </el-table-column>
+            </el-table>
+
+            <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
+        </el-card>
+        <!-- 添加或修改库位管理对话框 -->
+        <el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
+            <el-form ref="locationFormRef" :model="form" :rules="rules" label-width="80px">
+                <el-form-item label="库位名称" prop="storageName">
+                    <el-input v-model="form.storageName" placeholder="请输入库位名称" />
+                </el-form-item>
+                <el-form-item label="库位描述" prop="description">
+                    <el-input type="textarea" :rows="3" v-model="form.description" placeholder="请输入库位描述" />
+                </el-form-item>
+            </el-form>
+            <template #footer>
+                <div class="dialog-footer">
+                    <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
+                    <el-button @click="cancel">取 消</el-button>
+                </div>
+            </template>
+        </el-dialog>
+        <!-- 详情对话框 -->
+        <el-dialog title="详情" v-model="detailDialog.visible" width="23%" :close-on-click-modal="false" append-to-body>
+            <div class="detail-container">
+                <div class="detail-row">
+                    <div class="detail-label">库位名称</div>
+                    <div class="detail-content">{{ detailForm.storageName }}</div>
+                </div>
+                <div class="detail-row">
+                    <div class="detail-label">描述</div>
+                    <div class="detail-content">{{ detailForm.description }}</div>
+                </div>
+            </div>
+            <template #footer>
+                <div class="dialog-footer" style="text-align: center">
+                    <el-button size="large" @click="detailDialog.visible = false">关闭</el-button>
+                </div>
+            </template>
+        </el-dialog>
+    </div>
+</template>
+
+<script setup name="StorageLocation" lang="ts">
+    import { listLocation, getLocation, delLocation, addLocation, updateLocation } from '@/api/warehouse/storageLocation';
+    import { StorageLocationVO, StorageLocationQuery, StorageLocationForm } from '@/api/warehouse/storageLocation/types';
+
+    const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+
+    const locationList = ref < StorageLocationVO[] > ([]);
+    const buttonLoading = ref(false);
+    const loading = ref(true);
+    const showSearch = ref(true);
+    const ids = ref < Array < string | number >> ([]);
+    const single = ref(true);
+    const multiple = ref(true);
+    const total = ref(0);
+
+    const queryFormRef = ref < ElFormInstance > ();
+    const locationFormRef = ref < ElFormInstance > ();
+
+    const dialog = reactive < DialogOption > ({
+        visible: false,
+        title: ''
+    });
+
+    const detailDialog = reactive < DialogOption > ({
+        visible: false
+    });
+
+    const detailForm = reactive < StorageLocationForm > ({
+        id: undefined,
+        storageName: undefined,
+        description: undefined
+    });
+
+    const initFormData: StorageLocationForm = {
+        id: undefined,
+        storageName: undefined,
+        description: undefined,
+    }
+    const data = reactive < PageData < StorageLocationForm,
+        StorageLocationQuery >> ({
+            form: { ...initFormData },
+            queryParams: {
+                pageNum: 1,
+                pageSize: 10,
+                storageName: undefined,
+                params: {}
+            },
+            rules: {
+                id: [
+                    { required: true, message: "不能为空", trigger: "blur" }
+                ],
+                storageName: [
+                    { required: true, message: "库位名称不能为空", trigger: "blur" }
+                ],
+            }
+        });
+
+    const { queryParams, form, rules } = toRefs(data);
+
+    /** 查询库位管理列表 */
+    const getList = async () => {
+        loading.value = true;
+        const res = await listLocation(queryParams.value);
+        locationList.value = res.rows;
+        total.value = res.total;
+        loading.value = false;
+    }
+
+    /** 取消按钮 */
+    const cancel = () => {
+        reset();
+        dialog.visible = false;
+    }
+
+    /** 表单重置 */
+    const reset = () => {
+        form.value = { ...initFormData };
+        locationFormRef.value ?.resetFields();
+    }
+
+    /** 搜索按钮操作 */
+    const handleQuery = () => {
+        queryParams.value.pageNum = 1;
+        getList();
+    }
+
+    /** 重置按钮操作 */
+    const resetQuery = () => {
+        queryFormRef.value ?.resetFields();
+        handleQuery();
+    }
+
+    /** 多选框选中数据 */
+    const handleSelectionChange = (selection: StorageLocationVO[]) => {
+        ids.value = selection.map(item => item.id);
+        single.value = selection.length != 1;
+        multiple.value = !selection.length;
+    }
+
+    /** 新增按钮操作 */
+    const handleAdd = () => {
+        reset();
+        dialog.visible = true;
+        dialog.title = "新增";
+    }
+
+    /** 修改按钮操作 */
+    const handleUpdate = async (row ? : StorageLocationVO) => {
+        reset();
+        const _id = row ?.id || ids.value[0]
+        const res = await getLocation(_id);
+        Object.assign(form.value, res.data);
+        dialog.visible = true;
+        dialog.title = "编辑";
+    }
+
+    const handleDetail = async (row ? : StorageLocationVO) => {
+        try {
+            const res = await getLocation(row.id);
+            Object.assign(detailForm, res.data);
+            detailDialog.visible = true;
+        } catch (error) {
+            proxy ?.$modal.msgError("获取详情失败");
+        }
+    }
+
+    /** 提交按钮 */
+    const submitForm = () => {
+        locationFormRef.value ?.validate(async (valid: boolean) => {
+            if (valid) {
+                buttonLoading.value = true;
+                if (form.value.id) {
+                    await updateLocation(form.value).finally(() => buttonLoading.value = false);
+                } else {
+                    await addLocation(form.value).finally(() => buttonLoading.value = false);
+                }
+                proxy ?.$modal.msgSuccess("操作成功");
+                dialog.visible = false;
+                await getList();
+            }
+        });
+    }
+
+    /** 删除按钮操作 */
+    const handleDelete = async (row ? : StorageLocationVO) => {
+        const _ids = row ?.id || ids.value;
+        await proxy ?.$modal.confirm('是否确认删除库位管理编号为"' + _ids + '"的数据项?').finally(() => loading.value = false);
+        await delLocation(_ids);
+        proxy ?.$modal.msgSuccess("删除成功");
+        await getList();
+    }
+
+    /** 导出按钮操作 */
+    const handleExport = () => {
+        proxy ?.download('warehouse/storageLocation/export', {
+            ...queryParams.value
+        }, `location_${new Date().getTime()}.xlsx`)
+    }
+
+    onMounted(() => {
+        getList();
+    });
+</script>
+<style scoped>
+    .detail-container {
+        background: #fff;
+    }
+
+    .detail-row {
+        display: flex;
+        border-bottom: 1px solid #dcdfe6;
+    }
+
+    .detail-row:last-child {
+        border-bottom: none;
+    }
+
+    .detail-label {
+        width: 50%;
+        padding: 12px 20px;
+        background: #f5f7fa;
+        border-right: 1px solid #dcdfe6;
+        box-sizing: border-box;
+    }
+
+    .detail-content {
+        width: 50%;
+        padding: 12px 20px;
+        box-sizing: border-box;
+    }
+
+    :deep(.el-dialog__footer) {
+        margin: 0;
+        border-top: 1px solid #dcdfe6;
+        padding: 12px 20px;
+    }
+</style>>