Commit 41628737 authored by chenwei's avatar chenwei

Merge branch 'hotfix/preReleaseDefect' into 'pre-release'

Hotfix/pre release defect

See merge request !44
parents a299f73f fed7e783
import request from '@/utils/request'
import request from "@/utils/request";
// 操作积分
export function operateMemberScore(data) {
return request({
url: '/member/user-score/operate',
method: 'post',
data: data
})
url: "/member/user-score/operate",
method: "post",
data: data,
});
}
// 积分记录分页
export function queryMemberScoreRecord(data) {
return request({
url: '/member/user-score-log/page',
method: 'post',
data: data
})
url: "/member/user-score-log/page",
method: "post",
data: data,
});
}
// 兑换记录分页
export function queryMemberExchangeRecord(data) {
return request({
url: '/reward/redeem/record/page',
method: 'post',
data: data
})
url: "/reward/redeem/record/page",
method: "post",
data: data,
});
}
// 批量核销按钮
export function batchVerifyAPI(data) {
return request({
url: '/reward/redeem/record/batch/verify',
method: 'post',
data: data
})
url: "/reward/redeem/record/batch/verify",
method: "post",
data: data,
});
}
// 兑换记录导出
export function batchRecordExport(data) {
return request({
url: '/reward/redeem/record/export',
method: 'post',
data: data
})
url: "/reward/redeem/record/export",
method: "post",
data: data,
});
}
// 兑换记录导入
export function batchRecordImport(data) {
return request({
url: '/reward/redeem/record/import',
method: 'post',
data: data
})
url: "/reward/redeem/record/import",
method: "post",
data: data,
});
}
// 兑换记录导入模板下载
export function batchRecordImportTemplate() {
return request({
url: '/reward/redeem/record/import/template',
method: 'post',
responseType: 'blob'
})
url: "/reward/redeem/record/import/template",
method: "post",
responseType: "blob",
});
}
// 撤销 操作
export function rewardCancelQuery(data) {
return request({
url: '/reward/redeem/record/cancel',
method: 'post',
data: data
})
url: "/reward/redeem/record/cancel",
method: "post",
data: data,
});
}
// 获取记录详情
export function getRewardDetailQuery(data) {
return request({
url: '/reward/redeem/record/detail',
method: 'post',
data: data
})
url: "/reward/redeem/record/detail",
method: "post",
data: data,
});
}
// 更新兑换记录
export function updatedRewardsDetails(data) {
return request({
url: '/reward/redeem/record/update',
method: 'post',
data: data
})
url: "/reward/redeem/record/update",
method: "post",
data: data,
});
}
// 核销回退
export function verifyRollback(data) {
return request({
url: '/reward/redeem/record/verify-back',
method: 'post',
data: data
})
url: "/reward/redeem/record/verify-back",
method: "post",
data: data,
});
}
// 核销 操作
export function verifyRedeem(data) {
return request({
url: '/reward/redeem/record/verify',
method: 'post',
data: data
})
url: "/reward/redeem/record/verify",
method: "post",
data: data,
});
}
// 获取积分规则记录
export function getScoreRecordList(data) {
return request({
url: '/member/score-rule/page',
method: 'post',
url: "/member/score-rule/page",
method: "post",
params: {
page: data.page,
rows: data.rows
rows: data.rows,
},
data
})
data,
});
}
// 会员积分等级列表
export function getMemberLevelList(data) {
return request({
url: '/member/user-level/page',
method: 'post',
data
})
url: "/member/user-level/page",
method: "post",
data,
});
}
// 新增会员等级设置
export function addNewMemberLevel(data) {
return request({
url: '/member/user-level/add',
method: 'post',
data
})
url: "/member/user-level/add",
method: "post",
data,
});
}
// 删除会员等级
export function delMemberLevel(data) {
return request({
url: '/member/user-level/delete',
method: 'post',
data
})
url: "/member/user-level/delete",
method: "post",
data,
});
}
// edit member level
export function editMemberLevel(data) {
return request({
url: '/member/user-level/update',
method: 'post',
data
})
url: "/member/user-level/update",
method: "post",
data,
});
}
// 获得目的国、目的城市、目的仓列表
export function getRegionTreeList() {
return request({
url: '/member/score-rule/warehouse-tree-region-list',
method: 'get'
})
url: "/member/score-rule/warehouse-tree-region-list",
method: "get",
});
}
// 获取渠道列表
export function getChannelList() {
return request({
url: '/ecw/channel/list-all-simple',
method: 'get'
})
url: "/ecw/channel/list-all-simple",
method: "get",
});
}
// 积分规则创建
export function createIntegralRule(data) {
return request({
url: '/member/score-rule/create',
method: 'post',
data
})
url: "/member/score-rule/create",
method: "post",
data,
});
}
// 启用关闭 积分规则
export function integralRuleStatus(data) {
return request({
url: '/member/score-rule/status',
method: 'post',
data
})
url: "/member/score-rule/status",
method: "post",
data,
});
}
// 复制积分规则
export function integralRuleCopy(data) {
return request({
url: '/member/score-rule/copy',
method: 'post',
data
})
url: "/member/score-rule/copy",
method: "post",
data,
});
}
// 延期积分规则
export function integralRuleDelay(data) {
return request({
url: '/member/score-rule/delay',
method: 'post',
data
})
url: "/member/score-rule/delay",
method: "post",
data,
});
}
// 删除积分规则
export function integralRuleDelete(data) {
return request({
url: '/member/score-rule/delete',
method: 'post',
data
})
url: "/member/score-rule/delete",
method: "post",
data,
});
}
// 获取积分规则详情
export function integralRuleDetails(data) {
return request({
url: '/member/score-rule/get',
method: 'post',
data
})
url: "/member/score-rule/get",
method: "post",
data,
});
}
// 编辑积分规则
export function integralRuleUpdated(data) {
return request({
url: '/member/score-rule/update',
method: 'post',
data
})
url: "/member/score-rule/update",
method: "post",
data,
});
}
// 获取会员功能开关
export function switchRuleGet() {
return request({
url: '/member/score-rule/switch/get',
method: 'get'
})
url: "/member/score-rule/switch/get",
method: "get",
});
}
// 设置会员工能开关
export function switchRuleSet(data) {
return request({
url: '/member/score-rule/switch/set',
method: 'post',
data
})
url: "/member/score-rule/switch/set",
method: "post",
data,
});
}
//分享记录分页
export function getShareRecordList(data) {
return request({
url: "/member/score-rule/share-record/page",
method: "post",
data,
});
}
//获取分享记录详情
export function getShareRecordDetails(data) {
return request({
url: "/member/score-rule/share-record/detail",
method: "post",
data,
});
}
import router from '@/router'
import router from "@/router";
const state = {
visitedViews: [],
cachedViews: [],
}
};
// 获取页面的缓存名称
const getViewName = (view) => {
if(!view.meta?.componentPath){
return view.fullPath
}
return view.meta.componentPath.split('/').map(item => item.substring(0, 1).toUpperCase() + item.substring(1).toLowerCase()).join('')
}
if (!view.meta?.componentPath) {
return view.fullPath;
}
return view.meta.componentPath
.split("/")
.map(
(item) =>
item.substring(0, 1).toUpperCase() + item.substring(1).toLowerCase()
)
.join("");
};
const mutations = {
ADD_VISITED_VIEW: (state, view) => {
if (state.visitedViews.some(v => v.path === view.path)) return
if (state.visitedViews.some((v) => v.path === view.path)) return;
state.visitedViews.push(
Object.assign({}, view, {
title: view.meta.title || 'no-name'
title: view.meta.title || "no-name",
})
)
);
},
ADD_CACHED_VIEW: (state, view) => {
if (view.meta && view.meta.componentPath) {
let cacheName = getViewName(view)
if (state.cachedViews.includes(cacheName)) return
state.cachedViews.push(cacheName)
let cacheName = getViewName(view);
if (state.cachedViews.includes(cacheName)) return;
state.cachedViews.push(cacheName);
}
},
DEL_VISITED_VIEW: (state, view) => {
for (const [i, v] of state.visitedViews.entries()) {
if (v.path === view.path) {
state.visitedViews.splice(i, 1)
break
state.visitedViews.splice(i, 1);
break;
}
}
},
DEL_CACHED_VIEW: (state, view) => {
console.log('DEL_CACHED_VIEW', view)
const viewName = getViewName(view)
const index = state.cachedViews.indexOf(viewName)
index > -1 && state.cachedViews.splice(index, 1)
console.log("DEL_CACHED_VIEW", view);
const viewName = getViewName(view);
const index = state.cachedViews.indexOf(viewName);
index > -1 && state.cachedViews.splice(index, 1);
},
DEL_OTHERS_VISITED_VIEWS: (state, view) => {
state.visitedViews = state.visitedViews.filter(v => {
return v.meta.affix || v.path === view.path
})
state.visitedViews = state.visitedViews.filter((v) => {
return v.meta.affix || v.path === view.path;
});
},
DEL_OTHERS_CACHED_VIEWS: (state, view) => {
const index = state.cachedViews.indexOf(view.name)
const index = state.cachedViews.indexOf(view.name);
if (index > -1) {
state.cachedViews = state.cachedViews.slice(index, index + 1)
state.cachedViews = state.cachedViews.slice(index, index + 1);
} else {
state.cachedViews = []
state.cachedViews = [];
}
},
DEL_ALL_VISITED_VIEWS: state => {
DEL_ALL_VISITED_VIEWS: (state) => {
// keep affix tags
const affixTags = state.visitedViews.filter(tag => tag.meta.affix)
state.visitedViews = affixTags
const affixTags = state.visitedViews.filter((tag) => tag.meta.affix);
state.visitedViews = affixTags;
},
DEL_ALL_CACHED_VIEWS: state => {
state.cachedViews = []
DEL_ALL_CACHED_VIEWS: (state) => {
state.cachedViews = [];
},
UPDATE_VISITED_VIEW: (state, view) => {
for (let v of state.visitedViews) {
if (v.path === view.path) {
v = Object.assign(v, view)
break
v = Object.assign(v, view);
break;
}
}
},
DEL_RIGHT_VIEWS: (state, view) => {
const index = state.visitedViews.findIndex(v => v.path === view.path)
const index = state.visitedViews.findIndex((v) => v.path === view.path);
if (index === -1) {
return
return;
}
state.visitedViews = state.visitedViews.filter((item, idx) => {
if (idx <= index || (item.meta && item.meta.affix)) {
return true
return true;
}
const i = state.cachedViews.indexOf(item.name)
const i = state.cachedViews.indexOf(item.name);
if (i > -1) {
state.cachedViews.splice(i, 1)
state.cachedViews.splice(i, 1);
}
return false
})
return false;
});
},
DEL_LEFT_VIEWS: (state, view) => {
const index = state.visitedViews.findIndex(v => v.path === view.path)
const index = state.visitedViews.findIndex((v) => v.path === view.path);
if (index === -1) {
return
return;
}
state.visitedViews = state.visitedViews.filter((item, idx) => {
if (idx >= index || (item.meta && item.meta.affix)) {
return true
return true;
}
const i = state.cachedViews.indexOf(item.name)
const i = state.cachedViews.indexOf(item.name);
if (i > -1) {
state.cachedViews.splice(i, 1)
}
if(item.meta.link) {
const fi = state.iframeViews.findIndex(v => v.path === item.path)
state.iframeViews.splice(fi, 1)
state.cachedViews.splice(i, 1);
}
return false
})
if (item.meta.link) {
const fi = state.iframeViews.findIndex((v) => v.path === item.path);
state.iframeViews.splice(fi, 1);
}
}
return false;
});
},
};
const actions = {
addView({ dispatch }, view) {
dispatch('addVisitedView', view)
dispatch('addCachedView', view)
dispatch("addVisitedView", view);
dispatch("addCachedView", view);
},
addVisitedView({ commit }, view) {
commit('ADD_VISITED_VIEW', view)
commit("ADD_VISITED_VIEW", view);
},
addCachedView({ commit }, view) {
commit('ADD_CACHED_VIEW', view)
commit("ADD_CACHED_VIEW", view);
},
delView({ dispatch, state }, view) {
return new Promise(resolve => {
dispatch('delVisitedView', view)
dispatch('delCachedView', view)
return new Promise((resolve) => {
dispatch("delVisitedView", view);
dispatch("delCachedView", view);
resolve({
visitedViews: [...state.visitedViews],
cachedViews: [...state.cachedViews]
})
})
cachedViews: [...state.cachedViews],
});
});
},
delVisitedView({ commit, state }, view) {
return new Promise(resolve => {
commit('DEL_VISITED_VIEW', view)
resolve([...state.visitedViews])
})
return new Promise((resolve) => {
commit("DEL_VISITED_VIEW", view);
resolve([...state.visitedViews]);
});
},
delCachedView({ commit, state }, view) {
return new Promise(resolve => {
commit('DEL_CACHED_VIEW', view)
resolve([...state.cachedViews])
})
return new Promise((resolve) => {
commit("DEL_CACHED_VIEW", view);
resolve([...state.cachedViews]);
});
},
delOthersViews({ dispatch, state }, view) {
return new Promise(resolve => {
dispatch('delOthersVisitedViews', view)
dispatch('delOthersCachedViews', view)
return new Promise((resolve) => {
dispatch("delOthersVisitedViews", view);
dispatch("delOthersCachedViews", view);
resolve({
visitedViews: [...state.visitedViews],
cachedViews: [...state.cachedViews]
})
})
cachedViews: [...state.cachedViews],
});
});
},
delOthersVisitedViews({ commit, state }, view) {
return new Promise(resolve => {
commit('DEL_OTHERS_VISITED_VIEWS', view)
resolve([...state.visitedViews])
})
return new Promise((resolve) => {
commit("DEL_OTHERS_VISITED_VIEWS", view);
resolve([...state.visitedViews]);
});
},
delOthersCachedViews({ commit, state }, view) {
return new Promise(resolve => {
commit('DEL_OTHERS_CACHED_VIEWS', view)
resolve([...state.cachedViews])
})
return new Promise((resolve) => {
commit("DEL_OTHERS_CACHED_VIEWS", view);
resolve([...state.cachedViews]);
});
},
delAllViews({ dispatch, state }, view) {
return new Promise(resolve => {
dispatch('delAllVisitedViews', view)
dispatch('delAllCachedViews', view)
return new Promise((resolve) => {
dispatch("delAllVisitedViews", view);
dispatch("delAllCachedViews", view);
resolve({
visitedViews: [...state.visitedViews],
cachedViews: [...state.cachedViews]
})
})
cachedViews: [...state.cachedViews],
});
});
},
delAllVisitedViews({ commit, state }) {
return new Promise(resolve => {
commit('DEL_ALL_VISITED_VIEWS')
resolve([...state.visitedViews])
})
return new Promise((resolve) => {
commit("DEL_ALL_VISITED_VIEWS");
resolve([...state.visitedViews]);
});
},
delAllCachedViews({ commit, state }) {
return new Promise(resolve => {
commit('DEL_ALL_CACHED_VIEWS')
resolve([...state.cachedViews])
})
return new Promise((resolve) => {
commit("DEL_ALL_CACHED_VIEWS");
resolve([...state.cachedViews]);
});
},
updateVisitedView({ commit }, view) {
commit('UPDATE_VISITED_VIEW', view)
commit("UPDATE_VISITED_VIEW", view);
},
delRightTags({ commit }, view) {
return new Promise(resolve => {
commit('DEL_RIGHT_VIEWS', view)
resolve([...state.visitedViews])
})
},
delLeftTags({ commit }, view){
return new Promise(resolve => {
commit('DEL_LEFT_VIEWS', view)
resolve([...state.visitedViews])
})
},
delCurrentView({ dispatch }){
const view = router.history.current
return dispatch('delView', view).then(({visitedViews}) => {
const latestView = visitedViews.slice(-1)[0]
return new Promise((resolve) => {
commit("DEL_RIGHT_VIEWS", view);
resolve([...state.visitedViews]);
});
},
delLeftTags({ commit }, view) {
return new Promise((resolve) => {
commit("DEL_LEFT_VIEWS", view);
resolve([...state.visitedViews]);
});
},
delCurrentView({ dispatch }) {
const view = router.history.current;
return dispatch("delView", view).then(({ visitedViews }) => {
const latestView = visitedViews.slice(-1)[0];
if (latestView) {
router.push(latestView.fullPath)
router.push(latestView.fullPath);
} else {
// now the default is to redirect to the home page if there is no tags-view,
// you can adjust it according to your needs.
if (view.name === 'Dashboard') {
if (view.name === "Dashboard") {
// to reload home page
router.replace({ path: '/redirect' + view.fullPath })
router.replace({ path: "/redirect" + view.fullPath });
} else {
router.push('/')
router.push("/");
}
}
})
}
}
});
},
};
export default {
namespaced: true,
state,
mutations,
actions
}
actions,
};
......@@ -378,7 +378,7 @@ import OperatingGift from "@/views/ecw/giftManagement/components/operatingGift.v
import { uploadFile } from "@/api/infra/file";
import ImageUpload from "@/components/ImageUpload";
export default {
name: "GiftManagementList",
name: "EcwGiftmanagementIndex",
components: {
OperatingGift,
},
......@@ -442,6 +442,13 @@ export default {
activated() {
this.getList();
},
watch: {
dialogVisible(val, old) {
if (old && !val) {
this.getList();
}
},
},
methods: {
arraysEqual(arr1, arr2) {
return arr1.filter((current) => {
......
......@@ -66,24 +66,36 @@
prop="extraShare.activityDescZh"
v-if="queryParams.type == '4'"
>
<el-col :span="18">
<editor
:readOnly="showViewTime"
:class="{ readOnlyEditor: showViewTime }"
v-model="queryParams.extraShare.activityDescZh"
:min-height="150"
/>
</el-col>
<el-col :span="1"></el-col>
<el-button type="text" @click="viewActivityDesc('Zh')">{{
$t("预览")
}}</el-button>
</el-form-item>
<el-form-item
:label="$t('英文活动内容')"
prop="extraShare.activityDescEn"
v-if="queryParams.type == '4'"
>
<el-col :span="18">
<editor
:class="{ readOnlyEditor: showViewTime }"
:readOnly="showViewTime"
v-model="queryParams.extraShare.activityDescEn"
:min-height="150"
/>
</el-col>
<el-col :span="1"></el-col>
<el-button type="text" @click="viewActivityDesc('En')">{{
$t("预览")
}}</el-button>
</el-form-item>
<!-- 链接 -->
......@@ -127,7 +139,16 @@
/> </el-form-item
></el-col>
</el-row>
<!-- 注册链接 -->
<el-form-item :label="$t('注册链接')" v-if="queryParams.type == '3'">
<el-input
v-model="queryParams.registerUrl"
:placeholder="$t('请输入注册链接')"
clearable
:disabled="true"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
</el-form-item>
<el-form-item v-if="queryParams.type == '1'" :label="$t('首单')">
<el-radio-group v-model="queryParams.extraOrderV.firstOrder">
<el-radio
......@@ -531,6 +552,23 @@
@pagination="getList"
/>
</el-dialog>
<!-- 预览弹窗 -->
<el-dialog
:title="$t('预览')"
:visible.sync="viewActivityDialog"
width="400px"
>
<div class="container">
<div class="phoneBox">
<div class="title">
{{ reviewDedtails.title }}
</div>
<img :src="reviewDedtails.img" alt="" class="coverImg" />
<div class="detail" v-html="reviewDedtails.detail"></div>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
......@@ -629,6 +667,7 @@ export default {
}
};
return {
viewActivityDialog: false,
//查看显示时间详情
showViewTime: false,
CommonStatusEnum: CommonStatusEnum,
......@@ -851,6 +890,7 @@ export default {
},
lastSelectedList: [], //上一次选中数据
oneDimensionalList: [],
reviewDedtails: {},
queryParams: {
dateRangeCreateTime: [], //活动有效期
type: "", //指标类型
......@@ -868,6 +908,7 @@ export default {
descEn: "",
getScoreOnce: "", //除v值之外的积分规则
showPlatform: "1,2,3", //展示平台
registerUrl: "", //注册链接
extraRecommend: {
//推荐
shareContentEn: "",
......@@ -944,7 +985,8 @@ export default {
},
created() {
this.handleGetChannelList();
this.queryParams.registerUrl =
process.env.VUE_APP_BASE_API + "/#/pages/register/register";
this.getList();
if (this.$route.query.pageStatus == "edit") {
this.handleIntegralRuleDetails();
......@@ -957,6 +999,16 @@ export default {
},
activated() {},
methods: {
//预览活动详情
viewActivityDesc(val) {
this.viewActivityDialog = true;
this.reviewDedtails.title = this.queryParams[`title${val}`];
this.reviewDedtails.img = this.queryParams[`coverImage${val}`];
this.reviewDedtails.detail =
this.queryParams.extraShare[`activityDesc${val}`];
console.log("ppp", this.queryParams);
console.log("eeeppp", this.reviewDedtails);
},
//编辑更新积分规则
handleUpdatedIntegralRule() {
this.$refs["queryForm"].validate((valid) => {
......@@ -969,7 +1021,8 @@ export default {
this.queryParams.extraRegister.registerPlatform?.join();
if (
(this.queryParams.type =
1 && this.queryParams.extraOrderV.receiveAddrList[0][0] == "000")
1 &&
this.queryParams.extraOrderV.receiveAddrList?.[0]?.[0] == "000")
) {
// params.extraOrderV.receiveAddrList[0] = [0, 0, 0];
params.extraOrderV.receiveAddrList = [[0, 0, 0]];
......@@ -1324,4 +1377,20 @@ export default {
background-color: #f5f7fa;
cursor: not-allowed;
}
.phoneBox {
width: 375px;
border-radius: 4px;
border: 1px solid #ebeef5;
background-color: #fff;
overflow: hidden;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}
.container {
display: flex;
justify-items: center;
}
.coverImg {
height: auto;
width: 100%;
}
</style>
......@@ -447,7 +447,7 @@ import { getNowDateTime, parseTime } from "@/utils/ruoyi";
import { getBaseHeader } from "@/utils/request";
import OperatingGift from "@/views/ecw/giftManagement/components/operatingGift.vue";
export default {
name: "ExchangeRecord",
name: "EcwMembermanagementExchangerecord",
components: {
OperatingGift,
},
......
......@@ -193,7 +193,9 @@
},
})
"
>{{ `${$t("兑换记录ID")}:${row.extParamJson.redemptionNumber}` }}</el-button
>{{
`${$t("兑换记录ID")}:${row.extParamJson.redemptionNumber}`
}}</el-button
>
<!-- 系统过期 sourceType = 3 不展示 -->
<span v-if="row.sourceType == '3'"> -</span>
......@@ -255,7 +257,7 @@ import { getDictDatas, DICT_TYPE } from "@/utils/dict";
import { queryMemberScoreRecord } from "@/api/ecw/memberManagement";
export default {
name: "integralRecord",
name: "EcwMembermanagementIntegralrecord",
data() {
return {
dateRangeCreateTime: [],
......
......@@ -315,7 +315,7 @@ import {
switchRuleGet,
} from "@/api/ecw/memberManagement";
export default {
name: "IntegralRecord",
name: "EcwMembermanagementIntegrationrule",
data() {
return {
switchState: true,
......
......@@ -103,7 +103,8 @@
size="mini"
icon="el-icon-plus"
@click="handleScore"
>{{ $t("操作积分") }}</el-button>
>{{ $t("操作积分") }}</el-button
>
<right-toolbar
:show-search.sync="showSearch"
@queryTable="handleQueryPagination"
......@@ -127,8 +128,10 @@
<el-button
type="text"
@click="$router.push('/member/member/member-details/' + row.id)"
>{{ isChinese ? row.memberNameZh : row.memberNameEn }}</el-button>
</template></el-table-column>
>{{ isChinese ? row.memberNameZh : row.memberNameEn }}</el-button
>
</template></el-table-column
>
<el-table-column
width="140"
......@@ -147,7 +150,8 @@
<el-button
type="text"
@click="$router.push('/memberManagement/integralRecord')"
>{{ row.holdScore }}</el-button>
>{{ row.holdScore }}</el-button
>
</template>
</el-table-column>
<el-table-column :label="$t('已兑换积分')" align="center">
......@@ -155,7 +159,8 @@
<el-button
type="text"
@click="$router.push('/memberManagement/exchangeRecord')"
>{{ row.usedScore }}</el-button>
>{{ row.usedScore }}</el-button
>
</template>
</el-table-column>
<el-table-column
......@@ -165,7 +170,8 @@
/>
<el-table-column :label="$t('会员注册时间')" align="center">
<template #default="{ row }">
{{ parseTime(row.createTime) || "/" }}</template>
{{ parseTime(row.createTime) || "/" }}</template
>
</el-table-column>
</el-table>
<!-- //分页列表 -->
......@@ -203,7 +209,8 @@
v-for="dict in getDictDatas(DICT_TYPE.MEMBER_SCORE_OPERATE_TYPE)"
:key="dict.value"
:label="dict.value"
>{{ $l(dict, "label") }}</el-radio>
>{{ $l(dict, "label") }}</el-radio
>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('积分')">
......@@ -227,12 +234,12 @@
</div>
</template>
<script>
import { getDictDatas, DICT_TYPE } from '@/utils/dict'
import { getTradeCountryList, getMemberList } from '@/api/ecw/giftManagement'
import { operateMemberScore } from '@/api/ecw/memberManagement'
import { getDictDatas, DICT_TYPE } from "@/utils/dict";
import { getTradeCountryList, getMemberList } from "@/api/ecw/giftManagement";
import { operateMemberScore } from "@/api/ecw/memberManagement";
export default {
name: 'MemberPointsSummary',
name: "EcwMembermanagementMemberpointssummaryIndex",
data() {
return {
selectedMember: [],
......@@ -246,81 +253,81 @@ export default {
dialogVisible: false,
memberList: [],
formQuery: {
comment: '',
comment: "",
memberIds: [],
operateType: null,
scoreCount: null
scoreCount: null,
},
queryParams: {
country: null,
city: null,
endTime: '',
endTime: "",
holdScore: null,
holdScoreOperate: null,
key: '',
key: "",
pageNo: 1,
pageSize: 10,
startTime: '',
startTime: "",
usedScore: null,
usedScoreOperate: null
}
}
usedScoreOperate: null,
},
};
},
computed: {
isChinese() {
return this.$i18n.locale === 'zh_CN'
}
return this.$i18n.locale === "zh_CN";
},
},
created() {
this.handleQuery()
this.getCountryList()
this.handleQuery();
this.getCountryList();
},
activated() {
this.handleQuery()
this.handleQuery();
},
methods: {
handleScore() {
if (this.selectedMember.length > 0) {
this.formQuery.memberIds = this.selectedMember.map((item) => item.id)
this.dialogVisible = true
this.formQuery.memberIds = this.selectedMember.map((item) => item.id);
this.dialogVisible = true;
} else {
this.$message({
message: this.$t('请先选择会员再进行操作'),
type: 'warning'
})
message: this.$t("请先选择会员再进行操作"),
type: "warning",
});
}
},
handleScoreSubmit() {
this.$confirm(this.$t('确认提交?'))
this.$confirm(this.$t("确认提交?"))
.then((_) => {
const params = { ...this.formQuery }
const params = { ...this.formQuery };
operateMemberScore(params).then((res) => {
this.dialogVisible = false
this.dialogVisible = false;
this.formQuery = {
comment: '',
comment: "",
memberIds: [],
operateType: null,
scoreCount: null
}
this.$refs.multipleTable.clearSelection()
this.selectedMember = []
this.$message.success(this.$t('操作成功'))
})
scoreCount: null,
};
this.$refs.multipleTable.clearSelection();
this.selectedMember = [];
this.$message.success(this.$t("操作成功"));
});
})
.catch((_) => {})
.catch((_) => {});
},
handleClose(done) {
this.$confirm(this.$t('确认关闭?'))
this.$confirm(this.$t("确认关闭?"))
.then((_) => {
done()
done();
})
.catch((_) => {})
.catch((_) => {});
},
handleSelectionChange(val) {
this.selectedMember = val
this.selectedMember = val;
},
dialogBeforeClose() {
this.loading = true
this.loading = true;
this.queryParams = {
country: null,
city: null,
......@@ -332,42 +339,42 @@ export default {
pageSize: 10,
startTime: null,
usedScore: null,
usedScoreOperate: null
}
usedScoreOperate: null,
};
},
getCountryList() {
getTradeCountryList().then((res) => {
this.countryList = res.data
})
this.countryList = res.data;
});
},
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];
}
getMemberList(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];
}
getMemberList(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.dateRangeCreateTime = []
this.loading = true
this.dateRangeCreateTime = [];
this.loading = true;
this.queryParams = {
country: null,
city: null,
......@@ -379,10 +386,10 @@ export default {
pageSize: 10,
startTime: null,
usedScore: null,
usedScoreOperate: null
}
this.handleQuery()
}
}
}
usedScoreOperate: null,
};
this.handleQuery();
},
},
};
</script>
<template>
<div>
<el-page-header
@back="goBack"
class="header"
:content="$t('分享统计详情')"
></el-page-header>
<div class="app-container">
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column :label="$t('序号')" align="center" prop="id" />
<el-table-column
:label="$t('操作人')"
align="center"
prop="memberName"
/>
<el-table-column
:label="$t('分类')"
align="center"
:prop="isChinese ? 'typeZh' : 'typeEn'"
/>
<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">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column
:label="$t('点击时间')"
align="center"
prop="createTime"
width="180"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) || "--" }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('积分')" align="center" prop="score" />
</el-table>
<!-- 分页组件 -->
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.rows"
@pagination="getList"
/>
</div>
</div>
</template>
<script>
import { getShareRecordDetails } from "@/api/ecw/memberManagement";
import { getDictDatas, DICT_TYPE } from "@/utils/dict";
export default {
name: "details",
components: {},
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 字典类型列表
list: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
dateRangeCreateTime: [],
// 查询参数
queryParams: {
page: 1,
rows: 10,
id: "",
},
// 表单参数
form: {},
// 表单校验
};
},
created() {
this.queryParams.id = this.$route.query.id;
this.getList();
},
computed: {
isChinese() {
return this.$i18n.locale === "zh_CN";
},
},
methods: {
goBack() {
this.$router.back();
},
/** 查询列表 */
getList() {
this.loading = true;
// 处理查询参数
let params = { ...this.queryParams };
// 执行查询
getShareRecordDetails(params).then((response) => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 取消按钮 */
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.page = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRangeCreateTime = [];
this.resetForm("queryForm");
this.handleQuery();
},
},
};
</script>
<style scoped>
.header {
padding-top: 40px;
padding-left: 20px;
}
</style>
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item :label="$t('操作人')" prop="memberName">
<el-input
v-model="queryParams.memberName"
:placeholder="$t('请输入操作人')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="$t('分类')" prop="type">
<el-select
v-model="queryParams.type"
: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-form-item>
<el-form-item :label="$t('标题')" prop="title">
<el-input
v-model="queryParams.title"
:placeholder="$t('请输入关键词查找')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="$t('分享ID')" prop="code">
<el-input
v-model="queryParams.code"
:placeholder="$t('请输入分享ID')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="$t('总积分')" prop="type">
<el-row :gutter="10" style="width: 300px">
<el-col :span="10">
<dict-selector
v-model="queryParams.relationSymbol"
clearable
:type="DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL"
@change="handleQuery"
/>
</el-col>
<el-col :span="14">
<el-input
v-model.trim="queryParams.totalScore"
: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"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
/>
</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-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column :label="$t('序号')" align="center" prop="id" />
<el-table-column :label="$t('操作人')" align="center" prop="memberName" />
<el-table-column
:label="$t('分类')"
align="center"
:prop="isChinese ? 'typeZh' : 'typeEn'"
/>
<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">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column
:label="$t('有效次数')"
align="center"
prop="triggerCount"
>
<template slot-scope="scope">
<el-button type="text" @click="goShareDetails(scope.row)">{{
scope.row.triggerCount
}}</el-button>
</template>
</el-table-column>
<el-table-column :label="$t('总积分')" align="center" prop="totalScore" />
<el-table-column
:label="$t('最新点击时间')"
align="center"
prop="createTime"
width="180"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) || "--" }}</span>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.rows"
@pagination="getList"
/>
</div>
</template>
<script>
import { getShareRecordList } from "@/api/ecw/memberManagement";
export default {
name: "EcwMembermanagementSharingstatisticsIndex",
components: {},
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 字典类型列表
list: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
dateRangeCreateTime: [],
// 查询参数
queryParams: {
page: 1,
rows: 10,
memberName: "", //操作人
type: "", //分类
title: "",
relationSymbol: "", //查询条件
totalScore: "",
name: null,
status: null,
type: null,
category: null,
remark: null,
},
};
},
created() {
this.getList();
},
computed: {
isChinese() {
return this.$i18n.locale === "zh_CN";
},
},
methods: {
goShareDetails(row) {
if (row.triggerCount != "0") {
this.$router.push({
path: "/memberManagement/sharingStatisticalDetails",
query: {
id: row.id,
},
});
}
},
/** 查询列表 */
getList() {
this.loading = true;
// 处理查询参数
let params = { ...this.queryParams };
this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime");
// 执行查询
getShareRecordList(params).then((response) => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.page = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRangeCreateTime = [];
this.queryParams.relationSymbol = "";
this.queryParams.totalScore = "";
this.resetForm("queryForm");
this.handleQuery();
},
},
};
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment