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