|
@@ -109,6 +109,8 @@
|
|
|
<template #buttons>
|
|
<template #buttons>
|
|
|
<el-button v-if="hasPermission('cw:reimbursement:info:add')" type="primary" icon="el-icon-plus"
|
|
<el-button v-if="hasPermission('cw:reimbursement:info:add')" type="primary" icon="el-icon-plus"
|
|
|
@click="add()">新建</el-button>
|
|
@click="add()">新建</el-button>
|
|
|
|
|
+ <el-button v-if="hasPermission('cw:reimbursement:info:import')" type="info" icon="el-icon-upload"
|
|
|
|
|
+ @click="openImportDialog()">导入</el-button>
|
|
|
<el-button v-if="hasPermission('cw:reimbursement:info:del')" type="danger" icon="el-icon-delete"
|
|
<el-button v-if="hasPermission('cw:reimbursement:info:del')" type="danger" icon="el-icon-delete"
|
|
|
@click="del()" :disabled="$refs.infoTable && $refs.infoTable.getCheckboxRecords().length === 0"
|
|
@click="del()" :disabled="$refs.infoTable && $refs.infoTable.getCheckboxRecords().length === 0"
|
|
|
plain>删除</el-button>
|
|
plain>删除</el-button>
|
|
@@ -278,6 +280,7 @@
|
|
|
<ProjectListForm ref="projectListForm"></ProjectListForm>
|
|
<ProjectListForm ref="projectListForm"></ProjectListForm>
|
|
|
<user-select1 ref="userSelect1" @doSubmit="selectUser1"></user-select1>
|
|
<user-select1 ref="userSelect1" @doSubmit="selectUser1"></user-select1>
|
|
|
<user-select2 ref="userSelect2" @doSubmit="selectUser2"></user-select2>
|
|
<user-select2 ref="userSelect2" @doSubmit="selectUser2"></user-select2>
|
|
|
|
|
+ <ImportDialog ref="importDialog" @refreshDataList="refreshList" @import-error="handleImportError"></ImportDialog>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -302,6 +305,7 @@ import NewInfoUpdateForm from './NewInfoUpdateForm'
|
|
|
import ProjectListForm from './ProgramForm'
|
|
import ProjectListForm from './ProgramForm'
|
|
|
import UserSelect1 from '@/views/utils/UserTreeSelect'
|
|
import UserSelect1 from '@/views/utils/UserTreeSelect'
|
|
|
import UserSelect2 from '@/views/utils/UserTreeSelect'
|
|
import UserSelect2 from '@/views/utils/UserTreeSelect'
|
|
|
|
|
+import ImportDialog from './ImportDialog'
|
|
|
import dayjs from 'dayjs';
|
|
import dayjs from 'dayjs';
|
|
|
export default {
|
|
export default {
|
|
|
data() {
|
|
data() {
|
|
@@ -385,6 +389,7 @@ export default {
|
|
|
ProjectListForm,
|
|
ProjectListForm,
|
|
|
UserSelect1,
|
|
UserSelect1,
|
|
|
UserSelect2,
|
|
UserSelect2,
|
|
|
|
|
+ ImportDialog,
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
@@ -409,6 +414,31 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ // 打开导入弹窗
|
|
|
|
|
+ openImportDialog() {
|
|
|
|
|
+ this.$refs.importDialog.init()
|
|
|
|
|
+ },
|
|
|
|
|
+ // 导入错误处理:提示下载错误文件
|
|
|
|
|
+ handleImportError(data) {
|
|
|
|
|
+ this.$nextTick(async () => {
|
|
|
|
|
+ try {
|
|
|
|
|
+ await this.$confirm('导入数据存在问题,是否下载错误详情文件?', '提示', {
|
|
|
|
|
+ confirmButtonText: '是',
|
|
|
|
|
+ cancelButtonText: '否',
|
|
|
|
|
+ type: 'warning',
|
|
|
|
|
+ distinguishCancelAndClose: true
|
|
|
|
|
+ });
|
|
|
|
|
+ this.reimbursementApprovalService.downloadImportError(data.errorFilePath).then(res => {
|
|
|
|
|
+ this.$utils.downloadExcel(res, '报销导入错误结果.xlsx')
|
|
|
|
|
+ this.$message.success('文件下载成功!')
|
|
|
|
|
+ }).catch(err => {
|
|
|
|
|
+ this.$message.error('下载失败')
|
|
|
|
|
+ })
|
|
|
|
|
+ } catch (err) {
|
|
|
|
|
+ this.$message.info('已取消下载')
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
// 判断时间
|
|
// 判断时间
|
|
|
isNewVersion(row) {
|
|
isNewVersion(row) {
|
|
|
let newStartDate = this.$dictUtils.getDictLabel("new_version_reimbursement_date", '1', '-')
|
|
let newStartDate = this.$dictUtils.getDictLabel("new_version_reimbursement_date", '1', '-')
|