mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-15 16:26:44 +08:00
Merge branch 'feature/GFRS-222【0423】续期管理-续期列表' into dev
# Conflicts: # src/assets/js/utils/request.js # src/config/urlMap.js # src/router/ebiz/index.js
This commit is contained in:
38
src/api/ebiz/renewalManage/renewalManage.js
Normal file
38
src/api/ebiz/renewalManage/renewalManage.js
Normal file
@@ -0,0 +1,38 @@
|
||||
import request from '@/assets/js/utils/request'
|
||||
import getUrl from '@/assets/js/utils/get-url'
|
||||
|
||||
//获取续期列表
|
||||
export function getList(data) {
|
||||
return request({
|
||||
url: getUrl('/renewal/getRenewalList', 0), //0=》mock数据 1=》正式数据
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
//获取续期扣款详情
|
||||
export function getDetail(data) {
|
||||
return request({
|
||||
url: getUrl('/renewal/getRenewalDetail', 0), //0=》mock数据 1=》正式数据
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
//获取短信模板
|
||||
export function getMsg(data) {
|
||||
return request({
|
||||
url: getUrl('/renewal/msgTemplate', 0),
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
//发送短信
|
||||
export function sendMsg(data) {
|
||||
return request({
|
||||
url: getUrl('/renewal/sendSms', 0),
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
BIN
src/assets/images/renewalManage/u17218.png
Normal file
BIN
src/assets/images/renewalManage/u17218.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
BIN
src/assets/images/renewalManage/u51770.png
Normal file
BIN
src/assets/images/renewalManage/u51770.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
BIN
src/assets/images/renewalManage/u51859.png
Normal file
BIN
src/assets/images/renewalManage/u51859.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
@@ -72,7 +72,11 @@ let manpower = [
|
||||
]
|
||||
// 卡单
|
||||
let cardList = []
|
||||
let whiteList = ['/customer/agent/getCustomersList', ...proposal, ...sale, ...agentEnter, ...claims, ...survey, ...manpower]
|
||||
//续期管理
|
||||
let renewalManage = [
|
||||
'/renewal/getRenewalList' //续期列表查询
|
||||
]
|
||||
let whiteList = ['/customer/agent/getCustomersList', ...proposal, ...sale, ...agentEnter, ...claims, ...survey, ...manpower, ...renewalManage]
|
||||
|
||||
// let whiteList = ['/customer/agent/getCustomersList', ...proposal, ...sale]
|
||||
|
||||
|
||||
9
src/config/renewalManage.js
Normal file
9
src/config/renewalManage.js
Normal file
@@ -0,0 +1,9 @@
|
||||
//续期管理
|
||||
let mockBaseUrl = 'http://mock-api.com/LwnaDLg1.mock'
|
||||
export default {
|
||||
//获取续期列表
|
||||
'/renewal/getRenewalList': mockBaseUrl + '/renewal/getRenewalList',
|
||||
'/renewal/getRenewalDetail': mockBaseUrl + '/renewal/getRenewalDetail',
|
||||
'/renewal/msgTemplate': mockBaseUrl + '/renewal/msgTemplate',
|
||||
'/renewal/sendSms': mockBaseUrl + '/renewal/sendSms'
|
||||
}
|
||||
@@ -13,6 +13,7 @@ import common from './common'
|
||||
import survey from './survey'
|
||||
import manpower from './manpower'
|
||||
import cardList from './cardList'
|
||||
import renewalManage from './renewalManage'
|
||||
const mockBaseUrl = 'http://rap2api.taobao.org/app/mock'
|
||||
|
||||
let baseObj = {
|
||||
@@ -20,6 +21,6 @@ let baseObj = {
|
||||
'/user/info': mockBaseUrl + '/223948/info',
|
||||
'/user/logout': mockBaseUrl + '/223948/logout'
|
||||
}
|
||||
Object.assign(baseObj, proposal, sale, customer, my, product, serve, common, cardList, survey, manpower)
|
||||
Object.assign(baseObj, proposal, sale, customer, my, product, serve, common, cardList, renewalManage, survey, manpower)
|
||||
|
||||
export default baseObj
|
||||
|
||||
@@ -15,6 +15,7 @@ import nbs from './nbs'
|
||||
import survey from './survey'
|
||||
import manpower from './manpower'
|
||||
import cardList from './cardList'
|
||||
import renewalManage from './renewalManage'
|
||||
export default [
|
||||
...proposal,
|
||||
...sale,
|
||||
@@ -31,5 +32,6 @@ export default [
|
||||
...nbs,
|
||||
...survey,
|
||||
...manpower,
|
||||
...cardList
|
||||
...cardList,
|
||||
...renewalManage
|
||||
] //根据需要进行删减
|
||||
|
||||
32
src/router/ebiz/renewalManage.js
Normal file
32
src/router/ebiz/renewalManage.js
Normal file
@@ -0,0 +1,32 @@
|
||||
const list = () => import('@/views/ebiz/renewalManage/List')
|
||||
const detail = () => import('@/views/ebiz/renewalManage/Detail')
|
||||
const msgTemplate = () => import('@/views/ebiz/renewalManage/MsgTemplate')
|
||||
export default [
|
||||
{
|
||||
path: '/renewalManage/list',
|
||||
name: 'renewalManageList',
|
||||
component: list,
|
||||
meta: {
|
||||
title: '续期管理',
|
||||
index: 1
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/renewalManage/detail',
|
||||
name: 'renewalManageDetail',
|
||||
component: detail,
|
||||
meta: {
|
||||
title: '续期扣款详情',
|
||||
index: 1
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/renewalManage/msgTemplate',
|
||||
name: 'msgTemplate',
|
||||
component: msgTemplate,
|
||||
meta: {
|
||||
title: '短信模板',
|
||||
index: 1
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -13,7 +13,8 @@ export default new Vuex.Store({
|
||||
pageFlag: '', //理赔申请-区分被保险人/申请人页面flag
|
||||
agentEnterApplyMobil: '', //自助入司-新的被增员人填好的基础信息里的电话号码
|
||||
agentEnterApplyIdNo: '', //自助入司-新的被增员人填好的基础信息里的证件号码
|
||||
refusalCause: '' //自助入司-查看审批流程-审批拒绝的原因
|
||||
refusalCause: '', //自助入司-查看审批流程-审批拒绝的原因
|
||||
renewalMsgParam: {} //续期管理-发送短信,请求参数
|
||||
},
|
||||
mutations: {
|
||||
//更新 理赔申请-区分被保险人/申请人页面flag
|
||||
@@ -28,6 +29,10 @@ export default new Vuex.Store({
|
||||
//更新 自助入司-查看审批流程-审批拒绝的原因
|
||||
updateRefusalCause(state, val) {
|
||||
state.refusalCause = val
|
||||
},
|
||||
//更新 续期管理-发送短信,请求参数
|
||||
updateRenewalMsgParam(state, val) {
|
||||
state.renewalMsgParam = val
|
||||
}
|
||||
},
|
||||
getters: {
|
||||
@@ -39,6 +44,9 @@ export default new Vuex.Store({
|
||||
},
|
||||
getRefusalCause(state) {
|
||||
return state.refusalCause
|
||||
},
|
||||
getRenewalMsgParam(state) {
|
||||
return state.renewalMsgParam
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<li><router-link to="/agentEenter/approve/ApproveList">入司审批列表</router-link></li>
|
||||
<li><router-link to="/survey/surveyList">问卷调查</router-link></li>
|
||||
<li><router-link to="/nbs/list">nbs列表</router-link></li>
|
||||
<li><router-link to="/renewalManage/list">续期管理列表</router-link></li>
|
||||
<li><router-link to="/manpower/DiscAnalysis/List">DISC性格分析</router-link></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
137
src/views/ebiz/renewalManage/Detail.vue
Normal file
137
src/views/ebiz/renewalManage/Detail.vue
Normal file
@@ -0,0 +1,137 @@
|
||||
<template>
|
||||
<div class="detail-container pl5 pr5">
|
||||
<div>
|
||||
<div v-if="renewalDTO.deductionStatus == '0'" class="status">
|
||||
<img src="@/assets/images/renewalManage/u51770.png" alt="" />
|
||||
<div>续期待扣款</div>
|
||||
</div>
|
||||
<div v-else-if="renewalDTO.deductionStatus == '1'" class="status">
|
||||
<img src="@/assets/images/renewalManage/u51770.png" alt="" />
|
||||
<div>续期扣款成功</div>
|
||||
</div>
|
||||
<div v-else-if="renewalDTO.deductionStatus == '2'" class="status">
|
||||
<img src="@/assets/images/renewalManage/u17218.png" alt="" />
|
||||
<div>续期扣款失败</div>
|
||||
</div>
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-cell title="保单号" :value="renewalDTO.contNo" />
|
||||
<van-cell title="产品名称" :value="renewalDTO.riskName" />
|
||||
<van-cell title="投保人" :value="renewalDTO.applicant" />
|
||||
<van-cell title="金额" :value="renewalDTO.duePayMoney" />
|
||||
<van-cell title="账号" :value="renewalDTO.accountNo" />
|
||||
<van-cell title="缴费次数" :value="renewalDTO.currentPeriod" />
|
||||
<van-cell title="扣款日" :value="renewalDTO.duePayDate" />
|
||||
</van-cell-group>
|
||||
<div class="flex justify-content-s bottom-btn">
|
||||
<div>
|
||||
<img :src="$assetsUrl + 'images/phone.png'" @click="callSystem(renewalDTO.receiveMobile)" width="24" height="23" class="ml10 mr10" />
|
||||
<span class="mt8 fs14">拨打电话</span>
|
||||
</div>
|
||||
<div>
|
||||
<img :src="$assetsUrl + 'images/ms.png'" @click="sendMsg" width="24" height="23" class="ml10 mr10" />
|
||||
<span class="mt8 fs14">发送短信</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { Cell, CellGroup } from 'vant'
|
||||
// import FieldDatePicter from '@/components/ebiz/FieldDatePicter'
|
||||
import { getDetail } from '@/api/ebiz/renewalManage/renewalManage'
|
||||
export default {
|
||||
name: 'renewalDetail',
|
||||
components: {
|
||||
[Cell.name]: Cell,
|
||||
[CellGroup.name]: CellGroup
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
renewalDTO: {}, //续期保单详情
|
||||
contNo: '' //保单号
|
||||
// renewalDTO: {
|
||||
// deductionStatus: '', //扣款状态
|
||||
// contNo: '6200987623439759',
|
||||
// riskName: '重大疾病保险',
|
||||
// duePayMoney: '2888.00',
|
||||
// currentPeriod: '2',
|
||||
// duePayDate: '应缴费日期',
|
||||
// applicant: '李四',
|
||||
// failReason: '扣款金额不足',
|
||||
// accountNo: '1233465768686',
|
||||
// receiveMobile: '13700020000' //客户电话号
|
||||
// } //续期保单详情
|
||||
}
|
||||
},
|
||||
created() {
|
||||
document.body.style.backgroundColor = '#fff'
|
||||
},
|
||||
mounted() {
|
||||
this.getDetail()
|
||||
this.contNo = this.$route.query.contNo
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
document.body.style.backgroundColor = ''
|
||||
next()
|
||||
},
|
||||
methods: {
|
||||
async getDetail() {
|
||||
getDetail({ contNo: '6200987623439759' }).then(res => {
|
||||
// getDetail({ contNo: this.contNo }).then(res => {
|
||||
if (res.result == '0') {
|
||||
this.renewalDTO = res.content
|
||||
}
|
||||
})
|
||||
},
|
||||
//打电话
|
||||
callSystem(value) {
|
||||
// eslint-disable-next-line no-undef
|
||||
EWebBridge.webCallAppInJs('callSystem', {
|
||||
system: 'tel',
|
||||
number: value
|
||||
})
|
||||
},
|
||||
|
||||
//发送短信
|
||||
sendMsg() {
|
||||
// let param = {
|
||||
// deductionStatus: '',
|
||||
// agentName: '',
|
||||
// contNo: '',
|
||||
// riskName: '',
|
||||
// accountNo: '',
|
||||
// duePayMoney: '',
|
||||
// failReason: ''
|
||||
// }
|
||||
// param = this.renewalDTO
|
||||
this.$store.commit('updateRenewalMsgParam', this.renewalDTO)
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + `/#/renewalManage/msgTemplate`
|
||||
},
|
||||
routerInfo: { path: `/renewalManage/msgTemplate` }
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.detail-container > div:first-child {
|
||||
text-align: center;
|
||||
.status {
|
||||
margin: 40px 0;
|
||||
div {
|
||||
margin-top: 10px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
.justify-content-s > div {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin: 20px 0;
|
||||
width: 50%;
|
||||
}
|
||||
</style>
|
||||
227
src/views/ebiz/renewalManage/List.vue
Normal file
227
src/views/ebiz/renewalManage/List.vue
Normal file
@@ -0,0 +1,227 @@
|
||||
<template>
|
||||
<div class="renewal-manage bg-white">
|
||||
<div v-if="!isShow">
|
||||
<van-sticky>
|
||||
<!-- <van-field v-model="searchVal" label="保单号/投保人" placeholder="请输入" sticky /> -->
|
||||
<div class="list-header">
|
||||
<van-search placeholder="请输入保单号/投保人" v-model="searchVal" @search="search" />
|
||||
</div>
|
||||
<FieldDatePicter
|
||||
@confirm="onDateConfirm"
|
||||
label="扣款日期"
|
||||
name="扣款日期"
|
||||
:value.sync="payDate"
|
||||
:maxDate="maxDate"
|
||||
type="year-month"
|
||||
:flag="true"
|
||||
></FieldDatePicter>
|
||||
<van-tabs v-model="active" sticky @change="tabChange">
|
||||
<van-tab title="待扣款" name="wait"></van-tab>
|
||||
<van-tab title="扣款成功" name="success"></van-tab>
|
||||
<van-tab title="扣款失败" name="fail"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
<div class="list-container fs12 pb10 pt10 pl20 pr20" v-for="(item, index) in searchList" :key="index" @click="goDetail(item)">
|
||||
<div class="flex justify-content-s">
|
||||
<div>
|
||||
<span>保单号:</span><span>{{ item.contNo }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>金额:</span><span class="green">{{ item.duePayMoney }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
投保人:<span>{{ item.applicant }}</span>
|
||||
</div>
|
||||
<div>
|
||||
被保人:<span>{{ item.insured }}</span>
|
||||
</div>
|
||||
<div>
|
||||
扣款日:<span>{{ item.duePayDate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="searchList.length == 0" class="list text-center">
|
||||
<img :src="src" />
|
||||
<div class="mt20">暂无续期保单</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="list text-center">
|
||||
<img :src="src" />
|
||||
<div class="mt20" v-if="errMessage != ''">{{ errMessage }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { Sticky, Tabs, Tab, Col, Row, Search, Field, Cell } from 'vant'
|
||||
import FieldDatePicter from '@/components/ebiz/FieldDatePicter'
|
||||
import { getList, getDetail } from '@/api/ebiz/renewalManage/renewalManage'
|
||||
import formatDate from '@/assets/js/utils/date-utils'
|
||||
|
||||
export default {
|
||||
name: 'renewalManageList',
|
||||
components: {
|
||||
[Field.name]: Field,
|
||||
[Tabs.name]: Tabs,
|
||||
[Tab.name]: Tab,
|
||||
[Col.name]: Col,
|
||||
[Row.name]: Row,
|
||||
[Search.name]: Search,
|
||||
[Sticky.name]: Sticky,
|
||||
[Cell.name]: Cell,
|
||||
[FieldDatePicter.name]: FieldDatePicter
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
payDate: formatDate.formatDate(new Date(), 'yyyy-MM'), //扣款日期
|
||||
searchVal: '', //搜索内容
|
||||
// list: [] //列表数据
|
||||
list: [
|
||||
// {
|
||||
// riskName: '重大疾病保险',
|
||||
// duePayMoney: '2888.00',
|
||||
// currentPeriod: '2',
|
||||
// contNo: '6200987623439788',
|
||||
// duePayDate: '2020-04-01',
|
||||
// applicant: '李四',
|
||||
// insured: '张三',
|
||||
// failReason: '扣款金额不足',
|
||||
// accountNo: '1233465768686',
|
||||
// deductionStatus: '1'
|
||||
// },
|
||||
// {
|
||||
// riskName: '重大疾病保险',
|
||||
// duePayMoney: '122888.00',
|
||||
// currentPeriod: '2',
|
||||
// contNo: '6200987623439759',
|
||||
// duePayDate: '2020-04-01',
|
||||
// applicant: '李四',
|
||||
// insured: '张三',
|
||||
// failReason: '扣款金额不足',
|
||||
// accountNo: '1233465768686',
|
||||
// deductionStatus: '0'
|
||||
// }
|
||||
],
|
||||
searchList: [], //搜索列表
|
||||
active: 'wait', //扣款类型 wait-待扣款 success-扣款成功 fail-扣款失败
|
||||
isShow: false, //无数据时显示
|
||||
maxDate: new Date(),
|
||||
errMessage: '', //错误提示
|
||||
src: this.$assetsUrl + 'images/background.png' //图片路径
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
mounted() {
|
||||
this.getpolicyList() //获取续期保单列表
|
||||
document.body.style.backgroundColor = '#fff'
|
||||
if (this.list.length > 0) {
|
||||
this.searchList = this.NewItems(this.active)
|
||||
}
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
document.body.style.backgroundColor = ''
|
||||
next()
|
||||
},
|
||||
methods: {
|
||||
//获取续期保单列表
|
||||
async getpolicyList() {
|
||||
let param = { deductionMonth: '2019-06' }
|
||||
// let param = { deductionMonth: this.payDate }
|
||||
getList(param).then(res => {
|
||||
this.$toast.clear()
|
||||
if (res.result == 0) {
|
||||
this.list = res.content
|
||||
this.searchList = this.NewItems(this.active)
|
||||
this.isShow = false
|
||||
} else {
|
||||
this.isShow = true
|
||||
this.errMessage = res.resultMessage || '暂无续期保单'
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//搜索
|
||||
search(val) {
|
||||
this.searchVal = val
|
||||
this.searchList = this.NewItems(this.active)
|
||||
},
|
||||
//选定日期
|
||||
onDateConfirm(val) {
|
||||
this.payDate = val
|
||||
this.getpolicyList()
|
||||
},
|
||||
//去保单详情页
|
||||
goDetail(val) {
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
// url: location.origin + `/#/renewalManage/detail`
|
||||
url: location.origin + `/#/renewalManage/detail?contNo=${val.contNo}`
|
||||
},
|
||||
routerInfo: {
|
||||
// path: `/renewalManage/detail`
|
||||
path: `/renewalManage/detail?contNo=${val.contNo}`
|
||||
}
|
||||
})
|
||||
},
|
||||
//切换扣款状态tab
|
||||
tabChange(name) {
|
||||
this.active = name
|
||||
this.searchList = this.NewItems(name)
|
||||
},
|
||||
//筛选排序list
|
||||
NewItems(name) {
|
||||
let _this = this
|
||||
let type = '' //扣款状态标识 0:待扣款;1:扣款成功;2:扣款失败
|
||||
switch (name) {
|
||||
case 'wait':
|
||||
type = '0'
|
||||
break
|
||||
case 'success':
|
||||
type = '1'
|
||||
break
|
||||
case 'fail':
|
||||
type = '2'
|
||||
}
|
||||
var NewItems = []
|
||||
this.list.renewallist.map(function(item) {
|
||||
if (item.contNo.search(_this.searchVal) != -1 || item.applicant.search(_this.searchVal) != -1) {
|
||||
if (item.deductionStatus === type) {
|
||||
NewItems.push(item)
|
||||
}
|
||||
}
|
||||
})
|
||||
return NewItems
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.renewal-manage {
|
||||
background: rgba(236, 249, 255, 1);
|
||||
img {
|
||||
width: 253px;
|
||||
height: 201px;
|
||||
}
|
||||
}
|
||||
/deep/ .van-field__label {
|
||||
width: 50%;
|
||||
}
|
||||
.list-container {
|
||||
border-bottom: 1px solid #ebedf0;
|
||||
border-top: 1px solid #ebedf0;
|
||||
.flex {
|
||||
div:first-child {
|
||||
width: 62%;
|
||||
}
|
||||
div:nth-child(2) {
|
||||
width: 32%;
|
||||
}
|
||||
div {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
div {
|
||||
margin: 3px 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
102
src/views/ebiz/renewalManage/MsgTemplate.vue
Normal file
102
src/views/ebiz/renewalManage/MsgTemplate.vue
Normal file
@@ -0,0 +1,102 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="msg-content">
|
||||
<div v-for="(item, index) in msgContentArr" :key="index" v-html="`${item}`"></div>
|
||||
</div>
|
||||
<div class="flex justify-content-s bottom-btn">
|
||||
<van-button class=" bottom0 left0" square type="danger" size="large" @click="sendMsg" v-no-more-click="1000">发送</van-button>
|
||||
<van-button class=" bottom0 left0" square plain type="danger" v-no-more-click="1000" @click="cancell" size="large">取消</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getMsg, sendMsg } from '@/api/ebiz/renewalManage/renewalManage'
|
||||
|
||||
export default {
|
||||
name: 'msgTemplate',
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
//短信内容,测试专用
|
||||
//msgContent:
|
||||
//'尊敬的客户:/n/t您好!感谢您选择国富人寿保险。我是国富人寿代理人xxx。您在我公司购买的xxxxxx保险进行了续期扣款,扣款失败!详细信息请电话咨询!/n/&保单尾号:xxxxxxxxx/n产品名称:xxxxxx', //短信模板内容
|
||||
msgContentArr: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
document.body.style.backgroundColor = '#fff'
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
document.body.style.backgroundColor = ''
|
||||
next()
|
||||
},
|
||||
mounted() {
|
||||
this.getMsg()
|
||||
},
|
||||
methods: {
|
||||
//获取短信模板
|
||||
getMsg() {
|
||||
let parmas = {}
|
||||
parmas = Object.assign({}, this.$store.getters.getRenewalMsgParam)
|
||||
delete parmas.applicant
|
||||
delete parmas.duePayDate
|
||||
delete parmas.currentPeriod
|
||||
delete parmas.receiveMobile
|
||||
getMsg(parmas).then(res => {
|
||||
if (res.result == '0') {
|
||||
this.msgContentArr = res.content.msg
|
||||
.replace(/\/n/g, '<br>')
|
||||
.replace(/\/t/g, ' ')
|
||||
.split('/&')
|
||||
} else this.$toast(res.resultMessage)
|
||||
})
|
||||
},
|
||||
// 发送短信
|
||||
sendMsg() {
|
||||
let parmas = {}
|
||||
parmas = Object.assign({}, this.$store.getters.getRenewalMsgParam)
|
||||
delete parmas.applicant
|
||||
delete parmas.duePayDate
|
||||
delete parmas.currentPeriod
|
||||
sendMsg(parmas).then(res => {
|
||||
if (res.result == '0') {
|
||||
this.$toast('发送成功')
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
},
|
||||
//取消发送
|
||||
cancell() {
|
||||
this.$jump({
|
||||
flag: 'goBack',
|
||||
extra: {
|
||||
index: '-1'
|
||||
},
|
||||
routerInfo: {
|
||||
path: `/renewalManage/detail`
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.msg-content {
|
||||
div {
|
||||
font-size: 16px;
|
||||
padding: 30px 20px 0;
|
||||
text-align: right;
|
||||
}
|
||||
div:first-child {
|
||||
text-align: left !important;
|
||||
}
|
||||
}
|
||||
.justify-content-s > div {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin: 20px 0;
|
||||
width: 50%;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user