change
This commit is contained in:
@@ -32,7 +32,10 @@
|
||||
return {
|
||||
userName: '',
|
||||
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,
|
||||
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>
|
||||
Reference in New Issue
Block a user