扫码异常

This commit is contained in:
2023-03-28 17:41:35 +08:00
parent c9d64797f0
commit bcc37509d4
3 changed files with 124 additions and 38 deletions

View File

@@ -4,11 +4,17 @@
<view class="search-confirm-wrap">
<view class="search-wrap">
<view class="search-item">
<label class="search-label">缓存线</label>
<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">
<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">
@@ -55,7 +61,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {queryInstraction, instOperation} from '@/utils/getData2.js'
import {getCacheLine, inOutExceptionInstQuery, inOutExceptionInstConfirm} from '@/utils/getData2.js'
export default {
components: {
NavBar,
@@ -63,28 +69,47 @@
},
data() {
return {
options1: [{text: '里经历了', value: '1'}],
index1: '',
options1: [{text: 'A1', value: 'A1'}, {text: 'A2', value: 'A2'}],
index1: 'A1',
options2: [],
index2: '',
val1: '',
dataList: [],
pkId: '',
pkObj: {},
disabled: false
};
},
created() {
this._getCacheLine('A1')
},
methods: {
/** 选择器1 */
selectChange1(e) {
this.index1 = e
if (this.index1) {
this._getCacheLine(e)
}
},
/** 选择器2 */
selectChange2(e) {
this.index2 = e
},
toSearch () {
this.dataList = []
this._queryInstraction()
this.pkId = ''
this.pkObj = {}
this._inOutExceptionInstQuery()
},
async _queryInstraction () {
let res = await queryInstraction()
this.dataList = [...res.data]
async _getCacheLine (id) {
let res = await getCacheLine(id)
this.options2 = [...res.result]
},
toSure () {
async _inOutExceptionInstQuery () {
let res = await inOutExceptionInstQuery('1',this.index2,this.val1)
this.dataList = [...res.result]
},
async toSure () {
this.disabled = true
if (!this.pkId) {
uni.showToast({
@@ -94,15 +119,29 @@
this.disabled = false
return
}
this._instOperation()
},
async _instOperation () {
let res = await instOperation()
this.dataList = [...res.data]
try {
this.$set(this.pkObj, 'inOut_type', '1')
let res = await inOutExceptionInstConfirm(this.pkObj)
this.disabled = false
this.toSearch()
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled = false
}
},
toRadio (e) {
this.pkId = this.pkId === e.instruct_uuid ? '' : e.instruct_uuid
this.pkObj = this.pkId === e.instruct_uuid ? e : {}
}
}
}
</script>
<style lang="stylus" scoped>
@import '../../common/style/mixin.styl';
.grid-wrap
height calc(100% - 237px) /** 42+ 15*6+ 35*3 */
</style>

View File

@@ -4,11 +4,17 @@
<view class="search-confirm-wrap">
<view class="search-wrap">
<view class="search-item">
<label class="search-label">缓存线</label>
<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">
<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">
@@ -57,7 +63,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {queryInstraction, instOperation} from '@/utils/getData2.js'
import {getCacheLine, inOutExceptionInstQuery, inOutExceptionInstConfirm} from '@/utils/getData2.js'
export default {
components: {
NavBar,
@@ -65,11 +71,14 @@
},
data() {
return {
options1: [],
index1: '',
options1: [{text: 'A1', value: 'A1'}, {text: 'A2', value: 'A2'}],
index1: 'A1',
options2: [],
index2: '',
val1: '',
dataList: [{instruct_uuid: '1', instructorder_no: '000dfj'}],
dataList: [],
pkId: '',
pkObj: {},
disabled: false
};
},
@@ -77,16 +86,29 @@
/** 选择器1 */
selectChange1(e) {
this.index1 = e
if (this.index1) {
this._getCacheLine(e)
}
},
/** 选择器2 */
selectChange2(e) {
this.index2 = e
},
toSearch () {
this.dataList = []
this._queryInstraction()
this.pkId = ''
this.pkObj = {}
this._inOutExceptionInstQuery()
},
async _queryInstraction () {
let res = await queryInstraction()
this.dataList = [...res.data]
async _getCacheLine (id) {
let res = await getCacheLine(id)
this.options2 = [...res.result]
},
toSure () {
async _inOutExceptionInstQuery () {
let res = await inOutExceptionInstQuery('2',this.index2,this.val1)
this.dataList = [...res.result]
},
async toSure () {
this.disabled = true
if (!this.pkId) {
uni.showToast({
@@ -96,15 +118,29 @@
this.disabled = false
return
}
this._instOperation()
},
async _instOperation () {
let res = await instOperation()
this.dataList = [...res.data]
try {
this.$set(this.pkObj, 'inOut_type', '2')
let res = await inOutExceptionInstConfirm(this.pkObj)
this.disabled = false
this.toSearch()
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled = false
}
},
toRadio (e) {
this.pkId = this.pkId === e.instruct_uuid ? '' : e.instruct_uuid
this.pkObj = this.pkId === e.instruct_uuid ? e : {}
}
}
}
</script>
<style lang="stylus" scoped>
@import '../../common/style/mixin.styl';
.grid-wrap
height calc(100% - 237px) /** 42+ 15*6+ 35*3 */
</style>

View File

@@ -9,18 +9,29 @@ export const handLogin = (user, password) => request({
}
})
/** 入箱扫码异常 */
export const inOutExceptionInstQuery = (user, password) => request({
url:'mobile/auth/login',
/** 扫码异常 */
// 1.1缓存线下拉框
export const getCacheLine = (area) => request({
url:'api/cacheLineHand/getCacheLine',
data: {
username: user,
password: password
product_area: area
}
})
export const instOperation = (user, password) => request({
url:'mobile/auth/login',
// 1.2指令查询
export const inOutExceptionInstQuery = (type, wcode, vcode) => request({
url:'api/cacheLineHand/inOutExceptionInstQuery',
data: {
username: user,
password: password
form: {
inOut_type: type,
wcsdevice_code: wcode,
vehicle_code: vcode
}
}
})
// 1.3确认
export const inOutExceptionInstConfirm = (obj) => request({
url:'api/cacheLineHand/inOutExceptionInstConfirm',
data: {
form: obj
}
})