Commit ffbb23d2 authored by dragondean@qq.com's avatar dragondean@qq.com

Merge remote-tracking branch 'origin/pre-release' into pre-release

parents 48a0ba38 00937a5b
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,
} };
...@@ -471,7 +471,6 @@ ...@@ -471,7 +471,6 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('年度发货量')"> <el-form-item :label="$t('年度发货量')">
<el-input-number v-model="form.weightYearly" :min="1" /> <el-input-number v-model="form.weightYearly" :min="1" />
...@@ -506,7 +505,240 @@ ...@@ -506,7 +505,240 @@
</el-row> </el-row>
</el-card> </el-card>
</el-form>
<el-card class="box-card" style="margin-top: 15px;">
<div slot="header" class="clearfix">
<span class="title-text">{{ $t("联系人") }}</span>
<el-button
style="float: right"
size="small"
type="primary"
@click="handleAddContact"
>+</el-button
>
</div>
<el-form ref="contactForm" :rules="contactRules" :model="form">
<el-table :data="form.customerContacts" style="width: 100%">
<el-table-column prop="department" :label="$t('部门')" width="">
<template v-slot="{ row }">
<el-form-item label="">
<el-input
v-model="row.department"
:placeholder="$t('请输入部门')"
size="mini"
/>
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="position" :label="$t('职位')" width="">
<template v-slot="{ row }">
<el-form-item label="">
<el-input
v-model="row.position"
:placeholder="$t('请输入职位')"
size="mini"
/>
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="name" :label="$t('联系人')">
<template slot="header">
{{ $t("联系人") }} <span style="color: #ff0000">*</span>
</template>
<template v-slot="{ row, cellValue, $index }">
<el-form-item
:rules="contactRules.name"
:prop="'customerContacts.' + $index + '.name'"
label=""
>
<el-input
v-model="row.name"
:placeholder="$t('请输入联系人')"
size="mini"
/>
</el-form-item>
</template>
</el-table-column>
<el-table-column>
<template slot="header">
{{ $t("联系人英文名称") }}
</template>
<template v-slot="{ row, cellValue, $index }">
<el-form-item label="">
<el-input
v-model="row.nameEn"
:placeholder="$t('请输入联系人英文名称')"
size="mini"
/>
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="areaCode" :label="$t('区号')">
<template slot="header">
{{ $t("区号") }} <span style="color: #ff0000">*</span>
</template>
<template v-slot="{ row, cellValue, $index }">
<el-form-item
:rules="contactRules.areaCode"
:prop="'customerContacts.' + $index + '.areaCode'"
label=""
>
<el-select
v-model="row.areaCode"
:placeholder="$t('请选择区号')"
filterable
size="mini"
>
<el-option
v-for="(item, index) in countryList"
:key="index"
:label="
item.nameShort +
(isChinese ? item.nameZh : item.nameEn) +
'(' +
item.tel +
')'
"
:value="item.tel"
/>
</el-select>
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="phoneNew" :label="$t('联系方式')">
<template slot="header">
{{ $t("联系方式") }} <span style="color: #ff0000">*</span>
</template>
<template v-slot="{ row, cellValue, $index }">
<el-form-item
:rules="contactRules.phoneNew"
:prop="'customerContacts.' + $index + '.phoneNew'"
label=""
>
<el-input
v-model.trim="row.phoneNew"
:placeholder="$t('请输入联系方式')"
size="mini"
@input="row.phoneNew=row.phoneNew.replace(/\s+/g, '')"
/>
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="" :label="$t('关联账号')">
<template v-slot="{ row }">
<el-form-item label="">
<!-- <el-select v-model="row.userid" clearable remote :remote-method="getUserMemberUserFn" @change="selectBD" size="mini" filterable>
<el-option v-for="(item,index) in userMemberUser" :value="item.id" :key="index" :label="item.nickname + '(' + item.mobile + ')'" ></el-option>
</el-select> -->
<MemberSelector v-model="row.userid" size="mini" />
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="social" :label="$t('社交软件')">
<template v-slot="{ row }">
<el-form-item label="">
<el-select
v-model="row.social"
:placeholder="$t('请选择社交软件')"
size="mini"
>
<el-option
v-for="dict in getDictDatas(DICT_TYPE.SOCIAL)"
:key="dict.value"
:label="isChinese ? dict.label : dict.labelEn"
:value="parseInt(dict.value)"
/>
</el-select>
</el-form-item>
</template>
</el-table-column>
<el-table-column
prop="socialNumber"
:label="$t('社交软件号码')"
>
<template v-slot="{ row }">
<el-form-item label="">
<el-input
v-model="row.socialNumber"
:placeholder="$t('请输入社交软件号码')"
size="mini"
/>
</el-form-item>
</template>
</el-table-column>
<el-table-column width="260px" prop="email" :label="$t('邮箱')">
<template v-slot="{ row }">
<el-form-item
v-for="(item, index) in row.email"
:key="index"
label=""
>
<div style="display: flex; align-items: center">
<el-input
v-model="row.email[index]"
:placeholder="$t('请输入邮箱')"
size="mini"
/>
<el-button
@click="deleteEmail(row.email, index)"
v-if="row.email.length !== 1"
style="height: 25px; margin-left: 5px"
type="danger"
size="mini"
>删除</el-button
>
<el-button
@click="addEmail(row.email)"
style="height: 25px; margin-left: 5px"
v-if="
index === row.email.length - 1 &&
row.email.length < 5
"
size="mini"
type="primary"
>添加</el-button
>
</div>
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="isDefault" :label="$t('设为默认')">
<template v-slot="{ row, column, $index }">
<el-form-item label="">
<el-select
v-model="row.isDefault"
:placeholder="$t('设为默认')"
@change="handleDefaultChange($index)"
size="mini"
>
<el-option
v-for="dict in getDictDatas(DICT_TYPE.IS_DEFAULT)"
:key="dict.value"
:label="isChinese ? dict.label : dict.labelEn"
:value="Number(dict.value)"
/>
</el-select>
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="name" :label="$t('操作')">
<template v-slot="{ row, column, $index }">
<el-form-item label="">
<el-button
type="danger"
@click="handleDeleteContact($index)"
size="mini"
>{{ $t("删除") }}</el-button
>
</el-form-item>
</template>
</el-table-column>
</el-table>
</el-form>
</el-card>
<el-form ref="setForm" label-width="150px">
<el-card class="box-card" style="margin-top: 15px;"> <el-card class="box-card" style="margin-top: 15px;">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span class="title-text">{{ $t('设置') }}</span> <span class="title-text">{{ $t('设置') }}</span>
...@@ -748,7 +980,7 @@ ...@@ -748,7 +980,7 @@
<el-card class="box-card" style="margin-top: 15px;"> <el-card class="box-card" style="margin-top: 15px;">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>{{ $t("银行信息") }}</span> <span class="title-text">{{ $t("银行信息") }}</span>
<el-button <el-button
style="float: right" style="float: right"
size="small" size="small"
...@@ -867,237 +1099,6 @@ ...@@ -867,237 +1099,6 @@
</el-form> </el-form>
</el-card> </el-card>
<el-card class="box-card" style="margin-top: 15px;">
<div slot="header" class="clearfix">
<span>{{ $t("联系人") }}</span>
<el-button
style="float: right"
size="small"
type="primary"
@click="handleAddContact"
>+</el-button
>
</div>
<el-form ref="contactForm" :rules="contactRules" :model="form">
<el-table :data="form.customerContacts" style="width: 100%">
<el-table-column prop="department" :label="$t('部门')" width="">
<template v-slot="{ row }">
<el-form-item label="">
<el-input
v-model="row.department"
:placeholder="$t('请输入部门')"
size="mini"
/>
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="position" :label="$t('职位')" width="">
<template v-slot="{ row }">
<el-form-item label="">
<el-input
v-model="row.position"
:placeholder="$t('请输入职位')"
size="mini"
/>
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="name" :label="$t('联系人')">
<template slot="header">
{{ $t("联系人") }} <span style="color: #ff0000">*</span>
</template>
<template v-slot="{ row, cellValue, $index }">
<el-form-item
:rules="contactRules.name"
:prop="'customerContacts.' + $index + '.name'"
label=""
>
<el-input
v-model="row.name"
:placeholder="$t('请输入联系人')"
size="mini"
/>
</el-form-item>
</template>
</el-table-column>
<el-table-column>
<template slot="header">
{{ $t("联系人英文名称") }}
</template>
<template v-slot="{ row, cellValue, $index }">
<el-form-item label="">
<el-input
v-model="row.nameEn"
:placeholder="$t('请输入联系人英文名称')"
size="mini"
/>
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="areaCode" :label="$t('区号')">
<template slot="header">
{{ $t("区号") }} <span style="color: #ff0000">*</span>
</template>
<template v-slot="{ row, cellValue, $index }">
<el-form-item
:rules="contactRules.areaCode"
:prop="'customerContacts.' + $index + '.areaCode'"
label=""
>
<el-select
v-model="row.areaCode"
:placeholder="$t('请选择区号')"
filterable
size="mini"
>
<el-option
v-for="(item, index) in countryList"
:key="index"
:label="
item.nameShort +
(isChinese ? item.nameZh : item.nameEn) +
'(' +
item.tel +
')'
"
:value="item.tel"
/>
</el-select>
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="phoneNew" :label="$t('联系方式')">
<template slot="header">
{{ $t("联系方式") }} <span style="color: #ff0000">*</span>
</template>
<template v-slot="{ row, cellValue, $index }">
<el-form-item
:rules="contactRules.phoneNew"
:prop="'customerContacts.' + $index + '.phoneNew'"
label=""
>
<el-input
v-model.trim="row.phoneNew"
:placeholder="$t('请输入联系方式')"
size="mini"
@input="row.phoneNew=row.phoneNew.replace(/\s+/g, '')"
/>
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="" :label="$t('关联账号')">
<template v-slot="{ row }">
<el-form-item label="">
<!-- <el-select v-model="row.userid" clearable remote :remote-method="getUserMemberUserFn" @change="selectBD" size="mini" filterable>
<el-option v-for="(item,index) in userMemberUser" :value="item.id" :key="index" :label="item.nickname + '(' + item.mobile + ')'" ></el-option>
</el-select> -->
<MemberSelector v-model="row.userid" size="mini" />
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="social" :label="$t('社交软件')">
<template v-slot="{ row }">
<el-form-item label="">
<el-select
v-model="row.social"
:placeholder="$t('请选择社交软件')"
size="mini"
>
<el-option
v-for="dict in getDictDatas(DICT_TYPE.SOCIAL)"
:key="dict.value"
:label="isChinese ? dict.label : dict.labelEn"
:value="parseInt(dict.value)"
/>
</el-select>
</el-form-item>
</template>
</el-table-column>
<el-table-column
prop="socialNumber"
:label="$t('社交软件号码')"
>
<template v-slot="{ row }">
<el-form-item label="">
<el-input
v-model="row.socialNumber"
:placeholder="$t('请输入社交软件号码')"
size="mini"
/>
</el-form-item>
</template>
</el-table-column>
<el-table-column width="260px" prop="email" :label="$t('邮箱')">
<template v-slot="{ row }">
<el-form-item
v-for="(item, index) in row.email"
:key="index"
label=""
>
<div style="display: flex; align-items: center">
<el-input
v-model="row.email[index]"
:placeholder="$t('请输入邮箱')"
size="mini"
/>
<el-button
@click="deleteEmail(row.email, index)"
v-if="row.email.length !== 1"
style="height: 25px; margin-left: 5px"
type="danger"
size="mini"
>删除</el-button
>
<el-button
@click="addEmail(row.email)"
style="height: 25px; margin-left: 5px"
v-if="
index === row.email.length - 1 &&
row.email.length < 5
"
size="mini"
type="primary"
>添加</el-button
>
</div>
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="isDefault" :label="$t('设为默认')">
<template v-slot="{ row, column, $index }">
<el-form-item label="">
<el-select
v-model="row.isDefault"
:placeholder="$t('设为默认')"
@change="handleDefaultChange($index)"
size="mini"
>
<el-option
v-for="dict in getDictDatas(DICT_TYPE.IS_DEFAULT)"
:key="dict.value"
:label="isChinese ? dict.label : dict.labelEn"
:value="Number(dict.value)"
/>
</el-select>
</el-form-item>
</template>
</el-table-column>
<el-table-column prop="name" :label="$t('操作')">
<template v-slot="{ row, column, $index }">
<el-form-item label="">
<el-button
type="danger"
@click="handleDeleteContact($index)"
size="mini"
>{{ $t("删除") }}</el-button
>
</el-form-item>
</template>
</el-table-column>
</el-table>
</el-form>
</el-card>
<div style="margin-top: 15px; text-align: center"> <div style="margin-top: 15px; text-align: center">
<el-button type="primary" @click="submitForm">{{ <el-button type="primary" @click="submitForm">{{
$t("确 定") $t("确 定")
......
...@@ -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>
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
:placeholder="$t('请输入订单号、唛头、提单号')" :placeholder="$t('请输入订单号、唛头、提单号')"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
@input="noParam.value=noParam.value.replace(/\s+/g, '')"
> >
<template slot="prepend"> <template slot="prepend">
<dict-selector <dict-selector
...@@ -129,11 +130,11 @@ ...@@ -129,11 +130,11 @@
<el-input v-model.trim="queryParams.tidanNo" :placeholder="$t('提单号')" clearable @keyup.enter.native="handleQuery" /> <el-input v-model.trim="queryParams.tidanNo" :placeholder="$t('提单号')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>--> </el-form-item>-->
<el-form-item :label="$t('发货人')" prop="consignorKey"> <el-form-item :label="$t('发货人')" prop="consignorKey">
<el-input v-model.trim="queryParams.consignorKey" :placeholder="$t('发货人')" clearable @keyup.enter.native="handleQuery" /> <el-input v-model.trim="queryParams.consignorKey" :placeholder="$t('发货人')" clearable @keyup.enter.native="handleQuery" @input="queryParams.consignorKey=queryParams.consignorKey.replace(/\s+/g, '')" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('收货人')" prop="consigneeKey"> <el-form-item :label="$t('收货人')" prop="consigneeKey">
<el-input v-model.trim="queryParams.consigneeKey" :placeholder="$t('收货人')" clearable @keyup.enter.native="handleQuery" /> <el-input v-model.trim="queryParams.consigneeKey" :placeholder="$t('收货人')" clearable @keyup.enter.native="handleQuery" @input="queryParams.consigneeKey=queryParams.consigneeKey.replace(/\s+/g, '')" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('报关方式')" prop="customsTypes"> <el-form-item :label="$t('报关方式')" prop="customsTypes">
...@@ -223,6 +224,21 @@ ...@@ -223,6 +224,21 @@
<el-option :label="$t('否')" :value="0"></el-option> <el-option :label="$t('否')" :value="0"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('特需')" prop="packageType" v-show="showSearch">
<el-select
v-model="queryParams.packageTypeArr"
multiple
:placeholder="$t('请选择')"
clearable
>
<template v-for="item in getDictDatas(DICT_TYPE.ORDER_SPECIAL_NEEDS)">
<el-option
:label="$l(item, 'label')"
:value="item.value"
></el-option>
</template>
</el-select>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button>
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
...@@ -406,7 +422,7 @@ export default { ...@@ -406,7 +422,7 @@ export default {
// 导出遮罩层 // 导出遮罩层
exportLoading: false, exportLoading: false,
// 显示搜索条件 // 显示搜索条件
showSearch: true, showSearch: false,
// 总条数 // 总条数
total: 0, total: 0,
// 订单列表 // 订单列表
......
...@@ -293,7 +293,7 @@ ...@@ -293,7 +293,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('商品类型')" prop="goodsTypes" v-show="showSearch"> <el-form-item :label="$t('商品类型')" prop="goodsTypes" v-show="showSearch">
<selector v-model="queryParams.goodsTypes" multiple :options="productAttrList" label-field="attrName" value-field="id"> <selector v-model="queryParams.goodsTypes" multiple clearable :options="productAttrList" label-field="attrName" value-field="id">
</selector> </selector>
</el-form-item> </el-form-item>
<el-form-item :label="$t('增值服务')" prop="types" v-show="showSearch"> <el-form-item :label="$t('增值服务')" prop="types" v-show="showSearch">
...@@ -877,7 +877,7 @@ export default { ...@@ -877,7 +877,7 @@ export default {
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 显示搜索条件 // 显示搜索条件
showSearch: true, showSearch: false,
// 总条数 // 总条数
total: 0, total: 0,
// 订单异常列表 // 订单异常列表
...@@ -1062,8 +1062,12 @@ export default { ...@@ -1062,8 +1062,12 @@ export default {
this.destCountryId = null this.destCountryId = null
this.destWarehouseId = null this.destWarehouseId = null
this.objectiveId = null this.objectiveId = null
this.queryParams.isHaveCustomer = null
this.queryParams.channelIds = null this.queryParams.channelIds = null
this.queryParams.goodsTypes = null
this.$nextTick(_ => {
this.$forceUpdate()
})
this.getList(); this.getList();
}, },
importCityName(id) { importCityName(id) {
......
...@@ -221,7 +221,7 @@ ...@@ -221,7 +221,7 @@
@change="handleQuery" @change="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item :label="$t('收货人')" prop="statusList"> <el-form-item :label="$t('收货人')" v-show="showSearch">
<el-select <el-select
v-model="queryParams.hasConsignee" v-model="queryParams.hasConsignee"
:placeholder="$t('请选择')" :placeholder="$t('请选择')"
......
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