【类 型】:fix 获取 已付款 和已退款但是发货状态为 已发货 订单列表
【原 因】:1.不管是否已经申请退款了 始终显示已发货的订单 目的是一定要处理已发货订单 让其变成已送达 或者回滚之前的状态 【过 程】:2.改掉订单抽屉的过滤方式 加一个type参数来判断 【影 响】:
This commit is contained in:
parent
7ea8266f3c
commit
2a425a826d
@ -102,9 +102,9 @@
|
||||
</el-button>
|
||||
</el-button-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务操作">
|
||||
<el-form-item label="任务确认">
|
||||
<el-button-group>
|
||||
<el-button size="mini" class="f-s-14" type="danger" icon="iconfont icon-meiyoudingdan-01" key="celBUt"
|
||||
<el-button size="mini" class="f-s-14" type="danger" icon="iconfont icon-cuowu" key="celBUt"
|
||||
@click="reQuest">
|
||||
<font class="m-l-5">取消任务</font>
|
||||
</el-button>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<!-- 退款设置弹出框 -->
|
||||
<el-dialog :title="'设置退款金额'" :visible.sync="dialogVisible" :append-to-body="true" width="30%">
|
||||
<el-form label-position="left">
|
||||
<el-form-item label="退款金额" label-width="90px">
|
||||
<el-form-item label="退款金额" label-width="80px">
|
||||
<el-input placeholder="输入金额,不可超过订单总金额" v-model="refundPrice">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
@ -15,7 +15,7 @@
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button size="medium" @click="dialogVisible = false">关闭</el-button>
|
||||
<el-button size="medium" type="danger"
|
||||
@click="refund(refundOrder_sn, refundShop_id, refundPrice, refundType)">确认退款</el-button>
|
||||
@click="refund">确认退款</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<!-- 任务tab -->
|
||||
@ -27,10 +27,16 @@
|
||||
<div class="l w-30">
|
||||
订单ID:{{ item.id }}
|
||||
</div>
|
||||
<div v-if="item.refund_status !== '申请中'" class="r w-70 fr p-r-15">
|
||||
<div v-if="type == '未接单'" class="r w-70 fr p-r-15">
|
||||
下单时间:{{ parseTime(item.order_time) }}
|
||||
</div>
|
||||
<div v-else class="r w-70 fr p-r-15">
|
||||
<div v-else-if="type == '已接单'" class="r w-70 fr p-r-15">
|
||||
接单时间:{{ parseTime(item.received_time) }}
|
||||
</div>
|
||||
<div v-else-if="type == '已发货'" class="r w-70 fr p-r-15">
|
||||
发货时间:{{ parseTime(item.shipped_time) }}
|
||||
</div>
|
||||
<div v-else-if="type == '退款申请中'" class="r w-70 fr p-r-15">
|
||||
申请时间:{{ parseTime(item.refundapply_time) }}
|
||||
</div>
|
||||
</div>
|
||||
@ -69,7 +75,7 @@
|
||||
{{ item.refund_status == '未申请' ? (item.refund_remark || '无') : (item.remark || '无') }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="操作" span="3">
|
||||
<el-button-group v-if="item.refund_status == '申请中'">
|
||||
<el-button-group v-if="type == '退款申请中'">
|
||||
<el-button @click="setRefundItem(item, index, 'buyer'); dialogVisible = true"
|
||||
:loading="refundIndex === index" :disabled="refundIndex === index" type="danger"
|
||||
icon="iconfont icon-cuowu">
|
||||
@ -79,7 +85,7 @@
|
||||
<font class="m-l-5">拒绝退款</font>
|
||||
</el-button>
|
||||
</el-button-group>
|
||||
<el-button-group v-else-if="item.refund_status !== '申请中' && item.shipment_status == '未接单'">
|
||||
<el-button-group v-else-if="type == '未接单'">
|
||||
<el-button @click="setRefundItem(item, index, 'seller'); dialogVisible = true"
|
||||
:loading="refundIndex === index" :disabled="refundIndex === index" type="danger"
|
||||
icon="iconfont icon-cuowu">
|
||||
@ -93,7 +99,7 @@
|
||||
<font class="m-l-5">确认接单</font>
|
||||
</el-button>
|
||||
</el-button-group>
|
||||
<el-button-group v-else-if="item.refund_status !== '申请中' && item.shipment_status == '已接单'">
|
||||
<el-button-group v-else-if="type == '已接单'">
|
||||
<el-button @click="setRefundItem(item, index, 'seller'); dialogVisible = true"
|
||||
:loading="refundIndex === index" :disabled="refundIndex === index" type="danger"
|
||||
icon="iconfont icon-cuowu">
|
||||
@ -103,12 +109,12 @@
|
||||
<font class="m-l-5">打印小票</font>
|
||||
</el-button>
|
||||
</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>
|
||||
</el-button>
|
||||
<el-button-group v-else-if="type == '已发货'">
|
||||
<el-button type="danger" icon="iconfont icon-cuowu">
|
||||
<font class="m-l-5">未送达</font>
|
||||
<font class="m-l-5">取消任务</font>
|
||||
</el-button>
|
||||
<el-button type="success" icon="iconfont icon-qiandai">
|
||||
<font class="m-l-5">已送达</font>
|
||||
</el-button>
|
||||
</el-button-group>
|
||||
</el-descriptions-item>
|
||||
@ -143,28 +149,37 @@ export default {
|
||||
}
|
||||
},
|
||||
props: {
|
||||
list: Array
|
||||
list: {
|
||||
type: Array,
|
||||
required: true
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
required: true,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
methods: {
|
||||
parseTime, // 时间戳格式化
|
||||
questAss, // 修改订单
|
||||
/**
|
||||
* @description: 封装退款函数 同步后续操作
|
||||
* @param {*} refundOrderSn 订单编号
|
||||
* @param {*} refundShopId 商铺id
|
||||
* @param {*} refundPrice 退款金额
|
||||
* @param {*} refundType 退款类型 'buyer'买家申请 'seller'卖家主动
|
||||
* 封装退款函数 同步后续操作
|
||||
*/
|
||||
refund (refundOrderSn, refundShopId, refundPrice, refundType) {
|
||||
refund(refundOrderSn, refundShopId, refundPrice, refundType).then(res => {
|
||||
async refund () {
|
||||
const res = await refund(this.refundOrder_sn, this.refundShop_id, this.refundPrice, this.refundType)
|
||||
if (res.data.status === 1) { // 退款申请成功时
|
||||
this.dialogVisible = false // 退款弹出框 关闭
|
||||
this.refundIndex = this.tempRefundIndex // 标记退款订单 的索引 方便做ui样式
|
||||
}
|
||||
})
|
||||
}, // 退款接口
|
||||
parseTime, // 时间戳格式化
|
||||
},
|
||||
/**
|
||||
* 退款事件 设置对应订单信息 到“标记退款订单”
|
||||
* @param item 订单信息
|
||||
* @param index 订单索引
|
||||
* @param refundType 退款类型 'buyer'买家申请 'seller'卖家主动
|
||||
*/
|
||||
setRefundItem (item, index, refundType) {
|
||||
this.tempRefundIndex = index
|
||||
this.refundTotal_price = item.total_price
|
||||
@ -260,6 +275,7 @@ export default {
|
||||
}
|
||||
},
|
||||
created () {
|
||||
console.log(this.list)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -20,7 +20,7 @@ const store = new Vuex.Store({
|
||||
categoryList: [], // 分类列表(小程序)
|
||||
spuList: [], // 商品spu列表
|
||||
skuList: [], // 商品sku列表
|
||||
paidOrderList: [], // 已付款 订单列表
|
||||
paidOrderList: [], // 已付款 和已退款但是发货状态为 已发货 订单列表
|
||||
logList: [], // 操作日志列表
|
||||
crosFrequency: null// 对频macadd
|
||||
},
|
||||
@ -74,7 +74,7 @@ const store = new Vuex.Store({
|
||||
state.skuList = list
|
||||
},
|
||||
/**
|
||||
* @description: 设置 已付款 订单列表
|
||||
* @description: 设置 已付款 和已退款但是发货状态为 已发货 订单列表
|
||||
*/
|
||||
setPaidOrderList (state, list) {
|
||||
state.paidOrderList = list
|
||||
@ -922,7 +922,7 @@ const store = new Vuex.Store({
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @description: 获取已付款 订单列表
|
||||
* @description: 获取已付款 和已退款但是发货状态为 已发货 订单列表
|
||||
* @return {*} 列表
|
||||
*/
|
||||
async fetchPaidOrderList ({ commit }) {
|
||||
|
@ -90,7 +90,7 @@
|
||||
>
|
||||
</el-badge>
|
||||
</template>
|
||||
<QuestTabs :list="pendingList" />
|
||||
<QuestTabs :list="pendingList" type = "未接单"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane>
|
||||
<template slot="label">
|
||||
@ -101,7 +101,7 @@
|
||||
>
|
||||
</el-badge>
|
||||
</template>
|
||||
<QuestTabs :list="processingList" />
|
||||
<QuestTabs :list="processingList" type = "已接单"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane>
|
||||
<template slot="label">
|
||||
@ -112,7 +112,7 @@
|
||||
>
|
||||
</el-badge>
|
||||
</template>
|
||||
<QuestTabs :list="shippedList" />
|
||||
<QuestTabs :list="shippedList" type = "已发货"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane>
|
||||
<template slot="label">
|
||||
@ -123,7 +123,7 @@
|
||||
>
|
||||
</el-badge>
|
||||
</template>
|
||||
<QuestTabs :list="requestedList" />
|
||||
<QuestTabs :list="requestedList" type = "退款申请中"/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-drawer>
|
||||
@ -196,7 +196,7 @@ export default {
|
||||
return this.$store.state.settings.photoPath + this.$store.state.user.photo
|
||||
},
|
||||
/**
|
||||
* @description: 获取 所有已付款订单列表
|
||||
* @description: 获取 已付款 和已退款但是发货状态为 已发货 订单列表
|
||||
*/
|
||||
paidOrderList () {
|
||||
return this.$store.state.paidOrderList.filter(
|
||||
@ -243,9 +243,7 @@ export default {
|
||||
shippedList () {
|
||||
return this.paidOrderList.filter(
|
||||
(item) =>
|
||||
item.main_status === '已付款' &&
|
||||
item.shipment_status === '已发货' &&
|
||||
item.refund_status !== '申请中'
|
||||
item.shipment_status === '已发货'
|
||||
)
|
||||
},
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user