Browse Source

完善客户还款情况统计表--增加导入功能

master
yunuo970428 10 months ago
parent
commit
1f750c86c2
  1. 119
      anrui-riskcenter-ui/src/views/customerrepayment/customerrepayment.vue

119
anrui-riskcenter-ui/src/views/customerrepayment/customerrepayment.vue

@ -125,6 +125,44 @@
<!--End查询列表部分--> <!--End查询列表部分-->
</div> </div>
</div> </div>
<el-dialog :visible.sync="dialogVisible" width="70%" :show-close="false">
<!-- <div>-->
<!-- <el-button style="font-weight: bold" size="small" type="text" @click="downLoad">下载厂家索赔单模板</el-button>-->
<!-- </div>-->
<el-card class="box-card">
<div>
<el-upload
ref="upload"
class="upload-demo"
accept=".xls"
name="file"
:action="updateAction"
:on-success="handleSuccess"
:on-change="handleChange"
:on-remove="handleRemove"
:file-list="fileList"
:auto-upload="false"
:multiple="false"
:limit="1"
:data="uploadData"
:headers="headers"
>
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
<el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传</el-button>
</el-upload>
</div>
<div>
<h3>文件上传结果</h3>
<el-card class="box-card">
<div>{{ uploadResultMesssage }}</div>
</el-card>
</div>
</el-card>
<div slot="footer" class="dialog-footer" style="text-align: center">
<el-button type="primary" size="small" @click="handleConfirm">确定</el-button>
<el-button size="small" @click="dialogVisible = false">取消</el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
@ -144,7 +182,39 @@ export default {
data() { data() {
return { return {
btndisabled: false, btndisabled: false,
dialogVisible: false,
updateAction: '',
fileList: [],
uploadResultMesssage: '',
uploadData: {
fileName: '',
userSid: window.sessionStorage.getItem('userSid')
},
headers: {
token: window.sessionStorage.getItem('token')
},
btnList: [ 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', type: 'primary',
size: 'small', size: 'small',
@ -252,6 +322,15 @@ export default {
btnHandle(btnKey) { btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey) console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) { switch (btnKey) {
case 'historyImport':
this.historyImport()
break
case 'detailImport':
this.detailImport()
break
case 'recordImport':
this.recordImport()
break
case 'doExport': case 'doExport':
this.doExport() this.doExport()
break break
@ -329,6 +408,46 @@ export default {
} }
this.getList() 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() { doExport() {
const loading = this.$loading({ const loading = this.$loading({
lock: true, lock: true,

Loading…
Cancel
Save