Commit 3e92dc01 authored by linxin's avatar linxin

Merge branch 'liuin' into uat

parents 784d0e80 e2150d44
<template>
<h-view v-if="showFlag" id="add-person">
<h-header :proportion="[1,4,1]" class="bar-custom">
<span slot="center" style="color:#fff">添加担保人</span>
<span slot="right" style="color:#fff" @click="showFlag=false">取消</span>
<h-view id="add-person">
<h-header :proportion="[5,1,1]" class="bar-custom">
<div slot="left" class="h-header-btn">
<img src="@/assets/userBind/arrow.png" @click="$routeGo()">
<span>合同创建</span>
</div>
</h-header>
<div class="search has-header">
<input v-model="keyWord" placeholder="请输入担保人名称/证件号码" >
......@@ -26,12 +28,12 @@
</template>
<script>
export default {
props: {
bp_agent_id: {
type: String,
default: '',
},
},
// props: {
// bp_agent_id: {
// type: String,
// default: '',
// },
// },
data () {
return {
undertakeList: [], // 担保人列表
......@@ -39,10 +41,17 @@ export default {
pagenum: 1,
keyWord: '',
showFlag: false,
bp_agent_id: this.$route.params.bp_agent_id,
}
},
watch: {
},
beforeRouteEnter (to, from, next) {
next(vm => {
vm.init()
vm.getUndertake()
})
},
methods: {
show () {
......@@ -50,7 +59,7 @@ export default {
},
init () {
this.undertakeList = []
this.selectUdertake = []
this.selectUdertake = {}
this.pagenum = 1
this.keyWord = ''
},
......@@ -105,10 +114,17 @@ export default {
})
},
addUndertake (e) {
let vm = this
this.selectUdertake = e
this.$emit('addUnder', this.selectUdertake)
// this.$emit('addUnder', this.selectUdertake)
setTimeout(() => {
this.showFlag = false
vm.$router.replace({
name: 'CreateBaseInfo',
params: {
selectUdertake: vm.selectUdertake,
},
})
vm.$router.go(-1)
}, 100)
},
getUndertake () { // 担保人查询
......
......@@ -382,15 +382,15 @@
<tab-button class="before" @click.native="$routeGo()">上一步</tab-button>
<tab-button class="next" @click.native="save">下一步</tab-button>
</bottom-tab>
<AddUnderTake ref="addperson" :bp_agent_id="bp_agent_id" @addUnder="addUnder" />
<!-- <AddUnderTake ref="addperson" :bp_agent_id="bp_agent_id" @addUnder="addUnder" /> -->
</h-view>
</template>
<script>
import AddUnderTake from '../../pages/contractCreate/add-undertake'
// import AddUnderTake from '../../pages/contractCreate/add-undertake'
export default {
components: {
AddUnderTake,
},
// components: {
// AddUnderTake,
// },
data () {
return {
salesEnter: '', // 页面进入标识,该字段作用:第一次创建时即从销售页面进入进本信息、租赁信息、附件信息。用于判断后面页面录入数据后未保存则点击上一步,再次进入该页面数据丢失问题
......@@ -585,6 +585,10 @@ export default {
vm.getSaveInfo()
vm.getBaseInfo()
}, 0)
} else if (from.name === 'Addundertake') {
if (vm.$route.params.selectUdertake) {
vm.addUnder(vm.$route.params.selectUdertake)
}
}
})
},
......@@ -664,17 +668,25 @@ export default {
}
},
addPerson () {
this.$refs.addperson.init()
this.$refs.addperson.getUndertake()
this.$refs.addperson.show()
// this.$refs.addperson.init()
// this.$refs.addperson.getUndertake()
// this.$refs.addperson.show()
this.$router.push({
name: 'Addundertake',
params: {
bp_agent_id: this.bp_agent_id,
},
})
},
makeData () {
let obj = {}
if (this.selectUdertake.length > 0) {
this.selectUdertake.forEach((i, index, arr) => {
obj[`bp_id_guta_${index + 1}`] = i.bp_guta_id
})
return obj
}
},
getAgentInfo () {
let vm = this
......
......@@ -399,12 +399,12 @@
<div v-if="!laImg" @click="LaUpload()">
<img src="@/assets/userBind/camera.png">
</div>
<div v-if="laImg && !isApproved" class="licenseBox" @click="LaUpload('')">
<div v-if="laImg" class="licenseBox" @click="LaUpload()">
<img :src="laImg" style="width: 100%;height: 100%;margin: 0">
</div>
<div v-if="isApproved" class="licenseBox"><!--v-if="licenseImg && isApproved"-->
<!-- <div v-if="isApproved" class="licenseBox">
<img v-if="laImg" :src="laImg" style="width: 100%;height: 100%;margin: 0" @click="showBigPicture(laImg)">
</div>
</div> -->
</div>
</div>
<!--
......
......@@ -126,6 +126,7 @@ import CreateBaseInfo from '@/pages/contractCreate/create-base-info'
import CreateRentInfo from '@/pages/contractCreate/creat-rent-info'
import CreateEnclosureInfo from '@/pages/contractCreate/create-enclosure-info'
import previewPdf from '@/pages/contractSigning/previewPdf'
import Addundertake from '@/pages/contractCreate/add-undertake'
import About from '@/pages/myInfo/About'
import UserAgree from '@/pages/myInfo/UserAgreement'
......@@ -302,6 +303,8 @@ export default new Router({
{path: '/create-rent-info', component: CreateRentInfo, name: 'CreateRentInfo', meta: {keepAlive: true}},
{path: '/create-enclosure-info', component: CreateEnclosureInfo, name: 'CreateEnclosureInfo', meta: {keepAlive: true}},
{path: '/previewPdf', component: previewPdf, name: 'previewPdf', meta: {keepAlive: false}},
{path: '/add-undertake', component: Addundertake, name: 'Addundertake', meta: {keepAlive: false}},
// 我的发票
{path: '/invoice', component: MyInvoice, name: 'MyInvoice', meta: {keepAlive: false}},
{
......
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