Commit 2824d9fc authored by caimeng's avatar caimeng

添加提前结清证明

parent bf510d4d
......@@ -12,10 +12,10 @@
//window.APIHOST = "http://192.168.0.50:8202";
//测试
// window.APIHOST = "http://47.99.245.36:8202";
window.APIHOST = "http://47.99.245.36:8202";
//生产环境
window.APIHOST = "https://water.jqtianxia.com";
//window.APIHOST = "https://water.jqtianxia.com";
</script>
</head>
......
<template>
<el-dialog
:title="title"
width="500px"
center
:wrapperClosable="false"
:visible.sync="visible"
:before-close="handleClose">
<div class="page-dialog">
<div class="btn-box" style="height: 200px">
<el-button size="small" plain type="info" v-if="result.status==='FAIL'">生成失败</el-button>
<el-button size="small" plain type="success" @click="handleClick" v-else-if="result.status==='SUCCESS'">点击下载
</el-button>
<el-button size="small" plain type="primary" v-else-if="result.status==='PROCESS'">生成中...</el-button>
</div>
</div>
</el-dialog>
</template>
<script>
import BlockHeader from "@/components/byh/componments/blockHeader";
import * as moment from "moment";
export default {
name: 'SettleReport',
components: {
BlockHeader
},
props: {
title: {
type: String,
required: true,
},
visible: {
type: Boolean,
required: true
},
params: {
type: Object,
required: true
},
},
data() {
return {
//FAIL:失败
//SUCCESS :成功
//PROCRSS:处理中
result: {},
form: {
batchNumber: '',
capitalCode: '',
certNo: "",
certName: "",
loanNo: ""
}
}
},
async created() {
const params = this.params;
console.log(params, '很多信息');
if (params.loanNo) {
const {capitalCode, clientName, idCard, loanNo,externalNo} = params;
this.form.capitalCode = capitalCode;
this.form.certNo = idCard;
this.form.certName = clientName;
//this.form.loanNo = loanNo;
this.form.loanNo = externalNo;
await this.init()
}
},
methods: {
headerStyle() {
return "tableHeaderStyle";
},
async init() {
const res = await this.$$post('/back/settleReport', this.form);
const {success, result} = res.data;
if (success && result !== null) {
this.result = result;
}
},
/*日期*/
dateFormats: function (row, column) {
let date = row[column.property]
if (date === undefined) {
return ''
}
return moment(date).format("YYYY-MM-DD")
},
handleClose() {
this.$emit("handleClose");
},
handleClick() {
const url = this.result.fileUrl;
window.open(url, "_blank");
}
}
}
</script>
<style>
.btn-box {
display: flex;
align-items: center;
justify-content: center;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment