From 32a02312127eca18b80eb8d560618b2dba801deb Mon Sep 17 00:00:00 2001 From: guoxing <1369478551@qq.com> Date: Mon, 6 May 2024 16:53:22 +0800 Subject: [PATCH] 1111 --- src/api/baseinfo/brands/brand.js | 10 +- src/api/baseinfo/category/category.js | 12 +- src/api/baseinfo/factory/factory.js | 10 +- src/api/baseinfo/goods/goods.js | 8 +- src/api/baseinfo/unit/unit.js | 49 ++ src/layout/components/Sidebar/index.vue | 821 ++++++++++++------------ src/router/index.js | 112 +++- src/views/baseInfo/unit/index.vue | 245 +++++++ src/views/baseInfo/unit/unitAdd.vue | 210 ++++++ src/views/login/login.vue | 37 +- 10 files changed, 1044 insertions(+), 470 deletions(-) create mode 100644 src/api/baseinfo/unit/unit.js create mode 100644 src/views/baseInfo/unit/index.vue create mode 100644 src/views/baseInfo/unit/unitAdd.vue diff --git a/src/api/baseinfo/brands/brand.js b/src/api/baseinfo/brands/brand.js index 66e1ef0..b8d23d5 100644 --- a/src/api/baseinfo/brands/brand.js +++ b/src/api/baseinfo/brands/brand.js @@ -5,7 +5,7 @@ export default { // 查询分页列表 listPage: function(params) { return request({ - url: '/base/basegoodsbrand/listPage', + url: '/wms/apiadmin/base/basegoodsbrand/listPage', method: 'post', data: params, }) @@ -14,7 +14,7 @@ export default { // 类别查询 getAllBrand: function(params) { return request({ - url: '/base/basegoodsbrand/getAllType', + url: '/wms/apiadmin/base/basegoodsbrand/listAll', method: 'get' }) }, @@ -23,7 +23,7 @@ export default { // 修改是否可用状态 updateIsEnable: function(sid,isEnable) { return request({ - url: '/base/basegoodsbrand/updateIsEnable/'+sid+"/"+isEnable + url: '/wms/apiadmin/base/basegoodsbrand/updateIsEnable/'+sid+"/"+isEnable }); }, @@ -31,7 +31,7 @@ export default { // 新增、保存 saveBrands: function(data) { return request({ - url: '/base/basegoodsbrand/saveOrUpdate', + url: '/wms/apiadmin/base/basegoodsbrand/saveOrUpdate', method: 'post', data: data }); @@ -40,7 +40,7 @@ export default { // 初始化 initBrands: function(data) { return request({ - url: '/base/basegoodsbrand/initialization/' + data, + url: '/wms/apiadmin/base/basegoodsbrand/initialization/' + data, method: 'get' }); }, diff --git a/src/api/baseinfo/category/category.js b/src/api/baseinfo/category/category.js index 9039b8b..4523584 100644 --- a/src/api/baseinfo/category/category.js +++ b/src/api/baseinfo/category/category.js @@ -5,7 +5,7 @@ export default { // 查询分页列表 listPage: function(params) { return request({ - url: '/base/basegoodstype/listPage', + url: '/wms/apiadmin/base/basegoodstype/listPage', method: 'post', data: params, }) @@ -14,7 +14,7 @@ export default { // 类别查询 getAllType: function(params) { return request({ - url: '/base/basegoodstype/getAllType', + url: '/wms/apiadmin/base/basegoodstype/listAll', method: 'get' }) }, @@ -23,21 +23,21 @@ export default { // 修改是否可用状态 updateIsEnable: function(sid, isEnable) { return request({ - url: '/base/basegoodstype/updateIsEnable/' + sid + "/" + isEnable + url: '/wms/apiadmin/base/basegoodstype/updateIsEnable/' + sid + "/" + isEnable }); }, // 修改是否一品一码 updateIsGoodsID: function(sid, isGoodsID) { return request({ - url: '/base/basegoodstype/updateIsGoodsID/' + sid + "/" + isGoodsID + url: '/wms/apiadmin/base/basegoodstype/updateIsGoodsID/' + sid + "/" + isGoodsID }); }, // 新增、保存 saveTypes: function(data) { return request({ - url: '/base/basegoodstype/saveOrUpdate', + url: '/wms/apiadmin/base/basegoodstype/saveOrUpdate', method: 'post', data: data }); @@ -46,7 +46,7 @@ export default { // 初始化 initTypes: function(data) { return request({ - url: '/base/basegoodstype/initialization/' + data, + url: '/wms/apiadmin/base/basegoodstype/initialization/' + data, method: 'get' }); }, diff --git a/src/api/baseinfo/factory/factory.js b/src/api/baseinfo/factory/factory.js index 710da4c..df6af06 100644 --- a/src/api/baseinfo/factory/factory.js +++ b/src/api/baseinfo/factory/factory.js @@ -5,7 +5,7 @@ export default { // 查询分页列表 listPage: function(params) { return request({ - url: '/base/basemanufacturer/listPage', + url: '/wms/apiadmin/base/basemanufacturer/listPage', method: 'post', data: params, }) @@ -14,7 +14,7 @@ export default { // 厂家查询 getAllFacturer: function(params) { return request({ - url: '/base/basemanufacturer/getAllType', + url: '/wms/apiadmin/base/basemanufacturer/listAll', method: 'get' }) }, @@ -22,7 +22,7 @@ export default { // 修改是否可用状态 updateIsEnable: function(sid,isEnable) { return request({ - url: '/base/basemanufacturer/updateIsEnable/'+sid+"/"+isEnable + url: '/wms/apiadmin/base/basemanufacturer/updateIsEnable/'+sid+"/"+isEnable }); }, @@ -30,7 +30,7 @@ export default { // 新增、保存 saveFacturer: function(data) { return request({ - url: '/base/basemanufacturer/saveOrUpdate', + url: '/wms/apiadmin/base/basemanufacturer/saveOrUpdate', method: 'post', data: data }); @@ -39,7 +39,7 @@ export default { // 初始化 initFacturer: function(data) { return request({ - url: '/base/basemanufacturer/initialization/' + data, + url: '/wms/apiadmin/base/basemanufacturer/initialization/' + data, method: 'get' }); }, diff --git a/src/api/baseinfo/goods/goods.js b/src/api/baseinfo/goods/goods.js index e3d72f0..0fd74e5 100644 --- a/src/api/baseinfo/goods/goods.js +++ b/src/api/baseinfo/goods/goods.js @@ -5,7 +5,7 @@ export default { // 查询分页列表 listPage: function(params) { return request({ - url: '/base/basegoodsspu/listPage', + url: '/wms/apiadmin/base/basegoodsspu/listPage', method: 'post', data: params, }) @@ -14,14 +14,14 @@ export default { // 修改是否可用状态 updateIsEnable: function(sid, isEnable) { return request({ - url: '/base/basegoodsspu/updateIsEnable/' + sid + "/" + isEnable + url: '/wms/apiadmin/base/basegoodsspu/updateIsEnable/' + sid + "/" + isEnable }); }, // 新增、保存 saveGoods: function(data) { return request({ - url: '/base/basegoodsspu/saveOrUpdate', + url: '/wms/apiadmin/base/basegoodsspu/saveOrUpdate', method: 'post', data: data }); @@ -30,7 +30,7 @@ export default { // 初始化 initGoods: function(data) { return request({ - url: '/base/basegoodsspu/initialization/' + data, + url: '/wms/apiadmin/base/basegoodsspu/initialization/' + data, method: 'get' }); }, diff --git a/src/api/baseinfo/unit/unit.js b/src/api/baseinfo/unit/unit.js new file mode 100644 index 0000000..eb42b6d --- /dev/null +++ b/src/api/baseinfo/unit/unit.js @@ -0,0 +1,49 @@ +import request from '@/utils/request' + +export default { + + // 查询分页列表 + listPage: function(params) { + return request({ + url: '/wms/apiadmin/base/basegoodsunit/listPage', + method: 'post', + data: params, + }) + }, + + // 单位查询 + getAllUnit: function(params) { + return request({ + url: '/wms/apiadmin/base/basegoodsunit/listAll', + method: 'get' + }) + }, + + + // 修改是否可用状态 + updateIsEnable: function(sid,isEnable) { + return request({ + url: '/wms/apiadmin/base/basegoodsunit/updateIsEnable/'+sid+"/"+isEnable + }); + }, + + + // 新增、保存 + saveUnits: function(data) { + return request({ + url: '/wms/apiadmin/base/basegoodsunit/saveOrUpdate', + method: 'post', + data: data + }); + }, + + // 初始化 + initUnits: function(data) { + return request({ + url: '/base/basegoodsunit/initialization/' + data, + method: 'get' + }); + }, + + +} diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue index f364933..ae7d453 100644 --- a/src/layout/components/Sidebar/index.vue +++ b/src/layout/components/Sidebar/index.vue @@ -1,452 +1,471 @@ diff --git a/src/router/index.js b/src/router/index.js index 3f3050f..64de3e5 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -11,14 +11,14 @@ import codemenu from './modules/codemenu' export const constantRoutes = [ - { - path: '/', - redirect: 'login' - }, - { - path: '/login', - component: () => import('@/views/login/login.vue') - }, + { + path: '/', + redirect: 'login' + }, + { + path: '/login', + component: () => import('@/views/login/login.vue') + }, // { @@ -55,14 +55,15 @@ export const constantRoutes = [ meta: { title: '库存查询' }, - children: [ - { - path: '/inventory/inventory', - component: () => import('@/views/inventory/inventory.vue'), - name: 'Inventory', - meta: { title: '库存查询', noCache: true } + children: [{ + path: '/inventory/inventory', + component: () => import('@/views/inventory/inventory.vue'), + name: 'Inventory', + meta: { + title: '库存查询', + noCache: true } - ] + }] }, { path: '/storageage', @@ -71,14 +72,15 @@ export const constantRoutes = [ meta: { title: '库龄查询' }, - children: [ - { - path: '/storageage/storageage', - component: () => import('@/views/storageage/storageage.vue'), - name: 'StorageAge', - meta: { title: '库龄查询', noCache: true } + children: [{ + path: '/storageage/storageage', + component: () => import('@/views/storageage/storageage.vue'), + name: 'StorageAge', + meta: { + title: '库龄查询', + noCache: true } - ] + }] }, { path: '/carryover', @@ -87,18 +89,23 @@ export const constantRoutes = [ meta: { title: '结转查询' }, - children: [ - { + children: [{ path: '/carryover/carryforwardrecord', component: () => import('@/views/carryover/carryforwardrecord.vue'), name: 'CarryForwardRecord', - meta: { title: '结转记录查询', noCache: true } + meta: { + title: '结转记录查询', + noCache: true + } }, { path: '/carryover/carryoverstock', component: () => import('@/views/carryover/carryoverstock.vue'), name: 'CarryoverStock', - meta: { title: '结转库存查询', noCache: true } + meta: { + title: '结转库存查询', + noCache: true + } } ] }, @@ -109,7 +116,53 @@ export const constantRoutes = [ meta: { title: '基础信息' }, - children: [ + children: [{ + path: 'brands', + name: 'brands', + component: () => import('@/views/baseInfo/brands/index'), + meta: { + title: '品牌管理', + icon: 'product-list' + } + }, + { + path: 'category', + name: 'category', + component: () => import('@/views/baseInfo/category/index'), + meta: { + title: '类别管理', + icon: 'product-add' + } + }, { + path: 'unit', + name: 'unit', + component: () => import('@/views/baseInfo/unit/index'), + meta: { + title: '单位管理', + icon: 'product-add' + }, + hidden: true + }, + { + path: 'factory', + name: 'factory', + component: () => import('@/views/baseInfo/factory/index'), + meta: { + title: '厂家管理', + icon: 'product-add' + }, + hidden: true + }, + { + path: 'goods', + name: 'goods', + component: () => import('@/views/baseInfo/goods/index'), + meta: { + title: '商品管理', + icon: 'product-add' + }, + hidden: true + }, { path: 'warehouse', name: 'warehouse', @@ -153,15 +206,14 @@ export const constantRoutes = [ ] }, - { + { path: '/warehouse', component: Layout, redirect: null, meta: { title: '库存信息' }, - children: [ - { + children: [{ path: 'inOutStorage', name: 'inOutStorage', component: () => import('@/views/warehouse/inOutStorage/index'), diff --git a/src/views/baseInfo/unit/index.vue b/src/views/baseInfo/unit/index.vue new file mode 100644 index 0000000..c247313 --- /dev/null +++ b/src/views/baseInfo/unit/index.vue @@ -0,0 +1,245 @@ + + + + diff --git a/src/views/baseInfo/unit/unitAdd.vue b/src/views/baseInfo/unit/unitAdd.vue new file mode 100644 index 0000000..f1c26b8 --- /dev/null +++ b/src/views/baseInfo/unit/unitAdd.vue @@ -0,0 +1,210 @@ + + + + diff --git a/src/views/login/login.vue b/src/views/login/login.vue index 60ea83a..d1adb06 100644 --- a/src/views/login/login.vue +++ b/src/views/login/login.vue @@ -134,12 +134,12 @@ }, login() { - const loading = this.$loading({ - lock: true, - text: 'Loading', - spinner: 'el-icon-loading', - background: 'rgba(0, 0, 0, 0.7)' - }) + const loading = this.$loading({ + lock: true, + text: 'Loading', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }) doLogin(this.loginForm).then((response) => { if (response.code == 200) { this.$router.push({ @@ -152,9 +152,9 @@ window.sessionStorage.setItem('staffSid', response.data.staffSid) window.sessionStorage.setItem('userName', response.data.userName) - console.log(" token", sessionStorage.getItem('token')) - }else{ - loading.close() + console.log(" token", sessionStorage.getItem('token')) + } else { + loading.close() } }).catch(() => { @@ -192,12 +192,13 @@ -