Commit fed7e783 authored by chenwei's avatar chenwei

Merge branch 'feature/099_customer_filter' into 'hotfix/preReleaseDefect'

问题修复,面包屑等等等

See merge request !43
parents b5d38eb3 8c4b47d8
import request from '@/utils/request' import request from "@/utils/request";
// 操作积分 // 操作积分
export function operateMemberScore(data) { export function operateMemberScore(data) {
return request({ return request({
url: '/member/user-score/operate', url: "/member/user-score/operate",
method: 'post', method: "post",
data: data data: data,
}) });
} }
// 积分记录分页 // 积分记录分页
export function queryMemberScoreRecord(data) { export function queryMemberScoreRecord(data) {
return request({ return request({
url: '/member/user-score-log/page', url: "/member/user-score-log/page",
method: 'post', method: "post",
data: data data: data,
}) });
} }
// 兑换记录分页 // 兑换记录分页
export function queryMemberExchangeRecord(data) { export function queryMemberExchangeRecord(data) {
return request({ return request({
url: '/reward/redeem/record/page', url: "/reward/redeem/record/page",
method: 'post', method: "post",
data: data data: data,
}) });
} }
// 批量核销按钮 // 批量核销按钮
export function batchVerifyAPI(data) { export function batchVerifyAPI(data) {
return request({ return request({
url: '/reward/redeem/record/batch/verify', url: "/reward/redeem/record/batch/verify",
method: 'post', method: "post",
data: data data: data,
}) });
} }
// 兑换记录导出 // 兑换记录导出
export function batchRecordExport(data) { export function batchRecordExport(data) {
return request({ return request({
url: '/reward/redeem/record/export', url: "/reward/redeem/record/export",
method: 'post', method: "post",
data: data data: data,
}) });
} }
// 兑换记录导入 // 兑换记录导入
export function batchRecordImport(data) { export function batchRecordImport(data) {
return request({ return request({
url: '/reward/redeem/record/import', url: "/reward/redeem/record/import",
method: 'post', method: "post",
data: data data: data,
}) });
} }
// 兑换记录导入模板下载 // 兑换记录导入模板下载
export function batchRecordImportTemplate() { export function batchRecordImportTemplate() {
return request({ return request({
url: '/reward/redeem/record/import/template', url: "/reward/redeem/record/import/template",
method: 'post', method: "post",
responseType: 'blob' responseType: "blob",
}) });
} }
// 撤销 操作 // 撤销 操作
export function rewardCancelQuery(data) { export function rewardCancelQuery(data) {
return request({ return request({
url: '/reward/redeem/record/cancel', url: "/reward/redeem/record/cancel",
method: 'post', method: "post",
data: data data: data,
}) });
} }
// 获取记录详情 // 获取记录详情
export function getRewardDetailQuery(data) { export function getRewardDetailQuery(data) {
return request({ return request({
url: '/reward/redeem/record/detail', url: "/reward/redeem/record/detail",
method: 'post', method: "post",
data: data data: data,
}) });
} }
// 更新兑换记录 // 更新兑换记录
export function updatedRewardsDetails(data) { export function updatedRewardsDetails(data) {
return request({ return request({
url: '/reward/redeem/record/update', url: "/reward/redeem/record/update",
method: 'post', method: "post",
data: data data: data,
}) });
} }
// 核销回退 // 核销回退
export function verifyRollback(data) { export function verifyRollback(data) {
return request({ return request({
url: '/reward/redeem/record/verify-back', url: "/reward/redeem/record/verify-back",
method: 'post', method: "post",
data: data data: data,
}) });
} }
// 核销 操作 // 核销 操作
export function verifyRedeem(data) { export function verifyRedeem(data) {
return request({ return request({
url: '/reward/redeem/record/verify', url: "/reward/redeem/record/verify",
method: 'post', method: "post",
data: data data: data,
}) });
} }
// 获取积分规则记录 // 获取积分规则记录
export function getScoreRecordList(data) { export function getScoreRecordList(data) {
return request({ return request({
url: '/member/score-rule/page', url: "/member/score-rule/page",
method: 'post', method: "post",
params: { params: {
page: data.page, page: data.page,
rows: data.rows rows: data.rows,
}, },
data data,
}) });
} }
// 会员积分等级列表 // 会员积分等级列表
export function getMemberLevelList(data) { export function getMemberLevelList(data) {
return request({ return request({
url: '/member/user-level/page', url: "/member/user-level/page",
method: 'post', method: "post",
data data,
}) });
} }
// 新增会员等级设置 // 新增会员等级设置
export function addNewMemberLevel(data) { export function addNewMemberLevel(data) {
return request({ return request({
url: '/member/user-level/add', url: "/member/user-level/add",
method: 'post', method: "post",
data data,
}) });
} }
// 删除会员等级 // 删除会员等级
export function delMemberLevel(data) { export function delMemberLevel(data) {
return request({ return request({
url: '/member/user-level/delete', url: "/member/user-level/delete",
method: 'post', method: "post",
data data,
}) });
} }
// edit member level // edit member level
export function editMemberLevel(data) { export function editMemberLevel(data) {
return request({ return request({
url: '/member/user-level/update', url: "/member/user-level/update",
method: 'post', method: "post",
data data,
}) });
} }
// 获得目的国、目的城市、目的仓列表 // 获得目的国、目的城市、目的仓列表
export function getRegionTreeList() { export function getRegionTreeList() {
return request({ return request({
url: '/member/score-rule/warehouse-tree-region-list', url: "/member/score-rule/warehouse-tree-region-list",
method: 'get' method: "get",
}) });
} }
// 获取渠道列表 // 获取渠道列表
export function getChannelList() { export function getChannelList() {
return request({ return request({
url: '/ecw/channel/list-all-simple', url: "/ecw/channel/list-all-simple",
method: 'get' method: "get",
}) });
} }
// 积分规则创建 // 积分规则创建
export function createIntegralRule(data) { export function createIntegralRule(data) {
return request({ return request({
url: '/member/score-rule/create', url: "/member/score-rule/create",
method: 'post', method: "post",
data data,
}) });
} }
// 启用关闭 积分规则 // 启用关闭 积分规则
export function integralRuleStatus(data) { export function integralRuleStatus(data) {
return request({ return request({
url: '/member/score-rule/status', url: "/member/score-rule/status",
method: 'post', method: "post",
data data,
}) });
} }
// 复制积分规则 // 复制积分规则
export function integralRuleCopy(data) { export function integralRuleCopy(data) {
return request({ return request({
url: '/member/score-rule/copy', url: "/member/score-rule/copy",
method: 'post', method: "post",
data data,
}) });
} }
// 延期积分规则 // 延期积分规则
export function integralRuleDelay(data) { export function integralRuleDelay(data) {
return request({ return request({
url: '/member/score-rule/delay', url: "/member/score-rule/delay",
method: 'post', method: "post",
data data,
}) });
} }
// 删除积分规则 // 删除积分规则
export function integralRuleDelete(data) { export function integralRuleDelete(data) {
return request({ return request({
url: '/member/score-rule/delete', url: "/member/score-rule/delete",
method: 'post', method: "post",
data data,
}) });
} }
// 获取积分规则详情 // 获取积分规则详情
export function integralRuleDetails(data) { export function integralRuleDetails(data) {
return request({ return request({
url: '/member/score-rule/get', url: "/member/score-rule/get",
method: 'post', method: "post",
data data,
}) });
} }
// 编辑积分规则 // 编辑积分规则
export function integralRuleUpdated(data) { export function integralRuleUpdated(data) {
return request({ return request({
url: '/member/score-rule/update', url: "/member/score-rule/update",
method: 'post', method: "post",
data data,
}) });
} }
// 获取会员功能开关 // 获取会员功能开关
export function switchRuleGet() { export function switchRuleGet() {
return request({ return request({
url: '/member/score-rule/switch/get', url: "/member/score-rule/switch/get",
method: 'get' method: "get",
}) });
} }
// 设置会员工能开关 // 设置会员工能开关
export function switchRuleSet(data) { export function switchRuleSet(data) {
return request({ return request({
url: '/member/score-rule/switch/set', url: "/member/score-rule/switch/set",
method: 'post', method: "post",
data 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 = { const state = {
visitedViews: [], visitedViews: [],
cachedViews: [], cachedViews: [],
} };
// 获取页面的缓存名称 // 获取页面的缓存名称
const getViewName = (view) => { const getViewName = (view) => {
if(!view.meta?.componentPath){ if (!view.meta?.componentPath) {
return view.fullPath return view.fullPath;
} }
return view.meta.componentPath.split('/').map(item => item.substring(0, 1).toUpperCase() + item.substring(1).toLowerCase()).join('') return view.meta.componentPath
} .split("/")
.map(
(item) =>
item.substring(0, 1).toUpperCase() + item.substring(1).toLowerCase()
)
.join("");
};
const mutations = { const mutations = {
ADD_VISITED_VIEW: (state, view) => { 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( state.visitedViews.push(
Object.assign({}, view, { Object.assign({}, view, {
title: view.meta.title || 'no-name' title: view.meta.title || "no-name",
}) })
) );
}, },
ADD_CACHED_VIEW: (state, view) => { ADD_CACHED_VIEW: (state, view) => {
if (view.meta && view.meta.componentPath) { if (view.meta && view.meta.componentPath) {
let cacheName = getViewName(view) let cacheName = getViewName(view);
if (state.cachedViews.includes(cacheName)) return if (state.cachedViews.includes(cacheName)) return;
state.cachedViews.push(cacheName) state.cachedViews.push(cacheName);
} }
}, },
DEL_VISITED_VIEW: (state, view) => { DEL_VISITED_VIEW: (state, view) => {
for (const [i, v] of state.visitedViews.entries()) { for (const [i, v] of state.visitedViews.entries()) {
if (v.path === view.path) { if (v.path === view.path) {
state.visitedViews.splice(i, 1) state.visitedViews.splice(i, 1);
break break;
} }
} }
}, },
DEL_CACHED_VIEW: (state, view) => { DEL_CACHED_VIEW: (state, view) => {
console.log('DEL_CACHED_VIEW', view) console.log("DEL_CACHED_VIEW", view);
const viewName = getViewName(view) const viewName = getViewName(view);
const index = state.cachedViews.indexOf(viewName) const index = state.cachedViews.indexOf(viewName);
index > -1 && state.cachedViews.splice(index, 1) index > -1 && state.cachedViews.splice(index, 1);
}, },
DEL_OTHERS_VISITED_VIEWS: (state, view) => { DEL_OTHERS_VISITED_VIEWS: (state, view) => {
state.visitedViews = state.visitedViews.filter(v => { state.visitedViews = state.visitedViews.filter((v) => {
return v.meta.affix || v.path === view.path return v.meta.affix || v.path === view.path;
}) });
}, },
DEL_OTHERS_CACHED_VIEWS: (state, view) => { DEL_OTHERS_CACHED_VIEWS: (state, view) => {
const index = state.cachedViews.indexOf(view.name) const index = state.cachedViews.indexOf(view.name);
if (index > -1) { if (index > -1) {
state.cachedViews = state.cachedViews.slice(index, index + 1) state.cachedViews = state.cachedViews.slice(index, index + 1);
} else { } else {
state.cachedViews = [] state.cachedViews = [];
} }
}, },
DEL_ALL_VISITED_VIEWS: state => { DEL_ALL_VISITED_VIEWS: (state) => {
// keep affix tags // keep affix tags
const affixTags = state.visitedViews.filter(tag => tag.meta.affix) const affixTags = state.visitedViews.filter((tag) => tag.meta.affix);
state.visitedViews = affixTags state.visitedViews = affixTags;
}, },
DEL_ALL_CACHED_VIEWS: state => { DEL_ALL_CACHED_VIEWS: (state) => {
state.cachedViews = [] state.cachedViews = [];
}, },
UPDATE_VISITED_VIEW: (state, view) => { UPDATE_VISITED_VIEW: (state, view) => {
for (let v of state.visitedViews) { for (let v of state.visitedViews) {
if (v.path === view.path) { if (v.path === view.path) {
v = Object.assign(v, view) v = Object.assign(v, view);
break break;
} }
} }
}, },
DEL_RIGHT_VIEWS: (state, view) => { 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) { if (index === -1) {
return return;
} }
state.visitedViews = state.visitedViews.filter((item, idx) => { state.visitedViews = state.visitedViews.filter((item, idx) => {
if (idx <= index || (item.meta && item.meta.affix)) { 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) { if (i > -1) {
state.cachedViews.splice(i, 1) state.cachedViews.splice(i, 1);
} }
return false return false;
}) });
}, },
DEL_LEFT_VIEWS: (state, view) => { 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) { if (index === -1) {
return return;
} }
state.visitedViews = state.visitedViews.filter((item, idx) => { state.visitedViews = state.visitedViews.filter((item, idx) => {
if (idx >= index || (item.meta && item.meta.affix)) { 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) { if (i > -1) {
state.cachedViews.splice(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)
} }
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 = { const actions = {
addView({ dispatch }, view) { addView({ dispatch }, view) {
dispatch('addVisitedView', view) dispatch("addVisitedView", view);
dispatch('addCachedView', view) dispatch("addCachedView", view);
}, },
addVisitedView({ commit }, view) { addVisitedView({ commit }, view) {
commit('ADD_VISITED_VIEW', view) commit("ADD_VISITED_VIEW", view);
}, },
addCachedView({ commit }, view) { addCachedView({ commit }, view) {
commit('ADD_CACHED_VIEW', view) commit("ADD_CACHED_VIEW", view);
}, },
delView({ dispatch, state }, view) { delView({ dispatch, state }, view) {
return new Promise(resolve => { return new Promise((resolve) => {
dispatch('delVisitedView', view) dispatch("delVisitedView", view);
dispatch('delCachedView', view) dispatch("delCachedView", view);
resolve({ resolve({
visitedViews: [...state.visitedViews], visitedViews: [...state.visitedViews],
cachedViews: [...state.cachedViews] cachedViews: [...state.cachedViews],
}) });
}) });
}, },
delVisitedView({ commit, state }, view) { delVisitedView({ commit, state }, view) {
return new Promise(resolve => { return new Promise((resolve) => {
commit('DEL_VISITED_VIEW', view) commit("DEL_VISITED_VIEW", view);
resolve([...state.visitedViews]) resolve([...state.visitedViews]);
}) });
}, },
delCachedView({ commit, state }, view) { delCachedView({ commit, state }, view) {
return new Promise(resolve => { return new Promise((resolve) => {
commit('DEL_CACHED_VIEW', view) commit("DEL_CACHED_VIEW", view);
resolve([...state.cachedViews]) resolve([...state.cachedViews]);
}) });
}, },
delOthersViews({ dispatch, state }, view) { delOthersViews({ dispatch, state }, view) {
return new Promise(resolve => { return new Promise((resolve) => {
dispatch('delOthersVisitedViews', view) dispatch("delOthersVisitedViews", view);
dispatch('delOthersCachedViews', view) dispatch("delOthersCachedViews", view);
resolve({ resolve({
visitedViews: [...state.visitedViews], visitedViews: [...state.visitedViews],
cachedViews: [...state.cachedViews] cachedViews: [...state.cachedViews],
}) });
}) });
}, },
delOthersVisitedViews({ commit, state }, view) { delOthersVisitedViews({ commit, state }, view) {
return new Promise(resolve => { return new Promise((resolve) => {
commit('DEL_OTHERS_VISITED_VIEWS', view) commit("DEL_OTHERS_VISITED_VIEWS", view);
resolve([...state.visitedViews]) resolve([...state.visitedViews]);
}) });
}, },
delOthersCachedViews({ commit, state }, view) { delOthersCachedViews({ commit, state }, view) {
return new Promise(resolve => { return new Promise((resolve) => {
commit('DEL_OTHERS_CACHED_VIEWS', view) commit("DEL_OTHERS_CACHED_VIEWS", view);
resolve([...state.cachedViews]) resolve([...state.cachedViews]);
}) });
}, },
delAllViews({ dispatch, state }, view) { delAllViews({ dispatch, state }, view) {
return new Promise(resolve => { return new Promise((resolve) => {
dispatch('delAllVisitedViews', view) dispatch("delAllVisitedViews", view);
dispatch('delAllCachedViews', view) dispatch("delAllCachedViews", view);
resolve({ resolve({
visitedViews: [...state.visitedViews], visitedViews: [...state.visitedViews],
cachedViews: [...state.cachedViews] cachedViews: [...state.cachedViews],
}) });
}) });
}, },
delAllVisitedViews({ commit, state }) { delAllVisitedViews({ commit, state }) {
return new Promise(resolve => { return new Promise((resolve) => {
commit('DEL_ALL_VISITED_VIEWS') commit("DEL_ALL_VISITED_VIEWS");
resolve([...state.visitedViews]) resolve([...state.visitedViews]);
}) });
}, },
delAllCachedViews({ commit, state }) { delAllCachedViews({ commit, state }) {
return new Promise(resolve => { return new Promise((resolve) => {
commit('DEL_ALL_CACHED_VIEWS') commit("DEL_ALL_CACHED_VIEWS");
resolve([...state.cachedViews]) resolve([...state.cachedViews]);
}) });
}, },
updateVisitedView({ commit }, view) { updateVisitedView({ commit }, view) {
commit('UPDATE_VISITED_VIEW', view) commit("UPDATE_VISITED_VIEW", view);
}, },
delRightTags({ commit }, view) { delRightTags({ commit }, view) {
return new Promise(resolve => { return new Promise((resolve) => {
commit('DEL_RIGHT_VIEWS', view) commit("DEL_RIGHT_VIEWS", view);
resolve([...state.visitedViews]) resolve([...state.visitedViews]);
}) });
}, },
delLeftTags({ commit }, view){ delLeftTags({ commit }, view) {
return new Promise(resolve => { return new Promise((resolve) => {
commit('DEL_LEFT_VIEWS', view) commit("DEL_LEFT_VIEWS", view);
resolve([...state.visitedViews]) resolve([...state.visitedViews]);
}) });
}, },
delCurrentView({ dispatch }){ delCurrentView({ dispatch }) {
const view = router.history.current const view = router.history.current;
return dispatch('delView', view).then(({visitedViews}) => { return dispatch("delView", view).then(({ visitedViews }) => {
const latestView = visitedViews.slice(-1)[0] const latestView = visitedViews.slice(-1)[0];
if (latestView) { if (latestView) {
router.push(latestView.fullPath) router.push(latestView.fullPath);
} else { } else {
// now the default is to redirect to the home page if there is no tags-view, // now the default is to redirect to the home page if there is no tags-view,
// you can adjust it according to your needs. // you can adjust it according to your needs.
if (view.name === 'Dashboard') { if (view.name === "Dashboard") {
// to reload home page // to reload home page
router.replace({ path: '/redirect' + view.fullPath }) router.replace({ path: "/redirect" + view.fullPath });
} else { } else {
router.push('/') router.push("/");
} }
} }
}) });
} },
} };
export default { export default {
namespaced: true, namespaced: true,
state, state,
mutations, mutations,
actions actions,
} };
...@@ -378,7 +378,7 @@ import OperatingGift from "@/views/ecw/giftManagement/components/operatingGift.v ...@@ -378,7 +378,7 @@ import OperatingGift from "@/views/ecw/giftManagement/components/operatingGift.v
import { uploadFile } from "@/api/infra/file"; import { uploadFile } from "@/api/infra/file";
import ImageUpload from "@/components/ImageUpload"; import ImageUpload from "@/components/ImageUpload";
export default { export default {
name: "GiftManagementList", name: "EcwGiftmanagementIndex",
components: { components: {
OperatingGift, OperatingGift,
}, },
...@@ -442,6 +442,13 @@ export default { ...@@ -442,6 +442,13 @@ export default {
activated() { activated() {
this.getList(); this.getList();
}, },
watch: {
dialogVisible(val, old) {
if (old && !val) {
this.getList();
}
},
},
methods: { methods: {
arraysEqual(arr1, arr2) { arraysEqual(arr1, arr2) {
return arr1.filter((current) => { return arr1.filter((current) => {
......
...@@ -66,24 +66,36 @@ ...@@ -66,24 +66,36 @@
prop="extraShare.activityDescZh" prop="extraShare.activityDescZh"
v-if="queryParams.type == '4'" v-if="queryParams.type == '4'"
> >
<el-col :span="18">
<editor <editor
:readOnly="showViewTime" :readOnly="showViewTime"
:class="{ readOnlyEditor: showViewTime }" :class="{ readOnlyEditor: showViewTime }"
v-model="queryParams.extraShare.activityDescZh" v-model="queryParams.extraShare.activityDescZh"
:min-height="150" :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>
<el-form-item <el-form-item
:label="$t('英文活动内容')" :label="$t('英文活动内容')"
prop="extraShare.activityDescEn" prop="extraShare.activityDescEn"
v-if="queryParams.type == '4'" v-if="queryParams.type == '4'"
> >
<el-col :span="18">
<editor <editor
:class="{ readOnlyEditor: showViewTime }" :class="{ readOnlyEditor: showViewTime }"
:readOnly="showViewTime" :readOnly="showViewTime"
v-model="queryParams.extraShare.activityDescEn" v-model="queryParams.extraShare.activityDescEn"
:min-height="150" :min-height="150"
/> />
</el-col>
<el-col :span="1"></el-col>
<el-button type="text" @click="viewActivityDesc('En')">{{
$t("预览")
}}</el-button>
</el-form-item> </el-form-item>
<!-- 链接 --> <!-- 链接 -->
...@@ -127,7 +139,16 @@ ...@@ -127,7 +139,16 @@
/> </el-form-item /> </el-form-item
></el-col> ></el-col>
</el-row> </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-form-item v-if="queryParams.type == '1'" :label="$t('首单')">
<el-radio-group v-model="queryParams.extraOrderV.firstOrder"> <el-radio-group v-model="queryParams.extraOrderV.firstOrder">
<el-radio <el-radio
...@@ -531,6 +552,23 @@ ...@@ -531,6 +552,23 @@
@pagination="getList" @pagination="getList"
/> />
</el-dialog> </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> </div>
</template> </template>
<script> <script>
...@@ -629,6 +667,7 @@ export default { ...@@ -629,6 +667,7 @@ export default {
} }
}; };
return { return {
viewActivityDialog: false,
//查看显示时间详情 //查看显示时间详情
showViewTime: false, showViewTime: false,
CommonStatusEnum: CommonStatusEnum, CommonStatusEnum: CommonStatusEnum,
...@@ -851,6 +890,7 @@ export default { ...@@ -851,6 +890,7 @@ export default {
}, },
lastSelectedList: [], //上一次选中数据 lastSelectedList: [], //上一次选中数据
oneDimensionalList: [], oneDimensionalList: [],
reviewDedtails: {},
queryParams: { queryParams: {
dateRangeCreateTime: [], //活动有效期 dateRangeCreateTime: [], //活动有效期
type: "", //指标类型 type: "", //指标类型
...@@ -868,6 +908,7 @@ export default { ...@@ -868,6 +908,7 @@ export default {
descEn: "", descEn: "",
getScoreOnce: "", //除v值之外的积分规则 getScoreOnce: "", //除v值之外的积分规则
showPlatform: "1,2,3", //展示平台 showPlatform: "1,2,3", //展示平台
registerUrl: "", //注册链接
extraRecommend: { extraRecommend: {
//推荐 //推荐
shareContentEn: "", shareContentEn: "",
...@@ -944,7 +985,8 @@ export default { ...@@ -944,7 +985,8 @@ export default {
}, },
created() { created() {
this.handleGetChannelList(); this.handleGetChannelList();
this.queryParams.registerUrl =
process.env.VUE_APP_BASE_API + "/#/pages/register/register";
this.getList(); this.getList();
if (this.$route.query.pageStatus == "edit") { if (this.$route.query.pageStatus == "edit") {
this.handleIntegralRuleDetails(); this.handleIntegralRuleDetails();
...@@ -957,6 +999,16 @@ export default { ...@@ -957,6 +999,16 @@ export default {
}, },
activated() {}, activated() {},
methods: { 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() { handleUpdatedIntegralRule() {
this.$refs["queryForm"].validate((valid) => { this.$refs["queryForm"].validate((valid) => {
...@@ -969,7 +1021,8 @@ export default { ...@@ -969,7 +1021,8 @@ export default {
this.queryParams.extraRegister.registerPlatform?.join(); this.queryParams.extraRegister.registerPlatform?.join();
if ( if (
(this.queryParams.type = (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, 0];
params.extraOrderV.receiveAddrList = [[0, 0, 0]]; params.extraOrderV.receiveAddrList = [[0, 0, 0]];
...@@ -1324,4 +1377,20 @@ export default { ...@@ -1324,4 +1377,20 @@ export default {
background-color: #f5f7fa; background-color: #f5f7fa;
cursor: not-allowed; 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> </style>
...@@ -447,7 +447,7 @@ import { getNowDateTime, parseTime } from "@/utils/ruoyi"; ...@@ -447,7 +447,7 @@ import { getNowDateTime, parseTime } from "@/utils/ruoyi";
import { getBaseHeader } from "@/utils/request"; import { getBaseHeader } from "@/utils/request";
import OperatingGift from "@/views/ecw/giftManagement/components/operatingGift.vue"; import OperatingGift from "@/views/ecw/giftManagement/components/operatingGift.vue";
export default { export default {
name: "ExchangeRecord", name: "EcwMembermanagementExchangerecord",
components: { components: {
OperatingGift, OperatingGift,
}, },
......
...@@ -193,7 +193,9 @@ ...@@ -193,7 +193,9 @@
}, },
}) })
" "
>{{ `${$t("兑换记录ID")}:${row.extParamJson.redemptionNumber}` }}</el-button >{{
`${$t("兑换记录ID")}:${row.extParamJson.redemptionNumber}`
}}</el-button
> >
<!-- 系统过期 sourceType = 3 不展示 --> <!-- 系统过期 sourceType = 3 不展示 -->
<span v-if="row.sourceType == '3'"> -</span> <span v-if="row.sourceType == '3'"> -</span>
...@@ -255,7 +257,7 @@ import { getDictDatas, DICT_TYPE } from "@/utils/dict"; ...@@ -255,7 +257,7 @@ import { getDictDatas, DICT_TYPE } from "@/utils/dict";
import { queryMemberScoreRecord } from "@/api/ecw/memberManagement"; import { queryMemberScoreRecord } from "@/api/ecw/memberManagement";
export default { export default {
name: "integralRecord", name: "EcwMembermanagementIntegralrecord",
data() { data() {
return { return {
dateRangeCreateTime: [], dateRangeCreateTime: [],
......
...@@ -315,7 +315,7 @@ import { ...@@ -315,7 +315,7 @@ import {
switchRuleGet, switchRuleGet,
} from "@/api/ecw/memberManagement"; } from "@/api/ecw/memberManagement";
export default { export default {
name: "IntegralRecord", name: "EcwMembermanagementIntegrationrule",
data() { data() {
return { return {
switchState: true, switchState: true,
......
...@@ -103,7 +103,8 @@ ...@@ -103,7 +103,8 @@
size="mini" size="mini"
icon="el-icon-plus" icon="el-icon-plus"
@click="handleScore" @click="handleScore"
>{{ $t("操作积分") }}</el-button> >{{ $t("操作积分") }}</el-button
>
<right-toolbar <right-toolbar
:show-search.sync="showSearch" :show-search.sync="showSearch"
@queryTable="handleQueryPagination" @queryTable="handleQueryPagination"
...@@ -127,8 +128,10 @@ ...@@ -127,8 +128,10 @@
<el-button <el-button
type="text" type="text"
@click="$router.push('/member/member/member-details/' + row.id)" @click="$router.push('/member/member/member-details/' + row.id)"
>{{ isChinese ? row.memberNameZh : row.memberNameEn }}</el-button> >{{ isChinese ? row.memberNameZh : row.memberNameEn }}</el-button
</template></el-table-column> >
</template></el-table-column
>
<el-table-column <el-table-column
width="140" width="140"
...@@ -147,7 +150,8 @@ ...@@ -147,7 +150,8 @@
<el-button <el-button
type="text" type="text"
@click="$router.push('/memberManagement/integralRecord')" @click="$router.push('/memberManagement/integralRecord')"
>{{ row.holdScore }}</el-button> >{{ row.holdScore }}</el-button
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('已兑换积分')" align="center"> <el-table-column :label="$t('已兑换积分')" align="center">
...@@ -155,7 +159,8 @@ ...@@ -155,7 +159,8 @@
<el-button <el-button
type="text" type="text"
@click="$router.push('/memberManagement/exchangeRecord')" @click="$router.push('/memberManagement/exchangeRecord')"
>{{ row.usedScore }}</el-button> >{{ row.usedScore }}</el-button
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -165,7 +170,8 @@ ...@@ -165,7 +170,8 @@
/> />
<el-table-column :label="$t('会员注册时间')" align="center"> <el-table-column :label="$t('会员注册时间')" align="center">
<template #default="{ row }"> <template #default="{ row }">
{{ parseTime(row.createTime) || "/" }}</template> {{ parseTime(row.createTime) || "/" }}</template
>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- //分页列表 --> <!-- //分页列表 -->
...@@ -203,7 +209,8 @@ ...@@ -203,7 +209,8 @@
v-for="dict in getDictDatas(DICT_TYPE.MEMBER_SCORE_OPERATE_TYPE)" v-for="dict in getDictDatas(DICT_TYPE.MEMBER_SCORE_OPERATE_TYPE)"
:key="dict.value" :key="dict.value"
:label="dict.value" :label="dict.value"
>{{ $l(dict, "label") }}</el-radio> >{{ $l(dict, "label") }}</el-radio
>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item :label="$t('积分')"> <el-form-item :label="$t('积分')">
...@@ -227,12 +234,12 @@ ...@@ -227,12 +234,12 @@
</div> </div>
</template> </template>
<script> <script>
import { getDictDatas, DICT_TYPE } from '@/utils/dict' import { getDictDatas, DICT_TYPE } from "@/utils/dict";
import { getTradeCountryList, getMemberList } from '@/api/ecw/giftManagement' import { getTradeCountryList, getMemberList } from "@/api/ecw/giftManagement";
import { operateMemberScore } from '@/api/ecw/memberManagement' import { operateMemberScore } from "@/api/ecw/memberManagement";
export default { export default {
name: 'MemberPointsSummary', name: "EcwMembermanagementMemberpointssummaryIndex",
data() { data() {
return { return {
selectedMember: [], selectedMember: [],
...@@ -246,81 +253,81 @@ export default { ...@@ -246,81 +253,81 @@ export default {
dialogVisible: false, dialogVisible: false,
memberList: [], memberList: [],
formQuery: { formQuery: {
comment: '', comment: "",
memberIds: [], memberIds: [],
operateType: null, operateType: null,
scoreCount: null scoreCount: null,
}, },
queryParams: { queryParams: {
country: null, country: null,
city: null, city: null,
endTime: '', endTime: "",
holdScore: null, holdScore: null,
holdScoreOperate: null, holdScoreOperate: null,
key: '', key: "",
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
startTime: '', startTime: "",
usedScore: null, usedScore: null,
usedScoreOperate: null usedScoreOperate: null,
} },
} };
}, },
computed: { computed: {
isChinese() { isChinese() {
return this.$i18n.locale === 'zh_CN' return this.$i18n.locale === "zh_CN";
} },
}, },
created() { created() {
this.handleQuery() this.handleQuery();
this.getCountryList() this.getCountryList();
}, },
activated() { activated() {
this.handleQuery() this.handleQuery();
}, },
methods: { methods: {
handleScore() { handleScore() {
if (this.selectedMember.length > 0) { if (this.selectedMember.length > 0) {
this.formQuery.memberIds = this.selectedMember.map((item) => item.id) this.formQuery.memberIds = this.selectedMember.map((item) => item.id);
this.dialogVisible = true this.dialogVisible = true;
} else { } else {
this.$message({ this.$message({
message: this.$t('请先选择会员再进行操作'), message: this.$t("请先选择会员再进行操作"),
type: 'warning' type: "warning",
}) });
} }
}, },
handleScoreSubmit() { handleScoreSubmit() {
this.$confirm(this.$t('确认提交?')) this.$confirm(this.$t("确认提交?"))
.then((_) => { .then((_) => {
const params = { ...this.formQuery } const params = { ...this.formQuery };
operateMemberScore(params).then((res) => { operateMemberScore(params).then((res) => {
this.dialogVisible = false this.dialogVisible = false;
this.formQuery = { this.formQuery = {
comment: '', comment: "",
memberIds: [], memberIds: [],
operateType: null, operateType: null,
scoreCount: null scoreCount: null,
} };
this.$refs.multipleTable.clearSelection() this.$refs.multipleTable.clearSelection();
this.selectedMember = [] this.selectedMember = [];
this.$message.success(this.$t('操作成功')) this.$message.success(this.$t("操作成功"));
}) });
}) })
.catch((_) => {}) .catch((_) => {});
}, },
handleClose(done) { handleClose(done) {
this.$confirm(this.$t('确认关闭?')) this.$confirm(this.$t("确认关闭?"))
.then((_) => { .then((_) => {
done() done();
}) })
.catch((_) => {}) .catch((_) => {});
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.selectedMember = val this.selectedMember = val;
}, },
dialogBeforeClose() { dialogBeforeClose() {
this.loading = true this.loading = true;
this.queryParams = { this.queryParams = {
country: null, country: null,
city: null, city: null,
...@@ -332,42 +339,42 @@ export default { ...@@ -332,42 +339,42 @@ export default {
pageSize: 10, pageSize: 10,
startTime: null, startTime: null,
usedScore: null, usedScore: null,
usedScoreOperate: null usedScoreOperate: null,
} };
}, },
getCountryList() { getCountryList() {
getTradeCountryList().then((res) => { getTradeCountryList().then((res) => {
this.countryList = res.data this.countryList = res.data;
}) });
}, },
handleQuery() { handleQuery() {
this.queryParams.pageNo = 1 this.queryParams.pageNo = 1;
const params = { ...this.queryParams } const params = { ...this.queryParams };
if (this.dateRangeCreateTime) { if (this.dateRangeCreateTime) {
params.startTime = this.dateRangeCreateTime[0] params.startTime = this.dateRangeCreateTime[0];
params.endTime = this.dateRangeCreateTime[1] params.endTime = this.dateRangeCreateTime[1];
} }
getMemberList(params).then((res) => { getMemberList(params).then((res) => {
this.loading = false this.loading = false;
this.memberList = res.data.list this.memberList = res.data.list;
this.total = res.data.total this.total = res.data.total;
}) });
}, },
handleQueryPagination() { handleQueryPagination() {
const params = { ...this.queryParams } const params = { ...this.queryParams };
if (this.dateRangeCreateTime) { if (this.dateRangeCreateTime) {
params.startTime = this.dateRangeCreateTime[0] params.startTime = this.dateRangeCreateTime[0];
params.endTime = this.dateRangeCreateTime[1] params.endTime = this.dateRangeCreateTime[1];
} }
getMemberList(params).then((res) => { getMemberList(params).then((res) => {
this.loading = false this.loading = false;
this.memberList = res.data.list this.memberList = res.data.list;
this.total = res.data.total this.total = res.data.total;
}) });
}, },
resetQuery() { resetQuery() {
this.dateRangeCreateTime = [] this.dateRangeCreateTime = [];
this.loading = true this.loading = true;
this.queryParams = { this.queryParams = {
country: null, country: null,
city: null, city: null,
...@@ -379,10 +386,10 @@ export default { ...@@ -379,10 +386,10 @@ export default {
pageSize: 10, pageSize: 10,
startTime: null, startTime: null,
usedScore: null, usedScore: null,
usedScoreOperate: null usedScoreOperate: null,
} };
this.handleQuery() this.handleQuery();
} },
} },
} };
</script> </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