【类 型】:

【主	题】:
【描	述】:
	[原因]:
	[过程]:
	[影响]:
【结	束】

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
This commit is contained in:
tk 2024-07-12 19:58:51 +08:00
parent c1f18a4040
commit 13868cd607
3 changed files with 15 additions and 11 deletions

View File

@ -83,18 +83,18 @@
icon="f-s-14 iconfont icon-chakanzhihangrizhi" @click="checkQuest">
<font class="m-l-5">上传航点</font>
</el-button>
<el-button size="mini" class="f-s-14" v-if="plane.planeState.state & 2" key="wirteBut" type="info"
<el-button size="mini" class="f-s-14" v-else-if="plane.planeState.state & 2" key="wirteBut" type="info"
:loading="true" disabled>
<font class="m-l-5">航点写入中···</font>
</el-button>
<el-button size="mini" class="f-s-14"
v-if="plane.planeState.state & 4 && !(plane.planeState.state & 16)" type="warning"
v-else-if="plane.planeState.state & 4 && !(plane.planeState.state & 16)" type="warning"
icon="f-s-14 iconfont icon-jiesuo"
@click="publishFun('{setPlaneState:{bit:3,state:1,count:2,param:[1,0]}}'); speakText('解锁飞机')">
<font class="m-l-5">解锁飞机</font>
</el-button>
<el-button size="mini" class="f-s-14"
v-if="plane.planeState.state & 16 && !(plane.planeState.state & 1) && !(plane.planeState.state & 2)"
v-else-if="plane.planeState.state & 16 && !(plane.planeState.state & 1) && !(plane.planeState.state & 2)"
type="success" icon="f-s-14 iconfont icon-yangshi_icon_tongyong_departure"
@click="publishFun('{setPlaneState:{bit:5,state:1}'); speakText('准备起飞,执行送餐任务')">
<font class="m-l-5">执行任务</font>
@ -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

View File

@ -941,7 +941,7 @@ const store = new Vuex.Store({
}
},
/**
* @description: 获取订单列表
* @description: 获取已付款 订单列表
* @return {*} 列表
*/
async fetchPaidOrderList ({ commit }) {

View File

@ -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
}