修改handArea
This commit is contained in:
@@ -39,7 +39,41 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<div v-if="active" class="msg_wrapper">
|
<div v-if="obj.status === ('0' || '1' || '2' || '3')" class="msg_wrapper">
|
||||||
|
<div class="msg_box">
|
||||||
|
<div class="msg_item">
|
||||||
|
<div class="label_item">当前设备</div>
|
||||||
|
<div class="from_item">
|
||||||
|
{{obj.device_name}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="msg_item">
|
||||||
|
<div class="label_item">当前物料</div>
|
||||||
|
<div class="from_item">
|
||||||
|
<el-select v-model="value" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in options"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="msg_item">
|
||||||
|
<div class="label_item">批次</div>
|
||||||
|
<div class="from_item">
|
||||||
|
<input type="text" class="input_item" v-model="batch">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="msg_btns">
|
||||||
|
<button class="msg_btn" :disabled="disabled1" @click="cleanUp">清空</button>
|
||||||
|
<button class="msg_btn" :disabled="disabled2" @click="msgSure">确认</button>
|
||||||
|
<button class="msg_btn" @click="msgCancle">取消</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-if="obj.status === '4'" class="msg_wrapper">
|
||||||
<div class="msg_box">
|
<div class="msg_box">
|
||||||
<div class="msg_item">
|
<div class="msg_item">
|
||||||
<p>请确认是否放货完成?</p>
|
<p>请确认是否放货完成?</p>
|
||||||
@@ -56,7 +90,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import NavBar from '@components/NavBar.vue'
|
import NavBar from '@components/NavBar.vue'
|
||||||
import {handArea, handPoint, handpointPut} from '@config/getData2'
|
import {handArea, handPoint, handMatrial, handDeviceStatus, handpointPut} from '@config/getData2'
|
||||||
export default {
|
export default {
|
||||||
name: 'PointRelease',
|
name: 'PointRelease',
|
||||||
components: {
|
components: {
|
||||||
@@ -71,7 +105,10 @@ export default {
|
|||||||
pointArr: [],
|
pointArr: [],
|
||||||
regobj: {},
|
regobj: {},
|
||||||
active: false,
|
active: false,
|
||||||
|
options: [],
|
||||||
|
value: '',
|
||||||
obj: {},
|
obj: {},
|
||||||
|
batch: '',
|
||||||
disabled1: false,
|
disabled1: false,
|
||||||
disabled2: false
|
disabled2: false
|
||||||
}
|
}
|
||||||
@@ -79,7 +116,6 @@ export default {
|
|||||||
mounted () {
|
mounted () {
|
||||||
document.body.removeAttribute('class', 'login-bg')
|
document.body.removeAttribute('class', 'login-bg')
|
||||||
this.initArea()
|
this.initArea()
|
||||||
this.initHandMatrial()
|
|
||||||
},
|
},
|
||||||
beforeDestroy () {
|
beforeDestroy () {
|
||||||
clearInterval(this.timer)
|
clearInterval(this.timer)
|
||||||
@@ -91,8 +127,15 @@ export default {
|
|||||||
}, this.interTime)
|
}, this.interTime)
|
||||||
},
|
},
|
||||||
async initArea () {
|
async initArea () {
|
||||||
let res = await handArea('1')
|
let res = await handArea('3')
|
||||||
if (res.code === '1') {
|
if (res.code === '1') {
|
||||||
|
// if (res.result.length > 0) {
|
||||||
|
// res.result.map(el => {
|
||||||
|
// if (el.region_code === '5') {
|
||||||
|
// this.areaArr.push(el)
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// }
|
||||||
this.areaArr = [...res.result]
|
this.areaArr = [...res.result]
|
||||||
this.areaArr.map(el => {
|
this.areaArr.map(el => {
|
||||||
this.$set(el, 'checked', false)
|
this.$set(el, 'checked', false)
|
||||||
@@ -118,6 +161,14 @@ export default {
|
|||||||
this.Dialog(res.desc)
|
this.Dialog(res.desc)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async initHandMatrial () {
|
||||||
|
let res = await handMatrial()
|
||||||
|
if (res.code === '1') {
|
||||||
|
this.options = [...res.result]
|
||||||
|
} else {
|
||||||
|
this.Dialog(res.desc)
|
||||||
|
}
|
||||||
|
},
|
||||||
getPonit (e) {
|
getPonit (e) {
|
||||||
clearInterval(this.timer)
|
clearInterval(this.timer)
|
||||||
this.areaArr.map(el => {
|
this.areaArr.map(el => {
|
||||||
@@ -148,9 +199,55 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
setInfo (e) {
|
setInfo (e) {
|
||||||
if (e.status === '4') {
|
this.active = true
|
||||||
this.active = true
|
this.obj = e
|
||||||
this.obj = e
|
this.value = e.material_type
|
||||||
|
this.batch = e.batch
|
||||||
|
},
|
||||||
|
msgCancle () {
|
||||||
|
this.active = false
|
||||||
|
this.obj = {}
|
||||||
|
this.value = ''
|
||||||
|
this.batch = ''
|
||||||
|
},
|
||||||
|
msgSure () {
|
||||||
|
this.disabled2 = true
|
||||||
|
this.handStatus(this.obj.device_code, this.value, '1', this.obj.status, this.batch)
|
||||||
|
this.active = false
|
||||||
|
},
|
||||||
|
cleanUp () {
|
||||||
|
this.disabled1 = true
|
||||||
|
this.handStatus(this.obj.device_code, '', '2', this.obj.status, '')
|
||||||
|
this.active = false
|
||||||
|
},
|
||||||
|
async handStatus (code, mtype, type, no, batch) {
|
||||||
|
try {
|
||||||
|
let res = await handDeviceStatus(code, mtype, type, no, batch)
|
||||||
|
if (res.code === '1') {
|
||||||
|
this.toast(res.desc)
|
||||||
|
clearInterval(this.timer)
|
||||||
|
var that = this
|
||||||
|
setTimeout(() => {
|
||||||
|
that.initPonit(this.regobj)
|
||||||
|
this.refresh(this.regobj)
|
||||||
|
this.value = ''
|
||||||
|
this.batch = ''
|
||||||
|
this.disabled1 = false
|
||||||
|
this.disabled2 = false
|
||||||
|
}, 2000)
|
||||||
|
} else {
|
||||||
|
this.Dialog(res.desc)
|
||||||
|
this.value = ''
|
||||||
|
this.batch = ''
|
||||||
|
this.disabled1 = false
|
||||||
|
this.disabled2 = false
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err)
|
||||||
|
this.value = ''
|
||||||
|
this.batch = ''
|
||||||
|
this.disabled1 = false
|
||||||
|
this.disabled2 = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
cancle () {
|
cancle () {
|
||||||
|
|||||||
@@ -119,6 +119,13 @@ export default {
|
|||||||
async initArea () {
|
async initArea () {
|
||||||
let res = await handArea('1')
|
let res = await handArea('1')
|
||||||
if (res.code === '1') {
|
if (res.code === '1') {
|
||||||
|
// if (res.result.length > 0) {
|
||||||
|
// res.result.map(el => {
|
||||||
|
// if (el.region_code !== '5') {
|
||||||
|
// this.areaArr.push(el)
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// }
|
||||||
this.areaArr = [...res.result]
|
this.areaArr = [...res.result]
|
||||||
this.areaArr.map(el => {
|
this.areaArr.map(el => {
|
||||||
this.$set(el, 'checked', false)
|
this.$set(el, 'checked', false)
|
||||||
|
|||||||
Reference in New Issue
Block a user