售后物流
This commit is contained in:
@@ -8,6 +8,15 @@ export function getData(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getRefundInfo(data) {
|
||||||
|
return request({
|
||||||
|
url: '/bxg/api/yxStoreAfterSales/order/express',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
export function salesCheck(data) {
|
export function salesCheck(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/bxg/api/yxStoreAfterSales/salesCheck',
|
url: '/bxg/api/yxStoreAfterSales/salesCheck',
|
||||||
@@ -17,7 +26,7 @@ export function salesCheck(data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function rebackMoney(params) {
|
export function rebackMoney(params) {
|
||||||
return request({
|
return request({ //打款退钱
|
||||||
url: '/bxg/api/yxStoreAfterSales/makeMoney',
|
url: '/bxg/api/yxStoreAfterSales/makeMoney',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
params
|
params
|
||||||
|
|||||||
@@ -83,6 +83,18 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="serviceType === 1&& (this.checkForm.state===2||this.checkForm.state===3)">
|
||||||
|
<span>退货物流查看</span>
|
||||||
|
<el-timeline :reverse="reverse">
|
||||||
|
<el-timeline-item
|
||||||
|
v-for="(activity, index) in activities"
|
||||||
|
:key="index"
|
||||||
|
:timestamp="activity.acceptTime">
|
||||||
|
{{activity.AcceptStation}}
|
||||||
|
</el-timeline-item>
|
||||||
|
</el-timeline>
|
||||||
|
<span v-if="this.activities==null">{{this.reason}}</span>
|
||||||
|
</div>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button class="refuse" type="danger" v-if="isShow" :loading="loading" @click="submit(1)">拒绝</el-button>
|
<el-button class="refuse" type="danger" v-if="isShow" :loading="loading" @click="submit(1)">拒绝</el-button>
|
||||||
<el-button class="check" type="primary" v-if="isShow" :loading="loading" @click="submit(0)">确认</el-button>
|
<el-button class="check" type="primary" v-if="isShow" :loading="loading" @click="submit(0)">确认</el-button>
|
||||||
@@ -91,7 +103,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {salesCheck} from '@/api/bxg/yxStoreAfterSales.js'
|
import {getRefundInfo, salesCheck} from '@/api/bxg/yxStoreAfterSales.js'
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
},
|
},
|
||||||
@@ -110,6 +122,8 @@ export default {
|
|||||||
phoneNumber: '', // 手机号
|
phoneNumber: '', // 手机号
|
||||||
address: '' // 地址
|
address: '' // 地址
|
||||||
},
|
},
|
||||||
|
activities:[],
|
||||||
|
reason:'',
|
||||||
rules: {
|
rules: {
|
||||||
consignee: [{ required: true, message: '请输入收货人', trigger: 'blur' }],
|
consignee: [{ required: true, message: '请输入收货人', trigger: 'blur' }],
|
||||||
phoneNumber: [{ required: true, message: '请输入收货人手机号', trigger: 'blur' }],
|
phoneNumber: [{ required: true, message: '请输入收货人手机号', trigger: 'blur' }],
|
||||||
@@ -117,12 +131,31 @@ export default {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
//查看退货的物流信息
|
||||||
|
this.getRefundInfo()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getRefundInfo(){
|
||||||
|
let data={
|
||||||
|
//订单编号
|
||||||
|
orderCode:this.checkForm.orderCode,
|
||||||
|
//快递公司编码
|
||||||
|
shipperCode:this.checkForm.shipperCode,
|
||||||
|
//物流单号
|
||||||
|
logisticCode:this.checkForm.deliverySn
|
||||||
|
}
|
||||||
|
getRefundInfo(data).then(res=>{
|
||||||
|
console.log('res',res)
|
||||||
|
this.activities=res.Traces
|
||||||
|
this.reason=res.Reason
|
||||||
|
})
|
||||||
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
this.visible = false
|
this.visible = false
|
||||||
this.$refs['form'].resetFields()
|
this.$refs['form'].resetFields()
|
||||||
},
|
},
|
||||||
async submit(type) {
|
submit(type) {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
if (this.serviceType === 0) {
|
if (this.serviceType === 0) {
|
||||||
this.form.consignee = ''
|
this.form.consignee = ''
|
||||||
@@ -130,7 +163,16 @@ export default {
|
|||||||
this.form.address = ''
|
this.form.address = ''
|
||||||
}
|
}
|
||||||
this.form.approvalStatus = type // 0成功 1失败
|
this.form.approvalStatus = type // 0成功 1失败
|
||||||
var res = await salesCheck(this.form)
|
// var res = salesCheck(this.form)
|
||||||
|
// if (res) {
|
||||||
|
// this.$message.success('审核成功')
|
||||||
|
// this.visible = false
|
||||||
|
// this.$emit('checkSuccess')
|
||||||
|
// } else {
|
||||||
|
// this.$message.error(res.message || '审核失败!')
|
||||||
|
// }
|
||||||
|
// this.loading = false
|
||||||
|
salesCheck(this.form).then(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
this.$message.success('审核成功')
|
this.$message.success('审核成功')
|
||||||
this.visible = false
|
this.visible = false
|
||||||
@@ -138,7 +180,9 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.$message.error(res.message || '审核失败!')
|
this.$message.error(res.message || '审核失败!')
|
||||||
}
|
}
|
||||||
|
}).finally(
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,7 +83,8 @@
|
|||||||
<el-table-column prop="state" label="状态" width="100px" align="center">
|
<el-table-column prop="state" label="状态" width="100px" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.state === 0" :style="'color: #E6A23C'">等待审核</span>
|
<span v-if="scope.row.state === 0" :style="'color: #E6A23C'">等待审核</span>
|
||||||
<span v-if="scope.row.state === 1" :style="'color: #409EFF'">等待用户发货</span>
|
<span v-if="scope.row.state === 1&&scope.row.serviceType===1" :style="'color: #409EFF'">等待用户发货</span>
|
||||||
|
<span v-if="scope.row.state === 1&&scope.row.serviceType===0" :style="'color: #409EFF'">退款中</span>
|
||||||
<span v-if="scope.row.state === 2" :style="'color: #F56C6C'">用户已发货</span>
|
<span v-if="scope.row.state === 2" :style="'color: #F56C6C'">用户已发货</span>
|
||||||
<span v-if="scope.row.state === 3" :style="'color: #909399'">退款成功</span>
|
<span v-if="scope.row.state === 3" :style="'color: #909399'">退款成功</span>
|
||||||
</template>
|
</template>
|
||||||
@@ -214,6 +215,7 @@ export default {
|
|||||||
// 审核
|
// 审核
|
||||||
checkItem(row, type) {
|
checkItem(row, type) {
|
||||||
this.$refs.addForm.checkForm = row
|
this.$refs.addForm.checkForm = row
|
||||||
|
this.$refs.addForm.getRefundInfo()
|
||||||
this.$refs.addForm.serviceType = row.serviceType
|
this.$refs.addForm.serviceType = row.serviceType
|
||||||
|
|
||||||
this.$refs.addForm.form.salesId = row.id
|
this.$refs.addForm.form.salesId = row.id
|
||||||
@@ -229,7 +231,8 @@ export default {
|
|||||||
// 退款
|
// 退款
|
||||||
async rebackItem() {
|
async rebackItem() {
|
||||||
var res = await rebackMoney(this.rebackQuery)
|
var res = await rebackMoney(this.rebackQuery)
|
||||||
if (res) {
|
console.log(res,'res')
|
||||||
|
if (res.status!=500) {
|
||||||
this.$message.success('提交退款成功!')
|
this.$message.success('提交退款成功!')
|
||||||
this.rebackVisible = false
|
this.rebackVisible = false
|
||||||
this.toQuery()
|
this.toQuery()
|
||||||
|
|||||||
Reference in New Issue
Block a user