新增幸运礼物明细时间查询

This commit is contained in:
Dragon
2024-03-26 17:04:22 +08:00
parent 116da21aab
commit e568074e84

View File

@@ -13,7 +13,7 @@
</el-option>
</el-select>
</div>
<div class="inquire" style="display: inline-block; margin-right: 120px">
<div class="inquire" style="display: inline-block; margin-right: 20px">
<span class="demonstration" style="display: inline-block">送礼用户ID</span>
<el-input
style="display: inline-block"
@@ -22,6 +22,20 @@
class="input"
></el-input>
</div>
<!-- 查询条件 -->
<div class="inquire" style="display: inline-block; margin-right: 120px">
<div class="block">
<span class="demonstration">日期</span>
<el-date-picker
v-model="inquire.time"
type="daterange"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</div>
</div>
<!-- 查询按钮 -->
<el-button style="" type="primary" @click="getData()">查询</el-button>
<el-button style="" type="primary" @click="exportDate()">导出</el-button>
@@ -96,6 +110,7 @@ import {
getRewardList,
luckyGiftRewardRecordExport,
} from "@/api/lucky/luckyGiftRangeConfig";
import { dateFormat } from "@/utils/system-helper";
import { ElMessage } from "element-plus";
export default {
name: "LuckyGiftDetail",
@@ -107,6 +122,7 @@ export default {
gifts: [],
giftId: "",
senUserId: "",
time: "",
},
// 表格
tableData: [],
@@ -133,11 +149,19 @@ export default {
// 查询
getData() {
this.loading = true;
let startTime = "";
let endTime = "";
if (this.inquire.time && this.inquire.time.length > 0) {
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss");
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss");
}
getGiftSendPage({
page: this.currentPage,
pageSize: this.pageSize,
giftId: this.inquire.giftId,
sendErBanNo: this.inquire.senUserId,
startTime: startTime,
endTime: endTime,
}).then((res) => {
this.total = res.data.total;
this.tableData = res.data.records;
@@ -154,14 +178,24 @@ export default {
// 导出
exportDate() {
var obj = {};
let startTime = "";
let endTime = "";
if (this.inquire.time && this.inquire.time.length > 0) {
startTime = dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss");
endTime = dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss");
}
if (this.inquire.giftId == null || this.inquire.giftId == "null") {
obj = {
sendErBanNo: this.inquire.senUserId,
startTime: dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss"),
endTime: dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss"),
};
} else {
obj = {
giftId: this.inquire.giftId,
sendErBanNo: this.inquire.senUserId,
startTime: dateFormat(this.inquire.time[0], "yyyy-MM-dd hh:mm:ss"),
endTime: dateFormat(this.inquire.time[1], "yyyy-MM-dd hh:mm:ss"),
};
}