Commit d1d14822 authored by 智勇's avatar 智勇

贷后关单

parent b727d509
......@@ -40,6 +40,14 @@ export function cancelLoan(data) {
})
}
export function cancelLoanAfter(data) {
return request({
url: '/order/cancel/after/loan',
method: 'post',
params: data
})
}
export function lendLoan(data) {
return request({
url: '/order/lending',
......
......@@ -150,7 +150,17 @@
</template>
<script>
import { getOrders, getOrderHistory, approve, cancelLoan, lendLoan, callbackRecord, logHistory, secondAudit } from '@/api/order'
import {
getOrders,
getOrderHistory,
approve,
cancelLoan,
lendLoan,
callbackRecord,
logHistory,
secondAudit,
cancelLoanAfter
} from '@/api/order'
import Pagination from '@/components/Pagination'
import store from '@/store'
......@@ -253,6 +263,11 @@ export default {
this.dialogDeleteVisible = true
}
if (opt.action === 'cancel_after') {
this.opt = '贷后关单'
this.dialogDeleteVisible = true
}
if (opt.action === 'pay_succ') {
this.handleLendLoan(true)
}
......@@ -298,15 +313,29 @@ export default {
},
cancelLoan() {
cancelLoan({ channelOrderNumber: this.order.channelOrderNumber }).then(() => {
this.$notify({
message: '关单完毕',
type: 'success',
duration: 2000
if (this.opt === '贷前关单') {
cancelLoan({ channelOrderNumber: this.order.channelOrderNumber }).then((res) => {
this.$notify({
message: res.message,
type: 'success',
duration: 2000
})
this.dialogDeleteVisible = false
this.getOrders()
})
this.dialogDeleteVisible = false
this.getOrders()
})
}
if (this.opt === '贷后关单') {
cancelLoanAfter({ channelOrderNumber: this.order.channelOrderNumber }).then((res) => {
this.$notify({
message: res.message,
type: 'success',
duration: 2000
})
this.dialogDeleteVisible = false
this.getOrders()
})
}
},
handleApprove(data) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment