From 25e87da5660348fd5ea98e1b8f1c1db3bbe4f041 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=94=A1=E7=8E=B2?= <8702040+cai-ling@user.noreply.gitee.com> Date: Wed, 11 Sep 2024 17:42:14 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=93=E5=AD=98=E7=A0=81=E5=8F=98=E6=9B=B4\c?= =?UTF-8?q?ode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 8 +++ pages/home/home.vue | 72 ++++++++------------------ pages/modules/cache-code-change.vue | 77 ++++++++++++++++++++++++++++ pages/modules/carry-task.vue | 3 ++ pages/modules/rawmater-instore.vue | 3 ++ pages/modules/rawmater-outstore.vue | 3 ++ pages/modules/zupan-unbind.vue | 3 ++ static/image/menu/RF11.png | Bin 0 -> 2070 bytes utils/getData2.js | 21 +++++++- 9 files changed, 139 insertions(+), 51 deletions(-) create mode 100644 pages/modules/cache-code-change.vue create mode 100644 static/image/menu/RF11.png diff --git a/pages.json b/pages.json index 63fc9fa..b5caba5 100644 --- a/pages.json +++ b/pages.json @@ -102,6 +102,14 @@ } } + ,{ + "path" : "pages/modules/cache-code-change", + "style" : + { + "navigationStyle": "custom" + } + + } ], "globalStyle": { // "pageOrientation": "landscape", diff --git a/pages/home/home.vue b/pages/home/home.vue index c8135c4..90bd061 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -15,7 +15,7 @@ - + {{e.name}} @@ -32,58 +32,30 @@ return { roles: this.$store.getters.saveRoles, userName: '', - menuList: [] + menuList: [ + {id: '1', name: '原材料入库', icon: 'RF04', role: 'A1', path: '/pages/modules/rawmater-instore'}, + {id: '2', name: '原材料出库', icon: 'RF06', role: 'A1', path: '/pages/modules/rawmater-outstore'}, + {id: '3', name: '搬运任务', icon: 'RF07', role: 'A2', path: '/pages/modules/carry-task'}, + {id: '4', name: '组盘解绑', icon: 'RF08', role: 'A2', path: '/pages/modules/zupan-unbind'}, + {id: '5', name: '指令管理', icon: 'RF01', role: '', path: '/pages/modules/zlmanage'}, + {id: '6', name: '任务管理', icon: 'RF09', role: '', path: '/pages/modules/taskmanage'}, + {id: '7', name: '异常出库', icon: 'RF10', role: '', path: '/pages/modules/error-outstore'}, + {id: '8', name: '托盘号补录', icon: 'RF05', role: 'A1', path: '/pages/modules/pallet-add-record'}, + {id: '9', name: '缓存码变更', icon: 'RF11', role: 'A1', path: '/pages/modules/cache-code-change'} + ] }; }, created () { - this.menuList = [ - // {id: '1', name: '人工排产', icon: 'RF01', path: '/pages/modules/man-paichan'}, - // {id: '2', name: '涂线板', icon: 'RF02', path: '/pages/modules/wire-board'}, - // {id: '3', name: '物料库存', icon: 'RF03', path: '/pages/modules/mater-inventory'} - {id: '1', name: '原材料入库', icon: 'RF04', path: '/pages/modules/rawmater-instore'}, - {id: '2', name: '原材料出库', icon: 'RF06', path: '/pages/modules/rawmater-outstore'}, - {id: '3', name: '搬运任务', icon: 'RF07', path: '/pages/modules/carry-task'}, - {id: '4', name: '组盘解绑', icon: 'RF08', path: '/pages/modules/zupan-unbind'}, - {id: '5', name: '指令管理', icon: 'RF01', path: '/pages/modules/zlmanage'}, - {id: '6', name: '任务管理', icon: 'RF09', path: '/pages/modules/taskmanage'}, - {id: '7', name: '异常出库', icon: 'RF10', path: '/pages/modules/error-outstore'}, - {id: '8', name: '托盘号补录', icon: 'RF05', path: '/pages/modules/pallet-add-record'} - ] - if (this.roles === 'A1,A2,') { - this.menuList = [ - // {id: '1', name: '人工排产', icon: 'RF01', path: '/pages/modules/man-paichan'}, - // {id: '2', name: '涂线板', icon: 'RF02', path: '/pages/modules/wire-board'}, - // {id: '3', name: '物料库存', icon: 'RF03', path: '/pages/modules/mater-inventory'} - {id: '1', name: '原材料入库', icon: 'RF03', path: '/pages/modules/rawmater-instore'}, - {id: '2', name: '原材料出库', icon: 'RF07', path: '/pages/modules/rawmater-outstore'}, - {id: '3', name: '搬运任务', icon: 'RF01', path: '/pages/modules/carry-task'}, - {id: '4', name: '组盘解绑', icon: 'RF04', path: '/pages/modules/zupan-unbind'}, - {id: '5', name: '指令管理', icon: 'RF02', path: '/pages/modules/zlmanage'}, - {id: '6', name: '任务管理', icon: 'RF09', path: '/pages/modules/taskmanage'}, - {id: '7', name: '异常出库', icon: 'RF10', path: '/pages/modules/error-outstore'}, - {id: '8', name: '托盘号补录', icon: 'RF05', path: '/pages/modules/pallet-add-record'} - ] - } - if (this.roles === 'A1,') { - this.menuList = [ - {id: '1', name: '原材料入库', icon: 'RF03', path: '/pages/modules/rawmater-instore'}, - {id: '2', name: '原材料出库', icon: 'RF07', path: '/pages/modules/rawmater-outstore'}, - {id: '5', name: '指令管理', icon: 'RF02', path: '/pages/modules/zlmanage'}, - {id: '6', name: '任务管理', icon: 'RF09', path: '/pages/modules/taskmanage'}, - {id: '7', name: '异常出库', icon: 'RF10', path: '/pages/modules/error-outstore'}, - {id: '8', name: '托盘号补录', icon: 'RF05', path: '/pages/modules/pallet-add-record'} - ] - } - if (this.roles === 'A2,') { - this.menuList = [ - {id: '3', name: '搬运任务', icon: 'RF01', path: '/pages/modules/carry-task'}, - {id: '4', name: '组盘解绑', icon: 'RF04', path: '/pages/modules/zupan-unbind'}, - {id: '5', name: '指令管理', icon: 'RF02', path: '/pages/modules/zlmanage'}, - {id: '6', name: '任务管理', icon: 'RF09', path: '/pages/modules/taskmanage'}, - {id: '7', name: '异常出库', icon: 'RF10', path: '/pages/modules/error-outstore'} - ] - } - this.$store.dispatch('setPublicObj', '') + this.menuList.map(el => { + if (this.roles === '') { + this.$set(el, 'show', true) + } else if (this.roles!== '' && el.role === '') { + this.$set(el, 'show', true) + } else if (this.roles!== '' && el.role !== '') { + let show = this.roles.indexOf(el.role) !== -1 + this.$set(el, 'show', show) + } + }) if (this.$store.getters.userInfo) { this.userName = JSON.parse(this.$store.getters.userInfo).username } diff --git a/pages/modules/cache-code-change.vue b/pages/modules/cache-code-change.vue new file mode 100644 index 0000000..bcde769 --- /dev/null +++ b/pages/modules/cache-code-change.vue @@ -0,0 +1,77 @@ + + + + + diff --git a/pages/modules/carry-task.vue b/pages/modules/carry-task.vue index b661259..8afaabc 100644 --- a/pages/modules/carry-task.vue +++ b/pages/modules/carry-task.vue @@ -136,6 +136,9 @@ async _taskCarry () { try { let res = await taskCarry(this.index1, this.index2) + if (res.code === '1') { + this.toClear() + } this.disabled = false uni.showToast({ title: res.message, diff --git a/pages/modules/rawmater-instore.vue b/pages/modules/rawmater-instore.vue index e7aee7f..2232ad1 100644 --- a/pages/modules/rawmater-instore.vue +++ b/pages/modules/rawmater-instore.vue @@ -90,6 +90,9 @@ } try { let res = await yclrk(this.index1, this.val2, this.val3, this.val4) + if (res.code === '1') { + this.toClear() + } this.disabled = false uni.showToast({ title: res.message, diff --git a/pages/modules/rawmater-outstore.vue b/pages/modules/rawmater-outstore.vue index 4692b90..717031d 100644 --- a/pages/modules/rawmater-outstore.vue +++ b/pages/modules/rawmater-outstore.vue @@ -104,6 +104,9 @@ } try { let res = await yclck(this.index1, this.index2, this.val2, this.val3) + if (res.code === '1') { + this.toClear() + } this.disabled = false uni.showToast({ title: res.message, diff --git a/pages/modules/zupan-unbind.vue b/pages/modules/zupan-unbind.vue index 650af82..617a342 100644 --- a/pages/modules/zupan-unbind.vue +++ b/pages/modules/zupan-unbind.vue @@ -77,6 +77,9 @@ } try { let res = await zpjb(this.val1, this.val2) + if (res.code === '1') { + this.toClear() + } this.disabled = false uni.showToast({ title: res.message, diff --git a/static/image/menu/RF11.png b/static/image/menu/RF11.png new file mode 100644 index 0000000000000000000000000000000000000000..b4726938587f7199e560df3fb0704dfeb3312338 GIT binary patch literal 2070 zcmaJ?dsGu=77v0DK~|+ilm!{$3xvD_B!PtH!Al8Zpa>|BkPIY3G9j5rLIGPgvIjT~ zlt(F|(5RVFoAw zg<@^?H82Q;vi6e3#>4UaNQMZK;e{3-yhf%#&?r<;utp&iWr8q}24+a*Ozg8uU06UW zW@7jH@rir|7nDfDbCqCBZd9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AZV2#w?Gn}cC$!`H611biYSG@_e&h= request({ password: password } }) +// export const handLogin = (user, password) => { +// let res = { +// user: {user: 'admin'}, +// token: 'aaaa', +// roles: 'A1,A2,' +// } +// return res +// } /** * 人工排产 @@ -135,4 +143,15 @@ export const materialList = () => { export const getInventoryMaterialInfo = (code) => { let res = [{"material_code":"FJB","material_name":"负极板","point_code":"01-09-01","point_name":"01排09列01层","vehicle_code":"T202312060006","vehicle_type":"1"}] return res -} \ No newline at end of file +} + +/** + * 缓存码变更 + */ +export const zpchange = (code, ncode) => request({ + url:'api/pda/zpchange', + data: { + sub_tray: code, + new_sub_tray: ncode + } +}) \ No newline at end of file