Commit 6370ba7f authored by linxin's avatar linxin

add

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