Commit 709c7b0a authored by LSL's avatar LSL

修改

parent 2b704a23
<template>
<div>
<el-row>
<el-col :span="24">
<el-link type="danger" disabled>绿色时为开启积累 红色时为关闭积累</el-link>
</el-col>
<el-col :span="24">
<el-switch
v-model="value"
active-color="#13ce66"
@change="change()"
inactive-color="#ff4949">
</el-switch>
</el-col>
</el-row>
</div>
</template>
<script>
import * as moment from "moment";
export default {
name: "Controlswitch",
data() {
return {
value: true
}
},
filters: {
dateFilter: function (row) {
var date = row
if (typeof (date) == undefined || typeof (date) == null) {
return ''
}
return moment(date).format("YYYY-MM-DD")
},
},
created() {
this.getRiaseOrPut();
},
methods: {
change(){
this.$confirm('此操作将影响是否积累放款, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
if(this.value === true){
this.$$get("/raise/riaseOrPut?type=ON",null).then(res=>{
if (res.data.code==="200"){
this.$message({
message: '设置成功',
type: 'success'
});
this.getRiaseOrPut();
}
});
}else {
this.$$get("/raise/riaseOrPut?type=OFF",null).then(res=>{
if (res.data.code==="200"){
this.$message({
message: '设置成功',
type: 'success'
});
this.getRiaseOrPut();
}
});
}
}).catch(() => {
this.$message({
message: '已取消',
type: 'warning'
});
this.getRiaseOrPut();
});
},
getRiaseOrPut(){
this.$$get("/raise/getRiaseOrPut",null).then(res=>{
if (res.data.result==="OFF"){
this.value = false
}else {
this.value = true
}
});
}
}
}
</script>
<style scoped>
</style>
...@@ -2,6 +2,7 @@ import Vue from 'vue' ...@@ -2,6 +2,7 @@ import Vue from 'vue'
import Router from 'vue-router' import Router from 'vue-router'
import { import {
ByhService, ByhService,
Controlswitch,
ByhServiceDetail, ByhServiceDetail,
Login, Login,
Index, Index,
...@@ -93,6 +94,12 @@ export default new Router({ ...@@ -93,6 +94,12 @@ export default new Router({
component: ByhService, component: ByhService,
meta: {title: '客服管理', filter: true} meta: {title: '客服管理', filter: true}
}, },
{
path: '/byh/Controlswitch',
name: 'Controlswitch',
component: Controlswitch,
meta: {title: '亲家管理', filter: true}
},
{ {
path: '/byh/ByhServiceDetail', path: '/byh/ByhServiceDetail',
name: 'ByhServiceDetail', name: 'ByhServiceDetail',
......
...@@ -25,6 +25,7 @@ export const ByhPlanRemindDetailNew = resolve => require(['../components/byh/Byh ...@@ -25,6 +25,7 @@ export const ByhPlanRemindDetailNew = resolve => require(['../components/byh/Byh
export const ByhLoanBackedDetails = resolve => require(['../components/byh/ByhLoanBackedDetails.vue'], resolve) export const ByhLoanBackedDetails = resolve => require(['../components/byh/ByhLoanBackedDetails.vue'], resolve)
// 临时放款 // 临时放款
export const ByhLoanSnapList = resolve => require(['../components/byh/ByhLoanSnapList.vue'], resolve) export const ByhLoanSnapList = resolve => require(['../components/byh/ByhLoanSnapList.vue'], resolve)
export const Controlswitch = resolve => require(['../components/byh/Controlswitch.vue'], resolve)
export default { export default {
Login, Login,
...@@ -48,5 +49,6 @@ export default { ...@@ -48,5 +49,6 @@ export default {
// 通讯录列表 // 通讯录列表
ByhApplyMoney, ByhApplyMoney,
//客户管理 //客户管理
ClientManagerment ClientManagerment,
Controlswitch
} }
...@@ -658,6 +658,8 @@ const enumUtils = { ...@@ -658,6 +658,8 @@ const enumUtils = {
{value: 'RNY_DAI', label: '任你用'}, {value: 'RNY_DAI', label: '任你用'},
{value: 'QYD_DAI', label: '钱有道'}, {value: 'QYD_DAI', label: '钱有道'},
{value: 'JP_DAI', label: '榕树九品贷'}, {value: 'JP_DAI', label: '榕树九品贷'},
{value: 'HY_DAI', label: '花鸭'},
{value: 'R360_DAI', label: '融360'},
] ]
}; };
......
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