Commit 6c1a7e40 authored by chenwei's avatar chenwei

Merge branch 'cherry-pick-51f39326' into 'dev'

Merge branch 'feature/member-defect-604' into 'pre-release'

See merge request !80
parents 4cc8df4a 569ab5d0
......@@ -4514,6 +4514,7 @@
"会员电话": "Member Phone NO.",
"请输入会员电话": "Please input Member Phone NO.",
"礼品名称": "gift name",
"礼品": "gift name",
"请输入礼品名称": "Please input gift name",
"请输入数字": "Please input number",
"兑换积分": "Redeem Points",
......@@ -4565,6 +4566,7 @@
"请输入兑换数量": "Please enter the amount of redemption",
"兑换方式": "Method of Exchange",
"兑换入口": "Exchange entry",
"入口": "Exchange entry",
"收件人姓名": "Recipient's name",
"请输入收件人姓名": "Please enter recipient name",
"收件人电话": "Recipient phone number",
......@@ -4648,7 +4650,7 @@
"请输入查找": "Please enter to find ",
"删除规则": "Delete Rules ",
"积分范围": "Integral Range ",
"兑换记录ID": "Exchange Record ID",
"记录ID": "Exchange Record ID",
"核销回退": "Write-off rollback ",
"请输入礼品积分": "Please enter Gift points ",
"请输入当前积分": "Please enter current credits ",
......
......@@ -81,22 +81,22 @@
<!-- v值积分 -->
<el-col :span="18">
<el-form-item :label="$t('积分')" v-if="queryParams.type == '1'" required>
<el-row type="flex" justify="start" v-for="(item, index) in queryParams.extraOrderV.orderVRule">
<el-col :span="2">
<el-form-item :prop="'extraOrderV.orderVRule.' + index + '.low'" :rules="rules.extraOrderV.orderVRule.low"> <el-input style="width: 100px" v-model.number="item.low"></el-input></el-form-item>
<el-row v-for="(item, index) in queryParams.extraOrderV.orderVRule">
<el-col :span="4">
<el-form-item :prop="'extraOrderV.orderVRule.' + index + '.low'" :rules="rules.extraOrderV.orderVRule.low"> <el-input style="width: 120px" v-model.number="item.low"></el-input></el-form-item>
</el-col>
<el-col :span="1">
<el-col :span="2">
{{ queryParams.extraOrderV.transportType == "3" ? "kg" : "" }}
{{ $t("") }}
</el-col>
<el-col :span="2">
<el-form-item :prop="'extraOrderV.orderVRule.' + index + '.high'" :rules="rules.extraOrderV.orderVRule.high"> <el-input style="width: 100px" v-model.number="item.high"></el-input> </el-form-item
<el-col :span="4">
<el-form-item :prop="'extraOrderV.orderVRule.' + index + '.high'" :rules="rules.extraOrderV.orderVRule.high"> <el-input style="width: 120px" v-model.number="item.high"></el-input> </el-form-item
></el-col>
<el-col :span="1"> {{ queryParams.extraOrderV.transportType == "3" ? "kg" : "" }} = </el-col>
<el-col :span="2">
<el-form-item :prop="'extraOrderV.orderVRule.' + index + '.score'" :rules="rules.extraOrderV.orderVRule.score"><el-input style="width: 100px" v-model.number="item.score"></el-input></el-form-item>
<el-col :span="2"> {{ queryParams.extraOrderV.transportType == "3" ? "kg" : "" }} = </el-col>
<el-col :span="4">
<el-form-item :prop="'extraOrderV.orderVRule.' + index + '.score'" :rules="rules.extraOrderV.orderVRule.score"><el-input style="width: 120px" v-model.number="item.score"></el-input></el-form-item>
</el-col>
<el-col :span="1">
<el-col :span="2">
{{ $t("积分") }}
</el-col>
<el-col :span="1">
......@@ -573,6 +573,7 @@ export default {
},
extraOrderV: {
//订单V值扩展字段
channel: [],
firstOrder: "1",
orderEntry: null,
transportType: "", //运输方式
......
<template>
<div class="app-container">
<el-form
v-show="showSearch"
ref="queryForm"
:model="queryParams"
size="small"
:inline="true"
label-width="120px"
>
<el-form-item :label="$t('礼品名称')">
<el-input
v-model.trim="queryParams.rewardTitle"
style="width: 300px"
:placeholder="$t('请输入礼品名称')"
clearable
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@keyup.enter.native="handleQuery"
/>
<el-form v-show="showSearch" ref="queryForm" :model="queryParams" size="small" :inline="true" label-width="100px">
<el-form-item :label="$t('礼品')">
<el-input v-model.trim="queryParams.rewardTitle" :placeholder="$t('请输入礼品名称')" clearable onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('会员昵称')">
<el-input
v-model.trim="queryParams.memberName"
style="width: 300px"
:placeholder="$t('请输入会员昵称')"
clearable
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@keyup.enter.native="handleQuery"
/>
<el-input v-model.trim="queryParams.memberName" :placeholder="$t('请输入会员昵称')" clearable onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('会员编号')">
<el-input
v-model.trim="queryParams.memberCode"
style="width: 300px"
:placeholder="$t('请输入会员编号')"
clearable
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@keyup.enter.native="handleQuery"
/>
<el-input v-model.trim="queryParams.memberCode" :placeholder="$t('请输入会员编号')" clearable 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"
/>
<dict-selector v-model="queryParams.redeemType" clearable :type="DICT_TYPE.WAY_OF_RECEIVING" />
</el-form-item>
<el-form-item :label="$t('状态')">
<dict-selector
v-model="queryParams.status"
clearable
:type="DICT_TYPE.REWARD_REDEEM_STATUS"
/>
<dict-selector v-model="queryParams.status" clearable :type="DICT_TYPE.REWARD_REDEEM_STATUS" />
</el-form-item>
<el-form-item :label="$t('数量')">
<el-row :gutter="10" style="width: 300px">
<el-row style="width: 194px">
<el-col :span="10">
<dict-selector
v-model="queryParams.rewardCountOperate"
clearable
:type="DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL"
@change="handleQuery"
/>
<dict-selector v-model="queryParams.rewardCountOperate" clearable :type="DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL" @change="handleQuery" />
</el-col>
<el-col :span="14">
<el-input
v-model.trim="queryParams.rewardCount"
:placeholder="$t('请输入数字')"
clearable
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@keyup.enter.native="handleQuery"
/>
<el-col :span="12" :offset="2">
<el-input v-model.trim="queryParams.rewardCount" :placeholder="$t('请输入数字')" clearable 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"
style="width: 240px"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="-"
:start-placeholder="$t('开始日期')"
:end-placeholder="$t('结束日期')"
/>
</el-form-item>
<el-form-item :label="$t('礼品ID')">
<el-input
v-model.trim="queryParams.rewardCode"
style="width: 300px"
:placeholder="$t('请输入礼品ID')"
clearable
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@keyup.enter.native="handleQuery"
/>
<el-input v-model.trim="queryParams.rewardCode" :placeholder="$t('请输入礼品ID')" clearable 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"
@change="handleQuery"
/>
<dict-selector v-model="queryParams.entrance" clearable :type="DICT_TYPE.PLATFORM_TYPE" @change="handleQuery" />
</el-form-item>
<el-form-item :label="$t('兑换网点')">
<el-select
v-model="queryParams.nodeId"
:placeholder="$t('请选择兑换网点')"
clearable
size="small"
@change="handleQuery"
>
<el-option
v-for="nodeItem in nodeList"
:key="nodeItem.id"
:label="isChinese ? nodeItem.titleZh : nodeItem.titleEn"
:value="nodeItem.id"
/>
<el-select v-model="queryParams.nodeId" :placeholder="$t('请选择兑换网点')" clearable size="small" @change="handleQuery">
<el-option v-for="nodeItem in nodeList" :key="nodeItem.id" :label="isChinese ? nodeItem.titleZh : nodeItem.titleEn" :value="nodeItem.id" />
</el-select>
</el-form-item>
<el-form-item :label="$t('兑换记录ID')">
<el-input
v-model.trim="queryParams.redemptionNumber"
style="width: 300px"
:placeholder="$t('请输入')"
clearable
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@keyup.enter.native="handleQuery"
/>
<el-form-item :label="$t('记录ID')">
<el-input v-model.trim="queryParams.redemptionNumber" :placeholder="$t('请输入')" clearable onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('兑换时间')">
<el-date-picker style="width: 240px" v-model="dateRangeCreateTime" type="datetimerange" clearable placement="bottom-start" value-format="yyyy-MM-dd HH:mm:ss" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{
$t("搜索")
}}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{
$t("重置")
}}</el-button>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t("搜索") }}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{ $t("重置") }}</el-button>
</el-form-item>
</el-form>
<el-row class="mb8">
<el-button
v-hasPermi="['ecw:memberManagement:newExchange']"
type="success"
size="mini"
icon="el-icon-plus"
@click="handleNewExchange"
>{{ $t("新增兑换") }}</el-button
>
<el-button
v-hasPermi="['ecw:memberManagement:batchWriteOff']"
type="success"
size="mini"
icon="el-icon-plus"
@click="handleBatchVerify"
>{{ $t("批量核销") }}</el-button
>
<el-button
v-hasPermi="['ecw:memberManagement:export']"
type="success"
size="mini"
icon="el-icon-plus"
@click="handleBatchExport"
>{{ $t("导出") }}</el-button
>
<el-button
v-hasPermi="['ecw:memberManagement:exchangeoInfoImport']"
type="success"
size="mini"
icon="el-icon-plus"
@click="handleShowFileUploadDialog"
>{{ $t("兑换信息导入") }}</el-button
>
<right-toolbar
:show-search.sync="showSearch"
@queryTable="handleQueryPagination"
/>
<el-button v-hasPermi="['ecw:memberManagement:newExchange']" type="success" size="mini" icon="el-icon-plus" @click="handleNewExchange">{{ $t("新增兑换") }}</el-button>
<el-button v-hasPermi="['ecw:memberManagement:batchWriteOff']" type="success" size="mini" icon="el-icon-plus" @click="handleBatchVerify">{{ $t("批量核销") }}</el-button>
<el-button v-hasPermi="['ecw:memberManagement:export']" type="success" size="mini" icon="el-icon-plus" @click="handleBatchExport">{{ $t("导出") }}</el-button>
<el-button v-hasPermi="['ecw:memberManagement:exchangeoInfoImport']" type="success" size="mini" icon="el-icon-plus" @click="handleShowFileUploadDialog">{{ $t("兑换信息导入") }}</el-button>
<right-toolbar :show-search.sync="showSearch" @queryTable="handleQueryPagination" />
</el-row>
<el-table
ref="multipleTable"
v-loading="loading"
:data="memberList"
@selection-change="handleSelectionChange"
>
<el-table ref="multipleTable" v-loading="loading" :data="memberList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" />
<el-table-column
width="140"
:label="$t('兑换记录ID')"
align="center"
>
<el-table-column width="100" :label="$t('记录ID')" align="center">
<template #default="{ row }">
<el-button
size="mini"
type="text"
@click="handleViewRecord(row )"
>{{ row.redemptionNumber}}</el-button
>
<el-button size="mini" type="text" @click="handleViewRecord(row)">{{ row.redemptionNumber }}</el-button>
</template>
</el-table-column>
<el-table-column
width="140"
:label="$t('礼品ID')"
align="center"
prop="rewardCode"
/>
<el-table-column :label="$t('礼品名称')" align="center">
<el-table-column width="90" :label="$t('礼品ID')" align="center" prop="rewardCode" />
<el-table-column width="160" :label="$t('礼品')" align="center" :show-overflow-tooltip="true">
<template #default="{ row }">
<el-button type="text" @click="handleShowRewardsDetail(row)">{{
isChinese ? row.rewardTitleZh : row.rewardTitleEn
}}</el-button>
<el-button type="text" @click="handleShowRewardsDetail(row)">{{ isChinese ? row.rewardTitleZh : row.rewardTitleEn }}</el-button>
</template>
</el-table-column>
<el-table-column :label="$t('会员名称')" align="center">
<el-table-column :label="$t('会员')" align="center">
<template #default="{ row }">
<el-button
type="text"
@click="
$router.push('/member/member/member-details/' + row.memberId)
"
>{{ isChinese ? row.memberNameZh : row.memberNameEn }}</el-button
>
<el-button type="text" @click="$router.push('/member/member/member-details/' + row.memberId)">{{ isChinese ? row.memberNameZh : row.memberNameEn }}</el-button>
</template>
</el-table-column>
<el-table-column :label="$t('兑换时间')" align="center">
<template #default="{ row }">
{{ parseTime(row.redemptionTime) || "/" }}</template
>
<el-table-column width="180" :label="$t('时间')" align="center">
<template #default="{ row }"> {{ parseTime(row.redemptionTime) || "/" }}</template>
</el-table-column>
<el-table-column
:label="$t('兑换积分')"
align="center"
prop="totalCount"
/>
<el-table-column width="140" :label="$t('兑换入口')" align="center">
<el-table-column :label="$t('积分')" align="center" prop="totalCount" />
<el-table-column width="60" :label="$t('数量')" align="center" prop="rewardCount" />
<el-table-column width="60" :label="$t('入口')" align="center">
<template #default="{ row }">
{{
isChinese
? handleExchangeEntrance(row.entrance).label
: handleExchangeEntrance(row.entrance).labelEn
}}
{{ isChinese ? handleExchangeEntrance(row.entrance).label : handleExchangeEntrance(row.entrance).labelEn }}
</template>
</el-table-column>
<el-table-column
width="140"
:label="$t('兑换网点')"
align="center"
:prop="isChinese ? 'nodeTitleZh' : 'nodeTitleEn'"
/>
<el-table-column width="140" :label="$t('领取方式')" align="center">
<el-table-column width="100" :label="$t('网点')" align="center" :prop="isChinese ? 'nodeTitleZh' : 'nodeTitleEn'" />
<el-table-column width="90" :label="$t('领取方式')" align="center">
<template #default="{ row }">
{{
isChinese
? handleExchangeRedeemType(row.redeemType).label
: handleExchangeRedeemType(row.redeemType).labelEn
}}
{{ isChinese ? handleExchangeRedeemType(row.redeemType).label : handleExchangeRedeemType(row.redeemType).labelEn }}
</template>
</el-table-column>
<el-table-column width="140" :label="$t('状态')" align="center">
<el-table-column width="90" :label="$t('状态')" align="center">
<template #default="{ row }">
{{
isChinese
? handleExchangeStatus(row.status).label
: handleExchangeStatus(row.status).labelEn
}}
{{ isChinese ? handleExchangeStatus(row.status).label : handleExchangeStatus(row.status).labelEn }}
</template>
</el-table-column>
<el-table-column
width="140"
:label="$t('备注')"
align="center"
prop="remark"
/>
<el-table-column
width="140"
:label="$t('数量')"
align="center"
prop="rewardCount"
/>
<el-table-column
width="140"
:label="$t('创建人')"
align="center"
prop="creatorName"
/>
<el-table-column
width="140"
:label="$t('更新人')"
align="center"
prop="updaterName"
/>
<el-table-column
width="220px"
align="center"
:label="$t('操作')"
class-name="small-padding fixed-width"
>
<el-table-column width="140" :label="$t('备注')" align="center" prop="remark" />
<el-table-column width="100" :label="$t('创建人')" align="center" prop="creatorName" />
<el-table-column width="100" :label="$t('更新人')" align="center" prop="updaterName" />
<el-table-column width="280" align="center" fixed="right" :label="$t('操作')" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
v-hasPermi="['ecw:memberManagement:cancel']"
size="mini"
type="text"
icon="el-icon-view"
:disabled="scope.row.status != '1'"
@click="handleRewardCancel(scope.row)"
>{{ $t("撤销") }}</el-button
>
<el-button
v-hasPermi="['ecw:memberManagement:edit']"
size="mini"
type="text"
icon="el-icon-edit"
:disabled="scope.row.status != '1'"
@click="handleRewardEdit(scope.row)"
>{{ $t("编辑") }}</el-button
>
<el-button v-hasPermi="['ecw:memberManagement:cancel']" size="mini" type="text" icon="el-icon-view" :disabled="scope.row.status != '1'" @click="handleRewardCancel(scope.row)">{{ $t("撤销") }}</el-button>
<el-button v-hasPermi="['ecw:memberManagement:edit']" size="mini" type="text" icon="el-icon-edit" :disabled="scope.row.status != '1'" @click="handleRewardEdit(scope.row)">{{ $t("编辑") }}</el-button>
<!-- <el-button
v-hasPermi="['ecw:memberManagement:view']"
size="mini"
......@@ -323,151 +110,64 @@
@click="handleViewRecord(scope.row)"
>{{ $t("查看") }}</el-button
> -->
<el-button
v-hasPermi="['ecw:memberManagement:verification']"
size="mini"
type="text"
icon="el-icon-edit"
:disabled="scope.row.status != '1'"
@click="handleVerify(scope.row)"
>{{ $t("核销") }}</el-button
>
<el-button
v-hasPermi="['ecw:memberManagement:verificationRollback']"
size="mini"
type="text"
icon="el-icon-delete"
:disabled="scope.row.status != '2'"
@click="handleVerificationRollback(scope.row)"
>{{ $t("核销回退") }}</el-button
>
<el-button v-hasPermi="['ecw:memberManagement:verification']" size="mini" type="text" icon="el-icon-edit" :disabled="scope.row.status != '1'" @click="handleVerify(scope.row)">{{ $t("核销") }}</el-button>
<el-button v-hasPermi="['ecw:memberManagement:verificationRollback']" size="mini" type="text" icon="el-icon-delete" :disabled="scope.row.status != '2'" @click="handleVerificationRollback(scope.row)">{{ $t("核销回退") }}</el-button>
</template>
</el-table-column>
</el-table>
<!-- //分页列表 -->
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize"
@pagination="handleQueryPagination"
/>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" @pagination="handleQueryPagination" />
<!-- 批量导入 -->
<!-- 用户导入对话框 -->
<el-dialog
:title="upload.title"
:visible.sync="upload.open"
width="400px"
append-to-body
>
<el-upload
ref="upload"
:limit="1"
accept=".xlsx, .xls"
:headers="upload.headers"
:action="upload.url"
:disabled="upload.isUploading"
:on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess"
:auto-upload="false"
drag
>
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
<el-upload ref="upload" :limit="1" accept=".xlsx, .xls" :headers="upload.headers" :action="upload.url" :disabled="upload.isUploading" :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
<i class="el-icon-upload" />
<div class="el-upload__text">
{{ $t("将文件拖到此处,或") }}<em>{{ $t("点击上传") }}</em>
</div>
<div slot="tip" class="el-upload__tip text-center">
<span>仅允许导入xls、xlsx格式文件。</span>
<el-link
type="primary"
:underline="false"
style="font-size: 12px; vertical-align: baseline"
@click="importTemplate"
>{{ $t("下载模板") }}
</el-link>
<el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline" @click="importTemplate">{{ $t("下载模板") }} </el-link>
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm">{{
$t("确 定")
}}</el-button>
<el-button type="primary" @click="submitFileForm">{{ $t("确 定") }}</el-button>
<el-button @click="upload.open = false">{{ $t("取 消") }}</el-button>
</div>
</el-dialog>
<!-- 批量核销 -->
<el-dialog
:title="$t('批量核销')"
:visible.sync="dialogBatchVerify"
width="30%"
:before-close="handleClose"
>
<el-form
ref="numberValidateForm"
:model="batchVerifyForm"
label-width="100px"
class="demo-ruleForm"
>
<el-form-item
label="核销人"
prop="age"
:rules="[{ required: true, message: $t('核销人不能为空') }]"
>
<el-input
v-model.number="batchVerifyForm.verifyUser"
autocomplete="off"
/>
<el-dialog :title="$t('批量核销')" :visible.sync="dialogBatchVerify" width="30%" :before-close="handleClose">
<el-form ref="numberValidateForm" :model="batchVerifyForm" label-width="100px" class="demo-ruleForm">
<el-form-item label="核销人" prop="age" :rules="[{ required: true, message: $t('核销人不能为空') }]">
<el-input v-model.number="batchVerifyForm.verifyUser" autocomplete="off" />
</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('选择核销时间')"
/>
<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('选择核销时间')" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogBatchVerify = false">取 消</el-button>
<el-button type="primary" @click="handleBatchVerifySubmit">{{
$t("确认核销")
}}</el-button>
<el-button type="primary" @click="handleBatchVerifySubmit">{{ $t("确认核销") }}</el-button>
</span>
</el-dialog>
<!-- 查看 礼品 -->
<operating-gift
ref="operatingGift"
:title="operatingPagetitle"
:rewards-details="rewardsItem"
:show.sync="dialogVisible"
:node-list="nodeList"
/>
<operating-gift ref="operatingGift" :title="operatingPagetitle" :rewards-details="rewardsItem" :show.sync="dialogVisible" :node-list="nodeList" />
</div>
</template>
<script>
import { getDictDatas, DICT_TYPE } from "@/utils/dict";
import { getNodeList, getRewardsDetails } from "@/api/ecw/giftManagement";
import {
queryMemberExchangeRecord,
batchVerifyAPI,
batchRecordExport,
batchRecordImportTemplate,
rewardCancelQuery,
verifyRollback,
} from "@/api/ecw/memberManagement";
import { getNowDateTime, parseTime } from "@/utils/ruoyi";
import { getBaseHeader } from "@/utils/request";
import OperatingGift from "@/views/ecw/giftManagement/components/operatingGift.vue";
import { getDictDatas, DICT_TYPE } from "@/utils/dict"
import { getNodeList, getRewardsDetails } from "@/api/ecw/giftManagement"
import { queryMemberExchangeRecord, batchVerifyAPI, batchRecordExport, batchRecordImportTemplate, rewardCancelQuery, verifyRollback } from "@/api/ecw/memberManagement"
import { getNowDateTime, parseTime } from "@/utils/ruoyi"
import { getBaseHeader } from "@/utils/request"
import OperatingGift from "@/views/ecw/giftManagement/components/operatingGift.vue"
export default {
name: "EcwMembermanagementExchangerecord",
components: {
OperatingGift,
OperatingGift
},
data() {
return {
......@@ -481,16 +181,14 @@ export default {
// 设置上传的请求头部
headers: getBaseHeader(),
// 上传的地址
url:
process.env.VUE_APP_BASE_API +
"/admin-api/reward/redeem/record/import",
url: process.env.VUE_APP_BASE_API + "/admin-api/reward/redeem/record/import"
},
// 批量核销
dialogBatchVerify: false,
batchVerifyForm: {
ids: [],
verifyTime: "",
verifyUser: "",
verifyUser: ""
},
// 显示搜索条件
showSearch: true,
......@@ -507,12 +205,12 @@ export default {
comment: "",
memberIds: [],
operateType: null,
scoreCount: null,
scoreCount: null
},
queryParams: {
rewardTitle: "",
memberName: "", // 会员昵称
memberCode:"", //会员编号
memberCode: "", //会员编号
redeemType: "", // 兑换方式
status: "",
rewardCount: "",
......@@ -524,277 +222,259 @@ export default {
nodeId: "",
redemptionNumber: null,
pageNo: 1,
pageSize: 10,
pageSize: 10
},
// 网点
nodeList: [],
};
nodeList: []
}
},
computed: {
isChinese() {
return this.$i18n.locale === "zh_CN";
},
return this.$i18n.locale === "zh_CN"
}
},
watch: {
"$route.query.rewardCode": {
handler(val) {
if (val) {
this.queryParams.rewardCode = val;
this.queryParams.rewardCode = val
}
},
immediate: true,
immediate: true
},
"$route.query.memberCode": {
handler(val) {
if (val) {
this.queryParams.memberCode= val;
this.queryParams.memberCode = val
}
},
immediate: true,
},
immediate: true
}
},
created() {
this.getNodeListAPI();
this.handleQuery();
this.getNodeListAPI()
this.handleQuery()
},
activated() {
this.handleQuery();
this.handleQuery()
},
methods: {
handleShowRewardsDetail(row) {
let params = {
id: row.rewardId,
};
id: row.rewardId
}
getRewardsDetails(params).then((res) => {
this.dialogVisible = true;
this.operatingPagetitle = "1";
this.rewardsItem = res.data;
});
this.dialogVisible = true
this.operatingPagetitle = "1"
this.rewardsItem = res.data
})
},
// 核销回退
handleVerificationRollback(row) {
this.$confirm(this.$t("是否继续核销回退?"), this.$t("提示"), {
confirmButtonText: this.$t("确定"),
cancelButtonText: this.$t("取消"),
type: "warning",
type: "warning"
})
.then(() => {
const params = {
redeemIds: [row.id],
};
redeemIds: [row.id]
}
verifyRollback(params).then((res) => {
this.$message({
type: "success",
message: this.$t("回退成功!"),
});
this.handleQuery();
});
message: this.$t("回退成功!")
})
this.handleQuery()
})
})
.catch(() => {
this.$message({
type: "info",
message: this.$t("已取消回退"),
});
});
message: this.$t("已取消回退")
})
})
},
// 核销
handleVerify(row) {
this.$router.push({
path: "/member/memberManagement/exchangeRecordOperation",
query: { exchangeRewardID: row.id, pageStatus: "verify" },
});
query: { exchangeRewardID: row.id, pageStatus: "verify" }
})
},
// 查看按钮操作
handleViewRecord(row) {
this.$router.push({
path: "/member/memberManagement/exchangeRecordOperation",
query: { exchangeRewardID: row.id, pageStatus: "view" },
});
query: { exchangeRewardID: row.id, pageStatus: "view" }
})
},
// 兑换记录编辑操作
handleRewardEdit(row) {
this.$router.push({
path: "/member/memberManagement/exchangeRecordOperation",
query: { exchangeRewardID: row.id, pageStatus: "edit" },
});
query: { exchangeRewardID: row.id, pageStatus: "edit" }
})
},
// 撤销按钮操作
handleRewardCancel(row) {
this.$confirm(
this.$t("此操作积分可能存在到期积分, 撤销后积分将进行扣除,是否继续?"),
this.$t("提示"),
{
this.$confirm(this.$t("此操作积分可能存在到期积分, 撤销后积分将进行扣除,是否继续?"), this.$t("提示"), {
confirmButtonText: this.$t("确定"),
cancelButtonText: this.$t("取消"),
type: "warning",
}
)
type: "warning"
})
.then(() => {
const params = {
id: row.id,
};
id: row.id
}
rewardCancelQuery(params).then((res) => {
this.$message({
type: "success",
message: this.$t("撤销成功!"),
});
this.handleQuery();
});
message: this.$t("撤销成功!")
})
this.handleQuery()
})
})
.catch(() => {
this.$message({
type: "info",
message: this.$t("已取消撤销"),
});
});
message: this.$t("已取消撤销")
})
})
},
// 下载导入模板
importTemplate() {
batchRecordImportTemplate().then((res) => {
this.$download.excel(res, "用户导入模板.xls");
this.$download.excel(res, "用户导入模板.xls")
this.$message({
message: this.$t("下载模板成功"),
type: "success",
});
});
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);
this.$message.error(response.msg)
}
if (
!response.data.redeemIdFailedMap ||
JSON.stringify(response.data.redeemIdFailedMap) == "{}"
) {
this.upload.open = false;
this.$modal.msgSuccess(this.$t("导入成功"));
this.$refs.upload.clearFiles();
this.upload.isUploading = false;
this.handleQuery();
return;
if (!response.data.redeemIdFailedMap || JSON.stringify(response.data.redeemIdFailedMap) == "{}") {
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()
// 拼接提示语
const 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;" +
username +
this.$t("") +
data.redeemIdFailedMap[username];
text += "<br />&nbsp;&nbsp;&nbsp;&nbsp;" + username + this.$t("") + data.redeemIdFailedMap[username]
}
text += `<br />&nbsp;&nbsp;&nbsp;&nbsp;${this.$t("以上数据格式有问题")}`;
text += `<br />&nbsp;&nbsp;&nbsp;&nbsp;${this.$t("以上数据格式有问题")}`
this.$alert(text, this.$t("导入结果"), {
dangerouslyUseHTMLString: true,
});
dangerouslyUseHTMLString: true
})
},
// 提交上传文件
submitFileForm() {
this.$refs.upload.submit();
this.$refs.upload.submit()
},
// 导出
handleBatchExport() {
const 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]
}
batchRecordExport(params).then((res) => {
this.$message({
message: this.$t("已加入导出队列,请稍后在下载日志中下载"),
type: "success",
});
});
type: "success"
})
})
},
// 批量核销确认按钮
handleBatchVerifySubmit() {
this.$confirm(this.$t("确认提交?"))
.then((_) => {
const params = { ...this.batchVerifyForm };
const params = { ...this.batchVerifyForm }
batchVerifyAPI(params).then((res) => {
this.dialogBatchVerify = false;
this.dialogBatchVerify = false
this.$message({
message: this.$t("核销成功"),
type: "success",
});
});
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",
});
type: "warning"
})
}
},
// 新增兑换
handleNewExchange() {
this.$router.push({
path: "/member/memberManagement/exchangeRecordOperation",
});
path: "/member/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];
return this.getDictDatas(DICT_TYPE.WAY_OF_RECEIVING).filter((item) => item.value == id)[0]
},
// 兑换入口
handleExchangeEntrance(id) {
return this.getDictDatas(DICT_TYPE.PLATFORM_TYPE).filter(
(item) => item.value == id
)[0];
return this.getDictDatas(DICT_TYPE.PLATFORM_TYPE).filter((item) => item.value == id)[0]
},
// 兑换状态
handleExchangeStatus(id) {
return this.getDictDatas(DICT_TYPE.REWARD_REDEEM_STATUS).filter(
(item) => item.value == id
)[0];
return this.getDictDatas(DICT_TYPE.REWARD_REDEEM_STATUS).filter((item) => item.value == id)[0]
},
handleClose(done) {
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,
endTime: null,
holdScore: null,
memberCode:'',
memberCode: "",
holdScoreOperate: null,
key: null,
redemptionNumber: null,
......@@ -802,42 +482,42 @@ export default {
pageSize: 10,
startTime: null,
usedScore: null,
usedScoreOperate: null,
};
usedScoreOperate: null
}
},
handleQuery() {
this.queryParams.pageNo = 1;
const 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() {
const 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,
endTime: null,
memberCode:'',
memberCode: "",
holdScore: null,
holdScoreOperate: null,
key: null,
......@@ -846,10 +526,10 @@ export default {
redemptionNumber: null,
startTime: null,
usedScore: null,
usedScoreOperate: null,
};
this.handleQuery();
},
},
};
usedScoreOperate: null
}
this.handleQuery()
}
}
}
</script>
......@@ -87,7 +87,7 @@
<el-input :placeholder="$t('请输入兑换人')" clearable v-model="item.redeemer" :disabled="veriftyDisable" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" />
</el-form-item>
<el-form-item :label="$t('兑换时间')">
<el-date-picker type="date" placement="bottom-start" :disabled="veriftyDisable" value-format="yyyy-MM-dd HH:mm:ss" :placeholder="$t('选择兑换时间')" v-model="item.redemptionTime"></el-date-picker>
<el-date-picker type="datetime" placement="bottom-start" :disabled="veriftyDisable" value-format="yyyy-MM-dd HH:mm:ss" :placeholder="$t('选择兑换时间')" v-model="item.redemptionTime"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('快递公司')" v-if="item.redeemType != '1'">
<el-select v-model="item.courierCompany" :placeholder="$t('请选择快递公司')">
......
<template>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
v-show="showSearch"
:inline="true"
label-width="120px"
>
<el-form :model="queryParams" ref="queryForm" size="small" v-show="showSearch" :inline="true" label-width="120px">
<el-form-item :label="$t('关键词')">
<el-input
style="width: 300px"
v-model.trim="queryParams.key"
:placeholder="$t('请输入会员名称/会员编号/手机号')"
clearable
@keyup.enter.native="handleQuery"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
<el-input style="width: 300px" v-model.trim="queryParams.key" :placeholder="$t('请输入会员名称/会员编号/手机号')" clearable @keyup.enter.native="handleQuery" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" />
</el-form-item>
<el-form-item :label="$t('积分来源')">
<dict-selector
clearable
:type="DICT_TYPE.MEMBER_SCORE_SOURCE"
v-model="queryParams.sourceType"
@change="handleQuery"
>
</dict-selector>
<dict-selector clearable :type="DICT_TYPE.MEMBER_SCORE_SOURCE" v-model="queryParams.sourceType" @change="handleQuery"> </dict-selector>
</el-form-item>
<el-form-item :label="$t('标题')">
<el-input
style="width: 300px"
v-model.trim="queryParams.ruleTitle"
:placeholder="$t('请输入关键词查找')"
clearable
@keyup.enter.native="handleQuery"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
<el-input style="width: 300px" v-model.trim="queryParams.ruleTitle" :placeholder="$t('请输入关键词查找')" clearable @keyup.enter.native="handleQuery" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" />
</el-form-item>
<el-form-item :label="$t('规则说明')">
<el-input
style="width: 300px"
v-model.trim="queryParams.ruleDesc"
:placeholder="$t('请输入关键词查找')"
clearable
@keyup.enter.native="handleQuery"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
<el-input style="width: 300px" v-model.trim="queryParams.ruleDesc" :placeholder="$t('请输入关键词查找')" clearable @keyup.enter.native="handleQuery" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" />
</el-form-item>
<el-form-item :label="$t('当前积分')">
<el-row :gutter="10" style="width: 300px">
<el-col :span="10">
<dict-selector
clearable
:type="DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL"
v-model="queryParams.scoreCountOperate"
@change="handleQuery"
>
</dict-selector>
<dict-selector clearable :type="DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL" v-model="queryParams.scoreCountOperate" @change="handleQuery"> </dict-selector>
</el-col>
<el-col :span="14">
<el-input
v-model.trim="queryParams.scoreCount"
:placeholder="$t('请输入数字')"
clearable
@keyup.enter.native="handleQuery"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
<el-input v-model.trim="queryParams.scoreCount" :placeholder="$t('请输入数字')" clearable @keyup.enter.native="handleQuery" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" />
</el-col>
</el-row>
</el-form-item>
<el-form-item :label="$t('时间')">
<el-date-picker
type="datetimerange"
clearable
placement="bottom-start"
v-model="dateRangeCreateTime"
style="width: 240px"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="-"
:start-placeholder="$t('开始日期')"
:end-placeholder="$t('结束日期')"
/>
<el-date-picker type="datetimerange" clearable placement="bottom-start" v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{
$t("搜索")
}}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{
$t("重置")
}}</el-button>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t("搜索") }}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{ $t("重置") }}</el-button>
</el-form-item>
</el-form>
<el-row class="mb8">
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="handleQueryPagination"
></right-toolbar>
<right-toolbar :showSearch.sync="showSearch" @queryTable="handleQueryPagination"></right-toolbar>
</el-row>
<el-table ref="multipleTable" v-loading="loading" :data="memberList">
<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="id"></el-table-column>
<el-table-column :label="$t('会员名称')" align="center">
<template v-slot="{ row }">
<el-button
type="text"
@click="
$router.push('/member/member/member-details/' + row.memberId)
"
>{{ isChinese ? row.memberNameZh : row.memberNameEn }}</el-button
>
<el-button type="text" @click="$router.push('/member/member/member-details/' + row.memberId)">{{ isChinese ? row.memberNameZh : row.memberNameEn }}</el-button>
</template>
</el-table-column>
<el-table-column
width="140"
:label="$t('封面图片')"
align="center"
prop="mobile"
>
<el-table-column width="140" :label="$t('封面图片')" align="center" prop="mobile">
<template slot-scope="scope">
<el-image
:src="isChinese ? scope.row.coverImageZh : scope.row.coverImageEn"
style="width: 50px; height: 50px"
>{{ $t("") }}</el-image
>
<el-image :src="isChinese ? scope.row.coverImageZh : scope.row.coverImageEn" style="width: 50px; height: 50px">{{ $t("") }}</el-image>
</template>
</el-table-column>
<el-table-column
width="140"
align="center"
:label="$t('分值')"
prop="scoreCount"
></el-table-column>
<el-table-column width="140" align="center" :label="$t('分值')" prop="scoreCount"></el-table-column>
<el-table-column :label="$t('类别')" align="center">
<template slot-scope="scope">
{{
isChinese
? handleholdScoreStatus(scope.row.operateType).label
: handleholdScoreStatus(scope.row.operateType).labelEn
}}
{{ isChinese ? handleholdScoreStatus(scope.row.operateType).label : handleholdScoreStatus(scope.row.operateType).labelEn }}
</template>
</el-table-column>
<el-table-column :label="$t('积分来源')" align="center">
<template slot-scope="scope">
{{
isChinese
? handleSourceType(scope.row.sourceType).label
: handleSourceType(scope.row.sourceType).labelEn
}}
{{ isChinese ? handleSourceType(scope.row.sourceType).label : handleSourceType(scope.row.sourceType).labelEn }}
</template>
</el-table-column>
<el-table-column
:label="$t('规则标题')"
align="center"
:prop="isChinese ? 'ruleTitleZh' : 'ruleTitleEn'"
>
</el-table-column>
<el-table-column
:label="$t('规则说明')"
align="center"
:prop="isChinese ? 'ruleDescZh' : 'ruleDescEn'"
>
</el-table-column>
<el-table-column :label="$t('规则标题')" align="center" :prop="isChinese ? 'ruleTitleZh' : 'ruleTitleEn'"> </el-table-column>
<el-table-column :label="$t('规则说明')" align="center" :prop="isChinese ? 'ruleDescZh' : 'ruleDescEn'"> </el-table-column>
<el-table-column :label="$t('操作积分时间')" align="center">
<template v-slot="{ row }">
{{ parseTime(row.createTime) || "/" }}</template
>
<template v-slot="{ row }"> {{ parseTime(row.createTime) || "/" }}</template>
</el-table-column>
<el-table-column :label="$t('积分到期时间')" align="center">
<template v-slot="{ row }">
{{ parseTime(row.expireTime) || "/" }}</template
>
<template v-slot="{ row }"> {{ parseTime(row.expireTime) || "/" }}</template>
</el-table-column>
<el-table-column width="300" :label="$t('详细信息')" align="center">
<template v-slot="{ row }">
<!-- 人工操作-->
<span v-if="row.sourceType == '1'">{{
row.extParamJson.comment || "-"
}}</span>
<span v-if="row.sourceType == '1'">{{ row.extParamJson.comment || "-" }}</span>
<!-- 兑换礼品2 兑换礼品撤销4 跳转兑换记录详情-->
<el-button
v-if="row.sourceType == '2' || row.sourceType == '4'"
......@@ -195,13 +83,11 @@
path: '/member/memberManagement/exchangeRecordOperation',
query: {
pageStatus: 'view',
exchangeRewardID: row.extParamJson.redeemId,
},
exchangeRewardID: row.extParamJson.redeemId
}
})
"
>{{
`${$t("兑换记录ID")}:${row.extParamJson.redemptionNumber}`
}}</el-button
>{{ `${$t("记录ID")}:${row.extParamJson.redemptionNumber}` }}</el-button
>
<!-- 系统过期 sourceType = 3 不展示 -->
<span v-if="row.sourceType == '3'"> -</span>
......@@ -213,23 +99,15 @@
$router.push({
path: '/order/detail',
query: {
orderId: row.extParamJson.orderId,
},
orderId: row.extParamJson.orderId
}
})
"
>{{ `${$t("订单ID")}:${row.extParamJson.orderId}` }}</el-button
>
<!-- 注册sourceType = 6 , extParamJson中取 userIduserNameZh,userNameZh,phone 展示会员名+手机号(手机号脱敏处理)
推荐 : sourceType = 7 , extParamJson中取 userIduserNameZh,userNameZh,phone 展示会员名+手机号(手机号脱敏处理) -->
<span v-if="row.sourceType == '6' || row.sourceType == '7'">
{{
`${
isChinese
? row.extParamJson.userNameZh
: row.extParamJson.userNameEn
}(${row.extParamJson.phone})`
}}</span
>
<span v-if="row.sourceType == '6' || row.sourceType == '7'"> {{ `${isChinese ? row.extParamJson.userNameZh : row.extParamJson.userNameEn}(${row.extParamJson.phone})` }}</span>
<!-- sourceType = 8 , extParamJson中取 scoreRuleId 跳转活动详情 -->
<el-button
v-if="row.sourceType == '8'"
......@@ -239,8 +117,8 @@
path: '/member/memberManagement/addIntegrationRuleOperation',
query: {
id: row.extParamJson.scoreRuleId,
pageStatus: 'view',
},
pageStatus: 'view'
}
})
"
>{{ `${$t("活动ID")}:${row.extParamJson.scoreRuleId}` }}</el-button
......@@ -249,23 +127,17 @@
</el-table-column>
</el-table>
<!-- //分页列表 -->
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize"
@pagination="handleQueryPagination"
/>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" @pagination="handleQueryPagination" />
</div>
</template>
<script>
import { getDictDatas, DICT_TYPE } from "@/utils/dict";
import { queryMemberScoreRecord } from "@/api/ecw/memberManagement";
import { getDictDatas, DICT_TYPE } from "@/utils/dict"
import { queryMemberScoreRecord } from "@/api/ecw/memberManagement"
export default {
name: "EcwMembermanagementIntegralrecord",
props:{
memberCode:[String, Number],
props: {
memberCode: [String, Number]
},
data() {
return {
......@@ -285,82 +157,77 @@ export default {
endTime: "",
pageNo: 1,
pageSize: 10,
startTime: "",
},
};
startTime: ""
}
}
},
computed: {
isChinese() {
return this.$i18n.locale === "zh_CN";
},
return this.$i18n.locale === "zh_CN"
}
},
watch:{
memberCode:{
watch: {
memberCode: {
handler: function (newVal, oldVal) {
if(newVal){
this.queryParams.memberId= newVal
if (newVal) {
this.queryParams.memberId = newVal
}
},
immediate: true,
immediate: true
},
$route: {
handler: function (route) {
const query = route.query;
const query = route.query
if (query.memberCode) {
this.queryParams.key = this.$route.query.memberCode
}
},
immediate: true,
},
immediate: true
}
},
created() {
this.handleQuery();
this.handleQuery()
},
activated() {
this.handleQuery();
this.handleQuery()
},
methods: {
//积分来源
handleSourceType(id) {
return this.getDictDatas(DICT_TYPE.MEMBER_SCORE_SOURCE).filter(
(item) => item.value == id
)[0];
return this.getDictDatas(DICT_TYPE.MEMBER_SCORE_SOURCE).filter((item) => item.value == id)[0]
},
handleholdScoreStatus(id) {
return this.getDictDatas(DICT_TYPE.MEMBER_SCORE_OPERATE_TYPE).filter(
(item) => item.value == id
)[0];
return this.getDictDatas(DICT_TYPE.MEMBER_SCORE_OPERATE_TYPE).filter((item) => item.value == id)[0]
},
handleQuery() {
this.queryParams.pageNo = 1;
let params = { ...this.queryParams };
this.queryParams.pageNo = 1
let 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]
}
queryMemberScoreRecord(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 };
let 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]
}
queryMemberScoreRecord(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 = {
ruleTitle: "",
ruleDesc: "",
......@@ -371,10 +238,10 @@ export default {
endTime: "",
pageNo: 1,
pageSize: 10,
startTime: "",
};
this.handleQuery();
},
},
};
startTime: ""
}
this.handleQuery()
}
}
}
</script>
......@@ -84,7 +84,7 @@
<template #default="{ row }"> {{ $l(handleStatus(row.status), "label") || "/" }}</template>
</el-table-column>
<el-table-column :label="$t('创建人')" align="center" prop="creator" />
<el-table-column :label="$t('创建人')" width="120px" align="center" prop="creator" />
<el-table-column :label="$t('创建时间')" width="150px" align="center">
<template #default="{ row }"> {{ parseTime(row.createTime) || "/" }}</template>
</el-table-column>
......
......@@ -202,7 +202,7 @@
</div>
<div class="exchange" v-show="activeIndex != 'reward'">
<el-form :model="queryParamsRecord" ref="queryForm" size="small" :inline="true" label-width="120px">
<el-form-item :label="$t('礼品名称')">
<el-form-item :label="$t('礼品')">
<el-input style="width: 300px" v-model.trim="queryParamsRecord.rewardTitle" :placeholder="$t('请输入礼品名称')" clearable @keyup.enter.native="handleQuery" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" />
</el-form-item>
<el-form-item :label="$t('领取方式')">
......@@ -219,7 +219,7 @@
</el-form>
<el-table ref="multipleTable" v-loading="loading" :data="memberRecordList">
<el-table-column :label="$t('兑换记录ID')" width="160" align="center">
<el-table-column :label="$t('记录ID')" width="160" align="center">
<template #default="{ row }">
<el-button type="text" @click="handleViewRecord(row)">{{ row.redemptionNumber }}</el-button>
</template>
......@@ -229,20 +229,21 @@
<el-button type="text" @click="handleShowRewardsDetail(row)">{{ row.rewardCode }}</el-button>
</template>
</el-table-column>
<el-table-column :label="$t('礼品名称')" align="center" :prop="isChinese ? 'rewardTitleZh' : 'rewardTitleEn'"></el-table-column>
<el-table-column :label="$t('会员名称')" align="center" :prop="isChinese ? 'memberNameZh' : 'memberNameEn'"></el-table-column>
<el-table-column :label="$t('兑换时间')" align="center">
<el-table-column width="180" :label="$t('礼品')" align="center" :prop="isChinese ? 'rewardTitleZh' : 'rewardTitleEn'"></el-table-column>
<el-table-column :label="$t('会员')" align="center" :prop="isChinese ? 'memberNameZh' : 'memberNameEn'"></el-table-column>
<el-table-column width="180" :label="$t('时间')" align="center">
<template v-slot="{ 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">
<el-table-column width="140" :label="$t('数量')" align="center" prop="rewardCount"></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 }">
{{ isChinese ? handleExchangeEntrance(row.entrance).label : handleExchangeEntrance(row.entrance).labelEn }}
</template>
</el-table-column>
<el-table-column width="140" :label="$t('兑换网点')" align="center" :prop="isChinese ? 'nodeTitleZh' : 'nodeTitleEn'"> </el-table-column>
<el-table-column width="140" :label="$t('网点')" align="center" :prop="isChinese ? 'nodeTitleZh' : 'nodeTitleEn'"> </el-table-column>
<el-table-column width="140" :label="$t('领取方式')" align="center">
<template v-slot="{ row }">
{{ isChinese ? handleExchangeRedeemType(row.redeemType).label : handleExchangeRedeemType(row.redeemType).labelEn }}
......@@ -254,7 +255,7 @@
</template>
</el-table-column>
<el-table-column width="140" :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>
......@@ -455,7 +456,7 @@ export default {
endTime: "",
nodeId: "",
pageNo: 1,
pageSize: 100
pageSize: 10
},
queryParams: {
ruleTitle: "",
......@@ -689,7 +690,7 @@ export default {
holdScoreOperate: null,
key: null,
pageNo: 1,
pageSize: 100,
pageSize: 10,
startTime: null,
usedScore: null,
usedScoreOperate: null
......@@ -755,7 +756,7 @@ export default {
scoreCountOperate: "",
endTime: "",
pageNo: 1,
pageSize: 1000,
pageSize: 100,
startTime: ""
}
this.handleQuery()
......
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