提交 dc152e09 authored 作者: lihuihui's avatar lihuihui

update

上级 15e1d457
<template>
<div class="invoice-container">
<van-tabs v-model="form.taxpayer_type" type="card" color="#3276fc" sticky @change="handleTabChange">
<van-tabs v-model="vanTabsIndex" type="card" color="#3276fc" sticky @change="handleTabChange">
<van-tab name="2" title="企业"></van-tab>
<van-tab name="1" title="个人"></van-tab>
<van-tab name="3" title="非营利性单位"></van-tab>
......@@ -221,6 +221,7 @@ export default {
components: { HistoryInvoiceList },
data() {
return {
vanTabsIndex: '2',
searchShow: false,
invoice_type_label: '',
form: {},
......@@ -233,13 +234,18 @@ export default {
return this.$route.query.project_id === '5005' && this.$route.query.type === '60'
},
invoiceTypeList() {
const list = [
let list = [
// { label: '普通发票(纸质)', value: '1' },
{ label: '普通发票(电子)', value: '2' },
{ label: '专用发票(纸质)', value: '3' }
]
console.log(this.form.taxpayer_type, 'num')
if (this.form.taxpayer_type !== '2') {
list.splice(1, 1)
// list.splice(1, 1)
list = [
// { label: '普通发票(纸质)', value: '1' },
{ label: '普通发票(电子)', value: '2' }
]
}
return list
},
......@@ -255,9 +261,9 @@ export default {
defaultForm.sales_rep_user_id_name = this.query.name || ''
if (this.$route.query.taxpayer_info) {
console.log('111')
this.form = Object.assign(defaultForm, JSON.parse(this.$route.query.taxpayer_info))
this.form = Object.assign({}, JSON.parse(this.$route.query.taxpayer_info))
this.vanTabsIndex = JSON.parse(this.$route.query.taxpayer_info).taxpayer_type
this.invoice_type_label = this.form.invoice_type === '2' ? '普通发票(电子)' : '专用发票(纸质)'
console.log(this.form)
} else {
this.form = Object.assign({ taxpayer_type: '' }, defaultForm)
}
......@@ -305,7 +311,8 @@ export default {
return /^[A-Za-z0-9]{18}$/.test(val)
},
handleTabChange(val) {
this.form = Object.assign({ taxpayer_type: val }, defaultForm)
this.form = Object.assign({ taxpayer_type: this.vanTabsIndex }, defaultForm)
console.log(this.form, 'form', defaultForm)
this.setInvoiceType()
},
onConfirm(val) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论