|
@@ -3,7 +3,10 @@
|
|
|
<div class="page">
|
|
|
<el-form size="small" :inline="true" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
|
|
|
<el-form-item prop="businessCode">
|
|
|
- <el-input size="small" v-model="searchForm.businessCode" placeholder="业务编号" clearable></el-input>
|
|
|
+ <el-input size="small" v-model="searchForm.businessCode" placeholder="报销批次" clearable></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="reimbursementBatch">
|
|
|
+ <el-input size="small" v-model="searchForm.reimbursementBatch" placeholder="业务编号" clearable></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="invoiceNumber">
|
|
|
<el-input size="small" v-model="searchForm.invoiceNumber" placeholder="发票号码" clearable></el-input>
|
|
@@ -78,6 +81,7 @@
|
|
|
<el-button v-if="hasPermission('wuHanReimbursement:import')" type="default" @click="downloadTpl()" size="small">下载模板</el-button>
|
|
|
<el-button style="margin-left: 10px" v-if="hasPermission('wuHanReimbursement:edit')" :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>
|
|
|
</el-row>
|
|
|
|
|
|
</template>
|
|
@@ -108,12 +112,13 @@
|
|
|
:checkbox-config="{labelField: ''}"
|
|
|
:data="dataList">
|
|
|
<vxe-column type="checkbox" width="40px"> </vxe-column>
|
|
|
- <vxe-column width="140px" title="业务编号" field="businessCode" align="left" tree-node >
|
|
|
+ <vxe-column width="140px" title="报销批次" field="businessCode" align="left" tree-node >
|
|
|
<template slot-scope="scope">
|
|
|
<el-link type="primary" :underline="false" v-if="scope.row.parentId == '0'" @click="view(scope.row.id)">{{scope.row.businessCode}}</el-link>
|
|
|
<span v-else></span>
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
+ <vxe-column width="100px" title="业务编号" field="reimbursementBatch" align="center" visible></vxe-column>
|
|
|
<vxe-column width="100px" title="所属年份" field="year" align="center" visible></vxe-column>
|
|
|
<vxe-column width="100px" title="发票代码" field="invoiceCode" align="center" visible></vxe-column>
|
|
|
<vxe-column width="100px" title="发票号码" field="invoiceNumber" align="center">
|
|
@@ -152,8 +157,9 @@
|
|
|
|
|
|
<vxe-column title="操作" width="300px" fixed="right" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button v-if="hasPermission('wuHanReimbursement:edit') && scope.row.businessCode==='' && scope.row.parentId === '0'" type="text" icon="el-icon-edit" size="small" @click="editBusiness(scope.row.id)">新增业务编码</el-button>
|
|
|
+ <el-button v-if="hasPermission('wuHanReimbursement:edit') && scope.row.businessFlag === '1'" type="text" icon="el-icon-edit" size="small" @click="editInvoiceBusiness(scope.row.id)">新增业务编码</el-button>
|
|
|
<el-button v-if="hasPermission('wuHanReimbursement:edit') && scope.row.businessCode!=='' && scope.row.parentId === '0' && scope.row.randomType === '1' " type="text" icon="el-icon-edit" size="small" @click="editBusiness(scope.row.id)">编辑业务编码</el-button>
|
|
|
+ <el-button v-if="hasPermission('wuHanReimbursement:edit') && (scope.row.businessCode==='' && scope.row.parentId === '0' && scope.row.businessFlag === '0')" type="text" icon="el-icon-edit" size="small" @click="editBusiness(scope.row.id)">新增业务编码</el-button>
|
|
|
<el-button v-if="hasPermission('wuHanReimbursement:edit') && scope.row.businessCode !== '' && !scope.row.reimbursementRatio && scope.row.parentId === '0'" type="text" icon="el-icon-edit" size="small" @click="editBusinessRatio(scope.row.id)">报销比例</el-button>
|
|
|
<el-button v-if="hasPermission('wuHanReimbursementBusiness:add') && scope.row.businessCode !== '' && scope.row.reimbursementRatio && scope.row.parentId === '0' && scope.row.reimbursementStatus === '0'" type="text" icon="el-icon-plus" size="small" @click="addBusinessInfo(scope.row.id, scope.row.businessCode)">业务报销</el-button>
|
|
|
<el-button v-if="hasPermission('wuHanReimbursementBusiness:view') && scope.row.businessCode !== '' && scope.row.reimbursementRatio && scope.row.parentId === '0'" type="text" icon="el-icon-view" size="small" @click="viewBusinessInfo(scope.row.id)">业务报销详情</el-button>
|
|
@@ -175,6 +181,7 @@
|
|
|
:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
|
|
|
@page-change="currentChangeHandle">
|
|
|
</vxe-pager>
|
|
|
+ <reimbursement-select ref="reimbursementSelect" @doSubmit="selectBatchReimbursement"></reimbursement-select>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 弹窗, 新增 / 修改 -->
|
|
@@ -198,12 +205,15 @@ import reimbursementRatioForm from './wuHanReimbursementRatioForm'
|
|
|
import reimbursementInvoiceForm from './wuHanReimbursementInvoiceForm'
|
|
|
import reimbursementInvoiceModify from './wuHanReimbursementInvoiceModify'
|
|
|
import reimbursementBusinessForm from './wuHanReimbursementBusinessForm'
|
|
|
+import reimbursementSelect from './wuHanReimbursementSelectDialog'
|
|
|
export default {
|
|
|
data () {
|
|
|
return {
|
|
|
dataList: [],
|
|
|
searchDates: '',
|
|
|
searchForm: {
|
|
|
+ reimbursementBatch: '',
|
|
|
+ businessFlag: '',
|
|
|
businessCode: '',
|
|
|
invoiceNumber: '',
|
|
|
proposer: '',
|
|
@@ -269,7 +279,8 @@ export default {
|
|
|
reimbursementRatioForm,
|
|
|
reimbursementInvoiceForm,
|
|
|
reimbursementInvoiceModify,
|
|
|
- reimbursementBusinessForm
|
|
|
+ reimbursementBusinessForm,
|
|
|
+ reimbursementSelect
|
|
|
},
|
|
|
ReimbursementSys: null,
|
|
|
created () {
|
|
@@ -338,10 +349,17 @@ export default {
|
|
|
this.tablePage.pageSize = pageSize
|
|
|
this.refreshList()
|
|
|
},
|
|
|
+ // 新增
|
|
|
+ add () {
|
|
|
+ this.$refs.reimbursementSelect.init()
|
|
|
+ },
|
|
|
// 修改
|
|
|
editBusiness (id) {
|
|
|
this.$refs.reimbursementForm.init('editBusiness', {id: id, parent: {id: '', name: ''}})
|
|
|
},
|
|
|
+ editInvoiceBusiness (id) {
|
|
|
+ this.$refs.reimbursementForm.init('editInvoiceBusiness', {id: id, parent: {id: '', name: ''}})
|
|
|
+ },
|
|
|
// 修改
|
|
|
editBusinessRatio (id) {
|
|
|
this.$refs.reimbursementRatioForm.init('editBusinessRatio', {id: id, parent: {id: '', name: ''}})
|
|
@@ -478,6 +496,16 @@ export default {
|
|
|
console.log(err.response)
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ selectBatchReimbursement (invoices) {
|
|
|
+ let invoiceNumbers = invoices.map(invoice => { return invoice.id }).join(',')
|
|
|
+ this.loading = true
|
|
|
+ this.reimbursementSys.addBatchReimbursement(invoiceNumbers).then(({data}) => {
|
|
|
+ this.loading = false
|
|
|
+ this.$message.success({dangerouslyUseHTMLString: true,
|
|
|
+ message: data})
|
|
|
+ this.refreshList()
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
|