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