修改实体类时间字段策略配置

- 将Customer、Medicine、MedicineCategory、Menu、Role、Stock、
StockInDetail、StockInRecord、StockOutDetail、StockOutRecord、
Supplier、User、Warehouse等实体类的时间字段策略从自动填充改为
FieldStrategy.NEVER,禁止自动插入和更新时间戳

- 在AuthServiceImpl中手动设置用户创建和更新时间

fix(frontend): 修复登录页面默认凭据和路由跳转逻辑

- 移除登录页面的默认用户名密码预填值
- 修复退出登录时的路由跳转问题,在MainLayout中添加router.push('/login')
- 调整用户状态管理中的路由跳转逻辑,避免重复跳转

feat(frontend): 添加出入库单据新增页面路由

- 新增stock-in/add路由指向StockInForm组件
- 新增stock-out/add路由指向StockOutForm组件
- 为新建入库单和出库单功能提供页面入口
This commit is contained in:
2026-07-07 09:07:55 +08:00
parent 258bae75b2
commit 2d7cadfa2b
18 changed files with 56 additions and 29 deletions

View File

@@ -16,6 +16,7 @@ const isCollapse = computed(() => appStore.sidebarCollapsed)
function handleCommand(command) {
if (command === 'logout') {
userStore.logout()
router.push('/login')
}
}

View File

@@ -28,6 +28,18 @@ const constantRoutes = [
component: () => import('@/views/dashboard/DashboardView.vue'),
meta: { title: '仪表盘', icon: 'Odometer' },
},
{
path: 'stock-in/add',
name: 'StockInAdd',
component: () => import('@/views/stockIn/StockInForm.vue'),
meta: { title: '新建入库单' },
},
{
path: 'stock-out/add',
name: 'StockOutAdd',
component: () => import('@/views/stockOut/StockOutForm.vue'),
meta: { title: '新建出库单' },
},
],
},
{

View File

@@ -86,7 +86,6 @@ export const useUserStore = defineStore('user', () => {
permissions.value = []
localStorage.removeItem('token')
localStorage.removeItem('refreshToken')
router.push('/login')
}
function hasPermission(perm) {

View File

@@ -10,8 +10,8 @@ const userStore = useUserStore()
const loginFormRef = ref(null)
const loading = ref(false)
const loginForm = reactive({
username: 'admin',
password: 'admin123',
username: '',
password: '',
remember: false,
})