Commit 57efa020 authored by chenwei's avatar chenwei

修复部分bug

parent 4445bf80
...@@ -72,8 +72,8 @@ ...@@ -72,8 +72,8 @@
<el-form-item :label="$t('提货点')" v-if="queryParams.type == '1'" prop="extraOrderV.receiveAddrList"> <el-form-item :label="$t('提货点')" v-if="queryParams.type == '1'" prop="extraOrderV.receiveAddrList">
<el-cascader v-if="cascaderState" style="width: 400px" :options="regionTreeList" @change="selectHandle" @expand-change="selectExpand" collapse-tags v-model="queryParams.extraOrderV.receiveAddrList" :props="cascaderProps" clearable></el-cascader> <el-cascader v-if="cascaderState" style="width: 400px" :options="regionTreeList" @change="selectHandle" @expand-change="selectExpand" collapse-tags v-model="queryParams.extraOrderV.receiveAddrList" :props="cascaderProps" clearable></el-cascader>
</el-form-item> </el-form-item>
<el-form-item :label="$t('渠道')" v-if="queryParams.extraOrderV.transportType == '3'"> <el-form-item :label="$t('渠道')" v-if="queryParams.type == '1' && queryParams.extraOrderV.transportType == '3'">
<el-select v-model="queryParams.channel" multiple placeholder="请选择"> <el-select v-model="queryParams.extraOrderV.channel" multiple placeholder="请选择">
<el-option v-for="item in channelList" :key="item.channelId" :label="isChinese ? item.nameZh : item.nameEn" :value="item.channelId"> </el-option> <el-option v-for="item in channelList" :key="item.channelId" :label="isChinese ? item.nameZh : item.nameEn" :value="item.channelId"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -705,7 +705,6 @@ export default { ...@@ -705,7 +705,6 @@ export default {
if (isNumber(res.data.extraRecommend?.shareStatus)) { if (isNumber(res.data.extraRecommend?.shareStatus)) {
params.extraRecommend.shareStatus = res.data.extraRecommend?.shareStatus.toString() params.extraRecommend.shareStatus = res.data.extraRecommend?.shareStatus.toString()
} }
console.log(params)
params.dateRangeCreateTime = [parseTime(res.data.startTime), parseTime(res.data.endTime)] params.dateRangeCreateTime = [parseTime(res.data.startTime), parseTime(res.data.endTime)]
if (params.type == 1 && params.extraOrderV.receiveAddrList[0].toString() == "0,0,0") { if (params.type == 1 && params.extraOrderV.receiveAddrList[0].toString() == "0,0,0") {
......
...@@ -2,17 +2,7 @@ ...@@ -2,17 +2,7 @@
<div class="app-container"> <div class="app-container">
<div class="container"> <div class="container">
<div class="formBox exchangeRecordOperation"> <div class="formBox exchangeRecordOperation">
<el-form <el-form v-for="(item, index) in queryParamsList" :key="item.memberId" :model="queryParamsList[index]" :ref="`queryForm${item.memberId}`" size="small" :inline="true" :rules="rules" :disabled="viewRecordDisable" label-width="148px">
v-for="(item, index) in queryParamsList"
:key="item.memberId"
:model="queryParamsList[index]"
:ref="`queryForm${item.memberId}`"
size="small"
:inline="true"
:rules="rules"
:disabled="viewRecordDisable"
label-width="148px"
>
<el-card class="box-card"> <el-card class="box-card">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<el-row :gutter="10"> <el-row :gutter="10">
...@@ -20,13 +10,7 @@ ...@@ -20,13 +10,7 @@
</el-row> </el-row>
<el-row :gutter="10"> <el-row :gutter="10">
<el-form-item :label="$t('会员名称')"> <el-form-item :label="$t('会员名称')">
<el-autocomplete <el-autocomplete v-model="item.memberName" :disabled="rewardEdit || veriftyDisable" :fetch-suggestions="querySearchAsync" :placeholder="$t('请输入会员名称')" @select="handleSelectMemberQuery"></el-autocomplete>
v-model="item.memberName"
:disabled="rewardEdit || veriftyDisable"
:fetch-suggestions="querySearchAsync"
:placeholder="$t('请输入会员名称')"
@select="handleSelectMemberQuery"
></el-autocomplete>
<!-- <el-input <!-- <el-input
:placeholder="" :placeholder=""
clearable clearable
...@@ -35,42 +19,14 @@ ...@@ -35,42 +19,14 @@
/> --> /> -->
</el-form-item> </el-form-item>
<el-form-item id="colorRedInput" :label="$t('当前积分')"> <el-form-item id="colorRedInput" :label="$t('当前积分')">
<el-input <el-input :placeholder="$t('请输入当前积分')" clearable :disabled="true" v-model="item.holdScore" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" />
:placeholder="$t('请输入当前积分')"
clearable
:disabled="true"
v-model="item.holdScore"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
</el-form-item> </el-form-item>
<el-form-item <el-form-item :label="$t('礼品选择')" prop="rewardName" id="colorRedInput">
:label="$t('礼品选择')" <el-input :placeholder="$t('请选择礼品')" clearable :disabled="true" v-model="item.rewardName" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" />
prop="rewardName"
id="colorRedInput"
>
<el-input
:placeholder="$t('请选择礼品')"
clearable
:disabled="true"
v-model="item.rewardName"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
</el-form-item> </el-form-item>
<el-button <el-button type="success" size="small" @click="handleSelectMember"> {{ $t("选择") }}</el-button>
type="success"
size="small"
@click="handleSelectMember"
>
{{ $t("选择") }}</el-button
>
<el-form-item :label="$t('礼品积分')" id="colorRedInput"> <el-form-item :label="$t('礼品积分')" id="colorRedInput">
<el-input <el-input :placeholder="$t('请输入礼品积分')" clearable :disabled="true" v-model="item.pointsRequire" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" />
:placeholder="$t('请输入礼品积分')"
clearable
:disabled="true"
v-model="item.pointsRequire"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('兑换数量')" prop="rewardCount"> <el-form-item :label="$t('兑换数量')" prop="rewardCount">
<el-input <el-input
...@@ -80,30 +36,17 @@ ...@@ -80,30 +36,17 @@
v-model.number="item.rewardCount" v-model.number="item.rewardCount"
@change=" @change="
(val) => { (val) => {
handleRewardCount(item, index, val); handleRewardCount(item, index, val)
} }
" "
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/> />
</el-form-item> </el-form-item>
<el-form-item :label="$t('本次兑换积分')" id="colorRedInput"> <el-form-item :label="$t('本次兑换积分')" id="colorRedInput">
<el-input <el-input :placeholder="$t('请输入本次兑换积分')" clearable :disabled="true" v-model="item.spendCredit" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" />
:placeholder="$t('请输入本次兑换积分')"
clearable
:disabled="true"
v-model="item.spendCredit"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('兑换后剩余积分')" id="colorRedInput"> <el-form-item :label="$t('兑换后剩余积分')" id="colorRedInput">
<el-input <el-input :placeholder="$t('兑换后剩余积分')" clearable :disabled="true" id="colorRedInput" v-model="item.remainingPoints" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" />
:placeholder="$t('兑换后剩余积分')"
clearable
:disabled="true"
id="colorRedInput"
v-model="item.remainingPoints"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-row :gutter="10"> <el-row :gutter="10">
...@@ -112,209 +55,78 @@ ...@@ -112,209 +55,78 @@
</el-row> </el-row>
<el-row> <el-row>
<el-form-item :label="$t('兑换方式')" prop="redeemType"> <el-form-item :label="$t('兑换方式')" prop="redeemType">
<dict-selector <dict-selector clearable :disabled="veriftyDisable" :type="DICT_TYPE.WAY_OF_RECEIVING" v-model="item.redeemType"> </dict-selector>
clearable
:disabled="veriftyDisable"
:type="DICT_TYPE.WAY_OF_RECEIVING"
v-model="item.redeemType"
>
</dict-selector>
</el-form-item> </el-form-item>
<el-form-item :label="$t('兑换入口')"> <el-form-item :label="$t('兑换入口')">
<dict-selector <dict-selector clearable :disabled="true" v-model="item.entrance" :type="DICT_TYPE.PLATFORM_TYPE"> </dict-selector>
clearable
:disabled="true"
v-model="item.entrance"
:type="DICT_TYPE.PLATFORM_TYPE"
>
</dict-selector>
</el-form-item> </el-form-item>
<el-form-item class="expenses" :label="$t('费用')"> <el-form-item class="expenses" :label="$t('费用')">
<el-row :gutter="10"> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item prop="expenses"> <el-form-item prop="expenses">
<el-input <el-input v-model="item.expenses" :disabled="veriftyDisable" :placeholder="$t('请输入数字')" clearable onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" />
v-model="item.expenses"
:disabled="veriftyDisable"
:placeholder="$t('请输入数字')"
clearable
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="12">
<el-form-item prop="currency"> <el-form-item prop="currency">
<el-select <el-select v-model="item.currency" :disabled="veriftyDisable" clearable :placeholder="$t('请选择币种')">
v-model="item.currency" <el-option v-for="nodeItem in currencyList" :key="nodeItem.id" :label="isChinese ? nodeItem.titleZh : nodeItem.titleEn" :value="nodeItem.id" />
:disabled="veriftyDisable"
clearable
:placeholder="$t('请选择币种')"
>
<el-option
v-for="nodeItem in currencyList"
:key="nodeItem.id"
:label="
isChinese ? nodeItem.titleZh : nodeItem.titleEn
"
:value="nodeItem.id"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item :label="$t('收件人姓名')" <el-form-item :label="$t('收件人姓名')"><el-input :placeholder="$t('请输入收件人姓名')" clearable v-model="item.recipientName" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" /> </el-form-item>
><el-input
:placeholder="$t('请输入收件人姓名')"
clearable
v-model="item.recipientName"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
</el-form-item>
<el-form-item :label="$t('收件人电话')"> <el-form-item :label="$t('收件人电话')">
<el-input <el-input :placeholder="$t('请输入收件人电话')" clearable v-model="item.recipientPhoneNum" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" />
:placeholder="$t('请输入收件人电话')"
clearable
v-model="item.recipientPhoneNum"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
</el-form-item> </el-form-item>
<el-form-item <el-form-item :label="$t('收件人地址')" v-if="item.redeemType != '1'">
:label="$t('收件人地址')" <el-input :placeholder="$t('请输入收件人地址')" clearable v-model="item.recipientAddress" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" />
v-if="item.redeemType != '1'"
>
<el-input
:placeholder="$t('请输入收件人地址')"
clearable
v-model="item.recipientAddress"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('兑换人')"> <el-form-item :label="$t('兑换人')">
<el-input <el-input :placeholder="$t('请输入兑换人')" clearable v-model="item.redeemer" :disabled="veriftyDisable" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" />
:placeholder="$t('请输入兑换人')"
clearable
v-model="item.redeemer"
:disabled="veriftyDisable"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('兑换时间')"> <el-form-item :label="$t('兑换时间')">
<el-date-picker <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>
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-form-item> </el-form-item>
<el-form-item <el-form-item :label="$t('快递公司')" v-if="item.redeemType != '1'">
:label="$t('快递公司')" <el-select v-model="item.courierCompany" :placeholder="$t('请选择快递公司')">
v-if="item.redeemType != '1'" <el-option v-for="nodeItem in expressList" :key="nodeItem.id" :label="nodeItem.companyName" :value="nodeItem.id" />
>
<el-select
v-model="item.courierCompany"
:placeholder="$t('请选择快递公司')"
>
<el-option
v-for="nodeItem in expressList"
:key="nodeItem.id"
:label="nodeItem.companyName"
:value="nodeItem.id"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item <el-form-item :label="$t('快递单号')" v-if="item.redeemType != '1'">
:label="$t('快递单号')" <el-input :placeholder="$t('请输入快递单号')" clearable v-model="item.expressNo" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" />
v-if="item.redeemType != '1'"
>
<el-input
:placeholder="$t('请输入快递单号')"
clearable
v-model="item.expressNo"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
</el-form-item> </el-form-item>
<el-form-item <el-form-item :label="$t('快递日期')" v-if="item.redeemType != '1'">
:label="$t('快递日期')" <el-date-picker type="date" :placeholder="$t('选择快递日期')" v-model="item.expressDate" value-format="yyyy-MM-dd HH:mm:ss" placement="bottom-start"></el-date-picker>
v-if="item.redeemType != '1'"
>
<el-date-picker
type="date"
:placeholder="$t('选择快递日期')"
v-model="item.expressDate"
value-format="yyyy-MM-dd HH:mm:ss"
placement="bottom-start"
></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item :label="$t('快递寄出人')"> <el-form-item :label="$t('快递寄出人')">
<el-input <el-input :placeholder="$t('请输入快递寄出人')" clearable v-model="item.expressSender" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" />
:placeholder="$t('请输入快递寄出人')"
clearable
v-model="item.expressSender"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('上传附件')"> <el-form-item :label="$t('上传附件')">
<file-upload <file-upload v-model="item.annex" :disabled="veriftyDisable || viewRecordDisable"></file-upload>
v-model="item.annex"
:disabled="veriftyDisable || viewRecordDisable"
></file-upload>
</el-form-item> </el-form-item>
<el-form-item :label="$t('备注')"> <el-form-item :label="$t('备注')">
<el-input <el-input style="width: 500px" :disabled="veriftyDisable" type="textarea" v-model="item.remark"></el-input>
style="width: 500px"
:disabled="veriftyDisable"
type="textarea"
v-model="item.remark"
></el-input>
</el-form-item> </el-form-item>
<div class="view" v-if="viewRecordDisable || veriftyDisable"> <div class="view" v-if="viewRecordDisable || veriftyDisable">
<el-form-item :label="$t('核销人')"> <el-form-item :label="$t('核销人')">
<el-input v-model="item.verifyUser"></el-input> <el-input v-model="item.verifyUser"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('核销时间')"> <el-form-item :label="$t('核销时间')">
<el-date-picker <el-date-picker type="date" :placeholder="$t('选择核销时间')" v-model="item.verifyTime" value-format="yyyy-MM-dd HH:mm:ss" placement="bottom-start"></el-date-picker>
type="date"
:placeholder="$t('选择核销时间')"
v-model="item.verifyTime"
value-format="yyyy-MM-dd HH:mm:ss"
placement="bottom-start"
></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item :label="$t('创建人')" v-if="!veriftyDisable"> <el-form-item :label="$t('创建人')" v-if="!veriftyDisable">
<el-input v-model="item.creatorName"></el-input> <el-input v-model="item.creatorName"></el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item :label="$t('创建时间')" v-if="!veriftyDisable">
:label="$t('创建时间')" <el-date-picker type="date" :placeholder="$t('创建时间')" v-model="item.createTime" value-format="yyyy-MM-dd HH:mm:ss" placement="bottom-start"></el-date-picker>
v-if="!veriftyDisable"
>
<el-date-picker
type="date"
:placeholder="$t('创建时间')"
v-model="item.createTime"
value-format="yyyy-MM-dd HH:mm:ss"
placement="bottom-start"
></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item <el-form-item :label="$t('最后更新人')" v-if="!veriftyDisable">
:label="$t('最后更新人')"
v-if="!veriftyDisable"
>
<el-input v-model="item.updater"></el-input> <el-input v-model="item.updater"></el-input>
</el-form-item> </el-form-item>
<el-form-item <el-form-item :label="$t('最后更新时间')" v-if="!veriftyDisable">
:label="$t('最后更新时间')" <el-date-picker type="date" :placeholder="$t('最后更新时间')" v-model="item.updateTime" value-format="yyyy-MM-dd HH:mm:ss" placement="bottom-start"></el-date-picker>
v-if="!veriftyDisable"
>
<el-date-picker
type="date"
:placeholder="$t('最后更新时间')"
v-model="item.updateTime"
value-format="yyyy-MM-dd HH:mm:ss"
placement="bottom-start"
></el-date-picker>
</el-form-item> </el-form-item>
</div> </div>
</el-row> </el-row>
...@@ -326,12 +138,7 @@ ...@@ -326,12 +138,7 @@
<el-row justify="end" :gutter="20" type="flex" class="handleButton"> <el-row justify="end" :gutter="20" type="flex" class="handleButton">
<el-col :span="3"> <el-col :span="3">
<el-button <el-button type="primary" @click="handleBulkConversion" v-if="!viewRecordDisable">{{ submitButtonText }}</el-button>
type="primary"
@click="handleBulkConversion"
v-if="!viewRecordDisable"
>{{ submitButtonText }}</el-button
>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<el-button @click="handleBack">{{ $t("返回") }}</el-button> <el-button @click="handleBack">{{ $t("返回") }}</el-button>
...@@ -339,58 +146,48 @@ ...@@ -339,58 +146,48 @@
</el-row> </el-row>
</div> </div>
<choose-Gift <choose-Gift :dialogVisible.sync="dialogVisible" @transferSelectRewards="onGetSelectRewardsInfo"> </choose-Gift>
:dialogVisible.sync="dialogVisible"
@transferSelectRewards="onGetSelectRewardsInfo"
>
</choose-Gift>
</div> </div>
</template> </template>
<script> <script>
import { bulkConversion } from "@/api/ecw/giftManagement"; import { bulkConversion } from "@/api/ecw/giftManagement"
import FileUpload from "@/components/FileUpload"; import FileUpload from "@/components/FileUpload"
import chooseGift from "./components/chooseGift.vue"; import chooseGift from "./components/chooseGift.vue"
import { getExpressPage } from "@/api/ecw/express"; import { getExpressPage } from "@/api/ecw/express"
import { getCurrencyList } from "@/api/ecw/currency"; import { getCurrencyList } from "@/api/ecw/currency"
import { getNowDateTime, parseTime } from "@/utils/ruoyi"; import { getNowDateTime, parseTime } from "@/utils/ruoyi"
import { getMemberList } from "@/api/ecw/giftManagement"; import { getMemberList } from "@/api/ecw/giftManagement"
import { import { getRewardDetailQuery, updatedRewardsDetails, verifyRedeem } from "@/api/ecw/memberManagement"
getRewardDetailQuery, import { memberUserGet } from "@/api/member/user"
updatedRewardsDetails, import { getDictDatas, DICT_TYPE } from "@/utils/dict"
verifyRedeem,
} from "@/api/ecw/memberManagement";
import { memberUserGet } from "@/api/member/user";
import { getDictDatas, DICT_TYPE } from "@/utils/dict";
export default { export default {
name: "exchangeRecordOperation", name: "exchangeRecordOperation",
components: { components: {
chooseGift, chooseGift,
FileUpload, FileUpload
}, },
data() { data() {
var validatePass2 = (rule, value, callback) => { var validatePass2 = (rule, value, callback) => {
if (!this.quantityComputation) { if (!this.quantityComputation) {
return callback( return callback(new Error(this.$t("兑换积分大于当前总积分,请重新输入兑换数量")))
new Error(this.$t("兑换积分大于当前总积分,请重新输入兑换数量"))
);
} else { } else {
return callback(); return callback()
}
} }
};
var expensesCurrency = (rule, value, callback) => { var expensesCurrency = (rule, value, callback) => {
if (this.queryParamsList[0].expenses && !value) { if (this.queryParamsList[0].expenses && !value) {
return callback(new Error(this.$t("请选择币种"))); return callback(new Error(this.$t("请选择币种")))
} else { } else {
return callback(); return callback()
}
} }
};
var expensesValidate = (rule, value, callback) => { var expensesValidate = (rule, value, callback) => {
if (this.queryParamsList[0].currency && !value) { if (this.queryParamsList[0].currency && !value) {
return callback(new Error(this.$t("请输入"))); return callback(new Error(this.$t("请输入")))
} else { } else {
return callback(); return callback()
}
} }
};
return { return {
env: process.env.NODE_ENV, env: process.env.NODE_ENV,
// 是否显示弹出层 // 是否显示弹出层
...@@ -422,8 +219,8 @@ export default { ...@@ -422,8 +219,8 @@ export default {
remark: null, remark: null,
annex: null, annex: null,
memberName: null, memberName: null,
rewardName: null, rewardName: null
}, }
], ],
// 网点 // 网点
nodeList: [], nodeList: [],
...@@ -441,19 +238,19 @@ export default { ...@@ -441,19 +238,19 @@ export default {
{ {
required: true, required: true,
message: this.$t("请输入兑换数量"), message: this.$t("请输入兑换数量"),
trigger: "blur", trigger: "blur"
}, },
{ {
validator: validatePass2, validator: validatePass2,
trigger: ["blur", "change"], trigger: ["blur", "change"]
}, }
], ],
rewardName: [ rewardName: [
{ {
required: true, required: true,
message: this.$t("请选择礼品"), message: this.$t("请选择礼品"),
trigger: "blur", trigger: "blur"
}, }
], ],
expenses: [ expenses: [
// { // {
...@@ -464,83 +261,83 @@ export default { ...@@ -464,83 +261,83 @@ export default {
{ {
pattern: /^\d+(\.\d{1,2})?$/, pattern: /^\d+(\.\d{1,2})?$/,
message: this.$t("请输入整数或保留小数点后两位"), message: this.$t("请输入整数或保留小数点后两位"),
trigger: "blur", trigger: "blur"
}, },
{ {
validator: expensesValidate, validator: expensesValidate,
trigger: "change", trigger: "change"
}, }
], ],
currency: [ currency: [
{ {
// required: true, // required: true,
// message: this.$t("请选择币种"), // message: this.$t("请选择币种"),
validator: expensesCurrency, validator: expensesCurrency,
trigger: "change", trigger: "change"
}, }
], ],
redeemType: [ redeemType: [
{ {
required: true, required: true,
message: this.$t("请选择兑换方式"), message: this.$t("请选择兑换方式"),
trigger: "change", trigger: "change"
}, }
], ],
recipientName: [ recipientName: [
{ {
required: true, required: true,
message: this.$t("请输入收件人姓名"), message: this.$t("请输入收件人姓名"),
trigger: "blur", trigger: "blur"
}, }
], ],
recipientPhoneNum: [ recipientPhoneNum: [
{ {
required: true, required: true,
message: this.$t("请输入收件人电话"), message: this.$t("请输入收件人电话"),
trigger: "blur", trigger: "blur"
}, }
], ],
recipientAddress: [ recipientAddress: [
{ {
required: true, required: true,
message: this.$t("请输入收件人地址"), message: this.$t("请输入收件人地址"),
trigger: "blur", trigger: "blur"
}, }
], ]
}, }
}; }
}, },
computed: { computed: {
isChinese() { isChinese() {
return this.$i18n.locale === "zh_CN"; return this.$i18n.locale === "zh_CN"
}, }
}, },
created() { created() {
this.getExpressList(); this.getExpressList()
this.currencyListAPI(); this.currencyListAPI()
switch (this.$route.query.pageStatus) { switch (this.$route.query.pageStatus) {
case "edit": case "edit":
this.submitButtonText = this.$t("保存"); this.submitButtonText = this.$t("保存")
this.getExchangeDetail(); this.getExchangeDetail()
break; break
case "view": case "view":
this.viewRecordDisable = true; this.viewRecordDisable = true
this.getExchangeDetail(); this.getExchangeDetail()
break; break
case "verify": case "verify":
this.veriftyDisable = true; this.veriftyDisable = true
this.submitButtonText = this.$t("确认核销"); this.submitButtonText = this.$t("确认核销")
this.getExchangeDetail(); this.getExchangeDetail()
break; break
case "add": case "add":
this.submitButtonText = this.$t("确认兑换"); this.submitButtonText = this.$t("确认兑换")
this.getDetails(); this.getDetails()
break; break
default: default:
this.submitButtonText = this.$t("确认兑换"); this.submitButtonText = this.$t("确认兑换")
break; break
} }
}, },
...@@ -550,71 +347,60 @@ export default { ...@@ -550,71 +347,60 @@ export default {
memberUserGet({ id: this.$route.query.memberId }).then((r) => { memberUserGet({ id: this.$route.query.memberId }).then((r) => {
// this.details = r.data; // this.details = r.data;
this.isChinese this.isChinese ? (this.queryParamsList[0].memberName = r.data.nickname) : (this.queryParamsList[0].memberName = r.data.englishName)
? (this.queryParamsList[0].memberName = r.data.nickname) this.queryParamsList[0].holdScore = r.data.userScoreLevelInfo.holdScore
: (this.queryParamsList[0].memberName = r.data.englishName); this.queryParamsList[0].memberId = r.data.id
this.queryParamsList[0].holdScore = r.data.userScoreLevelInfo.holdScore; })
this.queryParamsList[0].memberId = r.data.id;
});
}, },
getExchangeDetail() { getExchangeDetail() {
this.queryParamsList = []; this.queryParamsList = []
this.$nextTick(() => { this.$nextTick(() => {
let params = { let params = {
id: this.$route.query.exchangeRewardID, id: this.$route.query.exchangeRewardID
}; }
getRewardDetailQuery(params).then((res) => { getRewardDetailQuery(params).then((res) => {
this.rewardEdit = true; this.rewardEdit = true
const data = res.data; const data = res.data
let params = this.queryParamsList[0]; let params = this.queryParamsList[0]
this.queryParamsList = [{ ...data, params }]; this.queryParamsList = [{ ...data, params }]
if (this.isChinese) { if (this.isChinese) {
this.queryParamsList[0].memberName = data.memberNameZh; this.queryParamsList[0].memberName = data.memberNameZh
this.queryParamsList[0].rewardName = data.rewardTitleZh; this.queryParamsList[0].rewardName = data.rewardTitleZh
} else { } else {
this.queryParamsList[0].memberName = data.memberNameEn; this.queryParamsList[0].memberName = data.memberNameEn
this.queryParamsList[0].rewardName = data.rewardTitleEn; this.queryParamsList[0].rewardName = data.rewardTitleEn
} }
this.queryParamsList[0].redemptionTime = parseTime( this.queryParamsList[0].redemptionTime = parseTime(data.redemptionTime) //兑换时间
data.redemptionTime
); //兑换时间
this.queryParamsList[0].verifyUser = this.$store.getters.name; this.queryParamsList[0].verifyUser = this.$store.getters.name
this.queryParamsList[0].verifyTime = parseTime(data.verifyTime); this.queryParamsList[0].verifyTime = parseTime(data.verifyTime)
this.queryParamsList[0].updateTime = parseTime(data.updateTime); this.queryParamsList[0].updateTime = parseTime(data.updateTime)
this.queryParamsList[0].createTime = parseTime(data.createTime); this.queryParamsList[0].createTime = parseTime(data.createTime)
this.queryParamsList[0].expressDate = parseTime(data.expressDate); //快递时间 this.queryParamsList[0].expressDate = parseTime(data.expressDate) //快递时间
this.handleRewardCount(data, 0, data.rewardCount); this.handleRewardCount(data, 0, data.rewardCount)
if (this.$route.query.pageStatus == "verify") { if (this.$route.query.pageStatus == "verify") {
this.queryParamsList[0].verifyTime = getNowDateTime(); this.queryParamsList[0].verifyTime = getNowDateTime()
} }
this.$forceUpdate(); this.$forceUpdate()
}); })
}); })
}, },
handleSelectMemberQuery(item) { handleSelectMemberQuery(item) {
this.isChinese this.isChinese ? (this.queryParamsList[0].memberName = item.memberNameZh) : (this.queryParamsList[0].memberName = item.englishName)
? (this.queryParamsList[0].memberName = item.memberNameZh) this.queryParamsList[0].holdScore = item.holdScore
: (this.queryParamsList[0].memberName = item.englishName); this.queryParamsList[0].memberId = item.id
this.queryParamsList[0].holdScore = item.holdScore;
this.queryParamsList[0].memberId = item.id;
this.queryParamsList[0].spendCredit = this.queryParamsList[0].spendCredit = this.queryParamsList[0].pointsRequire * this.queryParamsList[0].rewardCount
this.queryParamsList[0].pointsRequire *
this.queryParamsList[0].rewardCount;
this.queryParamsList[0].remainingPoints = this.queryParamsList[0].remainingPoints = this.queryParamsList[0].holdScore - this.queryParamsList[0].spendCredit
this.queryParamsList[0].holdScore - this.queryParamsList[0].spendCredit; this.quantityComputation = this.queryParamsList[0].remainingPoints >= 0 ? true : false
this.quantityComputation =
this.queryParamsList[0].remainingPoints >= 0 ? true : false;
}, },
querySearchAsync(queryString, cb) { querySearchAsync(queryString, cb) {
let result = []; let result = []
if (queryString == "") { if (queryString == "") {
cb(result); cb(result)
} else { } else {
try { try {
let params = { let params = {
...@@ -628,90 +414,84 @@ export default { ...@@ -628,90 +414,84 @@ export default {
pageSize: 20, pageSize: 20,
startTime: "", startTime: "",
usedScore: null, usedScore: null,
usedScoreOperate: null, usedScoreOperate: null
}; }
getMemberList(params).then((res) => { getMemberList(params).then((res) => {
result = res.data.list.map((item) => { result = res.data.list.map((item) => {
if (this.isChinese) { if (this.isChinese) {
return { return {
...item, ...item,
value: `${item.memberNameZh}(${item.mobile})`, value: `${item.memberNameZh}(${item.mobile})`
}; }
} else { } else {
return { return {
...item, ...item,
value: `${item.memberNameEn}(${item.mobile})`, value: `${item.memberNameEn}(${item.mobile})`
};
} }
}); }
cb(result); })
}); cb(result)
})
} catch { } catch {
this.$message.success(this.$t("获取数据失败")); this.$message.success(this.$t("获取数据失败"))
} }
} }
}, },
handleRewardCount(item, index, value) { handleRewardCount(item, index, value) {
this.queryParamsList[index].spendCredit = this.queryParamsList[index].spendCredit = this.queryParamsList[index].pointsRequire * value
this.queryParamsList[index].pointsRequire * value; this.queryParamsList[index].remainingPoints = this.queryParamsList[index].holdScore - this.queryParamsList[index].spendCredit
this.queryParamsList[index].remainingPoints = this.quantityComputation = this.queryParamsList[index].remainingPoints >= 0 ? true : false
this.queryParamsList[index].holdScore -
this.queryParamsList[index].spendCredit;
this.quantityComputation =
this.queryParamsList[index].remainingPoints >= 0 ? true : false;
}, },
currencyListAPI() { currencyListAPI() {
getCurrencyList().then((res) => { getCurrencyList().then((res) => {
this.currencyList = res.data; this.currencyList = res.data
}); })
}, },
onGetSelectRewardsInfo(item) { onGetSelectRewardsInfo(item) {
this.queryParamsList[0].rewardId = item.id; this.queryParamsList[0].rewardId = item.id
this.queryParamsList[0].redeemType = item.pickMethod.split(",")[0] this.queryParamsList[0].redeemType = item.pickMethod.split(",")[0]
if (this.isChinese) { if (this.isChinese) {
this.queryParamsList[0].rewardName = item.titleZh; this.queryParamsList[0].rewardName = item.titleZh
} else { } else {
this.queryParamsList[0].rewardName = item.titleEn; this.queryParamsList[0].rewardName = item.titleEn
} }
this.queryParamsList[0].pointsRequire = item.pointsRequire; this.queryParamsList[0].pointsRequire = item.pointsRequire
this.queryParamsList[0].rewardCount = "1"; this.queryParamsList[0].rewardCount = "1"
this.queryParamsList[0].spendCredit = ""; this.queryParamsList[0].spendCredit = ""
this.queryParamsList[0].remainingPoints = this.queryParamsList[0].remainingPoints = this.queryParamsList[0].holdScore
this.queryParamsList[0].holdScore; this.quantityComputation = this.queryParamsList[0].remainingPoints >= 0 ? true : false
this.quantityComputation =
this.queryParamsList[0].remainingPoints >= 0 ? true : false;
// if (this.queryParamsList[0].holdScore) { // if (this.queryParamsList[0].holdScore) {
this.handleRewardCount({}, 0, 1); this.handleRewardCount({}, 0, 1)
// } // }
}, },
handleSelectMember() { handleSelectMember() {
this.dialogVisible = true; this.dialogVisible = true
}, },
getExpressList() { getExpressList() {
let params = { let params = {
pageNo: 1, pageNo: 1,
pageSize: 1000, pageSize: 1000
}; }
getExpressPage(params).then((res) => { getExpressPage(params).then((res) => {
this.expressList = res.data.list; this.expressList = res.data.list
}); })
}, },
handleBack() { handleBack() {
this.$store.dispatch("tagsView/delCurrentView"); this.$store.dispatch("tagsView/delCurrentView")
}, },
checkForm(formName) { checkForm(formName) {
const result = new Promise((resolve, reject) => { const result = new Promise((resolve, reject) => {
this.$refs[formName][0].validate((valid) => { this.$refs[formName][0].validate((valid) => {
if (valid) { if (valid) {
resolve(); resolve()
} else { } else {
reject(); reject()
} }
}); })
}); })
this.checkFormResult.push(result); this.checkFormResult.push(result)
}, },
resetForm() { resetForm() {
this.queryParamsList = [ this.queryParamsList = [
...@@ -739,61 +519,55 @@ export default { ...@@ -739,61 +519,55 @@ export default {
remark: null, remark: null,
annex: null, annex: null,
memberName: null, memberName: null,
rewardName: null, rewardName: null
}, }
]; ]
}, },
handleBulkConversion() { handleBulkConversion() {
this.queryParamsList.forEach((element) => { this.queryParamsList.forEach((element) => {
this.checkForm(`queryForm${element.memberId}`); this.checkForm(`queryForm${element.memberId}`)
}); })
Promise.all(this.checkFormResult) Promise.all(this.checkFormResult)
.then((res) => { .then((res) => {
this.checkFormResult = []; this.checkFormResult = []
let params = this.queryParamsList.map((item) => { let params = this.queryParamsList.map((item) => {
if (item.redeemType == "1") { if (item.redeemType == "1") {
let { let { recipientAddress, expressNo, expressDate, courierCompany, ...itemNew } = item
recipientAddress, return itemNew
expressNo,
expressDate,
courierCompany,
...itemNew
} = item;
return itemNew;
} else { } else {
return item; return item
} }
}); })
if (this.$route.query.pageStatus == "edit") { if (this.$route.query.pageStatus == "edit") {
updatedRewardsDetails(params[0]).then((res) => { updatedRewardsDetails(params[0]).then((res) => {
this.$message.success(this.$t("更新成功")); this.$message.success(this.$t("更新成功"))
this.$router.go(-1); this.$router.go(-1)
}); })
//编辑 //编辑
} else if (this.$route.query.pageStatus == "verify") { } else if (this.$route.query.pageStatus == "verify") {
verifyRedeem(params[0]).then((res) => { verifyRedeem(params[0]).then((res) => {
this.$message.success(this.$t("核销成功")); this.$message.success(this.$t("核销成功"))
this.$router.go(-1); this.$router.go(-1)
}); })
} else { } else {
//兑换 //兑换
bulkConversion(params).then((res) => { bulkConversion(params).then((res) => {
if (res.code == "0") { if (res.code == "0") {
this.queryParamsList = this.resetForm(); this.queryParamsList = this.resetForm()
this.$message.success(this.$t("兑换成功")); this.$message.success(this.$t("兑换成功"))
this.$router.go(-1); this.$router.go(-1)
} }
}); })
} }
}) })
.catch(() => { .catch(() => {
this.checkFormResult = []; this.checkFormResult = []
this.$message.error(this.$t("请填写必要的信息")); this.$message.error(this.$t("请填写必要的信息"))
}); })
}, }
}, }
}; }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
::v-deep #colorRedInput .el-input__inner { ::v-deep #colorRedInput .el-input__inner {
...@@ -806,6 +580,16 @@ export default { ...@@ -806,6 +580,16 @@ export default {
width: 286px; width: 286px;
} }
.expenses { .expenses {
width: 434px;
.el-form-item {
margin-right: 0;
}
.el-row {
width: 286px;
}
.el-input {
width: 140px;
}
.el-form-item--small.el-form-item { .el-form-item--small.el-form-item {
margin-bottom: 0; margin-bottom: 0;
} }
......
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form <el-form v-show="showSearch" ref="queryForm" :model="queryParams" size="small" :inline="true" label-width="68px">
v-show="showSearch"
ref="queryForm"
:model="queryParams"
size="small"
:inline="true"
label-width="68px"
>
<el-form-item :label="$t('指标类型')"> <el-form-item :label="$t('指标类型')">
<dict-selector <dict-selector v-model="queryParams.type" clearable :type="DICT_TYPE.SCORE_RULE_TYPE" @change="handleQuery" />
v-model="queryParams.type"
clearable
:type="DICT_TYPE.SCORE_RULE_TYPE"
@change="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('标题:')"> <el-form-item :label="$t('标题:')">
<el-input <el-input v-model="queryParams.title" v-trim :placeholder="$t('请输入查找')" clearable @keyup.enter.native="handleQuery" />
v-model="queryParams.title"
v-trim
style="width: 300px"
:placeholder="$t('请输入查找')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('规则说明')"> <el-form-item :label="$t('规则说明')">
<el-input <el-input v-model="queryParams.desc" :placeholder="$t('请输入关键词查找')" clearable v-trim @keyup.enter.native="handleQuery" />
v-model="queryParams.desc"
style="width: 300px"
:placeholder="$t('请输入关键词查找')"
clearable
v-trim
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('状态')"> <el-form-item :label="$t('状态')">
<dict-selector <dict-selector v-model="queryParams.status" clearable :type="DICT_TYPE.GIFT_STATUS" />
v-model="queryParams.status"
clearable
:type="DICT_TYPE.GIFT_STATUS"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('单次积分')"> <el-form-item :label="$t('单次积分')">
<el-row :gutter="10" style="width: 300px"> <el-row :gutter="10" style="width: 300px">
<el-col :span="10"> <el-col :span="10">
<dict-selector <dict-selector v-model="queryParams.getScoreOnceSymbol" clearable :type="DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL" @change="handleQuery" />
v-model="queryParams.getScoreOnceSymbol"
clearable
:type="DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL"
@change="handleQuery"
/>
</el-col> </el-col>
<el-col :span="14"> <el-col :span="14">
<el-input <el-input v-model.trim="queryParams.getScoreOnce" :placeholder="$t('请输入数字')" clearable onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" @keyup.enter.native="handleQuery" />
v-model.trim="queryParams.getScoreOnce"
:placeholder="$t('请输入数字')"
clearable
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@keyup.enter.native="handleQuery"
/>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item :label="$t('最高积分')"> <el-form-item :label="$t('最高积分')">
<el-row :gutter="10" style="width: 300px"> <el-row :gutter="10" style="width: 300px">
<el-col :span="10"> <el-col :span="10">
<dict-selector <dict-selector v-model="queryParams.maxScoreTotalSymbol" clearable :type="DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL" @change="handleQuery" />
v-model="queryParams.maxScoreTotalSymbol"
clearable
:type="DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL"
@change="handleQuery"
/>
</el-col> </el-col>
<el-col :span="14"> <el-col :span="14">
<el-input <el-input v-model.trim="queryParams.maxScoreTotal" :placeholder="$t('请输入数字')" clearable onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" @keyup.enter.native="handleQuery" />
v-model.trim="queryParams.maxScoreTotal"
:placeholder="$t('请输入数字')"
clearable
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@keyup.enter.native="handleQuery"
/>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item :label="$t('创建时间')"> <el-form-item :label="$t('创建时间')">
<el-date-picker <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('结束日期')" />
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>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ <el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t("搜索") }}</el-button>
$t("搜索") <el-button icon="el-icon-refresh" @click="resetQuery">{{ $t("重置") }}</el-button>
}}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{
$t("重置")
}}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row class="mb8"> <el-row class="mb8">
<el-button <el-button type="success" size="mini" icon="el-icon-plus" @click="handleNewScoreRule">{{ $t("添加规则") }}</el-button>
type="success"
size="mini"
icon="el-icon-plus"
@click="handleNewScoreRule"
>{{ $t("添加规则") }}</el-button
>
<right-toolbar <right-toolbar :show-search.sync="showSearch" @queryTable="handleQueryPagination" />
:show-search.sync="showSearch" <el-tooltip v-hasPermi="['ecw:memberManagement:enableMemberPointsSystem']" :content="`${$t('开启会员积分系统')} : ${switchState} `" placement="top" class="switchBtn">
@queryTable="handleQueryPagination" <el-switch v-model="switchState" :active-value="true" :inactive-text="$t('开启会员积分系统')" :inactive-value="false" @change="openSwitch($event)" />
/>
<el-tooltip
v-hasPermi="['ecw:memberManagement:enableMemberPointsSystem']"
:content="`${$t('开启会员积分系统')} : ${switchState} `"
placement="top"
class="switchBtn"
>
<el-switch
v-model="switchState"
:active-value="true"
:inactive-text="$t('开启会员积分系统')"
:inactive-value="false"
@change="openSwitch($event)"
/>
</el-tooltip> </el-tooltip>
</el-row> </el-row>
<el-table <el-table ref="multipleTable" v-loading="loading" :data="integrationRuleList">
ref="multipleTable" <el-table-column width="90" :label="$t('编号')" align="center">
v-loading="loading"
:data="integrationRuleList"
>
<el-table-column :label="$t('编号')" align="center">
<template #default="{ row }"> <template #default="{ row }">
<el-button size="mini" type="text" @click="handleViewDetails(row)"> <el-button size="mini" type="text" @click="handleViewDetails(row)"> {{ row.code || "/" }}</el-button>
{{ row.code || "/" }}</el-button
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="140" :label="$t('指标类型')" align="center"> <el-table-column width="100" :label="$t('指标类型')" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ {{ isChinese ? handleSourceType(scope.row.type).label : handleSourceType(scope.row.type).labelEn }}
isChinese
? handleSourceType(scope.row.type).label
: handleSourceType(scope.row.type).labelEn
}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column :label="$t('标题')" width="200" align="center" :prop="isChinese ? 'titleZh' : 'titleEn'" />
:label="$t('标题')"
align="center"
:prop="isChinese ? 'titleZh' : 'titleEn'"
/>
<el-table-column :label="$t('开始时间')" align="center"> <el-table-column :label="$t('开始时间')" width="150px" align="center">
<template #default="{ row }"> <template #default="{ row }"> {{ parseTime(row.startTime) || "/" }}</template>
{{ parseTime(row.startTime) || "/" }}</template
>
</el-table-column> </el-table-column>
<el-table-column :label="$t('结束时间')" align="center"> <el-table-column :label="$t('结束时间')" width="150px" align="center">
<template #default="{ row }"> <template #default="{ row }"> {{ parseTime(row.endTime) || "/" }}</template>
{{ parseTime(row.endTime) || "/" }}</template
>
</el-table-column> </el-table-column>
<el-table-column :label="$t('单次积分')" align="center"> <el-table-column :label="$t('单次积分')" align="center">
<template #default="{ row }"> {{ row.getScoreOnce || "--" }}</template> <template #default="{ row }"> {{ row.getScoreOnce || "--" }}</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column :label="$t('累计最高积分')" width="140px" align="center" prop="maxScoreTotal">
:label="$t('累计最高积分')"
align="center"
prop="maxScoreTotal"
>
<template #default="{ row }"> {{ row.maxScoreTotal || "--" }}</template> <template #default="{ row }"> {{ row.maxScoreTotal || "--" }}</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column :label="$t('规则说明')" width="260px" align="center" :prop="isChinese ? 'descZh' : 'descEn'" />
:label="$t('规则说明')"
align="center"
:prop="isChinese ? 'descZh' : 'descEn'"
/>
<el-table-column :label="$t('展示平台')" align="center"> <el-table-column :label="$t('展示平台')" align="center">
<template #default="{ row }"> <template #default="{ row }"> {{ handlePlatform(row.showPlatform) || "/" }}</template>
{{ handlePlatform(row.showPlatform) || "/" }}</template
>
</el-table-column> </el-table-column>
<el-table-column :label="$t('状态')" align="center"> <el-table-column :label="$t('状态')" align="center">
<template #default="{ row }"> <template #default="{ row }"> {{ $l(handleStatus(row.status), "label") || "/" }}</template>
{{ $l(handleStatus(row.status), "label") || "/" }}</template
>
</el-table-column> </el-table-column>
<el-table-column :label="$t('创建人')" align="center" prop="creator" /> <el-table-column :label="$t('创建人')" align="center" prop="creator" />
<el-table-column :label="$t('创建时间')" align="center"> <el-table-column :label="$t('创建时间')" width="150px" align="center">
<template #default="{ row }"> <template #default="{ row }"> {{ parseTime(row.createTime) || "/" }}</template>
{{ parseTime(row.createTime) || "/" }}</template
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column :label="$t('最后更新人')" width="140px" align="center" prop="updater" />
:label="$t('最后更新人')" <el-table-column :label="$t('最后更新时间')" width="150px" align="center">
align="center" <template #default="{ row }"> {{ parseTime(row.updateTime) || "/" }}</template>
prop="updater"
/>
<el-table-column :label="$t('最后更新时间')" align="center">
<template #default="{ row }">
{{ parseTime(row.updateTime) || "/" }}</template
>
</el-table-column> </el-table-column>
<el-table-column width="220px" :label="$t('操作')" align="center"> <el-table-column width="140px" :label="$t('操作')" align="center" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button <!-- <el-button
size="mini" size="mini"
...@@ -225,95 +101,30 @@ ...@@ -225,95 +101,30 @@
@click="handleViewDetails(scope.row)" @click="handleViewDetails(scope.row)"
>{{ $t("查看") }}</el-button >{{ $t("查看") }}</el-button
> --> > -->
<el-button <el-button size="mini" type="text" :disabled="scope.row.status != '1'" @click="handleCloseButton(scope.row)">{{ $t("关闭") }}</el-button>
size="mini" <el-button size="mini" type="text" @click="handleCopyButton(scope.row)">{{ $t("复制") }}</el-button>
type="text" <el-button size="mini" type="text" :disabled="scope.row.status != '1'" @click="handleDelayButton(scope.row)">{{ $t("延期") }}</el-button>
:disabled="scope.row.status != '1'" <el-button size="mini" :disabled="scope.row.status != '2'" type="text" @click="handleDelete(scope.row)">{{ $t("删除") }}</el-button>
@click="handleCloseButton(scope.row)" <el-button size="mini" type="text" :disabled="scope.row.status != '2'" @click="handleUpdate(scope.row)">{{ $t("编辑") }}</el-button>
>{{ $t("关闭") }}</el-button <el-button size="mini" type="text" :disabled="scope.row.status != '2'" @click="handleEnabledStatus(scope.row)">{{ $t("启用") }}</el-button>
>
<el-button
size="mini"
type="text"
@click="handleCopyButton(scope.row)"
>{{ $t("复制") }}</el-button
>
<el-button
size="mini"
type="text"
:disabled="scope.row.status != '1'"
@click="handleDelayButton(scope.row)"
>{{ $t("延期") }}</el-button
>
<el-button
size="mini"
:disabled="scope.row.status != '2'"
type="text"
@click="handleDelete(scope.row)"
>{{ $t("删除") }}</el-button
>
<el-button
size="mini"
type="text"
:disabled="scope.row.status != '2'"
@click="handleUpdate(scope.row)"
>{{ $t("编辑") }}</el-button
>
<el-button
size="mini"
type="text"
:disabled="scope.row.status != '2'"
@click="handleEnabledStatus(scope.row)"
>{{ $t("启用") }}</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- //分页列表 --> <!-- //分页列表 -->
<pagination <pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows" @pagination="handleQueryPagination" />
v-show="total > 0" <el-dialog :title="$t('提示')" :visible.sync="dialogPostponeVisible" width="30%">
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.rows"
@pagination="handleQueryPagination"
/>
<el-dialog
:title="$t('提示')"
:visible.sync="dialogPostponeVisible"
width="30%"
>
<el-row class="mb8">{{ $t("请选择延期时间") }}</el-row> <el-row class="mb8">{{ $t("请选择延期时间") }}</el-row>
<el-date-picker <el-date-picker v-model="postponeDatetime" type="datetime" clearable style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" :picker-options="pickerOptions" :placeholder="$t('请选择时间')" />
v-model="postponeDatetime"
type="datetime"
clearable
style="width: 240px"
value-format="yyyy-MM-dd HH:mm:ss"
:picker-options="pickerOptions"
:placeholder="$t('请选择时间')"
/>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogPostponeVisible = false">{{ <el-button @click="dialogPostponeVisible = false">{{ $t("取 消") }}</el-button>
$t("取 消") <el-button type="primary" @click="confirmPostponeIntegral">{{ $t("确 定") }}</el-button>
}}</el-button>
<el-button type="primary" @click="confirmPostponeIntegral">{{
$t("确 定")
}}</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { getDictDatas, DICT_TYPE } from "@/utils/dict"; import { getDictDatas, DICT_TYPE } from "@/utils/dict"
import { import { getScoreRecordList, integralRuleStatus, integralRuleCopy, integralRuleDelay, integralRuleDelete, switchRuleSet, switchRuleGet } from "@/api/ecw/memberManagement"
getScoreRecordList,
integralRuleStatus,
integralRuleCopy,
integralRuleDelay,
integralRuleDelete,
switchRuleSet,
switchRuleGet,
} from "@/api/ecw/memberManagement";
export default { export default {
name: "EcwMembermanagementIntegrationrule", name: "EcwMembermanagementIntegrationrule",
data() { data() {
...@@ -329,8 +140,8 @@ export default { ...@@ -329,8 +140,8 @@ export default {
postponeDatetime: "", postponeDatetime: "",
pickerOptions: { pickerOptions: {
disabledDate(time) { disabledDate(time) {
return time.getTime() < Date.now() - 8.64e7; return time.getTime() < Date.now() - 8.64e7
}, }
}, },
queryParams: { queryParams: {
type: "", type: "",
...@@ -342,112 +153,112 @@ export default { ...@@ -342,112 +153,112 @@ export default {
maxScoreTotalSymbol: "", maxScoreTotalSymbol: "",
maxScoreTotal: "", maxScoreTotal: "",
page: 1, page: 1,
rows: 10, rows: 10
}, }
}; }
}, },
computed: { computed: {
isChinese() { isChinese() {
return this.$i18n.locale === "zh_CN"; return this.$i18n.locale === "zh_CN"
}, }
}, },
created() { created() {
this.handleQuery(); this.handleQuery()
this.getSwitchRuleStatus(); this.getSwitchRuleStatus()
}, },
activated() { activated() {
this.handleQuery(); this.handleQuery()
}, },
methods: { methods: {
openSwitch(status) { openSwitch(status) {
this.$modal this.$modal
.confirm( .confirm(
this.$t("是否确认{val}会员积分系统", { this.$t("是否确认{val}会员积分系统", {
val: status ? this.$t("开启") : this.$t("关闭"), val: status ? this.$t("开启") : this.$t("关闭")
}) })
) )
.then(async () => { .then(async () => {
// return integralRuleDelete({ id: row.id }) // return integralRuleDelete({ id: row.id })
const { code } = await switchRuleSet({ switchState: status }); const { code } = await switchRuleSet({ switchState: status })
if (code === 0) { if (code === 0) {
this.$modal.msgSuccess(this.$t("成功")); this.$modal.msgSuccess(this.$t("成功"))
} }
}) })
.catch(() => { .catch(() => {
this.switchState = !status; this.switchState = !status
}); })
}, },
getSwitchRuleStatus() { getSwitchRuleStatus() {
switchRuleGet().then((res) => { switchRuleGet().then((res) => {
this.switchState = res.data; this.switchState = res.data
}); })
}, },
// 编辑操作按钮 // 编辑操作按钮
handleUpdate(row) { handleUpdate(row) {
this.$router.push({ this.$router.push({
path: "/member/memberManagement/addIntegrationRuleOperation", path: "/member/memberManagement/addIntegrationRuleOperation",
query: { id: row.id, pageStatus: "edit" }, query: { id: row.id, pageStatus: "edit" }
}); })
}, },
// 查看按钮操作 // 查看按钮操作
handleViewDetails(row) { handleViewDetails(row) {
this.$router.push({ this.$router.push({
path: "/member/memberManagement/addIntegrationRuleOperation", path: "/member/memberManagement/addIntegrationRuleOperation",
query: { id: row.id, pageStatus: "view" }, query: { id: row.id, pageStatus: "view" }
}); })
}, },
// 延期按钮操作 // 延期按钮操作
handleDelayButton(row) { handleDelayButton(row) {
this.postponeIntegralID = row.id; this.postponeIntegralID = row.id
this.dialogPostponeVisible = true; this.dialogPostponeVisible = true
}, },
confirmPostponeIntegral() { confirmPostponeIntegral() {
integralRuleDelay({ integralRuleDelay({
id: this.postponeIntegralID, id: this.postponeIntegralID,
endTime: this.postponeDatetime, endTime: this.postponeDatetime
}).then((res) => { }).then((res) => {
this.postponeDatetime = ""; this.postponeDatetime = ""
this.$modal.msgSuccess(this.$t("延期成功")); this.$modal.msgSuccess(this.$t("延期成功"))
}); })
}, },
// 删除按钮操作 // 删除按钮操作
handleDelete(row) { handleDelete(row) {
this.$modal this.$modal
.confirm(this.$t("是否确认删除此礼品规则")) .confirm(this.$t("是否确认删除此礼品规则"))
.then(function () { .then(function () {
return integralRuleDelete({ id: row.id }); return integralRuleDelete({ id: row.id })
}) })
.then(() => { .then(() => {
this.handleQuery(); this.handleQuery()
this.$modal.msgSuccess(this.$t("删除成功")); this.$modal.msgSuccess(this.$t("删除成功"))
}) })
.catch(() => {}); .catch(() => {})
}, },
// 启用按钮操作 // 启用按钮操作
handleEnabledStatus(row) { handleEnabledStatus(row) {
this.$modal this.$modal
.confirm(this.$t("是否确认启用此礼品规则")) .confirm(this.$t("是否确认启用此礼品规则"))
.then(function () { .then(function () {
return integralRuleStatus({ id: row.id, status: "1" }); return integralRuleStatus({ id: row.id, status: "1" })
}) })
.then(() => { .then(() => {
this.handleQuery(); this.handleQuery()
this.$modal.msgSuccess(this.$t("启用成功")); this.$modal.msgSuccess(this.$t("启用成功"))
}) })
.catch(() => {}); .catch(() => {})
}, },
// 复制按钮操作 // 复制按钮操作
handleCopyButton(row) { handleCopyButton(row) {
this.$modal this.$modal
.confirm(this.$t("是否确认复制积分规则")) .confirm(this.$t("是否确认复制积分规则"))
.then(function () { .then(function () {
return integralRuleCopy({ id: row.id }); return integralRuleCopy({ id: row.id })
}) })
.then(() => { .then(() => {
this.handleQuery(); this.handleQuery()
this.$modal.msgSuccess(this.$t("复制成功")); this.$modal.msgSuccess(this.$t("复制成功"))
}) })
.catch(() => {}); .catch(() => {})
}, },
// 关闭按钮操作 // 关闭按钮操作
...@@ -455,90 +266,70 @@ export default { ...@@ -455,90 +266,70 @@ export default {
this.$modal this.$modal
.confirm(this.$t("是否确认关闭此礼品规则")) .confirm(this.$t("是否确认关闭此礼品规则"))
.then(function () { .then(function () {
return integralRuleStatus({ id: row.id, status: "3" }); return integralRuleStatus({ id: row.id, status: "3" })
}) })
.then(() => { .then(() => {
this.handleQuery(); this.handleQuery()
this.$modal.msgSuccess(this.$t("关闭成功")); this.$modal.msgSuccess(this.$t("关闭成功"))
}) })
.catch(() => {}); .catch(() => {})
}, },
// new score rule func // new score rule func
handleNewScoreRule() { handleNewScoreRule() {
this.$router.push({ this.$router.push({
path: "/member/memberManagement/addIntegrationRuleOperation", path: "/member/memberManagement/addIntegrationRuleOperation",
query: { pageStatus: "new" }, query: { pageStatus: "new" }
}); })
}, },
// 积分来源 // 积分来源
handleSourceType(id) { handleSourceType(id) {
return this.getDictDatas(DICT_TYPE.SCORE_RULE_TYPE).filter( return this.getDictDatas(DICT_TYPE.SCORE_RULE_TYPE).filter((item) => item.value == id)[0]
(item) => item.value == id
)[0];
}, },
// 活动状态 // 活动状态
handleStatus(id) { handleStatus(id) {
return this.getDictDatas(DICT_TYPE.GIFT_STATUS).filter( return this.getDictDatas(DICT_TYPE.GIFT_STATUS).filter((item) => item.value == id)[0]
(item) => item.value == id
)[0];
}, },
arraysEqual(arr1, arr2) { arraysEqual(arr1, arr2) {
return arr1.filter((current) => { return arr1.filter((current) => {
return !!arr2.find((item) => item == current.value.toString()); return !!arr2.find((item) => item == current.value.toString())
}); })
}, },
// 展示平台 // 展示平台
handlePlatform(platformId) { handlePlatform(platformId) {
const platformIdLabel = []; const platformIdLabel = []
if (this.isChinese) { if (this.isChinese) {
this.arraysEqual( this.arraysEqual(this.getDictDatas(DICT_TYPE.PLATFORM_TYPE), platformId.split(",")).forEach((element) => {
this.getDictDatas(DICT_TYPE.PLATFORM_TYPE), platformIdLabel.push(element.label)
platformId.split(",") })
).forEach((element) => {
platformIdLabel.push(element.label);
});
} else { } else {
this.arraysEqual( this.arraysEqual(this.getDictDatas(DICT_TYPE.PLATFORM_TYPE), platformId.split(",")).forEach((element) => {
this.getDictDatas(DICT_TYPE.PLATFORM_TYPE), platformIdLabel.push(element.labelEn)
platformId.split(",") })
).forEach((element) => {
platformIdLabel.push(element.labelEn);
});
} }
return platformIdLabel.join(); return platformIdLabel.join()
}, },
handleQuery() { handleQuery() {
this.queryParams.page = 1; this.queryParams.page = 1
const params = { ...this.queryParams }; const params = { ...this.queryParams }
this.addBeginAndEndTime( this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime", false)
params,
this.dateRangeCreateTime,
"createTime",
false
);
getScoreRecordList(params).then((res) => { getScoreRecordList(params).then((res) => {
this.loading = false; this.loading = false
this.integrationRuleList = res.data.list; this.integrationRuleList = res.data.list
this.total = res.data.total; this.total = res.data.total
}); })
}, },
handleQueryPagination() { handleQueryPagination() {
const params = { ...this.queryParams }; const params = { ...this.queryParams }
this.addBeginAndEndTime( this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime", false)
params,
this.dateRangeCreateTime,
"createTime",
false
);
getScoreRecordList(params).then((res) => { getScoreRecordList(params).then((res) => {
this.loading = false; this.loading = false
this.integrationRuleList = res.data.list; this.integrationRuleList = res.data.list
this.total = res.data.total; this.total = res.data.total
}); })
}, },
resetQuery() { resetQuery() {
this.loading = true; this.loading = true
this.dateRangeCreateTime = []; this.dateRangeCreateTime = []
this.queryParams = { this.queryParams = {
ruleTitle: "", ruleTitle: "",
ruleDesc: "", ruleDesc: "",
...@@ -550,12 +341,12 @@ export default { ...@@ -550,12 +341,12 @@ export default {
endTime: "", endTime: "",
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
startTime: "", startTime: ""
}; }
this.handleQuery(); this.handleQuery()
}, }
}, }
}; }
</script> </script>
<style scoped> <style scoped>
.switchBtn { .switchBtn {
......
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-form <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item :label="$t('操作人')" prop="memberName"> <el-form-item :label="$t('操作人')" prop="memberName">
<el-input <el-input v-model="queryParams.memberName" :placeholder="$t('请输入操作人')" clearable @keyup.enter.native="handleQuery" />
v-model="queryParams.memberName"
:placeholder="$t('请输入操作人')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('分类')" prop="type"> <el-form-item :label="$t('分类')" prop="type">
<el-select <el-select v-model="queryParams.type" :placeholder="$t('请选择分类')" clearable>
v-model="queryParams.type" <el-option v-for="item in getDictDatas(DICT_TYPE.SCORE_RULE_TYPE)" :label="isChinese ? item.label : item.labelEn" :value="item.value" v-if="item.value == 3 || item.value == 4" />
:placeholder="$t('请选择分类')"
clearable
>
<el-option
v-for="item in getDictDatas(DICT_TYPE.SCORE_RULE_TYPE)"
:label="isChinese ? item.label : item.labelEn"
:value="item.value"
v-if="item.value == 3 || item.value == 4"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('标题')" prop="title"> <el-form-item :label="$t('标题')" prop="title">
<el-input <el-input v-model="queryParams.title" :placeholder="$t('请输入关键词查找')" clearable @keyup.enter.native="handleQuery" />
v-model="queryParams.title"
:placeholder="$t('请输入关键词查找')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('分享ID')" prop="code"> <el-form-item :label="$t('分享ID')" prop="code">
<el-input <el-input v-model="queryParams.code" :placeholder="$t('请输入分享ID')" clearable @keyup.enter.native="handleQuery" />
v-model="queryParams.code"
:placeholder="$t('请输入分享ID')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item :label="$t('总积分')" prop="type"> <el-form-item :label="$t('总积分')" prop="type">
<el-row :gutter="10" style="width: 300px"> <el-row :gutter="10" style="width: 300px">
<el-col :span="10"> <el-col :span="10">
<dict-selector <dict-selector v-model="queryParams.relationSymbol" clearable :type="DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL" @change="handleQuery" />
v-model="queryParams.relationSymbol"
clearable
:type="DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL"
@change="handleQuery"
/>
</el-col> </el-col>
<el-col :span="14"> <el-col :span="14">
<el-input <el-input v-model.trim="queryParams.totalScore" :placeholder="$t('请输入数字')" clearable onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" @keyup.enter.native="handleQuery" />
v-model.trim="queryParams.totalScore"
:placeholder="$t('请输入数字')"
clearable
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@keyup.enter.native="handleQuery"
/>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item :label="$t('操作时间')"> <el-form-item :label="$t('操作时间')">
<el-date-picker <el-date-picker v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" />
v-model="dateRangeCreateTime"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
/>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ <el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t("搜索") }}</el-button>
$t("搜索") <el-button icon="el-icon-refresh" @click="resetQuery">{{ $t("重置") }}</el-button>
}}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{
$t("重置")
}}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- 操作工具栏 --> <!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<right-toolbar <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row> </el-row>
<!-- 列表 --> <!-- 列表 -->
<el-table v-loading="loading" :data="list"> <el-table v-loading="loading" :data="list">
<el-table-column :label="$t('序号')" align="center" prop="id" /> <el-table-column width="100" :label="$t('序号')" align="center" prop="id" />
<el-table-column :label="$t('操作人')" align="center" prop="memberName" /> <el-table-column width="140" :label="$t('操作人')" align="center" prop="memberName" />
<el-table-column <el-table-column width="120" :label="$t('分类')" align="center" :prop="isChinese ? 'typeZh' : 'typeEn'" />
:label="$t('分类')" <el-table-column width="120" :label="$t('分享ID')" align="center" prop="code" />
align="center" <el-table-column :label="$t('标题')" align="center" :prop="isChinese ? 'titleZh' : 'titleEn'" />
:prop="isChinese ? 'typeZh' : 'typeEn'" <el-table-column :label="$t('操作时间')" align="center" prop="createTime"">
/>
<el-table-column :label="$t('分享ID')" align="center" prop="code" />
<el-table-column
:label="$t('标题')"
align="center"
:prop="isChinese ? 'titleZh' : 'titleEn'"
/>
<el-table-column
:label="$t('操作时间')"
align="center"
prop="createTime"
width="180"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column :label="$t('点击时间')" align="center" prop="createTime" width="180">
:label="$t('点击时间')"
align="center"
prop="createTime"
width="180"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.triggerTime) || "--" }}</span> <span>{{ parseTime(scope.row.triggerTime) || "--" }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="180" :label="$t('ip')" align="center" prop="ipAddress" />
<el-table-column :label="$t('积分')" align="center" prop="score" /> <el-table-column :label="$t('积分')" align="center" prop="score" />
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
<pagination <pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows" @pagination="getList" />
v-show="total > 0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.rows"
@pagination="getList"
/>
</div> </div>
</template> </template>
<script> <script>
import { getShareRecordDetails } from "@/api/ecw/memberManagement"; import { getShareRecordDetails } from "@/api/ecw/memberManagement"
export default { export default {
name: "EcwMembermanagementSharingdetailsIndex", name: "EcwMembermanagementSharingdetailsIndex",
components: {}, components: {},
...@@ -181,17 +101,17 @@ export default { ...@@ -181,17 +101,17 @@ export default {
status: null, status: null,
type: null, type: null,
category: null, category: null,
remark: null, remark: null
}, }
}; }
}, },
created() { created() {
this.getList(); this.getList()
}, },
computed: { computed: {
isChinese() { isChinese() {
return this.$i18n.locale === "zh_CN"; return this.$i18n.locale === "zh_CN"
}, }
}, },
methods: { methods: {
goShareDetails(row) { goShareDetails(row) {
...@@ -199,38 +119,38 @@ export default { ...@@ -199,38 +119,38 @@ export default {
this.$router.push({ this.$router.push({
path: "/member/memberManagement/sharingStatisticalDetails", path: "/member/memberManagement/sharingStatisticalDetails",
query: { query: {
id: row.id, id: row.id
}, }
}); })
} }
}, },
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true; this.loading = true
// 处理查询参数 // 处理查询参数
let params = { ...this.queryParams }; let params = { ...this.queryParams }
this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime"); this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime")
// 执行查询 // 执行查询
getShareRecordDetails(params).then((response) => { getShareRecordDetails(params).then((response) => {
this.list = response.data.list; this.list = response.data.list
this.total = response.data.total; this.total = response.data.total
this.loading = false; this.loading = false
}); })
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.page = 1; this.queryParams.page = 1
this.getList(); this.getList()
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.dateRangeCreateTime = []; this.dateRangeCreateTime = []
this.queryParams.relationSymbol = ""; this.queryParams.relationSymbol = ""
this.queryParams.totalScore = ""; this.queryParams.totalScore = ""
this.resetForm("queryForm"); this.resetForm("queryForm")
this.handleQuery(); this.handleQuery()
}, }
}, }
}; }
</script> </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