缓存线出箱异常

This commit is contained in:
2023-03-23 15:42:19 +08:00
parent 7ab5698493
commit 05d3bf14b6
3 changed files with 132 additions and 156 deletions

View File

@@ -1,50 +1,51 @@
<template> <template>
<view class="content"> <view class="content">
<nav-bar title="AGV出箱异常"></nav-bar> <nav-bar title="AGV出箱异常"></nav-bar>
<view class="search-confirm-wrap">
<view class="search-wrap"> <view class="search-wrap">
<view class="search-item"> <view class="search-item">
<label class="search-label">缓存线</label> <label class="search-label">缓存线</label>
<input type="text" class="search-input" v-model="keyword"> <view class="filter_input_wraper">
<uni-data-select v-model="index1" :localdata="options1" @change="selectChange1"></uni-data-select>
</view>
</view> </view>
<view class="search-item"> <view class="search-item">
<label class="search-label">料箱码</label> <label class="search-label">料箱码</label>
<input type="text" class="search-input" v-model="startPoint"> <view class="filter_input_wraper">
<search-box
v-model="val1"
/>
</view>
</view> </view>
</view> </view>
<view class="confirm-button-wrap"> <view class="confirm-button-wrap">
<button class="confirm-button" :disabled="disabled0" @click="toSearch()">查询</button> <button class="confirm-button" @tap="toSearch()">查询</button>
<button class="confirm-button" :disabled="disabled1" @click="toSure">确认</button> <button class="confirm-button" :disabled="disabled" @tap="toSure()">确认</button>
<button class="confirm-button" :disabled="disabled" @tap="toSure()">倒料</button>
</view>
</view> </view>
<view class="grid-wrap"> <view class="grid-wrap">
<table class="grid-table"> <table class="grid-table">
<thead> <thead>
<tr> <tr>
<th>选择</th> <th>选择</th>
<th>指令号</th> <th>指令</th>
<th>任务</th> <th>设备编</th>
<th>起点</th> <th>起点</th>
<th>终点</th> <th>目的</th>
<th>状态</th> <th>目的2</th>
<th>agv车号</th>
<th>物料类型</th>
<th>优先级</th>
<th>时间</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr v-for="e in dataList" :key="e.inst_uuid" @click="toRadio(e)"> <tr v-for="e in dataList" :key="e.instruct_uuid" @click="toRadio(e)">
<td> <td>
<view class="iconfont icon-check" :class="{'icon-checked': pkId === e.inst_uuid}"></view> <view class="iconfont icon-check" :class="{'icon-checked': pkId === e.instruct_uuid}"></view>
</td> </td>
<td>{{e.inst_no}}</td> <td>{{e.instructorder_no}}</td>
<td>{{e.task_no}}</td> <td>{{e.wcsdevice_code}}</td>
<td>{{e.start_devicecode}}</td> <td>{{e.startpoint_code}}</td>
<td>{{e.next_devicecode}}</td> <td>{{e.nextpoint_code}}</td>
<td>{{e.inst_status_name}}</td> <td>{{e.nextpoint_code2}}</td>
<td>{{e.carno}}</td>
<td>{{e.material_type_name}}</td>
<td>{{e.priority}}</td>
<td>{{e.create_time}}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -54,50 +55,54 @@
<script> <script>
import NavBar from '@/components/NavBar.vue' import NavBar from '@/components/NavBar.vue'
// import {queryInstraction, instOperation} from '@/utils/api.js' import SearchBox from '@/components/SearchBox.vue'
import {queryInstraction, instOperation} from '@/utils/getData2.js'
export default { export default {
components: { components: {
NavBar NavBar,
SearchBox
}, },
data() { data() {
return { return {
options1: [],
index1: '',
val1: '',
dataList: [], dataList: [],
keyword: '',
startPoint: '',
endPoint: '',
pkId: '', pkId: '',
disabled0: false, disabled: false
disabled1: false
}; };
}, },
mounted () {
this.queryInstraction(this.keyword, this.startPoint, this.endPoint)
},
methods: { methods: {
onNavigationBarButtonTap(e) { /** 选择器1 */
uni.redirectTo({ selectChange1(e) {
url: '/pages/index/index' this.index1 = e
});
}, },
toSearch () { toSearch () {
this.pkId = ''
this.dataList = [] this.dataList = []
this.disabled0 = true this._queryInstraction()
this.queryInstraction()
}, },
toSure (type) { async _queryInstraction () {
if (this.pkId) { let res = await queryInstraction()
this.disabled1 = true this.dataList = [...res.data]
this.instOperation(type) },
} else { toSure () {
this.disabled = true
if (!this.pkId) {
uni.showToast({ uni.showToast({
title: '请查询后进行选择', title: '请选择',
icon: 'none' icon: 'none'
}) })
this.disabled = false
return
} }
this._instOperation()
},
async _instOperation () {
let res = await instOperation()
this.dataList = [...res.data]
}, },
toRadio (e) { toRadio (e) {
this.pkId = this.pkId === e.inst_uuid ? '' : e.inst_uuid this.pkId = this.pkId === e.instruct_uuid ? '' : e.instruct_uuid
} }
} }
} }
@@ -105,16 +110,6 @@
<style lang="stylus" scoped> <style lang="stylus" scoped>
@import '../../common/style/mixin.styl'; @import '../../common/style/mixin.styl';
.content1 .grid-wrap
flex-direction column height calc(100% - 526rpx)
justify-content flex-start
padding 30rpx
box-sizing border-box
.icon-check
_wh(44rpx, 44rpx)
background-color #ffffff
border-radius 50%
margin 0 auto
.icon-checked
background-color $red
</style> </style>

View File

@@ -1,54 +1,48 @@
<template> <template>
<view class="content"> <view class="content">
<nav-bar title="缓存线出箱异常"></nav-bar> <nav-bar title="缓存线出箱异常"></nav-bar>
<view class="search-confirm-wrap">
<view class="search-wrap"> <view class="search-wrap">
<view class="search-item"> <view class="search-item">
<label class="search-label">缓存线</label> <label class="search-label">缓存线</label>
<view class="filter_input_wraper"> <view class="filter_input_wraper">
<input type="text" class="search-input-l" v-model="val1"> <uni-data-select v-model="index1" :localdata="options1" @change="selectChange1"></uni-data-select>
</view> </view>
</view> </view>
<view class="search-item"> <view class="search-item">
<label class="search-label">车号</label> <label class="search-label">车号</label>
<view class="filter_input_wraper"> <view class="filter_input_wraper">
<input type="text" class="search-input-l" v-model="val2"> <input type="text" class="search-input-l" v-model="val1">
</view> </view>
</view> </view>
</view> </view>
<view class="confirm-button-wrap"> <view class="confirm-button-wrap">
<button class="confirm-button" :disabled="disabled0" @click="toSearch()">查询</button> <button class="confirm-button" @tap="toSearch()">查询</button>
<button class="confirm-button" :disabled="disabled1" @click="toSure">确认</button> <button class="confirm-button" :disabled="disabled" @tap="toSure()">确认</button>
</view>
</view> </view>
<view class="grid-wrap"> <view class="grid-wrap">
<table class="grid-table"> <table class="grid-table">
<thead> <thead>
<tr> <tr>
<th>选择</th> <th>选择</th>
<th>指令号</th> <th>指令</th>
<th>任务</th> <th>设备编</th>
<th>起点</th> <th>起点</th>
<th>终点</th> <th>目的</th>
<th>状态</th> <th>目的2</th>
<th>agv车号</th>
<th>物料类型</th>
<th>优先级</th>
<th>时间</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr v-for="e in dataList" :key="e.inst_uuid" @click="toRadio(e)"> <tr v-for="e in dataList" :key="e.instruct_uuid" @click="toRadio(e)">
<td> <td>
<view class="iconfont icon-check" :class="{'icon-checked': pkId === e.inst_uuid}"></view> <view class="iconfont icon-check" :class="{'icon-checked': pkId === e.instruct_uuid}"></view>
</td> </td>
<td>{{e.inst_no}}</td> <td>{{e.instructorder_no}}</td>
<td>{{e.task_no}}</td> <td>{{e.wcsdevice_code}}</td>
<td>{{e.start_devicecode}}</td> <td>{{e.startpoint_code}}</td>
<td>{{e.next_devicecode}}</td> <td>{{e.nextpoint_code}}</td>
<td>{{e.inst_status_name}}</td> <td>{{e.nextpoint_code2}}</td>
<td>{{e.carno}}</td>
<td>{{e.material_type_name}}</td>
<td>{{e.priority}}</td>
<td>{{e.create_time}}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -58,50 +52,54 @@
<script> <script>
import NavBar from '@/components/NavBar.vue' import NavBar from '@/components/NavBar.vue'
// import {queryInstraction, instOperation} from '@/utils/api.js' import SearchBox from '@/components/SearchBox.vue'
import {queryInstraction, instOperation} from '@/utils/getData2.js'
export default { export default {
components: { components: {
NavBar NavBar,
SearchBox
}, },
data() { data() {
return { return {
options1: [],
index1: '',
val1: '',
dataList: [], dataList: [],
keyword: '',
startPoint: '',
endPoint: '',
pkId: '', pkId: '',
disabled0: false, disabled: false
disabled1: false
}; };
}, },
mounted () {
this.queryInstraction(this.keyword, this.startPoint, this.endPoint)
},
methods: { methods: {
onNavigationBarButtonTap(e) { /** 选择器1 */
uni.redirectTo({ selectChange1(e) {
url: '/pages/index/index' this.index1 = e
});
}, },
toSearch () { toSearch () {
this.pkId = ''
this.dataList = [] this.dataList = []
this.disabled0 = true this._queryInstraction()
this.queryInstraction()
}, },
toSure (type) { async _queryInstraction () {
if (this.pkId) { let res = await queryInstraction()
this.disabled1 = true this.dataList = [...res.data]
this.instOperation(type) },
} else { toSure () {
this.disabled = true
if (!this.pkId) {
uni.showToast({ uni.showToast({
title: '请查询后进行选择', title: '请选择',
icon: 'none' icon: 'none'
}) })
this.disabled = false
return
} }
this._instOperation()
},
async _instOperation () {
let res = await instOperation()
this.dataList = [...res.data]
}, },
toRadio (e) { toRadio (e) {
this.pkId = this.pkId === e.inst_uuid ? '' : e.inst_uuid this.pkId = this.pkId === e.instruct_uuid ? '' : e.instruct_uuid
} }
} }
} }
@@ -109,16 +107,6 @@
<style lang="stylus" scoped> <style lang="stylus" scoped>
@import '../../common/style/mixin.styl'; @import '../../common/style/mixin.styl';
.content1 .grid-wrap
flex-direction column height calc(100% - 526rpx)
justify-content flex-start
padding 30rpx
box-sizing border-box
.icon-check
_wh(44rpx, 44rpx)
background-color #ffffff
border-radius 50%
margin 0 auto
.icon-checked
background-color $red
</style> </style>

View File

@@ -12,57 +12,45 @@
<view class="search-item"> <view class="search-item">
<label class="search-label">指令号</label> <label class="search-label">指令号</label>
<view class="filter_input_wraper"> <view class="filter_input_wraper">
<search-box <input type="text" class="search-input-l" v-model="val1">
v-model="val1"
/>
</view> </view>
</view> </view>
<view class="search-item"> <view class="search-item">
<label class="search-label">AGV号</label> <label class="search-label">AGV号</label>
<view class="filter_input_wraper"> <view class="filter_input_wraper">
<search-box <input type="text" class="search-input-l" v-model="val2">
v-model="val2"
/>
</view> </view>
</view> </view>
<view class="search-item"> <view class="search-item">
<label class="search-label">条码</label> <label class="search-label">条码</label>
<view class="filter_input_wraper"> <view class="filter_input_wraper">
<search-box <search-box
v-model="val2" v-model="val3"
/> />
</view> </view>
</view> </view>
<view class="search-item"> <view class="search-item">
<label class="search-label">起点</label> <label class="search-label">起点</label>
<view class="filter_input_wraper"> <view class="filter_input_wraper">
<search-box <input type="text" class="search-input-l" v-model="val4">
v-model="val2"
/>
</view> </view>
</view> </view>
<view class="search-item"> <view class="search-item">
<label class="search-label">终点</label> <label class="search-label">终点</label>
<view class="filter_input_wraper"> <view class="filter_input_wraper">
<search-box <input type="text" class="search-input-l" v-model="val5">
v-model="val2"
/>
</view> </view>
</view> </view>
<view class="search-item"> <view class="search-item">
<label class="search-label">开始日期</label> <label class="search-label">开始日期</label>
<view class="filter_input_wraper"> <view class="filter_input_wraper">
<search-box <input type="text" class="search-input-l" v-model="val6">
v-model="val2"
/>
</view> </view>
</view> </view>
<view class="search-item"> <view class="search-item">
<label class="search-label">结束日期</label> <label class="search-label">结束日期</label>
<view class="filter_input_wraper"> <view class="filter_input_wraper">
<search-box <input type="text" class="search-input-l" v-model="val7">
v-model="val2"
/>
</view> </view>
</view> </view>
</view> </view>
@@ -118,6 +106,11 @@
index1: '', index1: '',
val1: '', val1: '',
val2: '', val2: '',
val3: '',
val4: '',
val5: '',
val6: '',
val7: '',
dataList: [], dataList: [],
pkId: '', pkId: '',
disabled: false disabled: false