扫码异常
This commit is contained in:
@@ -4,11 +4,17 @@
|
|||||||
<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">
|
||||||
<label class="search-label">缓存线</label>
|
<label class="search-label">生产区域</label>
|
||||||
<view class="filter_input_wraper">
|
<view class="filter_input_wraper">
|
||||||
<uni-data-select v-model="index1" :localdata="options1" @change="selectChange1"></uni-data-select>
|
<uni-data-select v-model="index1" :localdata="options1" @change="selectChange1"></uni-data-select>
|
||||||
</view>
|
</view>
|
||||||
</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">
|
<view class="search-item">
|
||||||
<label class="search-label">料箱码</label>
|
<label class="search-label">料箱码</label>
|
||||||
<view class="filter_input_wraper">
|
<view class="filter_input_wraper">
|
||||||
@@ -55,7 +61,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import NavBar from '@/components/NavBar.vue'
|
import NavBar from '@/components/NavBar.vue'
|
||||||
import SearchBox from '@/components/SearchBox.vue'
|
import SearchBox from '@/components/SearchBox.vue'
|
||||||
import {queryInstraction, instOperation} from '@/utils/getData2.js'
|
import {getCacheLine, inOutExceptionInstQuery, inOutExceptionInstConfirm} from '@/utils/getData2.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
NavBar,
|
NavBar,
|
||||||
@@ -63,28 +69,47 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
options1: [{text: '里经历了', value: '1'}],
|
options1: [{text: 'A1', value: 'A1'}, {text: 'A2', value: 'A2'}],
|
||||||
index1: '',
|
index1: 'A1',
|
||||||
|
options2: [],
|
||||||
|
index2: '',
|
||||||
val1: '',
|
val1: '',
|
||||||
dataList: [],
|
dataList: [],
|
||||||
pkId: '',
|
pkId: '',
|
||||||
|
pkObj: {},
|
||||||
disabled: false
|
disabled: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this._getCacheLine('A1')
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 选择器1 */
|
/** 选择器1 */
|
||||||
selectChange1(e) {
|
selectChange1(e) {
|
||||||
this.index1 = e
|
this.index1 = e
|
||||||
|
if (this.index1) {
|
||||||
|
this._getCacheLine(e)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 选择器2 */
|
||||||
|
selectChange2(e) {
|
||||||
|
this.index2 = e
|
||||||
},
|
},
|
||||||
toSearch () {
|
toSearch () {
|
||||||
this.dataList = []
|
this.dataList = []
|
||||||
this._queryInstraction()
|
this.pkId = ''
|
||||||
|
this.pkObj = {}
|
||||||
|
this._inOutExceptionInstQuery()
|
||||||
},
|
},
|
||||||
async _queryInstraction () {
|
async _getCacheLine (id) {
|
||||||
let res = await queryInstraction()
|
let res = await getCacheLine(id)
|
||||||
this.dataList = [...res.data]
|
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
|
this.disabled = true
|
||||||
if (!this.pkId) {
|
if (!this.pkId) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@@ -94,15 +119,29 @@
|
|||||||
this.disabled = false
|
this.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this._instOperation()
|
try {
|
||||||
},
|
this.$set(this.pkObj, 'inOut_type', '1')
|
||||||
async _instOperation () {
|
let res = await inOutExceptionInstConfirm(this.pkObj)
|
||||||
let res = await instOperation()
|
this.disabled = false
|
||||||
this.dataList = [...res.data]
|
this.toSearch()
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
} catch (e) {
|
||||||
|
this.disabled = false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
toRadio (e) {
|
toRadio (e) {
|
||||||
this.pkId = this.pkId === e.instruct_uuid ? '' : e.instruct_uuid
|
this.pkId = this.pkId === e.instruct_uuid ? '' : e.instruct_uuid
|
||||||
|
this.pkObj = this.pkId === e.instruct_uuid ? e : {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus" scoped>
|
||||||
|
@import '../../common/style/mixin.styl';
|
||||||
|
.grid-wrap
|
||||||
|
height calc(100% - 237px) /** 42+ 15*6+ 35*3 */
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -4,11 +4,17 @@
|
|||||||
<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">
|
||||||
<label class="search-label">缓存线</label>
|
<label class="search-label">生产区域</label>
|
||||||
<view class="filter_input_wraper">
|
<view class="filter_input_wraper">
|
||||||
<uni-data-select v-model="index1" :localdata="options1" @change="selectChange1"></uni-data-select>
|
<uni-data-select v-model="index1" :localdata="options1" @change="selectChange1"></uni-data-select>
|
||||||
</view>
|
</view>
|
||||||
</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">
|
<view class="search-item">
|
||||||
<label class="search-label">料箱码</label>
|
<label class="search-label">料箱码</label>
|
||||||
<view class="filter_input_wraper">
|
<view class="filter_input_wraper">
|
||||||
@@ -57,7 +63,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import NavBar from '@/components/NavBar.vue'
|
import NavBar from '@/components/NavBar.vue'
|
||||||
import SearchBox from '@/components/SearchBox.vue'
|
import SearchBox from '@/components/SearchBox.vue'
|
||||||
import {queryInstraction, instOperation} from '@/utils/getData2.js'
|
import {getCacheLine, inOutExceptionInstQuery, inOutExceptionInstConfirm} from '@/utils/getData2.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
NavBar,
|
NavBar,
|
||||||
@@ -65,11 +71,14 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
options1: [],
|
options1: [{text: 'A1', value: 'A1'}, {text: 'A2', value: 'A2'}],
|
||||||
index1: '',
|
index1: 'A1',
|
||||||
|
options2: [],
|
||||||
|
index2: '',
|
||||||
val1: '',
|
val1: '',
|
||||||
dataList: [{instruct_uuid: '1', instructorder_no: '000dfj'}],
|
dataList: [],
|
||||||
pkId: '',
|
pkId: '',
|
||||||
|
pkObj: {},
|
||||||
disabled: false
|
disabled: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -77,16 +86,29 @@
|
|||||||
/** 选择器1 */
|
/** 选择器1 */
|
||||||
selectChange1(e) {
|
selectChange1(e) {
|
||||||
this.index1 = e
|
this.index1 = e
|
||||||
|
if (this.index1) {
|
||||||
|
this._getCacheLine(e)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 选择器2 */
|
||||||
|
selectChange2(e) {
|
||||||
|
this.index2 = e
|
||||||
},
|
},
|
||||||
toSearch () {
|
toSearch () {
|
||||||
this.dataList = []
|
this.dataList = []
|
||||||
this._queryInstraction()
|
this.pkId = ''
|
||||||
|
this.pkObj = {}
|
||||||
|
this._inOutExceptionInstQuery()
|
||||||
},
|
},
|
||||||
async _queryInstraction () {
|
async _getCacheLine (id) {
|
||||||
let res = await queryInstraction()
|
let res = await getCacheLine(id)
|
||||||
this.dataList = [...res.data]
|
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
|
this.disabled = true
|
||||||
if (!this.pkId) {
|
if (!this.pkId) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@@ -96,15 +118,29 @@
|
|||||||
this.disabled = false
|
this.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this._instOperation()
|
try {
|
||||||
},
|
this.$set(this.pkObj, 'inOut_type', '2')
|
||||||
async _instOperation () {
|
let res = await inOutExceptionInstConfirm(this.pkObj)
|
||||||
let res = await instOperation()
|
this.disabled = false
|
||||||
this.dataList = [...res.data]
|
this.toSearch()
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
} catch (e) {
|
||||||
|
this.disabled = false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
toRadio (e) {
|
toRadio (e) {
|
||||||
this.pkId = this.pkId === e.instruct_uuid ? '' : e.instruct_uuid
|
this.pkId = this.pkId === e.instruct_uuid ? '' : e.instruct_uuid
|
||||||
|
this.pkObj = this.pkId === e.instruct_uuid ? e : {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus" scoped>
|
||||||
|
@import '../../common/style/mixin.styl';
|
||||||
|
.grid-wrap
|
||||||
|
height calc(100% - 237px) /** 42+ 15*6+ 35*3 */
|
||||||
|
</style>
|
||||||
@@ -9,18 +9,29 @@ export const handLogin = (user, password) => request({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
/** 入箱扫码异常 */
|
/** 扫码异常 */
|
||||||
export const inOutExceptionInstQuery = (user, password) => request({
|
// 1.1缓存线下拉框
|
||||||
url:'mobile/auth/login',
|
export const getCacheLine = (area) => request({
|
||||||
|
url:'api/cacheLineHand/getCacheLine',
|
||||||
data: {
|
data: {
|
||||||
username: user,
|
product_area: area
|
||||||
password: password
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
export const instOperation = (user, password) => request({
|
// 1.2指令查询
|
||||||
url:'mobile/auth/login',
|
export const inOutExceptionInstQuery = (type, wcode, vcode) => request({
|
||||||
|
url:'api/cacheLineHand/inOutExceptionInstQuery',
|
||||||
data: {
|
data: {
|
||||||
username: user,
|
form: {
|
||||||
password: password
|
inOut_type: type,
|
||||||
|
wcsdevice_code: wcode,
|
||||||
|
vehicle_code: vcode
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 1.3确认
|
||||||
|
export const inOutExceptionInstConfirm = (obj) => request({
|
||||||
|
url:'api/cacheLineHand/inOutExceptionInstConfirm',
|
||||||
|
data: {
|
||||||
|
form: obj
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
Reference in New Issue
Block a user