diff --git a/src/components/ControllerTabs.vue b/src/components/ControllerTabs.vue
index 0fc79c9..e6f171b 100644
--- a/src/components/ControllerTabs.vue
+++ b/src/components/ControllerTabs.vue
@@ -83,18 +83,18 @@
icon="f-s-14 iconfont icon-chakanzhihangrizhi" @click="checkQuest">
上传航点
-
航点写入中···
解锁飞机
执行任务
@@ -326,7 +326,7 @@ export default {
*/
executeOrder () {
const plane = this.plane
- return plane ? this.ShippedList.find((item) => item.by_plane_id === plane.id) : null
+ return plane ? this.ShippedList.find((item) => item.by_plane_id === plane.id) : {}
},
/**
* @description: 航线列表
@@ -415,7 +415,11 @@ export default {
* @description: 执行任务前 先检测订单是否 合法 例如:订单重量会不会超出飞机载重上限
*/
checkQuest () {
- if (!this.currentOrder && !this.executeOrder) {
+ if (this.questForm.id === '') {
+ this.$message.error('未选择订单任务!')
+ return
+ }
+ if (!this.currentOrder) {
this.$message.error('此订单已被申请退款或者订单已经被取消!')
return
}
@@ -687,7 +691,7 @@ export default {
},
created () {
// 判断当前飞机有没有挂载的任务 判断是否是锁定状态
- if (this.executeOrder === null) {
+ if (Object.keys(this.executeOrder).length === 0) {
this.airLock = false
} else {
this.airLock = true
@@ -714,7 +718,7 @@ export default {
},
executeOrder (val) {
// 判断当前飞机有没有挂载的任务 判断是否是锁定状态
- if (val === null) {
+ if (Object.keys(val).length === 0) {
this.airLock = false
} else {
this.airLock = true
diff --git a/src/store/index.js b/src/store/index.js
index bd63fe2..8f3615b 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -941,7 +941,7 @@ const store = new Vuex.Store({
}
},
/**
- * @description: 获取订单列表
+ * @description: 获取已付款 订单列表
* @return {*} 列表
*/
async fetchPaidOrderList ({ commit }) {
diff --git a/src/utils/api/table.js b/src/utils/api/table.js
index fa8eb47..eaf8705 100644
--- a/src/utils/api/table.js
+++ b/src/utils/api/table.js
@@ -23,7 +23,7 @@ export async function apiCrosFrequency (params) {
* @description: 向改变订单承接任务api 提交数据,参数可以是数组 提交多个字段和字段内容 () ,并更新订单列表
* @param {*} id 订单id
* @param {array string} type 主状态"main_status" 货物状态"shipment_status" 退款状态"refund_status" 执行飞机"by_plane_id"
- * @param {array string} val 修改字段的值 ps:by_plane_id值给'null' 字符串或者留空 数据库改为null
+ * @param {array string} val 修改字段的值 ps:by_plane_id值给'' 数据库改为null
*/
export async function questAss (id, type, val) {
const params = new URLSearchParams()// post对象参数 转成 字符串连接
@@ -34,10 +34,10 @@ export async function questAss (id, type, val) {
return
}
for (let i = 0; i < type.length; i++) {
- params.append(type[i], val[i] === '' ? 'null' : val[i])
+ params.append(type[i], val[i])
}
} else if (typeof type === 'string' && typeof val === 'string') {
- params.append(type, val === '' ? 'null' : val)
+ params.append(type, val)
} else {
return
}