|
@@ -77,7 +77,7 @@
|
|
|
|
|
|
|
|
|
<el-button style="margin-left: 10px" v-if="hasPermission('accountant:reimbursement:del')" :disabled="$refs.xTree && $refs.xTree.getCheckboxRecords().length === 0" type="danger" size="small" icon="el-icon-delete" @click="del()" plain>删除</el-button>
|
|
|
-
|
|
|
+ <el-button v-if="hasPermission('accountant:reimbursement:import')" type="default" @click="downloadTpl()" size="small">下载模板</el-button>
|
|
|
<el-button style="margin-left: 10px" v-if="hasPermission('accountant:reimbursement:addBatchReimbursement')" :disabled="$refs.xTree && $refs.xTree.getCheckboxRecords().length === 0" type="primary" size="small" icon="el-icon-edit" @click="editInvoiceGatheringTime()" plain>批量收款</el-button>
|
|
|
|
|
|
<el-button v-if="hasPermission('sys:role:assign')" type="primary" size="small" icon="el-icon-plus" @click="add()">批量报销</el-button>
|
|
@@ -393,6 +393,17 @@ export default {
|
|
|
viewInvoice (id) {
|
|
|
this.$refs.reimbursementInvoiceForm.init('viewInvoice', {id: id, parent: {id: '', name: ''}})
|
|
|
},
|
|
|
+ // 下载模板
|
|
|
+ downloadTpl () {
|
|
|
+ this.reimbursementSys.exportTemplate().then((res) => {
|
|
|
+ // 将二进制流文件写入excel表,以下为重要步骤
|
|
|
+ this.$utils.downloadExcel(res.data, '报销发票导入模板')
|
|
|
+ }).catch(function (err) {
|
|
|
+ if (err.response) {
|
|
|
+ console.log(err.response)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 删除
|
|
|
delBusiness (id) {
|
|
|
let ids = id || this.$refs.xTree.getCheckboxRecords().map(item => {
|