diff --git a/anrui-riskcenter-ui/src/views/customerrepayment/customerrepayment.vue b/anrui-riskcenter-ui/src/views/customerrepayment/customerrepayment.vue index de5edd2fb7..602378ee8e 100644 --- a/anrui-riskcenter-ui/src/views/customerrepayment/customerrepayment.vue +++ b/anrui-riskcenter-ui/src/views/customerrepayment/customerrepayment.vue @@ -125,6 +125,44 @@ + + + + + +
+ + 选取文件 + 上传 + +
+
+

文件上传结果

+ +
{{ uploadResultMesssage }}
+
+
+
+ +
@@ -144,7 +182,39 @@ export default { data() { return { btndisabled: false, + dialogVisible: false, + updateAction: '', + fileList: [], + uploadResultMesssage: '', + uploadData: { + fileName: '', + userSid: window.sessionStorage.getItem('userSid') + }, + headers: { + token: window.sessionStorage.getItem('token') + }, btnList: [ + { + type: 'primary', + size: 'small', + icon: 'Import', + btnKey: 'historyImport', + btnLabel: '贷后历史数据导入' + }, + { + type: 'primary', + size: 'small', + icon: 'Import', + btnKey: 'detailImport', + btnLabel: '休眠还款计划明细导入' + }, + { + type: 'primary', + size: 'small', + icon: 'Import', + btnKey: 'recordImport', + btnLabel: '生成休眠还款记录' + }, { type: 'primary', size: 'small', @@ -252,6 +322,15 @@ export default { btnHandle(btnKey) { console.log('XXXXXXXXXXXXXXX ' + btnKey) switch (btnKey) { + case 'historyImport': + this.historyImport() + break + case 'detailImport': + this.detailImport() + break + case 'recordImport': + this.recordImport() + break case 'doExport': this.doExport() break @@ -329,6 +408,46 @@ export default { } this.getList() }, + historyImport() { + this.dialogVisible = true + this.updateAction = process.env.VUE_APP_BASE_API + '/riskcenter/v1/loanrepaymentschedule/importHistoryData' + this.fileList = [] + this.uploadResultMesssage = '' + }, + detailImport() { + this.dialogVisible = true + this.updateAction = process.env.VUE_APP_BASE_API + '/riskcenter/v1/loanrepaymentschedule/importSleepData' + this.fileList = [] + this.uploadResultMesssage = '' + }, + recordImport() { + this.dialogVisible = true + this.updateAction = process.env.VUE_APP_BASE_API + '/riskcenter/v1/loanrepaymentschedule/importSleepHistoryData' + this.fileList = [] + this.uploadResultMesssage = '' + }, + handleChange(file) { + this.uploadData.fileName = file.name + }, + handleRemove() { + this.uploadResultMesssage = '' + }, + submitUpload() { + this.$refs.upload.submit() + }, + handleSuccess(resp, file, fileList) { + const _this = this + if (resp.success) { + _this.uploadResultMesssage = resp.msg + // 上传文件数据成功后立即保存数据 + } else { + _this.uploadResultMesssage = resp.msg + } + }, + handleConfirm() { + this.dialogVisible = false + this.getList() + }, doExport() { const loading = this.$loading({ lock: true,