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
57efa020
Commit
57efa020
authored
Oct 09, 2024
by
chenwei
2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复部分bug
parent
4445bf80
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
385 additions
and
891 deletions
+385
-891
index.vue
...cw/memberManagement/addIntegrationRuleOperation/index.vue
+2
-3
index.vue
...ws/ecw/memberManagement/exchangeRecordOperation/index.vue
+208
-424
index.vue
src/views/ecw/memberManagement/integrationRule/index.vue
+127
-336
index.vue
src/views/ecw/memberManagement/sharingDetails/index.vue
+48
-128
No files found.
src/views/ecw/memberManagement/addIntegrationRuleOperation/index.vue
View file @
57efa020
...
...
@@ -72,8 +72,8 @@
<el-form-item
:label=
"$t('提货点')"
v-if=
"queryParams.type == '1'"
prop=
"extraOrderV.receiveAddrList"
>
<el-cascader
v-if=
"cascaderState"
style=
"width: 400px"
:options=
"regionTreeList"
@
change=
"selectHandle"
@
expand-change=
"selectExpand"
collapse-tags
v-model=
"queryParams.extraOrderV.receiveAddrList"
:props=
"cascaderProps"
clearable
></el-cascader>
</el-form-item>
<el-form-item
:label=
"$t('渠道')"
v-if=
"queryParams.extraOrderV.transportType == '3'"
>
<el-select
v-model=
"queryParams.channel"
multiple
placeholder=
"请选择"
>
<el-form-item
:label=
"$t('渠道')"
v-if=
"queryParams.
type == '1' && queryParams.
extraOrderV.transportType == '3'"
>
<el-select
v-model=
"queryParams.
extraOrderV.
channel"
multiple
placeholder=
"请选择"
>
<el-option
v-for=
"item in channelList"
:key=
"item.channelId"
:label=
"isChinese ? item.nameZh : item.nameEn"
:value=
"item.channelId"
>
</el-option>
</el-select>
</el-form-item>
...
...
@@ -705,7 +705,6 @@ export default {
if
(
isNumber
(
res
.
data
.
extraRecommend
?.
shareStatus
))
{
params
.
extraRecommend
.
shareStatus
=
res
.
data
.
extraRecommend
?.
shareStatus
.
toString
()
}
console
.
log
(
params
)
params
.
dateRangeCreateTime
=
[
parseTime
(
res
.
data
.
startTime
),
parseTime
(
res
.
data
.
endTime
)]
if
(
params
.
type
==
1
&&
params
.
extraOrderV
.
receiveAddrList
[
0
].
toString
()
==
"
0,0,0
"
)
{
...
...
src/views/ecw/memberManagement/exchangeRecordOperation/index.vue
View file @
57efa020
...
...
@@ -2,17 +2,7 @@
<div
class=
"app-container"
>
<div
class=
"container"
>
<div
class=
"formBox exchangeRecordOperation"
>
<el-form
v-for=
"(item, index) in queryParamsList"
:key=
"item.memberId"
:model=
"queryParamsList[index]"
:ref=
"`queryForm$
{item.memberId}`"
size="small"
:inline="true"
:rules="rules"
:disabled="viewRecordDisable"
label-width="148px"
>
<el-form
v-for=
"(item, index) in queryParamsList"
:key=
"item.memberId"
:model=
"queryParamsList[index]"
:ref=
"`queryForm$
{item.memberId}`" size="small" :inline="true" :rules="rules" :disabled="viewRecordDisable" label-width="148px">
<el-card
class=
"box-card"
>
<div
slot=
"header"
class=
"clearfix"
>
<el-row
:gutter=
"10"
>
...
...
@@ -20,13 +10,7 @@
</el-row>
<el-row
:gutter=
"10"
>
<el-form-item
:label=
"$t('会员名称')"
>
<el-autocomplete
v-model=
"item.memberName"
:disabled=
"rewardEdit || veriftyDisable"
:fetch-suggestions=
"querySearchAsync"
:placeholder=
"$t('请输入会员名称')"
@
select=
"handleSelectMemberQuery"
></el-autocomplete>
<el-autocomplete
v-model=
"item.memberName"
:disabled=
"rewardEdit || veriftyDisable"
:fetch-suggestions=
"querySearchAsync"
:placeholder=
"$t('请输入会员名称')"
@
select=
"handleSelectMemberQuery"
></el-autocomplete>
<!--
<el-input
:placeholder=
""
clearable
...
...
@@ -35,42 +19,14 @@
/>
-->
</el-form-item>
<el-form-item
id=
"colorRedInput"
:label=
"$t('当前积分')"
>
<el-input
:placeholder=
"$t('请输入当前积分')"
clearable
:disabled=
"true"
v-model=
"item.holdScore"
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
<el-input
:placeholder=
"$t('请输入当前积分')"
clearable
:disabled=
"true"
v-model=
"item.holdScore"
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
</el-form-item>
<el-form-item
:label=
"$t('礼品选择')"
prop=
"rewardName"
id=
"colorRedInput"
>
<el-input
:placeholder=
"$t('请选择礼品')"
clearable
:disabled=
"true"
v-model=
"item.rewardName"
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
<el-form-item
:label=
"$t('礼品选择')"
prop=
"rewardName"
id=
"colorRedInput"
>
<el-input
:placeholder=
"$t('请选择礼品')"
clearable
:disabled=
"true"
v-model=
"item.rewardName"
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
</el-form-item>
<el-button
type=
"success"
size=
"small"
@
click=
"handleSelectMember"
>
{{
$t
(
"
选择
"
)
}}
</el-button
>
<el-button
type=
"success"
size=
"small"
@
click=
"handleSelectMember"
>
{{
$t
(
"
选择
"
)
}}
</el-button>
<el-form-item
:label=
"$t('礼品积分')"
id=
"colorRedInput"
>
<el-input
:placeholder=
"$t('请输入礼品积分')"
clearable
:disabled=
"true"
v-model=
"item.pointsRequire"
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
<el-input
:placeholder=
"$t('请输入礼品积分')"
clearable
:disabled=
"true"
v-model=
"item.pointsRequire"
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
</el-form-item>
<el-form-item
:label=
"$t('兑换数量')"
prop=
"rewardCount"
>
<el-input
...
...
@@ -80,30 +36,17 @@
v-model.number=
"item.rewardCount"
@
change=
"
(val) =>
{
handleRewardCount(item, index, val)
;
handleRewardCount(item, index, val)
}
"
onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
</el-form-item>
<el-form-item
:label=
"$t('本次兑换积分')"
id=
"colorRedInput"
>
<el-input
:placeholder=
"$t('请输入本次兑换积分')"
clearable
:disabled=
"true"
v-model=
"item.spendCredit"
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
<el-input
:placeholder=
"$t('请输入本次兑换积分')"
clearable
:disabled=
"true"
v-model=
"item.spendCredit"
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
</el-form-item>
<el-form-item
:label=
"$t('兑换后剩余积分')"
id=
"colorRedInput"
>
<el-input
:placeholder=
"$t('兑换后剩余积分')"
clearable
:disabled=
"true"
id=
"colorRedInput"
v-model=
"item.remainingPoints"
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
<el-input
:placeholder=
"$t('兑换后剩余积分')"
clearable
:disabled=
"true"
id=
"colorRedInput"
v-model=
"item.remainingPoints"
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
</el-form-item>
</el-row>
<el-row
:gutter=
"10"
>
...
...
@@ -112,209 +55,78 @@
</el-row>
<el-row>
<el-form-item
:label=
"$t('兑换方式')"
prop=
"redeemType"
>
<dict-selector
clearable
:disabled=
"veriftyDisable"
:type=
"DICT_TYPE.WAY_OF_RECEIVING"
v-model=
"item.redeemType"
>
</dict-selector>
<dict-selector
clearable
:disabled=
"veriftyDisable"
:type=
"DICT_TYPE.WAY_OF_RECEIVING"
v-model=
"item.redeemType"
>
</dict-selector>
</el-form-item>
<el-form-item
:label=
"$t('兑换入口')"
>
<dict-selector
clearable
:disabled=
"true"
v-model=
"item.entrance"
:type=
"DICT_TYPE.PLATFORM_TYPE"
>
</dict-selector>
<dict-selector
clearable
:disabled=
"true"
v-model=
"item.entrance"
:type=
"DICT_TYPE.PLATFORM_TYPE"
>
</dict-selector>
</el-form-item>
<el-form-item
class=
"expenses"
:label=
"$t('费用')"
>
<el-row
:gutter=
"10"
>
<el-row>
<el-col
:span=
"12"
>
<el-form-item
prop=
"expenses"
>
<el-input
v-model=
"item.expenses"
:disabled=
"veriftyDisable"
:placeholder=
"$t('请输入数字')"
clearable
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
<el-input
v-model=
"item.expenses"
:disabled=
"veriftyDisable"
:placeholder=
"$t('请输入数字')"
clearable
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
</el-form-item>
</el-col>
<el-col
:span=
"1
0
"
>
<el-col
:span=
"1
2
"
>
<el-form-item
prop=
"currency"
>
<el-select
v-model=
"item.currency"
:disabled=
"veriftyDisable"
clearable
:placeholder=
"$t('请选择币种')"
>
<el-option
v-for=
"nodeItem in currencyList"
:key=
"nodeItem.id"
:label=
"
isChinese ? nodeItem.titleZh : nodeItem.titleEn
"
:value=
"nodeItem.id"
/>
<el-select
v-model=
"item.currency"
:disabled=
"veriftyDisable"
clearable
:placeholder=
"$t('请选择币种')"
>
<el-option
v-for=
"nodeItem in currencyList"
:key=
"nodeItem.id"
:label=
"isChinese ? nodeItem.titleZh : nodeItem.titleEn"
:value=
"nodeItem.id"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form-item>
<el-form-item
:label=
"$t('收件人姓名')"
><el-input
:placeholder=
"$t('请输入收件人姓名')"
clearable
v-model=
"item.recipientName"
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
</el-form-item>
<el-form-item
:label=
"$t('收件人姓名')"
><el-input
:placeholder=
"$t('请输入收件人姓名')"
clearable
v-model=
"item.recipientName"
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
</el-form-item>
<el-form-item
:label=
"$t('收件人电话')"
>
<el-input
:placeholder=
"$t('请输入收件人电话')"
clearable
v-model=
"item.recipientPhoneNum"
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
<el-input
:placeholder=
"$t('请输入收件人电话')"
clearable
v-model=
"item.recipientPhoneNum"
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
</el-form-item>
<el-form-item
:label=
"$t('收件人地址')"
v-if=
"item.redeemType != '1'"
>
<el-input
:placeholder=
"$t('请输入收件人地址')"
clearable
v-model=
"item.recipientAddress"
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
<el-form-item
:label=
"$t('收件人地址')"
v-if=
"item.redeemType != '1'"
>
<el-input
:placeholder=
"$t('请输入收件人地址')"
clearable
v-model=
"item.recipientAddress"
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
</el-form-item>
<el-form-item
:label=
"$t('兑换人')"
>
<el-input
:placeholder=
"$t('请输入兑换人')"
clearable
v-model=
"item.redeemer"
:disabled=
"veriftyDisable"
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
<el-input
:placeholder=
"$t('请输入兑换人')"
clearable
v-model=
"item.redeemer"
:disabled=
"veriftyDisable"
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
</el-form-item>
<el-form-item
:label=
"$t('兑换时间')"
>
<el-date-picker
type=
"date"
placement=
"bottom-start"
:disabled=
"veriftyDisable"
value-format=
"yyyy-MM-dd HH:mm:ss"
:placeholder=
"$t('选择兑换时间')"
v-model=
"item.redemptionTime"
></el-date-picker>
<el-date-picker
type=
"date"
placement=
"bottom-start"
:disabled=
"veriftyDisable"
value-format=
"yyyy-MM-dd HH:mm:ss"
:placeholder=
"$t('选择兑换时间')"
v-model=
"item.redemptionTime"
></el-date-picker>
</el-form-item>
<el-form-item
:label=
"$t('快递公司')"
v-if=
"item.redeemType != '1'"
>
<el-select
v-model=
"item.courierCompany"
:placeholder=
"$t('请选择快递公司')"
>
<el-option
v-for=
"nodeItem in expressList"
:key=
"nodeItem.id"
:label=
"nodeItem.companyName"
:value=
"nodeItem.id"
/>
<el-form-item
:label=
"$t('快递公司')"
v-if=
"item.redeemType != '1'"
>
<el-select
v-model=
"item.courierCompany"
:placeholder=
"$t('请选择快递公司')"
>
<el-option
v-for=
"nodeItem in expressList"
:key=
"nodeItem.id"
:label=
"nodeItem.companyName"
:value=
"nodeItem.id"
/>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('快递单号')"
v-if=
"item.redeemType != '1'"
>
<el-input
:placeholder=
"$t('请输入快递单号')"
clearable
v-model=
"item.expressNo"
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
<el-form-item
:label=
"$t('快递单号')"
v-if=
"item.redeemType != '1'"
>
<el-input
:placeholder=
"$t('请输入快递单号')"
clearable
v-model=
"item.expressNo"
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
</el-form-item>
<el-form-item
:label=
"$t('快递日期')"
v-if=
"item.redeemType != '1'"
>
<el-date-picker
type=
"date"
:placeholder=
"$t('选择快递日期')"
v-model=
"item.expressDate"
value-format=
"yyyy-MM-dd HH:mm:ss"
placement=
"bottom-start"
></el-date-picker>
<el-form-item
:label=
"$t('快递日期')"
v-if=
"item.redeemType != '1'"
>
<el-date-picker
type=
"date"
:placeholder=
"$t('选择快递日期')"
v-model=
"item.expressDate"
value-format=
"yyyy-MM-dd HH:mm:ss"
placement=
"bottom-start"
></el-date-picker>
</el-form-item>
<el-form-item
:label=
"$t('快递寄出人')"
>
<el-input
:placeholder=
"$t('请输入快递寄出人')"
clearable
v-model=
"item.expressSender"
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
<el-input
:placeholder=
"$t('请输入快递寄出人')"
clearable
v-model=
"item.expressSender"
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
</el-form-item>
<el-form-item
:label=
"$t('上传附件')"
>
<file-upload
v-model=
"item.annex"
:disabled=
"veriftyDisable || viewRecordDisable"
></file-upload>
<file-upload
v-model=
"item.annex"
:disabled=
"veriftyDisable || viewRecordDisable"
></file-upload>
</el-form-item>
<el-form-item
:label=
"$t('备注')"
>
<el-input
style=
"width: 500px"
:disabled=
"veriftyDisable"
type=
"textarea"
v-model=
"item.remark"
></el-input>
<el-input
style=
"width: 500px"
:disabled=
"veriftyDisable"
type=
"textarea"
v-model=
"item.remark"
></el-input>
</el-form-item>
<div
class=
"view"
v-if=
"viewRecordDisable || veriftyDisable"
>
<el-form-item
:label=
"$t('核销人')"
>
<el-input
v-model=
"item.verifyUser"
></el-input>
</el-form-item>
<el-form-item
:label=
"$t('核销时间')"
>
<el-date-picker
type=
"date"
:placeholder=
"$t('选择核销时间')"
v-model=
"item.verifyTime"
value-format=
"yyyy-MM-dd HH:mm:ss"
placement=
"bottom-start"
></el-date-picker>
<el-date-picker
type=
"date"
:placeholder=
"$t('选择核销时间')"
v-model=
"item.verifyTime"
value-format=
"yyyy-MM-dd HH:mm:ss"
placement=
"bottom-start"
></el-date-picker>
</el-form-item>
<el-form-item
:label=
"$t('创建人')"
v-if=
"!veriftyDisable"
>
<el-input
v-model=
"item.creatorName"
></el-input>
</el-form-item>
<el-form-item
:label=
"$t('创建时间')"
v-if=
"!veriftyDisable"
>
<el-date-picker
type=
"date"
:placeholder=
"$t('创建时间')"
v-model=
"item.createTime"
value-format=
"yyyy-MM-dd HH:mm:ss"
placement=
"bottom-start"
></el-date-picker>
<el-form-item
:label=
"$t('创建时间')"
v-if=
"!veriftyDisable"
>
<el-date-picker
type=
"date"
:placeholder=
"$t('创建时间')"
v-model=
"item.createTime"
value-format=
"yyyy-MM-dd HH:mm:ss"
placement=
"bottom-start"
></el-date-picker>
</el-form-item>
<el-form-item
:label=
"$t('最后更新人')"
v-if=
"!veriftyDisable"
>
<el-form-item
:label=
"$t('最后更新人')"
v-if=
"!veriftyDisable"
>
<el-input
v-model=
"item.updater"
></el-input>
</el-form-item>
<el-form-item
:label=
"$t('最后更新时间')"
v-if=
"!veriftyDisable"
>
<el-date-picker
type=
"date"
:placeholder=
"$t('最后更新时间')"
v-model=
"item.updateTime"
value-format=
"yyyy-MM-dd HH:mm:ss"
placement=
"bottom-start"
></el-date-picker>
<el-form-item
:label=
"$t('最后更新时间')"
v-if=
"!veriftyDisable"
>
<el-date-picker
type=
"date"
:placeholder=
"$t('最后更新时间')"
v-model=
"item.updateTime"
value-format=
"yyyy-MM-dd HH:mm:ss"
placement=
"bottom-start"
></el-date-picker>
</el-form-item>
</div>
</el-row>
...
...
@@ -326,12 +138,7 @@
<el-row
justify=
"end"
:gutter=
"20"
type=
"flex"
class=
"handleButton"
>
<el-col
:span=
"3"
>
<el-button
type=
"primary"
@
click=
"handleBulkConversion"
v-if=
"!viewRecordDisable"
>
{{
submitButtonText
}}
</el-button
>
<el-button
type=
"primary"
@
click=
"handleBulkConversion"
v-if=
"!viewRecordDisable"
>
{{
submitButtonText
}}
</el-button>
</el-col>
<el-col
:span=
"3"
>
<el-button
@
click=
"handleBack"
>
{{
$t
(
"
返回
"
)
}}
</el-button>
...
...
@@ -339,58 +146,48 @@
</el-row>
</div>
<choose-Gift
:dialogVisible.sync=
"dialogVisible"
@
transferSelectRewards=
"onGetSelectRewardsInfo"
>
</choose-Gift>
<choose-Gift
:dialogVisible.sync=
"dialogVisible"
@
transferSelectRewards=
"onGetSelectRewardsInfo"
>
</choose-Gift>
</div>
</
template
>
<
script
>
import
{
bulkConversion
}
from
"
@/api/ecw/giftManagement
"
;
import
FileUpload
from
"
@/components/FileUpload
"
;
import
chooseGift
from
"
./components/chooseGift.vue
"
;
import
{
getExpressPage
}
from
"
@/api/ecw/express
"
;
import
{
getCurrencyList
}
from
"
@/api/ecw/currency
"
;
import
{
getNowDateTime
,
parseTime
}
from
"
@/utils/ruoyi
"
;
import
{
getMemberList
}
from
"
@/api/ecw/giftManagement
"
;
import
{
getRewardDetailQuery
,
updatedRewardsDetails
,
verifyRedeem
,
}
from
"
@/api/ecw/memberManagement
"
;
import
{
memberUserGet
}
from
"
@/api/member/user
"
;
import
{
getDictDatas
,
DICT_TYPE
}
from
"
@/utils/dict
"
;
import
{
bulkConversion
}
from
"
@/api/ecw/giftManagement
"
import
FileUpload
from
"
@/components/FileUpload
"
import
chooseGift
from
"
./components/chooseGift.vue
"
import
{
getExpressPage
}
from
"
@/api/ecw/express
"
import
{
getCurrencyList
}
from
"
@/api/ecw/currency
"
import
{
getNowDateTime
,
parseTime
}
from
"
@/utils/ruoyi
"
import
{
getMemberList
}
from
"
@/api/ecw/giftManagement
"
import
{
getRewardDetailQuery
,
updatedRewardsDetails
,
verifyRedeem
}
from
"
@/api/ecw/memberManagement
"
import
{
memberUserGet
}
from
"
@/api/member/user
"
import
{
getDictDatas
,
DICT_TYPE
}
from
"
@/utils/dict
"
export
default
{
name
:
"
exchangeRecordOperation
"
,
components
:
{
chooseGift
,
FileUpload
,
FileUpload
},
data
()
{
var
validatePass2
=
(
rule
,
value
,
callback
)
=>
{
if
(
!
this
.
quantityComputation
)
{
return
callback
(
new
Error
(
this
.
$t
(
"
兑换积分大于当前总积分,请重新输入兑换数量
"
))
);
return
callback
(
new
Error
(
this
.
$t
(
"
兑换积分大于当前总积分,请重新输入兑换数量
"
)))
}
else
{
return
callback
()
;
return
callback
()
}
}
;
}
var
expensesCurrency
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
queryParamsList
[
0
].
expenses
&&
!
value
)
{
return
callback
(
new
Error
(
this
.
$t
(
"
请选择币种
"
)))
;
return
callback
(
new
Error
(
this
.
$t
(
"
请选择币种
"
)))
}
else
{
return
callback
()
;
return
callback
()
}
}
;
}
var
expensesValidate
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
queryParamsList
[
0
].
currency
&&
!
value
)
{
return
callback
(
new
Error
(
this
.
$t
(
"
请输入
"
)))
;
return
callback
(
new
Error
(
this
.
$t
(
"
请输入
"
)))
}
else
{
return
callback
()
;
return
callback
()
}
}
;
}
return
{
env
:
process
.
env
.
NODE_ENV
,
// 是否显示弹出层
...
...
@@ -422,8 +219,8 @@ export default {
remark
:
null
,
annex
:
null
,
memberName
:
null
,
rewardName
:
null
,
}
,
rewardName
:
null
}
],
// 网点
nodeList
:
[],
...
...
@@ -441,19 +238,19 @@ export default {
{
required
:
true
,
message
:
this
.
$t
(
"
请输入兑换数量
"
),
trigger
:
"
blur
"
,
trigger
:
"
blur
"
},
{
validator
:
validatePass2
,
trigger
:
[
"
blur
"
,
"
change
"
]
,
}
,
trigger
:
[
"
blur
"
,
"
change
"
]
}
],
rewardName
:
[
{
required
:
true
,
message
:
this
.
$t
(
"
请选择礼品
"
),
trigger
:
"
blur
"
,
}
,
trigger
:
"
blur
"
}
],
expenses
:
[
// {
...
...
@@ -464,83 +261,83 @@ export default {
{
pattern
:
/^
\d
+
(\.\d{1,2})?
$/
,
message
:
this
.
$t
(
"
请输入整数或保留小数点后两位
"
),
trigger
:
"
blur
"
,
trigger
:
"
blur
"
},
{
validator
:
expensesValidate
,
trigger
:
"
change
"
,
}
,
trigger
:
"
change
"
}
],
currency
:
[
{
// required: true,
// message: this.$t("请选择币种"),
validator
:
expensesCurrency
,
trigger
:
"
change
"
,
}
,
trigger
:
"
change
"
}
],
redeemType
:
[
{
required
:
true
,
message
:
this
.
$t
(
"
请选择兑换方式
"
),
trigger
:
"
change
"
,
}
,
trigger
:
"
change
"
}
],
recipientName
:
[
{
required
:
true
,
message
:
this
.
$t
(
"
请输入收件人姓名
"
),
trigger
:
"
blur
"
,
}
,
trigger
:
"
blur
"
}
],
recipientPhoneNum
:
[
{
required
:
true
,
message
:
this
.
$t
(
"
请输入收件人电话
"
),
trigger
:
"
blur
"
,
}
,
trigger
:
"
blur
"
}
],
recipientAddress
:
[
{
required
:
true
,
message
:
this
.
$t
(
"
请输入收件人地址
"
),
trigger
:
"
blur
"
,
}
,
]
,
}
,
}
;
trigger
:
"
blur
"
}
]
}
}
},
computed
:
{
isChinese
()
{
return
this
.
$i18n
.
locale
===
"
zh_CN
"
;
}
,
return
this
.
$i18n
.
locale
===
"
zh_CN
"
}
},
created
()
{
this
.
getExpressList
()
;
this
.
currencyListAPI
()
;
this
.
getExpressList
()
this
.
currencyListAPI
()
switch
(
this
.
$route
.
query
.
pageStatus
)
{
case
"
edit
"
:
this
.
submitButtonText
=
this
.
$t
(
"
保存
"
)
;
this
.
getExchangeDetail
()
;
break
;
this
.
submitButtonText
=
this
.
$t
(
"
保存
"
)
this
.
getExchangeDetail
()
break
case
"
view
"
:
this
.
viewRecordDisable
=
true
;
this
.
getExchangeDetail
()
;
break
;
this
.
viewRecordDisable
=
true
this
.
getExchangeDetail
()
break
case
"
verify
"
:
this
.
veriftyDisable
=
true
;
this
.
submitButtonText
=
this
.
$t
(
"
确认核销
"
)
;
this
.
getExchangeDetail
()
;
break
;
this
.
veriftyDisable
=
true
this
.
submitButtonText
=
this
.
$t
(
"
确认核销
"
)
this
.
getExchangeDetail
()
break
case
"
add
"
:
this
.
submitButtonText
=
this
.
$t
(
"
确认兑换
"
)
;
this
.
getDetails
()
;
break
;
this
.
submitButtonText
=
this
.
$t
(
"
确认兑换
"
)
this
.
getDetails
()
break
default
:
this
.
submitButtonText
=
this
.
$t
(
"
确认兑换
"
)
;
break
;
this
.
submitButtonText
=
this
.
$t
(
"
确认兑换
"
)
break
}
},
...
...
@@ -550,71 +347,60 @@ export default {
memberUserGet
({
id
:
this
.
$route
.
query
.
memberId
}).
then
((
r
)
=>
{
// this.details = r.data;
this
.
isChinese
?
(
this
.
queryParamsList
[
0
].
memberName
=
r
.
data
.
nickname
)
:
(
this
.
queryParamsList
[
0
].
memberName
=
r
.
data
.
englishName
);
this
.
queryParamsList
[
0
].
holdScore
=
r
.
data
.
userScoreLevelInfo
.
holdScore
;
this
.
queryParamsList
[
0
].
memberId
=
r
.
data
.
id
;
});
this
.
isChinese
?
(
this
.
queryParamsList
[
0
].
memberName
=
r
.
data
.
nickname
)
:
(
this
.
queryParamsList
[
0
].
memberName
=
r
.
data
.
englishName
)
this
.
queryParamsList
[
0
].
holdScore
=
r
.
data
.
userScoreLevelInfo
.
holdScore
this
.
queryParamsList
[
0
].
memberId
=
r
.
data
.
id
})
},
getExchangeDetail
()
{
this
.
queryParamsList
=
[]
;
this
.
queryParamsList
=
[]
this
.
$nextTick
(()
=>
{
let
params
=
{
id
:
this
.
$route
.
query
.
exchangeRewardID
,
}
;
id
:
this
.
$route
.
query
.
exchangeRewardID
}
getRewardDetailQuery
(
params
).
then
((
res
)
=>
{
this
.
rewardEdit
=
true
;
const
data
=
res
.
data
;
let
params
=
this
.
queryParamsList
[
0
]
;
this
.
queryParamsList
=
[{
...
data
,
params
}]
;
this
.
rewardEdit
=
true
const
data
=
res
.
data
let
params
=
this
.
queryParamsList
[
0
]
this
.
queryParamsList
=
[{
...
data
,
params
}]
if
(
this
.
isChinese
)
{
this
.
queryParamsList
[
0
].
memberName
=
data
.
memberNameZh
;
this
.
queryParamsList
[
0
].
rewardName
=
data
.
rewardTitleZh
;
this
.
queryParamsList
[
0
].
memberName
=
data
.
memberNameZh
this
.
queryParamsList
[
0
].
rewardName
=
data
.
rewardTitleZh
}
else
{
this
.
queryParamsList
[
0
].
memberName
=
data
.
memberNameEn
;
this
.
queryParamsList
[
0
].
rewardName
=
data
.
rewardTitleEn
;
this
.
queryParamsList
[
0
].
memberName
=
data
.
memberNameEn
this
.
queryParamsList
[
0
].
rewardName
=
data
.
rewardTitleEn
}
this
.
queryParamsList
[
0
].
redemptionTime
=
parseTime
(
data
.
redemptionTime
);
//兑换时间
this
.
queryParamsList
[
0
].
redemptionTime
=
parseTime
(
data
.
redemptionTime
)
//兑换时间
this
.
queryParamsList
[
0
].
verifyUser
=
this
.
$store
.
getters
.
name
;
this
.
queryParamsList
[
0
].
verifyUser
=
this
.
$store
.
getters
.
name
this
.
queryParamsList
[
0
].
verifyTime
=
parseTime
(
data
.
verifyTime
)
;
this
.
queryParamsList
[
0
].
updateTime
=
parseTime
(
data
.
updateTime
)
;
this
.
queryParamsList
[
0
].
createTime
=
parseTime
(
data
.
createTime
)
;
this
.
queryParamsList
[
0
].
expressDate
=
parseTime
(
data
.
expressDate
)
;
//快递时间
this
.
handleRewardCount
(
data
,
0
,
data
.
rewardCount
)
;
this
.
queryParamsList
[
0
].
verifyTime
=
parseTime
(
data
.
verifyTime
)
this
.
queryParamsList
[
0
].
updateTime
=
parseTime
(
data
.
updateTime
)
this
.
queryParamsList
[
0
].
createTime
=
parseTime
(
data
.
createTime
)
this
.
queryParamsList
[
0
].
expressDate
=
parseTime
(
data
.
expressDate
)
//快递时间
this
.
handleRewardCount
(
data
,
0
,
data
.
rewardCount
)
if
(
this
.
$route
.
query
.
pageStatus
==
"
verify
"
)
{
this
.
queryParamsList
[
0
].
verifyTime
=
getNowDateTime
()
;
this
.
queryParamsList
[
0
].
verifyTime
=
getNowDateTime
()
}
this
.
$forceUpdate
()
;
})
;
})
;
this
.
$forceUpdate
()
})
})
},
handleSelectMemberQuery
(
item
)
{
this
.
isChinese
?
(
this
.
queryParamsList
[
0
].
memberName
=
item
.
memberNameZh
)
:
(
this
.
queryParamsList
[
0
].
memberName
=
item
.
englishName
);
this
.
queryParamsList
[
0
].
holdScore
=
item
.
holdScore
;
this
.
queryParamsList
[
0
].
memberId
=
item
.
id
;
this
.
isChinese
?
(
this
.
queryParamsList
[
0
].
memberName
=
item
.
memberNameZh
)
:
(
this
.
queryParamsList
[
0
].
memberName
=
item
.
englishName
)
this
.
queryParamsList
[
0
].
holdScore
=
item
.
holdScore
this
.
queryParamsList
[
0
].
memberId
=
item
.
id
this
.
queryParamsList
[
0
].
spendCredit
=
this
.
queryParamsList
[
0
].
pointsRequire
*
this
.
queryParamsList
[
0
].
rewardCount
;
this
.
queryParamsList
[
0
].
spendCredit
=
this
.
queryParamsList
[
0
].
pointsRequire
*
this
.
queryParamsList
[
0
].
rewardCount
this
.
queryParamsList
[
0
].
remainingPoints
=
this
.
queryParamsList
[
0
].
holdScore
-
this
.
queryParamsList
[
0
].
spendCredit
;
this
.
quantityComputation
=
this
.
queryParamsList
[
0
].
remainingPoints
>=
0
?
true
:
false
;
this
.
queryParamsList
[
0
].
remainingPoints
=
this
.
queryParamsList
[
0
].
holdScore
-
this
.
queryParamsList
[
0
].
spendCredit
this
.
quantityComputation
=
this
.
queryParamsList
[
0
].
remainingPoints
>=
0
?
true
:
false
},
querySearchAsync
(
queryString
,
cb
)
{
let
result
=
[]
;
let
result
=
[]
if
(
queryString
==
""
)
{
cb
(
result
)
;
cb
(
result
)
}
else
{
try
{
let
params
=
{
...
...
@@ -628,90 +414,84 @@ export default {
pageSize
:
20
,
startTime
:
""
,
usedScore
:
null
,
usedScoreOperate
:
null
,
}
;
usedScoreOperate
:
null
}
getMemberList
(
params
).
then
((
res
)
=>
{
result
=
res
.
data
.
list
.
map
((
item
)
=>
{
if
(
this
.
isChinese
)
{
return
{
...
item
,
value
:
`
${
item
.
memberNameZh
}
(
${
item
.
mobile
}
)`
,
}
;
value
:
`
${
item
.
memberNameZh
}
(
${
item
.
mobile
}
)`
}
}
else
{
return
{
...
item
,
value
:
`
${
item
.
memberNameEn
}
(
${
item
.
mobile
}
)`
,
}
;
value
:
`
${
item
.
memberNameEn
}
(
${
item
.
mobile
}
)`
}
}
})
;
cb
(
result
)
;
})
;
})
cb
(
result
)
})
}
catch
{
this
.
$message
.
success
(
this
.
$t
(
"
获取数据失败
"
))
;
this
.
$message
.
success
(
this
.
$t
(
"
获取数据失败
"
))
}
}
},
handleRewardCount
(
item
,
index
,
value
)
{
this
.
queryParamsList
[
index
].
spendCredit
=
this
.
queryParamsList
[
index
].
pointsRequire
*
value
;
this
.
queryParamsList
[
index
].
remainingPoints
=
this
.
queryParamsList
[
index
].
holdScore
-
this
.
queryParamsList
[
index
].
spendCredit
;
this
.
quantityComputation
=
this
.
queryParamsList
[
index
].
remainingPoints
>=
0
?
true
:
false
;
this
.
queryParamsList
[
index
].
spendCredit
=
this
.
queryParamsList
[
index
].
pointsRequire
*
value
this
.
queryParamsList
[
index
].
remainingPoints
=
this
.
queryParamsList
[
index
].
holdScore
-
this
.
queryParamsList
[
index
].
spendCredit
this
.
quantityComputation
=
this
.
queryParamsList
[
index
].
remainingPoints
>=
0
?
true
:
false
},
currencyListAPI
()
{
getCurrencyList
().
then
((
res
)
=>
{
this
.
currencyList
=
res
.
data
;
})
;
this
.
currencyList
=
res
.
data
})
},
onGetSelectRewardsInfo
(
item
)
{
this
.
queryParamsList
[
0
].
rewardId
=
item
.
id
;
this
.
queryParamsList
[
0
].
rewardId
=
item
.
id
this
.
queryParamsList
[
0
].
redeemType
=
item
.
pickMethod
.
split
(
"
,
"
)[
0
]
if
(
this
.
isChinese
)
{
this
.
queryParamsList
[
0
].
rewardName
=
item
.
titleZh
;
this
.
queryParamsList
[
0
].
rewardName
=
item
.
titleZh
}
else
{
this
.
queryParamsList
[
0
].
rewardName
=
item
.
titleEn
;
this
.
queryParamsList
[
0
].
rewardName
=
item
.
titleEn
}
this
.
queryParamsList
[
0
].
pointsRequire
=
item
.
pointsRequire
;
this
.
queryParamsList
[
0
].
pointsRequire
=
item
.
pointsRequire
this
.
queryParamsList
[
0
].
rewardCount
=
"
1
"
;
this
.
queryParamsList
[
0
].
spendCredit
=
""
;
this
.
queryParamsList
[
0
].
remainingPoints
=
this
.
queryParamsList
[
0
].
holdScore
;
this
.
quantityComputation
=
this
.
queryParamsList
[
0
].
remainingPoints
>=
0
?
true
:
false
;
this
.
queryParamsList
[
0
].
rewardCount
=
"
1
"
this
.
queryParamsList
[
0
].
spendCredit
=
""
this
.
queryParamsList
[
0
].
remainingPoints
=
this
.
queryParamsList
[
0
].
holdScore
this
.
quantityComputation
=
this
.
queryParamsList
[
0
].
remainingPoints
>=
0
?
true
:
false
// if (this.queryParamsList[0].holdScore) {
this
.
handleRewardCount
({},
0
,
1
)
;
this
.
handleRewardCount
({},
0
,
1
)
// }
},
handleSelectMember
()
{
this
.
dialogVisible
=
true
;
this
.
dialogVisible
=
true
},
getExpressList
()
{
let
params
=
{
pageNo
:
1
,
pageSize
:
1000
,
}
;
pageSize
:
1000
}
getExpressPage
(
params
).
then
((
res
)
=>
{
this
.
expressList
=
res
.
data
.
list
;
})
;
this
.
expressList
=
res
.
data
.
list
})
},
handleBack
()
{
this
.
$store
.
dispatch
(
"
tagsView/delCurrentView
"
)
;
this
.
$store
.
dispatch
(
"
tagsView/delCurrentView
"
)
},
checkForm
(
formName
)
{
const
result
=
new
Promise
((
resolve
,
reject
)
=>
{
this
.
$refs
[
formName
][
0
].
validate
((
valid
)
=>
{
if
(
valid
)
{
resolve
()
;
resolve
()
}
else
{
reject
()
;
reject
()
}
})
;
})
;
this
.
checkFormResult
.
push
(
result
)
;
})
})
this
.
checkFormResult
.
push
(
result
)
},
resetForm
()
{
this
.
queryParamsList
=
[
...
...
@@ -739,61 +519,55 @@ export default {
remark
:
null
,
annex
:
null
,
memberName
:
null
,
rewardName
:
null
,
}
,
]
;
rewardName
:
null
}
]
},
handleBulkConversion
()
{
this
.
queryParamsList
.
forEach
((
element
)
=>
{
this
.
checkForm
(
`queryForm
${
element
.
memberId
}
`
)
;
})
;
this
.
checkForm
(
`queryForm
${
element
.
memberId
}
`
)
})
Promise
.
all
(
this
.
checkFormResult
)
.
then
((
res
)
=>
{
this
.
checkFormResult
=
[]
;
this
.
checkFormResult
=
[]
let
params
=
this
.
queryParamsList
.
map
((
item
)
=>
{
if
(
item
.
redeemType
==
"
1
"
)
{
let
{
recipientAddress
,
expressNo
,
expressDate
,
courierCompany
,
...
itemNew
}
=
item
;
return
itemNew
;
let
{
recipientAddress
,
expressNo
,
expressDate
,
courierCompany
,
...
itemNew
}
=
item
return
itemNew
}
else
{
return
item
;
return
item
}
})
;
})
if
(
this
.
$route
.
query
.
pageStatus
==
"
edit
"
)
{
updatedRewardsDetails
(
params
[
0
]).
then
((
res
)
=>
{
this
.
$message
.
success
(
this
.
$t
(
"
更新成功
"
))
;
this
.
$router
.
go
(
-
1
)
;
})
;
this
.
$message
.
success
(
this
.
$t
(
"
更新成功
"
))
this
.
$router
.
go
(
-
1
)
})
//编辑
}
else
if
(
this
.
$route
.
query
.
pageStatus
==
"
verify
"
)
{
verifyRedeem
(
params
[
0
]).
then
((
res
)
=>
{
this
.
$message
.
success
(
this
.
$t
(
"
核销成功
"
))
;
this
.
$router
.
go
(
-
1
)
;
})
;
this
.
$message
.
success
(
this
.
$t
(
"
核销成功
"
))
this
.
$router
.
go
(
-
1
)
})
}
else
{
//兑换
bulkConversion
(
params
).
then
((
res
)
=>
{
if
(
res
.
code
==
"
0
"
)
{
this
.
queryParamsList
=
this
.
resetForm
()
;
this
.
$message
.
success
(
this
.
$t
(
"
兑换成功
"
))
;
this
.
$router
.
go
(
-
1
)
;
this
.
queryParamsList
=
this
.
resetForm
()
this
.
$message
.
success
(
this
.
$t
(
"
兑换成功
"
))
this
.
$router
.
go
(
-
1
)
}
})
;
})
}
})
.
catch
(()
=>
{
this
.
checkFormResult
=
[]
;
this
.
$message
.
error
(
this
.
$t
(
"
请填写必要的信息
"
))
;
})
;
}
,
}
,
}
;
this
.
checkFormResult
=
[]
this
.
$message
.
error
(
this
.
$t
(
"
请填写必要的信息
"
))
})
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
::v-deep
#colorRedInput
.el-input__inner
{
...
...
@@ -806,6 +580,16 @@ export default {
width
:
286px
;
}
.expenses
{
width
:
434px
;
.el-form-item
{
margin-right
:
0
;
}
.el-row
{
width
:
286px
;
}
.el-input
{
width
:
140px
;
}
.el-form-item--small.el-form-item
{
margin-bottom
:
0
;
}
...
...
src/views/ecw/memberManagement/integrationRule/index.vue
View file @
57efa020
<
template
>
<div
class=
"app-container"
>
<el-form
v-show=
"showSearch"
ref=
"queryForm"
:model=
"queryParams"
size=
"small"
:inline=
"true"
label-width=
"68px"
>
<el-form
v-show=
"showSearch"
ref=
"queryForm"
:model=
"queryParams"
size=
"small"
:inline=
"true"
label-width=
"68px"
>
<el-form-item
:label=
"$t('指标类型')"
>
<dict-selector
v-model=
"queryParams.type"
clearable
:type=
"DICT_TYPE.SCORE_RULE_TYPE"
@
change=
"handleQuery"
/>
<dict-selector
v-model=
"queryParams.type"
clearable
:type=
"DICT_TYPE.SCORE_RULE_TYPE"
@
change=
"handleQuery"
/>
</el-form-item>
<el-form-item
:label=
"$t('标题:')"
>
<el-input
v-model=
"queryParams.title"
v-trim
style=
"width: 300px"
:placeholder=
"$t('请输入查找')"
clearable
@
keyup.enter.native=
"handleQuery"
/>
<el-input
v-model=
"queryParams.title"
v-trim
:placeholder=
"$t('请输入查找')"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
:label=
"$t('规则说明')"
>
<el-input
v-model=
"queryParams.desc"
style=
"width: 300px"
:placeholder=
"$t('请输入关键词查找')"
clearable
v-trim
@
keyup.enter.native=
"handleQuery"
/>
<el-input
v-model=
"queryParams.desc"
:placeholder=
"$t('请输入关键词查找')"
clearable
v-trim
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
:label=
"$t('状态')"
>
<dict-selector
v-model=
"queryParams.status"
clearable
:type=
"DICT_TYPE.GIFT_STATUS"
/>
<dict-selector
v-model=
"queryParams.status"
clearable
:type=
"DICT_TYPE.GIFT_STATUS"
/>
</el-form-item>
<el-form-item
:label=
"$t('单次积分')"
>
<el-row
:gutter=
"10"
style=
"width: 300px"
>
<el-col
:span=
"10"
>
<dict-selector
v-model=
"queryParams.getScoreOnceSymbol"
clearable
:type=
"DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL"
@
change=
"handleQuery"
/>
<dict-selector
v-model=
"queryParams.getScoreOnceSymbol"
clearable
:type=
"DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL"
@
change=
"handleQuery"
/>
</el-col>
<el-col
:span=
"14"
>
<el-input
v-model.trim=
"queryParams.getScoreOnce"
:placeholder=
"$t('请输入数字')"
clearable
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@
keyup.enter.native=
"handleQuery"
/>
<el-input
v-model.trim=
"queryParams.getScoreOnce"
: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-row
:gutter=
"10"
style=
"width: 300px"
>
<el-col
:span=
"10"
>
<dict-selector
v-model=
"queryParams.maxScoreTotalSymbol"
clearable
:type=
"DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL"
@
change=
"handleQuery"
/>
<dict-selector
v-model=
"queryParams.maxScoreTotalSymbol"
clearable
:type=
"DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL"
@
change=
"handleQuery"
/>
</el-col>
<el-col
:span=
"14"
>
<el-input
v-model.trim=
"queryParams.maxScoreTotal"
:placeholder=
"$t('请输入数字')"
clearable
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@
keyup.enter.native=
"handleQuery"
/>
<el-input
v-model.trim=
"queryParams.maxScoreTotal"
: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"
type=
"datetimerange"
clearable
placement=
"bottom-start"
style=
"width: 240px"
value-format=
"yyyy-MM-dd HH:mm:ss"
range-separator=
"-"
:start-placeholder=
"$t('开始日期')"
:end-placeholder=
"$t('结束日期')"
/>
<el-date-picker
v-model=
"dateRangeCreateTime"
type=
"datetimerange"
clearable
placement=
"bottom-start"
style=
"width: 240px"
value-format=
"yyyy-MM-dd HH:mm:ss"
range-separator=
"-"
:start-placeholder=
"$t('开始日期')"
:end-placeholder=
"$t('结束日期')"
/>
</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-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-plus"
@
click=
"handleNewScoreRule"
>
{{
$t
(
"
添加规则
"
)
}}
</el-button>
<right-toolbar
:show-search.sync=
"showSearch"
@
queryTable=
"handleQueryPagination"
/>
<el-tooltip
v-hasPermi=
"['ecw:memberManagement:enableMemberPointsSystem']"
:content=
"`$
{$t('开启会员积分系统')} : ${switchState} `"
placement="top"
class="switchBtn"
>
<el-switch
v-model=
"switchState"
:active-value=
"true"
:inactive-text=
"$t('开启会员积分系统')"
:inactive-value=
"false"
@
change=
"openSwitch($event)"
/>
<right-toolbar
:show-search.sync=
"showSearch"
@
queryTable=
"handleQueryPagination"
/>
<el-tooltip
v-hasPermi=
"['ecw:memberManagement:enableMemberPointsSystem']"
:content=
"`$
{$t('开启会员积分系统')} : ${switchState} `" placement="top" class="switchBtn">
<el-switch
v-model=
"switchState"
:active-value=
"true"
:inactive-text=
"$t('开启会员积分系统')"
:inactive-value=
"false"
@
change=
"openSwitch($event)"
/>
</el-tooltip>
</el-row>
<el-table
ref=
"multipleTable"
v-loading=
"loading"
:data=
"integrationRuleList"
>
<el-table-column
:label=
"$t('编号')"
align=
"center"
>
<el-table
ref=
"multipleTable"
v-loading=
"loading"
:data=
"integrationRuleList"
>
<el-table-column
width=
"90"
:label=
"$t('编号')"
align=
"center"
>
<template
#default
="
{ row }">
<el-button
size=
"mini"
type=
"text"
@
click=
"handleViewDetails(row)"
>
{{
row
.
code
||
"
/
"
}}
</el-button
>
<el-button
size=
"mini"
type=
"text"
@
click=
"handleViewDetails(row)"
>
{{
row
.
code
||
"
/
"
}}
</el-button>
</
template
>
</el-table-column>
<el-table-column
width=
"1
4
0"
:label=
"$t('指标类型')"
align=
"center"
>
<el-table-column
width=
"1
0
0"
:label=
"$t('指标类型')"
align=
"center"
>
<
template
slot-scope=
"scope"
>
{{
isChinese
?
handleSourceType
(
scope
.
row
.
type
).
label
:
handleSourceType
(
scope
.
row
.
type
).
labelEn
}}
{{
isChinese
?
handleSourceType
(
scope
.
row
.
type
).
label
:
handleSourceType
(
scope
.
row
.
type
).
labelEn
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('标题')"
align=
"center"
:prop=
"isChinese ? 'titleZh' : 'titleEn'"
/>
<el-table-column
:label=
"$t('标题')"
width=
"200"
align=
"center"
:prop=
"isChinese ? 'titleZh' : 'titleEn'"
/>
<el-table-column
:label=
"$t('开始时间')"
align=
"center"
>
<
template
#default
="{
row
}"
>
{{
parseTime
(
row
.
startTime
)
||
"
/
"
}}
</
template
>
<el-table-column
:label=
"$t('开始时间')"
width=
"150px"
align=
"center"
>
<
template
#default
="{
row
}"
>
{{
parseTime
(
row
.
startTime
)
||
"
/
"
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('结束时间')"
align=
"center"
>
<
template
#default
="{
row
}"
>
{{
parseTime
(
row
.
endTime
)
||
"
/
"
}}
</
template
>
<el-table-column
:label=
"$t('结束时间')"
width=
"150px"
align=
"center"
>
<
template
#default
="{
row
}"
>
{{
parseTime
(
row
.
endTime
)
||
"
/
"
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('单次积分')"
align=
"center"
>
<
template
#default
="{
row
}"
>
{{
row
.
getScoreOnce
||
"
--
"
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('累计最高积分')"
align=
"center"
prop=
"maxScoreTotal"
>
<el-table-column
:label=
"$t('累计最高积分')"
width=
"140px"
align=
"center"
prop=
"maxScoreTotal"
>
<
template
#default
="{
row
}"
>
{{
row
.
maxScoreTotal
||
"
--
"
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('规则说明')"
align=
"center"
:prop=
"isChinese ? 'descZh' : 'descEn'"
/>
<el-table-column
:label=
"$t('规则说明')"
width=
"260px"
align=
"center"
:prop=
"isChinese ? 'descZh' : 'descEn'"
/>
<el-table-column
:label=
"$t('展示平台')"
align=
"center"
>
<
template
#default
="{
row
}"
>
{{
handlePlatform
(
row
.
showPlatform
)
||
"
/
"
}}
</
template
>
<
template
#default
="{
row
}"
>
{{
handlePlatform
(
row
.
showPlatform
)
||
"
/
"
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('状态')"
align=
"center"
>
<
template
#default
="{
row
}"
>
{{
$l
(
handleStatus
(
row
.
status
),
"
label
"
)
||
"
/
"
}}
</
template
>
<
template
#default
="{
row
}"
>
{{
$l
(
handleStatus
(
row
.
status
),
"
label
"
)
||
"
/
"
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('创建人')"
align=
"center"
prop=
"creator"
/>
<el-table-column
:label=
"$t('创建时间')"
align=
"center"
>
<
template
#default
="{
row
}"
>
{{
parseTime
(
row
.
createTime
)
||
"
/
"
}}
</
template
>
<el-table-column
:label=
"$t('创建时间')"
width=
"150px"
align=
"center"
>
<
template
#default
="{
row
}"
>
{{
parseTime
(
row
.
createTime
)
||
"
/
"
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('最后更新人')"
align=
"center"
prop=
"updater"
/>
<el-table-column
:label=
"$t('最后更新时间')"
align=
"center"
>
<
template
#default
="{
row
}"
>
{{
parseTime
(
row
.
updateTime
)
||
"
/
"
}}
</
template
>
<el-table-column
:label=
"$t('最后更新人')"
width=
"140px"
align=
"center"
prop=
"updater"
/>
<el-table-column
:label=
"$t('最后更新时间')"
width=
"150px"
align=
"center"
>
<
template
#default
="{
row
}"
>
{{
parseTime
(
row
.
updateTime
)
||
"
/
"
}}
</
template
>
</el-table-column>
<el-table-column
width=
"
220px"
:label=
"$t('操作')"
align=
"center
"
>
<el-table-column
width=
"
140px"
:label=
"$t('操作')"
align=
"center"
fixed=
"right
"
>
<
template
slot-scope=
"scope"
>
<!--
<el-button
size=
"mini"
...
...
@@ -225,95 +101,30 @@
@
click=
"handleViewDetails(scope.row)"
>
{{
$t
(
"
查看
"
)
}}
</el-button
>
-->
<el-button
size=
"mini"
type=
"text"
:disabled=
"scope.row.status != '1'"
@
click=
"handleCloseButton(scope.row)"
>
{{
$t
(
"
关闭
"
)
}}
</el-button
>
<el-button
size=
"mini"
type=
"text"
@
click=
"handleCopyButton(scope.row)"
>
{{
$t
(
"
复制
"
)
}}
</el-button
>
<el-button
size=
"mini"
type=
"text"
:disabled=
"scope.row.status != '1'"
@
click=
"handleDelayButton(scope.row)"
>
{{
$t
(
"
延期
"
)
}}
</el-button
>
<el-button
size=
"mini"
:disabled=
"scope.row.status != '2'"
type=
"text"
@
click=
"handleDelete(scope.row)"
>
{{
$t
(
"
删除
"
)
}}
</el-button
>
<el-button
size=
"mini"
type=
"text"
:disabled=
"scope.row.status != '2'"
@
click=
"handleUpdate(scope.row)"
>
{{
$t
(
"
编辑
"
)
}}
</el-button
>
<el-button
size=
"mini"
type=
"text"
:disabled=
"scope.row.status != '2'"
@
click=
"handleEnabledStatus(scope.row)"
>
{{
$t
(
"
启用
"
)
}}
</el-button
>
<el-button
size=
"mini"
type=
"text"
:disabled=
"scope.row.status != '1'"
@
click=
"handleCloseButton(scope.row)"
>
{{
$t
(
"
关闭
"
)
}}
</el-button>
<el-button
size=
"mini"
type=
"text"
@
click=
"handleCopyButton(scope.row)"
>
{{
$t
(
"
复制
"
)
}}
</el-button>
<el-button
size=
"mini"
type=
"text"
:disabled=
"scope.row.status != '1'"
@
click=
"handleDelayButton(scope.row)"
>
{{
$t
(
"
延期
"
)
}}
</el-button>
<el-button
size=
"mini"
:disabled=
"scope.row.status != '2'"
type=
"text"
@
click=
"handleDelete(scope.row)"
>
{{
$t
(
"
删除
"
)
}}
</el-button>
<el-button
size=
"mini"
type=
"text"
:disabled=
"scope.row.status != '2'"
@
click=
"handleUpdate(scope.row)"
>
{{
$t
(
"
编辑
"
)
}}
</el-button>
<el-button
size=
"mini"
type=
"text"
:disabled=
"scope.row.status != '2'"
@
click=
"handleEnabledStatus(scope.row)"
>
{{
$t
(
"
启用
"
)
}}
</el-button>
</
template
>
</el-table-column>
</el-table>
<!-- //分页列表 -->
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.page"
:limit.sync=
"queryParams.rows"
@
pagination=
"handleQueryPagination"
/>
<el-dialog
:title=
"$t('提示')"
:visible.sync=
"dialogPostponeVisible"
width=
"30%"
>
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.page"
:limit.sync=
"queryParams.rows"
@
pagination=
"handleQueryPagination"
/>
<el-dialog
:title=
"$t('提示')"
:visible.sync=
"dialogPostponeVisible"
width=
"30%"
>
<el-row
class=
"mb8"
>
{{ $t("请选择延期时间") }}
</el-row>
<el-date-picker
v-model=
"postponeDatetime"
type=
"datetime"
clearable
style=
"width: 240px"
value-format=
"yyyy-MM-dd HH:mm:ss"
:picker-options=
"pickerOptions"
:placeholder=
"$t('请选择时间')"
/>
<el-date-picker
v-model=
"postponeDatetime"
type=
"datetime"
clearable
style=
"width: 240px"
value-format=
"yyyy-MM-dd HH:mm:ss"
:picker-options=
"pickerOptions"
:placeholder=
"$t('请选择时间')"
/>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogPostponeVisible = false"
>
{{
$t("取 消")
}}
</el-button>
<el-button
type=
"primary"
@
click=
"confirmPostponeIntegral"
>
{{
$t("确 定")
}}
</el-button>
<el-button
@
click=
"dialogPostponeVisible = false"
>
{{ $t("取 消") }}
</el-button>
<el-button
type=
"primary"
@
click=
"confirmPostponeIntegral"
>
{{ $t("确 定") }}
</el-button>
</span>
</el-dialog>
</div>
</template>
<
script
>
import
{
getDictDatas
,
DICT_TYPE
}
from
"
@/utils/dict
"
;
import
{
getScoreRecordList
,
integralRuleStatus
,
integralRuleCopy
,
integralRuleDelay
,
integralRuleDelete
,
switchRuleSet
,
switchRuleGet
,
}
from
"
@/api/ecw/memberManagement
"
;
import
{
getDictDatas
,
DICT_TYPE
}
from
"
@/utils/dict
"
import
{
getScoreRecordList
,
integralRuleStatus
,
integralRuleCopy
,
integralRuleDelay
,
integralRuleDelete
,
switchRuleSet
,
switchRuleGet
}
from
"
@/api/ecw/memberManagement
"
export
default
{
name
:
"
EcwMembermanagementIntegrationrule
"
,
data
()
{
...
...
@@ -329,8 +140,8 @@ export default {
postponeDatetime
:
""
,
pickerOptions
:
{
disabledDate
(
time
)
{
return
time
.
getTime
()
<
Date
.
now
()
-
8.64e7
;
}
,
return
time
.
getTime
()
<
Date
.
now
()
-
8.64e7
}
},
queryParams
:
{
type
:
""
,
...
...
@@ -342,112 +153,112 @@ export default {
maxScoreTotalSymbol
:
""
,
maxScoreTotal
:
""
,
page
:
1
,
rows
:
10
,
}
,
}
;
rows
:
10
}
}
},
computed
:
{
isChinese
()
{
return
this
.
$i18n
.
locale
===
"
zh_CN
"
;
}
,
return
this
.
$i18n
.
locale
===
"
zh_CN
"
}
},
created
()
{
this
.
handleQuery
()
;
this
.
getSwitchRuleStatus
()
;
this
.
handleQuery
()
this
.
getSwitchRuleStatus
()
},
activated
()
{
this
.
handleQuery
()
;
this
.
handleQuery
()
},
methods
:
{
openSwitch
(
status
)
{
this
.
$modal
.
confirm
(
this
.
$t
(
"
是否确认{val}会员积分系统
"
,
{
val
:
status
?
this
.
$t
(
"
开启
"
)
:
this
.
$t
(
"
关闭
"
)
,
val
:
status
?
this
.
$t
(
"
开启
"
)
:
this
.
$t
(
"
关闭
"
)
})
)
.
then
(
async
()
=>
{
// return integralRuleDelete({ id: row.id })
const
{
code
}
=
await
switchRuleSet
({
switchState
:
status
})
;
const
{
code
}
=
await
switchRuleSet
({
switchState
:
status
})
if
(
code
===
0
)
{
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
成功
"
))
;
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
成功
"
))
}
})
.
catch
(()
=>
{
this
.
switchState
=
!
status
;
})
;
this
.
switchState
=
!
status
})
},
getSwitchRuleStatus
()
{
switchRuleGet
().
then
((
res
)
=>
{
this
.
switchState
=
res
.
data
;
})
;
this
.
switchState
=
res
.
data
})
},
// 编辑操作按钮
handleUpdate
(
row
)
{
this
.
$router
.
push
({
path
:
"
/member/memberManagement/addIntegrationRuleOperation
"
,
query
:
{
id
:
row
.
id
,
pageStatus
:
"
edit
"
}
,
})
;
query
:
{
id
:
row
.
id
,
pageStatus
:
"
edit
"
}
})
},
// 查看按钮操作
handleViewDetails
(
row
)
{
this
.
$router
.
push
({
path
:
"
/member/memberManagement/addIntegrationRuleOperation
"
,
query
:
{
id
:
row
.
id
,
pageStatus
:
"
view
"
}
,
})
;
query
:
{
id
:
row
.
id
,
pageStatus
:
"
view
"
}
})
},
// 延期按钮操作
handleDelayButton
(
row
)
{
this
.
postponeIntegralID
=
row
.
id
;
this
.
dialogPostponeVisible
=
true
;
this
.
postponeIntegralID
=
row
.
id
this
.
dialogPostponeVisible
=
true
},
confirmPostponeIntegral
()
{
integralRuleDelay
({
id
:
this
.
postponeIntegralID
,
endTime
:
this
.
postponeDatetime
,
endTime
:
this
.
postponeDatetime
}).
then
((
res
)
=>
{
this
.
postponeDatetime
=
""
;
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
延期成功
"
))
;
})
;
this
.
postponeDatetime
=
""
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
延期成功
"
))
})
},
// 删除按钮操作
handleDelete
(
row
)
{
this
.
$modal
.
confirm
(
this
.
$t
(
"
是否确认删除此礼品规则
"
))
.
then
(
function
()
{
return
integralRuleDelete
({
id
:
row
.
id
})
;
return
integralRuleDelete
({
id
:
row
.
id
})
})
.
then
(()
=>
{
this
.
handleQuery
()
;
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
删除成功
"
))
;
this
.
handleQuery
()
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
删除成功
"
))
})
.
catch
(()
=>
{})
;
.
catch
(()
=>
{})
},
// 启用按钮操作
handleEnabledStatus
(
row
)
{
this
.
$modal
.
confirm
(
this
.
$t
(
"
是否确认启用此礼品规则
"
))
.
then
(
function
()
{
return
integralRuleStatus
({
id
:
row
.
id
,
status
:
"
1
"
})
;
return
integralRuleStatus
({
id
:
row
.
id
,
status
:
"
1
"
})
})
.
then
(()
=>
{
this
.
handleQuery
()
;
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
启用成功
"
))
;
this
.
handleQuery
()
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
启用成功
"
))
})
.
catch
(()
=>
{})
;
.
catch
(()
=>
{})
},
// 复制按钮操作
handleCopyButton
(
row
)
{
this
.
$modal
.
confirm
(
this
.
$t
(
"
是否确认复制积分规则
"
))
.
then
(
function
()
{
return
integralRuleCopy
({
id
:
row
.
id
})
;
return
integralRuleCopy
({
id
:
row
.
id
})
})
.
then
(()
=>
{
this
.
handleQuery
()
;
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
复制成功
"
))
;
this
.
handleQuery
()
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
复制成功
"
))
})
.
catch
(()
=>
{})
;
.
catch
(()
=>
{})
},
// 关闭按钮操作
...
...
@@ -455,90 +266,70 @@ export default {
this
.
$modal
.
confirm
(
this
.
$t
(
"
是否确认关闭此礼品规则
"
))
.
then
(
function
()
{
return
integralRuleStatus
({
id
:
row
.
id
,
status
:
"
3
"
})
;
return
integralRuleStatus
({
id
:
row
.
id
,
status
:
"
3
"
})
})
.
then
(()
=>
{
this
.
handleQuery
()
;
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
关闭成功
"
))
;
this
.
handleQuery
()
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
关闭成功
"
))
})
.
catch
(()
=>
{})
;
.
catch
(()
=>
{})
},
// new score rule func
handleNewScoreRule
()
{
this
.
$router
.
push
({
path
:
"
/member/memberManagement/addIntegrationRuleOperation
"
,
query
:
{
pageStatus
:
"
new
"
}
,
})
;
query
:
{
pageStatus
:
"
new
"
}
})
},
// 积分来源
handleSourceType
(
id
)
{
return
this
.
getDictDatas
(
DICT_TYPE
.
SCORE_RULE_TYPE
).
filter
(
(
item
)
=>
item
.
value
==
id
)[
0
];
return
this
.
getDictDatas
(
DICT_TYPE
.
SCORE_RULE_TYPE
).
filter
((
item
)
=>
item
.
value
==
id
)[
0
]
},
// 活动状态
handleStatus
(
id
)
{
return
this
.
getDictDatas
(
DICT_TYPE
.
GIFT_STATUS
).
filter
(
(
item
)
=>
item
.
value
==
id
)[
0
];
return
this
.
getDictDatas
(
DICT_TYPE
.
GIFT_STATUS
).
filter
((
item
)
=>
item
.
value
==
id
)[
0
]
},
arraysEqual
(
arr1
,
arr2
)
{
return
arr1
.
filter
((
current
)
=>
{
return
!!
arr2
.
find
((
item
)
=>
item
==
current
.
value
.
toString
())
;
})
;
return
!!
arr2
.
find
((
item
)
=>
item
==
current
.
value
.
toString
())
})
},
// 展示平台
handlePlatform
(
platformId
)
{
const
platformIdLabel
=
[]
;
const
platformIdLabel
=
[]
if
(
this
.
isChinese
)
{
this
.
arraysEqual
(
this
.
getDictDatas
(
DICT_TYPE
.
PLATFORM_TYPE
),
platformId
.
split
(
"
,
"
)
).
forEach
((
element
)
=>
{
platformIdLabel
.
push
(
element
.
label
);
});
this
.
arraysEqual
(
this
.
getDictDatas
(
DICT_TYPE
.
PLATFORM_TYPE
),
platformId
.
split
(
"
,
"
)).
forEach
((
element
)
=>
{
platformIdLabel
.
push
(
element
.
label
)
})
}
else
{
this
.
arraysEqual
(
this
.
getDictDatas
(
DICT_TYPE
.
PLATFORM_TYPE
),
platformId
.
split
(
"
,
"
)
).
forEach
((
element
)
=>
{
platformIdLabel
.
push
(
element
.
labelEn
);
});
this
.
arraysEqual
(
this
.
getDictDatas
(
DICT_TYPE
.
PLATFORM_TYPE
),
platformId
.
split
(
"
,
"
)).
forEach
((
element
)
=>
{
platformIdLabel
.
push
(
element
.
labelEn
)
})
}
return
platformIdLabel
.
join
()
;
return
platformIdLabel
.
join
()
},
handleQuery
()
{
this
.
queryParams
.
page
=
1
;
const
params
=
{
...
this
.
queryParams
};
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
"
createTime
"
,
false
);
this
.
queryParams
.
page
=
1
const
params
=
{
...
this
.
queryParams
}
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
"
createTime
"
,
false
)
getScoreRecordList
(
params
).
then
((
res
)
=>
{
this
.
loading
=
false
;
this
.
integrationRuleList
=
res
.
data
.
list
;
this
.
total
=
res
.
data
.
total
;
})
;
this
.
loading
=
false
this
.
integrationRuleList
=
res
.
data
.
list
this
.
total
=
res
.
data
.
total
})
},
handleQueryPagination
()
{
const
params
=
{
...
this
.
queryParams
};
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
"
createTime
"
,
false
);
const
params
=
{
...
this
.
queryParams
}
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
"
createTime
"
,
false
)
getScoreRecordList
(
params
).
then
((
res
)
=>
{
this
.
loading
=
false
;
this
.
integrationRuleList
=
res
.
data
.
list
;
this
.
total
=
res
.
data
.
total
;
})
;
this
.
loading
=
false
this
.
integrationRuleList
=
res
.
data
.
list
this
.
total
=
res
.
data
.
total
})
},
resetQuery
()
{
this
.
loading
=
true
;
this
.
dateRangeCreateTime
=
[]
;
this
.
loading
=
true
this
.
dateRangeCreateTime
=
[]
this
.
queryParams
=
{
ruleTitle
:
""
,
ruleDesc
:
""
,
...
...
@@ -550,12 +341,12 @@ export default {
endTime
:
""
,
pageNo
:
1
,
pageSize
:
10
,
startTime
:
""
,
}
;
this
.
handleQuery
()
;
}
,
}
,
}
;
startTime
:
""
}
this
.
handleQuery
()
}
}
}
</
script
>
<
style
scoped
>
.switchBtn
{
...
...
src/views/ecw/memberManagement/sharingDetails/index.vue
View file @
57efa020
<
template
>
<div
class=
"app-container"
>
<!-- 搜索工作栏 -->
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<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-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
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-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-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"
/>
<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-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-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-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>
<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"
>
<el-table-column
width=
"100"
:label=
"$t('序号')"
align=
"center"
prop=
"id"
/>
<el-table-column
width=
"140"
:label=
"$t('操作人')"
align=
"center"
prop=
"memberName"
/>
<el-table-column
width=
"120"
:label=
"$t('分类')"
align=
"center"
:prop=
"isChinese ? 'typeZh' : 'typeEn'"
/>
<el-table-column
width=
"120"
: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"
"
>
<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"
>
<el-table-column
:label=
"$t('点击时间')"
align=
"center"
prop=
"createTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
triggerTime
)
||
"
--
"
}}
</span>
</
template
>
</el-table-column>
<el-table-column
width=
"180"
:label=
"$t('ip')"
align=
"center"
prop=
"ipAddress"
/>
<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"
/>
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.page"
:limit.sync=
"queryParams.rows"
@
pagination=
"getList"
/>
</div>
</template>
<
script
>
import
{
getShareRecordDetails
}
from
"
@/api/ecw/memberManagement
"
;
import
{
getShareRecordDetails
}
from
"
@/api/ecw/memberManagement
"
export
default
{
name
:
"
EcwMembermanagementSharingdetailsIndex
"
,
components
:
{},
...
...
@@ -181,17 +101,17 @@ export default {
status
:
null
,
type
:
null
,
category
:
null
,
remark
:
null
,
}
,
}
;
remark
:
null
}
}
},
created
()
{
this
.
getList
()
;
this
.
getList
()
},
computed
:
{
isChinese
()
{
return
this
.
$i18n
.
locale
===
"
zh_CN
"
;
}
,
return
this
.
$i18n
.
locale
===
"
zh_CN
"
}
},
methods
:
{
goShareDetails
(
row
)
{
...
...
@@ -199,38 +119,38 @@ export default {
this
.
$router
.
push
({
path
:
"
/member/memberManagement/sharingStatisticalDetails
"
,
query
:
{
id
:
row
.
id
,
}
,
})
;
id
:
row
.
id
}
})
}
},
/** 查询列表 */
getList
()
{
this
.
loading
=
true
;
this
.
loading
=
true
// 处理查询参数
let
params
=
{
...
this
.
queryParams
}
;
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
"
createTime
"
)
;
let
params
=
{
...
this
.
queryParams
}
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
"
createTime
"
)
// 执行查询
getShareRecordDetails
(
params
).
then
((
response
)
=>
{
this
.
list
=
response
.
data
.
list
;
this
.
total
=
response
.
data
.
total
;
this
.
loading
=
false
;
})
;
this
.
list
=
response
.
data
.
list
this
.
total
=
response
.
data
.
total
this
.
loading
=
false
})
},
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
page
=
1
;
this
.
getList
()
;
this
.
queryParams
.
page
=
1
this
.
getList
()
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
dateRangeCreateTime
=
[]
;
this
.
queryParams
.
relationSymbol
=
""
;
this
.
queryParams
.
totalScore
=
""
;
this
.
resetForm
(
"
queryForm
"
)
;
this
.
handleQuery
()
;
}
,
}
,
}
;
this
.
dateRangeCreateTime
=
[]
this
.
queryParams
.
relationSymbol
=
""
this
.
queryParams
.
totalScore
=
""
this
.
resetForm
(
"
queryForm
"
)
this
.
handleQuery
()
}
}
}
</
script
>
chenwei
@chenwei
mentioned in commit
d32130e0
·
Oct 09, 2024
mentioned in commit
d32130e0
mentioned in commit d32130e02ac0e7483d4d97666a7237d0c9fa3c01
Toggle commit list
chenwei
@chenwei
mentioned in merge request
!76 (merged)
·
Oct 09, 2024
mentioned in merge request
!76 (merged)
mentioned in merge request !76
Toggle commit list
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