Commit 453306f3 authored by linxin's avatar linxin

add

parent 9baa1b7f
......@@ -8,6 +8,9 @@
</h-header>
<h-content>
<list-item :item-height="45">
<item :show-arrow="true" @click.native="changePageHead">
<div slot="name">头像</div>
</item>
<item :show-arrow="true" @click.native="updateVersion">
<div slot="name">检查更新</div>
</item>
......@@ -22,7 +25,16 @@
<script>
export default {
data () {
return {}
return {
user_bp_status: '',
user_bp_class: '',
bp_id: '',
}
},
beforeRouteEnter (to, from, next) {
next(vm => {
vm.userQuery()
})
},
activated () {
......@@ -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>
......
......@@ -213,7 +213,6 @@ export default {
isSave: false,
tabNum: 0,
upload_list: [],
bp_type_n: '',
typeList: [],
backList: [],
bankList: [],
......@@ -229,6 +228,7 @@ export default {
img_url: {},
baseInfo: {
bp_type: '',
bp_type_n: '',
marital_status_n: '',
bp_class: this.$route.params.bp_class,
bp_name: '',
......
......@@ -149,11 +149,11 @@
<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.id_card_name" placeholder="上传身份证自动填充" class="auto">
<input slot="content" 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" v-model="baseInfo.id_card_no" placeholder="上传身份证自动填充" class="auto">
</item>
<item>
<div slot="name" class="font-color required">手机号</div>
......@@ -299,7 +299,7 @@ export default {
type: '请输入业务经办姓名',
legal_personMsg: {
id_card_no: null,
id_card_name: '',
legal_person: '',
cell_phone: null,
living_address: '',
},
......@@ -1011,16 +1011,16 @@ export default {
}
}
.put1 {
width: 100%;
.put {
width: 175px;
height: 45px;
color: #fff;
color: #00469c;
border-radius: 4px;
// border: 1px solid #00469c;
background-color: #00469c;
border: 1px solid #00469c;
background-color: #fafafa;
}
.save1 {
.save {
width: 175px;
height: 45px;
color: #fff;
......
......@@ -96,6 +96,7 @@ export default {
'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) {
......
......@@ -4,7 +4,7 @@
<div slot="name">纳税人类型</div>
<input
slot="content"
v-model="taxpayer_type_n"
v-model="invoiceInfo.taxpayer_type_n"
type="text"
readonly
placeholder="请选择"
......@@ -16,7 +16,7 @@
<div slot="name">发票类型</div>
<input
slot="content"
v-model="invoice_kind_n"
v-model="invoiceInfo.invoice_kind_n"
type="text"
readonly
placeholder="请选择"
......@@ -45,13 +45,23 @@
</template>
<script>
export default {
props: {
'baseInfo': {
type: Object,
default: {},
},
'tabNum': {
type: Number,
default: 0,
},
},
data () {
return {
taxpayer_type_n: '',
invoice_kind_n: '',
invoicList: [],
taxpayerList: [],
invoiceInfo: {
taxpayer_type_n: '',
invoice_kind_n: '',
taxpayer_type: '',
invoice_kind: '',
invoice_title: '',
......@@ -60,6 +70,13 @@ export default {
},
}
},
watch: {
tabNum (newVal, oldVal) {
if (newVal === 2) {
Object.assign(this.invoiceInfo, this.baseInfo)
}
},
},
created () {
this.getInvoiceType()
this.getTaxpayer()
......@@ -110,7 +127,7 @@ export default {
object: {},
returnItem: function (index, obj) {
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 {
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
},
})
},
......
......@@ -21,7 +21,7 @@
<div slot="name" class="required">客户类型</div>
<input
slot="content"
v-model="bp_type_n"
v-model="baseInfo.bp_type_n"
placeholder="请选择"
type="text"
readonly
......@@ -29,11 +29,11 @@
@click="selectIdType()"
>
</item>
<item v-if="isSelected&&isPaople">
<item v-if="(isPaople&&from)||(isPaople&&isSelected)">
<div slot="name" class="required">业务经办人</div>
<input slot="content" v-model="baseInfo.agent_username" placeholder="请输入业务经办员工代码" >
</item>
<item v-if="isSelected&&!isPaople">
<item v-if="(!isPaople&&from)||(!isPaople&&isSelected)">
<div slot="name" class="required">营业执照</div>
<input slot="content" v-model="baseInfo.business_license_num" placeholder="请输入营业执照号" >
</item>
......@@ -86,7 +86,7 @@
<div slot="name" class="required">学历</div>
<input
slot="content"
v-model="academic_bg_n"
v-model="baseInfo.academic_background_n"
placeholder="请选择学历"
readonly
onfocus="this.blur()"
......@@ -97,7 +97,7 @@
<div slot="name" class="required">婚姻状况</div>
<input
slot="content"
v-model="marital_status_n"
v-model="baseInfo.marital_status_n"
placeholder="请选择"
readonly
onfocus="this.blur()"
......@@ -153,7 +153,7 @@
</div>
</div>
<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>
<bottom-tab class="footer-button">
<tab-button class="put" @click.native="putData">提交</tab-button>
......@@ -213,10 +213,8 @@ export default {
isSave: false,
isSelected: false,
tabNum: 0,
from: false,
upload_list: [],
bp_type_n: '',
academic_bg_n: '',
marital_status_n: '',
typeList: [],
backList: [],
bankList: [],
......@@ -231,6 +229,9 @@ export default {
},
img_url: {},
baseInfo: {
bp_type_n: '',
academic_background_n: '',
marital_status_n: '',
bp_type: '',
bp_class: this.$route.params.bp_class,
bp_name: '',
......@@ -254,11 +255,13 @@ export default {
}
},
watch: {
bp_type_n () {
'baseInfo.bp_type_n' (newVal, oldVal) {
let vm = this
if (vm.baseInfo.bp_type === 'TENANT' || vm.baseInfo.bp_type === 'GUTA') {
vm.isPaople = true
vm.isEnter = false
// baseInfo.agent_username
// baseInfo.business_license_num
} else if (
vm.baseInfo.bp_type === 'AGENT' ||
vm.baseInfo.bp_type === 'OFFICE' ||
......@@ -270,14 +273,13 @@ export default {
},
tabNum: function (newVal, oldVal) {
if (
(newVal === 1 && !this.isSave)
// ||(newVal === 2 && !this.isSave)
(newVal === 1 && !this.isSave) && !this.from
) {
this.hlsPopup.showError('请先保存基本信息')
this.tabNum = oldVal
}
},
marital_status_n: function (newVal, oldVal) {
'baseInfo.marital_status_n': function (newVal, oldVal) {
if (newVal === '已婚') {
this.hasSP = true
} else {
......@@ -295,10 +297,35 @@ export default {
this.getMarital()
this.getBankInfo()
},
beforeRouteEnter (to, from, next) {
if (from.fullPath === '/tab/my-info') {
next(vm => {
vm.basicInfoQuery()
vm.from = true
})
}
next()
},
updated () {
this.getinvoiceList()
},
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 () {
let bpId = await this.saveWord()
this.getBankInfo()
......@@ -559,7 +586,7 @@ export default {
object: {},
returnItem: function (index, obj) {
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
},
})
......@@ -592,7 +619,7 @@ export default {
object: {},
returnItem: function (index, obj) {
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 {
object: {},
returnItem: function (index, obj) {
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 @@
<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.id_card_name" placeholder="上传身份证自动填充" class="auto">
<input slot="content" v-model="legal_personMsg.legal_person" placeholder="上传身份证自动填充" class="auto">
</item>
<item>
<div slot="name" class="font-color">身份证号</div>
......@@ -298,7 +298,7 @@ export default {
type: '请输入业务经办姓名',
legal_personMsg: {
id_card_no: null,
id_card_name: '',
legal_person: '',
cell_phone: null,
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