This commit is contained in:
2023-05-10 18:30:23 +08:00
commit 35d7eefc4d
102 changed files with 15443 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {
};
}
}
</script>
<style lang="stylus">
</style>

View File

@@ -0,0 +1,123 @@
<template>
<view class="zd_container">
<nav-bar title="任务管理"></nav-bar>
<view class="zd_content">
<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>时间</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.task_uuid === pkId}">
<td>{{e.task_no}}</td>
<td>{{e.start_devicecode}}</td>
<td>{{e.next_devicecode}}</td>
<td>{{e.task_status_name}}</td>
<td>{{e.vehicle_code}}</td>
<td>{{e.material_type_name}}</td>
<td>{{e.priority}}</td>
<td>{{e.create_time}}</td>
</tr>
</tbody>
</table>
</view>
</view>
</view>
<view class="submit-bar">
<button class="submit-button" :class="{'btn-disabled': !pkId}" :disabled="disabled1" @tap="toSure1('1')">重新生成</button>
<button class="submit-button" :class="{'btn-disabled': !pkId}" :disabled="disabled2" @tap="toSure2('2')">强制完成</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import {queryTask, taskOperation} from '@/utils/getData2.js'
export default {
components: {
NavBar
},
data() {
return {
keyword: '',
startPoint: '',
endPoint: '',
dataList: [],
disabled1: false,
disabled2: false,
disabled3: false,
pkId: ''
};
},
created () {
this.queryTask(this.keyword, this.startPoint, this.endPoint)
},
methods: {
async queryTask () {
let res = await queryInstraction(this.keyword, this.startPoint, this.endPoint)
if (res.code === '1') {
this.dataList = [...res.result]
} else {
uni.showToast({
title: res.desc,
icon: 'none'
})
}
},
async taskOperation (type) {
try {
let res = await instOperation(this.pkId, type)
if (res.code === '1') {
this.disabled1 = false
this.disabled2 = false
this.pkId = ''
this.queryTask()
uni.showToast({
title: res.desc,
icon: 'none'
})
} else {
this.Dialog(res.desc)
this.disabled1 = false
this.disabled2 = false
}
} catch (err) {
this.disabled1 = false
this.disabled2 = false
}
},
toCheck (e) {
this.pkId = this.pkId === e.task_uuid ? '' : e.task_uuid
},
toSure1 (type) {
this.disabled1 = true
if (!this.pkId) {
this.disabled1 = false
return
}
this.instOperation(type)
},
toSure2 (type) {
this.disabled2 = true
if (!this.pkId) {
this.disabled2 = false
return
}
this.instOperation(type)
}
}
}
</script>
<style lang="stylus">
</style>

139
pages/modules/zlmanage.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 grid-wraper">
<view class="slide_new">
<table>
<thead>
<tr>
<th>任务号</th>
<th>指令号</th>
<th>起点</th>
<th>终点</th>
<th>状态</th>
<th>托盘号</th>
<th>agv车号</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.inst_uuid === pkId}">
<td>{{e.task_no}}</td>
<td>{{e.inst_no}}</td>
<td>{{e.start_devicecode}}</td>
<td>{{e.next_devicecode}}</td>
<td>{{e.inst_status_name}}</td>
<td>{{e.vehicle_code}}</td>
<td>{{e.carno}}</td>
<td>{{e.material_type_name}}</td>
<td>{{e.priority}}</td>
<td>{{e.create_time}}</td>
</tr>
</tbody>
</table>
</view>
</view>
</view>
<view class="submit-bar">
<button class="submit-button" :class="{'btn-disabled': !pkId}" :disabled="disabled1" @tap="toSure1('1')">指令撤销</button>
<button class="submit-button" :class="{'btn-disabled': !pkId}" :disabled="disabled2" @tap="toSure2('2')">重新下发</button>
<button class="submit-button" :class="{'btn-disabled': !pkId}" :disabled="disabled3" @tap="toSure3('3')">强制完成</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import {queryInstraction, instOperation} from '@/utils/getData2.js'
export default {
components: {
NavBar
},
data() {
return {
keyword: '',
startPoint: '',
endPoint: '',
dataList: [],
disabled1: false,
disabled2: false,
disabled3: false,
pkId: ''
};
},
created () {
this.queryInstraction(this.keyword, this.startPoint, this.endPoint)
},
methods: {
async queryInstraction () {
let res = await queryInstraction(this.keyword, this.startPoint, this.endPoint)
if (res.code === '1') {
this.dataList = [...res.result]
} else {
uni.showToast({
title: res.desc,
icon: 'none'
})
}
},
async instOperation (type) {
try {
let res = await instOperation(this.pkId, type)
if (res.code === '1') {
this.disabled1 = false
this.disabled2 = false
this.disabled3 = false
this.pkId = ''
this.queryInstraction()
uni.showToast({
title: res.desc,
icon: 'none'
})
} else {
this.Dialog(res.desc)
this.disabled1 = false
this.disabled2 = false
this.disabled3 = false
}
} catch (err) {
this.disabled1 = false
this.disabled2 = false
this.disabled3 = false
}
},
toCheck (e) {
this.pkId = this.pkId === e.inst_uuid ? '' : e.inst_uuid
},
toSure1 (type) {
this.disabled1 = true
if (!this.pkId) {
this.disabled1 = false
return
}
this.instOperation(type)
},
toSure2 (type) {
this.disabled2 = true
if (!this.pkId) {
this.disabled2 = false
return
}
this.instOperation(type)
},
toSure3 (type) {
this.disabled3 = true
if (!this.pkId) {
this.disabled3 = false
return
}
this.instOperation(type)
}
}
}
</script>
<style lang="stylus">
</style>