Commit 0f7af63e authored by 刘雅文's avatar 刘雅文

修复问题

parent 9a413c5c
......@@ -31,11 +31,12 @@
</div>
<div>
<el-table :data="tableData" border style="width: 100%">
<el-table-column prop="settleTypeStr" align="center" label="结清类型" >
<el-table-column prop="settleTypeStr" align="center" label="结清类型">
</el-table-column>
<el-table-column prop="operator" align="center" label="操作人" >
<el-table-column prop="operator" align="center" label="操作人">
</el-table-column>
<el-table-column prop="operationDate" align="center" label="操作时间">
</el-table-column>
<el-table-column prop="operationDate" align="center" label="操作时间" > </el-table-column>
</el-table>
</div>
</div>
......@@ -61,42 +62,34 @@ export default {
data() {
return {
reportType: "",
tableData:[],
certName:"",
loanNo:""
tableData: [],
certName: "",
loanNo: "",
};
},
async created() {
created() {
const params = this.params;
console.log(params,'啦啦啦啦啦啦啦');
console.log(params, "啦啦啦啦啦啦啦");
if (params.loanNo) {
const { clientName, loanNo } =
params;
console.log(params.loanNo, "hhhhhhhhhh");
const { clientName, loanNo,externalNo } = params;
this.certName = clientName;
this.loanNo = loanNo;
this.loanNo = externalNo;
this.queryReport(externalNo);
}
await this.queryReport();
},
methods: {
async init() {
const params = {};
params.settleType = this.reportType;
params.loanNo = this.loanNo;
params.operator = localStorage.getItem('loginName');
const res = await this.$$post(`/loan/generateSettleReport`, params);
console.log(res, "resres");
},
//查询生成报告
queryReport(){
this.$$get(`/loan/selectGenerate?loanNo=${this.loanNo}`).then(res=>{
console.log(res,'报告');
if(res.data.code==200){
this.tableData=res.data.result;
queryReport(externalNo) {
this.$$get(`/loan/selectGenerate?loanNo=${externalNo}`).then((res) => {
console.log(res, "报告");
if (res.data.code == 200) {
this.tableData = res.data.result;
}
})
});
},
//生成结清报告
generateReport () {
generateReport() {
this.$confirm("是否确认生成", "", {
confirmButtonText: "确定",
cancelButtonText: "取消",
......@@ -109,12 +102,21 @@ export default {
this.$message("请选择报告类型!");
return;
}
this.init();
const params = {};
params.settleType = this.reportType;
params.loanNo = this.loanNo;
params.operator = localStorage.getItem("loginName");
this.$$post(`/loan/generateSettleReport`, params).then((res) => {
if (res.data.code == 200) {
this.queryReport();
this.$message({
type: "success",
message: "已生成!",
});
}else{
this.$message(res.data.message)
}
});
})
.catch(() => {
// 取消
......@@ -124,16 +126,10 @@ export default {
});
});
},
/*日期*/
dateFormats: function (row, column) {
let date = row[column.property];
if (date === undefined) {
return "";
}
return moment(date).format("YYYY-MM-DD");
},
handleClose() {
this.$emit("handleClose");
// window.location.reload()
},
},
};
......
......@@ -150,6 +150,7 @@ export default {
...row,
...this.params
};
console.log(row,'mmmcccc');
this.mcTitle = title;
this.ActiveCom = com;
}
......
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