|
|
@ -15,6 +15,7 @@ |
|
|
:key="stepIndex" |
|
|
:key="stepIndex" |
|
|
></el-step> |
|
|
></el-step> |
|
|
</el-steps> |
|
|
</el-steps> |
|
|
|
|
|
|
|
|
<ApplyRefund v-if="stepActive == 0" :orderData.sync="orderData" ref="applyRefund" /> |
|
|
<ApplyRefund v-if="stepActive == 0" :orderData.sync="orderData" ref="applyRefund" /> |
|
|
<ProcessRefunds |
|
|
<ProcessRefunds |
|
|
v-if="!stepActive == 0" |
|
|
v-if="!stepActive == 0" |
|
|
@ -23,6 +24,7 @@ |
|
|
:iSfailed.sync="iSfailed" |
|
|
:iSfailed.sync="iSfailed" |
|
|
:iSrefund.sync="iSrefund" |
|
|
:iSrefund.sync="iSrefund" |
|
|
:orderData.sync="orderData" |
|
|
:orderData.sync="orderData" |
|
|
|
|
|
:orderGoodsData.sync="order_goods_data" |
|
|
/> |
|
|
/> |
|
|
|
|
|
|
|
|
<el-button class="refundBtn" type="primary" @click="next(0)" v-show="stepActive == 0">提交</el-button> |
|
|
<el-button class="refundBtn" type="primary" @click="next(0)" v-show="stepActive == 0">提交</el-button> |
|
|
@ -31,13 +33,19 @@ |
|
|
class="refundBtn" |
|
|
class="refundBtn" |
|
|
type="primary" |
|
|
type="primary" |
|
|
@click="next(2)" |
|
|
@click="next(2)" |
|
|
v-show="stepActive == 2 && iSfailed == false" |
|
|
v-show="stepActive == 2 && iSfailed == false && ![5,6].includes(order_goods_data.refund_status)" |
|
|
>撤销申请</el-button> |
|
|
>撤销申请</el-button> |
|
|
|
|
|
<!-- <el-button--> |
|
|
|
|
|
<!-- class="refundBtn"--> |
|
|
|
|
|
<!-- type="primary"--> |
|
|
|
|
|
<!-- @click="showWaybill()"--> |
|
|
|
|
|
<!-- v-if="isWaybill"--> |
|
|
|
|
|
<!-- v-show="stepActive == 2 && iSfailed == true"--> |
|
|
|
|
|
<!-- >填写快递运单号</el-button>--> |
|
|
<el-button |
|
|
<el-button |
|
|
class="refundBtn" |
|
|
class="refundBtn" |
|
|
type="primary" |
|
|
type="primary" |
|
|
@click="showWaybill()" |
|
|
@click="showWaybill()" |
|
|
v-if="isWaybill" |
|
|
|
|
|
v-show="stepActive == 2 && iSfailed == true" |
|
|
v-show="stepActive == 2 && iSfailed == true" |
|
|
>填写快递运单号</el-button> |
|
|
>填写快递运单号</el-button> |
|
|
</div> |
|
|
</div> |
|
|
@ -50,19 +58,16 @@ |
|
|
> |
|
|
> |
|
|
<template v-slot:contentSlot> |
|
|
<template v-slot:contentSlot> |
|
|
<el-form ref="waybillForm" :model="waybillForm" label-width="80px"> |
|
|
<el-form ref="waybillForm" :model="waybillForm" label-width="80px"> |
|
|
<el-form-item label="快递公司"> |
|
|
<el-form-item label="物流公司"> |
|
|
<el-select |
|
|
<el-input v-model="waybillForm.refund_delivery_name" size="small"></el-input> |
|
|
v-model="waybillForm.region" |
|
|
|
|
|
placeholder="请选择" |
|
|
|
|
|
style="width: 100%" |
|
|
|
|
|
size="small" |
|
|
|
|
|
> |
|
|
|
|
|
<el-option label="区域一" value="shanghai"></el-option> |
|
|
|
|
|
<el-option label="区域二" value="beijing"></el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="快递单号"> |
|
|
|
|
|
<el-input v-model="waybillForm.name" size="small"></el-input> |
|
|
<el-form-item label="物流单号"> |
|
|
|
|
|
<el-input v-model="waybillForm.refund_delivery_no" size="small"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="物流说明"> |
|
|
|
|
|
<el-input v-model="waybillForm.refund_delivery_remark" size="small"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
</template> |
|
|
</template> |
|
|
@ -117,9 +122,15 @@ export default { |
|
|
// 运单号弹出框 |
|
|
// 运单号弹出框 |
|
|
isWaybill: false, |
|
|
isWaybill: false, |
|
|
waybillDialog: false, |
|
|
waybillDialog: false, |
|
|
|
|
|
|
|
|
|
|
|
order_goods_ids:[], |
|
|
|
|
|
order_goods_data:'',//需要售后的商品订单表信息 |
|
|
|
|
|
refundData: {},//要退款的商品数据 |
|
|
|
|
|
//卖家退货运单需要填写的表单 |
|
|
waybillForm: { |
|
|
waybillForm: { |
|
|
region: "", |
|
|
refund_delivery_name: "",//物流公司 |
|
|
name: "" |
|
|
refund_delivery_no: "",//物流单号 |
|
|
|
|
|
refund_delivery_remark: "",//物流说明 |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
orderData: {}, |
|
|
orderData: {}, |
|
|
@ -137,18 +148,20 @@ export default { |
|
|
this.iSrefund = undefined; |
|
|
this.iSrefund = undefined; |
|
|
this.iSfailed = undefined; |
|
|
this.iSfailed = undefined; |
|
|
this.stepActive = 0; |
|
|
this.stepActive = 0; |
|
|
|
|
|
|
|
|
|
|
|
this.order_goods_data = this.$route.query.row;//需要售后的商品订单表信息 |
|
|
if (this.$route.query.row.refund_status == 0) { |
|
|
if (this.$route.query.row.refund_status == 0) { |
|
|
this.orderData = this.$route.query.row; |
|
|
this.orderData = this.$route.query.row; |
|
|
} else { |
|
|
} else { |
|
|
let status = this.$route.query.row.refund_status; |
|
|
let status = this.$route.query.row.refund_status; |
|
|
this.getRefundOrder(this.$route.query.row.order_id, status); |
|
|
this.getRefundOrder(this.$route.query.row.order_id, status); |
|
|
console.log( |
|
|
// console.log( |
|
|
this.stepActive, |
|
|
// this.stepActive, |
|
|
this.iSfailed, |
|
|
// this.iSfailed, |
|
|
this.iSrefund, |
|
|
// this.iSrefund, |
|
|
status, |
|
|
// status, |
|
|
111111 |
|
|
// 111111 |
|
|
); |
|
|
// ); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
|
@ -166,6 +179,12 @@ export default { |
|
|
console.log(status, `status`); |
|
|
console.log(status, `status`); |
|
|
console.log(this.orderData, `this.orderData`); |
|
|
console.log(this.orderData, `this.orderData`); |
|
|
|
|
|
|
|
|
|
|
|
this.order_goods_ids = this.orderData.order_goods.map(item => { |
|
|
|
|
|
return item.order_goods_id; |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
this.getRefundData() |
|
|
|
|
|
|
|
|
// refund_status 1申请退款 2已确认 3已完成 4等待买家发货 5等待卖家发货 6卖家确认收货 -1卖家拒绝退款 -2卖家关闭退款 |
|
|
// refund_status 1申请退款 2已确认 3已完成 4等待买家发货 5等待卖家发货 6卖家确认收货 -1卖家拒绝退款 -2卖家关闭退款 |
|
|
switch (status) { |
|
|
switch (status) { |
|
|
case -1: |
|
|
case -1: |
|
|
@ -186,9 +205,18 @@ export default { |
|
|
this.stepActive = 3; |
|
|
this.stepActive = 3; |
|
|
this.iSrefund = true; |
|
|
this.iSrefund = true; |
|
|
break; |
|
|
break; |
|
|
// case 4: |
|
|
case 4://4等待买家发货 |
|
|
// this.stepActive = 2; |
|
|
this.stepActive = 2; |
|
|
// break; |
|
|
this.iSfailed = true; |
|
|
|
|
|
break; |
|
|
|
|
|
case 5://5等待卖家发货 |
|
|
|
|
|
this.stepActive = 2; |
|
|
|
|
|
this.iSfailed = false; |
|
|
|
|
|
break; |
|
|
|
|
|
case 6://6卖家确认收货 |
|
|
|
|
|
this.stepActive = 2; |
|
|
|
|
|
this.iSfailed = false; |
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
// default: |
|
|
// default: |
|
|
// this.stepActive = 0; |
|
|
// this.stepActive = 0; |
|
|
@ -251,22 +279,67 @@ export default { |
|
|
showWaybill() { |
|
|
showWaybill() { |
|
|
this.waybillDialog = true; |
|
|
this.waybillDialog = true; |
|
|
}, |
|
|
}, |
|
|
// 运单号弹出框确认按钮 |
|
|
|
|
|
|
|
|
//获取要退货的商品信息 |
|
|
|
|
|
getRefundData() { |
|
|
|
|
|
// 多个退款数据查询 |
|
|
|
|
|
// if (this.orderData.order_goods.length > 1) { |
|
|
|
|
|
let obj = { |
|
|
|
|
|
order_goods_id: this.order_goods_ids.toString() |
|
|
|
|
|
}; |
|
|
|
|
|
this.$axios |
|
|
|
|
|
.post(`/orderrefund/detail`, obj) |
|
|
|
|
|
.then(res => { |
|
|
|
|
|
this.refundData = res.data; |
|
|
|
|
|
//console.log('qq3',res.data); |
|
|
|
|
|
}) |
|
|
|
|
|
.catch(err => { |
|
|
|
|
|
this.$message.error(err); |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 运单号弹出框确认按钮点击事件 |
|
|
clickConfirm() { |
|
|
clickConfirm() { |
|
|
let obj = { |
|
|
let obj = { |
|
|
order_goods_id: "", |
|
|
order_goods_id: this.$route.query.row.order_goods_id, |
|
|
refund_delivery_name: "", |
|
|
refund_delivery_name: this.waybillForm.refund_delivery_name, |
|
|
refund_delivery_no: "" |
|
|
refund_delivery_no: this.waybillForm.refund_delivery_no, |
|
|
// refund_delivery_remark |
|
|
refund_delivery_remark:this.waybillForm.refund_delivery_remark, |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
//验证必填参数 |
|
|
|
|
|
if (!obj.refund_delivery_name){ |
|
|
|
|
|
this.$message.error("请填写物流公司名称"); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
if (!obj.refund_delivery_no){ |
|
|
|
|
|
this.$message.error("请填写物流单号"); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
//发送请求 |
|
|
|
|
|
this.$axios |
|
|
|
|
|
.post(`/orderrefund/delivery`, obj) |
|
|
|
|
|
.then(res => { |
|
|
|
|
|
console.log('qq2',res) |
|
|
|
|
|
if(res.code == 0){ |
|
|
|
|
|
this.$message.success(res.message); |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.$message.error(res.message); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
.catch(err => { |
|
|
|
|
|
this.$message.error(err); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.waybillDialog = false; |
|
|
this.waybillDialog = false; |
|
|
// if (this.stepActive++ > 2) this.stepActive = 0; |
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
//撤销退款申请 |
|
|
cancelRefund() { |
|
|
cancelRefund() { |
|
|
console.log(); |
|
|
console.log(); |
|
|
let obj = { |
|
|
let obj = { |
|
|
order_goods_id: this.$refs.processRefunds.order_goods_ids.toString() |
|
|
order_goods_id: this.$route.query.row.order_goods_id.toString() |
|
|
}; |
|
|
}; |
|
|
this.$axios |
|
|
this.$axios |
|
|
.post(`/orderrefund/cancel`, obj) |
|
|
.post(`/orderrefund/cancel`, obj) |
|
|
@ -362,4 +435,4 @@ export default { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</style> |
|
|
</style> |
|
|
|