搬运任务
This commit is contained in:
@@ -118,3 +118,11 @@ export const handTake = (code, type) => post2('api/hand/take', {
|
|||||||
device_code: code,
|
device_code: code,
|
||||||
type: type
|
type: type
|
||||||
})
|
})
|
||||||
|
|
||||||
|
/** 搬运任务 */
|
||||||
|
// 1.1查询区域
|
||||||
|
export const byQueryRegion = () => post('api/pda/sendMaterial/queryRegion', {})
|
||||||
|
// 1.2查询点位
|
||||||
|
export const byQueryPoint = (id) => post('api/pda/sendMaterial/queryPoint', {
|
||||||
|
region_id: id
|
||||||
|
})
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import NavBar from '@components/NavBar.vue'
|
import NavBar from '@components/NavBar.vue'
|
||||||
import DropdownMenu from '@components/DropdownMenu.vue'
|
import DropdownMenu from '@components/DropdownMenu.vue'
|
||||||
import {queryPoint, sendMaterialConfirm} from '@config/getData2.js'
|
import {byQueryRegion, byQueryPoint, sendMaterialConfirm} from '@config/getData2.js'
|
||||||
export default {
|
export default {
|
||||||
name: 'CarryTask',
|
name: 'CarryTask',
|
||||||
components: {
|
components: {
|
||||||
@@ -88,12 +88,12 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this._queryPoint()
|
this._queryRegion()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 查询区域点位 */
|
/** 查询区域 */
|
||||||
async _queryPoint () {
|
async _queryRegion () {
|
||||||
let res = await queryPoint()
|
let res = await byQueryRegion()
|
||||||
if (res.code === '1') {
|
if (res.code === '1') {
|
||||||
this.option1 = [...res.result]
|
this.option1 = [...res.result]
|
||||||
this.option3 = [...res.result]
|
this.option3 = [...res.result]
|
||||||
@@ -109,6 +109,28 @@ export default {
|
|||||||
this.Dialog(res.desc)
|
this.Dialog(res.desc)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
/** 查询点位 */
|
||||||
|
async _queryPoint (type, id) {
|
||||||
|
let res = await byQueryPoint(id)
|
||||||
|
if (res.code === '1') {
|
||||||
|
if (type === 1) {
|
||||||
|
this.option2 = [...res.pointArr]
|
||||||
|
this.option2.map(el => {
|
||||||
|
this.$set(el, 'value', el.point_code)
|
||||||
|
this.$set(el, 'label', el.point_name)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (type === 2) {
|
||||||
|
this.option4 = [...res.pointArr]
|
||||||
|
this.option4.map(el => {
|
||||||
|
this.$set(el, 'value', el.point_code)
|
||||||
|
this.$set(el, 'label', el.point_name)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.Dialog(res.desc)
|
||||||
|
}
|
||||||
|
},
|
||||||
/** 确认 */
|
/** 确认 */
|
||||||
async _sendMaterialConfirm () {
|
async _sendMaterialConfirm () {
|
||||||
this.disabled1 = true
|
this.disabled1 = true
|
||||||
@@ -147,15 +169,7 @@ export default {
|
|||||||
dropdownMenu1 (i) {
|
dropdownMenu1 (i) {
|
||||||
this.active1 = i + ''
|
this.active1 = i + ''
|
||||||
this.open1 = false
|
this.open1 = false
|
||||||
this.option1.map(el => {
|
this._queryPoint(1, this.option1[i].region_id)
|
||||||
if (el.region_code === this.option1[i].region_code) {
|
|
||||||
this.option2 = el.pointArr
|
|
||||||
}
|
|
||||||
})
|
|
||||||
this.option2.map(el => {
|
|
||||||
this.$set(el, 'value', el.point_code)
|
|
||||||
this.$set(el, 'label', el.point_name)
|
|
||||||
})
|
|
||||||
this.active2 = ''
|
this.active2 = ''
|
||||||
},
|
},
|
||||||
toggleItem2 () {
|
toggleItem2 () {
|
||||||
@@ -179,15 +193,7 @@ export default {
|
|||||||
dropdownMenu3 (i) {
|
dropdownMenu3 (i) {
|
||||||
this.active3 = i + ''
|
this.active3 = i + ''
|
||||||
this.open3 = false
|
this.open3 = false
|
||||||
this.option3.map(el => {
|
this._queryPoint(2, this.option3[i].region_id)
|
||||||
if (el.region_code === this.option3[i].region_code) {
|
|
||||||
this.option4 = el.pointArr
|
|
||||||
}
|
|
||||||
})
|
|
||||||
this.option4.map(el => {
|
|
||||||
this.$set(el, 'value', el.point_code)
|
|
||||||
this.$set(el, 'label', el.point_name)
|
|
||||||
})
|
|
||||||
this.active4 = ''
|
this.active4 = ''
|
||||||
},
|
},
|
||||||
toggleItem4 () {
|
toggleItem4 () {
|
||||||
|
|||||||
Reference in New Issue
Block a user