diff --git a/src/api/canteen/canteenRecord.js b/src/api/canteen/canteenRecord.js index b6c3b674..5b4e5a82 100644 --- a/src/api/canteen/canteenRecord.js +++ b/src/api/canteen/canteenRecord.js @@ -43,6 +43,15 @@ export function getplaceList(query) { }) } +//获取异地消费汇总 +export function getplaceListhz(query) { + return request({ + url: '/smart-canteen/api/v2/report/getplacehzList', + method: 'post', + data: query + }) +} + // 查询详情列表 export function getDetailList(query) { return request({ diff --git a/src/router/index.js b/src/router/index.js index c8301900..5349e8a5 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -74,6 +74,26 @@ export const constantRoutes = [ } ] }, + {//供应链-库存管理-库存盘点 + path: '/inventoryCount', + component: Layout, + hidden: true, + redirect: 'noredirect', + children: [ + { + path: 'inventoryCountDetail', + component: () => import('@/views/inventoryCount/detail'), + name: 'InventoryCountDetail', + meta: { title: '盘点详情', icon: '' } + }, + { + path: 'inventoryCountEdit', + component: () => import('@/views/inventoryCount/edit'), + name: 'InventoryCountEdit', + meta: { title: '盘点新增/编辑', icon: '' } + }, + ] + }, { path: '/user', component: Layout, diff --git a/src/utils/request.js b/src/utils/request.js index 607fe617..1992cd64 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -8,7 +8,7 @@ import cache from '@/plugins/cache' import { saveAs } from 'file-saver' import { encryptCBC, decryptCBC } from '@/utils/aescbc' import { CONFIG } from '@/utils/configure' -import { hashWithSM3AndSalt } from '@/utils/sm' +import { hashWithSM3AndSalt ,encryptWithSM4,decryptWithSM4} from '@/utils/sm' //let token = localStorage.getItem("tokens"); @@ -23,7 +23,7 @@ const service = axios.create({ // axios中请求配置有baseURL选项,表示请求URL公共部分 baseURL: process.env.VUE_APP_BASE_API, // 超时 - timeout: 30000 + timeout: 80000 }) // request 拦截器 @@ -86,7 +86,7 @@ service.interceptors.request.use(config => { } // 加密数据 if (CONFIG.dataSettings.encryptRequest && encryptRequest) { - config.data = encryptCBC(data) + config.data = encryptWithSM4(data) } } // 检查请求数据大小 @@ -117,7 +117,7 @@ service.interceptors.request.use(config => { service.interceptors.response.use(res => { console.log(res) if (res.headers.encryptresponse && !res.data.hasOwnProperty('code')) { - res.data = JSON.parse(decryptCBC(res.data)) + res.data = JSON.parse(decryptWithSM4(res.data)) console.log(res.data) } // 未设置状态码则默认成功状态 diff --git a/src/utils/sm.js b/src/utils/sm.js index 8142f26a..478dcb83 100644 --- a/src/utils/sm.js +++ b/src/utils/sm.js @@ -47,4 +47,3 @@ export function encryptWithSM4(plainText) { export function decryptWithSM4(cipherText){ return SM4.decrypt(cipherText, SM_CONFIG.SM4_KEY,{ mode: 'cbc', padding: 'pkcs#5' ,iv:SM_CONFIG.SM4_SALT}); } - \ No newline at end of file diff --git a/src/views/canteenreport/index.vue b/src/views/canteenreport/index.vue index 3cb41767..bb5ecdab 100644 --- a/src/views/canteenreport/index.vue +++ b/src/views/canteenreport/index.vue @@ -71,6 +71,13 @@ + + +