Commit d1d14822 authored by 智勇's avatar 智勇

贷后关单

parent b727d509
...@@ -40,6 +40,14 @@ export function cancelLoan(data) { ...@@ -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) { export function lendLoan(data) {
return request({ return request({
url: '/order/lending', url: '/order/lending',
......
...@@ -150,7 +150,17 @@ ...@@ -150,7 +150,17 @@
</template> </template>
<script> <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 Pagination from '@/components/Pagination'
import store from '@/store' import store from '@/store'
...@@ -253,6 +263,11 @@ export default { ...@@ -253,6 +263,11 @@ export default {
this.dialogDeleteVisible = true this.dialogDeleteVisible = true
} }
if (opt.action === 'cancel_after') {
this.opt = '贷后关单'
this.dialogDeleteVisible = true
}
if (opt.action === 'pay_succ') { if (opt.action === 'pay_succ') {
this.handleLendLoan(true) this.handleLendLoan(true)
} }
...@@ -298,15 +313,29 @@ export default { ...@@ -298,15 +313,29 @@ export default {
}, },
cancelLoan() { cancelLoan() {
cancelLoan({ channelOrderNumber: this.order.channelOrderNumber }).then(() => { if (this.opt === '贷前关单') {
this.$notify({ cancelLoan({ channelOrderNumber: this.order.channelOrderNumber }).then((res) => {
message: '关单完毕', this.$notify({
type: 'success', message: res.message,
duration: 2000 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) { 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