From f1ea8bb00da1e443ea7e07b8fdb128dfc26515ec Mon Sep 17 00:00:00 2001
From: caill <815519168@qq.com>
Date: Wed, 3 Jan 2024 16:10:57 +0800
Subject: [PATCH] =?UTF-8?q?=E8=BD=BD=E5=85=B7=E7=BB=91=E5=AE=9A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/config/getData2.js | 8 ++++--
src/pages/proj/VehicleBind.vue | 45 +++++++++++++++++++++++++++++++---
2 files changed, 47 insertions(+), 6 deletions(-)
diff --git a/src/config/getData2.js b/src/config/getData2.js
index 0e683f9..8dabd47 100644
--- a/src/config/getData2.js
+++ b/src/config/getData2.js
@@ -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
})
// 载具解绑
diff --git a/src/pages/proj/VehicleBind.vue b/src/pages/proj/VehicleBind.vue
index bd10f80..09080a3 100644
--- a/src/pages/proj/VehicleBind.vue
+++ b/src/pages/proj/VehicleBind.vue
@@ -35,6 +35,18 @@
+
载具类型
@@ -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 = ''
}
}
}