提交 a5a8b389 authored 作者: matian's avatar matian

fix:修改历史发票以及发票信息显示问题

上级 f88453f3
......@@ -218,6 +218,9 @@ export default {
methods: {
// 发票列表下载
downloadInvoices() {
Object.keys(this.tableOptions.remote.params).forEach(key => {
if (this.tableOptions.remote.params[key] === '') delete this.tableOptions.remote.params[key]
})
const params = queryString.stringify(this.tableOptions.remote.params)
window.open(`/api/finance/v1/invoices/download?${params}`)
},
......
......@@ -50,6 +50,7 @@ export default {
},
handleSelect(item) {
this.$emit('select', item)
console.log(item)
}
}
}
......
......@@ -3,7 +3,7 @@
<div class="ticketInfo" v-if="invioceList">
<table border="1" cellspacing="0" class="tableDetail" v-for="(item, index) in invioceList" :key="index">
<tr>
<th colspan="10" style="float: left">发票{{ index + 1 }}</th>
<td colspan="10">发票{{ index + 1 }}</td>
</tr>
<tr>
<th>发票号码</th>
......@@ -11,11 +11,11 @@
<th>发票代码</th>
<td>{{ item.invoice_daima }}</td>
<th>开票类型</th>
<td>{{ item.invoice_color_type }}</td>
<td>{{ invoice_color_type(item) }}</td>
<th>抬头类型</th>
<td>{{ item.taxpayer_type }}</td>
<td>{{ taxpayer_type(item) }}</td>
<th>发票类型</th>
<td>{{ item.invoice_type }}</td>
<td>{{ invoice_type(item) }}</td>
</tr>
<tr v-show="item.invoice_status === 6">
<th>原发票号码</th>
......@@ -84,14 +84,37 @@ export default {
default: () => {}
}
},
data() {
return {
invioceList: []
computed: {
invioceList() {
return this.dealList.invoices_list || []
}
},
mounted() {
this.invioceList = this.dealList.invoices_list
console.log(this.invioceList)
methods: {
invoice_type(item) {
if (item === '1') {
return '普通纸质发票'
} else if (item === '2') {
return '普通电子发票'
} else {
return '专用纸质发票'
}
},
taxpayer_type(item) {
if (item === '1') {
return '个人'
} else if (item === '2') {
return '企业'
} else {
return '非营利单位'
}
},
invoice_color_type(item) {
if (item === '1') {
return '红字发票'
} else {
return '蓝字发票'
}
}
}
}
</script>
......
......@@ -32,8 +32,8 @@
<div class="type" style="border: 1px solid #ebeef5; margin-bottom: 10px">
<el-form-item label="开票类型" prop="invoice_color_type" style="padding-top: 25px">
<el-radio-group v-model="form.invoice_color_type" class="group">
<el-radio :label="1" disabled>字发票</el-radio>
<el-radio :label="2">字发票</el-radio>
<el-radio label="0" checked>字发票</el-radio>
<el-radio label="1" disabled>字发票</el-radio>
</el-radio-group>
</el-form-item>
</div>
......@@ -41,9 +41,9 @@
<el-form-item label="抬头类型" prop="taxpayer_type" style="padding-top: 25px">
<!-- change事件 -->
<el-radio-group v-model="form.taxpayer_type" class="group">
<el-radio :label="1">个人</el-radio>
<el-radio :label="2">企业</el-radio>
<el-radio :label="3">非营利单位</el-radio>
<el-radio label="1">个人</el-radio>
<el-radio label="2">企业</el-radio>
<el-radio label="3">非营利单位</el-radio>
</el-radio-group>
</el-form-item>
</div>
......@@ -56,21 +56,21 @@
<el-form-item label="发票类型" prop="invoice_type">
<!-- change事件 -->
<el-select v-model="form.invoice_type" placeholder="请选择发票类型" size="small">
<el-option label="普通纸质发票" :value="1"></el-option>
<el-option label="普通电子发票" :value="2"></el-option>
<el-option label="普通纸质发票" value="1"></el-option>
<el-option label="普通电子发票" value="2"></el-option>
<!-- 纸质专票企业可以开 -->
<el-option label="专用纸质发票" :value="3" v-show="form.taxpayer_type === 2"></el-option>
<el-option label="专用纸质发票" value="3" v-show="form.taxpayer_type === '2'"></el-option>
</el-select>
</el-form-item>
<el-form-item label="纳税人名称" prop="taxpayer_name">
<el-input v-model="form.taxpayer_name"></el-input>
</el-form-item>
<!-- 企业发票显示税号 -->
<el-form-item label="纳税人识别号" prop="taxpayer_identifier" v-show="form.taxpayer_type === 2">
<el-form-item label="纳税人识别号" prop="taxpayer_identifier" v-show="form.taxpayer_type === '2'">
<el-input v-model="form.taxpayer_identifier"></el-input>
</el-form-item>
<!-- 企业纸质显示 -->
<div v-show="form.taxpayer_type === 2 && form.invoice_type === '3'">
<div v-show="form.taxpayer_type === '2' && form.invoice_type === '3'">
<el-form-item label="地址" prop="taxpayer_address">
<el-input v-model="form.taxpayer_address"></el-input>
</el-form-item>
......@@ -137,9 +137,9 @@ export default {
return {
detailList: {},
form: {
invoice_color_type: 2,
taxpayer_type: '',
invoice_type: '',
invoice_color_type: '2',
taxpayer_type: '1',
invoice_type: '1',
taxpayer_name: '',
taxpayer_identifier: '',
taxpayer_address: '',
......@@ -184,6 +184,7 @@ export default {
if (nv) {
Object.keys(this.form).forEach(key => {
this.form[key] = this.history[key]
console.log(this.form)
})
}
}
......
......@@ -327,7 +327,8 @@ export default {
},
handleSelect(val) {
this.history = val
this.historyVisible = false
// parseInt(val.invoice_color_type)
// parseInt(val.invoice_type)
},
handleHistory() {
this.historyVisible = true
......@@ -495,6 +496,9 @@ export default {
},
// 导出全部
exportAll() {
Object.keys(this.tableOptions.remote.params).forEach(key => {
if (this.tableOptions.remote.params[key] === '') delete this.tableOptions.remote.params[key]
})
download(this.tableOptions.remote.params).then(res => {
const params = queryString.stringify(this.tableOptions.remote.params)
window.open(`/api/finance/v1/payments/download?${params}`)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论