Commit cf2ba127 authored by yujinyao's avatar yujinyao

Merge branch 'pre-release' of...

Merge branch 'pre-release' of http://110.41.143.128:8081/lanbaoming/jiedao-app-operator-master into yujinyao
parents d579bde6 df5fb4d0
...@@ -398,55 +398,6 @@ ...@@ -398,55 +398,6 @@
}}</el-button> }}</el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-dialog
:title="$t('操作积分')"
:visible.sync="dialogVisible"
width="30%"
:before-close="handleClose"
>
<el-form ref="form" :model="formQuery" label-width="80px">
<el-form-item :label="$t('会员')">
<el-select
v-model="formQuery.memberIds"
multiple
placeholder="请选择"
>
<el-option
v-for="item in selectedMember"
:key="item.id"
:label="isChinese ? item.memberNameZh : item.memberNameEn"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('操作')">
<el-radio-group v-model="formQuery.operateType">
<el-radio
v-for="dict in getDictDatas(DICT_TYPE.MEMBER_SCORE_OPERATE_TYPE)"
:key="dict.value"
:label="dict.value"
>{{ $l(dict, "label") }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item :label="$t('积分')">
<el-input
v-model.number="formQuery.scoreCount"
:placeholder="$t('请输入积分')"
clearable
/>
</el-form-item>
<el-form-item :label="$t('备注')">
<el-input v-model="formQuery.comment" type="textarea" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="handleScoreSubmit">{{
$t("操作积分")
}}</el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
...@@ -456,7 +407,6 @@ import { ...@@ -456,7 +407,6 @@ import {
queryMemberExchangeRecord, queryMemberExchangeRecord,
batchVerifyAPI, batchVerifyAPI,
batchRecordExport, batchRecordExport,
batchRecordImport,
batchRecordImportTemplate, batchRecordImportTemplate,
rewardCancelQuery, rewardCancelQuery,
verifyRollback verifyRollback
...@@ -737,24 +687,6 @@ export default { ...@@ -737,24 +687,6 @@ export default {
(item) => item.value == id (item) => item.value == id
)[0] )[0]
}, },
handleScoreSubmit() {
this.$confirm(this.$t('确认提交?'))
.then((_) => {
const params = { ...this.formQuery }
operateMemberScore(params).then((res) => {
this.dialogVisible = true
this.formQuery = {
comment: '',
memberIds: [],
operateType: null,
scoreCount: null
}
this.selectedMember = []
this.$message.success(this.$t('操作成功'))
})
})
.catch((_) => {})
},
handleClose(done) { handleClose(done) {
this.$confirm(this.$t('确认关闭?')) this.$confirm(this.$t('确认关闭?'))
.then((_) => { .then((_) => {
......
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form <el-form
:model="queryParams" v-show="showSearch"
ref="queryForm" ref="queryForm"
:model="queryParams"
size="small" size="small"
:inline="true" :inline="true"
v-show="showSearch"
label-width="120px" label-width="120px"
> >
<el-form-item :label="$t('关键词')"> <el-form-item :label="$t('关键词')">
<el-input <el-input
style="width: 300px"
v-model.trim="queryParams.key" v-model.trim="queryParams.key"
style="width: 300px"
:placeholder="$t('请输入会员名称/会员编号/手机号')" :placeholder="$t('请输入会员名称/会员编号/手机号')"
clearable clearable
@keyup.enter.native="handleQuery"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item :label="$t('国家')"> <el-form-item :label="$t('国家')">
...@@ -37,20 +37,19 @@ ...@@ -37,20 +37,19 @@
<el-row :gutter="10" style="width: 300px"> <el-row :gutter="10" style="width: 300px">
<el-col :span="10"> <el-col :span="10">
<dict-selector <dict-selector
v-model="queryParams.holdScoreOperate"
clearable clearable
:type="DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL" :type="DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL"
v-model="queryParams.holdScoreOperate"
@change="handleQuery" @change="handleQuery"
> />
</dict-selector>
</el-col> </el-col>
<el-col :span="14"> <el-col :span="14">
<el-input <el-input
v-model.trim="queryParams.holdScore" v-model.trim="queryParams.holdScore"
:placeholder="$t('请输入数字')" :placeholder="$t('请输入数字')"
clearable clearable
@keyup.enter.native="handleQuery"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@keyup.enter.native="handleQuery"
/> />
</el-col> </el-col>
</el-row> </el-row>
...@@ -59,30 +58,29 @@ ...@@ -59,30 +58,29 @@
<el-row :gutter="10" style="width: 300px"> <el-row :gutter="10" style="width: 300px">
<el-col :span="10"> <el-col :span="10">
<dict-selector <dict-selector
v-model="queryParams.usedScoreOperate"
clearable clearable
:type="DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL" :type="DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL"
v-model="queryParams.usedScoreOperate"
@change="handleQuery" @change="handleQuery"
> />
</dict-selector>
</el-col> </el-col>
<el-col :span="14"> <el-col :span="14">
<el-input <el-input
v-model.trim="queryParams.usedScore" v-model.trim="queryParams.usedScore"
:placeholder="$t('请输入数字')" :placeholder="$t('请输入数字')"
clearable clearable
@keyup.enter.native="handleQuery"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@keyup.enter.native="handleQuery"
/> />
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
<el-form-item :label="$t('会员注册时间')"> <el-form-item :label="$t('会员注册时间')">
<el-date-picker <el-date-picker
v-model="dateRangeCreateTime"
type="datetimerange" type="datetimerange"
clearable clearable
placement="bottom-start" placement="bottom-start"
v-model="dateRangeCreateTime"
style="width: 240px" style="width: 240px"
value-format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"
range-separator="-" range-separator="-"
...@@ -105,75 +103,69 @@ ...@@ -105,75 +103,69 @@
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
:showSearch.sync="showSearch" :show-search.sync="showSearch"
@queryTable="handleQueryPagination" @queryTable="handleQueryPagination"
></right-toolbar> />
</el-row> </el-row>
<el-table <el-table
ref="multipleTable" ref="multipleTable"
v-loading="loading" v-loading="loading"
@selection-change="handleSelectionChange"
:data="memberList" :data="memberList"
@selection-change="handleSelectionChange"
> >
<el-table-column type="selection" width="55"> </el-table-column> <el-table-column type="selection" width="55" />
<el-table-column <el-table-column
width="140" width="140"
:label="$t('会员编号')" :label="$t('会员编号')"
align="center" align="center"
prop="id" prop="memberCode"
></el-table-column> />
<el-table-column :label="$t('会员名称')" align="center"> <el-table-column :label="$t('会员名称')" align="center">
<template v-slot="{ row }"> <template #default="{ row }">
<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"
:label="$t('联系方式')" :label="$t('联系方式')"
align="center" align="center"
prop="mobile" prop="mobile"
></el-table-column> />
<el-table-column <el-table-column
width="140" width="140"
align="center" align="center"
:label="$t('国家')" :label="$t('国家')"
:prop="isChinese ? 'countryNameZh' : 'countryNameEn'" :prop="isChinese ? 'countryNameZh' : 'countryNameEn'"
></el-table-column> />
<el-table-column :label="$t('当前积分')" align="center"> <el-table-column :label="$t('当前积分')" align="center">
<template v-slot="{ row }"> <template #default="{ row }">
<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">
<template v-slot="{ row }"> <template #default="{ row }">
<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
:label="$t('已失效积分')" :label="$t('已失效积分')"
align="center" align="center"
prop="expiredScore" prop="expiredScore"
></el-table-column> />
<el-table-column :label="$t('会员注册时间')" align="center"> <el-table-column :label="$t('会员注册时间')" align="center">
<template v-slot="{ row }"> <template #default="{ row }">
{{ parseTime(row.createTime) || "/" }}</template {{ parseTime(row.createTime) || "/" }}</template>
>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- //分页列表 --> <!-- //分页列表 -->
...@@ -202,8 +194,7 @@ ...@@ -202,8 +194,7 @@
:key="item.id" :key="item.id"
:label="isChinese ? item.memberNameZh : item.memberNameEn" :label="isChinese ? item.memberNameZh : item.memberNameEn"
:value="item.id" :value="item.id"
> />
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('操作')"> <el-form-item :label="$t('操作')">
...@@ -212,8 +203,7 @@ ...@@ -212,8 +203,7 @@
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('积分')">
...@@ -224,7 +214,7 @@ ...@@ -224,7 +214,7 @@
/> />
</el-form-item> </el-form-item>
<el-form-item :label="$t('备注')"> <el-form-item :label="$t('备注')">
<el-input type="textarea" v-model="formQuery.comment"></el-input> <el-input v-model="formQuery.comment" type="textarea" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
...@@ -237,12 +227,12 @@ ...@@ -237,12 +227,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: 'MemberPointsSummary',
data() { data() {
return { return {
selectedMember: [], selectedMember: [],
...@@ -256,79 +246,81 @@ export default { ...@@ -256,79 +246,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.dialogVisible = true; this.formQuery.memberIds = this.selectedMember.map((item) => item.id)
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((_) => {
let 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.selectedMember = []; this.$refs.multipleTable.clearSelection()
this.$message.success(this.$t("操作成功")); this.selectedMember = []
}); 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,
...@@ -340,42 +332,42 @@ export default { ...@@ -340,42 +332,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
let 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() {
let 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,
...@@ -387,10 +379,10 @@ export default { ...@@ -387,10 +379,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>
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