Commit e6d1db92 authored by chenwei's avatar chenwei

兑换记录导入 导出

parent 0964f273
<template>
<div class="app-container">
<el-form
:model="queryParams"
v-show="showSearch"
ref="queryForm"
:model="queryParams"
size="small"
v-show="showSearch"
:inline="true"
label-width="120px"
>
<el-form-item :label="$t('礼品名称')">
<el-input
style="width: 300px"
v-model.trim="queryParams.rewardTitle"
style="width: 300px"
:placeholder="$t('请输入礼品名称')"
clearable
@keyup.enter.native="handleQuery"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="$t('会员昵称')">
<el-input
style="width: 300px"
v-model.trim="queryParams.memberName"
style="width: 300px"
:placeholder="$t('请输入会员昵称')"
clearable
@keyup.enter.native="handleQuery"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="$t('兑换方式')">
<dict-selector
v-model="queryParams.redeemType"
clearable
:type="DICT_TYPE.WAY_OF_RECEIVING"
v-model="queryParams.redeemType"
>
</dict-selector>
/>
</el-form-item>
<el-form-item :label="$t('状态')">
<dict-selector
v-model="queryParams.status"
clearable
:type="DICT_TYPE.REWARD_REDEEM_STATUS"
v-model="queryParams.status"
>
</dict-selector>
/>
</el-form-item>
<el-form-item :label="$t('数量')">
<el-row :gutter="10" style="width: 300px">
<el-col :span="10">
<dict-selector
v-model="queryParams.rewardCountOperate"
clearable
:type="DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL"
v-model="queryParams.rewardCountOperate"
@change="handleQuery"
>
</dict-selector>
/>
</el-col>
<el-col :span="14">
<el-input
v-model.trim="queryParams.rewardCount"
:placeholder="$t('请输入数字')"
clearable
@keyup.enter.native="handleQuery"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@keyup.enter.native="handleQuery"
/>
</el-col>
</el-row>
</el-form-item>
<el-form-item :label="$t('兑换时间')">
<el-date-picker
v-model="dateRangeCreateTime"
type="datetimerange"
clearable
placement="bottom-start"
v-model="dateRangeCreateTime"
style="width: 240px"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="-"
......@@ -81,22 +78,21 @@
</el-form-item>
<el-form-item :label="$t('礼品ID')">
<el-input
style="width: 300px"
v-model.trim="queryParams.rewardCode"
style="width: 300px"
:placeholder="$t('请输入礼品ID')"
clearable
@keyup.enter.native="handleQuery"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="$t('兑换入口')">
<dict-selector
v-model="queryParams.entrance"
clearable
:type="DICT_TYPE.PLATFORM_TYPE"
v-model="queryParams.entrance"
@change="handleQuery"
>
</dict-selector>
/>
</el-form-item>
<el-form-item :label="$t('兑换网点')">
......@@ -126,89 +122,83 @@
</el-form>
<el-row class="mb8">
<el-button
v-hasPermi="['ecw:memberManagement:newExchange']"
type="success"
size="mini"
icon="el-icon-plus"
v-hasPermi="['ecw:memberManagement:newExchange']"
@click="handleNewExchange"
>{{ $t("新增兑换") }}</el-button
>
>{{ $t("新增兑换") }}</el-button>
<el-button
v-hasPermi="['ecw:memberManagement:batchWriteOff']"
type="success"
size="mini"
icon="el-icon-plus"
v-hasPermi="['ecw:memberManagement:batchWriteOff']"
@click="handleBatchVerify"
>{{ $t("批量核销") }}</el-button
>
>{{ $t("批量核销") }}</el-button>
<el-button
v-hasPermi="['ecw:memberManagement:export']"
type="success"
size="mini"
icon="el-icon-plus"
@click="handleBatchExport"
v-hasPermi="['ecw:memberManagement:export']"
>{{ $t("导出") }}</el-button
>
>{{ $t("导出") }}</el-button>
<el-button
v-hasPermi="['ecw:memberManagement:exchangeoInfoImport']"
type="success"
size="mini"
icon="el-icon-plus"
@click="handleShowFileUploadDialog"
v-hasPermi="['ecw:memberManagement:exchangeoInfoImport']"
>{{ $t("兑换信息导入") }}</el-button
>
>{{ $t("兑换信息导入") }}</el-button>
<right-toolbar
:showSearch.sync="showSearch"
:show-search.sync="showSearch"
@queryTable="handleQueryPagination"
></right-toolbar>
/>
</el-row>
<el-table
ref="multipleTable"
v-loading="loading"
@selection-change="handleSelectionChange"
:data="memberList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column type="selection" width="55" />
<el-table-column
width="140"
:label="$t('兑换记录ID')"
align="center"
prop="id"
></el-table-column>
/>
<el-table-column
width="140"
:label="$t('礼品ID')"
align="center"
prop="rewardCode"
></el-table-column>
/>
<el-table-column
:label="$t('礼品名称')"
align="center"
:prop="isChinese ? 'rewardTitleZh' : 'rewardTitleEn'"
></el-table-column>
/>
<el-table-column :label="$t('会员名称')" align="center">
<template v-slot="{ row }">
<template #default="{ row }">
<el-button
type="text"
@click="
$router.push('/member/member/member-details/' + row.memberId)
"
>{{ isChinese ? row.memberNameZh : row.memberNameEn }}</el-button
>
>{{ isChinese ? row.memberNameZh : row.memberNameEn }}</el-button>
</template>
</el-table-column>
<el-table-column :label="$t('兑换时间')" align="center">
<template v-slot="{ row }">
{{ parseTime(row.redemptionTime) || "/" }}</template
>
<template #default="{ row }">
{{ parseTime(row.redemptionTime) || "/" }}</template>
</el-table-column>
<el-table-column
:label="$t('兑换积分')"
align="center"
prop="totalCount"
></el-table-column>
/>
<el-table-column width="140" :label="$t('兑换入口')" align="center">
<template v-slot="{ row }">
<template #default="{ row }">
{{
isChinese
? handleExchangeEntrance(row.entrance).label
......@@ -221,10 +211,9 @@
:label="$t('兑换网点')"
align="center"
:prop="isChinese ? 'nodeTitleZh' : 'nodeTitleEn'"
>
</el-table-column>
/>
<el-table-column width="140" :label="$t('领取方式')" align="center">
<template v-slot="{ row }">
<template #default="{ row }">
{{
isChinese
? handleExchangeRedeemType(row.redeemType).label
......@@ -233,7 +222,7 @@
</template>
</el-table-column>
<el-table-column width="140" :label="$t('状态')" align="center">
<template v-slot="{ row }">
<template #default="{ row }">
{{
isChinese
? handleExchangeStatus(row.status).label
......@@ -246,26 +235,25 @@
:label="$t('备注')"
align="center"
prop="remark"
></el-table-column
>
/>
<el-table-column
width="140"
:label="$t('数量')"
align="center"
prop="rewardCount"
></el-table-column>
/>
<el-table-column
width="140"
:label="$t('创建人')"
align="center"
prop="creatorName"
></el-table-column>
/>
<el-table-column
width="140"
:label="$t('更新人')"
align="center"
prop="updaterName"
></el-table-column>
/>
<el-table-column
width="220px"
align="center"
......@@ -274,49 +262,44 @@
>
<template slot-scope="scope">
<el-button
v-hasPermi="['ecw:memberManagement:cancel']"
size="mini"
type="text"
icon="el-icon-view"
@click="handleRewardCancel(scope.row)"
:disabled="scope.row.status != '1'"
v-hasPermi="['ecw:memberManagement:cancel']"
>{{ $t("撤销") }}</el-button
>
@click="handleRewardCancel(scope.row)"
>{{ $t("撤销") }}</el-button>
<el-button
v-hasPermi="['ecw:memberManagement:edit']"
size="mini"
type="text"
icon="el-icon-edit"
@click="handleRewardEdit(scope.row)"
:disabled="scope.row.status != '1'"
v-hasPermi="['ecw:memberManagement:edit']"
>{{ $t("编辑") }}</el-button
>
@click="handleRewardEdit(scope.row)"
>{{ $t("编辑") }}</el-button>
<el-button
v-hasPermi="['ecw:memberManagement:view']"
size="mini"
type="text"
icon="el-icon-edit"
@click="handleViewRecord(scope.row)"
v-hasPermi="['ecw:memberManagement:view']"
>{{ $t("查看") }}</el-button
>
>{{ $t("查看") }}</el-button>
<el-button
v-hasPermi="['ecw:memberManagement:verification']"
size="mini"
type="text"
icon="el-icon-edit"
@click="handleVerify(scope.row)"
:disabled="scope.row.status != '1'"
v-hasPermi="['ecw:memberManagement:verification']"
>{{ $t("核销") }}</el-button
>
@click="handleVerify(scope.row)"
>{{ $t("核销") }}</el-button>
<el-button
v-hasPermi="['ecw:memberManagement:verificationRollback']"
size="mini"
type="text"
icon="el-icon-delete"
@click="handleVerificationRollback(scope.row)"
:disabled="scope.row.status != '2'"
v-hasPermi="['ecw:memberManagement:verificationRollback']"
>{{ $t("核销回退") }}</el-button
>
@click="handleVerificationRollback(scope.row)"
>{{ $t("核销回退") }}</el-button>
</template>
</el-table-column>
</el-table>
......@@ -349,11 +332,11 @@
:auto-upload="false"
drag
>
<i class="el-icon-upload"></i>
<i class="el-icon-upload" />
<div class="el-upload__text">
{{ $t("将文件拖到此处,或") }}<em>{{ $t("点击上传") }}</em>
</div>
<div class="el-upload__tip text-center" slot="tip">
<div slot="tip" class="el-upload__tip text-center">
<span>仅允许导入xls、xlsx格式文件。</span>
<el-link
type="primary"
......@@ -380,8 +363,8 @@
:before-close="handleClose"
>
<el-form
:model="batchVerifyForm"
ref="numberValidateForm"
:model="batchVerifyForm"
label-width="100px"
class="demo-ruleForm"
>
......@@ -393,19 +376,19 @@
<el-input
v-model.number="batchVerifyForm.verifyUser"
autocomplete="off"
></el-input>
/>
</el-form-item>
<el-form-item
:label="$t('核销时间')"
:rules="[{ required: true, message: $t('核销时间不能为空') }]"
>
<el-date-picker
v-model="batchVerifyForm.verifyTime"
type="date"
placement="bottom-start"
value-format="yyyy-MM-dd HH:mm:ss"
:placeholder="$t('选择核销时间')"
v-model="batchVerifyForm.verifyTime"
></el-date-picker>
/>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
......@@ -434,8 +417,7 @@
:key="item.id"
:label="isChinese ? item.memberNameZh : item.memberNameEn"
:value="item.id"
>
</el-option>
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('操作')">
......@@ -444,8 +426,7 @@
v-for="dict in getDictDatas(DICT_TYPE.MEMBER_SCORE_OPERATE_TYPE)"
:key="dict.value"
:label="dict.value"
>{{ $l(dict, "label") }}</el-radio
>
>{{ $l(dict, "label") }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('积分')">
......@@ -456,7 +437,7 @@
/>
</el-form-item>
<el-form-item :label="$t('备注')">
<el-input type="textarea" v-model="formQuery.comment"></el-input>
<el-input v-model="formQuery.comment" type="textarea" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
......@@ -469,8 +450,8 @@
</div>
</template>
<script>
import { getDictDatas, DICT_TYPE } from "@/utils/dict";
import { getNodeList } from "@/api/ecw/giftManagement";
import { getDictDatas, DICT_TYPE } from '@/utils/dict'
import { getNodeList } from '@/api/ecw/giftManagement'
import {
queryMemberExchangeRecord,
batchVerifyAPI,
......@@ -478,19 +459,19 @@ import {
batchRecordImport,
batchRecordImportTemplate,
rewardCancelQuery,
verifyRollback,
} from "@/api/ecw/memberManagement";
import { getNowDateTime, parseTime } from "@/utils/ruoyi";
import { getBaseHeader } from "@/utils/request";
verifyRollback
} from '@/api/ecw/memberManagement'
import { getNowDateTime, parseTime } from '@/utils/ruoyi'
import { getBaseHeader } from '@/utils/request'
export default {
name: "exchangeRecord",
name: 'ExchangeRecord',
data() {
return {
upload: {
// 是否显示弹出层(用户导入)
open: false,
// 弹出层标题(用户导入)
title: this.$t("兑换信息导入"),
title: this.$t('兑换信息导入'),
// 是否禁用上传
isUploading: false,
// 设置上传的请求头部
......@@ -498,14 +479,14 @@ export default {
// 上传的地址
url:
process.env.VUE_APP_BASE_API +
"/admin-api/reward/redeem/record/import",
'/admin-api/reward/redeem/record/import'
},
//批量核销
// 批量核销
dialogBatchVerify: false,
batchVerifyForm: {
ids: [],
verifyTime: "",
verifyUser: "",
verifyTime: '',
verifyUser: ''
},
// 显示搜索条件
showSearch: true,
......@@ -517,278 +498,278 @@ export default {
dialogVisible: false,
memberList: [],
formQuery: {
comment: "",
comment: '',
memberIds: [],
operateType: null,
scoreCount: null,
scoreCount: null
},
queryParams: {
rewardTitle: "",
memberName: "", //会员昵称
redeemType: "", //兑换方式
status: "",
rewardCount: "",
rewardCountOperate: "",
rewardCode: "",
entrance: "", //兑换入口
startTime: "",
endTime: "",
nodeId: "",
rewardTitle: '',
memberName: '', // 会员昵称
redeemType: '', // 兑换方式
status: '',
rewardCount: '',
rewardCountOperate: '',
rewardCode: '',
entrance: '', // 兑换入口
startTime: '',
endTime: '',
nodeId: '',
pageNo: 1,
pageSize: 10,
pageSize: 10
},
// 网点
nodeList: [],
};
nodeList: []
}
},
computed: {
isChinese() {
return this.$i18n.locale === "zh_CN";
},
return this.$i18n.locale === 'zh_CN'
}
},
created() {
this.getNodeListAPI();
this.handleQuery();
this.getNodeListAPI()
this.handleQuery()
},
activated() {
this.handleQuery();
this.handleQuery()
},
methods: {
//核销回退
// 核销回退
handleVerificationRollback(row) {
this.$confirm(this.$t("是否继续核销回退?"), this.$t("提示"), {
confirmButtonText: this.$t("确定"),
cancelButtonText: this.$t("取消"),
type: "warning",
this.$confirm(this.$t('是否继续核销回退?'), this.$t('提示'), {
confirmButtonText: this.$t('确定'),
cancelButtonText: this.$t('取消'),
type: 'warning'
})
.then(() => {
let params = {
redeemIds: [row.id],
};
const params = {
redeemIds: [row.id]
}
verifyRollback(params).then((res) => {
this.$message({
type: "success",
message: this.$t("回退成功!"),
});
this.handleQuery();
});
type: 'success',
message: this.$t('回退成功!')
})
this.handleQuery()
})
})
.catch(() => {
this.$message({
type: "info",
message: this.$t("已取消回退"),
});
});
type: 'info',
message: this.$t('已取消回退')
})
})
},
//核销
// 核销
handleVerify(row) {
this.$router.push({
path: "/memberManagement/exchangeRecordOperation",
query: { exchangeRewardID: row.id, pageStatus: "verify" },
});
path: '/memberManagement/exchangeRecordOperation',
query: { exchangeRewardID: row.id, pageStatus: 'verify' }
})
},
//查看按钮操作
// 查看按钮操作
handleViewRecord(row) {
this.$router.push({
path: "/memberManagement/exchangeRecordOperation",
query: { exchangeRewardID: row.id, pageStatus: "view" },
});
path: '/memberManagement/exchangeRecordOperation',
query: { exchangeRewardID: row.id, pageStatus: 'view' }
})
},
//兑换记录编辑操作
// 兑换记录编辑操作
handleRewardEdit(row) {
this.$router.push({
path: "/memberManagement/exchangeRecordOperation",
query: { exchangeRewardID: row.id, pageStatus: "edit" },
});
path: '/memberManagement/exchangeRecordOperation',
query: { exchangeRewardID: row.id, pageStatus: 'edit' }
})
},
//撤销按钮操作
// 撤销按钮操作
handleRewardCancel(row) {
this.$confirm(
this.$t("此操作积分可能存在到期积分, 撤销后积分将进行扣除,是否继续?"),
this.$t("提示"),
this.$t('此操作积分可能存在到期积分, 撤销后积分将进行扣除,是否继续?'),
this.$t('提示'),
{
confirmButtonText: this.$t("确定"),
cancelButtonText: this.$t("取消"),
type: "warning",
confirmButtonText: this.$t('确定'),
cancelButtonText: this.$t('取消'),
type: 'warning'
}
)
.then(() => {
let params = {
id: row.id,
};
const params = {
id: row.id
}
rewardCancelQuery(params).then((res) => {
this.$message({
type: "success",
message: this.$t("撤销成功!"),
});
this.handleQuery();
});
type: 'success',
message: this.$t('撤销成功!')
})
this.handleQuery()
})
})
.catch(() => {
this.$message({
type: "info",
message: this.$t("已取消撤销"),
});
});
type: 'info',
message: this.$t('已取消撤销')
})
})
},
//下载导入模板
// 下载导入模板
importTemplate() {
batchRecordImportTemplate().then((res) => {
this.$download.excel(res, "用户导入模板.xls");
this.$download.excel(res, '用户导入模板.xls')
this.$message({
message: this.$t("下载模板成功"),
type: "success",
});
});
message: this.$t('下载模板成功'),
type: 'success'
})
})
},
//导入
// 导入
handleShowFileUploadDialog() {
this.upload.open = true;
this.upload.open = true
},
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
this.upload.isUploading = true
},
// 文件上传成功处理
handleFileSuccess(response, file, fileList) {
if (response.code == "1001011027") {
this.$message.error(response.msg);
if (response.code == '1001011027') {
this.$message.error(response.msg)
}
if (
!response.data.redeemIdFailedMap ||
JSON.stringify(response.data.redeemIdFailedMap) == "{}"
JSON.stringify(response.data.redeemIdFailedMap) == '{}'
) {
this.upload.open = false;
this.$modal.msgSuccess(this.$t("导入成功"));
this.handleQuery();
return;
this.upload.open = false
this.$modal.msgSuccess(this.$t('导入成功'))
this.$refs.upload.clearFiles()
this.upload.isUploading = false
this.handleQuery()
return
}
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
this.upload.open = false
this.upload.isUploading = false
this.$refs.upload.clearFiles()
// 拼接提示语
let data = response.data;
let text = `${this.$t("导入失败:")}`;
const data = response.data
let text = `${this.$t('导入失败:')}`
for (const username in data.redeemIdFailedMap) {
text +=
"<br />&nbsp;&nbsp;&nbsp;&nbsp;" +
'<br />&nbsp;&nbsp;&nbsp;&nbsp;' +
username +
this.$t("") +
data.redeemIdFailedMap[username];
this.$t('') +
data.redeemIdFailedMap[username]
}
text += `<br />&nbsp;&nbsp;&nbsp;&nbsp;${this.$t("以上数据格式有问题")}`;
this.$alert(text, this.$t("导入结果"), {
dangerouslyUseHTMLString: true,
});
text += `<br />&nbsp;&nbsp;&nbsp;&nbsp;${this.$t('以上数据格式有问题')}`
this.$alert(text, this.$t('导入结果'), {
dangerouslyUseHTMLString: true
})
},
// 提交上传文件
submitFileForm() {
this.$refs.upload.submit();
this.$refs.upload.submit()
},
//导出
// 导出
handleBatchExport() {
let params = { ...this.queryParams };
const params = { ...this.queryParams }
if (this.dateRangeCreateTime) {
params.startTime = this.dateRangeCreateTime[0];
params.endTime = this.dateRangeCreateTime[1];
params.pageNo = null;
params.pageSize = null;
params.startTime = this.dateRangeCreateTime[0]
params.endTime = this.dateRangeCreateTime[1]
}
batchRecordExport(params).then((res) => {
this.$message({
message: this.$t("已加入导出队列,请稍后在下载日志中下载"),
type: "success",
});
});
message: this.$t('已加入导出队列,请稍后在下载日志中下载'),
type: 'success'
})
})
},
//批量核销确认按钮
// 批量核销确认按钮
handleBatchVerifySubmit() {
this.$confirm(this.$t("确认提交?"))
this.$confirm(this.$t('确认提交?'))
.then((_) => {
let params = { ...this.batchVerifyForm };
const params = { ...this.batchVerifyForm }
batchVerifyAPI(params).then((res) => {
this.dialogBatchVerify = false;
this.dialogBatchVerify = false
this.$message({
message: this.$t("核销成功"),
type: "success",
});
});
message: this.$t('核销成功'),
type: 'success'
})
.catch((_) => {});
})
})
.catch((_) => {})
},
// 批量核销
handleBatchVerify() {
if (this.batchVerifyForm.ids.length > 0) {
this.dialogBatchVerify = true;
this.batchVerifyForm.verifyUser = this.$store.getters.name;
this.batchVerifyForm.verifyTime = getNowDateTime();
this.dialogBatchVerify = true
this.batchVerifyForm.verifyUser = this.$store.getters.name
this.batchVerifyForm.verifyTime = getNowDateTime()
} else {
this.$message({
message: this.$t("请先选择兑换记录"),
type: "warning",
});
message: this.$t('请先选择兑换记录'),
type: 'warning'
})
}
},
// 新增兑换
handleNewExchange() {
this.$router.push({
path: "/memberManagement/exchangeRecordOperation",
});
path: '/memberManagement/exchangeRecordOperation'
})
},
getNodeListAPI() {
getNodeList().then((res) => {
this.nodeList = res.data;
});
this.nodeList = res.data
})
},
handleExchangeRedeemType(id) {
return this.getDictDatas(DICT_TYPE.WAY_OF_RECEIVING).filter(
(item) => item.value == id
)[0];
)[0]
},
//兑换入口
// 兑换入口
handleExchangeEntrance(id) {
return this.getDictDatas(DICT_TYPE.PLATFORM_TYPE).filter(
(item) => item.value == id
)[0];
)[0]
},
//兑换状态
// 兑换状态
handleExchangeStatus(id) {
return this.getDictDatas(DICT_TYPE.REWARD_REDEEM_STATUS).filter(
(item) => item.value == id
)[0];
)[0]
},
handleScoreSubmit() {
this.$confirm(this.$t("确认提交?"))
this.$confirm(this.$t('确认提交?'))
.then((_) => {
let params = { ...this.formQuery };
const params = { ...this.formQuery }
operateMemberScore(params).then((res) => {
this.dialogVisible = true;
this.dialogVisible = true
this.formQuery = {
comment: "",
comment: '',
memberIds: [],
operateType: null,
scoreCount: null,
};
this.selectedMember = [];
this.$message.success(this.$t("操作成功"));
});
scoreCount: null
}
this.selectedMember = []
this.$message.success(this.$t('操作成功'))
})
.catch((_) => {});
})
.catch((_) => {})
},
handleClose(done) {
this.$confirm(this.$t("确认关闭?"))
this.$confirm(this.$t('确认关闭?'))
.then((_) => {
done();
done()
})
.catch((_) => {});
.catch((_) => {})
},
handleSelectionChange(val) {
this.selectedMember = val;
this.selectedMember = val
this.batchVerifyForm.ids = val.map((item) => {
return item.id;
});
return item.id
})
},
dialogBeforeClose() {
this.loading = true;
this.loading = true
this.queryParams = {
country: null,
city: null,
......@@ -800,37 +781,37 @@ export default {
pageSize: 10,
startTime: null,
usedScore: null,
usedScoreOperate: null,
};
usedScoreOperate: null
}
},
handleQuery() {
this.queryParams.pageNo = 1;
let params = { ...this.queryParams };
this.queryParams.pageNo = 1
const params = { ...this.queryParams }
if (this.dateRangeCreateTime) {
params.startTime = this.dateRangeCreateTime[0];
params.endTime = this.dateRangeCreateTime[1];
params.startTime = this.dateRangeCreateTime[0]
params.endTime = this.dateRangeCreateTime[1]
}
queryMemberExchangeRecord(params).then((res) => {
this.loading = false;
this.memberList = res.data.list;
this.total = res.data.total;
});
this.loading = false
this.memberList = res.data.list
this.total = res.data.total
})
},
handleQueryPagination() {
let params = { ...this.queryParams };
const params = { ...this.queryParams }
if (this.dateRangeCreateTime) {
params.startTime = this.dateRangeCreateTime[0];
params.endTime = this.dateRangeCreateTime[1];
params.startTime = this.dateRangeCreateTime[0]
params.endTime = this.dateRangeCreateTime[1]
}
queryMemberExchangeRecord(params).then((res) => {
this.loading = false;
this.memberList = res.data.list;
this.total = res.data.total;
});
this.loading = false
this.memberList = res.data.list
this.total = res.data.total
})
},
resetQuery() {
this.loading = true;
this.dateRangeCreateTime = [];
this.loading = true
this.dateRangeCreateTime = []
this.queryParams = {
country: null,
city: null,
......@@ -842,10 +823,10 @@ export default {
pageSize: 10,
startTime: null,
usedScore: null,
usedScoreOperate: null,
};
this.handleQuery();
},
},
};
usedScoreOperate: null
}
this.handleQuery()
}
}
}
</script>
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