载具绑定
This commit is contained in:
@@ -95,6 +95,9 @@ export const pdavehicleType = (func) => post('api/pda/vehicleType', {
|
||||
func: func
|
||||
})
|
||||
|
||||
// 查询点位状态
|
||||
export const pdapointStatus = () => post('api/pda/pointStatus', {})
|
||||
|
||||
// 不合格品上报
|
||||
export const pdaReport = (code, qty) => post('api/pda/report', {
|
||||
device_code: code,
|
||||
@@ -138,10 +141,11 @@ export const inKiln = (vcode, type) => post('api/pda/inKiln', {
|
||||
})
|
||||
|
||||
// 载具绑定
|
||||
export const vehicleBind = (code, vtype, vcode) => post('api/pda/vehicleBind', {
|
||||
export const vehicleBind = (code, vtype, vcode, point) => post('api/pda/vehicleBind', {
|
||||
point_code: code,
|
||||
vehicle_type: vtype,
|
||||
vehicle_code: vcode
|
||||
vehicle_code: vcode,
|
||||
point_status: point
|
||||
})
|
||||
|
||||
// 载具解绑
|
||||
|
||||
@@ -35,6 +35,18 @@
|
||||
</dropdown-menu>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-filter-tip">
|
||||
<div class="filter-label txtjustify">点位状态</div>
|
||||
<div class="fxcol mgl20 visible" >
|
||||
<dropdown-menu
|
||||
:option="option4"
|
||||
:active="active4"
|
||||
:open="open4"
|
||||
@toggleItem="toggleItem4"
|
||||
@dropdownMenu="dropdownMenu4">
|
||||
</dropdown-menu>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-filter-tip">
|
||||
<div class="filter-label txtjustify">载具类型</div>
|
||||
<div class="fxcol mgl20 visible" >
|
||||
@@ -69,7 +81,7 @@
|
||||
import NavBar from '@components/NavBar.vue'
|
||||
import SearchBox from '@components/SearchBox.vue'
|
||||
import DropdownMenu from '@components/DropdownMenu.vue'
|
||||
import {pdaRegion, pdaPoint, pdavehicleType, vehicleBind} from '@config/getData2'
|
||||
import {pdaRegion, pdaPoint, pdapointStatus, pdavehicleType, vehicleBind} from '@config/getData2'
|
||||
export default {
|
||||
name: 'VehicleBind',
|
||||
components: {
|
||||
@@ -95,14 +107,27 @@ export default {
|
||||
open3: false,
|
||||
val3: '',
|
||||
disabled1: false,
|
||||
val4: ''
|
||||
val4: '',
|
||||
option4: [],
|
||||
active4: '',
|
||||
open4: false
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this._pdaRegion()
|
||||
this._pdavehicleType()
|
||||
this._pdapointStatus()
|
||||
},
|
||||
methods: {
|
||||
/** 查询点位状态 */
|
||||
async _pdapointStatus () {
|
||||
let res = await pdapointStatus()
|
||||
if (res.code === '1') {
|
||||
this.option4 = [...res.result]
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
},
|
||||
/** 查询载具类型 */
|
||||
async _pdavehicleType () {
|
||||
let res = await pdavehicleType('vehicle_bind')
|
||||
@@ -260,10 +285,21 @@ export default {
|
||||
this.val3 = this.optionNew3[i].label
|
||||
}
|
||||
},
|
||||
toggleItem4 () {
|
||||
if (!this.open4) {
|
||||
this.open4 = true
|
||||
} else {
|
||||
this.open4 = false
|
||||
}
|
||||
},
|
||||
dropdownMenu4 (i) {
|
||||
this.active4 = i + ''
|
||||
this.open4 = false
|
||||
},
|
||||
/** 确认 */
|
||||
async _vehicleBind () {
|
||||
this.disabled1 = true
|
||||
if (this.val2 === '' || this.val3 === '' || this.val4 === '') {
|
||||
if (this.val2 === '' || this.val3 === '' || this.val4 === '' || this.active4 === '') {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
@@ -280,7 +316,7 @@ export default {
|
||||
code3 = el.value
|
||||
}
|
||||
})
|
||||
let res = await vehicleBind(code, code3, this.val4)
|
||||
let res = await vehicleBind(code, code3, this.val4, this.option4[this.active4].value)
|
||||
if (res.code === '1') {
|
||||
this.toast(res.desc)
|
||||
this.toCancle()
|
||||
@@ -302,6 +338,7 @@ export default {
|
||||
this.active3 = ''
|
||||
this.disabled1 = false
|
||||
this.val4 = ''
|
||||
this.active4 = ''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user