Commit 6370ba7f authored by linxin's avatar linxin

add

parent 453306f3
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
<div slot="name">退出登录</div> <div slot="name">退出登录</div>
</item> </item>
</list-item> </list-item>
<button v-if="flag" @click="changePageHead">用户绑定</button>
<button v-if="!flag">解除绑定</button>
</h-content> </h-content>
</section> </section>
</template> </template>
...@@ -26,6 +28,7 @@ ...@@ -26,6 +28,7 @@
export default { export default {
data () { data () {
return { return {
flag: true,
user_bp_status: '', user_bp_status: '',
user_bp_class: '', user_bp_class: '',
bp_id: '', bp_id: '',
...@@ -75,6 +78,7 @@ export default { ...@@ -75,6 +78,7 @@ export default {
let vm = this let vm = this
if (vm.bp_id) { if (vm.bp_id) {
if (vm.user_bp_status === 'NEW' || vm.user_bp_status === 'REJECT') { if (vm.user_bp_status === 'NEW' || vm.user_bp_status === 'REJECT') {
vm.flag = true
if (vm.user_bp_class === 'NP') { if (vm.user_bp_class === 'NP') {
vm.$router.push({ vm.$router.push({
name: 'NaturePerson', name: 'NaturePerson',
...@@ -84,32 +88,37 @@ export default { ...@@ -84,32 +88,37 @@ export default {
}) })
} else { } else {
this.$router.push({ this.$router.push({
name: ' Enterprise', name: 'Enterprise',
params: { params: {
'bp_id': this.bp_id, 'bp_id': this.bp_id,
}, },
}) })
} }
} else if (vm.user_bp_status === 'APPROVED') { } else if (vm.user_bp_status === 'APPROVED') {
vm.flag = false
if (vm.user_bp_class === 'NP') { if (vm.user_bp_class === 'NP') {
vm.$router.push({ vm.$router.push({
name: 'NaturePersonReadOnly', name: 'NaturePerson',
params: { params: {
'bp_id': this.bp_id, 'bp_id': this.bp_id,
'status': 'APPROVED',
}, },
}) })
} else { } else {
this.$router.push({ this.$router.push({
name: 'EnterpriseReadOnly', name: 'Enterprise',
params: { params: {
'bp_id': this.bp_id, 'bp_id': this.bp_id,
'status': 'APPROVED',
}, },
}) })
} }
} else if (vm.user_bp_status === 'APPROVING') { } else if (vm.user_bp_status === 'APPROVING') {
vm.flag = true
this.hlsPopup.showLongCenter('您的绑定申请还在流程中') this.hlsPopup.showLongCenter('您的绑定申请还在流程中')
} }
} else { } else {
vm.flag = true
this.hlsPopup.showLongCenter('请先进行用户绑定') this.hlsPopup.showLongCenter('请先进行用户绑定')
} }
}, },
...@@ -131,6 +140,13 @@ export default { ...@@ -131,6 +140,13 @@ export default {
} }
</script> </script>
<style lang="less" type="text/less"> <style lang="less" scoped>
button{
margin-top:50px;
margin-left:100px;
width: 150px;
height: 50px;
color: #fff;
background-color: navy;
}
</style> </style>
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
> >
</item> </item>
<item :showArrow="true"> <item :showArrow="true">
<div slot="name">发票类型</div> <div slot="name">发票类型</div>
<input <input
slot="content" slot="content"
......
...@@ -55,12 +55,15 @@ ...@@ -55,12 +55,15 @@
<list-item :item-height="44" class="second-part"> <list-item :item-height="44" class="second-part">
<item> <item>
<div slot="name" class="required">姓名</div> <div slot="name" class="required">姓名</div>
<input slot="content" v-model="baseInfo.bp_name" placeholder="上传身份证自动填充" class="auto" > <input
slot="content" :readonly="isApproved" v-model="baseInfo.bp_name" placeholder="上传身份证自动填充"
class="auto" >
</item> </item>
<item> <item>
<div slot="name" class="required">身份证号码</div> <div slot="name" class="required">身份证号码</div>
<input <input
slot="content" slot="content"
:readonly="isApproved"
v-model="baseInfo.id_card_no" v-model="baseInfo.id_card_no"
placeholder="上传身份证自动填充" placeholder="上传身份证自动填充"
class="auto" class="auto"
...@@ -210,6 +213,7 @@ export default { ...@@ -210,6 +213,7 @@ export default {
isPaople: false, isPaople: false,
isEnter: false, isEnter: false,
showModalValue: false, showModalValue: false,
isApproved: false,
isSave: false, isSave: false,
isSelected: false, isSelected: false,
tabNum: 0, tabNum: 0,
...@@ -296,6 +300,9 @@ export default { ...@@ -296,6 +300,9 @@ export default {
this.getEducationBackground() this.getEducationBackground()
this.getMarital() this.getMarital()
this.getBankInfo() this.getBankInfo()
if (this.$route.params.status === 'APPROVED') {
this.isApproved = true
}
}, },
beforeRouteEnter (to, from, next) { beforeRouteEnter (to, from, next) {
if (from.fullPath === '/tab/my-info') { if (from.fullPath === '/tab/my-info') {
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<div slot="name" class="font-color required">客户类型</div> <div slot="name" class="font-color 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
...@@ -49,12 +49,15 @@ ...@@ -49,12 +49,15 @@
<list-item :item-height="44" class="second-part"> <list-item :item-height="44" class="second-part">
<item> <item>
<div slot="name" class="font-color required">公司名称</div> <div slot="name" class="font-color required">公司名称</div>
<input slot="content" v-model="baseInfo.bp_name" placeholder="上传营业执照自动填充" class="auto"> <input
slot="content" :readonly="isApproved" v-model="baseInfo.bp_name" placeholder="上传营业执照自动填充"
class="auto">
</item> </item>
<item> <item>
<div slot="name" class="font-color required">企业类型</div> <div slot="name" class="font-color required">企业类型</div>
<input <input
slot="content" slot="content"
:readonly="isApproved"
v-model="baseInfo.enterprise_type" v-model="baseInfo.enterprise_type"
placeholder="上传营业执照自动填充" placeholder="上传营业执照自动填充"
class="auto" class="auto"
...@@ -67,12 +70,15 @@ ...@@ -67,12 +70,15 @@
<item> <item>
<div slot="name" class="font-color">注册资本</div> <div slot="name" class="font-color">注册资本</div>
<input <input
slot="content" v-model="baseInfo.registered_capital" type="number" placeholder="上传营业执照自动填充" slot="content" :readonly="isApproved" v-model="baseInfo.registered_capital" type="number"
placeholder="上传营业执照自动填充"
class="auto"> 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="baseInfo.legal_person" placeholder="上传营业执照自动填充" class="auto"> <input
slot="content" :readonly="isApproved" v-model="baseInfo.legal_person" placeholder="上传营业执照自动填充"
class="auto">
</item> </item>
<item> <item>
<div slot="name" class="font-color required">注册地址</div> <div slot="name" class="font-color required">注册地址</div>
...@@ -119,6 +125,7 @@ ...@@ -119,6 +125,7 @@
<div slot="name" class="font-color required">姓名</div> <div slot="name" class="font-color required">姓名</div>
<input <input
slot="content" slot="content"
:readonly="isApproved"
v-model="authMsg.auth_person_name" v-model="authMsg.auth_person_name"
placeholder="上传身份证自动填充" placeholder="上传身份证自动填充"
class="auto" class="auto"
...@@ -128,6 +135,7 @@ ...@@ -128,6 +135,7 @@
<div slot="name" class="font-color required">身份证号</div> <div slot="name" class="font-color required">身份证号</div>
<input <input
slot="content" slot="content"
:readonly="isApproved"
v-model="authMsg.auth_person_id_card" v-model="authMsg.auth_person_id_card"
placeholder="上传身份证自动填充" placeholder="上传身份证自动填充"
class="auto" class="auto"
...@@ -148,11 +156,15 @@ ...@@ -148,11 +156,15 @@
<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.legal_person" placeholder="上传身份证自动填充" class="auto"> <input
slot="content" :readonly="isApproved" 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" :readonly="isApproved" v-model="legal_personMsg.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>
...@@ -202,7 +214,9 @@ ...@@ -202,7 +214,9 @@
</div> </div>
<!-- <BankInfo v-show="tabNum==1" :bp_id="bp_id" @getInfo="getInfo" /> --> <!-- <BankInfo v-show="tabNum==1" :bp_id="bp_id" @getInfo="getInfo" /> -->
<BankInfo v-show="tabNum==1" :getBankList="getBankList" @getInfo="getInfo"/> <BankInfo v-show="tabNum==1" :getBankList="getBankList" @getInfo="getInfo"/>
<InvoiceInfo v-show="tabNum==2" :orgCode="baseInfo.organization_code" @getinvoiceList="getinvoiceList"/> <InvoiceInfo
v-show="tabNum==2" :tabNum="tabNum" :baseInfo="baseInfo" :orgCode="baseInfo.organization_code"
@getinvoiceList="getinvoiceList"/>
</h-content> </h-content>
<bottom-tab class="footer-button"> <bottom-tab class="footer-button">
<tab-button class="put" @click.native="handSubmit">提交</tab-button> <tab-button class="put" @click.native="handSubmit">提交</tab-button>
...@@ -277,12 +291,13 @@ export default { ...@@ -277,12 +291,13 @@ export default {
bp_id: '', bp_id: '',
flag: true, flag: true,
bpClass: '', bpClass: '',
from: false,
isApproved: false,
img_url: {}, img_url: {},
typeList: [], typeList: [],
backList: [], backList: [],
saveInfo: {}, saveInfo: {},
lastInfo: {}, lastInfo: {},
bp_type_n: '',
msg_flag: false, msg_flag: false,
invoiceInfo: {}, invoiceInfo: {},
maritalList: [], maritalList: [],
...@@ -304,8 +319,9 @@ export default { ...@@ -304,8 +319,9 @@ export default {
}, },
baseInfo: { baseInfo: {
bp_type: '', bp_type: '',
bp_type_n: '',
bp_name: '', bp_name: '',
phone: null, phone: '',
auth_flag: '', auth_flag: '',
user_phone: window.localStorage.user_phone, user_phone: window.localStorage.user_phone,
legal_person: '', legal_person: '',
...@@ -313,8 +329,8 @@ export default { ...@@ -313,8 +329,8 @@ export default {
enterprise_type: '', enterprise_type: '',
business_address: '', business_address: '',
registered_place: '', registered_place: '',
organization_code: null, organization_code: '',
registered_capital: null, registered_capital: '',
business_license_num: '', business_license_num: '',
bp_class: this.$route.params.bp_class, bp_class: this.$route.params.bp_class,
}, },
...@@ -335,19 +351,27 @@ export default { ...@@ -335,19 +351,27 @@ export default {
}, },
computed: {}, computed: {},
watch: { watch: {
'baseInfo.auth_flag' (newVal, oldVal) {
if (newVal === '是') {
this.flag = false
} else {
this.flag = true
}
},
// 监听客户类型 // 监听客户类型
bp_type_n () { 'baseInfo.bp_type_n' () {
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.type = '请输入业务经办员工代码' vm.type = '请输入业务经办员工代码'
vm.typeName = '业务经办人' vm.typeName = '业务经办人'
vm.baseInfo.agent_username = '' // vm.baseInfo.agent_username = ''
} else if ( } else if (
vm.baseInfo.bp_type === 'AGENT' || vm.baseInfo.bp_type === 'AGENT' ||
vm.baseInfo.bp_type === 'OFFICE' || vm.baseInfo.bp_type === 'OFFICE' ||
vm.baseInfo.bp_type === 'FACTORY' vm.baseInfo.bp_type === 'FACTORY'
) { ) {
vm.bp_type_flag = false vm.bp_type_flag = false
delete vm.baseInfo.agent_username
// vm.typeName = '营业执照' // vm.typeName = '营业执照'
// vm.type = '请输入营业执照号' // vm.type = '请输入营业执照号'
// vm.baseInfo.agent_username = '' // vm.baseInfo.agent_username = ''
...@@ -374,7 +398,7 @@ export default { ...@@ -374,7 +398,7 @@ export default {
// this.hlsPopup.showError('清先保存基本信息') // this.hlsPopup.showError('清先保存基本信息')
// this.tabNum = oldVal // this.tabNum = oldVal
// } // }
if (newVal === 1 && !this.bp_id) { if ((newVal === 1 && !this.bp_id) && !this.from) {
this.hlsPopup.showError('请先保存基本信息') this.hlsPopup.showError('请先保存基本信息')
this.tabNum = oldVal this.tabNum = oldVal
} }
...@@ -382,16 +406,30 @@ export default { ...@@ -382,16 +406,30 @@ export default {
}, },
created () { created () {
this.getBpType() this.getBpType()
if (this.$route.params.status === 'APPROVED') {
this.isApproved = true
}
// this.getBankInfo() // this.getBankInfo()
}, },
beforeRouteEnter (to, from, next) {
if (from.fullPath === '/tab/my-info') {
next(vm => {
vm.from = true
vm.getbaseInfo()
vm.getBankInfo()
})
}
next()
},
methods: { methods: {
getBankInfo () { getBankInfo () {
let vm = this let vm = this
// let bpId = window.localStorage.getItem('user_id') // let bpId = window.localStorage.getItem('user_id')
let bpId = vm.bp_id let id = vm.from ? vm.$route.params.bp_id : vm.bp_id
// let bpId = vm.bp_id
let url = process.env.basePath + 'bp_bank_query' let url = process.env.basePath + 'bp_bank_query'
let param = { let param = {
bp_id: bpId, bp_id: id,
} }
vm.hlsPopup.showLoading('请稍候') vm.hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(function (res) { vm.hlsHttp.post(url, param).then(function (res) {
...@@ -462,24 +500,30 @@ export default { ...@@ -462,24 +500,30 @@ export default {
} }
if (this.bank_card_flag) { if (this.bank_card_flag) {
this.hlsPopup.showLoading('请稍后') this.hlsPopup.showLoading('请稍后')
let id
if (this.from) {
id = this.$route.params.bp_id
} else {
id = this.bp_id
}
let url = $config.basePath + 'bp_bank_save' let url = $config.basePath + 'bp_bank_save'
let param = { let param = {
'master': { 'master': {
'bp_id': this.bp_id, 'bp_id': id,
'bank_lists': [this.bank_lists], 'bank_lists': [this.bank_lists],
}, },
} }
let vm = this let vm = this
vm.hlsHttp.post(url, param).then(function (res) { vm.hlsHttp.post(url, param).then(function (res) {
console.log(res) // console.log(res)
if (res.result === 'S') { if (res.result === 'S') {
vm.hlsPopup.hideLoading() vm.hlsPopup.hideLoading()
vm.showModalValue = false vm.showModalValue = false
vm.hlsPopup.showSuccess('添加成功') vm.hlsPopup.showSuccess('添加成功')
let url = $config.basePath + 'bp_bank_query' let url = $config.basePath + 'bp_bank_query'
let param = { let param = {
bp_id: vm.bp_id, bp_id: id,
} }
vm.hlsHttp.post(url, param).then(function (res) { vm.hlsHttp.post(url, param).then(function (res) {
...@@ -497,13 +541,25 @@ export default { ...@@ -497,13 +541,25 @@ export default {
verified () { verified () {
// debugger // debugger
if (this.flag) { if (this.flag) {
// this.flag = false
for (let i in this.authMsg) {
this.authMsg[i] = ''
}
this.baseInfo.auth_flag = 'N' this.baseInfo.auth_flag = 'N'
this.lastInfo = {...this.baseInfo, ...this.legal_personMsg} this.lastInfo = {...this.baseInfo, ...this.legal_personMsg}
this.saveInfo = {...this.lastInfo, ...this.authMsg, ...this.invoiceInfo} this.saveInfo = {...this.lastInfo, ...this.authMsg, ...this.invoiceInfo}
this.saveInfo.auth_flag = 'N'
} else { } else {
// this.flag = false
for (let i in this.legal_personMsg) {
this.legal_personMsg[i] = ''
}
this.baseInfo.auth_flag = 'Y' this.baseInfo.auth_flag = 'Y'
this.lastInfo = {...this.baseInfo, ...this.authMsg} this.lastInfo = {...this.baseInfo, ...this.authMsg}
this.saveInfo = {...this.lastInfo, ...this.legal_personMsg, ...this.invoiceInfo} this.saveInfo = {...this.lastInfo, ...this.legal_personMsg, ...this.invoiceInfo}
this.saveInfo.auth_flag = 'Y'
} }
console.log('last', this.lastInfo, this.invoiceInfo) console.log('last', this.lastInfo, this.invoiceInfo)
let vm = this let vm = this
...@@ -718,8 +774,10 @@ export default { ...@@ -718,8 +774,10 @@ 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
if (vm.baseInfo.bp_type === 'TENANT' || vm.baseInfo.bp_type === 'GUTA') {
vm.bp_type_flag = true vm.bp_type_flag = true
}
}, },
}) })
}, },
...@@ -765,6 +823,33 @@ export default { ...@@ -765,6 +823,33 @@ export default {
} }
}) })
}, },
getbaseInfo () {
let vm = this
let url = process.env.basePath + 'bp_org_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') {
delete res.info.bp_id
vm.baseInfo = {...res.info}
vm.authMsg.auth_person_name = res.info.auth_person_name
vm.authMsg.auth_person_matter = res.info.auth_person_matter
vm.authMsg.auth_person_id_card = res.info.auth_person_id_card
vm.authMsg.auth_person_position = res.info.auth_person_position
// delete res.info.agent_username
vm.legal_personMsg.id_card_no = res.info.id_card_no
vm.legal_personMsg.legal_person = res.info.legal_person
vm.legal_personMsg.cell_phone = res.info.cell_phone
vm.legal_personMsg.living_address = res.info.living_address
Object.assign(vm.saveInfo, res.info)
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
}, },
} }
</script> </script>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<div slot="name" class="font-color">纳税人类型</div> <div slot="name" class="font-color">纳税人类型</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="请选择"
...@@ -64,17 +64,25 @@ export default { ...@@ -64,17 +64,25 @@ export default {
type: String, type: String,
default: '', default: '',
}, },
'baseInfo': {
type: Object,
default: {},
},
'tabNum': {
type: Number,
default: 0,
},
}, },
data () { data () {
return { return {
invoicList: [], invoicList: [],
taxpayerList: [], taxpayerList: [],
invoice_kind_n: '', invoice_kind_n: '',
taxpayer_type_n: '',
invoiceInfo: { invoiceInfo: {
invoice_kind: '', invoice_kind: 1,
taxpayer_type: '', taxpayer_type: '',
invoice_title: '', invoice_title: '',
taxpayer_type_n: '',
organization_code: this.orgCode, organization_code: this.orgCode,
invoice_bp_bank_account: '', invoice_bp_bank_account: '',
invoice_bp_address_phone_num: '', invoice_bp_address_phone_num: '',
...@@ -85,6 +93,17 @@ export default { ...@@ -85,6 +93,17 @@ export default {
orgCode () { orgCode () {
this.invoiceInfo.organization_code = this.orgCode this.invoiceInfo.organization_code = this.orgCode
}, },
'tabNum' (newVal, oulVal) {
if (newVal === 2) {
Object.assign(this.invoiceInfo, this.baseInfo)
this.invoice_kind_n = ''
if (this.invoiceInfo.invoice_kind == 0) {
this.invoice_kind_n = '增值税专用发票'
} else if (this.invoiceInfo.invoice_kind == 2) {
this.invoice_kind_n = '增值税普通发票'
}
}
},
}, },
created () { created () {
console.log('orgCode', this.orgCode) console.log('orgCode', this.orgCode)
...@@ -149,7 +168,7 @@ export default { ...@@ -149,7 +168,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
}, },
}) })
}, },
......
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