缓存码变更\code
This commit is contained in:
@@ -102,6 +102,14 @@
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "pages/modules/cache-code-change",
|
||||
"style" :
|
||||
{
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
// "pageOrientation": "landscape",
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<view class="zd_home_wrapper">
|
||||
<view class="menus_wrap">
|
||||
<view class="sec_menu_wrap">
|
||||
<view class="sec_menu-item" v-for="(e, i) in menuList" :key="e.id" @tap="toPage(e)">
|
||||
<view v-if="e.show" class="sec_menu-item" v-for="e in menuList" :key="e.id" @tap="toPage(e)">
|
||||
<image class="menu-img" :src="require('../../static/image/menu/' + e.icon + '.png')" alt="">
|
||||
<view class="menu-name">{{e.name}}</view>
|
||||
</view>
|
||||
@@ -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
|
||||
}
|
||||
|
||||
77
pages/modules/cache-code-change.vue
Normal file
77
pages/modules/cache-code-change.vue
Normal file
@@ -0,0 +1,77 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<nav-bar title="缓存码变更"></nav-bar>
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
<view class="filter_item">
|
||||
<view class="filter_label">原子托盘号</view>
|
||||
<view class="filter_input_wraper">
|
||||
<search-box
|
||||
v-model="val1"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter_item">
|
||||
<view class="filter_label">新子托盘号</view>
|
||||
<view class="filter_input_wraper">
|
||||
<search-box
|
||||
v-model="val2"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar_new">
|
||||
<button class="zd-col-7 submit-button_c" @tap="toClear">清空</button>
|
||||
<button class="zd-col-15 submit-button_new" :class="{'btn-disabled': !val1 || !val2}" :disabled="disabled" @tap="_zpchange">确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import {zpchange} from '@/utils/getData02.js'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
val1: '',
|
||||
val2: '',
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
toClear () {
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
},
|
||||
async _zpchange () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.val2) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await zpchange(this.val1, this.val2)
|
||||
if (res.code === '1') {
|
||||
this.toClear()
|
||||
}
|
||||
this.disabled = false
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
</style>
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
BIN
static/image/menu/RF11.png
Normal file
BIN
static/image/menu/RF11.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
@@ -21,6 +21,14 @@ export const handLogin = (user, password) => 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
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 缓存码变更
|
||||
*/
|
||||
export const zpchange = (code, ncode) => request({
|
||||
url:'api/pda/zpchange',
|
||||
data: {
|
||||
sub_tray: code,
|
||||
new_sub_tray: ncode
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user