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

修复问题

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