添加菜单

This commit is contained in:
2025-02-06 16:32:24 +08:00
parent aa04fe343a
commit d16d43a918
4 changed files with 161 additions and 51 deletions

View File

@@ -1,6 +1,6 @@
{
"name" : "诺力电源",
"appid" : "__UNI__C550D5E",
"appid" : "__UNI__B3904F7",
"description" : "诺力电源手持系统",
"versionName" : "1.0.0",
"versionCode" : 100,

View File

@@ -94,14 +94,21 @@
"navigationStyle": "custom"
}
}
,{
"path" : "pages/modules/pallet-add-record",
,{
"path" : "pages/modules/pallet-add-record",
"style" :
{
"navigationStyle": "custom"
}
}
}
,{
"path" : "pages/modules/agv-task",
"style" :
{
"navigationStyle": "custom"
}
}
],
"globalStyle": {
// "pageOrientation": "landscape",

View File

@@ -30,59 +30,23 @@
export default {
data() {
return {
roles: this.$store.getters.saveRoles,
// roles: this.$store.getters.saveRoles,
userName: '',
menuList: []
};
},
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'}
{id: '3', name: '搬运任务', icon: 'RF07', path: '/pages/modules/agv-task'},
// {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', '')
if (this.$store.getters.userInfo) {
this.userName = JSON.parse(this.$store.getters.userInfo).username

139
pages/modules/agv-task.vue Normal file
View File

@@ -0,0 +1,139 @@
<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">
<uni-data-select v-model="index3" :localdata="options3" @change="selectChange3"></uni-data-select>
</view>
</view>
<view class="filter_item">
<view class="filter_label">目标区域</view>
<view class="filter_input_wraper">
<uni-data-select v-model="index4" :localdata="options4" @change="selectChange4"></uni-data-select>
</view>
</view>
<view class="filter_item">
<view class="filter_label">起始点位</view>
<view class="filter_input_wraper">
<uni-data-select v-model="index1" :localdata="options1" @change="selectChange1"></uni-data-select>
</view>
</view>
<view class="filter_item">
<view class="filter_label">目标点位</view>
<view class="filter_input_wraper">
<uni-data-select v-model="index2" :localdata="options2" @change="selectChange2"></uni-data-select>
</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': !index1 || !index2}" :disabled="disabled" @tap="_taskCarry">确认</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import {regionSearch, pointSearch, taskCarry} from '@/utils/getData1.js'
export default {
components: {
NavBar
},
data() {
return {
dataList: [],
disabled: false,
options1: [],
index1: '',
options2: [],
index2: '',
options3: [],
index3: '',
options4: [],
index4: '',
};
},
created () {
this._regionSearch3('')
this._regionSearch4('')
},
methods: {
selectChange1 (e) {
this.index1 = e
},
selectChange2 (e) {
this.index2 = e
},
selectChange3 (e) {
this.index3 = e
this._pointSearch1(e)
},
selectChange4 (e) {
this.index4 = e
this._pointSearch2(e)
},
async _regionSearch3 (a) {
let res = await regionSearch(a)
this.options3 = [...res]
this.options3.map(el => {
this.$set(el, 'value', el.region_code)
this.$set(el, 'text', el.region_name)
})
},
async _regionSearch4 (a) {
let res = await regionSearch(a)
this.options4 = [...res]
this.options4.map(el => {
this.$set(el, 'value', el.region_code)
this.$set(el, 'text', el.region_name)
})
},
/** 点位查询1 */
async _pointSearch1 (a) {
let res = await pointSearch(a)
this.options1 = [...res]
this.options1.map(el => {
this.$set(el, 'value', el.point_code)
this.$set(el, 'text', el.point_name)
})
},
/** 点位查询2 */
async _pointSearch2 (a) {
let res = await pointSearch(a)
this.options2 = [...res]
this.options2.map(el => {
this.$set(el, 'value', el.point_code)
this.$set(el, 'text', el.point_name)
})
},
toClear () {
this.index1 = ''
this.index2 = ''
},
async _taskCarry () {
this.disabled = true
if (!this.index1 || !this.index2) {
this.disabled = false
return
}
try {
let res = await taskCarry(this.index1, this.index2)
this.disabled = false
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled = false
}
}
}
}
</script>
<style lang="stylus">
</style>