Commit 1c367f9b authored by 刘雅文's avatar 刘雅文

新增资金渠道模块

parent c7dd5573
...@@ -30,9 +30,7 @@ ...@@ -30,9 +30,7 @@
"type": "git", "type": "git",
"url": "git+https://github.com/vue-admin-beautiful/vue-admin-beautiful-pro.git" "url": "git+https://github.com/vue-admin-beautiful/vue-admin-beautiful-pro.git"
}, },
"gitHooks": {
"pre-commit": "lint-staged"
},
"lint-staged": { "lint-staged": {
"*.{js,jsx,vue}": [ "*.{js,jsx,vue}": [
"vue-cli-service lint", "vue-cli-service lint",
......
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
if (this.item !== null) { if (this.item !== null) {
const { clientDetail, projectInfoResponse } = this.item const { clientDetail, projectInfoResponse } = this.item
const { creditNo, creditType, regionCode } = clientDetail const { creditNo, creditType, regionCode } = clientDetail
const { manualAmount, manualNum } = projectInfoResponse const { manualAmount, manualNum,partnerNo } = projectInfoResponse
this.creditNo = creditNo this.creditNo = creditNo
this.manualAmount = manualAmount this.manualAmount = manualAmount
...@@ -283,17 +283,17 @@ ...@@ -283,17 +283,17 @@
await this.initRiskResult() await this.initRiskResult()
// 初始化资方 // 初始化资方
await this.initStatusList(this.item.clientDetail.regionCode) await this.initStatusList(this.item.projectInfoResponse.partnerNo)
} }
}, },
methods: { methods: {
// 初始化数据枚举 // 初始化数据枚举
async initStatusList(regionCode) { async initStatusList(partnerNo) {
console.log(regionCode,'wo') console.log(partnerNo,'wo')
await this.$store.dispatch('common/GetSearchData', { await this.$store.dispatch('common/GetSearchData', {
regionCode partnerNo
}) })
}, },
......
...@@ -449,6 +449,21 @@ export default { ...@@ -449,6 +449,21 @@ export default {
data data
}) })
}, },
// 获取资金渠道
getMoneyChannel(data) {
return request({
url: '/partner/selectPartnerChannel',
method: 'get',
params:data
})
},
// 修改商户资金渠道弃用状态
modifyStatus(data) {
return request({
url: '/partner/updateEnableStatus',
method: 'post',
data
})
},
} }
<template>
<div class='merchant-account'>
<block-header title='资金渠道'>
<!-- <el-button type='primary' @click='onUpdate("new")'>更新</el-button> -->
</block-header>
<el-table
ref='tableRef'
size='mini'
border
:data='list'
style='width: 500px;margin-bottom: 20px'>
<el-table-column
width="300px"
prop='loanCodeNameStr'
align='center'
label='资金渠道'>
</el-table-column>
<el-table-column
prop='isEnable'
align='center'
label='是否启用'>
<template slot-scope='scope'>
<el-switch :value='scope.row.isEnable'
@change='(isEnable)=>handleSwitchStatus(isEnable,scope.row)'></el-switch>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import API from '@/server/api'
import { mapGetters } from 'vuex'
export default {
name: 'MoneyChannel',
props: {
//eslint-disable-next-line vue/require-default-prop
merchantNo: {
type: String,
require: false
}
},
data() {
return {
partnerNo: '',
list: [],
// 账户详情
viewVisible: false,
detail: null,
// 新增编辑
idEdit: false,
title: '',
visible: false,
}
},
computed: {
...mapGetters(['searchData', 'user'])
},
async mounted() {
if (this.merchantNo) {
this.partnerNo = this.merchantNo
await this.init()
}
},
methods: {
// 初始化产品列表
async init() {
const partnerNo = this.partnerNo
const result = await API.getMoneyChannel({
partnerNo
})
console.log(result,'结果结果');
this.list = result.result.partnerCapitalChannelResponseList
},
// 是否启用
handleSwitchStatus(type, row) {
let confirmText = type ? '启用' : '禁用'
const { loanCodeName, isEnable } = row
this.$confirm(`确认${confirmText}该资金渠道吗?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async (res) => {
const result = await API.modifyStatus({partnerNo:this.partnerNo,isEnable:type,
loanCodeName})
if (result.success) {
this.$message({
type: 'success',
message: '操作成功'
})
await this.init()
}
}).catch((e) => {
console.log(e, '取消了')
})
}
}
}
</script>
<style lang='scss' src='../index.scss'></style>
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<template v-if='partnerNo'> <template v-if='partnerNo'>
<el-tabs v-model='activeName' @tab-click='handleTabClick'> <el-tabs v-model='activeName' @tab-click='handleTabClick'>
<el-tab-pane label='基础信息' name='Base' /> <el-tab-pane label='基础信息' name='Base' />
<el-tab-pane label='资金渠道' name='MoneyChannel' />
<el-tab-pane label='产品信息' name='Product' /> <el-tab-pane label='产品信息' name='Product' />
<el-tab-pane label='收款信息' name='Account' /> <el-tab-pane label='收款信息' name='Account' />
</el-tabs> </el-tabs>
...@@ -19,13 +20,15 @@ ...@@ -19,13 +20,15 @@
import Base from './com/base' import Base from './com/base'
import Product from './com/product' import Product from './com/product'
import Account from './com/account' import Account from './com/account'
import MoneyChannel from './com/MoneyChannel'
export default { export default {
name: 'MerchantDetail', name: 'MerchantDetail',
components: { components: {
Base, Base,
Product, Product,
Account Account,
MoneyChannel
}, },
data() { data() {
return { return {
......
...@@ -4,3 +4,5 @@ ...@@ -4,3 +4,5 @@
- 新增商户产品配置 - 新增商户产品配置
- 新增商户账户管理 - 新增商户账户管理
- 2.修改approval.vue,根据当前用户所在地区获取statusList里面的放款资金渠道列表 - 2.修改approval.vue,根据当前用户所在地区获取statusList里面的放款资金渠道列表
## 2022-11-2
- 商户列表模块增加 资金渠道(根据商户片区,展示对应片区可支持的资金渠道,对资金渠道进行开启关闭选择)
\ No newline at end of file
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