mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-20 01:26:43 +08:00
Merge branch 'nbs' into dev
This commit is contained in:
@@ -57,3 +57,11 @@ export function nbsTable(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function makePDF(data) {
|
||||||
|
return request({
|
||||||
|
url: getUrl('/proposal/nbs/getPdfInfo', 1),
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -7,6 +7,7 @@ let nbsBase = () => import('@/views/ebiz/nbs/Base')
|
|||||||
let nbsNecessary = () => import('@/views/ebiz/nbs/Necessary')
|
let nbsNecessary = () => import('@/views/ebiz/nbs/Necessary')
|
||||||
let nbsPrepared = () => import('@/views/ebiz/nbs/Prepared')
|
let nbsPrepared = () => import('@/views/ebiz/nbs/Prepared')
|
||||||
let nbsDetail = () => import('@/views/ebiz/nbs/Detail')
|
let nbsDetail = () => import('@/views/ebiz/nbs/Detail')
|
||||||
|
let nbsPDF = () => import('@/views/ebiz/nbs/PDF')
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
path: '/nbs/list',
|
path: '/nbs/list',
|
||||||
@@ -36,7 +37,7 @@ export default [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/nbs/result/:id',
|
path: '/nbs/result/:id/:half/:nbsState',
|
||||||
name: 'nbsResult',
|
name: 'nbsResult',
|
||||||
component: nbsResult,
|
component: nbsResult,
|
||||||
meta: {
|
meta: {
|
||||||
@@ -88,5 +89,14 @@ export default [
|
|||||||
title: '资料',
|
title: '资料',
|
||||||
index: 9
|
index: 9
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/nbs/pdf/:id',
|
||||||
|
name: 'nbsPDF',
|
||||||
|
component: nbsPDF,
|
||||||
|
meta: {
|
||||||
|
title: 'PDF',
|
||||||
|
index: 10
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
>销售成功</van-button
|
>销售成功</van-button
|
||||||
>
|
>
|
||||||
<van-button class="ml5" type="danger" size="small" round @click="entryDetail(item.orderNo)">资料</van-button>
|
<van-button class="ml5" type="danger" size="small" round @click="entryDetail(item.orderNo)">资料</van-button>
|
||||||
<van-button class="ml5" type="danger" size="small" round @click="entryReport(item.orderNo)">报告</van-button>
|
<van-button class="ml5" type="danger" size="small" round @click="entryReport(item.orderNo, item.flag)">报告</van-button>
|
||||||
<van-button class="ml5" type="danger" size="small" round plain @click="del(item.orderNo, index)">删除</van-button>
|
<van-button class="ml5" type="danger" size="small" round plain @click="del(item.orderNo, index)">删除</van-button>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
@@ -159,14 +159,15 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
entryReport(id) {
|
entryReport(id, flag) {
|
||||||
|
const state = this.params.nbsState
|
||||||
this.$jump({
|
this.$jump({
|
||||||
flag: 'h5',
|
flag: 'h5',
|
||||||
extra: {
|
extra: {
|
||||||
url: location.origin + `/#/nbs/result/${id}`
|
url: location.origin + `/#/nbs/result/${id}/${flag}/${state}`
|
||||||
},
|
},
|
||||||
routerInfo: {
|
routerInfo: {
|
||||||
path: `/nbs/result/${id}`
|
path: `/nbs/result/${id}/${flag}/${state}`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,8 @@ import { nbsDetail, saveForm } from '@/api/ebiz/nbs'
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
status: -1 //-1还未填写 0填完基本信息 1填完应备费用 2填完已备费用
|
status: -1, //-1还未填写 0填完基本信息 1填完应备费用 2填完已备费用
|
||||||
|
half: null //这个值表示是否添加了配偶
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -44,7 +45,9 @@ export default {
|
|||||||
nbsState: localStorage.getItem('nbsState')
|
nbsState: localStorage.getItem('nbsState')
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.result === '0') {
|
if (res.result === '0') {
|
||||||
this.status = Number(res.content.type)
|
const content = res.content
|
||||||
|
this.status = Number(content.type)
|
||||||
|
this.half = content.flag
|
||||||
} else {
|
} else {
|
||||||
this.$toast(res.resultMessage)
|
this.$toast(res.resultMessage)
|
||||||
this.$jump({
|
this.$jump({
|
||||||
@@ -96,10 +99,10 @@ export default {
|
|||||||
this.$jump({
|
this.$jump({
|
||||||
flag: 'h5',
|
flag: 'h5',
|
||||||
extra: {
|
extra: {
|
||||||
url: location.origin + `/#/nbs/result/${id}`
|
url: location.origin + `/#/nbs/result/${id}/${this.half}/02`
|
||||||
},
|
},
|
||||||
routerInfo: {
|
routerInfo: {
|
||||||
path: `/nbs/result/${id}`
|
path: `/nbs/result/${id}/${this.half}/02`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
17
src/views/ebiz/nbs/PDF.vue
Normal file
17
src/views/ebiz/nbs/PDF.vue
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<template>
|
||||||
|
<iframe style="width:100vw;height:100vh" :src="pdfUrl"></iframe>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import config from '@/config'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pdfUrl: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
const pdfUrl = encodeURIComponent(config.imgDomain + '/returnDirectStream?imgPath=' + this.$route.params.id)
|
||||||
|
this.pdfUrl = location.origin + '/pdfjs/web/viewer.html?file=' + pdfUrl
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -5,11 +5,46 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="mt50 fs18 text-center">报告已生成,点击查看</div>
|
<div class="mt50 fs18 text-center">报告已生成,点击查看</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="result-button">经济支柱为客户本人</div>
|
<div class="result-button" @click="makePDF('00')">经济支柱为客户本人</div>
|
||||||
<div class="result-button">经济支柱为客户配偶</div>
|
<div class="result-button" :class="{'result-button-disabled': !isHalfActive}" @click="isHalfActive && makePDF('01')">经济支柱为客户配偶</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
<script>
|
||||||
|
import { makePDF } from '@/api/ebiz/nbs'
|
||||||
|
export default {
|
||||||
|
created () {
|
||||||
|
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isHalfActive: this.$route.params.half === '0'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
makePDF(type) {
|
||||||
|
makePDF({
|
||||||
|
nbsState: this.$route.params.nbsState,
|
||||||
|
orderNo: this.$route.params.id,
|
||||||
|
nbsCalculusResDTO: {
|
||||||
|
type
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
let content = res.content
|
||||||
|
this.$jump({
|
||||||
|
flag: 'h5',
|
||||||
|
extra: {
|
||||||
|
url: location.origin + `/#/nbs/pdf/${content}`
|
||||||
|
},
|
||||||
|
routerInfo: {
|
||||||
|
path: `/nbs/pdf/${content}`
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.success-icon {
|
.success-icon {
|
||||||
font-size: 100px;
|
font-size: 100px;
|
||||||
@@ -28,5 +63,9 @@
|
|||||||
&:first-child {
|
&:first-child {
|
||||||
margin-top: 200px;
|
margin-top: 200px;
|
||||||
}
|
}
|
||||||
|
&-disabled {
|
||||||
|
color: #666;
|
||||||
|
border-color: #666;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user