diff --git a/src/api/wms/dict/data.js b/src/api/wms/dict/data.js new file mode 100644 index 00000000..45da3928 --- /dev/null +++ b/src/api/wms/dict/data.js @@ -0,0 +1,52 @@ +import request from '@/utils/request' + +// 查询字典数据列表 +export function listData(query) { + return request({ + url: '/wms/dict/data/list', + method: 'get', + params: query + }) +} + +// 查询字典数据详细 +export function getData(dictCode) { + return request({ + url: '/wms/dict/data/' + dictCode, + method: 'get' + }) +} + +// 根据字典类型查询字典数据信息 +export function getDicts(dictType) { + return request({ + url: '/wms/dict/data/type/' + dictType, + method: 'get' + }) +} + +// 新增字典数据 +export function addData(data) { + return request({ + url: '/wms/dict/data', + method: 'post', + data: data + }) +} + +// 修改字典数据 +export function updateData(data) { + return request({ + url: '/wms/dict/data', + method: 'put', + data: data + }) +} + +// 删除字典数据 +export function delData(dictCode) { + return request({ + url: '/wms/dict/data/' + dictCode, + method: 'delete' + }) +} diff --git a/src/api/wms/dict/type.js b/src/api/wms/dict/type.js new file mode 100644 index 00000000..99ff7e7d --- /dev/null +++ b/src/api/wms/dict/type.js @@ -0,0 +1,60 @@ +import request from '@/utils/request' + +// 查询字典类型列表 +export function listType(query) { + return request({ + url: '/wms/dict/type/list', + method: 'get', + params: query + }) +} + +// 查询字典类型详细 +export function getType(dictId) { + return request({ + url: '/wms/dict/type/' + dictId, + method: 'get' + }) +} + +// 新增字典类型 +export function addType(data) { + return request({ + url: '/wms/dict/type', + method: 'post', + data: data + }) +} + +// 修改字典类型 +export function updateType(data) { + return request({ + url: '/wms/dict/type', + method: 'put', + data: data + }) +} + +// 删除字典类型 +export function delType(dictId) { + return request({ + url: '/wms/dict/type/' + dictId, + method: 'delete' + }) +} + +// 刷新字典缓存 +export function refreshCache() { + return request({ + url: '/wms/dict/type/refreshCache', + method: 'delete' + }) +} + +// 获取字典选择框列表 +export function optionselect() { + return request({ + url: '/wms/dict/type/optionselect', + method: 'get' + }) +} diff --git a/src/router/index.js b/src/router/index.js index 770ec7cd..0bae3692 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -185,6 +185,20 @@ export const dynamicRoutes = [ } ] }, + { + path: '/wms/dict-data', + component: Layout, + hidden: true, + permissions: ['factory:dict:list'], + children: [ + { + path: 'index/:dictId(\\d+)', + component: () => import('@/views/wms/dict/data'), + name: 'Data', + meta: { title: '字典数据', activeMenu: '/wms/dict' } + } + ] + }, { path: '/qua/quality/qcProject-data', component: Layout, diff --git a/src/views/wms/dict/data.vue b/src/views/wms/dict/data.vue new file mode 100644 index 00000000..16286b54 --- /dev/null +++ b/src/views/wms/dict/data.vue @@ -0,0 +1,402 @@ + + + diff --git a/src/views/wms/dict/index.vue b/src/views/wms/dict/index.vue new file mode 100644 index 00000000..0e86c9d9 --- /dev/null +++ b/src/views/wms/dict/index.vue @@ -0,0 +1,347 @@ + + +