Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-marketing
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit ebb75afb
authored
Feb 20, 2022
by
周子尧
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v1.2.0' of
http://192.168.3.233:8090/saas/scrm-micro-marketing
into v1.2.0
2 parents
2e0f85e5
6939434a
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
98 additions
and
44 deletions
src/views/giftBag/editGift.vue
src/views/giftBag/giftDetail.vue
src/views/giftBag/giftList.vue
src/views/giftBag/index.vue
src/views/giftBag/receivedGiftList.vue
src/views/giftBag/selectGiftDialog.vue
src/views/giftBag/selectStaffDialog.vue
src/views/giftBag/editGift.vue
View file @
ebb75af
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
slot=
"receiveDetails"
class=
"edit-tips m-t-8"
>
客户需要输入该
{{
editForm
.
receiveWay
==
'
0
'
?
'手机号'
:
'车架号后6位'
}}
才能成功领取
</div>
<div
slot=
"receiveDetails"
class=
"edit-tips m-t-8"
>
客户需要输入该
{{
editForm
.
receiveWay
==
'
1
'
?
'手机号'
:
'车架号后6位'
}}
才能成功领取
</div>
<el-button
slot=
"selectStaffBtn"
class=
"el-icon-plus"
@
click=
"handleSelectStaff"
>
选择员工
</el-button>
<el-button
slot=
"selectStaffBtn"
class=
"el-icon-plus"
@
click=
"handleSelectStaff"
>
选择员工
</el-button>
<div
slot=
"staffListBlock"
class=
"sale-select"
:style=
"
{ 'margin-left': labelWidth }" v-show="editForm.staffList
&&
editForm.staffList.length != 0">
<div
slot=
"staffListBlock"
class=
"sale-select"
:style=
"
{ 'margin-left': labelWidth }" v-show="editForm.staffList
&&
editForm.staffList.length != 0">
<div
:key=
"key"
class=
"el-input-tag input-tag-wrapper"
>
<div
:key=
"key"
class=
"el-input-tag input-tag-wrapper"
>
...
@@ -55,10 +55,10 @@ export default {
...
@@ -55,10 +55,10 @@ export default {
data
()
{
data
()
{
return
{
return
{
size
:
'small'
,
size
:
'small'
,
title
:
'新增
信息
'
,
title
:
'新增
礼包
'
,
titleObj
:
{
titleObj
:
{
add
:
'新增
信息
'
,
add
:
'新增
礼包
'
,
edit
:
'编辑
信息
'
edit
:
'编辑
礼包
'
},
},
footerLeft
:
'0'
,
footerLeft
:
'0'
,
footerWidth
:
'0'
,
footerWidth
:
'0'
,
...
@@ -80,7 +80,7 @@ export default {
...
@@ -80,7 +80,7 @@ export default {
editForm
:
{
editForm
:
{
name
:
''
,
name
:
''
,
remarkName
:
''
,
remarkName
:
''
,
receiveWay
:
'
0
'
,
receiveWay
:
'
1
'
,
receiveDetails
:
''
,
receiveDetails
:
''
,
staffList
:
[],
staffList
:
[],
// 优惠券类型(discountType) 1:满减券,2:折扣券,3:代金券,4:兑换券,5:购车代金券,6:商品折扣券,7:会员服务
// 优惠券类型(discountType) 1:满减券,2:折扣券,3:代金券,4:兑换券,5:购车代金券,6:商品折扣券,7:会员服务
...
@@ -152,7 +152,7 @@ export default {
...
@@ -152,7 +152,7 @@ export default {
if
(
!
value
)
{
if
(
!
value
)
{
return
callback
()
return
callback
()
}
}
if
(
this
.
editForm
.
receiveWay
==
'
0
'
)
{
if
(
this
.
editForm
.
receiveWay
==
'
1
'
)
{
let
phoneReg
=
/^
(
13
[
0-9
]
|15
[
0-9
]
|16
[
0-9
]
|17
[
0-9
]
|18
[
0-9
]
|19
[
0-9
]
|14
[
0-9
])[
0-9
]{8}
$/
let
phoneReg
=
/^
(
13
[
0-9
]
|15
[
0-9
]
|16
[
0-9
]
|17
[
0-9
]
|18
[
0-9
]
|19
[
0-9
]
|14
[
0-9
])[
0-9
]{8}
$/
return
phoneReg
.
test
(
value
)
?
callback
()
:
callback
(
new
Error
(
'请输入正确的手机号'
))
return
phoneReg
.
test
(
value
)
?
callback
()
:
callback
(
new
Error
(
'请输入正确的手机号'
))
}
else
{
}
else
{
...
@@ -198,11 +198,11 @@ export default {
...
@@ -198,11 +198,11 @@ export default {
optionLabel
:
'confName'
,
optionLabel
:
'confName'
,
optionList
:
[
optionList
:
[
{
{
confId
:
'
0
'
,
confId
:
'
1
'
,
confName
:
'指定手机号'
confName
:
'指定手机号'
},
},
{
{
confId
:
'
1
'
,
confId
:
'
2
'
,
confName
:
'指定车架号后6位'
confName
:
'指定车架号后6位'
}
}
],
],
...
@@ -271,10 +271,15 @@ export default {
...
@@ -271,10 +271,15 @@ export default {
this
.
$apis
.
giftBag
this
.
$apis
.
giftBag
.
getGiftInfoApi
({
id
:
this
.
routeInfo
.
id
})
.
getGiftInfoApi
({
id
:
this
.
routeInfo
.
id
})
.
then
(
res
=>
{
.
then
(
res
=>
{
res
.
data
.
couponList
.
forEach
(
item
=>
{
item
.
id
=
item
.
couponId
item
.
anticipatedCost
=
item
.
couponAnticipatedCost
})
this
.
editForm
=
res
.
data
this
.
editForm
=
res
.
data
this
.
editForm
.
receiveWay
=
this
.
editForm
.
receiveWay
+
''
this
.
editForm
.
receiveWay
=
this
.
editForm
.
receiveWay
+
''
this
.
recoveryCoupon
()
this
.
recoveryCoupon
()
this
.
recoveryTotalPrice
()
this
.
recoveryTotalPrice
()
this
.
hasStaffBlock
(
false
)
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
editStatus
=
false
this
.
editStatus
=
false
})
})
...
@@ -295,8 +300,8 @@ export default {
...
@@ -295,8 +300,8 @@ export default {
receiveWayChange
(
val
)
{
receiveWayChange
(
val
)
{
var
receiveDetailsIdx
=
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
==
'receiveDetails'
)
var
receiveDetailsIdx
=
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
==
'receiveDetails'
)
this
.
editFormData
[
receiveDetailsIdx
].
placeholder
=
val
==
'
0
'
?
'请输入领取手机号'
:
'请输入领取车架号后6位'
this
.
editFormData
[
receiveDetailsIdx
].
placeholder
=
val
==
'
1
'
?
'请输入领取手机号'
:
'请输入领取车架号后6位'
this
.
editFormData
[
receiveDetailsIdx
].
maxlength
=
val
==
'
0
'
?
11
:
6
this
.
editFormData
[
receiveDetailsIdx
].
maxlength
=
val
==
'
1
'
?
11
:
6
},
},
// 计算预估成本
// 计算预估成本
...
@@ -306,7 +311,7 @@ export default {
...
@@ -306,7 +311,7 @@ export default {
this
.
couponObj
[
item
].
list
.
forEach
(
subItem
=>
{
this
.
couponObj
[
item
].
list
.
forEach
(
subItem
=>
{
// 失效券不加入预估成本
// 失效券不加入预估成本
if
(
subItem
.
status
!=
'3'
)
{
if
(
subItem
.
status
!=
'3'
)
{
this
.
totalEstimatedCost
=
this
.
totalEstimatedCost
+
subItem
.
couponAnticipatedCost
*
subItem
.
couponAmount
this
.
totalEstimatedCost
=
this
.
totalEstimatedCost
+
parseInt
(
subItem
.
couponAnticipatedCost
)
*
parseInt
(
subItem
.
couponAmount
)
}
}
})
})
})
})
...
@@ -351,10 +356,10 @@ export default {
...
@@ -351,10 +356,10 @@ export default {
this
.
key
=
new
Date
()
this
.
key
=
new
Date
()
},
},
hasStaffBlock
()
{
hasStaffBlock
(
isValidate
=
true
)
{
var
idx
=
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
==
'staffListBlock'
)
var
idx
=
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
==
'staffListBlock'
)
this
.
editFormData
[
idx
].
isHide
=
!
this
.
editForm
.
staffList
.
length
this
.
editFormData
[
idx
].
isHide
=
!
this
.
editForm
.
staffList
.
length
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validateField
(
'staffList'
)
isValidate
&&
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validateField
(
'staffList'
)
},
},
handleSelectStaff
()
{
handleSelectStaff
()
{
...
@@ -384,6 +389,9 @@ export default {
...
@@ -384,6 +389,9 @@ export default {
var
params
=
this
.
$common
.
utils
.
deepClone
(
this
.
editForm
)
var
params
=
this
.
$common
.
utils
.
deepClone
(
this
.
editForm
)
params
.
staffCreateRequests
=
this
.
$common
.
utils
.
deepClone
(
params
.
staffList
)
params
.
staffCreateRequests
=
this
.
$common
.
utils
.
deepClone
(
params
.
staffList
)
params
.
couponCreateRequests
=
this
.
$common
.
utils
.
deepClone
(
params
.
couponList
)
params
.
couponCreateRequests
=
this
.
$common
.
utils
.
deepClone
(
params
.
couponList
)
params
.
couponCreateRequests
.
forEach
(
item
=>
{
item
.
couponId
=
item
.
id
})
delete
params
.
staffList
delete
params
.
staffList
delete
params
.
couponList
delete
params
.
couponList
if
(
this
.
routeInfo
.
addOrEdit
==
'edit'
)
{
if
(
this
.
routeInfo
.
addOrEdit
==
'edit'
)
{
...
...
src/views/giftBag/giftDetail.vue
View file @
ebb75af
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
slot=
"receiveDetails"
>
{{
editForm
.
receiveWay
==
'
0
'
?
'指定手机号'
:
'指定车架号后6位'
}}
:
{{
editForm
.
receiveDetails
}}
</div>
<div
slot=
"receiveDetails"
>
{{
editForm
.
receiveWay
==
'
1
'
?
'指定手机号'
:
'指定车架号后6位'
}}
:
{{
editForm
.
receiveDetails
}}
</div>
<div
slot=
"staffListBlock"
class=
"sale-select"
v-show=
"editForm.staffList && editForm.staffList.length != 0"
>
<div
slot=
"staffListBlock"
class=
"sale-select"
v-show=
"editForm.staffList && editForm.staffList.length != 0"
>
<div
:key=
"key"
class=
"el-input-tag input-tag-wrapper-detail"
>
<div
:key=
"key"
class=
"el-input-tag input-tag-wrapper-detail"
>
<el-tag
effect=
"plain"
type=
"info"
v-for=
"(tag, idx) in editForm.staffList"
:key=
"idx"
:disable-transitions=
"false"
@
close=
"handleStaffRemove(tag, idx)"
>
<el-tag
effect=
"plain"
type=
"info"
v-for=
"(tag, idx) in editForm.staffList"
:key=
"idx"
:disable-transitions=
"false"
@
close=
"handleStaffRemove(tag, idx)"
>
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
</div>
</div>
<div
class=
"footer"
:style=
"
{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<div
class=
"footer"
:style=
"
{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button
type=
"default"
@
click=
"handleCancel"
>
返回
</el-button>
<el-button
type=
"default"
@
click=
"handleCancel"
>
返回
</el-button>
<el-button
type=
"primary"
@
click=
"handleEdit"
>
编辑
</el-button>
<el-button
v-show=
"editForm.receivedFlag == 1"
type=
"primary"
@
click=
"handleEdit"
>
编辑
</el-button>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -61,8 +61,9 @@ export default {
...
@@ -61,8 +61,9 @@ export default {
editForm
:
{
editForm
:
{
name
:
''
,
name
:
''
,
remarkName
:
''
,
remarkName
:
''
,
receiveWay
:
'
0
'
,
receiveWay
:
'
1
'
,
receiveDetails
:
''
,
receiveDetails
:
''
,
receivedFlag
:
2
,
staffList
:
[],
staffList
:
[],
// 优惠券类型(discountType) 1:满减券,2:折扣券,3:代金券,4:兑换券,5:购车代金券,6:商品折扣券,7:会员服务
// 优惠券类型(discountType) 1:满减券,2:折扣券,3:代金券,4:兑换券,5:购车代金券,6:商品折扣券,7:会员服务
// 优惠券状态(status):1:未生效,2:生效中,3:已失效
// 优惠券状态(status):1:未生效,2:生效中,3:已失效
...
@@ -178,8 +179,8 @@ export default {
...
@@ -178,8 +179,8 @@ export default {
receiveWayChange
(
val
)
{
receiveWayChange
(
val
)
{
var
receiveDetailsIdx
=
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
==
'receiveDetails'
)
var
receiveDetailsIdx
=
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
==
'receiveDetails'
)
this
.
editFormData
[
receiveDetailsIdx
].
placeholder
=
val
==
'
0
'
?
'请输入领取手机号'
:
'请输入领取车架号后6位'
this
.
editFormData
[
receiveDetailsIdx
].
placeholder
=
val
==
'
1
'
?
'请输入领取手机号'
:
'请输入领取车架号后6位'
this
.
editFormData
[
receiveDetailsIdx
].
maxlength
=
val
==
'
0
'
?
11
:
6
this
.
editFormData
[
receiveDetailsIdx
].
maxlength
=
val
==
'
1
'
?
11
:
6
},
},
// 计算预估成本
// 计算预估成本
...
@@ -199,7 +200,7 @@ export default {
...
@@ -199,7 +200,7 @@ export default {
handleEdit
()
{
handleEdit
()
{
var
params
=
{
var
params
=
{
addOrEdit
:
'edit'
,
addOrEdit
:
'edit'
,
$title
:
encodeURI
(
'编辑
信息
'
)
$title
:
encodeURI
(
'编辑
礼包
'
)
}
}
params
.
id
=
this
.
routeInfo
.
id
params
.
id
=
this
.
routeInfo
.
id
this
.
$router
.
push
({
this
.
$router
.
push
({
...
...
src/views/giftBag/giftList.vue
View file @
ebb75af
...
@@ -29,8 +29,13 @@
...
@@ -29,8 +29,13 @@
<!-- 表格区域 开始 -->
<!-- 表格区域 开始 -->
<GLTable
ref=
"giftListRef"
:getListApi=
"getListApi"
:hasNum=
"false"
:noDataImg=
"url"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
>
<GLTable
ref=
"giftListRef"
:getListApi=
"getListApi"
:hasNum=
"false"
:noDataImg=
"url"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
>
<div
slot=
"giftInfo"
slot-scope=
"scope"
>
<div
slot=
"giftInfo"
slot-scope=
"scope"
>
<div>
礼包明细
</div>
<div
class=
"p-b-12"
>
礼包明细
</div>
<div>
{{
scope
.
scope
}}
</div>
<div
class=
"gift-detail flex-default"
>
<div
class=
"gift-item"
v-for=
"(item, index) in scope.scope.couponList"
:key=
"index"
>
<p
:class=
"['gift-coupon-name', item.status == '3' ? ' txt-grey' : '']"
>
{{
item
.
couponName
}}
×
{{
item
.
couponAmount
}}
</p>
<p
v-show=
"item.status == '3'"
class=
"gift-tips"
>
已失效
</p>
</div>
</div>
</div>
</div>
<div
slot=
"name"
slot-scope=
"scope"
>
<div
slot=
"name"
slot-scope=
"scope"
>
<el-button
:size=
"size"
type=
"text"
@
click=
"handleDetail(scope.scope)"
>
{{
scope
.
scope
.
name
}}
</el-button>
<el-button
:size=
"size"
type=
"text"
@
click=
"handleDetail(scope.scope)"
>
{{
scope
.
scope
.
name
}}
</el-button>
...
@@ -131,7 +136,10 @@ export default {
...
@@ -131,7 +136,10 @@ export default {
},
},
{
{
label
:
'赠送原因'
,
label
:
'赠送原因'
,
prop
:
'giveReason'
prop
:
'giveReason'
,
formatter
:
cellValue
=>
{
return
cellValue
.
giveReason
||
'-'
}
},
},
{
{
label
:
'创建时间'
,
label
:
'创建时间'
,
...
@@ -228,7 +236,7 @@ export default {
...
@@ -228,7 +236,7 @@ export default {
// addOrEdit == 1 ? this.$router.push('/zoneList/editZone/' + addOrEdit) : this.$router.push('/zoneList/editZone/' + addOrEdit + '/' + row.id)
// addOrEdit == 1 ? this.$router.push('/zoneList/editZone/' + addOrEdit) : this.$router.push('/zoneList/editZone/' + addOrEdit + '/' + row.id)
var
params
=
{
var
params
=
{
addOrEdit
:
addOrEdit
,
addOrEdit
:
addOrEdit
,
$title
:
encodeURI
(
addOrEdit
==
'add'
?
'新增
信息'
:
'编辑信息
'
)
$title
:
encodeURI
(
addOrEdit
==
'add'
?
'新增
礼包'
:
'编辑礼包
'
)
}
}
addOrEdit
!=
'add'
&&
(
params
.
id
=
row
.
id
)
addOrEdit
!=
'add'
&&
(
params
.
id
=
row
.
id
)
this
.
$router
.
push
({
this
.
$router
.
push
({
...
@@ -288,4 +296,27 @@ export default {
...
@@ -288,4 +296,27 @@ export default {
}
}
</
script
>
</
script
>
<
style
scoped
></
style
>
<
style
lang=
"scss"
>
.p-b-12
{
margin-bottom
:
14px
;
}
.gift-detail
.gift-item
{
margin-right
:
80px
;
.gift-coupon-name
{
display
:
inline-block
;
margin-right
:
7px
;
}
.gift-tips
{
display
:
inline-block
;
font-size
:
12px
;
height
:
18px
;
line-height
:
18px
;
color
:
#999999
;
background-color
:
#eeeded
;
margin-right
:
7px
;
}
}
.gift-detail
.gift-item
:last-child
{
margin-right
:
0
;
}
</
style
>
src/views/giftBag/index.vue
View file @
ebb75af
...
@@ -3,10 +3,10 @@
...
@@ -3,10 +3,10 @@
<div
class=
"gift-bag"
>
<div
class=
"gift-bag"
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleTabClick"
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleTabClick"
>
<el-tab-pane
label=
"定向礼包"
name=
"giftList"
>
<el-tab-pane
label=
"定向礼包"
name=
"giftList"
>
<gift-list></gift-list>
<gift-list
v-if=
"activeName == 'giftList'"
></gift-list>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"已领取"
name=
"receivedGiftList"
>
<el-tab-pane
label=
"已领取"
name=
"receivedGiftList"
>
<receivedGiftList></receivedGiftList>
<receivedGiftList
v-if=
"activeName == 'receivedGiftList'"
></receivedGiftList>
</el-tab-pane>
</el-tab-pane>
</el-tabs>
</el-tabs>
</div>
</div>
...
...
src/views/giftBag/receivedGiftList.vue
View file @
ebb75af
...
@@ -299,7 +299,7 @@ export default {
...
@@ -299,7 +299,7 @@ export default {
// addOrEdit == 1 ? this.$router.push('/zoneList/editZone/' + addOrEdit) : this.$router.push('/zoneList/editZone/' + addOrEdit + '/' + row.id)
// addOrEdit == 1 ? this.$router.push('/zoneList/editZone/' + addOrEdit) : this.$router.push('/zoneList/editZone/' + addOrEdit + '/' + row.id)
var
params
=
{
var
params
=
{
addOrEdit
:
addOrEdit
,
addOrEdit
:
addOrEdit
,
$title
:
encodeURI
(
addOrEdit
==
'add'
?
'新增
信息'
:
'编辑信息
'
)
$title
:
encodeURI
(
addOrEdit
==
'add'
?
'新增
礼包'
:
'编辑礼包
'
)
}
}
addOrEdit
!=
'add'
&&
(
params
.
id
=
row
.
id
)
addOrEdit
!=
'add'
&&
(
params
.
id
=
row
.
id
)
this
.
$router
.
push
({
this
.
$router
.
push
({
...
...
src/views/giftBag/selectGiftDialog.vue
View file @
ebb75af
...
@@ -19,7 +19,10 @@
...
@@ -19,7 +19,10 @@
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
</span>
</span>
</glsx-combi-form>
</glsx-combi-form>
<GLTable
v-loading=
"loading"
ref=
"giftRef"
:tableData=
"giftList"
:noDataImg=
"url"
:tableParams=
"tableParams"
@
refreshTable=
"getList"
@
selectionTable=
"handleSelectionTable"
></GLTable>
<GLTable
v-loading=
"loading"
v-show=
"activeName == 'service'"
ref=
"serviceRef"
:tableData=
"giftList"
:noDataImg=
"url"
:tableParams=
"tableParams"
@
refreshTable=
"getList"
@
selectionTable=
"handleSelectionTable"
></GLTable>
<GLTable
v-loading=
"loading"
v-show=
"activeName == 'cash'"
ref=
"cashRef"
:tableData=
"giftList"
:noDataImg=
"url"
:tableParams=
"tableParams"
@
refreshTable=
"getList"
@
selectionTable=
"handleSelectionTable"
></GLTable>
<GLTable
v-loading=
"loading"
v-show=
"activeName == 'discount'"
ref=
"discountRef"
:tableData=
"giftList"
:noDataImg=
"url"
:tableParams=
"tableParams"
@
refreshTable=
"getList"
@
selectionTable=
"handleSelectionTable"
></GLTable>
<GLTable
v-loading=
"loading"
v-show=
"activeName == 'exchange'"
ref=
"exchangeRef"
:tableData=
"giftList"
:noDataImg=
"url"
:tableParams=
"tableParams"
@
refreshTable=
"getList"
@
selectionTable=
"handleSelectionTable"
></GLTable>
</div>
</div>
</div>
</div>
<div
class=
"selected-list"
>
<div
class=
"selected-list"
>
...
@@ -173,19 +176,22 @@ export default {
...
@@ -173,19 +176,22 @@ export default {
var
params
=
{
var
params
=
{
...
this
.
searchForm
,
...
this
.
searchForm
,
discountType
:
this
.
selectedGiftList
[
this
.
activeName
].
discountType
,
discountType
:
this
.
selectedGiftList
[
this
.
activeName
].
discountType
,
pageNum
:
isReset
?
1
:
this
.
$refs
.
giftRef
.
page
.
pageNum
,
pageNum
:
isReset
?
1
:
this
.
$refs
[
this
.
activeName
+
'Ref'
]
.
page
.
pageNum
,
pageSize
:
isReset
?
10
:
this
.
$refs
.
giftRef
.
page
.
pageSize
pageSize
:
isReset
?
10
:
this
.
$refs
[
this
.
activeName
+
'Ref'
]
.
page
.
pageSize
}
}
this
.
loading
=
true
this
.
loading
=
true
this
.
$apis
.
giftBag
this
.
$apis
.
giftBag
.
getDirectionalGiftListApi
(
params
)
.
getDirectionalGiftListApi
(
params
)
.
then
(
res
=>
{
.
then
(
res
=>
{
this
.
giftList
=
res
.
list
this
.
giftList
=
res
.
list
this
.
giftList
.
forEach
(
item
=>
{
item
.
couponAnticipatedCost
=
item
.
anticipatedCost
})
this
.
fnCallBack
=
true
this
.
fnCallBack
=
true
this
.
$refs
.
giftRef
.
tableTotal
=
res
.
total
this
.
$refs
[
this
.
activeName
+
'Ref'
]
.
tableTotal
=
res
.
total
this
.
recoverySelected
()
this
.
recoverySelected
()
this
.
recoveryTotal
()
this
.
recoveryTotal
()
this
.
$refs
.
giftRef
.
tableHeightValues
=
'50vh'
this
.
$refs
[
this
.
activeName
+
'Ref'
]
.
tableHeightValues
=
'50vh'
})
})
.
finally
(()
=>
{
.
finally
(()
=>
{
this
.
loading
=
false
this
.
loading
=
false
...
@@ -203,7 +209,9 @@ export default {
...
@@ -203,7 +209,9 @@ export default {
recoverySelected
()
{
recoverySelected
()
{
if
(
this
.
selectedGiftList
[
this
.
activeName
].
list
&&
this
.
selectedGiftList
[
this
.
activeName
].
list
.
length
)
{
if
(
this
.
selectedGiftList
[
this
.
activeName
].
list
&&
this
.
selectedGiftList
[
this
.
activeName
].
list
.
length
)
{
this
.
selectedGiftList
[
this
.
activeName
].
list
.
forEach
(
row
=>
{
this
.
selectedGiftList
[
this
.
activeName
].
list
.
forEach
(
row
=>
{
this
.
$refs
.
giftRef
.
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
].
toggleRowSelection
(
row
)
if
(
row
.
status
!=
'3'
)
{
this
.
$refs
[
this
.
activeName
+
'Ref'
].
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
].
toggleRowSelection
(
row
)
}
})
})
}
}
},
},
...
@@ -218,7 +226,7 @@ export default {
...
@@ -218,7 +226,7 @@ export default {
this
.
selectedSum
=
0
this
.
selectedSum
=
0
this
.
orderShow
.
forEach
(
itme
=>
{
this
.
orderShow
.
forEach
(
itme
=>
{
this
.
selectedGiftList
[
itme
].
list
.
forEach
(
subItem
=>
{
this
.
selectedGiftList
[
itme
].
list
.
forEach
(
subItem
=>
{
this
.
selectedSum
=
this
.
selectedSum
+
subItem
.
couponAmount
this
.
selectedSum
=
this
.
selectedSum
+
parseInt
(
subItem
.
couponAmount
)
})
})
})
})
},
},
...
@@ -230,20 +238,23 @@ export default {
...
@@ -230,20 +238,23 @@ export default {
this
.
selectedGiftList
[
this
.
activeName
].
list
=
[]
this
.
selectedGiftList
[
this
.
activeName
].
list
=
[]
val
.
forEach
(
item
=>
{
val
.
forEach
(
item
=>
{
let
isSelected
=
list
.
find
(
k
=>
k
.
id
==
item
.
id
)
let
isSelected
=
list
.
find
(
k
=>
k
.
id
==
item
.
id
)
this
.
selectedGiftList
[
this
.
activeName
].
list
.
push
({
if
(
this
.
selectedGiftList
[
this
.
activeName
].
list
.
findIndex
(
k
=>
k
.
id
==
item
.
id
)
==
'-1'
)
{
id
:
item
.
id
,
this
.
selectedGiftList
[
this
.
activeName
].
list
.
push
({
discountType
:
item
.
discountType
,
id
:
item
.
id
,
couponName
:
item
.
couponName
,
discountType
:
item
.
discountType
,
couponAmount
:
isSelected
?
list
.
find
(
k
=>
k
.
id
==
item
.
id
).
couponAmount
:
'1'
,
couponName
:
item
.
couponName
,
couponAnticipatedCost
:
item
.
anticipatedCost
,
couponAmount
:
isSelected
?
list
.
find
(
k
=>
k
.
id
==
item
.
id
).
couponAmount
:
'1'
,
status
:
'2'
couponAnticipatedCost
:
item
.
couponAnticipatedCost
,
})
status
:
'2'
})
}
})
})
list
.
forEach
(
item
=>
{
list
.
forEach
(
item
=>
{
if
(
item
.
status
==
'3'
)
{
if
(
item
.
status
==
'3'
)
{
this
.
selectedGiftList
[
this
.
activeName
].
list
.
push
(
item
)
this
.
selectedGiftList
[
this
.
activeName
].
list
.
push
(
item
)
}
}
})
})
this
.
recoveryTotal
()
},
},
handleGiftConfirm
()
{
handleGiftConfirm
()
{
...
@@ -259,7 +270,7 @@ export default {
...
@@ -259,7 +270,7 @@ export default {
// })
// })
// return true
// return true
// }
// }
// var selectedData = this.$refs
.giftRef
.mutiSelectArr[this.tableParams.mutiSelectName]
// var selectedData = this.$refs
[this.activeName + 'Ref']
.mutiSelectArr[this.tableParams.mutiSelectName]
var
selectedData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
selectedGiftList
))
var
selectedData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
selectedGiftList
))
this
.
$emit
(
'handleGiftConfirm'
,
selectedData
)
this
.
$emit
(
'handleGiftConfirm'
,
selectedData
)
},
},
...
@@ -359,6 +370,9 @@ export default {
...
@@ -359,6 +370,9 @@ export default {
margin-right
:
7px
;
margin-right
:
7px
;
}
}
}
}
.gift-item
:last-child
{
margin-bottom
:
0
;
}
}
}
.gift-content
:last-child
{
.gift-content
:last-child
{
border-bottom
:
0px
;
border-bottom
:
0px
;
...
...
src/views/giftBag/selectStaffDialog.vue
View file @
ebb75af
...
@@ -97,7 +97,7 @@ export default {
...
@@ -97,7 +97,7 @@ export default {
recoverySelected
()
{
recoverySelected
()
{
if
(
this
.
selectedStaffList
&&
this
.
selectedStaffList
.
length
)
{
if
(
this
.
selectedStaffList
&&
this
.
selectedStaffList
.
length
)
{
this
.
selectedStaffList
.
forEach
(
row
=>
{
this
.
selectedStaffList
.
forEach
(
row
=>
{
row
.
userOneId
=
row
.
staff
Id
row
.
userOneId
=
row
.
staff
UUID
this
.
$refs
.
mutiProRef
.
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
].
toggleRowSelection
(
row
)
this
.
$refs
.
mutiProRef
.
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
].
toggleRowSelection
(
row
)
})
})
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment