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
1c7946bf
Commit
1c7946bf
authored
Oct 17, 2024
by
chenwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复兑换记录,礼品操作等问题
(cherry picked from commit
778fa5e3
)
parent
7c1116b6
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
246 additions
and
565 deletions
+246
-565
chooseMember.vue
...w/giftManagement/bulkExchange/components/chooseMember.vue
+84
-182
index.vue
src/views/ecw/giftManagement/bulkExchange/index.vue
+2
-1
operatingGift.vue
src/views/ecw/giftManagement/components/operatingGift.vue
+1
-1
index.vue
src/views/ecw/giftManagement/index.vue
+131
-370
index.vue
...cw/memberManagement/addIntegrationRuleOperation/index.vue
+6
-5
index.vue
src/views/ecw/memberManagement/exchangeRecord/index.vue
+2
-1
index.vue
...ws/ecw/memberManagement/exchangeRecordOperation/index.vue
+20
-5
No files found.
src/views/ecw/giftManagement/bulkExchange/components/chooseMember.vue
View file @
1c7946bf
<
template
>
<el-dialog
:title=
"$t('选择会员')"
:visible.sync=
"dialogVisible"
width=
"80%"
:before-close=
"dialogBeforeClose"
>
<el-dialog
:title=
"$t('选择会员')"
:visible.sync=
"dialogVisible"
width=
"80%"
:before-close=
"dialogBeforeClose"
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
v-show=
"showSearch"
:inline=
"true"
label-width=
"120px"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
v-show=
"showSearch"
:inline=
"true"
label-width=
"120px"
>
<el-form-item
:label=
"$t('当前积分')"
>
<el-row
:gutter=
"10"
>
<el-col
:span=
"8"
>
<dict-selector
clearable
:type=
"DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL"
v-model=
"queryParams.holdScoreOperate"
@
change=
"handleQuery"
>
</dict-selector>
<dict-selector
clearable
:type=
"DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL"
v-model=
"queryParams.holdScoreOperate"
@
change=
"handleQuery"
>
</dict-selector>
</el-col>
<el-col
:span=
"16"
>
<el-input
v-model.trim=
"queryParams.holdScore"
:placeholder=
"$t('请输入数字')"
clearable
@
keyup.enter.native=
"handleQuery"
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
<el-input
v-model.trim=
"queryParams.holdScore"
:placeholder=
"$t('请输入数字')"
clearable
@
keyup.enter.native=
"handleQuery"
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
</el-col>
</el-row>
</el-form-item>
<el-form-item
:label=
"$t('关键词')"
>
<el-input
style=
"width: 300px"
v-model.trim=
"queryParams.key"
:placeholder=
"$t('请输入会员名称/会员编号/手机号')"
clearable
@
keyup.enter.native=
"handleQuery"
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
<el-input
style=
"width: 300px"
v-model.trim=
"queryParams.key"
:placeholder=
"$t('请输入会员名称/会员编号/手机号')"
clearable
@
keyup.enter.native=
"handleQuery"
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
/>
</el-form-item>
<el-form-item
:label=
"$t('国家')"
>
<el-select
v-model=
"queryParams.country"
:placeholder=
"$t('请选择国家')"
clearable
@
change=
"handleGetCityList($event)"
size=
"small"
>
<el-option
v-for=
"nodeItem in countryList"
:key=
"nodeItem.id"
:label=
"isChinese ? nodeItem.titleZh : nodeItem.titleEn"
:value=
"nodeItem.id"
/>
<el-select
v-model=
"queryParams.country"
:placeholder=
"$t('请选择国家')"
clearable
@
change=
"handleGetCityList($event)"
size=
"small"
>
<el-option
v-for=
"nodeItem in countryList"
:key=
"nodeItem.id"
:label=
"isChinese ? nodeItem.titleZh : nodeItem.titleEn"
:value=
"nodeItem.id"
/>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('城市')"
>
<el-select
v-model=
"queryParams.city"
:placeholder=
"$t('请选择城市')"
clearable
size=
"small"
>
<el-option
v-for=
"nodeItem in cityList"
:key=
"nodeItem.id"
:label=
"isChinese ? nodeItem.titleZh : nodeItem.titleEn"
:value=
"nodeItem.id"
/>
<el-select
v-model=
"queryParams.city"
:placeholder=
"$t('请选择城市')"
clearable
size=
"small"
>
<el-option
v-for=
"nodeItem in cityList"
:key=
"nodeItem.id"
:label=
"isChinese ? nodeItem.titleZh : nodeItem.titleEn"
:value=
"nodeItem.id"
/>
</el-select>
</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"
>
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"handleQueryPagination"
></right-toolbar>
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"handleQueryPagination"
></right-toolbar>
</el-row>
<el-table
ref=
"multipleTable"
v-loading=
"loading"
@
selection-change=
"handleSelectionChange"
:data=
"memberList"
>
<el-table-column
type=
"selection"
width=
"55"
:selectable=
"selectable"
>
</el-table-column>
<el-table-column
:label=
"$t('会员名称')"
align=
"center"
:prop=
"isChinese ? 'memberNameZh' : 'memberNameEn'"
></el-table-column>
<el-table-column
width=
"140"
:label=
"$t('会员编号')"
align=
"center"
prop=
"id"
></el-table-column>
<el-table-column
width=
"140"
:label=
"$t('手机号')"
align=
"center"
prop=
"mobile"
></el-table-column>
<el-table-column
width=
"140"
align=
"center"
:label=
"$t('国家')"
:prop=
"isChinese ? 'countryNameZh' : 'countryNameEn'"
></el-table-column>
<el-table-column
:label=
"$t('城市')"
align=
"center"
:prop=
"isChinese ? 'cityNameZh' : 'cityNameEn'"
></el-table-column>
<el-table-column
:label=
"$t('当前积分')"
align=
"center"
prop=
"holdScore"
></el-table-column>
<el-table
ref=
"multipleTable"
v-loading=
"loading"
@
selection-change=
"handleSelectionChange"
:data=
"memberList"
>
<el-table-column
type=
"selection"
width=
"55"
:selectable=
"selectable"
>
</el-table-column>
<el-table-column
:label=
"$t('会员名称')"
align=
"center"
:prop=
"isChinese ? 'memberNameZh' : 'memberNameEn'"
></el-table-column>
<el-table-column
width=
"140"
:label=
"$t('会员编号')"
align=
"center"
prop=
"id"
></el-table-column>
<el-table-column
width=
"140"
:label=
"$t('手机号')"
align=
"center"
prop=
"mobile"
></el-table-column>
<el-table-column
width=
"140"
align=
"center"
:label=
"$t('国家')"
:prop=
"isChinese ? 'countryNameZh' : 'countryNameEn'"
></el-table-column>
<el-table-column
:label=
"$t('城市')"
align=
"center"
:prop=
"isChinese ? 'cityNameZh' : 'cityNameEn'"
></el-table-column>
<el-table-column
:label=
"$t('当前积分')"
align=
"center"
prop=
"holdScore"
></el-table-column>
</el-table>
<!-- //分页列表 -->
<span
v-show=
"selectedMember.memberList.length > 0"
...
...
@@ -143,13 +48,7 @@
<span
style=
"color: red"
>
{{
selectedMember
.
memberList
.
length
}}
</span>
{{
$t
(
"
人
"
)
}}
</span
>
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.pageNo"
:limit.sync=
"queryParams.pageSize"
@
pagination=
"handleQueryPagination"
/>
<pagination
v-show=
"total > 0"
:total=
"total"
:page.sync=
"queryParams.pageNo"
:limit.sync=
"queryParams.pageSize"
@
pagination=
"handleQueryPagination"
/>
</div>
<div
slot=
"footer"
>
<el-button
@
click=
"dialogBeforeClose"
>
取 消
</el-button>
...
...
@@ -158,35 +57,35 @@
</el-dialog>
</
template
>
<
script
>
import
{
getDictDatas
,
DICT_TYPE
}
from
"
@/utils/dict
"
;
import
{
getCityList
,
getTradeCountryList
,
getMemberList
,
}
from
"
@/api/ecw/giftManagement
"
;
import
{
color
}
from
"
echarts/lib/export
"
;
import
{
getDictDatas
,
DICT_TYPE
}
from
"
@/utils/dict
"
import
{
getCityList
,
getTradeCountryList
,
getMemberList
}
from
"
@/api/ecw/giftManagement
"
import
{
color
}
from
"
echarts/lib/export
"
export
default
{
name
:
"
chooseMember
"
,
props
:
{
dialogVisible
:
{
type
:
Boolean
,
default
:
false
,
default
:
false
},
memberSelectList
:
{
type
:
Array
,
default
:
()
=>
[]
,
default
:
()
=>
[]
},
giftScore
:
{
type
:
Number
|
String
,
default
:
0
}
},
watch
:
{
dialogVisible
(
val
)
{
if
(
val
==
true
)
{
this
.
handleQuery
()
;
this
.
handleQuery
()
}
},
memberSelectList
(
val
)
{
this
.
selectedMember
.
memberList
=
val
;
}
,
this
.
selectedMember
.
memberList
=
val
}
},
data
()
{
return
{
...
...
@@ -209,52 +108,55 @@ export default {
pageSize
:
10
,
startTime
:
""
,
usedScore
:
null
,
usedScoreOperate
:
null
,
}
,
}
;
usedScoreOperate
:
null
}
}
},
computed
:
{
isChinese
()
{
return
this
.
$i18n
.
locale
===
"
zh_CN
"
;
}
,
return
this
.
$i18n
.
locale
===
"
zh_CN
"
}
},
created
()
{
this
.
handleQuery
()
;
this
.
getCountryList
()
;
this
.
handleQuery
()
this
.
getCountryList
()
},
activated
()
{
this
.
handleQuery
()
;
this
.
handleQuery
()
},
methods
:
{
selectable
(
row
,
index
)
{
if
(
this
.
giftScore
>
row
.
holdScore
)
{
return
false
}
if
(
this
.
memberSelectList
.
length
>
0
)
{
return
this
.
memberSelectList
.
some
((
item
)
=>
{
return
item
.
id
!=
row
.
id
;
})
;
return
item
.
id
!=
row
.
id
})
}
else
{
return
true
;
return
true
}
},
handleSelectionChange
(
val
)
{
this
.
selectedMember
.
memberList
=
val
;
let
arraryMemberName
=
[]
;
this
.
selectedMember
.
memberList
=
val
let
arraryMemberName
=
[]
if
(
val
)
{
this
.
selectedMember
.
memberList
.
forEach
((
element
)
=>
{
if
(
this
.
isChinese
)
{
arraryMemberName
.
push
(
element
.
memberNameZh
)
;
arraryMemberName
.
push
(
element
.
memberNameZh
)
}
else
{
arraryMemberName
.
push
(
element
.
memberNameEn
)
;
arraryMemberName
.
push
(
element
.
memberNameEn
)
}
})
;
})
}
this
.
selectedMember
.
memberName
=
arraryMemberName
.
join
(
"
、
"
)
;
this
.
selectedMember
.
memberName
=
arraryMemberName
.
join
(
"
、
"
)
},
transferSelectMember
()
{
this
.
dialogBeforeClose
()
;
this
.
$emit
(
"
transferSelectMemberInfo
"
,
this
.
selectedMember
.
memberList
)
;
this
.
dialogBeforeClose
()
this
.
$emit
(
"
transferSelectMemberInfo
"
,
this
.
selectedMember
.
memberList
)
},
dialogBeforeClose
()
{
this
.
loading
=
true
;
this
.
loading
=
true
this
.
queryParams
=
{
country
:
null
,
city
:
null
,
...
...
@@ -266,47 +168,47 @@ export default {
pageSize
:
10
,
startTime
:
null
,
usedScore
:
null
,
usedScoreOperate
:
null
,
}
;
usedScoreOperate
:
null
}
// this.dialogVisible = false;
this
.
$emit
(
"
update:dialogVisible
"
,
false
)
;
this
.
$emit
(
"
update:dialogVisible
"
,
false
)
},
getCountryList
()
{
getTradeCountryList
().
then
((
res
)
=>
{
this
.
countryList
=
res
.
data
;
})
;
this
.
countryList
=
res
.
data
})
},
handleGetCityList
(
id
)
{
if
(
id
)
{
let
params
=
{
id
:
id
,
}
;
id
:
id
}
getCityList
(
params
).
then
((
res
)
=>
{
this
.
cityList
=
res
.
data
;
})
;
this
.
cityList
=
res
.
data
})
}
else
{
this
.
cityList
=
[]
;
this
.
cityList
=
[]
}
},
handleQuery
()
{
this
.
queryParams
.
pageNo
=
1
;
let
params
=
{
...
this
.
queryParams
}
;
this
.
queryParams
.
pageNo
=
1
let
params
=
{
...
this
.
queryParams
}
getMemberList
(
params
).
then
((
res
)
=>
{
this
.
loading
=
false
;
this
.
memberList
=
res
.
data
.
list
;
this
.
total
=
res
.
data
.
total
;
})
;
this
.
loading
=
false
this
.
memberList
=
res
.
data
.
list
this
.
total
=
res
.
data
.
total
})
},
handleQueryPagination
()
{
let
params
=
{
...
this
.
queryParams
}
;
let
params
=
{
...
this
.
queryParams
}
getMemberList
(
params
).
then
((
res
)
=>
{
this
.
loading
=
false
;
this
.
memberList
=
res
.
data
.
list
;
this
.
total
=
res
.
data
.
total
;
})
;
this
.
loading
=
false
this
.
memberList
=
res
.
data
.
list
this
.
total
=
res
.
data
.
total
})
},
resetQuery
()
{
this
.
loading
=
true
;
this
.
loading
=
true
this
.
queryParams
=
{
country
:
null
,
city
:
null
,
...
...
@@ -318,10 +220,10 @@ export default {
pageSize
:
10
,
startTime
:
null
,
usedScore
:
null
,
usedScoreOperate
:
null
,
}
;
this
.
handleQuery
()
;
}
,
}
,
}
;
usedScoreOperate
:
null
}
this
.
handleQuery
()
}
}
}
</
script
>
src/views/ecw/giftManagement/bulkExchange/index.vue
View file @
1c7946bf
...
...
@@ -135,7 +135,7 @@
</el-row>
</div>
<choose-Member
:dialogVisible.sync=
"dialogVisible"
@
transferSelectMemberInfo=
"onGetSelectMemberInfo"
:memberSelectList=
"memberList"
>
</choose-Member>
<choose-Member
:dialogVisible.sync=
"dialogVisible"
@
transferSelectMemberInfo=
"onGetSelectMemberInfo"
:memberSelectList=
"memberList"
:giftScore.sync=
"rewardsDetails.pointsRequire"
>
</choose-Member>
</div>
</
template
>
<
script
>
...
...
@@ -175,6 +175,7 @@ export default {
currencyList
:
[],
quantityComputation
:
null
,
checkFormResult
:
[],
rewardsDetails
:
{},
rules
:
{
rewardCount
:
[
{
...
...
src/views/ecw/giftManagement/components/operatingGift.vue
View file @
1c7946bf
...
...
@@ -47,7 +47,7 @@
</el-form-item>
</el-col>
<el-col
:span=
"1"
>
<el-button
type=
"primary"
:disabled=
"isDisable"
:icon=
"index == '0' ? 'el-icon-plus' : 'el-icon-minus'"
@
click=
"handleOrderVRule(item, index)"
></el-button>
<el-button
type=
"primary"
:disabled=
"isDisable"
v-if=
"title == 3"
:icon=
"index == '0' ? 'el-icon-plus' : 'el-icon-minus'"
@
click=
"handleOrderVRule(item, index)"
></el-button>
</el-col>
</el-row>
...
...
src/views/ecw/giftManagement/index.vue
View file @
1c7946bf
<
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('礼品名称')"
>
<el-input
v-model.trim=
"queryParams.title"
:placeholder=
"$t('请输入礼品名称')"
clearable
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@
keyup.enter.native=
"handleQuery"
/>
<el-input
v-model.trim=
"queryParams.title"
:placeholder=
"$t('请输入礼品名称')"
clearable
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
:label=
"$t('兑换积分')"
>
<el-row
:gutter=
"10"
>
<el-col
:span=
"8"
>
<dict-selector
v-model=
"queryParams.pointsRequireSymbol"
clearable
:type=
"DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL"
@
change=
"handleQuery"
/>
<dict-selector
v-model=
"queryParams.pointsRequireSymbol"
clearable
:type=
"DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL"
@
change=
"handleQuery"
/>
</el-col>
<el-col
:span=
"16"
>
<el-input
v-model.trim=
"queryParams.pointsRequire"
:placeholder=
"$t('请输入数字')"
clearable
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@
keyup.enter.native=
"handleQuery"
/>
<el-input
v-model.trim=
"queryParams.pointsRequire"
: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('领取方式')"
prop=
"level"
>
<dict-selector
v-model=
"queryParams.pickMethod"
clearable
:type=
"DICT_TYPE.WAY_OF_RECEIVING"
@
change=
"handleQuery"
/>
<dict-selector
v-model=
"queryParams.pickMethod"
clearable
:type=
"DICT_TYPE.WAY_OF_RECEIVING"
@
change=
"handleQuery"
/>
</el-form-item>
<el-form-item
:label=
"$t('提货点')"
prop=
"level"
>
<el-select
v-model=
"queryParams.nodeId"
:placeholder=
"$t('请选择提货点')"
clearable
size=
"small"
@
change=
"handleQuery"
>
<el-option
v-for=
"nodeItem in nodeList"
:key=
"nodeItem.id"
:label=
"isChinese ? nodeItem.titleZh : nodeItem.titleEn"
:value=
"nodeItem.id"
/>
<el-select
v-model=
"queryParams.nodeId"
:placeholder=
"$t('请选择提货点')"
clearable
size=
"small"
@
change=
"handleQuery"
>
<el-option
v-for=
"nodeItem in nodeList"
:key=
"nodeItem.id"
:label=
"isChinese ? nodeItem.titleZh : nodeItem.titleEn"
:value=
"nodeItem.id"
/>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('状态')"
prop=
"level"
>
<dict-selector
v-model=
"queryParams.status"
clearable
:type=
"DICT_TYPE.GIFT_STATUS"
@
change=
"handleQuery"
/>
<dict-selector
v-model=
"queryParams.status"
clearable
:type=
"DICT_TYPE.GIFT_STATUS"
@
change=
"handleQuery"
/>
</el-form-item>
<el-form-item
:label=
"$t('备注')"
prop=
"level"
>
<el-input
v-model.trim=
"queryParams.remark"
:placeholder=
"$t('请输入备注')"
clearable
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@
keyup.enter.native=
"handleQuery"
/>
<el-input
v-model.trim=
"queryParams.remark"
:placeholder=
"$t('请输入备注')"
clearable
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
:label=
"$t('剩余数量')"
>
<el-row
:gutter=
"10"
>
<el-col
:span=
"8"
>
<dict-selector
v-model=
"queryParams.quantityRemainSymbol"
clearable
:type=
"DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL"
@
change=
"handleQuery"
/>
<dict-selector
v-model=
"queryParams.quantityRemainSymbol"
clearable
:type=
"DICT_TYPE.QUANTITATIVE_RELATION_SYMBOL"
@
change=
"handleQuery"
/>
</el-col>
<el-col
:span=
"16"
>
<el-input
v-model.trim=
"queryParams.quantityRemain"
:placeholder=
"$t('请输入数字')"
clearable
onkeyup=
"this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"
@
keyup.enter.native=
"handleQuery"
/>
<el-input
v-model.trim=
"queryParams.quantityRemain"
: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
v-hasPermi=
"['ecw:giftManagement:add']"
type=
"success"
size=
"mini"
icon=
"el-icon-plus"
@
click=
"handleAddReward"
>
{{
$t
(
"
添加礼品
"
)
}}
</el-button
>
<el-button
v-hasPermi=
"['ecw:giftManagement:add']"
type=
"success"
size=
"mini"
icon=
"el-icon-plus"
@
click=
"handleAddReward"
>
{{
$t
(
"
添加礼品
"
)
}}
</el-button>
<right-toolbar
:show-search.sync=
"showSearch"
@
queryTable=
"getList"
/>
</el-row>
<!-- 礼品列表 -->
<el-table
ref=
"multipleTable"
v-loading=
"loading"
:data=
"list"
>
<el-table-column
width=
"140"
:label=
"$t('礼品ID')"
align=
"center"
prop=
"code"
/>
<el-table-column
width=
"140"
:label=
"$t('礼品ID')"
align=
"center"
prop=
"code"
/>
<el-table-column
:label=
"$t('礼品名称')"
align=
"center"
>
<template
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"handleView(scope.row)"
>
{{
isChinese
?
scope
.
row
.
titleZh
:
scope
.
row
.
titleEn
}}
</el-button>
<el-button
type=
"text"
@
click=
"handleView(scope.row)"
>
{{
isChinese
?
scope
.
row
.
titleZh
:
scope
.
row
.
titleEn
}}
</el-button>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('图片')"
>
<
template
slot-scope=
"scope"
>
<el-image
:src=
"firstImg(isChinese ? scope.row.imgZh : scope.row.imgEn)"
style=
"width: 50px; height: 50px"
>
{{
$t
(
"
无
"
)
}}
</el-image
>
<el-image
:src=
"firstImg(isChinese ? scope.row.imgZh : scope.row.imgEn)"
style=
"width: 50px; height: 50px"
>
{{
$t
(
"
无
"
)
}}
</el-image>
</
template
>
</el-table-column>
<el-table-column
width=
"100"
:label=
"$t('开始日期')"
>
...
...
@@ -177,41 +83,19 @@
<
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('提货点')
"
align
=
"
center
"
>
<
template
#
default
=
"
{ row
}
"
>
{{
isChinese
?
handleExchangeNodeId
(
row
.
nodeId
).
titleZh
:
handleExchangeNodeId
(
row
.
nodeId
).
titleEn
}}
{{
isChinese
?
handleExchangeNodeId
(
row
.
nodeId
).
titleZh
:
handleExchangeNodeId
(
row
.
nodeId
).
titleEn
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('允许兑换次数')
"
align
=
"
center
"
prop
=
"
allowCount
"
/>
<
el
-
table
-
column
:
label
=
"
$t('允许兑换次数')
"
align
=
"
center
"
prop
=
"
allowCount
"
/>
<
el
-
table
-
column
:
label
=
"
$t('状态')
"
>
<
template
slot
-
scope
=
"
{ row
}
"
>
{{
isChinese
?
handleRewardsStatus
(
row
.
status
).
label
:
handleRewardsStatus
(
row
.
status
).
labelEn
}}
{{
isChinese
?
handleRewardsStatus
(
row
.
status
).
label
:
handleRewardsStatus
(
row
.
status
).
labelEn
}}
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('备注')
"
align
=
"
center
"
width
=
"
200
"
>
<
template
slot
-
scope
=
"
{ row
}
"
>
<
el
-
tooltip
popper
-
class
=
"
rewardstToolTip
"
:
content
=
"
isChinese ? row.remarkZh : remarkEn
"
placement
=
"
top
"
>
<
div
style
=
"
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
"
>
<
el
-
tooltip
popper
-
class
=
"
rewardstToolTip
"
:
content
=
"
isChinese ? row.remarkZh : remarkEn
"
placement
=
"
top
"
>
<
div
style
=
"
overflow: hidden; text-overflow: ellipsis; white-space: nowrap
"
>
{{
isChinese
?
row
.
remarkZh
:
remarkEn
}}
<
/div
>
<
/el-tooltip
>
...
...
@@ -223,164 +107,54 @@
type
=
"
text
"
@
click
=
"
$router.push({
path: '/memberManagement/exchangeRecord',
query: { rewardCode: scope.row.code
}
,
path: '/member
/gift
Management/exchangeRecord',
query: { rewardCode: scope.row.code
}
}
)
"
>
{{
scope
.
row
.
exchangeCount
}}
<
/el-butto
n
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
:
label
=
"
$t('剩余数量')
"
align
=
"
center
"
prop
=
"
quantityRemain
"
/>
<
el
-
table
-
column
width
=
"
220px
"
align
=
"
center
"
:
label
=
"
$t('操作')
"
class
-
name
=
"
small-padding fixed-width
"
>
<
el
-
table
-
column
:
label
=
"
$t('剩余数量')
"
align
=
"
center
"
prop
=
"
quantityRemain
"
/>
<
el
-
table
-
column
width
=
"
220px
"
align
=
"
center
"
:
label
=
"
$t('操作')
"
class
-
name
=
"
small-padding fixed-width
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
el
-
button
v
-
hasPermi
=
"
['ecw:giftManagement:check']
"
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-view
"
@
click
=
"
handleView(scope.row)
"
>
{{
$t
(
"
查看
"
)
}}
<
/el-butto
n
>
<
el
-
button
v
-
hasPermi
=
"
['ecw:giftManagement:close']
"
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-edit
"
:
disabled
=
"
scope.row.status == '2' || scope.row.status == '3'
"
@
click
=
"
handleCloseStatus(scope.row)
"
>
{{
$t
(
"
关闭
"
)
}}
<
/el-butto
n
>
<
el
-
button
v
-
hasPermi
=
"
['ecw:giftManagement:copy']
"
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-edit
"
@
click
=
"
copyRewards(scope.row)
"
>
{{
$t
(
"
复制
"
)
}}
<
/el-butto
n
>
<
el
-
button
v
-
hasPermi
=
"
['ecw:giftManagement:postpone']
"
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-edit
"
:
disabled
=
"
scope.row.status != '1'
"
@
click
=
"
handlePostpone(scope.row)
"
>
{{
$t
(
"
延期
"
)
}}
<
/el-butto
n
>
<
el
-
button
v
-
hasPermi
=
"
['ecw:giftManagement:delete']
"
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-delete
"
:
disabled
=
"
scope.row.status != '2'
"
@
click
=
"
handleDelete(scope.row)
"
>
{{
$t
(
"
删除
"
)
}}
<
/el-butto
n
>
<
el
-
button
v
-
has
-
permi
=
"
['ecw:giftManagement:edit']
"
size
=
"
mini
"
type
=
"
text
"
:
disabled
=
"
scope.row.status != '2' && scope.row.status != '1'
"
icon
=
"
el-icon-collection
"
@
click
=
"
editRewards(scope.row)
"
>
{{
$t
(
"
编辑
"
)
}}
<
/el-butto
n
>
<
el
-
button
v
-
has
-
permi
=
"
['ecw:giftManagement:enable']
"
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-user
"
:
disabled
=
"
scope.row.status == '1' ||
scope.row.status == '3' ||
scope.row.status == '4'
"
@
click
=
"
handleLaunchRewards(scope.row)
"
>
{{
$t
(
"
启用
"
)
}}
<
/el-butto
n
>
<
el
-
button
v
-
has
-
permi
=
"
['ecw:giftManagement:exchange']
"
:
disabled
=
"
scope.row.status == '3' || scope.row.status == '4'
"
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-user
"
@
click
=
"
handleExchange(scope.row)
"
>
{{
$t
(
"
兑换
"
)
}}
<
/el-butto
n
>
<
el
-
button
v
-
hasPermi
=
"
['ecw:giftManagement:check']
"
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-view
"
@
click
=
"
handleView(scope.row)
"
>
{{
$t
(
"
查看
"
)
}}
<
/el-button
>
<
el
-
button
v
-
hasPermi
=
"
['ecw:giftManagement:close']
"
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-edit
"
:
disabled
=
"
scope.row.status == '2' || scope.row.status == '3'
"
@
click
=
"
handleCloseStatus(scope.row)
"
>
{{
$t
(
"
关闭
"
)
}}
<
/el-button
>
<
el
-
button
v
-
hasPermi
=
"
['ecw:giftManagement:copy']
"
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-edit
"
@
click
=
"
copyRewards(scope.row)
"
>
{{
$t
(
"
复制
"
)
}}
<
/el-button
>
<
el
-
button
v
-
hasPermi
=
"
['ecw:giftManagement:postpone']
"
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-edit
"
:
disabled
=
"
scope.row.status != '1'
"
@
click
=
"
handlePostpone(scope.row)
"
>
{{
$t
(
"
延期
"
)
}}
<
/el-button
>
<
el
-
button
v
-
hasPermi
=
"
['ecw:giftManagement:delete']
"
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-delete
"
:
disabled
=
"
scope.row.status != '2'
"
@
click
=
"
handleDelete(scope.row)
"
>
{{
$t
(
"
删除
"
)
}}
<
/el-button
>
<
el
-
button
v
-
has
-
permi
=
"
['ecw:giftManagement:edit']
"
size
=
"
mini
"
type
=
"
text
"
:
disabled
=
"
scope.row.status != '2' && scope.row.status != '1'
"
icon
=
"
el-icon-collection
"
@
click
=
"
editRewards(scope.row)
"
>
{{
$t
(
"
编辑
"
)
}}
<
/el-button
>
<
el
-
button
v
-
has
-
permi
=
"
['ecw:giftManagement:enable']
"
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-user
"
:
disabled
=
"
scope.row.status == '1' || scope.row.status == '3' || scope.row.status == '4'
"
@
click
=
"
handleLaunchRewards(scope.row)
"
>
{{
$t
(
"
启用
"
)
}}
<
/el-button
>
<
el
-
button
v
-
has
-
permi
=
"
['ecw:giftManagement:exchange']
"
:
disabled
=
"
scope.row.status == '3' || scope.row.status == '4'
"
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-user
"
@
click
=
"
handleExchange(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
=
"
getList
"
/>
<
pagination
v
-
show
=
"
total > 0
"
:
total
=
"
total
"
:
page
.
sync
=
"
queryParams.page
"
:
limit
.
sync
=
"
queryParams.rows
"
@
pagination
=
"
getList
"
/>
<!--
查看
编辑
新增弹窗
-->
<
operating
-
gift
ref
=
"
operatingGift
"
:
title
=
"
operatingPagetitle
"
:
rewards
-
details
=
"
rewardsItem
"
:
show
.
sync
=
"
dialogVisible
"
:
node
-
list
=
"
nodeList
"
/>
<
el
-
dialog
:
title
=
"
$t('提示')
"
:
visible
.
sync
=
"
dialogPostponeVisible
"
width
=
"
30%
"
>
<
operating
-
gift
ref
=
"
operatingGift
"
:
title
=
"
operatingPagetitle
"
:
rewards
-
details
=
"
rewardsItem
"
:
show
.
sync
=
"
dialogVisible
"
:
node
-
list
=
"
nodeList
"
/>
<
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
=
"
confirmPostponeRewards
"
>
{{
$t
(
"
确 定
"
)
}}
<
/el-button
>
<
el
-
button
@
click
=
"
dialogPostponeVisible = false
"
>
{{
$t
(
"
取 消
"
)
}}
<
/el-button
>
<
el
-
button
type
=
"
primary
"
@
click
=
"
confirmPostponeRewards
"
>
{{
$t
(
"
确 定
"
)
}}
<
/el-button
>
<
/span
>
<
/el-dialog
>
<
/div
>
<
/template
>
<
script
>
import
{
getGiftList
,
deleteRewards
,
copyRewardsAPI
,
changeRewardsStatus
,
delayRewards
,
getWarehouseList
,
}
from
"
@/api/ecw/giftManagement
"
;
import
{
getDictDatas
,
DICT_TYPE
}
from
"
@/utils/dict
"
;
import
{
parseTime
}
from
"
../../../utils/ruoyi
"
;
import
OperatingGift
from
"
@/views/ecw/giftManagement/components/operatingGift.vue
"
;
import
{
uploadFile
}
from
"
@/api/infra/file
"
;
import
ImageUpload
from
"
@/components/ImageUpload
"
;
import
{
getGiftList
,
deleteRewards
,
copyRewardsAPI
,
changeRewardsStatus
,
delayRewards
,
getWarehouseList
}
from
"
@/api/ecw/giftManagement
"
import
{
getDictDatas
,
DICT_TYPE
}
from
"
@/utils/dict
"
import
{
parseTime
}
from
"
../../../utils/ruoyi
"
import
OperatingGift
from
"
@/views/ecw/giftManagement/components/operatingGift.vue
"
import
{
uploadFile
}
from
"
@/api/infra/file
"
import
ImageUpload
from
"
@/components/ImageUpload
"
export
default
{
name
:
"
EcwGiftmanagementIndex
"
,
components
:
{
OperatingGift
,
OperatingGift
}
,
data
()
{
return
{
...
...
@@ -419,203 +193,190 @@ export default {
quantityRemainSymbol
:
null
,
quantityRemain
:
null
,
beginCreateTime
:
null
,
endCreateTime
:
null
,
endCreateTime
:
null
}
,
// 网点
nodeList
:
[],
pickerOptions
:
{
disabledDate
(
time
)
{
return
time
.
getTime
()
<
Date
.
now
()
-
8.64e7
;
}
,
}
,
}
;
return
time
.
getTime
()
<
Date
.
now
()
-
8.64e7
}
}
}
}
,
computed
:
{
isChinese
()
{
return
this
.
$i18n
.
locale
===
"
zh_CN
"
;
}
,
return
this
.
$i18n
.
locale
===
"
zh_CN
"
}
}
,
created
()
{
this
.
getList
()
;
this
.
getNodeList
()
;
this
.
getList
()
this
.
getNodeList
()
}
,
activated
()
{
this
.
getList
()
;
this
.
getList
()
}
,
watch
:
{
dialogVisible
(
val
,
old
)
{
if
(
old
&&
!
val
)
{
this
.
getList
();
this
.
getList
()
}
}
}
,
}
,
methods
:
{
arraysEqual
(
arr1
,
arr2
)
{
return
arr1
.
filter
((
current
)
=>
{
return
!!
arr2
.
find
((
item
)
=>
item
==
current
.
value
.
toString
())
;
}
)
;
return
!!
arr2
.
find
((
item
)
=>
item
==
current
.
value
.
toString
())
}
)
}
,
handleRewardsStatus
(
status
)
{
return
this
.
getDictDatas
(
DICT_TYPE
.
GIFT_STATUS
).
filter
(
(
dicItem
)
=>
dicItem
.
value
.
toString
()
==
status
)[
0
];
return
this
.
getDictDatas
(
DICT_TYPE
.
GIFT_STATUS
).
filter
((
dicItem
)
=>
dicItem
.
value
.
toString
()
==
status
)[
0
]
}
,
firstImg
(
imgString
)
{
if
(
!
imgString
||
imgString
==
""
)
return
imgString
;
const
imgs
=
imgString
.
split
(
"
,
"
)
;
return
imgs
.
length
?
imgs
[
0
]
:
null
;
if
(
!
imgString
||
imgString
==
""
)
return
imgString
const
imgs
=
imgString
.
split
(
"
,
"
)
return
imgs
.
length
?
imgs
[
0
]
:
null
}
,
handlePickMethod
(
pickMethod
)
{
const
pickMethodLabel
=
[]
;
const
pickMethodLabel
=
[]
if
(
this
.
isChinese
)
{
this
.
arraysEqual
(
this
.
getDictDatas
(
DICT_TYPE
.
WAY_OF_RECEIVING
),
pickMethod
.
split
(
"
,
"
)
).
forEach
((
element
)
=>
{
pickMethodLabel
.
push
(
element
.
label
);
}
);
this
.
arraysEqual
(
this
.
getDictDatas
(
DICT_TYPE
.
WAY_OF_RECEIVING
),
pickMethod
.
split
(
"
,
"
)).
forEach
((
element
)
=>
{
pickMethodLabel
.
push
(
element
.
label
)
}
)
}
else
{
this
.
arraysEqual
(
this
.
getDictDatas
(
DICT_TYPE
.
WAY_OF_RECEIVING
),
pickMethod
.
split
(
"
,
"
)
).
forEach
((
element
)
=>
{
pickMethodLabel
.
push
(
element
.
labelEn
);
}
);
this
.
arraysEqual
(
this
.
getDictDatas
(
DICT_TYPE
.
WAY_OF_RECEIVING
),
pickMethod
.
split
(
"
,
"
)).
forEach
((
element
)
=>
{
pickMethodLabel
.
push
(
element
.
labelEn
)
}
)
}
return
pickMethodLabel
.
join
()
;
return
pickMethodLabel
.
join
()
}
,
handleExchangeNodeId
(
nodeId
)
{
return
this
.
nodeList
.
filter
((
nodeItem
)
=>
nodeItem
.
id
==
nodeId
)[
0
]
;
return
this
.
nodeList
.
filter
((
nodeItem
)
=>
nodeItem
.
id
==
nodeId
)[
0
]
}
,
handleAddReward
()
{
this
.
rewardsItem
=
{
}
;
this
.
dialogVisible
=
true
;
this
.
operatingPagetitle
=
"
3
"
;
this
.
rewardsItem
=
{
}
this
.
dialogVisible
=
true
this
.
operatingPagetitle
=
"
3
"
}
,
handleExchange
(
row
)
{
this
.
$router
.
push
({
path
:
"
/member/giftManagement/bulkExchange
"
,
query
:
{
rewardsID
:
row
.
id
}
,
}
)
;
query
:
{
rewardsID
:
row
.
id
}
}
)
}
,
/** 延期按钮操作 */
handlePostpone
(
row
)
{
this
.
postponeRewardsID
=
row
.
id
;
this
.
dialogPostponeVisible
=
true
;
this
.
postponeRewardsID
=
row
.
id
this
.
dialogPostponeVisible
=
true
}
,
confirmPostponeRewards
()
{
this
.
dialogPostponeVisible
=
false
;
this
.
dialogPostponeVisible
=
false
delayRewards
({
id
:
this
.
postponeRewardsID
,
endTime
:
this
.
postponeDatetime
,
endTime
:
this
.
postponeDatetime
}
).
then
((
res
)
=>
{
this
.
getList
()
;
this
.
$message
.
success
(
this
.
$t
(
"
延期成功
"
))
;
}
)
;
this
.
getList
()
this
.
$message
.
success
(
this
.
$t
(
"
延期成功
"
))
}
)
}
,
/** 关闭按钮操作 */
handleCloseStatus
(
row
)
{
this
.
$confirm
(
this
.
$t
(
"
是否关闭当前礼品?
"
),
this
.
$t
(
"
提示
"
),
{
confirmButtonText
:
this
.
$t
(
"
确定
"
),
cancelButtonText
:
this
.
$t
(
"
取消
"
),
type
:
"
warning
"
,
type
:
"
warning
"
}
)
.
then
((
_
)
=>
{
return
changeRewardsStatus
({
id
:
row
.
id
,
status
:
"
3
"
}
)
;
return
changeRewardsStatus
({
id
:
row
.
id
,
status
:
"
3
"
}
)
}
)
.
then
((
res
)
=>
{
this
.
getList
()
;
this
.
$message
.
success
(
this
.
$t
(
"
关闭成功
"
))
;
this
.
getList
()
this
.
$message
.
success
(
this
.
$t
(
"
关闭成功
"
))
}
)
.
catch
((
_
)
=>
{
// this.queryAllData();
}
)
;
}
)
}
,
// 启用礼品状态
handleLaunchRewards
(
row
)
{
this
.
$confirm
(
this
.
$t
(
"
是否启用当前礼品?
"
),
this
.
$t
(
"
提示
"
),
{
confirmButtonText
:
this
.
$t
(
"
确定
"
),
cancelButtonText
:
this
.
$t
(
"
取消
"
),
type
:
"
warning
"
,
type
:
"
warning
"
}
)
.
then
(()
=>
{
changeRewardsStatus
({
id
:
row
.
id
,
status
:
"
1
"
}
).
then
((
r
)
=>
{
this
.
$message
.
success
(
this
.
$t
(
"
启用成功
"
));
this
.
getList
();
}
);
this
.
$message
.
success
(
this
.
$t
(
"
启用成功
"
))
this
.
getList
()
}
)
.
catch
(()
=>
{
}
);
}
)
.
catch
(()
=>
{
}
)
}
,
getNodeList
()
{
let
params
=
{
title
:
""
}
;
let
params
=
{
title
:
""
}
getWarehouseList
(
params
).
then
((
res
)
=>
{
this
.
nodeList
=
res
.
data
;
}
)
;
this
.
nodeList
=
res
.
data
}
)
}
,
getList
()
{
this
.
loading
=
true
;
this
.
loading
=
true
// 处理查询参数
const
params
=
{
...
this
.
queryParams
}
;
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
"
createTime
"
,
false
);
const
params
=
{
...
this
.
queryParams
}
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
"
createTime
"
,
false
)
getGiftList
(
params
).
then
((
res
)
=>
{
this
.
loading
=
false
;
this
.
list
=
res
.
data
.
list
;
this
.
total
=
res
.
data
.
total
;
}
)
;
this
.
loading
=
false
this
.
list
=
res
.
data
.
list
this
.
total
=
res
.
data
.
total
}
)
}
,
// 新增潜在客户
handleAddPotential
()
{
this
.
$refs
.
potentialCustom
.
dialogTableVisible
=
true
;
this
.
$refs
.
potentialCustom
.
dialogTableVisible
=
true
}
,
/** 删除按钮操作 */
handleDelete
(
row
)
{
this
.
$modal
.
confirm
(
this
.
$t
(
"
是否确认删除此礼品
"
))
.
then
(
function
()
{
return
deleteRewards
({
id
:
row
.
id
}
)
;
return
deleteRewards
({
id
:
row
.
id
}
)
}
)
.
then
(()
=>
{
this
.
getList
()
;
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
删除成功
"
))
;
this
.
getList
()
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
删除成功
"
))
}
)
.
catch
(()
=>
{
}
)
;
.
catch
(()
=>
{
}
)
}
,
/** 搜索按钮操作 */
handleQuery
()
{
this
.
$nextTick
(()
=>
{
this
.
queryParams
.
page
=
1
;
this
.
getList
()
;
}
)
;
this
.
queryParams
.
page
=
1
this
.
getList
()
}
)
}
,
/** 查看按钮操作 */
handleView
(
row
)
{
this
.
dialogVisible
=
true
;
this
.
operatingPagetitle
=
"
1
"
;
this
.
rewardsItem
=
row
;
this
.
dialogVisible
=
true
this
.
operatingPagetitle
=
"
1
"
this
.
rewardsItem
=
row
}
,
/** 编辑按钮操作 */
editRewards
(
row
)
{
this
.
dialogVisible
=
true
;
this
.
operatingPagetitle
=
"
2
"
;
this
.
rewardsItem
=
row
;
this
.
dialogVisible
=
true
this
.
operatingPagetitle
=
"
2
"
this
.
rewardsItem
=
row
}
,
/** 复制按钮操作 */
copyRewards
(
row
)
{
copyRewardsAPI
(
row
.
id
).
then
((
res
)
=>
{
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
复制成功
"
))
;
this
.
handleQuery
()
;
}
)
;
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
复制成功
"
))
this
.
handleQuery
()
}
)
}
,
/** 重置按钮操作 */
resetQuery
()
{
this
.
dateRangeCreateTime
=
[]
;
this
.
dateRangeCreateTime
=
[]
this
.
queryParams
=
{
page
:
1
,
rows
:
10
,
...
...
@@ -631,12 +392,12 @@ export default {
memberCode
:
null
,
memberName
:
null
,
memberMobile
:
null
,
memberAreaCode
:
null
,
}
;
this
.
handleQuery
()
;
}
,
}
,
}
;
memberAreaCode
:
null
}
this
.
handleQuery
()
}
}
}
<
/script
>
<
style
>
.
rewardstToolTip
{
...
...
src/views/ecw/memberManagement/addIntegrationRuleOperation/index.vue
View file @
1c7946bf
...
...
@@ -304,19 +304,20 @@ export default {
}
const
validatehigh
=
(
rule
,
value
,
callback
)
=>
{
const
index
=
Number
(
rule
.
field
.
split
(
"
.
"
)[
2
])
console
.
log
(
"
osdpoopd
"
,
index
)
if
(
index
==
"
0
"
)
{
if
(
this
.
queryParams
.
extraOrderV
.
orderVRule
[
index
].
low
&&
this
.
queryParams
.
extraOrderV
.
orderVRule
[
index
].
low
>=
this
.
queryParams
.
extraOrderV
.
orderVRule
[
index
].
high
)
{
callback
(
this
.
$t
(
"
本次
最终积分应大于本次开始积分
"
))
callback
(
this
.
$t
(
"
最终积分应大于本次开始积分
"
))
}
else
if
(
this
.
queryParams
.
extraOrderV
.
orderVRule
[
index
+
1
]
&&
this
.
queryParams
.
extraOrderV
.
orderVRule
[
index
+
1
].
low
&&
this
.
queryParams
.
extraOrderV
.
orderVRule
[
index
+
1
].
low
<=
this
.
queryParams
.
extraOrderV
.
orderVRule
[
index
].
high
)
{
callback
(
this
.
$t
(
"
本次最终积分应小于下一
次开始积分
"
))
callback
(
this
.
$t
(
"
最终积分应小于下
次开始积分
"
))
}
else
{
callback
()
}
}
else
if
(
index
>
0
)
{
if
(
this
.
queryParams
.
extraOrderV
.
orderVRule
[
index
].
low
&&
this
.
queryParams
.
extraOrderV
.
orderVRule
[
index
].
low
>=
this
.
queryParams
.
extraOrderV
.
orderVRule
[
index
].
high
)
{
callback
(
this
.
$t
(
"
本次
最终积分应大于本次开始积分
"
))
}
else
if
(
this
.
queryParams
.
extraOrderV
.
orderVRule
[
index
+
1
]?.
low
&&
this
.
queryParams
.
extraOrderV
.
orderVRule
[
index
].
high
<=
this
.
queryParams
.
extraOrderV
.
orderVRule
[
index
+
1
].
low
)
{
callback
(
this
.
$t
(
"
本次最终积分应小于下一
次开始积分
"
))
callback
(
this
.
$t
(
"
最终积分应大于本次开始积分
"
))
}
else
if
(
this
.
queryParams
.
extraOrderV
.
orderVRule
[
index
+
1
]?.
low
&&
this
.
queryParams
.
extraOrderV
.
orderVRule
[
index
+
1
].
low
<=
this
.
queryParams
.
extraOrderV
.
orderVRule
[
index
].
high
)
{
callback
(
this
.
$t
(
"
最终积分应小于下
次开始积分
"
))
}
else
{
callback
()
}
...
...
src/views/ecw/memberManagement/exchangeRecord/index.vue
View file @
1c7946bf
...
...
@@ -435,7 +435,8 @@ export default {
// 新增兑换
handleNewExchange
()
{
this
.
$router
.
push
({
path
:
"
/member/memberManagement/exchangeRecordOperation
"
path
:
"
/member/memberManagement/exchangeRecordOperation
"
,
query
:
{
pageStatus
:
"
add
"
}
})
},
getNodeListAPI
()
{
...
...
src/views/ecw/memberManagement/exchangeRecordOperation/index.vue
View file @
1c7946bf
...
...
@@ -5,6 +5,16 @@
<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"
>
<div>
<el-row
:gutter=
"10"
v-if=
"$route.query.pageStatus != 'add'"
>
<el-form-item
:label=
"$t('记录ID')"
>
<el-input
:placeholder=
"$t('请输入记录ID')"
clearable
disabled
v-model=
"item.redemptionNumber"
/>
</el-form-item>
<el-form-item
:label=
"$t('状态')"
>
<el-input
:placeholder=
"$t('请输入状态')"
clearable
disabled
v-model=
"item.exchangeStatusName"
/>
</el-form-item>
</el-row>
</div>
<el-row
:gutter=
"10"
>
<span
class=
"card-title"
>
{{
$t
(
"
基础信息
"
)
}}
</span>
</el-row>
...
...
@@ -104,7 +114,7 @@
<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"
:
fileType=
"['doc', 'docx', 'xls', 'xlsx', 'txt', 'pdf', 'jpg', 'jpeg', 'png']"
:
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>
...
...
@@ -114,19 +124,19 @@
<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
time
"
: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-date-picker
type=
"date
time
"
: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-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-date-picker
type=
"date
time
"
: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>
...
...
@@ -332,7 +342,7 @@ export default {
break
case
"
add
"
:
this
.
submitButtonText
=
this
.
$t
(
"
确认兑换
"
)
this
.
getDetails
()
//
this.getDetails()
break
default
:
...
...
@@ -343,6 +353,10 @@ export default {
activated
()
{},
methods
:
{
// 兑换状态
handleExchangeStatus
(
id
)
{
return
this
.
isChinese
?
this
.
getDictDatas
(
DICT_TYPE
.
REWARD_REDEEM_STATUS
).
filter
((
item
)
=>
item
.
value
==
id
)[
0
].
label
:
this
.
getDictDatas
(
DICT_TYPE
.
REWARD_REDEEM_STATUS
).
filter
((
item
)
=>
item
.
value
==
id
)[
0
].
labelEn
},
getDetails
()
{
memberUserGet
({
id
:
this
.
$route
.
query
.
memberId
}).
then
((
r
)
=>
{
// this.details = r.data;
...
...
@@ -379,6 +393,7 @@ export default {
this
.
queryParamsList
[
0
].
updateTime
=
parseTime
(
data
.
updateTime
)
this
.
queryParamsList
[
0
].
createTime
=
parseTime
(
data
.
createTime
)
this
.
queryParamsList
[
0
].
expressDate
=
parseTime
(
data
.
expressDate
)
//快递时间
this
.
queryParamsList
[
0
].
exchangeStatusName
=
this
.
handleExchangeStatus
(
data
.
status
)
this
.
handleRewardCount
(
data
,
0
,
data
.
rewardCount
)
if
(
this
.
$route
.
query
.
pageStatus
==
"
verify
"
)
{
this
.
queryParamsList
[
0
].
verifyTime
=
getNowDateTime
()
...
...
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