Browse Source

售后物流

master
sj 2 years ago committed by Loki
parent
commit
4c7362a05f
  1. 11
      src/api/bxg/yxStoreAfterSales.js
  2. 72
      src/views/bxg/shop/afterSeals/checkDialog.vue
  3. 11
      src/views/bxg/shop/afterSeals/index.vue

11
src/api/bxg/yxStoreAfterSales.js

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

72
src/views/bxg/shop/afterSeals/checkDialog.vue

@ -25,11 +25,11 @@
<b>用户未上传图片</b> <b>用户未上传图片</b>
</div> </div>
<div v-else> <div v-else>
<el-image <el-image
v-for="(item,index) in checkForm.explainImg.split(',')" v-for="(item,index) in checkForm.explainImg.split(',')"
:key="index" :key="index"
style="width: 100px; height: 100px" style="width: 100px; height: 100px"
:src="item" :src="item"
:preview-src-list="[item]"> :preview-src-list="[item]">
</el-image> </el-image>
</div> </div>
@ -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,15 +163,26 @@ 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) { // if (res) {
this.$message.success('审核成功') // this.$message.success('')
this.visible = false // this.visible = false
this.$emit('checkSuccess') // this.$emit('checkSuccess')
} else { // } else {
this.$message.error(res.message || '审核失败!') // this.$message.error(res.message || '')
} // }
this.loading = false // this.loading = false
salesCheck(this.form).then(res => {
if (res) {
this.$message.success('审核成功')
this.visible = false
this.$emit('checkSuccess')
} else {
this.$message.error(res.message || '审核失败!')
}
}).finally(
this.loading = false
)
} }
} }
} }
@ -168,4 +212,4 @@ export default {
.refuse{} .refuse{}
.check{} .check{}
} }
</style> </style>

11
src/views/bxg/shop/afterSeals/index.vue

@ -54,7 +54,7 @@
</div> </div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'--> <!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<!-- <crudOperation :permission="permission" /> --> <!-- <crudOperation :permission="permission" /> -->
<!--表格渲染--> <!--表格渲染-->
<el-table <el-table
ref="table" ref="table"
@ -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>
@ -194,7 +195,7 @@ export default {
this.params = { this.params = {
page: this.page, page: this.page,
size: this.size, size: this.size,
serviceType: this.query.type || '', // serviceType: this.query.type || '', //
salesState: this.query.salesState || 0, // salesState: this.query.salesState || 0, //
state: this.query.state, state: this.query.state,
@ -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()

Loading…
Cancel
Save