完成幸运礼物优化

This commit is contained in:
dragon
2024-11-20 11:46:58 +08:00
parent c7597a1b14
commit f9a1f6a89c

View File

@@ -31,10 +31,10 @@
</el-date-picker>
</div>
</div>
<el-button type="text">总进入{{ alwaysEnter }}</el-button>
<el-button type="text">总退出{{ totalWithdrawal }}</el-button>
<el-button type="text">总进入{{ totalInput }}</el-button>
<el-button type="text">总退出{{ totalOutput }}</el-button>
<el-button type="text"
>总比例{{ totalWithdrawal / alwaysEnter }}</el-button
>总比例{{ totalProductionRatio }}</el-button
>
<!-- 按钮 -->
<div class="but">
@@ -150,8 +150,9 @@ export default {
data() {
return {
loading: false,
alwaysEnter: "",
totalWithdrawal: "",
totalInput: 0,
totalOutput: 0,
totalProductionRatio: 0,
//查询所需条件对象
inquire: {
userId: "",
@@ -194,29 +195,29 @@ export default {
// 查询接口
getData() {
console.log(dateFormat(this.inquire.time, "yyyy-MM-dd"));
// if (!this.inquire.time) {
// ElMessage({
// showClose: true,
// message: "请选择时间",
// type: "error",
// });
// return;
// }
if (!this.inquire.time && this.inquire.userId == '') {
ElMessage({
showClose: true,
message: "时间和ID至少填一项",
type: "error",
});
return;
}
this.loading = true;
personal({
erbanNo: this.inquire.userId,
pageNo: this.currentPage,
pageSize: this.pageSize,
startDate: this.inquire.time
? dateFormat(this.inquire.time, "yyyy-MM-dd")
: null,
endDate: this.inquire.time
date: this.inquire.time
? dateFormat(this.inquire.time, "yyyy-MM-dd")
: null,
partitionId: this.inquire.value,
}).then((res) => {
this.total = res.data.total;
this.tableData = res.data.rows;
this.total = res.data.dataPage.total;
this.tableData = res.data.dataPage.rows;
this.totalInput = res.data.totalInput;
this.totalOutput = res.data.totalOutput;
this.totalProductionRatio = res.data.totalProductionRatio;
this.loading = false;
});
},