|
|
@ -125,6 +125,44 @@ |
|
|
|
<!--End查询列表部分--> |
|
|
|
</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> |
|
|
|
</template> |
|
|
|
|
|
|
@ -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, |
|
|
|