change
This commit is contained in:
21
pages.json
21
pages.json
@@ -209,6 +209,27 @@
|
|||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
,{
|
||||||
|
"path" : "pages/nlfive/taskmanage",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
,{
|
||||||
|
"path" : "pages/nlfive/zlmanage",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
,{
|
||||||
|
"path" : "pages/nlfive/callagv",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
// "pageOrientation": "landscape",
|
// "pageOrientation": "landscape",
|
||||||
|
|||||||
@@ -32,7 +32,10 @@
|
|||||||
return {
|
return {
|
||||||
userName: '',
|
userName: '',
|
||||||
menuList: [
|
menuList: [
|
||||||
{title: '任务下发', icon: 'RF03', path: '/pages/nlfive/taskcarry'}
|
// {title: '任务下发', icon: 'RF03', path: '/pages/nlfive/taskcarry'},
|
||||||
|
{title: '任务管理', icon: 'RF01', path: '/pages/nlfive/taskmanage'},
|
||||||
|
{title: '指令管理', icon: 'RF02', path: '/pages/nlfive/zlmanage'},
|
||||||
|
{title: '呼叫AGV', icon: 'RF03', path: '/pages/nlfive/callagv'}
|
||||||
],
|
],
|
||||||
show: false,
|
show: false,
|
||||||
secM: []
|
secM: []
|
||||||
|
|||||||
95
pages/nlfive/callagv.vue
Normal file
95
pages/nlfive/callagv.vue
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
<template>
|
||||||
|
<view class="zd_container">
|
||||||
|
<!-- 任务管理 -->
|
||||||
|
<nav-bar :title="title"></nav-bar>
|
||||||
|
<view class="zd_content">
|
||||||
|
<view class="zd_wrapper">
|
||||||
|
<view class="zd-row border-bottom">
|
||||||
|
<view class="zd-col-7">
|
||||||
|
<span class="filter_label">托盘号</span>
|
||||||
|
</view>
|
||||||
|
<view class="zd-col-24 filter_select">
|
||||||
|
<search-box
|
||||||
|
v-model="val1"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="zd-row border-bottom">
|
||||||
|
<view class="zd-col-7">
|
||||||
|
<span class="filter_label">库位编码</span>
|
||||||
|
</view>
|
||||||
|
<view class="zd-col-24 filter_select">
|
||||||
|
<search-box
|
||||||
|
v-model="val2"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="zd-row border-bottom">
|
||||||
|
<view class="zd-col-7">
|
||||||
|
<span class="filter_label">库位编码</span>
|
||||||
|
</view>
|
||||||
|
<view class="zd-col-24 filter_select">
|
||||||
|
<search-box
|
||||||
|
v-model="val3"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="zd-row submit-bar">
|
||||||
|
<button class="zd-col-6 button-default" @tap="toEmpty">清空</button>
|
||||||
|
<button class="zd-col-16 button-primary" :class="{'button-info': !val1 || !val2 || !val3}" :disabled="disabled" @tap="_callTask">取消</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import NavBar from '@/components/NavBar.vue'
|
||||||
|
import SearchBox from '@/components/SearchBox.vue'
|
||||||
|
import {callTask} from '@/utils/getData3.js'
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
NavBar,
|
||||||
|
SearchBox
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: '',
|
||||||
|
val1: '',
|
||||||
|
val2: '',
|
||||||
|
val3: '',
|
||||||
|
disabled: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad (options) {
|
||||||
|
this.title = options.title
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
toEmpty () {
|
||||||
|
this.val1 = ''
|
||||||
|
this.val2 = ''
|
||||||
|
this.val3 = ''
|
||||||
|
this.disabled = false
|
||||||
|
},
|
||||||
|
async _callTask () {
|
||||||
|
this.disabled = true
|
||||||
|
if (!this.val1 || !this.val2 || !this.val3 ) {
|
||||||
|
this.disabled = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
let res = await taskoperation(this.val1, this.val2, this.val3)
|
||||||
|
if (res) {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.toEmpty()
|
||||||
|
} catch (e) {
|
||||||
|
this.disabled = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
133
pages/nlfive/taskmanage.vue
Normal file
133
pages/nlfive/taskmanage.vue
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
<template>
|
||||||
|
<view class="zd_container">
|
||||||
|
<!-- 任务管理 -->
|
||||||
|
<nav-bar :title="title"></nav-bar>
|
||||||
|
<view class="zd_content">
|
||||||
|
<view class="zd_wrapper">
|
||||||
|
<view class="zd-row border-bottom">
|
||||||
|
<view class="zd-col-7">
|
||||||
|
<span class="filter_label">托盘号</span>
|
||||||
|
</view>
|
||||||
|
<view class="zd-col-24 filter_select">
|
||||||
|
<search-box
|
||||||
|
v-model="val1"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="zd-row border-bottom">
|
||||||
|
<view class="zd-col-7">
|
||||||
|
<span class="filter_label">库位编码</span>
|
||||||
|
</view>
|
||||||
|
<view class="zd-col-24 filter_select">
|
||||||
|
<search-box
|
||||||
|
v-model="val2"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="zd_wrapper grid-wraper">
|
||||||
|
<view class="slide_new">
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>任务号</th>
|
||||||
|
<th>优先级</th>
|
||||||
|
<th>起始库位</th>
|
||||||
|
<th>目的库位</th>
|
||||||
|
<th>任务状态</th>
|
||||||
|
<th>载具号</th>
|
||||||
|
<th>创建时间</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.task_id === pkId}">
|
||||||
|
<td>{{e.task_code}}</td>
|
||||||
|
<td>{{e.priority}}</td>
|
||||||
|
<td>{{e.point_code1}}</td>
|
||||||
|
<td>{{e.point_code2}}</td>
|
||||||
|
<td>{{e.inst_status}}</td>
|
||||||
|
<td>{{e.vehicle_code}}</td>
|
||||||
|
<td>{{e.create_time}}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="zd-row submit-bar">
|
||||||
|
<button class="zd-col-5 button-primary" @tap="searchList">查询</button>
|
||||||
|
<button class="zd-col-6 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="toSure('1')">取消</button>
|
||||||
|
<button class="zd-col-6 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="toSure('2')">完成</button>
|
||||||
|
<button class="zd-col-6 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="toSure('3')">创建指令</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import NavBar from '@/components/NavBar.vue'
|
||||||
|
import SearchBox from '@/components/SearchBox.vue'
|
||||||
|
import {tasks, taskoperation} from '@/utils/getData3.js'
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
NavBar,
|
||||||
|
SearchBox
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: '',
|
||||||
|
val1: '',
|
||||||
|
val2: '',
|
||||||
|
dataList: [],
|
||||||
|
pkId: '',
|
||||||
|
disabled: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad (options) {
|
||||||
|
this.title = options.title
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
searchList () {
|
||||||
|
this.dataList = []
|
||||||
|
this._tasks()
|
||||||
|
},
|
||||||
|
async _tasks () {
|
||||||
|
try {
|
||||||
|
let res = await tasks(this.val1, this.val2)
|
||||||
|
if (res && res.data) {
|
||||||
|
this.dataList = [...res.data]
|
||||||
|
} else {
|
||||||
|
this.dataList = []
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
this.dataList = []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
toCheck (e) {
|
||||||
|
this.pkId = e.task_id === this.pkId ? '' : e.task_id
|
||||||
|
},
|
||||||
|
async toSure (status) {
|
||||||
|
this.disabled = true
|
||||||
|
if (!this.pkId) {
|
||||||
|
this.disabled = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
let res = await taskoperation(status, this.pkId)
|
||||||
|
if (res) {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.toEmpty()
|
||||||
|
} catch (e) {
|
||||||
|
this.disabled = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
136
pages/nlfive/zlmanage.vue
Normal file
136
pages/nlfive/zlmanage.vue
Normal file
@@ -0,0 +1,136 @@
|
|||||||
|
<template>
|
||||||
|
<view class="zd_container">
|
||||||
|
<!-- 任务管理 -->
|
||||||
|
<nav-bar :title="title"></nav-bar>
|
||||||
|
<view class="zd_content">
|
||||||
|
<view class="zd_wrapper">
|
||||||
|
<view class="zd-row border-bottom">
|
||||||
|
<view class="zd-col-7">
|
||||||
|
<span class="filter_label">托盘号</span>
|
||||||
|
</view>
|
||||||
|
<view class="zd-col-24 filter_select">
|
||||||
|
<search-box
|
||||||
|
v-model="val1"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="zd-row border-bottom">
|
||||||
|
<view class="zd-col-7">
|
||||||
|
<span class="filter_label">库位编码</span>
|
||||||
|
</view>
|
||||||
|
<view class="zd-col-24 filter_select">
|
||||||
|
<search-box
|
||||||
|
v-model="val2"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="zd_wrapper grid-wraper">
|
||||||
|
<view class="slide_new">
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>指令号</th>
|
||||||
|
<th>任务号</th>
|
||||||
|
<th>优先级</th>
|
||||||
|
<th>起始库位</th>
|
||||||
|
<th>目的库位</th>
|
||||||
|
<th>指令状态</th>
|
||||||
|
<th>托盘号</th>
|
||||||
|
<th>AGV车号</th>
|
||||||
|
<th>创建时间</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.inst_id === pkId}">
|
||||||
|
<td>{{e.instruction_code}}</td>
|
||||||
|
<td>{{e.task_no}}</td>
|
||||||
|
<td>{{e.priority}}</td>
|
||||||
|
<td>{{e.point_code1}}</td>
|
||||||
|
<td>{{e.point_code2}}</td>
|
||||||
|
<td>{{e.inst_status}}</td>
|
||||||
|
<td>{{e.vehicle_code}}</td>
|
||||||
|
<td>{{e.car_no}}</td>
|
||||||
|
<td>{{e.create_time}}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="zd-row submit-bar">
|
||||||
|
<button class="zd-col-5 button-primary" @tap="searchList">查询</button>
|
||||||
|
<button class="zd-col-8 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="toSure('1')">取消</button>
|
||||||
|
<button class="zd-col-8 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="toSure('2')">完成</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import NavBar from '@/components/NavBar.vue'
|
||||||
|
import SearchBox from '@/components/SearchBox.vue'
|
||||||
|
import {insts, inst} from '@/utils/getData3.js'
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
NavBar,
|
||||||
|
SearchBox
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: '',
|
||||||
|
val1: '',
|
||||||
|
val2: '',
|
||||||
|
dataList: [],
|
||||||
|
pkId: '',
|
||||||
|
disabled: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad (options) {
|
||||||
|
this.title = options.title
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
searchList () {
|
||||||
|
this.dataList = []
|
||||||
|
this._insts()
|
||||||
|
},
|
||||||
|
async _insts () {
|
||||||
|
try {
|
||||||
|
let res = await insts(this.val1, this.val2)
|
||||||
|
if (res && res.data) {
|
||||||
|
this.dataList = [...res.data]
|
||||||
|
} else {
|
||||||
|
this.dataList = []
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
this.dataList = []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
toCheck (e) {
|
||||||
|
this.pkId = e.inst_id === this.pkId ? '' : e.inst_id
|
||||||
|
},
|
||||||
|
async toSure (status) {
|
||||||
|
this.disabled = true
|
||||||
|
if (!this.pkId) {
|
||||||
|
this.disabled = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
let res = await inst(status, this.pkId)
|
||||||
|
if (res) {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.toEmpty()
|
||||||
|
} catch (e) {
|
||||||
|
this.disabled = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -49,3 +49,56 @@ export const getAllTaskType = () => request({
|
|||||||
url:'api/hand/getAllTaskType',
|
url:'api/hand/getAllTaskType',
|
||||||
data: {}
|
data: {}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务管理
|
||||||
|
*/
|
||||||
|
// 1.1 查询无指令的任务
|
||||||
|
export const tasks = (vcode, dcode) => request({
|
||||||
|
url:'api/hand/tasks',
|
||||||
|
data: {
|
||||||
|
vehicle_code: vcode,
|
||||||
|
device_code: dcode
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 1.2 任务操作
|
||||||
|
export const taskoperation = (type, id) => request({
|
||||||
|
url:'api/hand/taskoperation',
|
||||||
|
data: {
|
||||||
|
type: type,
|
||||||
|
task_id: id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 指令管理
|
||||||
|
*/
|
||||||
|
// 1.1 查询未完成指令
|
||||||
|
export const insts = (vcode, dcode) => request({
|
||||||
|
url:'api/hand/insts',
|
||||||
|
data: {
|
||||||
|
vehicle_code: vcode,
|
||||||
|
device_code: dcode
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 1.2 指令操作
|
||||||
|
export const inst = (type, id) => request({
|
||||||
|
url:'api/hand/inst',
|
||||||
|
data: {
|
||||||
|
type: type,
|
||||||
|
inst_id: id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 呼叫agv
|
||||||
|
*/
|
||||||
|
// 创建任务(生成任务号为-开头)
|
||||||
|
export const callTask = (scode, ncode, vcode) => request({
|
||||||
|
url:'api/hand/callTask',
|
||||||
|
data: {
|
||||||
|
start_device_code: scode,
|
||||||
|
next_device_code: ncode,
|
||||||
|
vehicle_code: vcode
|
||||||
|
}
|
||||||
|
})
|
||||||
Reference in New Issue
Block a user