Browse Source

调整光标,页面添加列表页面

yangg 1 year ago
parent
commit
f9e070ab2b

+ 31 - 1
src/api/api.ts

@@ -10,7 +10,7 @@ export class UserService {       // 模块一
      * @return {HttpResponse} result
      */
     static async login1(uuid) {   // 获取验证码
-        return  `http://192.168.8.103:9999/captchas/${uuid}/LOGIN?rmd=${new Date().getTime()}`
+        return  `https://apidoc.raycos.net/captchas/${uuid}/LOGIN?rmd=${new Date().getTime()}`
     }
     static async login(params) {   // 登录
         params.password = Md5.hashStr(params.password)
@@ -78,6 +78,7 @@ export class infoApi {     // 字典,仓库,客户
     static async getExpressList(params) {//客户列表
         return request('/admin/systems/logi-companies', params, 'get')
     }
+   
 }
 export class dictionaryAPI {
     static async getPage(params) {//字典
@@ -87,6 +88,10 @@ export class dictionaryAPI {
     static async getExpressList(params) {//配送方式
         return request('/admin/systems/logi-companies', params, 'get')
     }
+     //
+    static async listAreaType(params) {//客户列表
+        return request('/admin/erp/warehouse/area/listAreaType', params, 'get')
+    }
 }
 
 export class allocationAPI {
@@ -136,4 +141,29 @@ export class inventoryAPI {
     static async editInventory(id,params) {
         return request(`/admin/stock/inventory/${id}`,params, 'post')
     }
+}
+/* 列表页面 */
+export class pageListAPI {
+    static async getInventoryList(params) {//库存列表
+            return request('/admin/erp/productStock', params, 'get')
+        }
+        //盘点详情admin/stock/inventory/${id}
+    static async queryList(params) {//入库列表
+        return request(`/admin/erp/warehouse/area/query`,params, 'get')
+    }
+    static async inventoryLossList(params) {//报损列表
+        return request(`/admin/stock/damage/report`,params, 'get')
+    }
+    //仓库列表
+    static async warehouseList(params) {
+        return request(`/admin/erp/warehouse`,params, 'get')
+    }
+    //库位区域
+    static async listAreaType(params) {
+        return request(`/admin/erp/warehouse/area/listAreaType`,params, 'get')
+    }
+    //订单列表
+    static async orderList(params) {
+        return request(`/admin/erp/order`,params, 'get')
+    }
 }

+ 2 - 2
src/layouts/app-layout.vue

@@ -23,11 +23,11 @@
             </svg>
         </div>
 
-        <div class="fixed bottom-6 ltr:right-6 rtl:left-6 z-50">
+        <div class="fixed bottom-16 ltr:right-6 rtl:left-6 z-50">
             <template v-if="showTopButton">
                 <button
                     type="button"
-                    class="btn btn-outline-primary rounded-full p-2 animate-pulse bg-[#fafafa] dark:bg-[#060818] dark:hover:bg-primary"
+                    class="w-auto btn btn-outline-primary rounded-full p-2 animate-pulse bg-[#fafafa] dark:bg-[#060818] dark:hover:bg-primary"
                     @click="goToTop"
                 >
                     <svg width="24" height="24" class="h-4 w-4" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">

+ 76 - 9
src/router/index.ts

@@ -1,15 +1,17 @@
-import { createRouter,createWebHashHistory, createWebHistory, RouteRecordRaw } from 'vue-router';
+import { createRouter, createWebHashHistory, createWebHistory, RouteRecordRaw } from 'vue-router';
 import { useAppStore } from '@/stores/index';
 import appSetting from '@/app-setting';
 
-import HomeView from '../views/index.vue';
+import HomeView from '../views/apps/applist.vue'//'../views/index.vue';
 /*import HomeView from '../views/auth/boxed-signin.vue';*/
 
 const routes: RouteRecordRaw[] = [
     // dashboard
-    { path: '/', name: 'home', component: HomeView ,meta: {
-        requiresAuth: true
-    },},
+    {
+        path: '/', name: 'home', component: HomeView, meta: {
+            requiresAuth: true
+        },
+    },
     {
         path: '/dashboard',
         name: 'dashboard',
@@ -88,8 +90,8 @@ const routes: RouteRecordRaw[] = [
         },
         component: () => import(/* webpackChunkName: "apps-scrumboard" */ '../views/InoutStorage/outStorage.vue'),
     },
-     //盘点
-     {
+    //盘点
+    {
         path: '/Inventory/index',
         name: 'Inventory',
         meta: {
@@ -116,6 +118,71 @@ const routes: RouteRecordRaw[] = [
         },
         component: () => import(/* webpackChunkName: "apps-scrumboard" */ '../views/apps/shippingPage.vue'),
     },
+    /* 列表页面 
+    start
+        库存列表 
+    */
+    {
+        path: '/list/InventoryList',
+        name: 'InventoryList',
+        meta: {
+            requiresAuth: false,
+            hideButtonGroup: true
+        },
+        component: () => import(/* webpackChunkName: "apps-scrumboard" */ '../views/list/InventoryList.vue'),
+    },
+    //库位管理
+    {
+        path: '/list/locationList',
+        name: 'locationList',
+        meta: {
+            requiresAuth: false,
+            hideButtonGroup: true
+        },
+        component: () => import(/* webpackChunkName: "apps-scrumboard" */ '../views/list/locationList.vue'),
+    },
+    //库位报损
+    {
+        path: '/list/InventoryLoss',
+        name: 'InventoryLoss',
+        meta: {
+            requiresAuth: false,
+            hideButtonGroup: true
+        },
+        component: () => import(/* webpackChunkName: "apps-scrumboard" */ '../views/list/InventoryLoss.vue'),
+    },
+     //仓库列表
+     {
+        path: '/list/warehouseList',
+        name: 'warehouseList',
+        meta: {
+            requiresAuth: false,
+            hideButtonGroup: true
+        },
+        component: () => import(/* webpackChunkName: "apps-scrumboard" */ '../views/list/warehouseList.vue'),
+    },
+    //库位区域
+    {
+        path: '/list/locationArea',
+        name: 'locationArea',
+        meta: {
+            requiresAuth: false,
+            hideButtonGroup: true
+        },
+        component: () => import(/* webpackChunkName: "apps-scrumboard" */ '../views/list/locationArea.vue'),
+    },
+    //订单列表
+    {
+        path: '/list/orderList',
+        name: 'orderList',
+        meta: {
+            requiresAuth: false,
+            hideButtonGroup: true
+        },
+        component: () => import(/* webpackChunkName: "apps-scrumboard" */ '../views/list/orderList.vue'),
+    },
+    /* end */
+
     // apps
     {
         path: '/apps/applist',
@@ -141,7 +208,7 @@ const routes: RouteRecordRaw[] = [
         },
         component: () => import(/* webpackChunkName: "apps-chat" */ '../views/apps/stock.vue'),
     },
-    
+
     {
         path: '/apps/goods',
         name: 'goods',
@@ -366,7 +433,7 @@ router.beforeEach((to, from, next) => {
     const store = useAppStore();
     console.log(to.meta.requiresAuth && !store.user);
     if (to.meta.requiresAuth && !store.user) {
-        next({ name: 'login'});
+        next({ name: 'login' });
     } else {
         next();
     }

+ 2 - 2
src/utils/axios.ts

@@ -9,7 +9,7 @@ axios.defaults.timeout = 60000;
 
 // 请求地址,这里是动态赋值的的环境变量,下一篇会细讲,这里跳过
 // @ts-ignore
-axios.defaults.baseURL = 'http://192.168.8.103:9999'//import.meta.env.VITE_API_URL;   apidoc.raycos.net
+axios.defaults.baseURL = 'https://apidoc.raycos.net'//import.meta.env.VITE_API_URL; http://192.168.8.103:9999  https://apidoc.raycos.net
 
 // 请求拦截器
 axios.interceptors.request.use(function (config) {
@@ -84,7 +84,7 @@ axios.interceptors.response.use(function (response) {
    // 处理网络错误或请求未发出的情况
    if (!isShowingError) {
     isShowingError = true;
-    ElMessage.error('网络连接异常,请稍后再试!');
+    //ElMessage.error('网络连接异常,请稍后再试!');
     setTimeout(() => {
       isShowingError = false; // 重置标志位
     }, 3000); // 3秒后允许再次显示错误

+ 11 - 4
src/views/InoutStorage/inStorage.vue

@@ -206,10 +206,17 @@ const goBack = () => {
 const scanCode = () => {
     dialogVisible.value = true
     nextTick(() => {
-        if (inputRef.value && inputRef.value.focus) {
-            inputRef.value.focus();
-        } else {
-            console.error('Input reference is not available');
+        if (inputRef.value) {
+            try {
+                inputRef.value.focus(); // 先尝试聚焦 input 元素
+                setTimeout(() => {
+                    if (inputRef.value) {
+                        inputRef.value.select();
+                    }
+                }, 100);
+            } catch (error) {
+                console.error('Failed to select input:', error);
+            }
         }
     });
 };

+ 2 - 2
src/views/InoutStorage/index.vue

@@ -22,7 +22,7 @@
                         <Popper :placement="store.rtlClass === 'rtl' ? 'bottom-end' : 'bottom-start'" offsetDistance="0"
                             class="align-middle">
                             <button type="button"
-                                class="flex items-center border font-semibold border-[#e0e6ed] dark:border-[#253b5c] rounded-md px-4 py-2 text-sm dark:bg-[#1b2e4b] dark:text-white-dark">
+                                class="whitespace-nowrap flex items-center border font-semibold border-[#e0e6ed] dark:border-[#253b5c] rounded-md px-4 py-2 text-sm dark:bg-[#1b2e4b] dark:text-white-dark">
                                 <span class="ltr:mr-1 rtl:ml-1">选择</span>
                                 <icon-caret-down class="w-5 h-5" />
                             </button>
@@ -90,7 +90,7 @@
                         <Popper :placement="store.rtlClass === 'rtl' ? 'bottom-end' : 'bottom-start'" offsetDistance="0"
                             class="align-middle">
                             <button type="button"
-                                class="flex items-center border font-semibold border-[#e0e6ed] dark:border-[#253b5c] rounded-md px-4 py-2 text-sm dark:bg-[#1b2e4b] dark:text-white-dark">
+                                class="whitespace-nowrap flex items-center border font-semibold border-[#e0e6ed] dark:border-[#253b5c] rounded-md px-4 py-2 text-sm dark:bg-[#1b2e4b] dark:text-white-dark">
                                 <span class="ltr:mr-1 rtl:ml-1">选择</span>
                                 <icon-caret-down class="w-4 h-5" />
                             </button>

+ 12 - 1
src/views/InoutStorage/outStorage.vue

@@ -214,7 +214,18 @@ const goBack = () => {
 const scanCode = () => {
     dialogVisible.value = true
     nextTick(() => {
-        inputRef.value.focus();
+        if (inputRef.value) {
+            try {
+                inputRef.value.focus(); // 先尝试聚焦 input 元素
+                setTimeout(() => {
+                    if (inputRef.value) {
+                        inputRef.value.select();
+                    }
+                }, 100);
+            } catch (error) {
+                console.error('Failed to select input:', error);
+            }
+        }
     });
 };
 const getOrderNumber = async (formEl: FormInstance | undefined) => {

+ 11 - 4
src/views/Inventory/addInventory.vue

@@ -208,10 +208,17 @@ const goBack = () => {
 const scanCode = () => {
     dialogVisible.value = true
     nextTick(() => {
-        if (inputRef.value && inputRef.value.focus) {
-            inputRef.value.focus();
-        } else {
-            console.error('Input reference is not available');
+        if (inputRef.value) {
+            try {
+                inputRef.value.focus(); // 先尝试聚焦 input 元素
+                setTimeout(() => {
+                    if (inputRef.value) {
+                        inputRef.value.select();
+                    }
+                }, 100);
+            } catch (error) {
+                console.error('Failed to select input:', error);
+            }
         }
     });
 };

+ 2 - 2
src/views/Inventory/index.vue

@@ -18,8 +18,8 @@
                         <Popper :placement="store.rtlClass === 'rtl' ? 'bottom-end' : 'bottom-start'" offsetDistance="0"
                             class="align-middle">
                             <button type="button"
-                                class="flex items-center border font-semibold border-[#e0e6ed] dark:border-[#253b5c] rounded-md px-4 py-2 text-sm dark:bg-[#1b2e4b] dark:text-white-dark">
-                                <span class="ltr:mr-1 rtl:ml-1">Columns</span>
+                                class="whitespace-nowrap flex items-center border font-semibold border-[#e0e6ed] dark:border-[#253b5c] rounded-md px-4 py-2 text-sm dark:bg-[#1b2e4b] dark:text-white-dark">
+                                <span class="ltr:mr-1 rtl:ml-1">选择</span>
                                 <icon-caret-down class="w-5 h-5" />
                             </button>
                             <template #content>

+ 1 - 1
src/views/allocation/index.vue

@@ -18,7 +18,7 @@
                         <Popper :placement="store.rtlClass === 'rtl' ? 'bottom-end' : 'bottom-start'" offsetDistance="0"
                             class="align-middle">
                             <button type="button"
-                                class="flex items-center border font-semibold border-[#e0e6ed] dark:border-[#253b5c] rounded-md px-4 py-2 text-sm dark:bg-[#1b2e4b] dark:text-white-dark">
+                                class="whitespace-nowrap flex items-center border font-semibold border-[#e0e6ed] dark:border-[#253b5c] rounded-md px-4 py-2 text-sm dark:bg-[#1b2e4b] dark:text-white-dark">
                                 <span class="ltr:mr-1 rtl:ml-1">选择</span>
                                 <icon-caret-down class="w-5 h-5" />
                             </button>

+ 106 - 80
src/views/apps/applist.vue

@@ -1,111 +1,137 @@
 <template>
-    
-    <ul class="flex space-x-2 rtl:space-x-reverse">
-            <li>
-                <a href="javascript:;" class="text-primary hover:underline">首页</a>
-            </li>
-            <li class="before:content-['/'] ltr:before:mr-2 rtl:before:ml-2">
-                <span>所有应用</span>
-            </li>
-        </ul>
-<div class="grid grid-cols-2 gap-8">
-    <div>
-        <svg class="w-40 h-40 text-gray-500 dark:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"  fill="currentColor" viewBox="0 0 24 24">
-  <path fill-rule="evenodd" d="M11.32 6.176H5c-1.105 0-2 .949-2 2.118v10.588C3 20.052 3.895 21 5 21h11c1.105 0 2-.948 2-2.118v-7.75l-3.914 4.144A2.46 2.46 0 0 1 12.81 16l-2.681.568c-1.75.37-3.292-1.263-2.942-3.115l.536-2.839c.097-.512.335-.983.684-1.352l2.914-3.086Z" clip-rule="evenodd"/>
-  <path fill-rule="evenodd" d="M19.846 4.318a2.148 2.148 0 0 0-.437-.692 2.014 2.014 0 0 0-.654-.463 1.92 1.92 0 0 0-1.544 0 2.014 2.014 0 0 0-.654.463l-.546.578 2.852 3.02.546-.579a2.14 2.14 0 0 0 .437-.692 2.244 2.244 0 0 0 0-1.635ZM17.45 8.721 14.597 5.7 9.82 10.76a.54.54 0 0 0-.137.27l-.536 2.84c-.07.37.239.696.588.622l2.682-.567a.492.492 0 0 0 .255-.145l4.778-5.06Z" clip-rule="evenodd"/>
-</svg>
 
-        <div class="h-4 mx-10 my-2"><span class="text-center text-base font-bold">订单查询</span></div>
-    </div>
-    <div>
-        <svg class="w-40 h-40 text-gray-500 dark:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"  fill="currentColor" viewBox="0 0 24 24">
-  <path fill-rule="evenodd" d="M11.32 6.176H5c-1.105 0-2 .949-2 2.118v10.588C3 20.052 3.895 21 5 21h11c1.105 0 2-.948 2-2.118v-7.75l-3.914 4.144A2.46 2.46 0 0 1 12.81 16l-2.681.568c-1.75.37-3.292-1.263-2.942-3.115l.536-2.839c.097-.512.335-.983.684-1.352l2.914-3.086Z" clip-rule="evenodd"/>
-  <path fill-rule="evenodd" d="M19.846 4.318a2.148 2.148 0 0 0-.437-.692 2.014 2.014 0 0 0-.654-.463 1.92 1.92 0 0 0-1.544 0 2.014 2.014 0 0 0-.654.463l-.546.578 2.852 3.02.546-.579a2.14 2.14 0 0 0 .437-.692 2.244 2.244 0 0 0 0-1.635ZM17.45 8.721 14.597 5.7 9.82 10.76a.54.54 0 0 0-.137.27l-.536 2.84c-.07.37.239.696.588.622l2.682-.567a.492.492 0 0 0 .255-.145l4.778-5.06Z" clip-rule="evenodd"/>
-</svg>
+   <!--  <ul class="flex space-x-2 rtl:space-x-reverse">
+        <li>
+            <a href="javascript:;" class="text-primary hover:underline">首页</a>
+        </li>
+        <li class="before:content-['/'] ltr:before:mr-2 rtl:before:ml-2">
+            <span>所有应用</span>
+        </li>
+    </ul> -->
+    <div class="grid grid-cols-2 gap-8">
+        <div v-for="(item, index) in cols" :key="index" @click="goPageList(item)">
+            <svg class="w-40 h-40 text-gray-500 dark:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"
+                fill="currentColor" viewBox="0 0 24 24">
+                <path fill-rule="evenodd"
+                    d="M11.32 6.176H5c-1.105 0-2 .949-2 2.118v10.588C3 20.052 3.895 21 5 21h11c1.105 0 2-.948 2-2.118v-7.75l-3.914 4.144A2.46 2.46 0 0 1 12.81 16l-2.681.568c-1.75.37-3.292-1.263-2.942-3.115l.536-2.839c.097-.512.335-.983.684-1.352l2.914-3.086Z"
+                    clip-rule="evenodd" />
+                <path fill-rule="evenodd"
+                    d="M19.846 4.318a2.148 2.148 0 0 0-.437-.692 2.014 2.014 0 0 0-.654-.463 1.92 1.92 0 0 0-1.544 0 2.014 2.014 0 0 0-.654.463l-.546.578 2.852 3.02.546-.579a2.14 2.14 0 0 0 .437-.692 2.244 2.244 0 0 0 0-1.635ZM17.45 8.721 14.597 5.7 9.82 10.76a.54.54 0 0 0-.137.27l-.536 2.84c-.07.37.239.696.588.622l2.682-.567a.492.492 0 0 0 .255-.145l4.778-5.06Z"
+                    clip-rule="evenodd" />
+            </svg>
 
-        <div class="h-4 mx-10 my-2"><span class="text-center text-base font-bold">订单查询</span></div>
-    </div>
-    
-    <div class="goods-transfer">
-        <svg class="w-40 h-40 text-gray-500 dark:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"  fill="currentColor" viewBox="0 0 24 24">
-  <path fill-rule="evenodd" d="M11.32 6.176H5c-1.105 0-2 .949-2 2.118v10.588C3 20.052 3.895 21 5 21h11c1.105 0 2-.948 2-2.118v-7.75l-3.914 4.144A2.46 2.46 0 0 1 12.81 16l-2.681.568c-1.75.37-3.292-1.263-2.942-3.115l.536-2.839c.097-.512.335-.983.684-1.352l2.914-3.086Z" clip-rule="evenodd"/>
-  <path fill-rule="evenodd" d="M19.846 4.318a2.148 2.148 0 0 0-.437-.692 2.014 2.014 0 0 0-.654-.463 1.92 1.92 0 0 0-1.544 0 2.014 2.014 0 0 0-.654.463l-.546.578 2.852 3.02.546-.579a2.14 2.14 0 0 0 .437-.692 2.244 2.244 0 0 0 0-1.635ZM17.45 8.721 14.597 5.7 9.82 10.76a.54.54 0 0 0-.137.27l-.536 2.84c-.07.37.239.696.588.622l2.682-.567a.492.492 0 0 0 .255-.145l4.778-5.06Z" clip-rule="evenodd"/>
-</svg>
+            <div class="h-4 mx-10 my-2"><span class="text-center text-base font-bold">{{ item.title }}</span></div>
+        </div>
+     <!--    <div>
+            <svg class="w-40 h-40 text-gray-500 dark:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"
+                fill="currentColor" viewBox="0 0 24 24">
+                <path fill-rule="evenodd"
+                    d="M11.32 6.176H5c-1.105 0-2 .949-2 2.118v10.588C3 20.052 3.895 21 5 21h11c1.105 0 2-.948 2-2.118v-7.75l-3.914 4.144A2.46 2.46 0 0 1 12.81 16l-2.681.568c-1.75.37-3.292-1.263-2.942-3.115l.536-2.839c.097-.512.335-.983.684-1.352l2.914-3.086Z"
+                    clip-rule="evenodd" />
+                <path fill-rule="evenodd"
+                    d="M19.846 4.318a2.148 2.148 0 0 0-.437-.692 2.014 2.014 0 0 0-.654-.463 1.92 1.92 0 0 0-1.544 0 2.014 2.014 0 0 0-.654.463l-.546.578 2.852 3.02.546-.579a2.14 2.14 0 0 0 .437-.692 2.244 2.244 0 0 0 0-1.635ZM17.45 8.721 14.597 5.7 9.82 10.76a.54.54 0 0 0-.137.27l-.536 2.84c-.07.37.239.696.588.622l2.682-.567a.492.492 0 0 0 .255-.145l4.778-5.06Z"
+                    clip-rule="evenodd" />
+            </svg>
+
+            <div class="h-4 mx-10 my-2"><span class="text-center text-base font-bold">订单查询</span></div>
+        </div>
+        <div class="goods-transfer">
+            <svg class="w-40 h-40 text-gray-500 dark:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"
+                fill="currentColor" viewBox="0 0 24 24">
+                <path fill-rule="evenodd"
+                    d="M11.32 6.176H5c-1.105 0-2 .949-2 2.118v10.588C3 20.052 3.895 21 5 21h11c1.105 0 2-.948 2-2.118v-7.75l-3.914 4.144A2.46 2.46 0 0 1 12.81 16l-2.681.568c-1.75.37-3.292-1.263-2.942-3.115l.536-2.839c.097-.512.335-.983.684-1.352l2.914-3.086Z"
+                    clip-rule="evenodd" />
+                <path fill-rule="evenodd"
+                    d="M19.846 4.318a2.148 2.148 0 0 0-.437-.692 2.014 2.014 0 0 0-.654-.463 1.92 1.92 0 0 0-1.544 0 2.014 2.014 0 0 0-.654.463l-.546.578 2.852 3.02.546-.579a2.14 2.14 0 0 0 .437-.692 2.244 2.244 0 0 0 0-1.635ZM17.45 8.721 14.597 5.7 9.82 10.76a.54.54 0 0 0-.137.27l-.536 2.84c-.07.37.239.696.588.622l2.682-.567a.492.492 0 0 0 .255-.145l4.778-5.06Z"
+                    clip-rule="evenodd" />
+            </svg>
+            <div class="h-4 mx-10 my-2"><span class="text-center text-base font-bold">订单查询</span></div>
+        </div> -->
 
-        <div class="h-4 mx-10 my-2"><span class="text-center text-base font-bold">123</span></div>
     </div>
-    
-</div>
 
-<!-- <div class="relative inline-flex align-middle">
+    <!-- <div class="relative inline-flex align-middle">
   <button type="button" @click="godashbord" class="btn btn-dark ltr:rounded-r-none rtl:rounded-l-none">Left</button>
   <button type="button" class="btn btn-dark rounded-none">Middle</button>
   <button type="button" class="btn btn-dark ltr:rounded-l-none rtl:rounded-r-none">Right</button>
 </div>
  -->
-
+    <!-- 
  <div class="relative inline-flex align-middle fixed-bottom button-group">
   <button type="button" @click="godashbord" class="btn btn-dark ltr:rounded-r-none rtl:rounded-l-none">Left</button>
   <button type="button" @click="godashbord" class="btn btn-dark rounded-none">Middle</button>
   <button type="button" class="btn btn-dark ltr:rounded-l-none rtl:rounded-r-none">Right</button>
-</div>
+</div> -->
 
 </template>
 
 <script lang="ts" setup>
-import { ref, computed, onMounted, inject} from 'vue'; // Added onMounted here
-    import { useAppStore } from '@/stores/index';
-    import { useMeta } from '@/composables/use-meta';
-    import router from '@/router';
-    import {  AxiosInstance } from 'axios';
-    const $axios = inject('axios') as AxiosInstance;
-
+import { ref, computed, onMounted, inject } from 'vue'; // Added onMounted here
+import { useAppStore } from '@/stores/index';
+import { useMeta } from '@/composables/use-meta';
+import router from '@/router';
+import { AxiosInstance } from 'axios';
+const $axios = inject('axios') as AxiosInstance;
+const cols: any = ref([
+    { path: 'InventoryList', title: '库存列表',  },
+    { path: 'locationList', title: '库位管理'},
+    { path: 'InventoryLoss', title: '库存报损'},
+    { path: 'warehouseList', title: '仓库列表'},
+    { path: 'locationArea', title: '库位区域'},
+    /* { path: 'order_vo.pay_type', title: '冻结列表'}, 
+    { path: 'orderList', title: '订单列表' },
+    { path: 'actions', title: '售后列表'},
+    { path: 'actions', title: '商品列表'} */
+]);
 
 
-    const godashbord = () => {
-        router.push(({path:'/'}))
-    }
-    const goorder = () => {
-        router.push(({path:'/order'}))
-    }
-
-    useMeta({ title: 'Chat' });
-    const store = useAppStore();
-    const isShowUserChat = ref(false);
-    const isShowChatMenu = ref(false);
-    const loginUser = ref({
-        id: 0,
-        name: 'Alon Smith',
-        path: 'profile-34.jpeg',
-        designation: 'Software Developer',
+const godashbord = () => {
+    router.push(({ path: '/' }))
+}
+const goPageList = (item?: any) => {
+    router.replace({
+        name: item.path,
     });
+}
 
-    const fetchData = async () => {
-        try {
-            const response = await $axios.get('/api-endpoint');
-            console.log('API Response:', response.data);
-        } catch (error) {
-            console.error('API Error:', error);
-        }
-    };
+useMeta({ title: 'Chat' });
+const store = useAppStore();
+const isShowUserChat = ref(false);
+const isShowChatMenu = ref(false);
+const loginUser = ref({
+    id: 0,
+    name: 'Alon Smith',
+    path: 'profile-34.jpeg',
+    designation: 'Software Developer',
+});
 
-    // 在组件加载时调用 fetchData
-    onMounted(() => {
-        fetchData();
-    });
+const fetchData = async () => {
+    try {
+        const response = await $axios.get('/api-endpoint');
+        console.log('API Response:', response.data);
+    } catch (error) {
+        console.error('API Error:', error);
+    }
+};
+
+// 在组件加载时调用 fetchData
+onMounted(() => {
+   /*  fetchData(); */
+});
 </script>
 <style>
-.btn{
+.btn {
     width: 100px;
 }
+
 .button-group {
-  position: fixed;
-  bottom: 0;
-  left: 0;
-  width: 100%;
-  display: flex;
-  justify-content: center;
-  z-index: 1000; /* 确保按钮组在其他内容之上 */
+    position: fixed;
+    bottom: 0;
+    left: 0;
+    width: 100%;
+    display: flex;
+    justify-content: center;
+    z-index: 1000;
+    /* 确保按钮组在其他内容之上 */
 }
 </style>
-

+ 19 - 11
src/views/apps/order.vue

@@ -18,10 +18,17 @@
                         <Popper :placement="store.rtlClass === 'rtl' ? 'bottom-end' : 'bottom-start'" offsetDistance="0"
                             class="align-middle">
                             <button type="button"
-                                class="flex items-center border font-semibold border-[#e0e6ed] dark:border-[#253b5c] rounded-md px-4 py-2 text-sm dark:bg-[#1b2e4b] dark:text-white-dark">
-                                <span class="ltr:mr-1 rtl:ml-1">Columns</span>
+                                class="flex items-center border font-semibold
+                                 border-[#e0e6ed] dark:border-[#253b5c] 
+                                 rounded-md px-4 py-2 text-sm dark:bg-[#1b2e4b] dark:text-white-dark whitespace-nowrap" >
+                                <span class="ltr:mr-1 rtl:ml-1 inline">选择</span>
                                 <icon-caret-down class="w-5 h-5" />
                             </button>
+                          <!--   <button type="button"
+                                style="white-space: nowrap; flex-wrap: nowrap; display: flex; align-items: center; border: 1px solid #e0e6ed; border-radius: 4px; padding: 8px 16px; font-weight: 600; background-color: transparent; text-align: left; color: inherit;">
+                                <span style="margin-right: 8px;">选择</span>
+                                <i class="icon-caret-down" style="width: 5px; height: 5px;"></i>
+                            </button> -->
                             <template #content>
                                 <ul class="whitespace-nowrap">
                                     <template v-for="(col, i) in cols" :key="i">
@@ -74,7 +81,8 @@
                     </template>
                     <!-- 定义操作栏的模板 -->
                     <template #actions="data">
-                        <button v-if="data.value.status!=='SENDING'" @click="deliveryOrder(data)" class="btn btn-primary">发货</button>
+                        <button v-if="data.value.status !== 'SENDING'" @click="deliveryOrder(data)"
+                            class="btn btn-primary">发货</button>
                     </template>
                     <template #isActive="data">
                         <!--  <span class="capitalize" :class="data.value.isActive ? 'text-success' : 'text-danger'">{{
@@ -100,13 +108,13 @@ useMeta({ title: 'Column Chooser Table' });
 const router = useRouter();
 const store = useAppStore();
 const search = ref('');
-const rows:any = ref([]); // 初始化rows为响应式引用
-const customerList:any = ref([])//初始化客户列表
-const warehouseList:any = ref([])//初始化客户列表
-const collectingAccountList:any = ref([])//初始化客户列表
-const deliveryList:any = ref([])//初始化客户列表
-const orderTypeList:any = ref([])//初始化客户列表
-const cols:any = ref([
+const rows: any = ref([]); // 初始化rows为响应式引用
+const customerList: any = ref([])//初始化客户列表
+const warehouseList: any = ref([])//初始化客户列表
+const collectingAccountList: any = ref([])//初始化客户列表
+const deliveryList: any = ref([])//初始化客户列表
+const orderTypeList: any = ref([])//初始化客户列表
+const cols: any = ref([
     { field: 'sn', title: '订单编号', isUnique: true, hide: false },
     { field: 'order_vo.member_id', title: '客户', hide: false },
     { field: 'order_vo.order_time', title: '下单时间', hide: false },
@@ -185,7 +193,7 @@ const getInforList = async () => {
 const deliveryOrder = async (row) => {
     router.replace({
         name: 'shippingPage',
-        params: { id: row.value.id,send_type:row.value.order_vo.send_type }
+        params: { id: row.value.id, send_type: row.value.order_vo.send_type }
     });
 }
 </script>

+ 73 - 44
src/views/apps/shippingPage.vue

@@ -29,8 +29,9 @@
                     <p>地址:{{ shippingForm.order_vo.province_city_area_address }}</p>
                     <p>客户备注:{{ shippingForm.order_vo.remark }}</p>
                     <p v-if="send_type.value !== 'EXPRESS_DELIVERY'">
-                      <span v-if="shippingForm.order_vo.send_type !== 'SELF_PICKUP'">运单号:{{ shippingForm.kdn_order_code }}</span>  
-                      <span v-else>自提单号:{{ shippingForm.self_pickup_num }}</span>
+                        <span v-if="shippingForm.order_vo.send_type !== 'SELF_PICKUP'">运单号:{{
+                            shippingForm.kdn_order_code }}</span>
+                        <span v-else>自提单号:{{ shippingForm.self_pickup_num }}</span>
                     </p>
                     <div v-else>
                         <p>
@@ -52,9 +53,9 @@
                             :minlength="1" style="width: 170px" :maxlength="20" type="number" max="50" clearable
                             placeholder="请输入物品总重量"><template #append>KG</template></el-input>
                     </p>
-                    <p class="mt-1 mb-1">物品总体积: <el-input v-model="params.total_volume" size="small" :minlength="1"
-                            style="width: 170px" :maxlength="20" clearable placeholder="请输入物品总体积"><template
-                                #append>m³</template></el-input>
+                    <p class="mt-1 mb-1">物品总体积: <el-input v-model="params.total_volume" ref="totalInput" size="small"
+                            :minlength="1" style="width: 170px" :maxlength="20" clearable
+                            placeholder="请输入物品总体积"><template #append>m³</template></el-input>
                     </p>
                     <p>物品价格: <el-input v-model="params.declared_value" size="small" :minlength="1" style="width: 170px"
                             :maxlength="20" clearable placeholder="请输入物品价格"><template #append>元</template></el-input>
@@ -96,13 +97,12 @@
             </template> -->
         </el-dialog>
         <div class="flex justify-center pt-2 pb-2 mt-4 w-full fixed bottom-0 bg-white left-0"
-            v-if="send_type.value == 'EXPRESS_DELIVERY'">
+            v-if="send_type.value !== 'EXPRESS_DELIVERY'">
             <el-button type="primary" size="large" @click="scanCode">扫码出库</el-button>
             <el-button type="primary" size="large"
                 v-if="shippingForm.kdn_order_code == '' || shippingForm.kdn_order_code == undefined"
                 @click="getOrderNumber">获取运单号</el-button>
-            <el-button type="primary" size="large" v-if="shippingForm.kdn_order_code !== undefined"
-                @click="ship">发货</el-button>
+            <el-button type="primary" size="large" v-else @click="ship">发货</el-button>
         </div>
         <div class="flex justify-center pt-2 pb-2 mt-4 w-full fixed bottom-0 bg-white left-0" v-else>
             <el-button type="primary" size="large" @click="scanCode">扫码出库</el-button>
@@ -128,7 +128,7 @@ const tableData = ref([])
 let barcodeValue = ref('')
 const router = useRouter();
 const route = useRoute()
-const activeTab = ref('basic-info');
+const activeTab = ref('product-info');
 const id = ref(route.params.id);
 const send_type = ref(route.params.send_type);
 let shippingForm: any = ref({
@@ -162,7 +162,7 @@ const snCodeForm = reactive({
     bar_code: "",
     sn_code: '',
 })
-const inputRef = ref<any>(null);
+const inputRef = ref();
 const snInputRef = ref<any>(null)
 const customerList: any = ref([])//初始化客户列表
 const warehouseList: any = ref([])//初始化客户列表
@@ -198,7 +198,9 @@ const params: any = ref({
     },
     //商品信息列表
     order_item_vos: [],
-    goods_list:[]
+    goods_list: [],
+    warehouse_id:'',
+    goods_num:'',
 })
 let sku = ref('');
 watch(activeTab, (newValue, oldValue) => {
@@ -239,8 +241,6 @@ const toSearch = async () => {
             }
             index.value = shippingForm.value.order_item_vos.length;
             shippingForm.value.order_item_vos.push(res.data);
-            console.log(res.data, shippingForm.value.order_item_vos);
-
         } else {
             index.value = indexs;
         }
@@ -251,7 +251,8 @@ const toSearch = async () => {
                 snInputRef.value.focus();
             });
         } else {
-            dialogVisible.value = false;
+            shippingForm.value.order_item_vos[index.value].num = 1
+            //dialogVisible.value = false;
         }
     } catch (error) {
         console.error('Error fetching product:', error);
@@ -302,21 +303,26 @@ const handleClose = (done: () => void) => {
     done()
 }
 onMounted(() => {
-    console.log(send_type);
     init()
     getInforList()
 });
 const goBack = () => {
     router.push({ name: 'order' });
 };
-
 const scanCode = () => {
     dialogVisible.value = true
     nextTick(() => {
-        if (inputRef.value && inputRef.value.focus) {
-            inputRef.value.focus();
-        } else {
-            console.error('Input reference is not available');
+        if (inputRef.value) {
+            try {
+                inputRef.value.focus(); // 先尝试聚焦 input 元素
+                setTimeout(() => {
+                    if (inputRef.value) {
+                        inputRef.value.select();
+                    }
+                }, 100);
+            } catch (error) {
+                console.error('Failed to select input:', error);
+            }
         }
     });
 };
@@ -334,32 +340,53 @@ const getOrderNumber = () => {
         params.value.sender.city_name +
         params.value.sender.area_name +
         params.value.sender.address;
-    params.value.order_item_vos = shippingForm.value.order_item_vos
+    /*  params.value.order_item_vos = shippingForm.value.order_item_vos */
+    //商品信息
+    const item = {
+        goods_name:'',
+        quantity:'',
+        unit:''
+    };
+    shippingForm.value.order_item_vos.map((el) => {
+        item.goods_name = el.goods_vo.name;
+        /* item.goods_price = el.product_vo.price; */
+        item.quantity = el.orderNum;
+        item.unit = el.product_vo.unit;
+        return params.value.goods_list.push(item);
+    });
+    params.value.goods_num = shippingForm.value.order_item_vos.reduce(
+            (sum, e) => sum + Number(e.orderNum || 0),
+            0
+          );
     if (shippingForm.appointment_type !== 0) {
         params.value.appointment_time = shippingForm.appointment_time
     }
-    console.log(shippingForm);
-    //商品信息
-    /*  const item = {};
-     shippingForm.order_item_vos.map((el) => {
-       item.goods_name = el.goods_vo.name;
-       item.quantity = el.orderNum;
-       item.unit = el.product_vo.unit;
-       return params.goods_list.push(item);
-     });
-     params.goods_num = this.product_list.reduce(
-       (sum, e) => sum + Number(e.orderNum || 0),
-       0
-     );
-     params.total_weight = Number(params.total_weight);
-     params.total_volume = Number(params.total_volume);
-     params.declared_value = Number(params.declared_value);
-     //地址
-     params.send_address = this.send_address;
-     params.receive_address = this.receive_address;
-     params.order_code = this.id; */
+    params.value.warehouse_id=shippingForm.value.warehouse_id
+    params.value.send_type=send_type.value
+    params.value.order_code = id.value
+
+    /*console.log(shippingForm);
+   //商品信息
+   const item = {};
+    shippingForm.order_item_vos.map((el) => {
+      item.goods_name = el.goods_vo.name;
+      item.quantity = el.orderNum;
+      item.unit = el.product_vo.unit;
+      return params.goods_list.push(item);
+    });
+    params.goods_num = this.product_list.reduce(
+      (sum, e) => sum + Number(e.orderNum || 0),
+      0
+    );
+    params.total_weight = Number(params.total_weight);
+    params.total_volume = Number(params.total_volume);
+    params.declared_value = Number(params.declared_value);
+    //地址
+    params.send_address = this.send_address;
+    params.receive_address = this.receive_address;
+    params.order_code = this.id; */
     orderApi.getkdShip(id.value, params.value).then(res => {
-        console.log(res);
+        init()
     })
 };
 
@@ -400,6 +427,9 @@ const ship = () => {
     })
 
 };
+const kdsShip = () => {
+
+}
 const init = async () => {
     try {
         const res: any = await orderApi.getSendOrderDetail(id.value);
@@ -414,7 +444,6 @@ const init = async () => {
             })
             barcodeValue.value = res.data.order_vo.sn;
             //物品价格
-            console.log(res.data.kdn_order_code);
             if (res.data.total_volume !== undefined) {
                 params.value.total_volume = Number(res.data.total_volume)
             }
@@ -437,7 +466,7 @@ const init = async () => {
             params.value.receiver.area_name = codeToText[receiverList[2]];
             params.value.receiver.address = res.data.order_vo.address;
             shippingForm.value = res.data;
-            console.log("Barcode value set to:", barcodeValue.value);
+            console.log("Barcode value set to:", shippingForm);
         } else {
             console.error("Invalid response structure:", res);
         }

+ 218 - 0
src/views/list/InventoryList.vue

@@ -0,0 +1,218 @@
+<template>
+    <div>
+          <ul class="flex space-x-2 rtl:space-x-reverse">
+            <li>
+                <a href="javascript:;" class="text-primary hover:underline" @click="goIndex">首页</a>
+            </li>
+           <!--  <li class="before:content-['/'] ltr:before:mr-2 rtl:before:ml-2">
+                <span>订单列表</span>
+            </li>-->
+        </ul> 
+
+        <div class="panel pb-0 mt-6">
+
+            <div class="flex md:items-center md:flex-row flex-col mb-5 gap-5">
+
+                <div class="flex items-center gap-5 ltr:ml-auto rtl:mr-auto">
+                    <div class="dropdown">
+                        <Popper :placement="store.rtlClass === 'rtl' ? 'bottom-end' : 'bottom-start'" offsetDistance="0"
+                            class="align-middle">
+                            <button type="button"
+                                class="whitespace-nowrap flex items-center border font-semibold border-[#e0e6ed] dark:border-[#253b5c] rounded-md px-4 py-2 text-sm dark:bg-[#1b2e4b] dark:text-white-dark">
+                                <span class="ltr:mr-1 rtl:ml-1">选择</span>
+                                <icon-caret-down class="w-5 h-5" />
+                            </button>
+                            <template #content>
+                                <ul class="whitespace-nowrap">
+                                    <template v-for="(col, i) in cols" :key="i">
+                                        <li>
+                                            <div class="flex items-center px-4 py-1">
+                                                <label class="cursor-pointer mb-0">
+                                                    <input type="checkbox" class="form-checkbox" :id="`chk-${i}`"
+                                                        :value="col.field" @change="col.hide = !$event.target.checked"
+                                                        :checked="!col.hide" />
+                                                    <span :for="`chk-${i}`" class="ltr:ml-2 rtl:mr-2">{{ col.title
+                                                        }}</span>
+                                                </label>
+                                            </div>
+                                        </li>
+                                    </template>
+                                </ul>
+                            </template>
+                        </Popper>
+                    </div>
+                    <div>
+                        <input v-model="search" type="text" class="form-input" placeholder="Search..." />
+                    </div>
+                </div>
+            </div>
+
+            <div class="datatable"><!-- :totalRows="rows?.length" -->
+                <vue3-datatable :rows="rows" :columns="cols" :sortable="true" :search="search"
+                    style="min-height: 500px; " :show-pagination="false" skin="whitespace-nowrap bh-table-hover"
+                    firstArrow='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-4.5 h-4.5 rtl:rotate-180"> <path d="M13 19L7 12L13 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> <path opacity="0.5" d="M16.9998 19L10.9998 12L16.9998 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg>'
+                    lastArrow='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-4.5 h-4.5 rtl:rotate-180"> <path d="M11 19L17 12L11 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> <path opacity="0.5" d="M6.99976 19L12.9998 12L6.99976 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg> '
+                    previousArrow='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-4.5 h-4.5 rtl:rotate-180"> <path d="M15 5L9 12L15 19" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg>'
+                    nextArrow='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-4.5 h-4.5 rtl:rotate-180"> <path d="M9 5L15 12L9 19" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg>'>
+                    <!--  <template #transfer_time="data">
+                        {{ formatDate(data.value.transfer_time) }}
+                    </template> -->
+                    <template #warehouse_id="data">
+                        {{ warehouseName(data.value.warehouse_id) }}
+                    </template>
+                    <!-- <template #out_warehouse_id="data">
+                        {{ warehouseName(data.value.out_warehouse_id) }}
+                    </template> -->
+                    <template #send_type="data">
+                        {{ deliveryName(data.value.send_type) }}
+                    </template>
+                    <!-- <template #order_vo.pay_type="data">
+                        {{ collectingAccountName(data.value.order_vo.pay_type) }}
+                    </template>-->
+
+                    <template #status="data">
+                        {{ typeName(data.value.status) }}
+                    </template>
+                    <!-- 定义操作栏的模板 -->
+                    <template #actions="data">
+                        <button v-if="data.value.status !== 'HAS_HANDLE'" @click="deliveryOrder(data)"
+                            class="btn btn-primary m-0">编辑</button>
+                    </template>
+                    <template #isActive="">
+                        <!--  <span class="capitalize" :class="data.value.isActive ? 'text-success' : 'text-danger'">{{
+                            data._rawValue }}</span> -->
+                    </template>
+                    <template #pagination>
+                        <!-- 这里什么也不放,或者放一个空的div -->
+                    </template>
+                </vue3-datatable>
+                <el-pagination v-model:current-page="params.page_no" :page-size="params.page_size" :small="true"
+                    layout="total, prev, pager, next" :total="totalRows" @size-change="handleSizeChange"
+                    @current-change="handleCurrentChange" />
+            </div>
+        </div>
+    </div>
+</template>
+<script setup lang="ts">
+import { ref, onMounted } from 'vue';
+import Vue3Datatable from '@bhplugin/vue3-datatable';
+import { useAppStore } from '@/stores/index';
+import { useRouter } from 'vue-router';
+import { useMeta } from '@/composables/use-meta';
+import { pageListAPI, infoApi, dictionaryAPI } from '@/api/api'
+import IconBell from '@/components/icon/icon-bell.vue';
+import IconCaretDown from '@/components/icon/icon-caret-down.vue';
+
+
+useMeta({ title: 'Column Chooser Table' });
+const router = useRouter();
+const store = useAppStore();
+const search = ref('');
+const rows: any = ref([]); // 初始化rows为响应式引用
+const customerList: any = ref([])//初始化客户列表
+const warehouseList: any = ref([])//初始化客户列表
+const collectingAccountList: any = ref([])//初始化客户列表
+const deliveryList: any = ref([])//初始化客户列表
+const orderTypeList: any = ref([])//初始化客户列表
+const cols: any = ref([
+    { field: 'warehouse_id', title: '仓库名称', hide: false },
+    { field: 'sn', title: '商品编号', hide: true },//isUnique: true,
+    { field: 'goods_name', title: '商品名称', hide: false },
+    { field: 'product_vo.sku', title: 'sku', hide: true },
+    { field: 'goods_unit', title: '单位', hide: true },
+    { field: 'actual_stock', title: '实际库存', hide: false },
+    { field: 'usable_stock', title: '可用库存', hide: true },
+    { field: 'transit_stock', title: '在途库存', hide: true },
+    { field: 'locked_stock', title: '冻结库存', hide: true },
+    { field: 'warning_stock', title: '预警库存', hide: true }
+]);
+const params: any = ref([
+    { page_no: 1, page_size: 10 }
+])
+const totalRows: any = ref(0);
+
+const goIndex=()=>{
+    router.replace({
+        name: 'home',
+    });
+}
+const handleSizeChange = (val: number) => {
+
+    console.log(`${val} items per page`)
+}
+const handleCurrentChange = (val: number) => {
+    params.page_no = val
+    init()
+    console.log(`current page: ${val}`)
+}
+/* 处理订单时间格式 */
+const formatDate = (date) => {
+    if (date) {
+        const dt = new Date(date * 1000);
+        const month = dt.getMonth() + 1 < 10 ? '0' + (dt.getMonth() + 1) : dt.getMonth() + 1;
+        const day = dt.getDate() < 10 ? '0' + dt.getDate() : dt.getDate();
+        return dt.getFullYear() + '/' + month + '/' + day;
+    }
+    return '';
+};
+/* 处理客户名称 */
+const customerName = (value) => {
+    if (value && customerList.value && customerList.value.data && customerList.value.data.data) {
+        const type = customerList.value.data.data.find(type => type.id === value);
+        return type ? type.name : '';
+    }
+}
+/* 仓库名称 */
+const warehouseName = (value) => {
+    if (value && warehouseList.value && warehouseList.value.data) {
+        const type = warehouseList.value.data.find(type => type.id === value);
+        return type ? type.name : '';
+    }
+}
+/* 配送方式*/
+const deliveryName = (value) => {
+    if (value && deliveryList.value && deliveryList.value.data && deliveryList.value.data.data) {
+        const type = deliveryList.value.data.data.find(type => type.id === value);
+        return type ? type.name : '';
+    }
+}
+/* 状态*/
+const typeName = (value) => {
+    if (value) {
+        return value == 'HAS_HANDLE' ? '已处理' : '未处理';
+    }
+}
+onMounted(() => {
+    init()
+    getInforList()
+});
+/* 获取库存列表 */
+const init = async () => {
+    console.log(params);
+    pageListAPI.getInventoryList({page_no:params.page_no,page_size:params.page_size}).then((res: any) => {
+        params.page_no = res.data.page_no
+        params.page_size = res.data.page_size
+        totalRows.value = res.data.data_total
+        rows.value = res.data.data; // 更新rows的值
+    });
+};
+/* 获取仓库,字典,客户信息 */
+const getInforList = async () => {
+    warehouseList.value = await infoApi.warehouseList({})//获取仓库列表
+    deliveryList.value = await dictionaryAPI.getExpressList(params)//获取配送方式
+    /*  customerList.value = await infoApi.customer({})//获取客户列表
+     collectingAccountList.value = await infoApi.collectingAccount({})//获取支付方式列表*/
+    orderTypeList.value = await dictionaryAPI.getPage({ dictType: "transfer_status" })//获取状态 
+}
+const deliveryOrder = async (row) => {
+    router.replace({
+        name: 'addInventory',
+        params: { id: row.value.id }
+    });
+}
+</script>
+<style>
+.bh-pagination {
+    display: none !important;
+}
+</style>

+ 206 - 0
src/views/list/InventoryLoss.vue

@@ -0,0 +1,206 @@
+<template>
+    <div>
+        <ul class="flex space-x-2 rtl:space-x-reverse">
+            <li>
+                <a href="javascript:;" class="text-primary hover:underline" @click="goIndex">首页</a>
+            </li>
+        </ul> 
+
+        <div class="panel pb-0 mt-6">
+
+            <div class="flex md:items-center md:flex-row flex-col mb-5 gap-5">
+
+                <div class="flex items-center gap-5 ltr:ml-auto rtl:mr-auto">
+                    <div class="dropdown">
+                        <Popper :placement="store.rtlClass === 'rtl' ? 'bottom-end' : 'bottom-start'" offsetDistance="0"
+                            class="align-middle">
+                            <button type="button"
+                                class="whitespace-nowrap flex items-center border font-semibold border-[#e0e6ed] dark:border-[#253b5c] rounded-md px-4 py-2 text-sm dark:bg-[#1b2e4b] dark:text-white-dark">
+                                <span class="ltr:mr-1 rtl:ml-1">选择</span>
+                                <icon-caret-down class="w-5 h-5" />
+                            </button>
+                            <template #content>
+                                <ul class="whitespace-nowrap">
+                                    <template v-for="(col, i) in cols" :key="i">
+                                        <li>
+                                            <div class="flex items-center px-4 py-1">
+                                                <label class="cursor-pointer mb-0">
+                                                    <input type="checkbox" class="form-checkbox" :id="`chk-${i}`"
+                                                        :value="col.field" @change="col.hide = !$event.target.checked"
+                                                        :checked="!col.hide" />
+                                                    <span :for="`chk-${i}`" class="ltr:ml-2 rtl:mr-2">{{ col.title
+                                                        }}</span>
+                                                </label>
+                                            </div>
+                                        </li>
+                                    </template>
+                                </ul>
+                            </template>
+                        </Popper>
+                    </div>
+                    <div>
+                        <input v-model="search" type="text" class="form-input" placeholder="Search..." />
+                    </div>
+                </div>
+            </div>
+
+            <div class="datatable">
+                <vue3-datatable :rows="rows" :columns="cols" :totalRows="rows?.length" :sortable="true" :search="search"
+                    style="min-height: 500px; " skin="whitespace-nowrap bh-table-hover"
+                    firstArrow='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-4.5 h-4.5 rtl:rotate-180"> <path d="M13 19L7 12L13 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> <path opacity="0.5" d="M16.9998 19L10.9998 12L16.9998 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg>'
+                    lastArrow='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-4.5 h-4.5 rtl:rotate-180"> <path d="M11 19L17 12L11 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> <path opacity="0.5" d="M6.99976 19L12.9998 12L6.99976 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg> '
+                    previousArrow='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-4.5 h-4.5 rtl:rotate-180"> <path d="M15 5L9 12L15 19" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg>'
+                    nextArrow='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-4.5 h-4.5 rtl:rotate-180"> <path d="M9 5L15 12L9 19" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg>'>
+                    <!--  <template #transfer_time="data">
+                        {{ formatDate(data.value.transfer_time) }}
+                    </template> -->
+                    <template #warehouse_id="data">
+                        {{ warehouseName(data.value.warehouse_id) }}
+                    </template>
+                    <!-- <template #out_warehouse_id="data">
+                        {{ warehouseName(data.value.out_warehouse_id) }}
+                    </template> -->
+                    <template #send_type="data">
+                        {{ deliveryName(data.value.send_type) }}
+                    </template>
+                    <!-- <template #order_vo.pay_type="data">
+                        {{ collectingAccountName(data.value.order_vo.pay_type) }}
+                    </template>-->
+
+                    <template #status="data">
+                        {{ typeName(data.value.status) }}
+                    </template>
+                    <!-- 定义操作栏的模板 -->
+                    <!-- <template #actions="data">
+                        <button v-if="data.value.status !== 'HAS_HANDLE'" @click="deliveryOrder(data)"
+                            class="btn btn-primary m-0">编辑</button>
+                    </template>
+                    <template #isActive="">
+                     
+                    </template> -->
+                </vue3-datatable>
+                <el-pagination v-model:current-page="params.page_no" :page-size="params.page_size" :small="true"
+                    layout="total, prev, pager, next" :total="totalRows" @size-change="handleSizeChange"
+                    @current-change="handleCurrentChange" />
+            </div>
+        </div>
+    </div>
+</template>
+<script setup lang="ts">
+import { ref, onMounted } from 'vue';
+import Vue3Datatable from '@bhplugin/vue3-datatable';
+import { useAppStore } from '@/stores/index';
+import { useRouter } from 'vue-router';
+import { useMeta } from '@/composables/use-meta';
+import { pageListAPI, infoApi, dictionaryAPI } from '@/api/api'
+import IconBell from '@/components/icon/icon-bell.vue';
+import IconCaretDown from '@/components/icon/icon-caret-down.vue';
+
+
+useMeta({ title: 'Column Chooser Table' });
+const router = useRouter();
+const store = useAppStore();
+const search = ref('');
+const rows: any = ref([]); // 初始化rows为响应式引用
+const customerList: any = ref([])//初始化客户列表
+const warehouseList: any = ref([])//初始化客户列表
+const collectingAccountList: any = ref([])//初始化客户列表
+const deliveryList: any = ref([])//初始化客户列表
+const orderTypeList: any = ref([])//初始化客户列表
+const cols: any = ref([
+    { field: 'sn', title: '报损单编号', isUnique: true, hide: false },
+    { field: 'report_time', title: '报损日期', hide: false },
+    { field: 'warehouse_id', title: '仓库', hide: false },
+    { field: 'status', title: '状态', hide: false },
+    /*  { field: 'send_type', title: '配送方式', hide: false },
+     { field: 'status', title: '状态', hide: false }, 
+    { field: 'actions', title: '操作', hide: true }*/
+]);
+const params: any = ref([
+    { page_no: 1, page_size: 10 }
+])
+const totalRows: any = ref(0);
+const goIndex=()=>{
+    router.replace({
+        name: 'home',
+    });
+}
+const handleSizeChange = (val: number) => {
+
+    console.log(`${val} items per page`)
+}
+const handleCurrentChange = (val: number) => {
+    params.page_no = val
+    init()
+    console.log(`current page: ${val}`)
+}
+/* 处理订单时间格式 */
+const formatDate = (date) => {
+    if (date) {
+        const dt = new Date(date * 1000);
+        const month = dt.getMonth() + 1 < 10 ? '0' + (dt.getMonth() + 1) : dt.getMonth() + 1;
+        const day = dt.getDate() < 10 ? '0' + dt.getDate() : dt.getDate();
+        return dt.getFullYear() + '/' + month + '/' + day;
+    }
+    return '';
+};
+/* 处理客户名称 */
+const customerName = (value) => {
+    if (value && customerList.value && customerList.value.data && customerList.value.data.data) {
+        const type = customerList.value.data.data.find(type => type.id === value);
+        return type ? type.name : '';
+    }
+}
+/* 仓库名称 */
+const warehouseName = (value) => {
+    if (value && warehouseList.value && warehouseList.value.data) {
+        const type = warehouseList.value.data.find(type => type.id === value);
+        return type ? type.name : '';
+    }
+}
+/* 配送方式*/
+const deliveryName = (value) => {
+    if (value && deliveryList.value && deliveryList.value.data && deliveryList.value.data.data) {
+        const type = deliveryList.value.data.data.find(type => type.id === value);
+        return type ? type.name : '';
+    }
+}
+/* 状态*/
+const typeName = (value) => {
+    if (value) {
+        return value == 'HAS_HANDLE' ? '已处理' : '未处理';
+    }
+}
+onMounted(() => {
+    init()
+    getInforList()
+});
+/* 获取调拨列表 */
+const init = async () => {
+    pageListAPI.inventoryLossList({ page_no: params.page_no, page_size: params.page_size }).then((res: any) => {
+        params.page_no = res.data.page_no
+        params.page_size = res.data.page_size
+        totalRows.value = res.data.data_total
+        rows.value = res.data.data; // 更新rows的值
+    });
+};
+/* 获取仓库,字典,客户信息 */
+const getInforList = async () => {
+    warehouseList.value = await infoApi.warehouseList({})//获取仓库列表
+    deliveryList.value = await dictionaryAPI.getExpressList(params)//获取配送方式
+    /*  customerList.value = await infoApi.customer({})//获取客户列表
+     collectingAccountList.value = await infoApi.collectingAccount({})//获取支付方式列表*/
+    orderTypeList.value = await dictionaryAPI.getPage({ dictType: "transfer_status" })//获取状态 
+}
+const deliveryOrder = async (row) => {
+    router.replace({
+        name: 'addInventory',
+        params: { id: row.value.id }
+    });
+}
+</script>
+<style>
+.bh-pagination {
+    display: none !important;
+}
+</style>

+ 219 - 0
src/views/list/locationArea.vue

@@ -0,0 +1,219 @@
+<template>
+    <div>
+          <ul class="flex space-x-2 rtl:space-x-reverse">
+            <li>
+                <a href="javascript:;" class="text-primary hover:underline" @click="goIndex">首页</a>
+            </li>
+           <!--  <li class="before:content-['/'] ltr:before:mr-2 rtl:before:ml-2">
+                <span>订单列表</span>
+            </li>-->
+        </ul> 
+
+        <div class="panel pb-0 mt-6">
+
+            <div class="flex md:items-center md:flex-row flex-col mb-5 gap-5">
+
+                <div class="flex items-center gap-5 ltr:ml-auto rtl:mr-auto">
+                    <div class="dropdown">
+                        <Popper :placement="store.rtlClass === 'rtl' ? 'bottom-end' : 'bottom-start'" offsetDistance="0"
+                            class="align-middle">
+                            <button type="button"
+                                class="whitespace-nowrap flex items-center border font-semibold border-[#e0e6ed] dark:border-[#253b5c] rounded-md px-4 py-2 text-sm dark:bg-[#1b2e4b] dark:text-white-dark">
+                                <span class="ltr:mr-1 rtl:ml-1">选择</span>
+                                <icon-caret-down class="w-5 h-5" />
+                            </button>
+                            <template #content>
+                                <ul class="whitespace-nowrap">
+                                    <template v-for="(col, i) in cols" :key="i">
+                                        <li>
+                                            <div class="flex items-center px-4 py-1">
+                                                <label class="cursor-pointer mb-0">
+                                                    <input type="checkbox" class="form-checkbox" :id="`chk-${i}`"
+                                                        :value="col.field" @change="col.hide = !$event.target.checked"
+                                                        :checked="!col.hide" />
+                                                    <span :for="`chk-${i}`" class="ltr:ml-2 rtl:mr-2">{{ col.title
+                                                        }}</span>
+                                                </label>
+                                            </div>
+                                        </li>
+                                    </template>
+                                </ul>
+                            </template>
+                        </Popper>
+                    </div>
+                    <div>
+                        <input v-model="search" type="text" class="form-input" placeholder="Search..." />
+                    </div>
+                </div>
+            </div>
+
+            <div class="datatable"><!-- :totalRows="rows?.length" -->
+                <vue3-datatable :rows="rows" :columns="cols" :sortable="true" :search="search"
+                    style="min-height: 500px; " :show-pagination="false" skin="whitespace-nowrap bh-table-hover"
+                    firstArrow='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-4.5 h-4.5 rtl:rotate-180"> <path d="M13 19L7 12L13 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> <path opacity="0.5" d="M16.9998 19L10.9998 12L16.9998 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg>'
+                    lastArrow='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-4.5 h-4.5 rtl:rotate-180"> <path d="M11 19L17 12L11 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> <path opacity="0.5" d="M6.99976 19L12.9998 12L6.99976 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg> '
+                    previousArrow='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-4.5 h-4.5 rtl:rotate-180"> <path d="M15 5L9 12L15 19" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg>'
+                    nextArrow='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-4.5 h-4.5 rtl:rotate-180"> <path d="M9 5L15 12L9 19" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg>'>
+                     <template #type="data">
+                        {{ deliveryName(data.value.type) }}
+                    </template>
+                    <template #warehouse_id="data">
+                        {{ warehouseName(data.value.warehouse_id) }}
+                    </template>
+                    <!-- <template #out_warehouse_id="data">
+                        {{ warehouseName(data.value.out_warehouse_id) }}
+                    </template> -->
+                    <!-- <template #send_type="data">
+                        {{ deliveryName(data.value.send_type) }}
+                    </template>
+                    <template #order_vo.pay_type="data">
+                        {{ collectingAccountName(data.value.order_vo.pay_type) }}
+                    </template>
+
+                    <template #status="data">
+                        {{ typeName(data.value.status) }}
+                    </template>-->
+                    <!-- 定义操作栏的模板 
+                    <template #actions="data">
+                        <button v-if="data.value.status !== 'HAS_HANDLE'" @click="deliveryOrder(data)"
+                            class="btn btn-primary m-0">编辑</button>
+                    </template>
+                    <template #isActive="">
+                     
+                    </template>-->
+                    <template #pagination>
+                      
+                    </template>
+                </vue3-datatable>
+                <el-pagination v-model:current-page="params.page_no" :page-size="params.page_size" :small="true"
+                    layout="total, prev, pager, next" :total="totalRows" @size-change="handleSizeChange"
+                    @current-change="handleCurrentChange" />
+            </div>
+        </div>
+    </div>
+</template>
+<script setup lang="ts">
+import { ref, onMounted } from 'vue';
+import Vue3Datatable from '@bhplugin/vue3-datatable';
+import { useAppStore } from '@/stores/index';
+import { useRouter } from 'vue-router';
+import { useMeta } from '@/composables/use-meta';
+import { pageListAPI, infoApi, dictionaryAPI } from '@/api/api'
+import IconBell from '@/components/icon/icon-bell.vue';
+import IconCaretDown from '@/components/icon/icon-caret-down.vue';
+
+
+useMeta({ title: 'Column Chooser Table' });
+const router = useRouter();
+const store = useAppStore();
+const search = ref('');
+const rows: any = ref([]); // 初始化rows为响应式引用
+const customerList: any = ref([])//初始化客户列表
+const warehouseList: any = ref([])//初始化客户列表
+const collectingAccountList: any = ref([])//初始化客户列表
+const deliveryList: any = ref([])//初始化客户列表
+const orderTypeList: any = ref([])//初始化客户列表
+const cols: any = ref([
+    { field: 'code', title: '区域编号', hide: true },
+    { field: 'name', title: '名称', hide: false },
+    { field: 'remark', title: '备注', hide: false },
+   /* { field: 'type', title: '库位区域', hide: true },
+    { field: 'bind_num', title: '已绑定sku数', hide: true },
+     { field: 'actual_stock', title: '实际库存', hide: false },
+    { field: 'usable_stock', title: '可用库存', hide: true },
+    { field: 'transit_stock', title: '在途库存', hide: true },
+    { field: 'locked_stock', title: '冻结库存', hide: true },
+    { field: 'warning_stock', title: '预警库存', hide: true } */
+]);
+const params: any = ref([
+    { page_no: 1, page_size: 10 }
+])
+const totalRows: any = ref(0);
+
+const goIndex=()=>{
+    router.replace({
+        name: 'home',
+    });
+}
+const handleSizeChange = (val: number) => {
+
+    console.log(`${val} items per page`)
+}
+const handleCurrentChange = (val: number) => {
+    params.page_no = val
+    init()
+    console.log(`current page: ${val}`)
+}
+/* 处理订单时间格式 */
+const formatDate = (date) => {
+    if (date) {
+        const dt = new Date(date * 1000);
+        const month = dt.getMonth() + 1 < 10 ? '0' + (dt.getMonth() + 1) : dt.getMonth() + 1;
+        const day = dt.getDate() < 10 ? '0' + dt.getDate() : dt.getDate();
+        return dt.getFullYear() + '/' + month + '/' + day;
+    }
+    return '';
+};
+/* 处理客户名称 */
+const customerName = (value) => {
+    if (value && customerList.value && customerList.value.data && customerList.value.data.data) {
+        const type = customerList.value.data.data.find(type => type.id === value);
+        return type ? type.name : '';
+    }
+}
+/* 仓库名称 */
+const warehouseName = (value) => {
+    if (value && warehouseList.value && warehouseList.value.data) {
+        const type = warehouseList.value.data.find(type => type.id === value);
+        return type ? type.name : '';
+    }
+}
+/* 配送方式*/
+const deliveryName = (value) => {
+    if (value && deliveryList.value && deliveryList.value.data ) {
+        const type = deliveryList.value.data.find(type => type.code === value);
+        return type ? type.name : '';
+    }
+}
+/* 状态*/
+const typeName = (value) => {
+    if (value) {
+        return value == 'HAS_HANDLE' ? '已处理' : '未处理';
+    }
+}
+onMounted(() => {
+    init()
+    getInforList()
+});
+/* 获取库存列表 */
+const init = async () => {
+   
+    pageListAPI.listAreaType({page_no:params.page_no,page_size:params.page_size}).then((res: any) => {
+        params.page_no = res.data.page_no
+        params.page_size = res.data.page_size
+        totalRows.value = res.data.data_total
+        rows.value = res.data; // 更新rows的值
+    });
+};
+/* 获取仓库,字典,客户信息 */
+const getInforList = async () => {
+    warehouseList.value = await infoApi.warehouseList({})//获取仓库列表
+    deliveryList.value = await dictionaryAPI.listAreaType(params)//获取配送方式
+    /*  customerList.value = await infoApi.customer({})//获取客户列表
+     collectingAccountList.value = await infoApi.collectingAccount({})//获取支付方式列表*/
+    orderTypeList.value = await dictionaryAPI.getPage({ dictType: "transfer_status" })//获取状态 
+}
+const deliveryOrder = async (row) => {
+    router.replace({
+        name: 'addInventory',
+        params: { id: row.value.id }
+    });
+}
+</script>
+<style>
+.bh-pagination {
+    display: none !important;
+}
+</style>
+
+

+ 219 - 0
src/views/list/locationList.vue

@@ -0,0 +1,219 @@
+<template>
+    <div>
+          <ul class="flex space-x-2 rtl:space-x-reverse">
+            <li>
+                <a href="javascript:;" class="text-primary hover:underline" @click="goIndex">首页</a>
+            </li>
+           <!--  <li class="before:content-['/'] ltr:before:mr-2 rtl:before:ml-2">
+                <span>订单列表</span>
+            </li>-->
+        </ul> 
+
+        <div class="panel pb-0 mt-6">
+
+            <div class="flex md:items-center md:flex-row flex-col mb-5 gap-5">
+
+                <div class="flex items-center gap-5 ltr:ml-auto rtl:mr-auto">
+                    <div class="dropdown">
+                        <Popper :placement="store.rtlClass === 'rtl' ? 'bottom-end' : 'bottom-start'" offsetDistance="0"
+                            class="align-middle">
+                            <button type="button"
+                                class="whitespace-nowrap flex items-center border font-semibold border-[#e0e6ed] dark:border-[#253b5c] rounded-md px-4 py-2 text-sm dark:bg-[#1b2e4b] dark:text-white-dark">
+                                <span class="ltr:mr-1 rtl:ml-1">选择</span>
+                                <icon-caret-down class="w-5 h-5" />
+                            </button>
+                            <template #content>
+                                <ul class="whitespace-nowrap">
+                                    <template v-for="(col, i) in cols" :key="i">
+                                        <li>
+                                            <div class="flex items-center px-4 py-1">
+                                                <label class="cursor-pointer mb-0">
+                                                    <input type="checkbox" class="form-checkbox" :id="`chk-${i}`"
+                                                        :value="col.field" @change="col.hide = !$event.target.checked"
+                                                        :checked="!col.hide" />
+                                                    <span :for="`chk-${i}`" class="ltr:ml-2 rtl:mr-2">{{ col.title
+                                                        }}</span>
+                                                </label>
+                                            </div>
+                                        </li>
+                                    </template>
+                                </ul>
+                            </template>
+                        </Popper>
+                    </div>
+                    <div>
+                        <input v-model="search" type="text" class="form-input" placeholder="Search..." />
+                    </div>
+                </div>
+            </div>
+
+            <div class="datatable"><!-- :totalRows="rows?.length" -->
+                <vue3-datatable :rows="rows" :columns="cols" :sortable="true" :search="search"
+                    style="min-height: 500px; " :show-pagination="false" skin="whitespace-nowrap bh-table-hover"
+                    firstArrow='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-4.5 h-4.5 rtl:rotate-180"> <path d="M13 19L7 12L13 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> <path opacity="0.5" d="M16.9998 19L10.9998 12L16.9998 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg>'
+                    lastArrow='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-4.5 h-4.5 rtl:rotate-180"> <path d="M11 19L17 12L11 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> <path opacity="0.5" d="M6.99976 19L12.9998 12L6.99976 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg> '
+                    previousArrow='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-4.5 h-4.5 rtl:rotate-180"> <path d="M15 5L9 12L15 19" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg>'
+                    nextArrow='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-4.5 h-4.5 rtl:rotate-180"> <path d="M9 5L15 12L9 19" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg>'>
+                     <template #type="data">
+                        {{ deliveryName(data.value.type) }}
+                    </template>
+                    <template #warehouse_id="data">
+                        {{ warehouseName(data.value.warehouse_id) }}
+                    </template>
+                    <!-- <template #out_warehouse_id="data">
+                        {{ warehouseName(data.value.out_warehouse_id) }}
+                    </template> -->
+                    <!-- <template #send_type="data">
+                        {{ deliveryName(data.value.send_type) }}
+                    </template>
+                    <template #order_vo.pay_type="data">
+                        {{ collectingAccountName(data.value.order_vo.pay_type) }}
+                    </template>
+
+                    <template #status="data">
+                        {{ typeName(data.value.status) }}
+                    </template>-->
+                    <!-- 定义操作栏的模板 
+                    <template #actions="data">
+                        <button v-if="data.value.status !== 'HAS_HANDLE'" @click="deliveryOrder(data)"
+                            class="btn btn-primary m-0">编辑</button>
+                    </template>
+                    <template #isActive="">
+                     
+                    </template>-->
+                    <template #pagination>
+                      
+                    </template>
+                </vue3-datatable>
+                <el-pagination v-model:current-page="params.page_no" :page-size="params.page_size" :small="true"
+                    layout="total, prev, pager, next" :total="totalRows" @size-change="handleSizeChange"
+                    @current-change="handleCurrentChange" />
+            </div>
+        </div>
+    </div>
+</template>
+<script setup lang="ts">
+import { ref, onMounted } from 'vue';
+import Vue3Datatable from '@bhplugin/vue3-datatable';
+import { useAppStore } from '@/stores/index';
+import { useRouter } from 'vue-router';
+import { useMeta } from '@/composables/use-meta';
+import { pageListAPI, infoApi, dictionaryAPI } from '@/api/api'
+import IconBell from '@/components/icon/icon-bell.vue';
+import IconCaretDown from '@/components/icon/icon-caret-down.vue';
+
+
+useMeta({ title: 'Column Chooser Table' });
+const router = useRouter();
+const store = useAppStore();
+const search = ref('');
+const rows: any = ref([]); // 初始化rows为响应式引用
+const customerList: any = ref([])//初始化客户列表
+const warehouseList: any = ref([])//初始化客户列表
+const collectingAccountList: any = ref([])//初始化客户列表
+const deliveryList: any = ref([])//初始化客户列表
+const orderTypeList: any = ref([])//初始化客户列表
+const cols: any = ref([
+    { field: 'warehouse.sn', title: '仓库编号', hide: true },
+    { field: 'warehouse_id', title: '仓库名称', hide: false },
+    { field: 'code', title: '库位号', hide: false },
+    { field: 'type', title: '库位区域', hide: true },
+    { field: 'bind_num', title: '已绑定sku数', hide: true },
+    /* { field: 'actual_stock', title: '实际库存', hide: false },
+    { field: 'usable_stock', title: '可用库存', hide: true },
+    { field: 'transit_stock', title: '在途库存', hide: true },
+    { field: 'locked_stock', title: '冻结库存', hide: true },
+    { field: 'warning_stock', title: '预警库存', hide: true } */
+]);
+const params: any = ref([
+    { page_no: 1, page_size: 10 }
+])
+const totalRows: any = ref(0);
+
+const goIndex=()=>{
+    router.replace({
+        name: 'home',
+    });
+}
+const handleSizeChange = (val: number) => {
+
+    console.log(`${val} items per page`)
+}
+const handleCurrentChange = (val: number) => {
+    params.page_no = val
+    init()
+    console.log(`current page: ${val}`)
+}
+/* 处理订单时间格式 */
+const formatDate = (date) => {
+    if (date) {
+        const dt = new Date(date * 1000);
+        const month = dt.getMonth() + 1 < 10 ? '0' + (dt.getMonth() + 1) : dt.getMonth() + 1;
+        const day = dt.getDate() < 10 ? '0' + dt.getDate() : dt.getDate();
+        return dt.getFullYear() + '/' + month + '/' + day;
+    }
+    return '';
+};
+/* 处理客户名称 */
+const customerName = (value) => {
+    if (value && customerList.value && customerList.value.data && customerList.value.data.data) {
+        const type = customerList.value.data.data.find(type => type.id === value);
+        return type ? type.name : '';
+    }
+}
+/* 仓库名称 */
+const warehouseName = (value) => {
+    if (value && warehouseList.value && warehouseList.value.data) {
+        const type = warehouseList.value.data.find(type => type.id === value);
+        return type ? type.name : '';
+    }
+}
+/* 配送方式*/
+const deliveryName = (value) => {
+    if (value && deliveryList.value && deliveryList.value.data ) {
+        const type = deliveryList.value.data.find(type => type.code === value);
+        return type ? type.name : '';
+    }
+}
+/* 状态*/
+const typeName = (value) => {
+    if (value) {
+        return value == 'HAS_HANDLE' ? '已处理' : '未处理';
+    }
+}
+onMounted(() => {
+    init()
+    getInforList()
+});
+/* 获取库存列表 */
+const init = async () => {
+    console.log(params);
+    pageListAPI.queryList({page_no:params.page_no,page_size:params.page_size}).then((res: any) => {
+        params.page_no = res.data.page_no
+        params.page_size = res.data.page_size
+        totalRows.value = res.data.data_total
+        rows.value = res.data.data; // 更新rows的值
+    });
+};
+/* 获取仓库,字典,客户信息 */
+const getInforList = async () => {
+    warehouseList.value = await infoApi.warehouseList({})//获取仓库列表
+    deliveryList.value = await dictionaryAPI.listAreaType(params)//获取配送方式
+    /*  customerList.value = await infoApi.customer({})//获取客户列表
+     collectingAccountList.value = await infoApi.collectingAccount({})//获取支付方式列表*/
+    orderTypeList.value = await dictionaryAPI.getPage({ dictType: "transfer_status" })//获取状态 
+}
+const deliveryOrder = async (row) => {
+    router.replace({
+        name: 'addInventory',
+        params: { id: row.value.id }
+    });
+}
+</script>
+<style>
+.bh-pagination {
+    display: none !important;
+}
+</style>
+
+

+ 218 - 0
src/views/list/orderList.vue

@@ -0,0 +1,218 @@
+<template>
+    <div>
+          <ul class="flex space-x-2 rtl:space-x-reverse">
+            <li>
+                <a href="javascript:;" class="text-primary hover:underline" @click="goIndex">首页</a>
+            </li>
+            <li class="before:content-['/'] ltr:before:mr-2 rtl:before:ml-2">
+                <span>订单列表</span>
+            </li>
+        </ul> 
+
+        <div class="panel pb-0 mt-6">
+
+            <div class="flex md:items-center md:flex-row flex-col mb-5 gap-5">
+
+                <div class="flex items-center gap-5 ltr:ml-auto rtl:mr-auto">
+                    <div class="dropdown">
+                        <Popper :placement="store.rtlClass === 'rtl' ? 'bottom-end' : 'bottom-start'" offsetDistance="0"
+                            class="align-middle">
+                            <button type="button"
+                                class="whitespace-nowrap flex items-center border font-semibold border-[#e0e6ed] dark:border-[#253b5c] rounded-md px-4 py-2 text-sm dark:bg-[#1b2e4b] dark:text-white-dark">
+                                <span class="ltr:mr-1 rtl:ml-1">选择</span>
+                                <icon-caret-down class="w-5 h-5" />
+                            </button>
+                            <template #content>
+                                <ul class="whitespace-nowrap">
+                                    <template v-for="(col, i) in cols" :key="i">
+                                        <li>
+                                            <div class="flex items-center px-4 py-1">
+                                                <label class="cursor-pointer mb-0">
+                                                    <input type="checkbox" class="form-checkbox" :id="`chk-${i}`"
+                                                        :value="col.field" @change="col.hide = !$event.target.checked"
+                                                        :checked="!col.hide" />
+                                                    <span :for="`chk-${i}`" class="ltr:ml-2 rtl:mr-2">{{ col.title
+                                                        }}</span>
+                                                </label>
+                                            </div>
+                                        </li>
+                                    </template>
+                                </ul>
+                            </template>
+                        </Popper>
+                    </div>
+                    <div>
+                        <input v-model="search" type="text" class="form-input" placeholder="Search..." />
+                    </div>
+                </div>
+            </div>
+
+            <div class="datatable"><!-- :totalRows="rows?.length" -->
+                <vue3-datatable :rows="rows" :columns="cols" :sortable="true" :search="search"
+                    style="min-height: 500px; " :show-pagination="false" skin="whitespace-nowrap bh-table-hover"
+                    firstArrow='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-4.5 h-4.5 rtl:rotate-180"> <path d="M13 19L7 12L13 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> <path opacity="0.5" d="M16.9998 19L10.9998 12L16.9998 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg>'
+                    lastArrow='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-4.5 h-4.5 rtl:rotate-180"> <path d="M11 19L17 12L11 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> <path opacity="0.5" d="M6.99976 19L12.9998 12L6.99976 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg> '
+                    previousArrow='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-4.5 h-4.5 rtl:rotate-180"> <path d="M15 5L9 12L15 19" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg>'
+                    nextArrow='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-4.5 h-4.5 rtl:rotate-180"> <path d="M9 5L15 12L9 19" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg>'>
+                    <!--  <template #transfer_time="data">
+                        {{ formatDate(data.value.transfer_time) }}
+                    </template> -->
+                    <template #warehouse_id="data">
+                        {{ warehouseName(data.value.warehouse_id) }}
+                    </template>
+                    <!-- <template #out_warehouse_id="data">
+                        {{ warehouseName(data.value.out_warehouse_id) }}
+                    </template> -->
+                    <template #send_type="data">
+                        {{ deliveryName(data.value.send_type) }}
+                    </template>
+                    <!-- <template #order_vo.pay_type="data">
+                        {{ collectingAccountName(data.value.order_vo.pay_type) }}
+                    </template>-->
+
+                    <template #status="data">
+                        {{ typeName(data.value.status) }}
+                    </template>
+                    <!-- 定义操作栏的模板 -->
+                    <template #actions="data">
+                        <button v-if="data.value.status !== 'HAS_HANDLE'" @click="deliveryOrder(data)"
+                            class="btn btn-primary m-0">编辑</button>
+                    </template>
+                    <template #isActive="">
+                        <!--  <span class="capitalize" :class="data.value.isActive ? 'text-success' : 'text-danger'">{{
+                            data._rawValue }}</span> -->
+                    </template>
+                    <template #pagination>
+                        <!-- 这里什么也不放,或者放一个空的div -->
+                    </template>
+                </vue3-datatable>
+                <el-pagination v-model:current-page="params.page_no" :page-size="params.page_size" :small="true"
+                    layout="total, prev, pager, next" :total="totalRows" @size-change="handleSizeChange"
+                    @current-change="handleCurrentChange" />
+            </div>
+        </div>
+    </div>
+</template>
+<script setup lang="ts">
+import { ref, onMounted } from 'vue';
+import Vue3Datatable from '@bhplugin/vue3-datatable';
+import { useAppStore } from '@/stores/index';
+import { useRouter } from 'vue-router';
+import { useMeta } from '@/composables/use-meta';
+import { pageListAPI, infoApi, dictionaryAPI } from '@/api/api'
+import IconBell from '@/components/icon/icon-bell.vue';
+import IconCaretDown from '@/components/icon/icon-caret-down.vue';
+
+
+useMeta({ title: 'Column Chooser Table' });
+const router = useRouter();
+const store = useAppStore();
+const search = ref('');
+const rows: any = ref([]); // 初始化rows为响应式引用
+const customerList: any = ref([])//初始化客户列表
+const warehouseList: any = ref([])//初始化客户列表
+const collectingAccountList: any = ref([])//初始化客户列表
+const deliveryList: any = ref([])//初始化客户列表
+const orderTypeList: any = ref([])//初始化客户列表
+const cols: any = ref([
+    { field: 'sn', title: '订单编号', hide: false },
+    { field: 'member_id', title: '客户', hide: true },//isUnique: true,
+    { field: 'order_time', title: '下单时间', hide: false },
+    { field: 'warehouse_id', title: '仓库名称', hide: true },
+    { field: 'send_type', title: '配送方式', hide: true },
+    { field: 'pay_type', title: '付款方式', hide: false },
+    { field: 'pay_price', title: '实付金额', hide: true },
+    { field: 'status', title: '订单状态', hide: true },
+    { field: 'extension', title: '延期次数', hide: true },
+    { field: 'type', title: '订单类型', hide: true }
+]);
+const params: any = ref([
+    { page_no: 1, page_size: 10 }
+])
+const totalRows: any = ref(0);
+
+const goIndex=()=>{
+    router.replace({
+        name: 'home',
+    });
+}
+const handleSizeChange = (val: number) => {
+
+    console.log(`${val} items per page`)
+}
+const handleCurrentChange = (val: number) => {
+    params.page_no = val
+    init()
+    console.log(`current page: ${val}`)
+}
+/* 处理订单时间格式 */
+const formatDate = (date) => {
+    if (date) {
+        const dt = new Date(date * 1000);
+        const month = dt.getMonth() + 1 < 10 ? '0' + (dt.getMonth() + 1) : dt.getMonth() + 1;
+        const day = dt.getDate() < 10 ? '0' + dt.getDate() : dt.getDate();
+        return dt.getFullYear() + '/' + month + '/' + day;
+    }
+    return '';
+};
+/* 处理客户名称 */
+const customerName = (value) => {
+    if (value && customerList.value && customerList.value.data && customerList.value.data.data) {
+        const type = customerList.value.data.data.find(type => type.id === value);
+        return type ? type.name : '';
+    }
+}
+/* 仓库名称 */
+const warehouseName = (value) => {
+    if (value && warehouseList.value && warehouseList.value.data) {
+        const type = warehouseList.value.data.find(type => type.id === value);
+        return type ? type.name : '';
+    }
+}
+/* 配送方式*/
+const deliveryName = (value) => {
+    if (value && deliveryList.value && deliveryList.value.data && deliveryList.value.data.data) {
+        const type = deliveryList.value.data.data.find(type => type.id === value);
+        return type ? type.name : '';
+    }
+}
+/* 状态*/
+const typeName = (value) => {
+    if (value) {
+        return value == 'HAS_HANDLE' ? '已处理' : '未处理';
+    }
+}
+onMounted(() => {
+    init()
+    getInforList()
+});
+/* 获取库存列表 */
+const init = async () => {
+    console.log(params);
+    pageListAPI.orderList({page_no:params.page_no,page_size:params.page_size}).then((res: any) => {
+        params.page_no = res.data.page_no
+        params.page_size = res.data.page_size
+        totalRows.value = res.data.data_total
+        rows.value = res.data.data; // 更新rows的值
+    });
+};
+/* 获取仓库,字典,客户信息 */
+const getInforList = async () => {
+    warehouseList.value = await infoApi.warehouseList({})//获取仓库列表
+    deliveryList.value = await dictionaryAPI.getExpressList(params)//获取配送方式
+    /*  customerList.value = await infoApi.customer({})//获取客户列表
+     collectingAccountList.value = await infoApi.collectingAccount({})//获取支付方式列表*/
+    orderTypeList.value = await dictionaryAPI.getPage({ dictType: "transfer_status" })//获取状态 
+}
+const deliveryOrder = async (row) => {
+    router.replace({
+        name: 'addInventory',
+        params: { id: row.value.id }
+    });
+}
+</script>
+<style>
+.bh-pagination {
+    display: none !important;
+}
+</style>

+ 219 - 0
src/views/list/warehouseList.vue

@@ -0,0 +1,219 @@
+<template>
+    <div>
+          <ul class="flex space-x-2 rtl:space-x-reverse">
+            <li>
+                <a href="javascript:;" class="text-primary hover:underline" @click="goIndex">首页</a>
+            </li>
+           <!--  <li class="before:content-['/'] ltr:before:mr-2 rtl:before:ml-2">
+                <span>订单列表</span>
+            </li>-->
+        </ul> 
+
+        <div class="panel pb-0 mt-6">
+
+            <div class="flex md:items-center md:flex-row flex-col mb-5 gap-5">
+
+                <div class="flex items-center gap-5 ltr:ml-auto rtl:mr-auto">
+                    <div class="dropdown">
+                        <Popper :placement="store.rtlClass === 'rtl' ? 'bottom-end' : 'bottom-start'" offsetDistance="0"
+                            class="align-middle">
+                            <button type="button"
+                                class="whitespace-nowrap flex items-center border font-semibold border-[#e0e6ed] dark:border-[#253b5c] rounded-md px-4 py-2 text-sm dark:bg-[#1b2e4b] dark:text-white-dark">
+                                <span class="ltr:mr-1 rtl:ml-1">选择</span>
+                                <icon-caret-down class="w-5 h-5" />
+                            </button>
+                            <template #content>
+                                <ul class="whitespace-nowrap">
+                                    <template v-for="(col, i) in cols" :key="i">
+                                        <li>
+                                            <div class="flex items-center px-4 py-1">
+                                                <label class="cursor-pointer mb-0">
+                                                    <input type="checkbox" class="form-checkbox" :id="`chk-${i}`"
+                                                        :value="col.field" @change="col.hide = !$event.target.checked"
+                                                        :checked="!col.hide" />
+                                                    <span :for="`chk-${i}`" class="ltr:ml-2 rtl:mr-2">{{ col.title
+                                                        }}</span>
+                                                </label>
+                                            </div>
+                                        </li>
+                                    </template>
+                                </ul>
+                            </template>
+                        </Popper>
+                    </div>
+                    <div>
+                        <input v-model="search" type="text" class="form-input" placeholder="Search..." />
+                    </div>
+                </div>
+            </div>
+
+            <div class="datatable"><!-- :totalRows="rows?.length" -->
+                <vue3-datatable :rows="rows" :columns="cols" :sortable="true" :search="search"
+                    style="min-height: 500px; " :show-pagination="false" skin="whitespace-nowrap bh-table-hover"
+                    firstArrow='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-4.5 h-4.5 rtl:rotate-180"> <path d="M13 19L7 12L13 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> <path opacity="0.5" d="M16.9998 19L10.9998 12L16.9998 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg>'
+                    lastArrow='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-4.5 h-4.5 rtl:rotate-180"> <path d="M11 19L17 12L11 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> <path opacity="0.5" d="M6.99976 19L12.9998 12L6.99976 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg> '
+                    previousArrow='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-4.5 h-4.5 rtl:rotate-180"> <path d="M15 5L9 12L15 19" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg>'
+                    nextArrow='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-4.5 h-4.5 rtl:rotate-180"> <path d="M9 5L15 12L9 19" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg>'>
+                     <template #type="data">
+                        {{ deliveryName(data.value.type) }}
+                    </template>
+                    <template #warehouse_id="data">
+                        {{ warehouseName(data.value.warehouse_id) }}
+                    </template>
+                    <!-- <template #out_warehouse_id="data">
+                        {{ warehouseName(data.value.out_warehouse_id) }}
+                    </template> -->
+                    <!-- <template #send_type="data">
+                        {{ deliveryName(data.value.send_type) }}
+                    </template>
+                    <template #order_vo.pay_type="data">
+                        {{ collectingAccountName(data.value.order_vo.pay_type) }}
+                    </template>
+
+                    <template #status="data">
+                        {{ typeName(data.value.status) }}
+                    </template>-->
+                    <!-- 定义操作栏的模板 
+                    <template #actions="data">
+                        <button v-if="data.value.status !== 'HAS_HANDLE'" @click="deliveryOrder(data)"
+                            class="btn btn-primary m-0">编辑</button>
+                    </template>
+                    <template #isActive="">
+                     
+                    </template>-->
+                    <template #pagination>
+                      
+                    </template>
+                </vue3-datatable>
+                <el-pagination v-model:current-page="params.page_no" :page-size="params.page_size" :small="true"
+                    layout="total, prev, pager, next" :total="totalRows" @size-change="handleSizeChange"
+                    @current-change="handleCurrentChange" />
+            </div>
+        </div>
+    </div>
+</template>
+<script setup lang="ts">
+import { ref, onMounted } from 'vue';
+import Vue3Datatable from '@bhplugin/vue3-datatable';
+import { useAppStore } from '@/stores/index';
+import { useRouter } from 'vue-router';
+import { useMeta } from '@/composables/use-meta';
+import { pageListAPI, infoApi, dictionaryAPI } from '@/api/api'
+import IconBell from '@/components/icon/icon-bell.vue';
+import IconCaretDown from '@/components/icon/icon-caret-down.vue';
+
+
+useMeta({ title: 'Column Chooser Table' });
+const router = useRouter();
+const store = useAppStore();
+const search = ref('');
+const rows: any = ref([]); // 初始化rows为响应式引用
+const customerList: any = ref([])//初始化客户列表
+const warehouseList: any = ref([])//初始化客户列表
+const collectingAccountList: any = ref([])//初始化客户列表
+const deliveryList: any = ref([])//初始化客户列表
+const orderTypeList: any = ref([])//初始化客户列表
+const cols: any = ref([
+    { field: 'sn', title: '仓库编号', hide: true },
+    { field: 'name', title: '仓库名称', hide: false },
+    { field: 'phone', title: '负责人手机号', hide: false },
+   /*  { field: 'type', title: '仓库地址', hide: true }, */
+    { field: 'description', title: '仓库说明', hide: true },
+    /* { field: 'actual_stock', title: '实际库存', hide: false },
+    { field: 'usable_stock', title: '可用库存', hide: true },
+    { field: 'transit_stock', title: '在途库存', hide: true },
+    { field: 'locked_stock', title: '冻结库存', hide: true },
+    { field: 'warning_stock', title: '预警库存', hide: true } */
+]);
+const params: any = ref([
+    { page_no: 1, page_size: 10 }
+])
+const totalRows: any = ref(0);
+
+const goIndex=()=>{
+    router.replace({
+        name: 'home',
+    });
+}
+const handleSizeChange = (val: number) => {
+
+    console.log(`${val} items per page`)
+}
+const handleCurrentChange = (val: number) => {
+    params.page_no = val
+    init()
+    console.log(`current page: ${val}`)
+}
+/* 处理订单时间格式 */
+const formatDate = (date) => {
+    if (date) {
+        const dt = new Date(date * 1000);
+        const month = dt.getMonth() + 1 < 10 ? '0' + (dt.getMonth() + 1) : dt.getMonth() + 1;
+        const day = dt.getDate() < 10 ? '0' + dt.getDate() : dt.getDate();
+        return dt.getFullYear() + '/' + month + '/' + day;
+    }
+    return '';
+};
+/* 处理客户名称 */
+const customerName = (value) => {
+    if (value && customerList.value && customerList.value.data && customerList.value.data.data) {
+        const type = customerList.value.data.data.find(type => type.id === value);
+        return type ? type.name : '';
+    }
+}
+/* 仓库名称 */
+const warehouseName = (value) => {
+    if (value && warehouseList.value && warehouseList.value.data) {
+        const type = warehouseList.value.data.find(type => type.id === value);
+        return type ? type.name : '';
+    }
+}
+/* 配送方式*/
+const deliveryName = (value) => {
+    if (value && deliveryList.value && deliveryList.value.data ) {
+        const type = deliveryList.value.data.find(type => type.code === value);
+        return type ? type.name : '';
+    }
+}
+/* 状态*/
+const typeName = (value) => {
+    if (value) {
+        return value == 'HAS_HANDLE' ? '已处理' : '未处理';
+    }
+}
+onMounted(() => {
+    init()
+    getInforList()
+});
+/* 获取库存列表 */
+const init = async () => {
+    console.log(params);
+    pageListAPI.warehouseList({page_no:params.page_no,page_size:params.page_size}).then((res: any) => {
+        params.page_no = res.data.page_no
+        params.page_size = res.data.page_size
+        totalRows.value = res.data.data_total
+        rows.value = res.data.data; // 更新rows的值
+    });
+};
+/* 获取仓库,字典,客户信息 */
+const getInforList = async () => {
+    warehouseList.value = await infoApi.warehouseList({})//获取仓库列表
+    deliveryList.value = await dictionaryAPI.listAreaType(params)//获取配送方式
+    /*  customerList.value = await infoApi.customer({})//获取客户列表
+     collectingAccountList.value = await infoApi.collectingAccount({})//获取支付方式列表*/
+    orderTypeList.value = await dictionaryAPI.getPage({ dictType: "transfer_status" })//获取状态 
+}
+const deliveryOrder = async (row) => {
+    router.replace({
+        name: 'addInventory',
+        params: { id: row.value.id }
+    });
+}
+</script>
+<style>
+.bh-pagination {
+    display: none !important;
+}
+</style>
+
+