From 88f1a5d251b6fcabf905d6a4fd0323eea09e81a1 Mon Sep 17 00:00:00 2001 From: "han\\hanst" Date: Tue, 30 Sep 2025 12:48:27 +0800 Subject: [PATCH] =?UTF-8?q?ifs=E5=BA=93=E5=AD=98=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/base/site.js | 12 +- src/api/factory/accessSite.js | 5 + src/views/common/login.vue | 65 +- src/views/main-navbar.vue | 174 +++ src/views/modules/base/factoryInformation.vue | 1071 ++++------------- src/views/modules/factory/tblbasedata.vue | 740 +++++------- src/views/modules/sys/user-add-or-update.vue | 100 +- .../modules/warehouse/ifsInventoryInit.vue | 25 +- src/views/modules/warehouse/location.vue | 2 +- 9 files changed, 853 insertions(+), 1341 deletions(-) diff --git a/src/api/base/site.js b/src/api/base/site.js index d14c98e..0ee94e6 100644 --- a/src/api/base/site.js +++ b/src/api/base/site.js @@ -1,13 +1,19 @@ import { createAPI } from "@/utils/httpRequest.js"; //------------工厂信息部分---------------- // 获取工厂信息数据 -export const getSiteData = data => createAPI(`/base/getSiteData`,'post',data) +export const getSiteData = data => createAPI(`/site/getSiteData`,'post',data) + +// 分页查询工厂信息列表 +export const getSiteList = data => createAPI(`/site/getSiteList`, 'POST', data) // 获取会计单位数据 -export const getCompanyData = data => createAPI(`/base/getCompanyData`,'post',data) +export const getCompanyData = data => createAPI(`/site/getCompanyData`,'post',data) // 保存修改工厂信息数据 -export const siteSave = data => createAPI(`/base/siteSave`,'post',data) +export const siteSave = data => createAPI(`/site/siteSave`,'post',data) + +// 删除工厂信息 +export const deleteSite = data => createAPI(`/site/deleteSite`, 'POST', data) //------------物料分类部分---------------- // 获取工厂信息数据 diff --git a/src/api/factory/accessSite.js b/src/api/factory/accessSite.js index b752edc..89359c5 100644 --- a/src/api/factory/accessSite.js +++ b/src/api/factory/accessSite.js @@ -5,3 +5,8 @@ export const getUserAccessSiteList = data => createAPI(`/accessSite/list`,'post' // 保存用户工厂信息 export const saveUserAccessSiteList = data => createAPI(`/accessSite/saveUserAccessSiteList`,'post',data) +/** + * 根据用户名获取用户授权的工厂列表 + * @param {Object} data - 包含用户名的参数对象 + */ +export const getUserAuthorizedSites = data => createAPI(`accessSite/getUserAuthorizedSites`, 'post', data) diff --git a/src/views/common/login.vue b/src/views/common/login.vue index 92f75c7..b868a3f 100644 --- a/src/views/common/login.vue +++ b/src/views/common/login.vue @@ -7,11 +7,21 @@ - + + + + + + + @@ -25,6 +35,7 @@ @@ -380,6 +467,93 @@ export default { margin-left: -45px; } +// 工厂选择器样式 +.site-navbar__factory { + padding: 0 15px !important; + + .factory-selector { + display: flex; + align-items: center; + gap: 8px; + + .factory-icon { + color: #409EFF; + font-size: 16px; + margin-right: 4px; + } + + .factory-select { + width: 140px; + transition: transform 0.2s ease; + + .el-input__inner { + background: rgba(64, 158, 255, 0.1); + border: 1px solid rgba(64, 158, 255, 0.3); + border-radius: 20px; + color: #409EFF; + font-size: 13px; + height: 32px; + line-height: 32px; + transition: all 0.3s ease; + + &:hover { + background: rgba(64, 158, 255, 0.15); + border-color: #409EFF; + box-shadow: 0 2px 8px rgba(64, 158, 255, 0.2); + } + + &:focus { + background: rgba(64, 158, 255, 0.1); + border-color: #409EFF; + box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2); + } + } + + .el-input__suffix { + .el-input__suffix-inner { + .el-select__caret { + color: #409EFF; + transition: transform 0.3s ease; + } + } + } + + &.is-focus { + .el-input__suffix-inner .el-select__caret { + transform: rotateZ(180deg); + } + } + } + } + + &:hover { + background-color: rgba(64, 158, 255, 0.05) !important; + } +} + +// 工厂选择下拉选项样式 +.el-select-dropdown { + .el-select-dropdown__item { + &:hover { + background-color: rgba(64, 158, 255, 0.1); + color: #409EFF; + } + + &.selected { + background-color: #409EFF; + color: #fff; + font-weight: 500; + + &::after { + content: '✓'; + position: absolute; + right: 15px; + font-weight: bold; + } + } + } +} + .el-menu--horizontal > .el-menu-item { color: #3b4249; } diff --git a/src/views/modules/base/factoryInformation.vue b/src/views/modules/base/factoryInformation.vue index 80d7bf2..3929216 100644 --- a/src/views/modules/base/factoryInformation.vue +++ b/src/views/modules/base/factoryInformation.vue @@ -1,916 +1,327 @@ - + \ No newline at end of file diff --git a/src/views/modules/factory/tblbasedata.vue b/src/views/modules/factory/tblbasedata.vue index eda165e..22fd636 100644 --- a/src/views/modules/factory/tblbasedata.vue +++ b/src/views/modules/factory/tblbasedata.vue @@ -1,30 +1,26 @@ - diff --git a/src/views/modules/sys/user-add-or-update.vue b/src/views/modules/sys/user-add-or-update.vue index d2b1679..42f9461 100644 --- a/src/views/modules/sys/user-add-or-update.vue +++ b/src/views/modules/sys/user-add-or-update.vue @@ -33,9 +33,13 @@ - - {{buttons.site||'工厂'}} - + + + {{ + site.label + }} + + @@ -76,8 +80,8 @@