Commit 453306f3 authored by linxin's avatar linxin

add

parent 9baa1b7f
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
</h-header> </h-header>
<h-content> <h-content>
<list-item :item-height="45"> <list-item :item-height="45">
<item :show-arrow="true" @click.native="changePageHead">
<div slot="name">头像</div>
</item>
<item :show-arrow="true" @click.native="updateVersion"> <item :show-arrow="true" @click.native="updateVersion">
<div slot="name">检查更新</div> <div slot="name">检查更新</div>
</item> </item>
...@@ -22,7 +25,16 @@ ...@@ -22,7 +25,16 @@
<script> <script>
export default { export default {
data () { data () {
return {} return {
user_bp_status: '',
user_bp_class: '',
bp_id: '',
}
},
beforeRouteEnter (to, from, next) {
next(vm => {
vm.userQuery()
})
}, },
activated () { activated () {
...@@ -59,6 +71,62 @@ export default { ...@@ -59,6 +71,62 @@ export default {
}, },
}) })
}, },
changePageHead () {
let vm = this
if (vm.bp_id) {
if (vm.user_bp_status === 'NEW' || vm.user_bp_status === 'REJECT') {
if (vm.user_bp_class === 'NP') {
vm.$router.push({
name: 'NaturePerson',
params: {
'bp_id': this.bp_id,
},
})
} else {
this.$router.push({
name: ' Enterprise',
params: {
'bp_id': this.bp_id,
},
})
}
} else if (vm.user_bp_status === 'APPROVED') {
if (vm.user_bp_class === 'NP') {
vm.$router.push({
name: 'NaturePersonReadOnly',
params: {
'bp_id': this.bp_id,
},
})
} else {
this.$router.push({
name: 'EnterpriseReadOnly',
params: {
'bp_id': this.bp_id,
},
})
}
} else if (vm.user_bp_status === 'APPROVING') {
this.hlsPopup.showLongCenter('您的绑定申请还在流程中')
}
} else {
this.hlsPopup.showLongCenter('请先进行用户绑定')
}
},
userQuery () {
let vm = this
let url = $config.basePath + 'user_query'
let param = {
'phone': window.localStorage.getItem('user_phone'),
}
vm.$post(url, param).then(function (res) {
if (res.result === 'S') {
vm.user_bp_status = res.info.user_bp_status
vm.user_bp_class = res.info.user_bp_class
vm.bp_id = res.info.user_bp_id
}
})
},
}, },
} }
</script> </script>
......
...@@ -213,7 +213,6 @@ export default { ...@@ -213,7 +213,6 @@ export default {
isSave: false, isSave: false,
tabNum: 0, tabNum: 0,
upload_list: [], upload_list: [],
bp_type_n: '',
typeList: [], typeList: [],
backList: [], backList: [],
bankList: [], bankList: [],
...@@ -229,6 +228,7 @@ export default { ...@@ -229,6 +228,7 @@ export default {
img_url: {}, img_url: {},
baseInfo: { baseInfo: {
bp_type: '', bp_type: '',
bp_type_n: '',
marital_status_n: '', marital_status_n: '',
bp_class: this.$route.params.bp_class, bp_class: this.$route.params.bp_class,
bp_name: '', bp_name: '',
......
...@@ -149,11 +149,11 @@ ...@@ -149,11 +149,11 @@
<list-item v-if="flag " :item-height="44" class="second-part"> <list-item v-if="flag " :item-height="44" class="second-part">
<item> <item>
<div slot="name" class="font-color">姓名</div> <div slot="name" class="font-color">姓名</div>
<input slot="content" v-model="legal_personMsg.id_card_name" placeholder="上传身份证自动填充" class="auto"> <input slot="content" v-model="legal_personMsg.legal_person" placeholder="上传身份证自动填充" class="auto">
</item> </item>
<item> <item>
<div slot="name" class="font-color">身份证号</div> <div slot="name" class="font-color">身份证号</div>
<input slot="content" v-model="legal_personMsg.id_card_no" placeholder="上传身份证自动填充" class="auto"> <input slot="content" v-model="baseInfo.id_card_no" placeholder="上传身份证自动填充" class="auto">
</item> </item>
<item> <item>
<div slot="name" class="font-color required">手机号</div> <div slot="name" class="font-color required">手机号</div>
...@@ -299,7 +299,7 @@ export default { ...@@ -299,7 +299,7 @@ export default {
type: '请输入业务经办姓名', type: '请输入业务经办姓名',
legal_personMsg: { legal_personMsg: {
id_card_no: null, id_card_no: null,
id_card_name: '', legal_person: '',
cell_phone: null, cell_phone: null,
living_address: '', living_address: '',
}, },
...@@ -1011,16 +1011,16 @@ export default { ...@@ -1011,16 +1011,16 @@ export default {
} }
} }
.put1 { .put {
width: 100%; width: 175px;
height: 45px; height: 45px;
color: #fff; color: #00469c;
border-radius: 4px; border-radius: 4px;
// border: 1px solid #00469c; border: 1px solid #00469c;
background-color: #00469c; background-color: #fafafa;
} }
.save1 { .save {
width: 175px; width: 175px;
height: 45px; height: 45px;
color: #fff; color: #fff;
......
...@@ -96,6 +96,7 @@ export default { ...@@ -96,6 +96,7 @@ export default {
'tabNum' (newVal, oulVal) { 'tabNum' (newVal, oulVal) {
if (newVal === 2) { if (newVal === 2) {
Object.assign(this.invoiceInfo, this.baseInfo) Object.assign(this.invoiceInfo, this.baseInfo)
this.invoice_kind_n = ''
if (this.invoiceInfo.invoice_kind == 0) { if (this.invoiceInfo.invoice_kind == 0) {
this.invoice_kind_n = '增值税专用发票' this.invoice_kind_n = '增值税专用发票'
} else if (this.invoiceInfo.invoice_kind == 2) { } else if (this.invoiceInfo.invoice_kind == 2) {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div slot="name">纳税人类型</div> <div slot="name">纳税人类型</div>
<input <input
slot="content" slot="content"
v-model="taxpayer_type_n" v-model="invoiceInfo.taxpayer_type_n"
type="text" type="text"
readonly readonly
placeholder="请选择" placeholder="请选择"
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<div slot="name">发票类型</div> <div slot="name">发票类型</div>
<input <input
slot="content" slot="content"
v-model="invoice_kind_n" v-model="invoiceInfo.invoice_kind_n"
type="text" type="text"
readonly readonly
placeholder="请选择" placeholder="请选择"
...@@ -45,13 +45,23 @@ ...@@ -45,13 +45,23 @@
</template> </template>
<script> <script>
export default { export default {
props: {
'baseInfo': {
type: Object,
default: {},
},
'tabNum': {
type: Number,
default: 0,
},
},
data () { data () {
return { return {
taxpayer_type_n: '',
invoice_kind_n: '',
invoicList: [], invoicList: [],
taxpayerList: [], taxpayerList: [],
invoiceInfo: { invoiceInfo: {
taxpayer_type_n: '',
invoice_kind_n: '',
taxpayer_type: '', taxpayer_type: '',
invoice_kind: '', invoice_kind: '',
invoice_title: '', invoice_title: '',
...@@ -60,6 +70,13 @@ export default { ...@@ -60,6 +70,13 @@ export default {
}, },
} }
}, },
watch: {
tabNum (newVal, oldVal) {
if (newVal === 2) {
Object.assign(this.invoiceInfo, this.baseInfo)
}
},
},
created () { created () {
this.getInvoiceType() this.getInvoiceType()
this.getTaxpayer() this.getTaxpayer()
...@@ -110,7 +127,7 @@ export default { ...@@ -110,7 +127,7 @@ export default {
object: {}, object: {},
returnItem: function (index, obj) { returnItem: function (index, obj) {
vm.invoiceInfo.invoice_kind = obj.bp_type vm.invoiceInfo.invoice_kind = obj.bp_type
vm.invoice_kind_n = obj.bp_type_n vm.invoiceInfo.invoice_kind_n = obj.bp_type_n
}, },
}) })
}, },
...@@ -122,7 +139,7 @@ export default { ...@@ -122,7 +139,7 @@ export default {
object: {}, object: {},
returnItem: function (index, obj) { returnItem: function (index, obj) {
vm.invoiceInfo.taxpayer_type = obj.bp_type vm.invoiceInfo.taxpayer_type = obj.bp_type
vm.taxpayer_type_n = obj.bp_type_n vm.invoiceInfo.taxpayer_type_n = obj.bp_type_n
}, },
}) })
}, },
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<div slot="name" class="required">客户类型</div> <div slot="name" class="required">客户类型</div>
<input <input
slot="content" slot="content"
v-model="bp_type_n" v-model="baseInfo.bp_type_n"
placeholder="请选择" placeholder="请选择"
type="text" type="text"
readonly readonly
...@@ -29,11 +29,11 @@ ...@@ -29,11 +29,11 @@
@click="selectIdType()" @click="selectIdType()"
> >
</item> </item>
<item v-if="isSelected&&isPaople"> <item v-if="(isPaople&&from)||(isPaople&&isSelected)">
<div slot="name" class="required">业务经办人</div> <div slot="name" class="required">业务经办人</div>
<input slot="content" v-model="baseInfo.agent_username" placeholder="请输入业务经办员工代码" > <input slot="content" v-model="baseInfo.agent_username" placeholder="请输入业务经办员工代码" >
</item> </item>
<item v-if="isSelected&&!isPaople"> <item v-if="(!isPaople&&from)||(!isPaople&&isSelected)">
<div slot="name" class="required">营业执照</div> <div slot="name" class="required">营业执照</div>
<input slot="content" v-model="baseInfo.business_license_num" placeholder="请输入营业执照号" > <input slot="content" v-model="baseInfo.business_license_num" placeholder="请输入营业执照号" >
</item> </item>
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
<div slot="name" class="required">学历</div> <div slot="name" class="required">学历</div>
<input <input
slot="content" slot="content"
v-model="academic_bg_n" v-model="baseInfo.academic_background_n"
placeholder="请选择学历" placeholder="请选择学历"
readonly readonly
onfocus="this.blur()" onfocus="this.blur()"
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
<div slot="name" class="required">婚姻状况</div> <div slot="name" class="required">婚姻状况</div>
<input <input
slot="content" slot="content"
v-model="marital_status_n" v-model="baseInfo.marital_status_n"
placeholder="请选择" placeholder="请选择"
readonly readonly
onfocus="this.blur()" onfocus="this.blur()"
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
</div> </div>
</div> </div>
<BankInfo v-show="tabNum==1" :getBankList="getBankList" @getInfo="getInfo" /> <BankInfo v-show="tabNum==1" :getBankList="getBankList" @getInfo="getInfo" />
<InvoiceInfo v-show="tabNum==2" @getinvoiceList="getinvoiceList" /> <InvoiceInfo v-show="tabNum==2" :baseInfo="baseInfo" :tabNum="tabNum" @getinvoiceList="getinvoiceList" />
</h-content> </h-content>
<bottom-tab class="footer-button"> <bottom-tab class="footer-button">
<tab-button class="put" @click.native="putData">提交</tab-button> <tab-button class="put" @click.native="putData">提交</tab-button>
...@@ -213,10 +213,8 @@ export default { ...@@ -213,10 +213,8 @@ export default {
isSave: false, isSave: false,
isSelected: false, isSelected: false,
tabNum: 0, tabNum: 0,
from: false,
upload_list: [], upload_list: [],
bp_type_n: '',
academic_bg_n: '',
marital_status_n: '',
typeList: [], typeList: [],
backList: [], backList: [],
bankList: [], bankList: [],
...@@ -231,6 +229,9 @@ export default { ...@@ -231,6 +229,9 @@ export default {
}, },
img_url: {}, img_url: {},
baseInfo: { baseInfo: {
bp_type_n: '',
academic_background_n: '',
marital_status_n: '',
bp_type: '', bp_type: '',
bp_class: this.$route.params.bp_class, bp_class: this.$route.params.bp_class,
bp_name: '', bp_name: '',
...@@ -254,11 +255,13 @@ export default { ...@@ -254,11 +255,13 @@ export default {
} }
}, },
watch: { watch: {
bp_type_n () { 'baseInfo.bp_type_n' (newVal, oldVal) {
let vm = this let vm = this
if (vm.baseInfo.bp_type === 'TENANT' || vm.baseInfo.bp_type === 'GUTA') { if (vm.baseInfo.bp_type === 'TENANT' || vm.baseInfo.bp_type === 'GUTA') {
vm.isPaople = true vm.isPaople = true
vm.isEnter = false vm.isEnter = false
// baseInfo.agent_username
// baseInfo.business_license_num
} else if ( } else if (
vm.baseInfo.bp_type === 'AGENT' || vm.baseInfo.bp_type === 'AGENT' ||
vm.baseInfo.bp_type === 'OFFICE' || vm.baseInfo.bp_type === 'OFFICE' ||
...@@ -270,14 +273,13 @@ export default { ...@@ -270,14 +273,13 @@ export default {
}, },
tabNum: function (newVal, oldVal) { tabNum: function (newVal, oldVal) {
if ( if (
(newVal === 1 && !this.isSave) (newVal === 1 && !this.isSave) && !this.from
// ||(newVal === 2 && !this.isSave)
) { ) {
this.hlsPopup.showError('请先保存基本信息') this.hlsPopup.showError('请先保存基本信息')
this.tabNum = oldVal this.tabNum = oldVal
} }
}, },
marital_status_n: function (newVal, oldVal) { 'baseInfo.marital_status_n': function (newVal, oldVal) {
if (newVal === '已婚') { if (newVal === '已婚') {
this.hasSP = true this.hasSP = true
} else { } else {
...@@ -295,10 +297,35 @@ export default { ...@@ -295,10 +297,35 @@ export default {
this.getMarital() this.getMarital()
this.getBankInfo() this.getBankInfo()
}, },
beforeRouteEnter (to, from, next) {
if (from.fullPath === '/tab/my-info') {
next(vm => {
vm.basicInfoQuery()
vm.from = true
})
}
next()
},
updated () { updated () {
this.getinvoiceList() this.getinvoiceList()
}, },
methods: { methods: {
basicInfoQuery () {
let vm = this
let url = process.env.basePath + 'bp_np_info_query'
let param = {
bp_id: vm.$route.params.bp_id,
}
hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
Object.assign(vm.baseInfo, res.info)
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
async verified () { async verified () {
let bpId = await this.saveWord() let bpId = await this.saveWord()
this.getBankInfo() this.getBankInfo()
...@@ -559,7 +586,7 @@ export default { ...@@ -559,7 +586,7 @@ export default {
object: {}, object: {},
returnItem: function (index, obj) { returnItem: function (index, obj) {
vm.baseInfo.bp_type = obj.bp_type vm.baseInfo.bp_type = obj.bp_type
vm.bp_type_n = obj.bp_type_n vm.baseInfo.bp_type_n = obj.bp_type_n
vm.isSelected = true vm.isSelected = true
}, },
}) })
...@@ -592,7 +619,7 @@ export default { ...@@ -592,7 +619,7 @@ export default {
object: {}, object: {},
returnItem: function (index, obj) { returnItem: function (index, obj) {
vm.baseInfo.academic_background = obj.bp_type vm.baseInfo.academic_background = obj.bp_type
vm.academic_bg_n = obj.bp_type_n vm.baseInfo.academic_background_n = obj.bp_type_n
}, },
}) })
}, },
...@@ -604,7 +631,7 @@ export default { ...@@ -604,7 +631,7 @@ export default {
object: {}, object: {},
returnItem: function (index, obj) { returnItem: function (index, obj) {
vm.baseInfo.marital_status = obj.bp_type vm.baseInfo.marital_status = obj.bp_type
vm.marital_status_n = obj.bp_type_n vm.baseInfo.marital_status_n = obj.bp_type_n
}, },
}) })
}, },
......
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
<list-item v-if="flag" :item-height="44" class="second-part"> <list-item v-if="flag" :item-height="44" class="second-part">
<item> <item>
<div slot="name" class="font-color">姓名</div> <div slot="name" class="font-color">姓名</div>
<input slot="content" v-model="legal_personMsg.id_card_name" placeholder="上传身份证自动填充" class="auto"> <input slot="content" v-model="legal_personMsg.legal_person" placeholder="上传身份证自动填充" class="auto">
</item> </item>
<item> <item>
<div slot="name" class="font-color">身份证号</div> <div slot="name" class="font-color">身份证号</div>
...@@ -298,7 +298,7 @@ export default { ...@@ -298,7 +298,7 @@ export default {
type: '请输入业务经办姓名', type: '请输入业务经办姓名',
legal_personMsg: { legal_personMsg: {
id_card_no: null, id_card_no: null,
id_card_name: '', legal_person: '',
cell_phone: null, cell_phone: null,
living_address: '', living_address: '',
}, },
......
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