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) {
return request({
url: '/member/user-score/operate',
method: 'post',
data: data
})
url: "/member/user-score/operate",
method: "post",
data: data,
});
}
// 积分记录分页
export function queryMemberScoreRecord(data) {
return request({
url: '/member/user-score-log/page',
method: 'post',
data: data
})
url: "/member/user-score-log/page",
method: "post",
data: data,
});
}
// 兑换记录分页
export function queryMemberExchangeRecord(data) {
return request({
url: '/reward/redeem/record/page',
method: 'post',
data: data
})
url: "/reward/redeem/record/page",
method: "post",
data: data,
});
}
// 批量核销按钮
export function batchVerifyAPI(data) {
return request({
url: '/reward/redeem/record/batch/verify',
method: 'post',
data: data
})
url: "/reward/redeem/record/batch/verify",
method: "post",
data: data,
});
}
// 兑换记录导出
export function batchRecordExport(data) {
return request({
url: '/reward/redeem/record/export',
method: 'post',
data: data
})
url: "/reward/redeem/record/export",
method: "post",
data: data,
});
}
// 兑换记录导入
export function batchRecordImport(data) {
return request({
url: '/reward/redeem/record/import',
method: 'post',
data: data
})
url: "/reward/redeem/record/import",
method: "post",
data: data,
});
}
// 兑换记录导入模板下载
export function batchRecordImportTemplate() {
return request({
url: '/reward/redeem/record/import/template',
method: 'post',
responseType: 'blob'
})
url: "/reward/redeem/record/import/template",
method: "post",
responseType: "blob",
});
}
// 撤销 操作
export function rewardCancelQuery(data) {
return request({
url: '/reward/redeem/record/cancel',
method: 'post',
data: data
})
url: "/reward/redeem/record/cancel",
method: "post",
data: data,
});
}
// 获取记录详情
export function getRewardDetailQuery(data) {
return request({
url: '/reward/redeem/record/detail',
method: 'post',
data: data
})
url: "/reward/redeem/record/detail",
method: "post",
data: data,
});
}
// 更新兑换记录
export function updatedRewardsDetails(data) {
return request({
url: '/reward/redeem/record/update',
method: 'post',
data: data
})
url: "/reward/redeem/record/update",
method: "post",
data: data,
});
}
// 核销回退
export function verifyRollback(data) {
return request({
url: '/reward/redeem/record/verify-back',
method: 'post',
data: data
})
url: "/reward/redeem/record/verify-back",
method: "post",
data: data,
});
}
// 核销 操作
export function verifyRedeem(data) {
return request({
url: '/reward/redeem/record/verify',
method: 'post',
data: data
})
url: "/reward/redeem/record/verify",
method: "post",
data: data,
});
}
// 获取积分规则记录
export function getScoreRecordList(data) {
return request({
url: '/member/score-rule/page',
method: 'post',
url: "/member/score-rule/page",
method: "post",
params: {
page: data.page,
rows: data.rows
rows: data.rows,
},
data
})
data,
});
}
// 会员积分等级列表
export function getMemberLevelList(data) {
return request({
url: '/member/user-level/page',
method: 'post',
data
})
url: "/member/user-level/page",
method: "post",
data,
});
}
// 新增会员等级设置
export function addNewMemberLevel(data) {
return request({
url: '/member/user-level/add',
method: 'post',
data
})
url: "/member/user-level/add",
method: "post",
data,
});
}
// 删除会员等级
export function delMemberLevel(data) {
return request({
url: '/member/user-level/delete',
method: 'post',
data
})
url: "/member/user-level/delete",
method: "post",
data,
});
}
// edit member level
export function editMemberLevel(data) {
return request({
url: '/member/user-level/update',
method: 'post',
data
})
url: "/member/user-level/update",
method: "post",
data,
});
}
// 获得目的国、目的城市、目的仓列表
export function getRegionTreeList() {
return request({
url: '/member/score-rule/warehouse-tree-region-list',
method: 'get'
})
url: "/member/score-rule/warehouse-tree-region-list",
method: "get",
});
}
// 获取渠道列表
export function getChannelList() {
return request({
url: '/ecw/channel/list-all-simple',
method: 'get'
})
url: "/ecw/channel/list-all-simple",
method: "get",
});
}
// 积分规则创建
export function createIntegralRule(data) {
return request({
url: '/member/score-rule/create',
method: 'post',
data
})
url: "/member/score-rule/create",
method: "post",
data,
});
}
// 启用关闭 积分规则
export function integralRuleStatus(data) {
return request({
url: '/member/score-rule/status',
method: 'post',
data
})
url: "/member/score-rule/status",
method: "post",
data,
});
}
// 复制积分规则
export function integralRuleCopy(data) {
return request({
url: '/member/score-rule/copy',
method: 'post',
data
})
url: "/member/score-rule/copy",
method: "post",
data,
});
}
// 延期积分规则
export function integralRuleDelay(data) {
return request({
url: '/member/score-rule/delay',
method: 'post',
data
})
url: "/member/score-rule/delay",
method: "post",
data,
});
}
// 删除积分规则
export function integralRuleDelete(data) {
return request({
url: '/member/score-rule/delete',
method: 'post',
data
})
url: "/member/score-rule/delete",
method: "post",
data,
});
}
// 获取积分规则详情
export function integralRuleDetails(data) {
return request({
url: '/member/score-rule/get',
method: 'post',
data
})
url: "/member/score-rule/get",
method: "post",
data,
});
}
// 编辑积分规则
export function integralRuleUpdated(data) {
return request({
url: '/member/score-rule/update',
method: 'post',
data
})
url: "/member/score-rule/update",
method: "post",
data,
});
}
// 获取会员功能开关
export function switchRuleGet() {
return request({
url: '/member/score-rule/switch/get',
method: 'get'
})
url: "/member/score-rule/switch/get",
method: "get",
});
}
// 设置会员工能开关
export function switchRuleSet(data) {
return request({
url: '/member/score-rule/switch/set',
method: 'post',
data
})
url: "/member/score-rule/switch/set",
method: "post",
data,
});
}
//分享记录分页
export function getShareRecordList(data) {
return request({
url: "/member/score-rule/share-record/page",
method: "post",
data,
});
}
//获取分享记录详情
export function getShareRecordDetails(data) {
return request({
url: "/member/score-rule/share-record/detail",
method: "post",
data,
});
}
This diff is collapsed.
This diff is collapsed.
......@@ -378,7 +378,7 @@ import OperatingGift from "@/views/ecw/giftManagement/components/operatingGift.v
import { uploadFile } from "@/api/infra/file";
import ImageUpload from "@/components/ImageUpload";
export default {
name: "GiftManagementList",
name: "EcwGiftmanagementIndex",
components: {
OperatingGift,
},
......@@ -442,6 +442,13 @@ export default {
activated() {
this.getList();
},
watch: {
dialogVisible(val, old) {
if (old && !val) {
this.getList();
}
},
},
methods: {
arraysEqual(arr1, arr2) {
return arr1.filter((current) => {
......
......@@ -66,24 +66,36 @@
prop="extraShare.activityDescZh"
v-if="queryParams.type == '4'"
>
<el-col :span="18">
<editor
:readOnly="showViewTime"
:class="{ readOnlyEditor: showViewTime }"
v-model="queryParams.extraShare.activityDescZh"
:min-height="150"
/>
</el-col>
<el-col :span="1"></el-col>
<el-button type="text" @click="viewActivityDesc('Zh')">{{
$t("预览")
}}</el-button>
</el-form-item>
<el-form-item
:label="$t('英文活动内容')"
prop="extraShare.activityDescEn"
v-if="queryParams.type == '4'"
>
<el-col :span="18">
<editor
:class="{ readOnlyEditor: showViewTime }"
:readOnly="showViewTime"
v-model="queryParams.extraShare.activityDescEn"
:min-height="150"
/>
</el-col>
<el-col :span="1"></el-col>
<el-button type="text" @click="viewActivityDesc('En')">{{
$t("预览")
}}</el-button>
</el-form-item>
<!-- 链接 -->
......@@ -127,7 +139,16 @@
/> </el-form-item
></el-col>
</el-row>
<!-- 注册链接 -->
<el-form-item :label="$t('注册链接')" v-if="queryParams.type == '3'">
<el-input
v-model="queryParams.registerUrl"
:placeholder="$t('请输入注册链接')"
clearable
:disabled="true"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
</el-form-item>
<el-form-item v-if="queryParams.type == '1'" :label="$t('首单')">
<el-radio-group v-model="queryParams.extraOrderV.firstOrder">
<el-radio
......@@ -531,6 +552,23 @@
@pagination="getList"
/>
</el-dialog>
<!-- 预览弹窗 -->
<el-dialog
:title="$t('预览')"
:visible.sync="viewActivityDialog"
width="400px"
>
<div class="container">
<div class="phoneBox">
<div class="title">
{{ reviewDedtails.title }}
</div>
<img :src="reviewDedtails.img" alt="" class="coverImg" />
<div class="detail" v-html="reviewDedtails.detail"></div>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
......@@ -629,6 +667,7 @@ export default {
}
};
return {
viewActivityDialog: false,
//查看显示时间详情
showViewTime: false,
CommonStatusEnum: CommonStatusEnum,
......@@ -851,6 +890,7 @@ export default {
},
lastSelectedList: [], //上一次选中数据
oneDimensionalList: [],
reviewDedtails: {},
queryParams: {
dateRangeCreateTime: [], //活动有效期
type: "", //指标类型
......@@ -868,6 +908,7 @@ export default {
descEn: "",
getScoreOnce: "", //除v值之外的积分规则
showPlatform: "1,2,3", //展示平台
registerUrl: "", //注册链接
extraRecommend: {
//推荐
shareContentEn: "",
......@@ -944,7 +985,8 @@ export default {
},
created() {
this.handleGetChannelList();
this.queryParams.registerUrl =
process.env.VUE_APP_BASE_API + "/#/pages/register/register";
this.getList();
if (this.$route.query.pageStatus == "edit") {
this.handleIntegralRuleDetails();
......@@ -957,6 +999,16 @@ export default {
},
activated() {},
methods: {
//预览活动详情
viewActivityDesc(val) {
this.viewActivityDialog = true;
this.reviewDedtails.title = this.queryParams[`title${val}`];
this.reviewDedtails.img = this.queryParams[`coverImage${val}`];
this.reviewDedtails.detail =
this.queryParams.extraShare[`activityDesc${val}`];
console.log("ppp", this.queryParams);
console.log("eeeppp", this.reviewDedtails);
},
//编辑更新积分规则
handleUpdatedIntegralRule() {
this.$refs["queryForm"].validate((valid) => {
......@@ -969,7 +1021,8 @@ export default {
this.queryParams.extraRegister.registerPlatform?.join();
if (
(this.queryParams.type =
1 && this.queryParams.extraOrderV.receiveAddrList[0][0] == "000")
1 &&
this.queryParams.extraOrderV.receiveAddrList?.[0]?.[0] == "000")
) {
// params.extraOrderV.receiveAddrList[0] = [0, 0, 0];
params.extraOrderV.receiveAddrList = [[0, 0, 0]];
......@@ -1324,4 +1377,20 @@ export default {
background-color: #f5f7fa;
cursor: not-allowed;
}
.phoneBox {
width: 375px;
border-radius: 4px;
border: 1px solid #ebeef5;
background-color: #fff;
overflow: hidden;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}
.container {
display: flex;
justify-items: center;
}
.coverImg {
height: auto;
width: 100%;
}
</style>
......@@ -447,7 +447,7 @@ import { getNowDateTime, parseTime } from "@/utils/ruoyi";
import { getBaseHeader } from "@/utils/request";
import OperatingGift from "@/views/ecw/giftManagement/components/operatingGift.vue";
export default {
name: "ExchangeRecord",
name: "EcwMembermanagementExchangerecord",
components: {
OperatingGift,
},
......
......@@ -193,7 +193,9 @@
},
})
"
>{{ `${$t("兑换记录ID")}:${row.extParamJson.redemptionNumber}` }}</el-button
>{{
`${$t("兑换记录ID")}:${row.extParamJson.redemptionNumber}`
}}</el-button
>
<!-- 系统过期 sourceType = 3 不展示 -->
<span v-if="row.sourceType == '3'"> -</span>
......@@ -255,7 +257,7 @@ import { getDictDatas, DICT_TYPE } from "@/utils/dict";
import { queryMemberScoreRecord } from "@/api/ecw/memberManagement";
export default {
name: "integralRecord",
name: "EcwMembermanagementIntegralrecord",
data() {
return {
dateRangeCreateTime: [],
......
......@@ -315,7 +315,7 @@ import {
switchRuleGet,
} from "@/api/ecw/memberManagement";
export default {
name: "IntegralRecord",
name: "EcwMembermanagementIntegrationrule",
data() {
return {
switchState: true,
......
......@@ -103,7 +103,8 @@
size="mini"
icon="el-icon-plus"
@click="handleScore"
>{{ $t("操作积分") }}</el-button>
>{{ $t("操作积分") }}</el-button
>
<right-toolbar
:show-search.sync="showSearch"
@queryTable="handleQueryPagination"
......@@ -127,8 +128,10 @@
<el-button
type="text"
@click="$router.push('/member/member/member-details/' + row.id)"
>{{ isChinese ? row.memberNameZh : row.memberNameEn }}</el-button>
</template></el-table-column>
>{{ isChinese ? row.memberNameZh : row.memberNameEn }}</el-button
>
</template></el-table-column
>
<el-table-column
width="140"
......@@ -147,7 +150,8 @@
<el-button
type="text"
@click="$router.push('/memberManagement/integralRecord')"
>{{ row.holdScore }}</el-button>
>{{ row.holdScore }}</el-button
>
</template>
</el-table-column>
<el-table-column :label="$t('已兑换积分')" align="center">
......@@ -155,7 +159,8 @@
<el-button
type="text"
@click="$router.push('/memberManagement/exchangeRecord')"
>{{ row.usedScore }}</el-button>
>{{ row.usedScore }}</el-button
>
</template>
</el-table-column>
<el-table-column
......@@ -165,7 +170,8 @@
/>
<el-table-column :label="$t('会员注册时间')" align="center">
<template #default="{ row }">
{{ parseTime(row.createTime) || "/" }}</template>
{{ parseTime(row.createTime) || "/" }}</template
>
</el-table-column>
</el-table>
<!-- //分页列表 -->
......@@ -203,7 +209,8 @@
v-for="dict in getDictDatas(DICT_TYPE.MEMBER_SCORE_OPERATE_TYPE)"
:key="dict.value"
:label="dict.value"
>{{ $l(dict, "label") }}</el-radio>
>{{ $l(dict, "label") }}</el-radio
>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('积分')">
......@@ -227,12 +234,12 @@
</div>
</template>
<script>
import { getDictDatas, DICT_TYPE } from '@/utils/dict'
import { getTradeCountryList, getMemberList } from '@/api/ecw/giftManagement'
import { operateMemberScore } from '@/api/ecw/memberManagement'
import { getDictDatas, DICT_TYPE } from "@/utils/dict";
import { getTradeCountryList, getMemberList } from "@/api/ecw/giftManagement";
import { operateMemberScore } from "@/api/ecw/memberManagement";
export default {
name: 'MemberPointsSummary',
name: "EcwMembermanagementMemberpointssummaryIndex",
data() {
return {
selectedMember: [],
......@@ -246,81 +253,81 @@ export default {
dialogVisible: false,
memberList: [],
formQuery: {
comment: '',
comment: "",
memberIds: [],
operateType: null,
scoreCount: null
scoreCount: null,
},
queryParams: {
country: null,
city: null,
endTime: '',
endTime: "",
holdScore: null,
holdScoreOperate: null,
key: '',
key: "",
pageNo: 1,
pageSize: 10,
startTime: '',
startTime: "",
usedScore: null,
usedScoreOperate: null
}
}
usedScoreOperate: null,
},
};
},
computed: {
isChinese() {
return this.$i18n.locale === 'zh_CN'
}
return this.$i18n.locale === "zh_CN";
},
},
created() {
this.handleQuery()
this.getCountryList()
this.handleQuery();
this.getCountryList();
},
activated() {
this.handleQuery()
this.handleQuery();
},
methods: {
handleScore() {
if (this.selectedMember.length > 0) {
this.formQuery.memberIds = this.selectedMember.map((item) => item.id)
this.dialogVisible = true
this.formQuery.memberIds = this.selectedMember.map((item) => item.id);
this.dialogVisible = true;
} else {
this.$message({
message: this.$t('请先选择会员再进行操作'),
type: 'warning'
})
message: this.$t("请先选择会员再进行操作"),
type: "warning",
});
}
},
handleScoreSubmit() {
this.$confirm(this.$t('确认提交?'))
this.$confirm(this.$t("确认提交?"))
.then((_) => {
const params = { ...this.formQuery }
const params = { ...this.formQuery };
operateMemberScore(params).then((res) => {
this.dialogVisible = false
this.dialogVisible = false;
this.formQuery = {
comment: '',
comment: "",
memberIds: [],
operateType: null,
scoreCount: null
}
this.$refs.multipleTable.clearSelection()
this.selectedMember = []
this.$message.success(this.$t('操作成功'))
})
scoreCount: null,
};
this.$refs.multipleTable.clearSelection();
this.selectedMember = [];
this.$message.success(this.$t("操作成功"));
});
})
.catch((_) => {})
.catch((_) => {});
},
handleClose(done) {
this.$confirm(this.$t('确认关闭?'))
this.$confirm(this.$t("确认关闭?"))
.then((_) => {
done()
done();
})
.catch((_) => {})
.catch((_) => {});
},
handleSelectionChange(val) {
this.selectedMember = val
this.selectedMember = val;
},
dialogBeforeClose() {
this.loading = true
this.loading = true;
this.queryParams = {
country: null,
city: null,
......@@ -332,42 +339,42 @@ export default {
pageSize: 10,
startTime: null,
usedScore: null,
usedScoreOperate: null
}
usedScoreOperate: null,
};
},
getCountryList() {
getTradeCountryList().then((res) => {
this.countryList = res.data
})
this.countryList = res.data;
});
},
handleQuery() {
this.queryParams.pageNo = 1
const params = { ...this.queryParams }
this.queryParams.pageNo = 1;
const params = { ...this.queryParams };
if (this.dateRangeCreateTime) {
params.startTime = this.dateRangeCreateTime[0]
params.endTime = this.dateRangeCreateTime[1]
params.startTime = this.dateRangeCreateTime[0];
params.endTime = this.dateRangeCreateTime[1];
}
getMemberList(params).then((res) => {
this.loading = false
this.memberList = res.data.list
this.total = res.data.total
})
this.loading = false;
this.memberList = res.data.list;
this.total = res.data.total;
});
},
handleQueryPagination() {
const params = { ...this.queryParams }
const params = { ...this.queryParams };
if (this.dateRangeCreateTime) {
params.startTime = this.dateRangeCreateTime[0]
params.endTime = this.dateRangeCreateTime[1]
params.startTime = this.dateRangeCreateTime[0];
params.endTime = this.dateRangeCreateTime[1];
}
getMemberList(params).then((res) => {
this.loading = false
this.memberList = res.data.list
this.total = res.data.total
})
this.loading = false;
this.memberList = res.data.list;
this.total = res.data.total;
});
},
resetQuery() {
this.dateRangeCreateTime = []
this.loading = true
this.dateRangeCreateTime = [];
this.loading = true;
this.queryParams = {
country: null,
city: null,
......@@ -379,10 +386,10 @@ export default {
pageSize: 10,
startTime: null,
usedScore: null,
usedScoreOperate: null
}
this.handleQuery()
}
}
}
usedScoreOperate: null,
};
this.handleQuery();
},
},
};
</script>
<template>
<div>
<el-page-header
@back="goBack"
class="header"
:content="$t('分享统计详情')"
></el-page-header>
<div class="app-container">
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column :label="$t('序号')" align="center" prop="id" />
<el-table-column
:label="$t('操作人')"
align="center"
prop="memberName"
/>
<el-table-column
:label="$t('分类')"
align="center"
:prop="isChinese ? 'typeZh' : 'typeEn'"
/>
<el-table-column :label="$t('分享ID')" align="center" prop="code" />
<el-table-column
:label="$t('标题')"
align="center"
:prop="isChinese ? 'titleZh' : 'titleEn'"
/>
<el-table-column
:label="$t('操作时间')"
align="center"
prop="createTime"
width="180"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column
:label="$t('点击时间')"
align="center"
prop="createTime"
width="180"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) || "--" }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('积分')" align="center" prop="score" />
</el-table>
<!-- 分页组件 -->
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.rows"
@pagination="getList"
/>
</div>
</div>
</template>
<script>
import { getShareRecordDetails } from "@/api/ecw/memberManagement";
import { getDictDatas, DICT_TYPE } from "@/utils/dict";
export default {
name: "details",
components: {},
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 字典类型列表
list: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
dateRangeCreateTime: [],
// 查询参数
queryParams: {
page: 1,
rows: 10,
id: "",
},
// 表单参数
form: {},
// 表单校验
};
},
created() {
this.queryParams.id = this.$route.query.id;
this.getList();
},
computed: {
isChinese() {
return this.$i18n.locale === "zh_CN";
},
},
methods: {
goBack() {
this.$router.back();
},
/** 查询列表 */
getList() {
this.loading = true;
// 处理查询参数
let params = { ...this.queryParams };
// 执行查询
getShareRecordDetails(params).then((response) => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 取消按钮 */
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.page = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRangeCreateTime = [];
this.resetForm("queryForm");
this.handleQuery();
},
},
};
</script>
<style scoped>
.header {
padding-top: 40px;
padding-left: 20px;
}
</style>
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item :label="$t('操作人')" prop="memberName">
<el-input
v-model="queryParams.memberName"
:placeholder="$t('请输入操作人')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="$t('分类')" prop="type">
<el-select
v-model="queryParams.type"
:placeholder="$t('请选择分类')"
clearable
>
<el-option
v-for="item in getDictDatas(DICT_TYPE.SCORE_RULE_TYPE)"
:label="isChinese ? item.label : item.labelEn"
:value="item.value"
v-if="item.value == 3 || item.value == 4"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('标题')" prop="title">
<el-input
v-model="queryParams.title"
:placeholder="$t('请输入关键词查找')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="$t('分享ID')" prop="code">
<el-input
v-model="queryParams.code"
:placeholder="$t('请输入分享ID')"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="$t('总积分')" prop="type">
<el-row :gutter="10" style="width: 300px">
<el-col :span="10">
<dict-selector
v-model="queryParams.relationSymbol"
clearable
:type="DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL"
@change="handleQuery"
/>
</el-col>
<el-col :span="14">
<el-input
v-model.trim="queryParams.totalScore"
:placeholder="$t('请输入数字')"
clearable
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@keyup.enter.native="handleQuery"
/>
</el-col>
</el-row>
</el-form-item>
<el-form-item :label="$t('操作时间')">
<el-date-picker
v-model="dateRangeCreateTime"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{
$t("搜索")
}}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{
$t("重置")
}}</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column :label="$t('序号')" align="center" prop="id" />
<el-table-column :label="$t('操作人')" align="center" prop="memberName" />
<el-table-column
:label="$t('分类')"
align="center"
:prop="isChinese ? 'typeZh' : 'typeEn'"
/>
<el-table-column :label="$t('分享ID')" align="center" prop="code" />
<el-table-column
:label="$t('标题')"
align="center"
:prop="isChinese ? 'titleZh' : 'titleEn'"
/>
<el-table-column
:label="$t('操作时间')"
align="center"
prop="createTime"
width="180"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column
:label="$t('有效次数')"
align="center"
prop="triggerCount"
>
<template slot-scope="scope">
<el-button type="text" @click="goShareDetails(scope.row)">{{
scope.row.triggerCount
}}</el-button>
</template>
</el-table-column>
<el-table-column :label="$t('总积分')" align="center" prop="totalScore" />
<el-table-column
:label="$t('最新点击时间')"
align="center"
prop="createTime"
width="180"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) || "--" }}</span>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.rows"
@pagination="getList"
/>
</div>
</template>
<script>
import { getShareRecordList } from "@/api/ecw/memberManagement";
export default {
name: "EcwMembermanagementSharingstatisticsIndex",
components: {},
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 字典类型列表
list: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
dateRangeCreateTime: [],
// 查询参数
queryParams: {
page: 1,
rows: 10,
memberName: "", //操作人
type: "", //分类
title: "",
relationSymbol: "", //查询条件
totalScore: "",
name: null,
status: null,
type: null,
category: null,
remark: null,
},
};
},
created() {
this.getList();
},
computed: {
isChinese() {
return this.$i18n.locale === "zh_CN";
},
},
methods: {
goShareDetails(row) {
if (row.triggerCount != "0") {
this.$router.push({
path: "/memberManagement/sharingStatisticalDetails",
query: {
id: row.id,
},
});
}
},
/** 查询列表 */
getList() {
this.loading = true;
// 处理查询参数
let params = { ...this.queryParams };
this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime");
// 执行查询
getShareRecordList(params).then((response) => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.page = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.dateRangeCreateTime = [];
this.queryParams.relationSymbol = "";
this.queryParams.totalScore = "";
this.resetForm("queryForm");
this.handleQuery();
},
},
};
</script>
......@@ -8,6 +8,7 @@
:placeholder="$t('请输入订单号、唛头、提单号')"
clearable
@keyup.enter.native="handleQuery"
@input="noParam.value=noParam.value.replace(/\s+/g, '')"
>
<template slot="prepend">
<dict-selector
......@@ -129,11 +130,11 @@
<el-input v-model.trim="queryParams.tidanNo" :placeholder="$t('提单号')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>-->
<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 :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 :label="$t('报关方式')" prop="customsTypes">
......@@ -223,6 +224,21 @@
<el-option :label="$t('否')" :value="0"></el-option>
</el-select>
</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-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"
......@@ -406,7 +422,7 @@ export default {
// 导出遮罩层
exportLoading: false,
// 显示搜索条件
showSearch: true,
showSearch: false,
// 总条数
total: 0,
// 订单列表
......
......@@ -293,7 +293,7 @@
</el-select>
</el-form-item>
<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>
</el-form-item>
<el-form-item :label="$t('增值服务')" prop="types" v-show="showSearch">
......@@ -877,7 +877,7 @@ export default {
// 遮罩层
loading: true,
// 显示搜索条件
showSearch: true,
showSearch: false,
// 总条数
total: 0,
// 订单异常列表
......@@ -1062,8 +1062,12 @@ export default {
this.destCountryId = null
this.destWarehouseId = null
this.objectiveId = null
this.queryParams.isHaveCustomer = null
this.queryParams.channelIds = null
this.queryParams.goodsTypes = null
this.$nextTick(_ => {
this.$forceUpdate()
})
this.getList();
},
importCityName(id) {
......
......@@ -221,7 +221,7 @@
@change="handleQuery"
/>
</el-form-item>
<el-form-item :label="$t('收货人')" prop="statusList">
<el-form-item :label="$t('收货人')" v-show="showSearch">
<el-select
v-model="queryParams.hasConsignee"
: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