Commit 75f27623 authored by Smile's avatar Smile Committed by wux

会员页面,会员详情展示修改

parent 78d78ac9
......@@ -26,6 +26,7 @@ export function queryMemberExchangeRecord(data) {
});
}
//获取会员等级日志
export function queryMemberOperateLevelLog(data) {
return request({
url: "/member/level-operate-log/page",
......@@ -34,6 +35,23 @@ export function queryMemberOperateLevelLog(data) {
});
}
//获取会员等级详情
export function queryMemberLevelDetails(data) {
return request({
url: "/member/level-details/page",
method: "post",
data: data,
});
}
//更新会员等级详情
export function updateMemberLevelDetails(data) {
return request({
url: "/member/level-details/update",
method: "put",
data: data,
});
}
// 批量核销按钮
export function batchVerifyAPI(data) {
......
......@@ -76,7 +76,13 @@
> -->
<el-descriptions-item :label="$t('会员等级')">
<el-image :src="details.userScoreLevelInfo.levelIcon" style="width: 20px; height: 20px">{{ $t("") }}</el-image>
{{ details.userScoreLevelInfo.levelName }}
{{ isChinese ? handleMemberShipLevels(details.userScoreLevelInfo.level).label : handleMemberShipLevels(details.userScoreLevelInfo.level).labelEn }}
<el-button type="primary" class="copy-btn" @click="openLevelDetail()">
{{ $t("详情") }}
</el-button>
<el-button type="primary" @click="openLevelDetail(1)">
{{ $t("更新") }}
</el-button>
</el-descriptions-item>
<el-descriptions-item :label="$t('当前积分')">{{ details.userScoreLevelInfo.holdScore }}</el-descriptions-item>
<el-descriptions-item :label="$t('已兑换积分')">{{ details.userScoreLevelInfo.usedScore }}</el-descriptions-item>
......@@ -455,6 +461,40 @@
</el-tabs>
</div>
</el-dialog>
<el-dialog :title="levelDetailsTitle" :visible.sync="levelDetailsShow" width="50%" :rules="rulesEnterprise" :model="levelDetails" label-position="left" ref="formEnter" label-width="100px">
<el-form>
<el-form-item :label="$t('编号:')">
<el-input v-model="levelDetails.ruleNumber" style="width: 50%" disabled></el-input>
</el-form-item>
<el-form-item :label="$t('等级:')">
<dict-selector v-model="levelDetails.level" :disabled="levelDetailsCanEdit" clearable :type="DICT_TYPE.MEMBERSHIP_LEVELS" />
</el-form-item>
<el-form-item :label="$t('等级有效期:')">
<el-input v-model="levelDetails.validityPeriod" :disabled="levelDetailsCanEdit" style="width: 50%" ></el-input>
</el-form-item>
<el-form-item :label="$t('等级特殊设置')">
<el-switch
:disabled="levelDetailsCanEdit"
v-model="levelDetails.specificSettings"
active-color="#13ce66"
inactive-color="#ff4949">
</el-switch>
</el-form-item>
<el-form-item :label="$t('更新原因')">
<el-input :disabled="levelDetailsCanEdit" v-model="levelDetails.remarks" style="width: 50%" type="text"></el-input>
</el-form-item>
<el-form-item :label="$t('最后更新人')">
<el-input v-model="levelDetails.updaterName" style="width: 50%" disabled></el-input>
</el-form-item>
<el-form-item :label="$t('最后更新时间')">
<el-date-picker v-model="levelDetails.updateTime" style="width: 50%" type="datetime" disabled :placeholder="$t('请选择')"> </el-date-picker>
</el-form-item>
</el-form>
<div style="text-align: center">
<el-button @click="closeLevelDetail" type="primary">{{ $t("取 消") }}</el-button>
<el-button @click="submitDetails" v-if="!levelDetailsCanEdit" type="primary">{{ $t("保 存") }}</el-button>
</div>
</el-dialog>
<!-- 查看 礼品 -->
<operating-gift ref="operatingGift" :title="operatingPagetitle" :rewards-details="rewardsItem" :show.sync="dialogVisible" :node-list="nodeList" />
</div>
......@@ -465,7 +505,12 @@ import FileUpload from "@/components/FileUpload/index.vue"
import ImageUpload from "@/components/ImageUpload/index.vue"
import { DICT_TYPE, getDictDatas } from "@/utils/dict"
import ClipboardJS from "clipboard"
import {queryMemberScoreRecord, queryMemberExchangeRecord, queryMemberOperateLevelLog} from "@/api/ecw/memberManagement"
import {
queryMemberScoreRecord,
queryMemberExchangeRecord,
queryMemberOperateLevelLog,
queryMemberLevelDetails, updateMemberLevelDetails
} from "@/api/ecw/memberManagement"
import { getNodeList, getRewardsDetails } from "@/api/ecw/giftManagement"
import OperatingGift from "@/views/ecw/giftManagement/components/operatingGift.vue"
import IntegralRecord from "@/views/ecw/memberManagement/integralRecord"
......@@ -480,6 +525,20 @@ export default {
dateRangeCreateTimeRecord: [],
memberRecordList: [],
memberOperateLevelList: [],
levelDetails: {
configId: "",
ruleNumber: "",
memberId: "",
level: "",
validityPeriod: "",
specificSettings: false,
remarks: "",
updateTime: "",
updater: "",
updaterName: ""
},
levelDetailsCanEdit:true,
levelDetailsTitle:"",
queryParamsRecord: {
rewardTitle: "",
memberId: this.$route.params.id,
......@@ -501,6 +560,11 @@ export default {
pageNo: 1,
pageSize: 10
},
queryParamsDetails: {
memberId: this.$route.params.id,
pageNo: 1,
pageSize: 10
},
queryParams: {
ruleTitle: "",
ruleDesc: "",
......@@ -518,7 +582,6 @@ export default {
total: 0,
totalRecord: 0,
totalLevelLog: 0,
loading: true,
activeIndex: "reward",
// 表单校验
rulesId: {
......@@ -645,6 +708,7 @@ export default {
operatingPagetitle: "",
rewardsItem: {},
attestationShow: false,
levelDetailsShow: false,
modifyLicense: false,
modifyIdCard: true, //修改身份证
IdDetails: {},
......@@ -660,6 +724,7 @@ export default {
this.handleQuery()
this.handleQueryRecord()
this.handleQueryOperateLevelLog()
this.handleQueryDetailsLog()
this.getNodeListAPI()
},
computed: {
......@@ -731,6 +796,14 @@ export default {
this.totalLevelLog = res.data.total
})
},
handleQueryDetailsLog() {
this.queryParamsDetails.pageNo = 1
let params = { ...this.queryParamsDetails }
queryMemberLevelDetails(params).then((res) => {
this.loading = false
this.levelDetails = res.data.list[0]
})
},
resetQueryRecord() {
this.loading = true
......@@ -897,6 +970,30 @@ export default {
this.getEnterpriseFn()
}
},
openLevelDetail(val){
this.levelDetailsShow=true;
if (val == 1){
this.levelDetailsCanEdit=false;
this.levelDetailsTitle=this.$t("会员等级页面详情编辑");
}else{
this.levelDetailsCanEdit=true;
this.levelDetailsTitle=this.$t("会员等级页面详情查看");
}
},
closeLevelDetail(){
this.levelDetailsShow=false;
},
submitDetails(){
this.levelDetailsShow=false;
let params = { ...this.levelDetails }
updateMemberLevelDetails(params).then((res) => {
this.loading = false;
this.handleQueryOperateLevelLog();
this.handleQueryDetailsLog();
this.$message.success(this.$t("更新成功"));
})
},
handleClick(val) {
if (val.name == 1) {
this.getIdentityDetails()
......
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