扫码异常

This commit is contained in:
2023-04-06 11:28:00 +08:00
parent c9426fd131
commit 580ff867ba
4 changed files with 38 additions and 181 deletions

View File

@@ -56,12 +56,6 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{
"path": "pages/management/hcxInfo",
"style": {
"navigationStyle": "custom"
}
},
{ {
"path": "pages/management/agvinerror", "path": "pages/management/agvinerror",
"style": { "style": {

View File

@@ -1,147 +0,0 @@
<template>
<view class="content">
<nav-bar :inner2="true" @goIn="goIn" title="缓存线-详情"></nav-bar>
<view class="search-confirm-wrap">
<view class="search-wrap">
<view class="search-item">
<label class="search-label">料箱码</label>
<view class="filter_input_wraper">
<search-box
v-model="val1"
/>
</view>
</view>
<view class="search-item">
<label class="search-label">工序</label>
<view class="filter_input_wraper">
<uni-data-select v-model="index1" :localdata="options1" @change="selectChange1"></uni-data-select>
</view>
</view>
<view class="search-item">
<label class="search-label">物料</label>
<view class="filter_input_wraper">
<input type="text" class="search-input-l" v-model="val2">
</view>
</view>
<view class="search-item">
<label class="search-label">名称</label>
<view class="filter_input_wraper">
<input type="text" class="search-input-l" v-model="val3">
</view>
</view>
<view class="search-item">
<label class="search-label">规格</label>
<view class="filter_input_wraper">
<input type="text" class="search-input-l" v-model="val4">
</view>
</view>
<view class="search-item">
<label class="search-label">数量</label>
<view class="filter_input_wraper">
<input type="number" class="search-input-l" v-model="val5">
</view>
</view>
<view class="search-item">
<label class="search-label">重量</label>
<view class="filter_input_wraper">
<input type="number" class="search-input-l" v-model="val6">
</view>
</view>
<view class="search-item">
<label class="search-label"></label>
<view class="filter_input_wraper">
<uni-data-select v-model="index2" :localdata="options2" @change="selectChange2"></uni-data-select>
</view>
</view>
<view class="search-item">
<label class="search-label">位置</label>
<view class="filter_input_wraper">
<uni-data-select v-model="index3" :localdata="options3" @change="selectChange3"></uni-data-select>
</view>
</view>
</view>
<view class="confirm-button-wrap">
<button class="confirm-button" @tap="toSearch()">设为满框</button>
<button class="confirm-button" :disabled="disabled" @tap="toSure()">设为空框</button>
<button class="confirm-button" :disabled="disabled" @tap="toSure()">设为空位</button>
</view>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {queryInstraction, instOperation} from '@/utils/getData2.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
options1: [],
index1: '',
options2: [],
index2: '',
options3: [],
index3: '',
val1: '',
val2: '',
val3: '',
val4: '',
val5: '',
val6: '',
dataList: [],
pkId: '',
disabled: false
};
},
methods: {
/** 选择器1 */
selectChange1(e) {
this.index1 = e
},
/** 选择器3 */
selectChange2(e) {
this.index2 = e
},
/** 选择器3 */
selectChange3(e) {
this.index3 = e
},
goIn () {
uni.navigateTo({
url: `/pages/management/hcxcheck`
})
},
toSearch () {
this.dataList = []
this._queryInstraction()
},
async _queryInstraction () {
let res = await queryInstraction()
this.dataList = [...res.data]
},
toSure () {
this.disabled = true
if (!this.pkId) {
uni.showToast({
title: '请选择',
icon: 'none'
})
this.disabled = false
return
}
this._instOperation()
},
async _instOperation () {
let res = await instOperation()
this.dataList = [...res.data]
},
toRadio (e) {
this.pkId = this.pkId === e.instruct_uuid ? '' : e.instruct_uuid
}
}
}
</script>

View File

@@ -1,6 +1,6 @@
<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-confirm-wrap">
<view class="search-wrap"> <view class="search-wrap">
<view class="search-item"> <view class="search-item">
@@ -16,7 +16,7 @@
</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="val1" v-model="val1"
@@ -25,7 +25,7 @@
</view> </view>
<view class="search-item search-item-btns"> <view class="search-item search-item-btns">
<button class="confirm-button" @tap="toSearch">查询</button> <button class="confirm-button" @tap="toSearch">查询</button>
<button class="confirm-button" :class="{'confirm-button_disabled': !pkId}" :disabled="disabled" @tap="toSure">确认</button> <button class="confirm-button" :class="{'confirm-button_disabled': !pkId || !index2 || !val1}" :disabled="disabled" @tap="toSure">确认</button>
</view> </view>
</view> </view>
<!-- <view class="confirm-button-wrap"> <!-- <view class="confirm-button-wrap">
@@ -38,23 +38,19 @@
<thead> <thead>
<tr> <tr>
<th>选择</th> <th>选择</th>
<th>指令编号</th> <th>缓存线编码</th>
<th>设备编号</th> <th>缓存线位置编码</th>
<th>起点</th> <th>料箱码</th>
<th>目的</th>
<th>目的2</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr v-for="e in dataList" :key="e.instruct_uuid" @click="toRadio(e)"> <tr v-for="e in dataList" :key="e.position_code" @click="toRadio(e)">
<td> <td>
<view class="iconfont icon-check" :class="{'icon-checked': pkId === e.instruct_uuid}"></view> <view class="iconfont icon-check" :class="{'icon-checked': pkId === e.position_code}"></view>
</td> </td>
<td>{{e.instructorder_no}}</td> <td>{{e.cacheLine_code}}</td>
<td>{{e.wcsdevice_code}}</td> <td>{{e.position_code}}</td>
<td>{{e.startpoint_code}}</td> <td>{{vehicle_code}}</td>
<td>{{e.nextpoint_code}}</td>
<td>{{e.nextpoint_code2}}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -80,7 +76,6 @@
val1: '', val1: '',
dataList: [], dataList: [],
pkId: '', pkId: '',
pkObj: {},
disabled: false disabled: false
}; };
}, },
@@ -103,7 +98,6 @@
toSearch () { toSearch () {
this.dataList = [] this.dataList = []
this.pkId = '' this.pkId = ''
this.pkObj = {}
this._inOutExceptionInstQuery() this._inOutExceptionInstQuery()
}, },
async _getCacheLine (id) { async _getCacheLine (id) {
@@ -111,7 +105,7 @@
this.options2 = [...res] this.options2 = [...res]
}, },
async _inOutExceptionInstQuery () { async _inOutExceptionInstQuery () {
let res = await inOutExceptionInstQuery('1',this.index2,this.val1) let res = await inOutExceptionInstQuery(this.index2)
this.dataList = [...res] this.dataList = [...res]
}, },
async toSure () { async toSure () {
@@ -124,9 +118,24 @@
this.disabled = false this.disabled = false
return return
} }
if (!this.index2) {
uni.showToast({
title: '请选择缓存线',
icon: 'none'
})
this.disabled = false
return
}
if (!this.val1) {
uni.showToast({
title: '请扫满箱码',
icon: 'none'
})
this.disabled = false
return
}
try { try {
this.$set(this.pkObj, 'inOut_type', '1') let res = await inOutExceptionInstConfirm(this.index2, this.val1, this.pkId)
let res = await inOutExceptionInstConfirm(this.pkObj)
this.disabled = false this.disabled = false
this.toSearch() this.toSearch()
uni.showToast({ uni.showToast({
@@ -138,8 +147,7 @@
} }
}, },
toRadio (e) { toRadio (e) {
this.pkId = this.pkId === e.instruct_uuid ? '' : e.instruct_uuid this.pkId = this.pkId === e.position_code ? '' : e.position_code
this.pkObj = this.pkId === e.instruct_uuid ? e : {}
} }
} }
} }

View File

@@ -30,18 +30,20 @@ export const getCacheLine = (area) => request({
} }
}) })
// 1.2指令查询 // 1.2指令查询
export const inOutExceptionInstQuery = (type, wcode, vcode) => request({ export const inOutExceptionInstQuery = (wcode) => request({
url:'api/cacheLineHand/inOutExceptionInstQuery', url:'api/cacheLineHand/inOutExceptionInstQuery',
data: { data: {
inOut_type: type, wcsdevice_code: wcode
wcsdevice_code: wcode,
vehicle_code: vcode
} }
}) })
// 1.3确认 // 1.3确认
export const inOutExceptionInstConfirm = (obj) => request({ export const inOutExceptionInstConfirm = (wcode, vcode, pcode) => request({
url:'api/cacheLineHand/inOutExceptionInstConfirm', url:'api/cacheLineHand/inOutExceptionInstConfirm',
data: obj data: {
wcsdevice_code: wcode,
vehicle_code: vcode,
position_code: pcode
}
}) })
/** 缓存线盘点 */ /** 缓存线盘点 */