退款对接
This commit is contained in:
@ -16,11 +16,11 @@ export function salesCheck(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function rebackMoney(data) {
|
export function rebackMoney(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/yxStoreAfterSales/makeMoney',
|
url: '/api/yxStoreAfterSales/makeMoney',
|
||||||
method: '',
|
method: 'post',
|
||||||
data
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export function add(data) {
|
export function add(data) {
|
||||||
|
@ -84,8 +84,8 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="text" @click="cancel">退出</el-button>
|
<el-button class="refuse" type="danger" v-if="isShow" :loading="loading" @click="submit(1)">拒绝</el-button>
|
||||||
<el-button v-if="isShow" :loading="loading" type="primary" @click="submit">确认</el-button>
|
<el-button class="check" type="primary" v-if="isShow" :loading="loading" @click="submit(0)">确认</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
@ -122,20 +122,21 @@ export default {
|
|||||||
this.visible = false
|
this.visible = false
|
||||||
this.$refs['form'].resetFields()
|
this.$refs['form'].resetFields()
|
||||||
},
|
},
|
||||||
async submit() {
|
async submit(type) {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
if (this.serviceType === 0) {
|
if (this.serviceType === 0) {
|
||||||
consignee = ''
|
consignee = ''
|
||||||
phoneNumber = ''
|
phoneNumber = ''
|
||||||
address = ''
|
address = ''
|
||||||
}
|
}
|
||||||
this.form.approvalStatus = 0
|
this.form.approvalStatus = type // 0成功 1失败
|
||||||
var res = await salesCheck(this.form)
|
var res = await salesCheck(this.form)
|
||||||
if (res) {
|
if (res) {
|
||||||
this.$message.success('审核成功')
|
this.$message.success('审核成功')
|
||||||
|
this.visible = false
|
||||||
this.$emit('checkSuccess')
|
this.$emit('checkSuccess')
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(res.msg || '审核失败!')
|
this.$message.error(res.message || '审核失败!')
|
||||||
}
|
}
|
||||||
this.loading = false
|
this.loading = false
|
||||||
}
|
}
|
||||||
@ -145,6 +146,7 @@ export default {
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.afterSealsAdd{
|
.afterSealsAdd{
|
||||||
|
padding-bottom: 10vh;
|
||||||
span{
|
span{
|
||||||
color: #F56C6C;
|
color: #F56C6C;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
@ -156,4 +158,14 @@ export default {
|
|||||||
.afterSealsAdd ::v-deep.el-input.is-disabled .el-input__inner{
|
.afterSealsAdd ::v-deep.el-input.is-disabled .el-input__inner{
|
||||||
color: #333333;
|
color: #333333;
|
||||||
}
|
}
|
||||||
|
.afterSealsAdd ::v-deep .dialog-footer{
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
.el-button{
|
||||||
|
width: 120px;
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
|
.refuse{}
|
||||||
|
.check{}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
@ -99,12 +99,18 @@
|
|||||||
v-permission="['admin','yxStoreAfterSales:edit','yxStoreAfterSales:del']" label="操作" width="150px" align="center">
|
v-permission="['admin','yxStoreAfterSales:edit','yxStoreAfterSales:del']" label="操作" width="150px" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" @click="checkItem(scope.row, 0)">订单详情</el-button>
|
<el-button type="text" @click="checkItem(scope.row, 0)">订单详情</el-button>
|
||||||
<el-button size="mini" type="success" v-if="scope.row.state === 0" @click="checkItem(scope.row, 1)">审核</el-button>
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="success"
|
||||||
|
v-if="scope.row.state === 0 && scope.row.salesState === 0"
|
||||||
|
@click="checkItem(scope.row, 1)">审核</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="danger"
|
type="danger"
|
||||||
v-if="scope.row.state === 2"
|
v-if="scope.row.state === 2"
|
||||||
@click="rebackVisible = true;rebackQuery.salesId = scope.row.id;rebackQuery.orderCode = scope.row.orderCode">
|
@click="rebackVisible = true;
|
||||||
|
rebackQuery.salesId = scope.row.id;
|
||||||
|
rebackQuery.orderCode = scope.row.orderCode">
|
||||||
退款</el-button>
|
退款</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -172,8 +178,8 @@ export default {
|
|||||||
],
|
],
|
||||||
// 退款参数
|
// 退款参数
|
||||||
rebackQuery: {
|
rebackQuery: {
|
||||||
salesId: 0, // 数据的id
|
orderCode: '', // 订单号
|
||||||
orderCode: '' // 订单号
|
salesId: 0 // 数据的id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -185,7 +191,6 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
beforeInit() {
|
beforeInit() {
|
||||||
this.url = 'api/yxStoreAfterSales/sales/List'
|
this.url = 'api/yxStoreAfterSales/sales/List'
|
||||||
console.log(this.searchTime)
|
|
||||||
this.params = {
|
this.params = {
|
||||||
page: this.page,
|
page: this.page,
|
||||||
size: this.size,
|
size: this.size,
|
||||||
@ -223,9 +228,14 @@ export default {
|
|||||||
},
|
},
|
||||||
// 退款
|
// 退款
|
||||||
async rebackItem() {
|
async rebackItem() {
|
||||||
console.log(this.rebackQuery)
|
var res = await rebackMoney(this.rebackQuery)
|
||||||
// var res = await rebackMoney(this.rebackQuery)
|
if (res) {
|
||||||
// console.log(res)
|
this.$message.success('提交退款成功!')
|
||||||
|
this.rebackVisible = false
|
||||||
|
this.toQuery()
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.message || '提交退款失败!')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user