Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-app-operator-master
Commits
c4a696f5
Commit
c4a696f5
authored
Dec 25, 2024
by
Smile
Committed by
wux
Jan 02, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户等级修改
parent
c15b8f12
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
589 additions
and
43 deletions
+589
-43
memberManagement.js
src/api/ecw/memberManagement.js
+25
-0
en_US.json
src/i18n/languages/en_US.json
+3
-1
dict.js
src/utils/dict.js
+2
-0
index.vue
src/views/ecw/memberManagement/memberLevelSetting/index.vue
+203
-42
index.vue
src/views/ecw/memberManagement/operatingLevel/index.vue
+356
-0
No files found.
src/api/ecw/memberManagement.js
View file @
c4a696f5
...
...
@@ -140,7 +140,32 @@ export function addNewMemberLevel(data) {
data
,
});
}
// 启用关闭 会员等级规则
export
function
memberLevelStatus
(
data
)
{
return
request
({
url
:
"
/member/user-level/status
"
,
method
:
"
post
"
,
data
,
});
}
// 新增会员等级设置
export
function
memberLevelConfigDetails
(
data
)
{
return
request
({
url
:
"
/member/user-level/get
"
,
method
:
"
post
"
,
data
,
});
}
// 操作日志分页
export
function
operateLogPage
(
data
)
{
return
request
({
url
:
"
/member/user-level-log/page
"
,
method
:
"
post
"
,
data
:
data
,
timeout
:
5
*
60000
})
}
// 删除会员等级
export
function
delMemberLevel
(
data
)
{
return
request
({
...
...
src/i18n/languages/en_US.json
View file @
c4a696f5
...
...
@@ -4721,5 +4721,7 @@
"运输"
:
"Transportation"
,
"免泡重量"
:
"免泡重量"
,
"请输入免泡重量"
:
"请输入免泡重量"
,
"出货撤回"
:
"出货撤回"
"出货撤回"
:
"出货撤回"
,
"启用时间"
:
"Enable Time"
,
"等级"
:
"Level"
}
src/utils/dict.js
View file @
c4a696f5
...
...
@@ -277,6 +277,8 @@ export const DICT_TYPE = {
YES_OR_NO_OR_ALL
:
"
yes_or_no_or_all
"
,
CLIENT_PLATFORM
:
"
client_platform
"
,
MEMBER_SCORE_SOURCE
:
"
member_score_source
"
,
//会员积分来源
MEMBERSHIP_LEVELS
:
"
membership_levels
"
,
//会员等级
ENABLE_STATUS
:
"
enable_status
"
,
//会员等级规则开启状态
};
/**
...
...
src/views/ecw/memberManagement/memberLevelSetting/index.vue
View file @
c4a696f5
<
template
>
<div
class=
"app-container"
>
<!-- 搜索工作栏 -->
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
label-width=
"68px"
>
<el-form-item
:label=
"$t('名称')"
prop=
"name"
>
<el-input
v-model=
"queryParams.name"
:placeholder=
"$t('请输入名称')"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
:label=
"$t('等级')"
prop=
"level"
>
<dict-selector
v-model=
"queryParams.level"
:type=
"DICT_TYPE.MEMBERSHIP_LEVELS"
></dict-selector>
</el-form-item>
<el-form-item
:label=
"$t('状态')"
prop=
"status"
>
<dict-selector
v-model=
"queryParams.status"
:type=
"DICT_TYPE.ENABLE_STATUS"
></dict-selector>
</el-form-item>
<el-form-item
:label=
"$t('启用时间')"
>
<el-date-picker
v-model=
"dateRangeCreateTime"
type=
"datetimerange"
:start-placeholder=
"$t('开始日期')"
value-format=
"yyyy-MM-dd"
:end-placeholder=
"$t('结束日期')"
>
</el-date-picker>
</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
class=
"mb8"
>
<el-button
type=
"success"
size=
"mini"
icon=
"el-icon-plus"
@
click=
"handleNewScoreRule"
>
{{
$t
(
"
添加规则
"
)
}}
</el-button>
<el-button
type=
"success"
size=
"mini"
icon=
"el-icon-delete"
@
click=
"handleDelScoreRule"
>
{{
$t
(
"
删除规则
"
)
}}
</el-button>
...
...
@@ -7,59 +40,129 @@
<el-table
ref=
"multipleTable"
v-loading=
"loading"
@
selection-change=
"handleSelectionChange"
:data=
"memberLevelList"
>
<el-table-column
type=
"selection"
width=
"55"
></el-table-column>
<el-table-column
width=
"140"
:label=
"$t('序号')"
align=
"center"
prop=
"id"
></el-table-column>
<el-table-column
:label=
"$t('等级名称')"
align=
"center"
prop=
"name"
></el-table-column>
<el-table-column
width=
"140"
:label=
"$t('图标')"
align=
"center"
prop=
"mobile"
>
<el-table-column
width=
"90"
:label=
"$t('编号')"
align=
"center"
>
<template
#default
="
{ row }">
<el-button
size=
"mini"
type=
"text"
@
click=
"handleViewDetails(row)"
>
{{
row
.
ruleNumber
||
"
/
"
}}
</el-button>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('名称')"
align=
"center"
prop=
"name"
></el-table-column>
<el-table-column
:label=
"$t('等级')"
align=
"center"
prop=
"level"
>
<
template
slot-scope=
"scope"
>
<
el-image
:src=
"scope.row.icon"
style=
"width: 50px; height: 50px"
>
{{
$t
(
"
无
"
)
}}
</el-image
>
<
dict-tag
:type=
"DICT_TYPE.MEMBERSHIP_LEVELS"
:value=
"scope.row.level"
/
>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('积分范围')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
lowerCount
}}
-
{{
scope
.
row
.
upperCount
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('等级有效期')"
align=
"center"
prop=
"validityPeriod"
></el-table-column>
<el-table-column
:label=
"$t('积分累计周期')"
align=
"center"
prop=
"accumulationPeriod"
></el-table-column>
<el-table-column
:label=
"$t('积分累计开始日期')"
min-width=
"100px"
align=
"center"
>
<
template
#default
="{
row
}"
>
{{
parseTime
(
row
.
startDate
)
||
"
/
"
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('规则有效期')"
width=
"150px"
align=
"center"
>
<
template
#default
="{
row
}"
>
{{
parseTime
(
row
.
startTime
)
}}
-
{{
parseTime
(
row
.
endTime
)
}}
</
template
>
</el-table-column>
<el-table-column
width=
"140"
:label=
"$t('图标')"
align=
"center"
prop=
"icon"
>
<
template
slot-scope=
"scope"
>
<el-image
:src=
"scope.row.icon"
style=
"width: 50px; height: 50px"
>
{{
$t
(
"
无
"
)
}}
</el-image>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('启用时间')"
align=
"center"
>
<
template
#default
="{
row
}"
>
{{
parseTime
(
row
.
enableDate
)
||
"
/
"
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('状态')"
align=
"center"
prop=
"status"
>
<
template
slot-scope=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.ENABLE_STATUS"
:value=
"scope.row.status"
/>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('操作')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
>
{{
$t
(
"
修改
"
)
}}
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
>
{{
$t
(
"
删除
"
)
}}
</el-button>
<el-button
size=
"mini"
type=
"text"
@
click=
"handleUpdate(scope.row)"
>
{{
$t
(
"
修改
"
)
}}
</el-button>
<el-button
size=
"mini"
type=
"text"
@
click=
"handleDelete(scope.row)"
>
{{
$t
(
"
删除
"
)
}}
</el-button>
<el-button
size=
"mini"
v-if=
"scope.row.status==0||scope.row.status==2"
type=
"text"
@
click=
"handleEnable(scope.row)"
>
{{
$t
(
"
启用
"
)
}}
</el-button>
<el-button
size=
"mini"
v-if=
"scope.row.status==1"
type=
"text"
@
click=
"handleCloseButton(scope.row)"
>
{{
$t
(
"
停用
"
)
}}
</el-button>
<el-button
size=
"mini"
type=
"text"
@
click=
"handleCopyButton(scope.row)"
>
{{
$t
(
"
复制
"
)
}}
</el-button>
</
template
>
</el-table-column>
</el-table>
<!-- //分页列表 -->
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.pageNo"
:limit.sync=
"queryParams.pageSize"
@
pagination=
"handleQueryPagination"
/>
<el-dialog
:title=
"$t('添加规则')"
:visible.sync=
"dialogVisible"
width=
"30%"
:before-close=
"handleClose"
>
<el-form
:model=
"ruleForm"
ref=
"ruleForm"
label-width=
"100px"
class=
"demo-ruleForm"
>
<el-form-item
:label=
"$t('等级名称')"
>
<el-input
v-model=
"ruleForm.name"
></el-input>
</el-form-item>
<el-form-item
:label=
"$t('积分范围')"
>
<el-col
:span=
"11"
>
<el-form-item>
<el-input
v-model=
"ruleForm.lowerCount"
></el-input>
</el-form-item>
</el-col>
<el-col
class=
"line"
:span=
"2"
>
{{ $t("至") }}
</el-col>
<el-col
:span=
"11"
>
<el-form-item>
<el-input
v-model=
"ruleForm.upperCount"
></el-input>
</el-form-item>
</el-col>
</el-form-item>
<el-form-item
:label=
"$t('上传图标')"
>
<image-upload
v-model=
"ruleForm.icon"
:fileType=
"['png', 'jpg', 'jpeg']"
:limit=
"1"
/>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
{{ $t("取 消") }}
</el-button>
<el-button
type=
"primary"
@
click=
"handelAddNewMemberLevel"
>
{{ $t("确定") }}
</el-button>
</span>
</el-dialog>
<!-- <el-dialog :title="$t(titleLabel)" :visible.sync="dialogVisible" width="30%" :before-close="handleClose">-->
<!-- <el-form :model="ruleForm" ref="ruleForm" label-width="100px" class="demo-ruleForm">-->
<!-- <el-form-item :label="$t('编号')">-->
<!-- <el-input v-model="ruleForm.ruleNumber" :disabled="isDisable"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="$t('状态')">-->
<!-- <dict-selector clearable :disabled="isDisable" :type="DICT_TYPE.ENABLE_STATUS" v-model="ruleForm.status"> </dict-selector>-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="$t('名称')">-->
<!-- <el-input v-model="ruleForm.name"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="$t('等级')">-->
<!-- <dict-selector clearable :disabled="isDisable" :type="DICT_TYPE.MEMBERSHIP_LEVELS" v-model="ruleForm.level"> </dict-selector>-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="$t('积分范围')">-->
<!-- <el-col :span="11">-->
<!-- <el-form-item>-->
<!-- <el-input v-model="ruleForm.lowerCount"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col class="line" :span="2">{{ $t("至") }}</el-col>-->
<!-- <el-col :span="11">-->
<!-- <el-form-item>-->
<!-- <el-input v-model="ruleForm.upperCount"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="$t('等级有效期')">-->
<!-- <el-input v-model="ruleForm.validityPeriod"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="$t('积分累计周期')">-->
<!-- <el-input v-model="ruleForm.accumulationPeriod"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="$t('积分开始累计日期')">-->
<!-- <el-input v-model="ruleForm.startDate"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="$t('等级规则有效期')">-->
<!-- <el-col :span="11">-->
<!-- <el-form-item>-->
<!-- <el-input v-model="ruleForm.startTime"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col class="line" :span="2">{{ $t("至") }}</el-col>-->
<!-- <el-col :span="11">-->
<!-- <el-form-item>-->
<!-- <el-input v-model="ruleForm.endTime"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="$t('上传图标')">-->
<!-- <image-upload v-model="ruleForm.icon" :fileType="['png', 'jpg', 'jpeg']" :limit="1" />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="$t('等级说明')">-->
<!-- <el-input v-model="ruleForm.description"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="$t('匹配顺序')">-->
<!-- <el-input v-model="ruleForm.sort"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- <span slot="footer" class="dialog-footer">-->
<!-- <el-button @click="dialogVisible = false">{{ $t("取 消") }}</el-button>-->
<!-- <el-button type="primary" @click="handelAddNewMemberLevel">{{ $t("确定") }}</el-button>-->
<!-- </span>-->
<!-- </el-dialog>-->
</div>
</template>
<
script
>
import
{
getDictDatas
,
DICT_TYPE
}
from
"
@/utils/dict
"
import
{
getMemberLevelList
,
addNewMemberLevel
,
delMemberLevel
,
editMemberLevel
}
from
"
@/api/ecw/memberManagement
"
import
{
getMemberLevelList
,
addNewMemberLevel
,
delMemberLevel
,
editMemberLevel
,
memberLevelStatus
,
}
from
"
@/api/ecw/memberManagement
"
import
ImageUpload
from
"
@/components/ImageUpload
"
export
default
{
name
:
"
integralRecord
"
,
...
...
@@ -70,11 +173,22 @@ export default {
return
{
dialogVisible
:
false
,
selectList
:
[],
dateRangeCreateTime
:
[],
ruleForm
:
{
icon
:
""
,
lowerCount
:
""
,
name
:
""
,
upperCount
:
""
ruleNumber
:
null
,
status
:
null
,
level
:
null
,
icon
:
null
,
lowerCount
:
null
,
name
:
null
,
upperCount
:
null
,
validityPeriod
:
null
,
accumulationPeriod
:
null
,
startDate
:
null
,
startTime
:
null
,
endTime
:
null
,
description
:
null
,
sort
:
null
},
total
:
0
,
loading
:
true
,
...
...
@@ -98,8 +212,16 @@ export default {
},
methods
:
{
handleUpdate
(
row
)
{
this
.
ruleForm
=
{
...
row
}
this
.
dialogVisible
=
true
this
.
$router
.
push
({
path
:
"
/member/operatingLevel
"
,
query
:
{
id
:
row
.
id
,
pageStatus
:
"
edit
"
}
})
},
handleViewDetails
(
row
)
{
this
.
$router
.
push
({
path
:
"
/member/operatingLevel
"
,
query
:
{
id
:
row
.
id
,
pageStatus
:
"
view
"
}
})
},
handleDelete
(
row
)
{
let
ids
=
[
row
.
id
]
...
...
@@ -153,11 +275,49 @@ export default {
}
},
handleNewScoreRule
()
{
this
.
dialogVisible
=
true
this
.
$router
.
push
({
path
:
"
/member/operatingLevel
"
,
query
:
{
pageStatus
:
"
new
"
}
})
},
//启用登记规则
handleEnable
(
row
)
{
this
.
$modal
.
confirm
(
this
.
$t
(
"
是否确认启用此等级规则
"
))
.
then
(
function
()
{
return
memberLevelStatus
({
id
:
row
.
id
,
status
:
"
1
"
})
})
.
then
(()
=>
{
this
.
handleQuery
()
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
启用成功
"
))
})
.
catch
(()
=>
{
})
},
// 停用按钮操作
handleCloseButton
(
row
)
{
this
.
$modal
.
confirm
(
this
.
$t
(
"
是否确认停用此会员等级规则
"
))
.
then
(
function
()
{
return
memberLevelStatus
({
id
:
row
.
id
,
status
:
"
2
"
})
})
.
then
(()
=>
{
this
.
handleQuery
()
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
关闭成功
"
))
})
.
catch
(()
=>
{})
},
// 复制按钮操作
handleCopyButton
(
row
)
{
this
.
$router
.
push
({
path
:
"
/member/operatingLevel
"
,
query
:
{
pageStatus
:
"
new
"
,
params
:
row
}
})
},
handleQuery
()
{
this
.
queryParams
.
pageNo
=
1
let
params
=
{
...
this
.
queryParams
}
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
"
createTime
"
,
false
)
getMemberLevelList
(
params
).
then
((
res
)
=>
{
this
.
loading
=
false
this
.
memberLevelList
=
res
.
data
.
list
...
...
@@ -166,6 +326,7 @@ export default {
},
handleQueryPagination
()
{
let
params
=
{
...
this
.
queryParams
}
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
"
createTime
"
,
false
)
getMemberLevelList
(
params
).
then
((
res
)
=>
{
this
.
loading
=
false
this
.
memberLevelList
=
res
.
data
.
list
...
...
src/views/ecw/memberManagement/operatingLevel/index.vue
0 → 100644
View file @
c4a696f5
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
size=
"small"
ref=
"queryForm"
:rules=
"rules"
:disabled=
"showViewTime"
label-width=
"100px"
class=
"demo-ruleForm"
>
<el-form-item
:label=
"$t('编号')"
v-if=
"titleShow"
prop=
"ruleNumber"
>
<el-input
v-model=
"queryParams.ruleNumber"
:disabled=
"true"
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
></el-input>
</el-form-item>
<el-form-item
:label=
"$t('状态')"
v-if=
"titleShow"
prop=
"status"
>
<dict-selector
clearable
:disabled=
"true"
:type=
"DICT_TYPE.ENABLE_STATUS"
v-model=
"queryParams.status"
>
</dict-selector>
</el-form-item>
<el-form-item
:label=
"$t('名称')"
prop=
"name"
>
<el-input
v-model=
"queryParams.name"
clearable
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
></el-input>
</el-form-item>
<el-form-item
:label=
"$t('等级')"
prop=
"level"
>
<dict-selector
clearable
:disabled=
"showViewTime"
:type=
"DICT_TYPE.MEMBERSHIP_LEVELS"
v-model=
"queryParams.level"
>
</dict-selector>
</el-form-item>
<el-form-item
:label=
"$t('积分范围')"
>
<el-col
:span=
"11"
>
<el-form-item
prop=
"lowerCount"
>
<el-input
v-model=
"queryParams.lowerCount"
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
></el-input>
</el-form-item>
</el-col>
<el-col
class=
"line"
:span=
"2"
>
{{
$t
(
"
至
"
)
}}
</el-col>
<el-col
:span=
"11"
>
<el-form-item
prop=
"upperCount"
>
<el-input
v-model=
"queryParams.upperCount"
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
></el-input>
</el-form-item>
</el-col>
</el-form-item>
<el-form-item
:label=
"$t('等级有效期')"
prop=
"validityPeriod"
>
<el-input
v-model.number=
"queryParams.validityPeriod"
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
></el-input>
</el-form-item>
<el-form-item
:label=
"$t('积分累计周期')"
prop=
"accumulationPeriod"
>
<el-input
v-model.number=
"queryParams.accumulationPeriod"
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
></el-input>
</el-form-item>
<el-form-item
:label=
"$t('积分开始累计日期')"
prop=
"startDate"
>
<el-date-picker
type=
"date"
placeholder=
"选择日期"
v-model=
"queryParams.startDate"
style=
"width: 100%;"
value-format=
"yyyy-MM-dd HH:mm:ss"
></el-date-picker>
</el-form-item>
<el-form-item
:label=
"$t('启用日期')"
v-if=
"titleShow"
prop=
"enableDate"
>
<el-date-picker
type=
"date"
:disabled=
"true"
placeholder=
"选择日期"
v-model=
"queryParams.enableDate"
style=
"width: 100%;"
value-format=
"yyyy-MM-dd HH:mm:ss"
></el-date-picker>
</el-form-item>
<el-form-item
:label=
"$t('等级规则有效期-开始日期')"
prop=
"startTime"
>
<el-date-picker
type=
"date"
placeholder=
"选择日期"
v-model=
"queryParams.startTime"
style=
"width: 100%;"
value-format=
"yyyy-MM-dd HH:mm:ss"
></el-date-picker>
</el-form-item>
<el-form-item
:label=
"$t('等级规则有效期-结束日期')"
prop=
"endTime"
>
<el-date-picker
type=
"date"
placeholder=
"选择日期"
v-model=
"queryParams.endTime"
style=
"width: 100%;"
value-format=
"yyyy-MM-dd HH:mm:ss"
></el-date-picker>
</el-form-item>
<el-form-item
:label=
"$t('上传图标')"
prop=
"icon"
>
<image-upload
v-model=
"queryParams.icon"
:fileType=
"['png', 'jpg', 'jpeg']"
:limit=
"1"
/>
</el-form-item>
<el-form-item
:label=
"$t('等级说明')"
prop=
"description"
>
<el-input
v-model=
"queryParams.description"
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
></el-input>
</el-form-item>
<el-form-item
:label=
"$t('匹配顺序')"
prop=
"sort"
>
<el-input
v-model=
"queryParams.sort"
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
></el-input>
</el-form-item>
<!-- 编辑相关内容 -->
<div
v-if=
"showViewTime"
>
<el-form-item
:label=
"$t('创建人')"
>
<el-input
v-model.number=
"queryParams.creator"
:placeholder=
"$t('请输入创建人')"
clearable
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
</el-form-item>
<el-form-item
:label=
"$t('创建时间')"
>
<el-date-picker
type=
"datetime"
:placeholder=
"$t('选择创建时间')"
v-model=
"queryParams.createTime"
value-format=
"yyyy-MM-dd HH:mm:ss"
placement=
"bottom-start"
></el-date-picker>
</el-form-item>
<el-form-item
:label=
"$t('最后更新人')"
>
<el-input
v-model.number=
"queryParams.updater"
:placeholder=
"$t('请输入最后更新人')"
clearable
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
</el-form-item>
<el-form-item
:label=
"$t('最后更新时间')"
>
<el-date-picker
type=
"datetime"
:placeholder=
"$t('选择最后更新时间')"
v-model=
"queryParams.updateTime"
value-format=
"yyyy-MM-dd HH:mm:ss"
placement=
"bottom-start"
></el-date-picker>
</el-form-item>
</div>
</el-form>
<el-row
justify=
"end"
:gutter=
"20"
type=
"flex"
>
<el-col
:span=
"3"
v-if=
"$route.query.pageStatus == 'new'"
>
<el-button
type=
"primary"
@
click=
"handleSaveIntegralRule"
style=
"width: 100%"
>
{{
$t
(
"
保存
"
)
}}
</el-button>
</el-col>
<el-col
:span=
"3"
v-if=
"$route.query.pageStatus == 'new'"
>
<el-button
type=
"primary"
style=
"width: 100%"
@
click=
"handleEnableIntegralRule"
>
{{
$t
(
"
保存并启用
"
)
}}
</el-button>
</el-col>
<el-col
:span=
"3"
v-if=
"$route.query.pageStatus == 'edit'"
>
<el-button
type=
"primary"
style=
"width: 100%"
@
click=
"handleUpdatedMemberLevel"
>
{{
$t
(
"
更新
"
)
}}
</el-button>
</el-col>
<el-col
:span=
"3"
>
<el-button
v-if=
"$route.query.pageStatus != 'view'"
type=
"primary"
style=
"width: 100%"
@
click=
"handleResetMemberLevel"
>
{{
$t
(
"
重置
"
)
}}
</el-button>
</el-col>
<el-col
:span=
"3"
>
<el-button
style=
"width: 100%"
type=
"primary"
@
click=
"handleGoBack"
>
{{
$t
(
"
返回
"
)
}}
</el-button>
</el-col>
</el-row>
<!-- table Tab -->
<el-menu
:default-active=
"activeIndex"
class=
"el-menu-demo"
mode=
"horizontal"
@
select=
"handleSelect"
>
<el-menu-item
index=
"reward"
>
{{
$t
(
"
操作日志
"
)
}}
</el-menu-item>
</el-menu>
<div
class=
"table-container"
>
<div
class=
"reward"
v-show=
"activeIndex == 'reward'"
>
<el-table
:data=
"logs"
v-loading=
"logsLoading"
>
<el-table-column
:label=
"$t('环节')"
>
<template
slot-scope=
"
{ row }">
{{
row
.
operateType
==
1
?
$t
(
"
新增
"
)
:
$t
(
"
修改
"
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('操作人')"
prop=
"operator"
>
</el-table-column>
<el-table-column
:label=
"$t('操作时间')"
>
<
template
slot-scope=
"{ row }"
>
{{
row
.
createTime
|
parseTime
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('备注')"
prop=
"remarks"
></el-table-column>
<el-table-column
:label=
"$t('审批流程')"
prop=
"bpmProcessId"
width=
"150"
></el-table-column>
</el-table>
</div>
</div>
</div>
</template>
<
script
>
import
{
getDictDatas
,
DICT_TYPE
}
from
"
@/utils/dict
"
import
imageUpload
from
"
@/components/ImageUpload/index.vue
"
import
{
editMemberLevel
,
memberLevelConfigDetails
,
addNewMemberLevel
,
operateLogPage
}
from
"
@/api/ecw/memberManagement
"
import
{
parseTime
}
from
"
@/utils/ruoyi
"
import
{
deepClone
,
titleCase
}
from
"
@/utils
"
export
default
{
name
:
"
operatingLevel
"
,
components
:
{
imageUpload
},
computed
:
{
isChinese
()
{
return
this
.
$i18n
.
locale
===
"
zh_CN
"
},
},
watch
:
{
rewardsDetails
(
newVal
,
oldVal
)
{
if
(
JSON
.
stringify
(
newVal
)
!=
"
{}
"
)
{
this
.
queryParams
=
deepClone
(
newVal
)
this
.
queryParams
.
pickMethod
=
newVal
.
pickMethod
.
split
(
"
,
"
)
this
.
$nextTick
(()
=>
{
this
.
$refs
[
"
queryForm
"
].
clearValidate
()
})
}
else
{
this
.
resetFormQuery
()
this
.
$nextTick
(()
=>
{
this
.
$refs
[
"
queryForm
"
].
resetFields
()
this
.
$refs
[
"
queryForm
"
].
clearValidate
()
})
console
.
log
(
"
Prop is empty
"
)
}
}
},
filters
:
{
parseTime
},
data
()
{
return
{
loading
:
false
,
showViewTime
:
false
,
titleShow
:
true
,
activeIndex
:
"
reward
"
,
logs
:
[],
// 操作日志
logsLoading
:
false
,
// 日志加载中
queryParams
:
{
ruleNumber
:
null
,
status
:
null
,
level
:
null
,
icon
:
null
,
lowerCount
:
null
,
name
:
null
,
upperCount
:
null
,
validityPeriod
:
null
,
accumulationPeriod
:
null
,
startDate
:
null
,
startTime
:
null
,
endTime
:
null
,
enableDate
:
null
,
description
:
null
,
sort
:
null
,
dateRangeCreateTime
:
[]
},
rules
:
{
name
:
[
{
required
:
true
,
message
:
this
.
$t
(
"
请输入名称
"
),
trigger
:
"
blur
"
}
],
level
:
[
{
required
:
true
,
message
:
this
.
$t
(
"
请输入等级
"
),
trigger
:
"
blur
"
}
],
lowerCount
:
[
{
required
:
true
,
message
:
this
.
$t
(
"
请输入积分最低值
"
),
trigger
:
"
blur
"
}
],
upperCount
:
[
{
required
:
true
,
message
:
this
.
$t
(
"
请输入积分最高值
"
),
trigger
:
"
blur
"
}
],
validityPeriod
:
[
{
type
:
"
number
"
,
message
:
this
.
$t
(
"
请输入整数
"
),
trigger
:
"
blur
"
}
],
accumulationPeriod
:
[
{
required
:
true
,
message
:
this
.
$t
(
"
请输入积分累计周期
"
),
trigger
:
"
blur
"
},
{
type
:
"
number
"
,
message
:
this
.
$t
(
"
请输入整数
"
),
trigger
:
"
blur
"
}
],
}
}
},
created
()
{
if
(
this
.
$route
.
query
.
pageStatus
==
"
edit
"
)
{
this
.
handleMemberLevelDetails
()
}
else
if
(
this
.
$route
.
query
.
pageStatus
==
"
view
"
)
{
this
.
showViewTime
=
true
this
.
handleMemberLevelDetails
()
}
else
{
this
.
titleShow
=
false
;
if
(
this
.
$route
.
query
.
params
!=
null
){
this
.
queryParams
=
this
.
$route
.
query
.
params
this
.
queryParams
.
id
=
null
;
this
.
queryParams
.
startDate
=
parseTime
(
this
.
queryParams
.
startDate
)
this
.
queryParams
.
startTime
=
parseTime
(
this
.
queryParams
.
startTime
)
this
.
queryParams
.
endTime
=
parseTime
(
this
.
queryParams
.
endTime
)
this
.
queryParams
.
enableDate
=
parseTime
(
this
.
queryParams
.
enableDate
)
}
}
},
methods
:
{
handleMemberLevelDetails
(){
memberLevelConfigDetails
({
id
:
this
.
$route
.
query
.
id
}).
then
(
response
=>
{
this
.
queryParams
=
response
.
data
this
.
queryParams
.
startDate
=
parseTime
(
response
.
data
.
startDate
)
this
.
queryParams
.
startTime
=
parseTime
(
response
.
data
.
startTime
)
this
.
queryParams
.
endTime
=
parseTime
(
response
.
data
.
endTime
)
this
.
queryParams
.
enableDate
=
parseTime
(
response
.
data
.
enableDate
)
this
.
queryParams
.
createTime
=
parseTime
(
response
.
data
.
createTime
,
"
{y}-{m}-{d} {h}:{i}:{s}
"
)
this
.
queryParams
.
updateTime
=
parseTime
(
response
.
data
.
updateTime
,
"
{y}-{m}-{d} {h}:{i}:{s}
"
)
this
.
loadLogs
()
})
},
//保存
handleSaveIntegralRule
(){
this
.
$refs
[
"
queryForm
"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
let
params
=
deepClone
(
this
.
queryParams
)
addNewMemberLevel
(
params
).
then
((
res
)
=>
{
this
.
$message
.
success
(
this
.
$t
(
"
保存成功
"
))
this
.
$router
.
go
(
-
1
)
})
}
else
{
console
.
log
(
"
error submit!!
"
)
return
false
}
})
},
//保存并启用
handleEnableIntegralRule
(){
this
.
$refs
[
"
queryForm
"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
let
params
=
deepClone
(
this
.
queryParams
)
params
.
status
=
"
1
"
addNewMemberLevel
(
params
).
then
((
res
)
=>
{
this
.
$message
.
success
(
this
.
$t
(
"
保存成功
"
))
this
.
$router
.
go
(
-
1
)
})
}
else
{
console
.
log
(
"
error submit!!
"
)
return
false
}
})
},
//编辑更新等级规则
handleUpdatedMemberLevel
(){
this
.
$refs
[
"
queryForm
"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
let
params
=
deepClone
(
this
.
queryParams
)
editMemberLevel
(
params
).
then
((
res
)
=>
{
this
.
$message
.
success
(
this
.
$t
(
"
更新成功
"
))
this
.
$router
.
go
(
-
1
)
})
}
else
{
console
.
log
(
"
error submit!!
"
)
return
false
}
})
},
//返回按钮操作
handleGoBack
()
{
this
.
$modal
.
confirm
(
this
.
$t
(
"
是否确认返回
"
),
this
.
$t
(
"
提示
"
))
.
then
(()
=>
{
// this.$router.go(-1);
this
.
$store
.
dispatch
(
"
tagsView/delCurrentView
"
)
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
成功
"
))
})
.
catch
(()
=>
{})
},
//重置按钮操作
handleResetMemberLevel
()
{
console
.
log
(
"
handleResetMemberLevel
"
)
this
.
$modal
.
confirm
(
this
.
$t
(
"
是否确认重置此会员等级规则表单
"
),
this
.
$t
(
"
提示
"
))
.
then
(()
=>
{
this
.
$refs
[
"
queryForm
"
].
resetFields
()
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
重置成功
"
))
})
.
catch
(()
=>
{})
},
// 加载操作日志
loadLogs
()
{
this
.
logsLoading
=
true
let
params
=
{};
params
.
page
=
1
;
params
.
rows
=
10000
;
params
.
configId
=
this
.
queryParams
.
id
;
operateLogPage
(
params
)
.
then
((
res
)
=>
{
this
.
logs
=
res
.
data
.
list
})
.
finally
(()
=>
{
this
.
logsLoading
=
false
})
},
}
}
</
script
>
<
style
>
.input-item-width
{
width
:
194px
;
}
.giftNum
.input-item-width
{
width
:
auto
;
}
.line
{
text-align
:
center
;
}
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment