Compare commits
4 Commits
0c5a666b12
...
c88248308e
Author | SHA1 | Date | |
---|---|---|---|
![]() |
c88248308e | ||
![]() |
b9fb6c0060 | ||
![]() |
4b9948ec40 | ||
![]() |
b62a8ecc9b |
@ -4,15 +4,12 @@
|
||||
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="30%">
|
||||
<!-- 起飞设置弹出框 -->
|
||||
<template v-if="dialogItem == 'takeoffBox'">
|
||||
<div class="slider-container">
|
||||
<span class="m-l-10 m-r-10">高度(米)</span>
|
||||
<el-slider class="w-70" v-model="takeoffValue" show-input>
|
||||
</el-slider>
|
||||
</div>
|
||||
<el-slider class="w-100" v-model="takeoffValue" :show-tooltip="false" show-input :min="1" :max="100">
|
||||
</el-slider>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button size="medium" @click="dialogVisible = false">关闭</el-button>
|
||||
<el-button size="medium" type="primary"
|
||||
@click="publishFun(`{setPlaneState:{bit:6,state:1,count:1,param:[${takeoffValue}]}`)">确认起飞</el-button>
|
||||
@click="publishFun(`{setPlaneState:{bit:6,state:1,count:1,param:[${takeoffValue}]}`); speakText('确认起飞')">确认起飞</el-button>
|
||||
</span>
|
||||
</template>
|
||||
<!-- 摄像头弹出框 -->
|
||||
@ -59,7 +56,7 @@
|
||||
</div>
|
||||
<!-- 内容 -->
|
||||
<el-form label-position="left" ref="questForm" :model="questForm" label-width="80px">
|
||||
<el-form-item label="订单任务">
|
||||
<el-form-item label="已接订单">
|
||||
<el-select v-model="questForm.id" :filterable="isMobile" placeholder="请选择,也可输入搜索" :disabled="airLock">
|
||||
<el-option v-for="item in questList" :key="item.id" :label="item.id" :value="item.id"
|
||||
:class="Number(item.total_weight) >= Number(plane.weight_max) ? 'danger-color' : ''">
|
||||
@ -99,7 +96,7 @@
|
||||
<el-button-group>
|
||||
<el-button size="mini" class="f-s-14" type="danger" icon="iconfont icon-meiyoudingdan-01" key="celBUt"
|
||||
@click="reQuest">
|
||||
<font class="m-l-5">取消任务</font>
|
||||
<font class="m-l-5">未送达</font>
|
||||
</el-button>
|
||||
<el-button size="mini" class="f-s-14" type="success" icon="iconfont icon-qiandai" key="bingBut"
|
||||
@click="overQuest">
|
||||
@ -128,7 +125,7 @@
|
||||
<div class="m-t-5">加锁</div>
|
||||
</el-button>
|
||||
<el-button size="medium" type="primary" class="butIcon border"
|
||||
@click="dialogVisible = true; dialogTitle = '起飞参数设置'; dialogItem = 'takeoffBox'; speakText('设置起飞高度')">
|
||||
@click="dialogVisible = true; dialogTitle = '起飞高度(米)设置'; dialogItem = 'takeoffBox'; speakText('设置起飞高度')">
|
||||
<i class="iconfont icon-yangshi_icon_tongyong_departure f-s-24"></i>
|
||||
<div class="m-t-5">起飞</div>
|
||||
</el-button>
|
||||
@ -301,17 +298,17 @@ export default {
|
||||
return plane ? plane.planeState.state : null
|
||||
},
|
||||
/**
|
||||
* @description: 已付款 已承接 未发货 未发起退款 订单列表
|
||||
* @description: 已付款 未送达 未发起退款 订单列表
|
||||
*/
|
||||
questList () {
|
||||
const plane = this.plane
|
||||
return plane ? this.$store.state.orderList.filter((item) => item.shop_id === plane.shop_id && item.status === 'processing' && item.back === 'normal') : []
|
||||
return plane ? this.$store.state.paidOrderList.filter((item) => item.shop_id === plane.shop_id && item.refund_status !== '申请中') : []
|
||||
},
|
||||
/**
|
||||
* @description: 已发货 订单列表
|
||||
*/
|
||||
overQuestList () {
|
||||
return this.$store.state.orderList.filter((item) => item.status === 'shipped')
|
||||
return this.$store.state.paidOrderList.filter((item) => item.status === 'shipped')
|
||||
},
|
||||
/**
|
||||
* @description: 当前选中的订单
|
||||
@ -468,7 +465,7 @@ export default {
|
||||
this.$message.error('操作失败,请重新尝试')
|
||||
}
|
||||
this.publishFun(`{"questAss":${routeData}}`)// 发送航点信息主题
|
||||
this.questAss(this.currentOrder.id, 'status', 'shipped')// 订单改为发货状态 并更新订单列表
|
||||
this.questAss(this.currentOrder.id, 'shipment_status', '已发货')// 订单改为发货状态 并更新订单列表
|
||||
this.$store.dispatch('fetchLockSite', { id: this.currentOrder.receive_site_id, runing: this.plane.id })// 航线注册飞机 锁定送餐点
|
||||
this.speakText('提交任务,锁定航线。')
|
||||
} else {
|
||||
@ -584,13 +581,13 @@ export default {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
// 确认执行
|
||||
this.overQuestList.map((item) => {
|
||||
this.questList.map((item) => {
|
||||
if (item.runing === this.planesId) { // 找出当前飞机正在执行的任务
|
||||
/* 插入日志 */
|
||||
this.$store.dispatch('fetchLog', { content: `订单ID:${item.id} 送餐任务已完成。` })
|
||||
/* 执行写在这里 */
|
||||
this.publishFun('{"resetState":1}')// 发送设置飞机状态主题 状态设为闲置
|
||||
this.questAss(item.id, 'status', 'completed')// 订单改为已完成状态
|
||||
this.questAss(item.id, 'shipment_status', '已送达')// 订单改为已完成状态
|
||||
this.$store.dispatch('fetchLockSite', { id: item.receive_site_id, runing: 'null' })// 解锁航线
|
||||
this.speakText('任务完成')
|
||||
}
|
||||
|
@ -4,12 +4,15 @@
|
||||
<template v-if="list.length != 0">
|
||||
<el-collapse-item class="mainFontColor" v-for="(item, index) in list" :key="index" :name="item.id">
|
||||
<template slot="title">
|
||||
<div class="clearB w-100">
|
||||
<div class="fb l w-30">
|
||||
<div class="clearB w-100" :class="activeNames === item.id ? 'fc-b fb' : ''">
|
||||
<div class="l w-30">
|
||||
订单ID:{{ item.id }}
|
||||
</div>
|
||||
<div class="r fb w-70 fr p-r-15">
|
||||
下单时间:{{ parseTime(item.addtime) }}
|
||||
<div v-if="item.refund_status !== '申请中'" class="r w-70 fr p-r-15">
|
||||
下单时间:{{ parseTime(item.order_time) }}
|
||||
</div>
|
||||
<div v-else class="r w-70 fr p-r-15">
|
||||
申请时间:{{ parseTime(item.refundapply_time) }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -25,9 +28,8 @@
|
||||
<el-descriptions-item label="总价">{{ item.total_price }}元</el-descriptions-item>
|
||||
<el-descriptions-item label="货品总数">{{ item.total_num }}件</el-descriptions-item>
|
||||
<el-descriptions-item label="订单详情" span="3">
|
||||
<el-table v-for="spu, i in item.product_snapshot" :show-header="i === 0" :data="spu.sku_arr"
|
||||
style="width: 100%">
|
||||
<el-table-column prop="sku_name" label="名称">
|
||||
<el-table v-for="spu, index in item.product_snapshot" :key="index" :data="spu.sku_arr" class="w-100">
|
||||
<el-table-column prop="sku_name" :label="spu.spu_name">
|
||||
</el-table-column>
|
||||
<el-table-column label="编号">
|
||||
<template slot-scope="scope">
|
||||
@ -39,7 +41,7 @@
|
||||
{{ scope.row.sku_totol }}{{ scope.row.sku_unit }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="详情" width="120">
|
||||
<el-table-column label="详情" width="80">
|
||||
<el-button type="primary" size="small">查看</el-button>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -78,10 +80,10 @@
|
||||
</el-button-group>
|
||||
<el-button-group v-else-if="item.refund_status !== '申请中' && item.shipment_status == '已发货'">
|
||||
<el-button type="primary" icon="iconfont icon-chengjie">
|
||||
<font class="m-l-5">未能送达</font>
|
||||
<font class="m-l-5">已送达</font>
|
||||
</el-button>
|
||||
<el-button type="danger" icon="iconfont icon-cuowu">
|
||||
<font class="m-l-5">安全送达</font>
|
||||
<font class="m-l-5">未送达</font>
|
||||
</el-button>
|
||||
</el-button-group>
|
||||
</el-descriptions-item>
|
||||
@ -197,6 +199,8 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "@/styles/theme.scss";
|
||||
|
||||
.orterTit {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
@ -19,7 +19,7 @@ const store = new Vuex.Store({
|
||||
categoryList: [], // 分类列表(小程序)
|
||||
spuList: [], // 商品spu列表
|
||||
skuList: [], // 商品sku列表
|
||||
orderList: [], // 订单列表
|
||||
paidOrderList: [], // 已付款 订单列表
|
||||
logList: [], // 操作日志列表
|
||||
crosFrequency: null // 对频macadd
|
||||
},
|
||||
@ -73,10 +73,10 @@ const store = new Vuex.Store({
|
||||
state.skuList = list
|
||||
},
|
||||
/**
|
||||
* @description: 设置订单列表
|
||||
* @description: 设置 已付款 订单列表
|
||||
*/
|
||||
setOrderList (state, list) {
|
||||
state.orderList = list
|
||||
setPaidOrderList (state, list) {
|
||||
state.paidOrderList = list
|
||||
},
|
||||
/**
|
||||
* @description: 向操作日志列表最后插入新的信息
|
||||
@ -929,18 +929,18 @@ const store = new Vuex.Store({
|
||||
* @description: 获取订单列表
|
||||
* @return {*} 列表
|
||||
*/
|
||||
async fetchOrderList ({ commit }) {
|
||||
const res = await api.get('getOrderList', 'Admin')
|
||||
async fetchPaidOrderList ({ commit }) {
|
||||
const res = await api.get('getPaidOrderList', 'Admin')
|
||||
if (res.data.status === 1) {
|
||||
const list = res.data.orderList
|
||||
const list = res.data.paidOrderList
|
||||
list.forEach((item, index) => { // 拿到订单列表数据 直接把订单列表数据反序列化
|
||||
if (item.product_snapshot !== '') {
|
||||
list[index].product_snapshot = JSON.parse(item.product_snapshot)
|
||||
}
|
||||
})
|
||||
commit('setOrderList', list)
|
||||
commit('setPaidOrderList', list)
|
||||
} else {
|
||||
commit('setOrderList', [])
|
||||
commit('setPaidOrderList', [])
|
||||
}
|
||||
return res
|
||||
},
|
||||
|
@ -143,31 +143,35 @@ label {
|
||||
}
|
||||
|
||||
.bg-b {
|
||||
background-color: $brand-color;
|
||||
background-color: $brand-color !important;
|
||||
}
|
||||
|
||||
.bg-white {
|
||||
background-color: $white-color;
|
||||
background-color: $white-color !important;
|
||||
}
|
||||
|
||||
.bg-grey {
|
||||
background-color: $holdtext-color !important;
|
||||
}
|
||||
|
||||
.fc-b {
|
||||
color: $brand-color;
|
||||
color: $brand-color !important;
|
||||
}
|
||||
|
||||
.fc-s {
|
||||
color: $success-color;
|
||||
color: $success-color !important;
|
||||
}
|
||||
|
||||
.fc-w {
|
||||
color: $warning-color;
|
||||
color: $warning-color !important;
|
||||
}
|
||||
|
||||
.fc-m {
|
||||
color: $maintext-color;
|
||||
color: $maintext-color !important;
|
||||
}
|
||||
|
||||
.fc-i {
|
||||
color: $holdtext-color;
|
||||
color: $holdtext-color !important;
|
||||
}
|
||||
|
||||
.border-b-n {
|
||||
|
@ -32,10 +32,10 @@ export function questAss (id, state, val) {
|
||||
api.post('questAss', data).then(res => {
|
||||
if (res.data.status === 1) {
|
||||
Message.success(res.data.msg)
|
||||
store.dispatch('fetchOrderList')// 更新订单列表
|
||||
store.dispatch('fetchPaidOrderList')// 更新订单列表
|
||||
} else {
|
||||
Message.error(res.data.msg)
|
||||
store.dispatch('fetchOrderList')// 更新订单列表
|
||||
store.dispatch('fetchPaidOrderList')// 更新订单列表
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -32,7 +32,7 @@
|
||||
<el-button :type="pendingCount + processingCount + shippedCount + requestedCount !== 0 ? 'primary' : ''"
|
||||
@click="drawer = true" size="small" :icon="orderIcon" circle></el-button>
|
||||
</el-badge>
|
||||
<el-drawer :visible.sync="drawer" size="40%" :append-to-body="true" :modal-append-to-body="false">
|
||||
<el-drawer :visible.sync="drawer" size="60%" :append-to-body="true" :modal-append-to-body="false">
|
||||
<template slot="title">
|
||||
<div>
|
||||
<i class="l f-s-18 iconfont icon-jinjidingdan m-r-5 l-h-18"></i>
|
||||
@ -44,7 +44,7 @@
|
||||
<el-button-group class="m-l-20 m-b-15">
|
||||
<SelectionShopId v-model="shop_id" />
|
||||
</el-button-group>
|
||||
<el-tabs type="card">
|
||||
<el-tabs type="border-card">
|
||||
<el-tab-pane>
|
||||
<template slot="label">
|
||||
<span>未接单</span>
|
||||
@ -130,16 +130,16 @@ export default {
|
||||
return this.$store.state.settings.photoPath + this.$store.state.user.photo
|
||||
},
|
||||
/**
|
||||
* @description: 获取订单列表
|
||||
* @description: 获取 所有已付款订单列表
|
||||
*/
|
||||
orderList () {
|
||||
return this.$store.state.orderList.filter(item => item.shop_id === this.shop_id)
|
||||
paidOrderList () {
|
||||
return this.$store.state.paidOrderList.filter(item => item.shop_id === this.shop_id)
|
||||
},
|
||||
/**
|
||||
* @description: 过滤 未接单 并且没有申请退款的 订单
|
||||
*/
|
||||
pendingList () {
|
||||
return this.orderList.filter(item => item.main_status === '已付款' && item.shipment_status === '未接单' && item.refund_status !== '申请中')
|
||||
return this.paidOrderList.filter(item => item.main_status === '已付款' && item.shipment_status === '未接单' && item.refund_status !== '申请中')
|
||||
},
|
||||
/**
|
||||
* @description: 未接单 总数
|
||||
@ -151,7 +151,7 @@ export default {
|
||||
* @description: 过滤 已接单 并且没有申请退款的 订单
|
||||
*/
|
||||
processingList () {
|
||||
return this.orderList.filter(item => item.main_status === '已付款' && item.shipment_status === '已接单' && item.refund_status !== '申请中')
|
||||
return this.paidOrderList.filter(item => item.main_status === '已付款' && item.shipment_status === '已接单' && item.refund_status !== '申请中')
|
||||
},
|
||||
/**
|
||||
* @description: 已接单 总数
|
||||
@ -163,7 +163,7 @@ export default {
|
||||
* @description: 过滤 已发货 并且没有申请退款的 订单
|
||||
*/
|
||||
shippedList () {
|
||||
return this.orderList.filter(item => item.main_status === '已付款' && item.shipment_status === '已发货' && item.refund_status !== '申请中')
|
||||
return this.paidOrderList.filter(item => item.main_status === '已付款' && item.shipment_status === '已发货' && item.refund_status !== '申请中')
|
||||
},
|
||||
/**
|
||||
* @description: 已发货 总数
|
||||
@ -175,7 +175,7 @@ export default {
|
||||
* @description: 过滤 退款申请中 订单
|
||||
*/
|
||||
requestedList () {
|
||||
return this.orderList.filter(item => item.refund_status === '申请中')
|
||||
return this.paidOrderList.filter(item => item.refund_status === '申请中')
|
||||
},
|
||||
/**
|
||||
* @description: 退款申请中 总数
|
||||
|
@ -67,7 +67,7 @@ export default {
|
||||
this.$store.dispatch('fetchCategoryList')// 获取分类列表(小程序)
|
||||
this.$store.dispatch('fetchSpuList')// 获取商品spu列表
|
||||
this.$store.dispatch('fetchSkuList')// 获取商品sku列表
|
||||
this.$store.dispatch('fetchOrderList')// 获取订单列表
|
||||
this.$store.dispatch('fetchPaidOrderList')// 获取订单列表
|
||||
},
|
||||
watch: {
|
||||
/**
|
||||
@ -117,7 +117,7 @@ export default {
|
||||
mqtt.doSubscribe(`refreshQuestList/${this.shop_id}`, (res) => {
|
||||
if (res.topic.indexOf(`refreshQuestList/${this.shop_id}`) > -1) {
|
||||
this.$store.dispatch('fetchSiteList')// 刷新站点列表
|
||||
this.$store.dispatch('fetchOrderList')// 刷新订单列表 ps:待发货及待收货 并且不是退款成功状态
|
||||
this.$store.dispatch('fetchPaidOrderList')// 刷新订单列表 ps:待发货及待收货 并且不是退款成功状态
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user