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 6ad06615
authored
Nov 24, 2022
by
zhangquan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
定向礼包增加集团礼包
1 parent
6f62a239
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
232 additions
and
212 deletions
src/api/modules/giftBag.js
src/views/giftBag/editGift.vue
src/views/giftBag/giftList.vue
src/views/giftBag/receivedGiftList.vue
src/views/groupGiftBag/editGift.vue
src/views/groupGiftBag/giftDetail.vue
src/views/groupGiftBag/giftList.vue
src/views/groupGiftBag/selectStaffDialog.vue
src/api/modules/giftBag.js
View file @
6ad0661
...
@@ -140,4 +140,13 @@ const getQrcode = params => {
...
@@ -140,4 +140,13 @@ const getQrcode = params => {
})
})
}
}
export
default
{
getFollowerStaffListApi
,
getListApi
,
giftExportApi
,
deleteGiftApi
,
getGiftInfoApi
,
getReceivedGiftInfoApi
,
exportGiftInfoApi
,
getDirectionalGiftListApi
,
insertGiftApi
,
templateModal
,
getghDirectionalGiftListApi
,
toVoidGift
,
getQrcode
}
const
getGroupGift
=
params
=>
{
params
.
method
=
'scrm.api.coupon.group.directional.gift.list'
return
http
({
url
:
'rop-scrm-coupon/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
export
default
{
getFollowerStaffListApi
,
getListApi
,
giftExportApi
,
deleteGiftApi
,
getGiftInfoApi
,
getReceivedGiftInfoApi
,
exportGiftInfoApi
,
getDirectionalGiftListApi
,
insertGiftApi
,
templateModal
,
getghDirectionalGiftListApi
,
toVoidGift
,
getQrcode
,
getGroupGift
}
src/views/giftBag/editGift.vue
View file @
6ad0661
...
@@ -3,20 +3,16 @@
...
@@ -3,20 +3,16 @@
<div
class=
"edit-gift marketing edit-box"
>
<div
class=
"edit-gift marketing edit-box"
>
<div
class=
"container edit-container"
>
<div
class=
"container edit-container"
>
<p
class=
"edit-title"
>
{{
title
}}
</p>
<p
class=
"edit-title"
>
{{
title
}}
</p>
<el-radio-group
@
change=
"changeGiftType"
v-model=
"giftType"
>
<el-radio
:label=
"1"
>
自选礼包
</el-radio>
<el-radio
:label=
"2"
>
集团礼包
</el-radio>
</el-radio-group>
<glsx-combi-form
v-loading=
"loading"
class=
"edit-form-container m-r-20"
ref=
"editFormRef"
:isEdit=
"isEdit"
:labelWidth=
"defaultLabelWidth"
:isBlock=
"true"
:formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormData"
:formRules=
"editRule"
>
<glsx-combi-form
v-loading=
"loading"
class=
"edit-form-container m-r-20"
ref=
"editFormRef"
:isEdit=
"isEdit"
:labelWidth=
"defaultLabelWidth"
:isBlock=
"true"
:formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormData"
:formRules=
"editRule"
>
<div
slot=
"giftTypeSlot"
>
<div
slot=
"giftTypeSlot"
>
<div
style=
"display:inline-block"
v-for=
"item in giftTypeList"
:key=
"item.value
"
>
<div
:class=
"['gift-type',
{'active-gift': merchantType==item.value}]" v-for="item in giftTypeList" :key="item.value" @click="changeMerchantType(item.value)
">
{{
item
.
name
}}
{{
item
.
name
}}
</div>
</div>
</div>
</div>
<div
slot=
"remarkName"
class=
"edit-tips m-t-8"
>
可根据备注名称进行查找,仅作内部查看,不展示给客户
</div>
<div
slot=
"remarkName"
class=
"edit-tips m-t-8"
>
可根据备注名称进行查找,仅作内部查看,不展示给客户
</div>
<el-button
slot=
"selectGiftBtn"
:disabled=
"routeInfo.receivedStock"
class=
"default-blue-btn"
@
click=
"handleGiftAdd"
>
选择礼包内容
</el-button>
<el-button
slot=
"selectGiftBtn"
:disabled=
"routeInfo.receivedStock"
class=
"default-blue-btn"
@
click=
"handleGiftAdd"
>
选择礼包内容
</el-button>
<div
slot=
"selectGroupGift"
>
<div
slot=
"selectGroupGift
Slot
"
>
<
div
v-for=
"(item,index) in groupList"
:key=
"index"
@
click=
"selectGroupGift(item)"
>
{{
item
.
name
}}
</div
>
<
el-radio
v-for=
"(item,index) in groupList"
:key=
"index"
v-model=
"groupDirectionalGiftId"
:label=
"item.id"
>
{{
item
.
name
}}
</el-radio
>
</div>
</div>
<div
slot=
"couponListBlock"
class=
"gift-block"
:style=
"
{ 'margin-left': defaultLabelWidth }" v-show="editForm.couponList
&&
editForm.couponList.length != 0">
<div
slot=
"couponListBlock"
class=
"gift-block"
:style=
"
{ 'margin-left': defaultLabelWidth }" v-show="editForm.couponList
&&
editForm.couponList.length != 0">
<div
class=
"gift-title"
>
<div
class=
"gift-title"
>
...
@@ -33,7 +29,7 @@
...
@@ -33,7 +29,7 @@
<span
:class=
"['circle', subItem.status == '3' ? ' grey' : '']"
></span>
<span
:class=
"['circle', subItem.status == '3' ? ' grey' : '']"
></span>
<p
:class=
"['gift-coupon-name', subItem.status == '3' ? ' txt-grey' : '']"
>
{{
subItem
.
couponName
}}
×
{{
subItem
.
couponAmount
}}
</p>
<p
:class=
"['gift-coupon-name', subItem.status == '3' ? ' txt-grey' : '']"
>
{{
subItem
.
couponName
}}
×
{{
subItem
.
couponAmount
}}
</p>
<p
v-show=
"subItem.status == '3'"
class=
"gift-tips"
>
已失效
</p>
<p
v-show=
"subItem.status == '3'"
class=
"gift-tips"
>
已失效
</p>
<i
:style=
"
{ cursor: routeInfo.receivedStock ? 'not-allowed' : 'pointer' }" class="el-icon-delete" style="color: #C6C6C6;" @click="handleGiftDelete(item, subIndex)">
</i>
<i
v-if=
"merchantType==1"
:style=
"
{ cursor: routeInfo.receivedStock ? 'not-allowed' : 'pointer' }" class="el-icon-delete" style="color: #C6C6C6;" @click="handleGiftDelete(item, subIndex)">
</i>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -153,7 +149,7 @@ export default {
...
@@ -153,7 +149,7 @@ export default {
phone
:
''
,
phone
:
''
,
isLoaded
:
true
,
isLoaded
:
true
,
loading
:
false
,
loading
:
false
,
gif
tType
:
1
,
merchan
tType
:
1
,
tableSearchForm
:
{
staffName
:
''
},
tableSearchForm
:
{
staffName
:
''
},
phoneList
:
[],
phoneList
:
[],
size
:
'small'
,
size
:
'small'
,
...
@@ -226,7 +222,7 @@ export default {
...
@@ -226,7 +222,7 @@ export default {
},
},
giftTypeList
:
[
giftTypeList
:
[
{
{
name
:
'自
选
礼包'
,
name
:
'自
店
礼包'
,
value
:
1
value
:
1
},
},
{
{
...
@@ -245,9 +241,9 @@ export default {
...
@@ -245,9 +241,9 @@ export default {
required
:
true
,
required
:
true
,
validator
:
(
rule
,
value
,
callback
)
=>
{
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
!
value
)
{
if
(
!
value
)
{
return
callback
(
new
Error
(
'请输入
库存
数量'
))
return
callback
(
new
Error
(
'请输入
礼包
数量'
))
}
else
if
(
this
.
routeInfo
.
id
&&
+
this
.
curStock
>
+
value
&&
this
.
curReceiveRule
!=
4
)
{
}
else
if
(
this
.
routeInfo
.
id
&&
+
this
.
curStock
>
+
value
&&
this
.
curReceiveRule
!=
4
)
{
return
callback
(
new
Error
(
'二次编辑,
库存
数量不能减少'
))
return
callback
(
new
Error
(
'二次编辑,
礼包
数量不能减少'
))
}
else
{
}
else
{
return
callback
()
return
callback
()
}
}
...
@@ -282,14 +278,16 @@ export default {
...
@@ -282,14 +278,16 @@ export default {
{
{
label
:
'礼包类型'
,
label
:
'礼包类型'
,
name
:
''
,
name
:
''
,
addHtml
:
'giftTypeSlot'
addHtml
:
'giftTypeSlot'
,
isHide
:
false
},
},
{
{
label
:
'礼包名称'
,
label
:
'礼包名称'
,
name
:
'name'
,
name
:
'name'
,
isDisabled
:
false
,
isDisabled
:
false
,
type
:
'input'
,
type
:
'input'
,
maxlength
:
15
maxlength
:
15
,
isHide
:
false
},
},
{
{
label
:
'备注名称'
,
label
:
'备注名称'
,
...
@@ -303,12 +301,14 @@ export default {
...
@@ -303,12 +301,14 @@ export default {
{
{
label
:
'礼包设置'
,
label
:
'礼包设置'
,
name
:
'couponList'
,
name
:
'couponList'
,
addHtml
:
'selectGiftBtn'
addHtml
:
'selectGiftBtn'
,
isHide
:
false
},
},
{
{
label
:
'选择礼包'
,
label
:
'选择礼包'
,
name
:
''
,
name
:
'couponList'
,
addHtml
:
'selectGroupGift'
addHtml
:
'selectGroupGiftSlot'
,
isHide
:
true
},
},
{
{
label
:
''
,
label
:
''
,
...
@@ -317,7 +317,7 @@ export default {
...
@@ -317,7 +317,7 @@ export default {
addHtml
:
'couponListBlock'
addHtml
:
'couponListBlock'
},
},
{
{
label
:
'
库存
数量'
,
label
:
'
礼包
数量'
,
name
:
'stock'
,
name
:
'stock'
,
addHtml
:
'stockNumInput'
,
addHtml
:
'stockNumInput'
,
isHide
:
false
isHide
:
false
...
@@ -425,6 +425,7 @@ export default {
...
@@ -425,6 +425,7 @@ export default {
isChangePeople
:
true
,
isChangePeople
:
true
,
currentCoupons
:
[],
currentCoupons
:
[],
currentPeople
:
[],
currentPeople
:
[],
groupDirectionalGiftId
:
''
,
groupList
:[]
groupList
:[]
}
}
},
},
...
@@ -439,12 +440,33 @@ export default {
...
@@ -439,12 +440,33 @@ export default {
},
},
deep
:
true
deep
:
true
},
},
// giftType: {
merchantType
:
{
// handler(val){
handler
(
val
){
let
target
=
this
.
editFormData
.
find
(
item
=>
item
.
addHtml
==
'selectGroupGiftSlot'
)
// },
let
setGiftTarget
=
this
.
editFormData
.
find
(
item
=>
item
.
addHtml
==
'selectGiftBtn'
)
// deep: true
let
nameTarget
=
this
.
editFormData
.
find
(
item
=>
item
.
name
==
'name'
)
// },
target
.
isHide
=
val
==
1
setGiftTarget
.
isHide
=
val
!=
1
nameTarget
.
isHide
=
val
!=
1
if
(
val
==
2
){
this
.
groupDirectionalGiftId
=
this
.
groupList
[
0
]?.
id
}
else
{
this
.
editForm
.
name
=
''
this
.
groupDirectionalGiftId
=
''
}
},
deep
:
true
},
groupDirectionalGiftId
:
{
handler
(
val
){
if
(
this
.
merchantType
==
2
){
let
target
=
this
.
groupList
.
find
(
item
=>
item
.
id
==
this
.
groupDirectionalGiftId
)
this
.
editForm
.
name
=
target
.
name
this
.
selectGroupGiftFn
(
target
)
}
},
deep
:
true
},
'editForm.couponList'
:
{
'editForm.couponList'
:
{
handler
(
val
)
{
handler
(
val
)
{
this
.
isChangeCoupons
=
this
.
judgeAddOrDel
(
val
,
this
.
currentCoupons
,
'id'
)
this
.
isChangeCoupons
=
this
.
judgeAddOrDel
(
val
,
this
.
currentCoupons
,
'id'
)
...
@@ -475,6 +497,7 @@ export default {
...
@@ -475,6 +497,7 @@ export default {
},
},
mounted
()
{
mounted
()
{
this
.
setMinHeight
()
this
.
setMinHeight
()
this
.
getGroupGift
()
this
.
routeInfo
=
this
.
$route
.
query
this
.
routeInfo
=
this
.
$route
.
query
if
(
this
.
routeInfo
.
receivedStock
)
this
.
routeInfo
.
receivedStock
=
+
this
.
routeInfo
.
receivedStock
if
(
this
.
routeInfo
.
receivedStock
)
this
.
routeInfo
.
receivedStock
=
+
this
.
routeInfo
.
receivedStock
this
.
title
=
this
.
titleObj
[
this
.
routeInfo
.
addOrEdit
]
this
.
title
=
this
.
titleObj
[
this
.
routeInfo
.
addOrEdit
]
...
@@ -489,17 +512,45 @@ export default {
...
@@ -489,17 +512,45 @@ export default {
}
}
})
})
}
}
let
a
=
'{"discount":{"label":"折扣券","discountType":2,"list":[]},"cash":{"label":"代金券","discountType":3,"list":[{"id":581,"discountType":3,"couponName":"验证关联商品-全部商品","couponAmount":1,"couponAnticipatedCost":100,"status":"2"},{"id":569,"discountType":3,"couponName":"礼包线上代金劵","couponAmount":1,"couponAnticipatedCost":750,"status":"2"}]},"exchange":{"label":"兑换券","discountType":4,"list":[]},"service":{"label":"会员服务","discountType":7,"list":[{"id":1074,"discountType":7,"couponName":"xxx123123123123","couponAmount":1,"couponAnticipatedCost":3200,"status":"2"}]}}'
let
b
=
'{"discount":{"label":"折扣券","discountType":2,"list":[]},"cash":{"label":"代金券","discountType":3,"list":[]},"exchange":{"label":"兑换券","discountType":4,"list":[]},"service":{"label":"会员服务","discountType":7,"list":[{"id":1074,"discountType":7,"couponName":"xxx123123123123","couponAmount":1,"couponAnticipatedCost":3200,"status":"2"},{"id":1072,"discountType":7,"couponName":"xx123","couponAmount":1,"couponAnticipatedCost":100,"status":"2"},{"id":1071,"discountType":7,"couponName":"xx222","couponAmount":1,"couponAnticipatedCost":100,"status":"2"}]}}'
this
.
groupList
=
[
{
name
:
'第一个礼包'
,
gift
:
JSON
.
parse
(
a
)},
{
name
:
'大爱的礼包'
,
gift
:
JSON
.
parse
(
b
)}
]
},
},
methods
:
{
methods
:
{
selectGroupGift
(
item
){
changeMerchantType
(
val
){
console
.
log
(
item
)
this
.
merchantType
=
val
this
.
handleGiftConfirm
(
item
.
gift
)
if
(
val
==
1
){
this
.
orderShow
.
forEach
(
item
=>
{
this
.
couponObj
[
item
].
list
=
[]
})
this
.
editForm
.
couponList
=
[]
this
.
hasCouponBlock
(
false
)
}
},
getGroupGift
(){
this
.
$apis
.
giftBag
.
getGroupGift
({}).
then
(
res
=>
{
let
giftArr
=
[]
if
(
res
?.
length
){
let
Obj
=
this
.
$common
.
utils
.
deepClone
(
this
.
couponObj
)
this
.
orderShow
.
forEach
(
item
=>
{
Obj
[
item
].
list
=
[]
})
res
.
forEach
(
ele
=>
{
let
gift
=
this
.
$common
.
utils
.
deepClone
(
Obj
)
console
.
log
(
JSON
.
stringify
(
Obj
))
const
{
id
,
name
,
couponDTOList
}
=
ele
couponDTOList
.
forEach
(
item
=>
{
gift
[
this
.
numToCoupon
[
item
.
discountType
]].
list
.
push
(
item
)
})
giftArr
.
push
({
id
,
name
,
gift
})
})
this
.
groupList
=
this
.
$common
.
utils
.
deepClone
(
giftArr
)
}
else
{
let
target
=
this
.
editFormData
.
find
(
item
=>
item
.
addHtml
==
'giftTypeSlot'
)
target
.
isHide
=
true
}
})
},
selectGroupGiftFn
(
item
){
let
gift
=
this
.
$common
.
utils
.
deepClone
(
item
.
gift
)
this
.
handleGiftConfirm
(
gift
,
'group'
)
},
},
//员工查询
//员工查询
handleSearch
()
{
handleSearch
()
{
...
@@ -555,6 +606,10 @@ export default {
...
@@ -555,6 +606,10 @@ export default {
this
.
approvalStatus
=
res
.
data
.
approveStatus
-
1
this
.
approvalStatus
=
res
.
data
.
approveStatus
-
1
this
.
editForm
=
res
.
data
this
.
editForm
=
res
.
data
this
.
curStock
=
res
.
data
.
stock
this
.
curStock
=
res
.
data
.
stock
this
.
merchantType
=
res
.
data
.
merchantType
this
.
$nextTick
(()
=>
{
this
.
groupDirectionalGiftId
=
res
.
data
.
groupDirectionalGiftId
})
this
.
curReceiveRule
=
res
.
data
.
receiveRule
this
.
curReceiveRule
=
res
.
data
.
receiveRule
this
.
receiveWay
=
res
.
data
.
receiveWay
||
1
this
.
receiveWay
=
res
.
data
.
receiveWay
||
1
if
(
res
.
data
&&
res
.
data
.
receiveDetails
)
{
if
(
res
.
data
&&
res
.
data
.
receiveDetails
)
{
...
@@ -636,9 +691,11 @@ export default {
...
@@ -636,9 +691,11 @@ export default {
this
.
selectedGiftList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
couponObj
))
this
.
selectedGiftList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
couponObj
))
this
.
handleGiftClose
()
this
.
handleGiftClose
()
},
},
handleGiftConfirm
(
selectedData
)
{
handleGiftConfirm
(
selectedData
,
type
)
{
console
.
log
(
selectedData
,
'selectedData'
)
console
.
log
(
selectedData
,
'selectedData'
)
this
.
handleGiftClose
()
if
(
type
!=
'group'
){
this
.
handleGiftClose
()
}
this
.
couponObj
=
selectedData
this
.
couponObj
=
selectedData
this
.
recoveryTotalPrice
()
this
.
recoveryTotalPrice
()
this
.
recoveryGiftList
()
this
.
recoveryGiftList
()
...
@@ -692,7 +749,7 @@ export default {
...
@@ -692,7 +749,7 @@ export default {
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
=>
{
params
.
couponCreateRequests
.
forEach
(
item
=>
{
item
.
couponId
=
item
.
id
item
.
couponId
=
this
.
merchantType
==
2
?
item
.
couponId
:
item
.
id
})
})
if
(
this
.
editForm
.
receiveRule
==
1
||
this
.
editForm
.
receiveRule
==
4
)
{
if
(
this
.
editForm
.
receiveRule
==
1
||
this
.
editForm
.
receiveRule
==
4
)
{
params
.
receiveDetailList
=
this
.
phoneList
.
map
(
item
=>
item
.
tel
)
params
.
receiveDetailList
=
this
.
phoneList
.
map
(
item
=>
item
.
tel
)
...
@@ -713,6 +770,8 @@ export default {
...
@@ -713,6 +770,8 @@ export default {
}
}
}
}
params
.
requestSource
=
1
params
.
requestSource
=
1
params
.
merchantType
=
this
.
merchantType
if
(
this
.
merchantType
==
2
)
params
.
groupDirectionalGiftId
=
this
.
groupDirectionalGiftId
// 插入判断是否存在审批模板
// 插入判断是否存在审批模板
// const { session } = this.$globalState
// const { session } = this.$globalState
if
(
this
.
editForm
.
receiveRule
==
1
||
this
.
editForm
.
receiveRule
==
4
)
{
if
(
this
.
editForm
.
receiveRule
==
1
||
this
.
editForm
.
receiveRule
==
4
)
{
...
@@ -822,6 +881,25 @@ export default {
...
@@ -822,6 +881,25 @@ export default {
}
}
}
}
}
}
.gift-type
{
display
:
inline-block
;
border
:
1px
solid
#D5D5D5
;
box-sizing
:
border-box
;
text-align
:
center
;
width
:
70px
;
height
:
20px
;
line-height
:
20px
;
font-weight
:
400
;
font-size
:
12px
;
color
:
rgba
(
0
,
0
,
0
,
0.65
);
cursor
:
pointer
;
}
.active-gift
{
background
:
#5850FF
;
border
:
1px
solid
#5850FF
;
color
:
#fff
;
}
.approval-tip
{
.approval-tip
{
font-size
:
12px
;
font-size
:
12px
;
font-weight
:
400
;
font-weight
:
400
;
...
...
src/views/giftBag/giftList.vue
View file @
6ad0661
...
@@ -28,7 +28,10 @@
...
@@ -28,7 +28,10 @@
</div>
</div>
</div>
</div>
<div
slot=
"name"
slot-scope=
"scope"
>
<div
slot=
"name"
slot-scope=
"scope"
>
<p
class=
"cursor-pointer"
@
click=
"handleDetail(scope.scope)"
>
{{
scope
.
scope
.
name
}}
</p>
<div
class=
"gift-name"
>
<div
class=
"group-label"
v-if=
"scope.scope.merchantType==2"
>
集团
</div>
<div
class=
"cursor-pointer"
@
click=
"handleDetail(scope.scope)"
>
{{
scope
.
scope
.
name
}}
</div>
</div>
</div>
</div>
<!--
<div
style=
"display: flex;align-items: center;"
slot=
"approveStatus"
slot-scope=
"scope"
>
<!--
<div
style=
"display: flex;align-items: center;"
slot=
"approveStatus"
slot-scope=
"scope"
>
<div
class=
"approve-status"
:style=
"
{ 'background-color': approvalStatusColor[scope.scope.approveStatus - 1] }">
</div>
<div
class=
"approve-status"
:style=
"
{ 'background-color': approvalStatusColor[scope.scope.approveStatus - 1] }">
</div>
...
@@ -82,7 +85,10 @@ export default {
...
@@ -82,7 +85,10 @@ export default {
},
},
attrs
:
{
attrs
:
{
type
:
'text'
,
type
:
'text'
,
fn
:
'编辑'
fn
:
'编辑'
,
disabled
:
row
=>
{
return
row
.
scope
.
merchantType
==
2
&&
row
.
scope
.
receivedStock
}
},
},
listeners
:
{
listeners
:
{
click
:
row
=>
this
.
handleEdit
(
'edit'
,
row
.
scope
)
click
:
row
=>
this
.
handleEdit
(
'edit'
,
row
.
scope
)
...
@@ -544,6 +550,26 @@ export default {
...
@@ -544,6 +550,26 @@ export default {
}
}
}
}
}
}
.gift-name
{
display
:
flex
;
align-items
:
center
;
.group-label{
width
:
42px
;
height
:
20px
;
line-height
:
20px
;
text-align
:
center
;
background
:
rgba
(
255
,
101
,
61
,
0.15
);
border-radius
:
4px
;
margin-right
:
4px
;
font-size
:
12px
;
color
:
#FF653D
;
}
.cursor-pointer
{
height
:
20px
;
line-height
:
20px
;
}
}
.gift-detail
{
.gift-detail
{
padding
:
0
200px
0
10px
;
padding
:
0
200px
0
10px
;
...
...
src/views/giftBag/receivedGiftList.vue
View file @
6ad0661
...
@@ -22,15 +22,18 @@
...
@@ -22,15 +22,18 @@
<!-- 表格区域 开始 -->
<!-- 表格区域 开始 -->
<GLTable
ref=
"receivedGiftListRef"
:getListApi=
"getListApi"
:hasNum=
"false"
:noDataImg=
"url"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
>
<GLTable
ref=
"receivedGiftListRef"
:getListApi=
"getListApi"
:hasNum=
"false"
:noDataImg=
"url"
:searchForm=
"tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn"
@
setTableFinishFun=
"setTableFinishFun"
>
<span
slot=
"directionalGiftName"
slot-scope=
"scope"
>
<span
slot=
"directionalGiftName"
slot-scope=
"scope"
>
<el-tooltip
effect=
"dark"
:content=
"scope.scope.directionalGiftName"
placement=
"top-start"
>
<div
class=
"gift-name-slot"
>
<p
class=
"gift-name"
@
click=
"handleDetail(scope.scope)"
>
<div
class=
"group-label"
v-if=
"scope.scope.merchantType==2"
>
集团
</div>
{{
scope
.
scope
.
directionalGiftName
}}
<el-tooltip
effect=
"dark"
:content=
"scope.scope.directionalGiftName"
placement=
"top-start"
>
</p>
<p
class=
"gift-name"
@
click=
"handleDetail(scope.scope)"
>
</el-tooltip>
{{
scope
.
scope
.
directionalGiftName
}}
<span
v-if=
"scope.scope.receiveStatus == 2"
class=
"void-label"
>
已作废
</span>
</p>
<el-tooltip
effect=
"dark"
:content=
"scope.scope.cancelReason"
placement=
"top-start"
>
</el-tooltip>
<p
class=
"void-reason"
v-if=
"scope.scope.receiveStatus == 2"
>
作废原因:
{{
scope
.
scope
.
cancelReason
||
'--'
}}
</p>
<span
v-if=
"scope.scope.receiveStatus == 2"
class=
"void-label"
>
已作废
</span>
</el-tooltip>
<el-tooltip
effect=
"dark"
:content=
"scope.scope.cancelReason"
placement=
"top-start"
>
<p
class=
"void-reason"
v-if=
"scope.scope.receiveStatus == 2"
>
作废原因:
{{
scope
.
scope
.
cancelReason
||
'--'
}}
</p>
</el-tooltip>
</div>
</span>
</span>
<div
slot=
"giftInfo"
slot-scope=
"scope"
>
<div
slot=
"giftInfo"
slot-scope=
"scope"
>
<GLTable
class=
"secondTable"
ref=
"giftListRef"
:hasNum=
"false"
:hasPage=
"false"
:noDataImg=
"url"
:tableParams=
"giftParams"
:tableData=
"scope.scope | filterTable"
@
setTableFinishFun=
"setGiftTableFinishFun"
></GLTable>
<GLTable
class=
"secondTable"
ref=
"giftListRef"
:hasNum=
"false"
:hasPage=
"false"
:noDataImg=
"url"
:tableParams=
"giftParams"
:tableData=
"scope.scope | filterTable"
@
setTableFinishFun=
"setGiftTableFinishFun"
></GLTable>
...
@@ -279,7 +282,7 @@ export default {
...
@@ -279,7 +282,7 @@ export default {
{
{
label
:
'礼包名称'
,
label
:
'礼包名称'
,
width
:
2
00
,
width
:
3
00
,
addHtml
:
'directionalGiftName'
addHtml
:
'directionalGiftName'
},
},
{
{
...
@@ -523,6 +526,22 @@ export default {
...
@@ -523,6 +526,22 @@ export default {
.secondTable
{
.secondTable
{
padding-left
:
10px
;
padding-left
:
10px
;
}
}
.group-label
{
width
:
42px
;
height
:
20px
;
line-height
:
20px
;
text-align
:
center
;
background
:
rgba
(
255
,
101
,
61
,
0.15
);
border-radius
:
4px
;
margin-right
:
4px
;
font-size
:
12px
;
color
:
#FF653D
;
flex-shrink
:
0
;
}
.gift-name-slot
{
display
:
flex
;
align-items
:
center
;
}
.gift-name
{
.gift-name
{
color
:
#5850ff
;
color
:
#5850ff
;
margin
:
0
;
margin
:
0
;
...
@@ -542,7 +561,7 @@ export default {
...
@@ -542,7 +561,7 @@ export default {
text-align
:
center
;
text-align
:
center
;
line-height
:
18px
;
line-height
:
18px
;
background
:
#eeeded
;
background
:
#eeeded
;
margin-top
:
2px
;
flex-shrink
:
0
;
}
}
.void-reason
{
.void-reason
{
font-size
:
10px
;
font-size
:
10px
;
...
@@ -551,7 +570,6 @@ export default {
...
@@ -551,7 +570,6 @@ export default {
overflow
:
hidden
;
overflow
:
hidden
;
white-space
:
nowrap
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
margin
:
4px
0
0
;
}
}
.void-dialog
{
.void-dialog
{
/deep/
.el-dialog__body
{
/deep/
.el-dialog__body
{
...
...
src/views/groupGiftBag/editGift.vue
View file @
6ad0661
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
slot=
"merchantSlot"
>
<div
class=
"merchant-radio"
slot=
"merchantSlot"
>
<el-checkbox-group
v-model=
"editForm.merchantList"
>
<el-checkbox-group
v-model=
"editForm.merchantList"
>
<el-checkbox
v-for=
"item in merchantList"
:label=
"item.merchantNo"
:key=
"item.merchantNo"
>
{{
item
.
merchantName
}}
</el-checkbox>
<el-checkbox
v-for=
"item in merchantList"
:label=
"item.merchantNo"
:key=
"item.merchantNo"
>
{{
item
.
merchantName
}}
</el-checkbox>
</el-checkbox-group>
</el-checkbox-group>
...
@@ -289,17 +289,17 @@ export default {
...
@@ -289,17 +289,17 @@ export default {
handleConfirm
()
{
handleConfirm
()
{
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
let
couponCreateRequest
s
=
[],
storeCreateRequestList
=
[];
let
couponCreateRequest
List
=
[],
storeCreateRequestList
=
[];
this
.
editForm
.
couponList
.
forEach
(
item
=>
{
this
.
editForm
.
couponList
.
forEach
(
item
=>
{
const
{
id
:
couponId
,
couponAmount
,
couponAnticipatedCost
}
=
item
const
{
id
:
couponId
,
couponAmount
,
couponAnticipatedCost
}
=
item
couponCreateRequest
s
.
push
({
couponId
,
couponAmount
,
couponAnticipatedCost
})
couponCreateRequest
List
.
push
({
couponId
,
couponAmount
,
couponAnticipatedCost
})
})
})
this
.
editForm
.
merchantList
.
forEach
(
item
=>
{
this
.
editForm
.
merchantList
.
forEach
(
item
=>
{
let
target
=
this
.
merchantList
.
find
(
ele
=>
ele
.
merchantNo
==
item
)
let
target
=
this
.
merchantList
.
find
(
ele
=>
ele
.
merchantNo
==
item
)
target
&&
storeCreateRequestList
.
push
({
merchantId
:
target
.
merchantNo
,
merchantName
:
target
.
merchantName
})
target
&&
storeCreateRequestList
.
push
({
merchantId
:
target
.
merchantNo
,
merchantName
:
target
.
merchantName
})
})
})
let
params
=
{
let
params
=
{
couponCreateRequest
s
,
couponCreateRequest
List
,
name
:
this
.
editForm
.
name
,
name
:
this
.
editForm
.
name
,
storeCreateRequestList
storeCreateRequestList
}
}
...
@@ -362,7 +362,10 @@ export default {
...
@@ -362,7 +362,10 @@ export default {
.marketing.edit-gift
.select-merchant
{
.marketing.edit-gift
.select-merchant
{
width
:
98%
;
width
:
98%
;
}
}
.edit-container
{
height
:
calc
(
100vh
-
156px
);
min-height
:
700px
;
}
.marketing.edit-gift
{
.marketing.edit-gift
{
//
礼包
//
礼包
.gift-block
{
.gift-block
{
...
@@ -416,6 +419,15 @@ export default {
...
@@ -416,6 +419,15 @@ export default {
}
}
}
}
}
}
.merchant-radio
{
width
:
878px
;
max-height
:
98px
;
overflow
:
auto
;
border
:
1px
solid
#E5E5E5
;
box-sizing
:
border-box
;
border-radius
:
4px
;
padding
:
10px
20px
;
}
//
发放员工
//
发放员工
.sale-select
{
.sale-select
{
display
:
flex
;
display
:
flex
;
...
...
src/views/groupGiftBag/giftDetail.vue
View file @
6ad0661
...
@@ -24,8 +24,13 @@
...
@@ -24,8 +24,13 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"merchant-radio"
slot=
"merchantSlot"
>
<el-checkbox-group
v-model=
"editForm.merchantList"
>
<el-checkbox
v-for=
"item in merchantList"
:label=
"item.merchantNo"
:key=
"item.merchantNo"
>
{{
item
.
merchantName
}}
</el-checkbox>
</el-checkbox-group>
</div>
</glsx-combi-form>
</glsx-combi-form>
<div
class=
"approval_note_container"
>
<
!--
<
div
class=
"approval_note_container"
>
<div
class=
"line"
></div>
<div
class=
"line"
></div>
<div
class=
"note_container"
>
<div
class=
"note_container"
>
<div
class=
"left"
>
<div
class=
"left"
>
...
@@ -37,7 +42,7 @@
...
@@ -37,7 +42,7 @@
<span
class=
""
>
修改人:
{{
editForm
.
updatedBy
}}
</span>
<span
class=
""
>
修改人:
{{
editForm
.
updatedBy
}}
</span>
</div>
</div>
</div>
</div>
</div>
</div>
-->
</div>
</div>
<GLFooter>
<GLFooter>
<el-button
@
click=
"handleCancel"
size=
"medium"
>
取消
</el-button>
<el-button
@
click=
"handleCancel"
size=
"medium"
>
取消
</el-button>
...
@@ -66,8 +71,10 @@ export default {
...
@@ -66,8 +71,10 @@ export default {
name
:
''
,
name
:
''
,
// 优惠券类型(discountType) 1:满减券,2:折扣券,3:代金券,4:兑换券,5:购车代金券,6:商品折扣券,7:会员服务
// 优惠券类型(discountType) 1:满减券,2:折扣券,3:代金券,4:兑换券,5:购车代金券,6:商品折扣券,7:会员服务
// 优惠券状态(status):1:未生效,2:生效中,3:已失效
// 优惠券状态(status):1:未生效,2:生效中,3:已失效
couponList
:
[]
couponList
:
[],
merchantList
:[]
},
},
merchantList
:[],
totalEstimatedCost
:
''
,
totalEstimatedCost
:
''
,
orderShow
:
[
'service'
,
'cash'
,
'discount'
,
'exchange'
],
orderShow
:
[
'service'
,
'cash'
,
'discount'
,
'exchange'
],
numToCoupon
:
{
numToCoupon
:
{
...
@@ -105,6 +112,7 @@ export default {
...
@@ -105,6 +112,7 @@ export default {
editRule
:
{
editRule
:
{
name
:
[{
required
:
true
,
message
:
'请输入礼包名称'
,
trigger
:
'change'
}],
name
:
[{
required
:
true
,
message
:
'请输入礼包名称'
,
trigger
:
'change'
}],
couponList
:
[{
required
:
true
,
message
:
'请选择礼包'
,
trigger
:
'change'
}],
couponList
:
[{
required
:
true
,
message
:
'请选择礼包'
,
trigger
:
'change'
}],
merchantList
:
[{
required
:
true
,
message
:
'请选择门店'
,
trigger
:
'change'
}],
},
},
isEdit
:
true
,
isEdit
:
true
,
editFormData
:
[
editFormData
:
[
...
@@ -118,6 +126,11 @@ export default {
...
@@ -118,6 +126,11 @@ export default {
name
:
'couponList'
,
name
:
'couponList'
,
addHtml
:
'couponListBlock'
addHtml
:
'couponListBlock'
},
},
{
label
:
'下发门店'
,
name
:
'merchantList'
,
addHtml
:
'merchantSlot'
}
],
],
}
}
},
},
...
@@ -126,15 +139,29 @@ export default {
...
@@ -126,15 +139,29 @@ export default {
this
.
routeInfo
=
this
.
$route
.
query
this
.
routeInfo
=
this
.
$route
.
query
this
.
loading
=
true
this
.
loading
=
true
this
.
getInfo
()
this
.
getInfo
()
this
.
getMerchant
()
},
},
methods
:
{
methods
:
{
getMerchant
(){
const
{
session
}
=
this
.
$globalState
||
{}
const
param
=
{
supMerchantNo
:
session
.
merchantId
,
merchantAccountLevel
:
4
}
this
.
$apis
.
groupGiftBag
.
getMerchantListApi
(
param
).
then
(
res
=>
{
this
.
merchantList
=
res
||
[]
this
.
editForm
.
merchantList
=
res
.
map
(
item
=>
item
.
merchantNo
)
})
},
getInfo
()
{
getInfo
()
{
this
.
$apis
.
giftBag
this
.
$apis
.
g
roupG
iftBag
.
getGiftInfoApi
({
id
:
this
.
routeInfo
.
id
})
.
getGiftInfoApi
({
id
:
this
.
routeInfo
.
id
})
.
then
(
res
=>
{
.
then
(
res
=>
{
res
.
data
.
createdDate
=
dayjs
(
res
.
data
.
createdDate
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
res
.
data
.
createdDate
=
dayjs
(
res
.
data
.
createdDate
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
res
.
data
.
updatedDate
=
dayjs
(
res
.
data
.
updatedDate
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
res
.
data
.
updatedDate
=
dayjs
(
res
.
data
.
updatedDate
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
res
.
data
.
couponList
=
res
.
data
.
couponDTOList
res
.
data
.
merchantList
=
res
?.
data
?.
storeList
.
map
(
item
=>
item
.
merchantId
)
this
.
editForm
=
res
.
data
this
.
editForm
=
res
.
data
this
.
recoveryCoupon
()
this
.
recoveryCoupon
()
this
.
recoveryTotalPrice
()
this
.
recoveryTotalPrice
()
...
@@ -169,7 +196,7 @@ export default {
...
@@ -169,7 +196,7 @@ export default {
handleCancel
()
{
handleCancel
()
{
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
'/giftBag/index'
,
path
:
'/g
roupG
iftBag/index'
,
query
:
{
type
:
this
.
routeInfo
.
type
}
query
:
{
type
:
this
.
routeInfo
.
type
}
})
})
}
}
...
...
src/views/groupGiftBag/giftList.vue
View file @
6ad0661
...
@@ -132,10 +132,6 @@ export default {
...
@@ -132,10 +132,6 @@ export default {
addHtml
:
'name'
addHtml
:
'name'
},
},
{
{
label
:
'礼包明细'
,
prop
:
'name'
,
},
{
label
:
'预估成本/元'
,
label
:
'预估成本/元'
,
prop
:
'anticipatedCost'
,
prop
:
'anticipatedCost'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
...
@@ -157,7 +153,7 @@ export default {
...
@@ -157,7 +153,7 @@ export default {
label
:
'已领取'
,
label
:
'已领取'
,
prop
:
'stock'
,
prop
:
'stock'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
return
cellValue
.
received
Stock
||
'0'
return
cellValue
.
received
Amount
||
'0'
}
}
}
}
]
]
...
...
src/views/groupGiftBag/selectStaffDialog.vue
deleted
100644 → 0
View file @
6f62a23
<!-- 选择员工弹窗 -->
<
template
>
<GLDialog
class=
"muti-pro"
:close-on-click-modal=
"false"
bigTitle=
"选择员工"
mode=
"big"
:before-close=
"handleMutiSelectClose"
:visible
.
sync=
"isMutiSelectVisible"
@
onOk=
"handleMutiSelectConfirm"
@
onCancel=
"handleMutiSelectClose"
v-loading=
"loading"
>
<!--
<div
class=
"noproDiv"
v-show=
"!staffList.length && fnCallBack"
>
<img
src=
"@/assets/noPro.png"
/>
<p
class=
"noproP"
>
系统暂无已创建的员工
</p>
</div>
-->
<div>
<slot
name=
"search"
></slot>
<GLTable
v-loading=
"loading"
ref=
"mutiProRef"
:tableData=
"staffList"
:pageConf=
"pageConf"
:noDataImg=
"url"
:tableParams=
"tableParams"
@
refreshTable=
"getList"
></GLTable>
</div>
</GLDialog>
</
template
>
<
script
>
import
url
from
'@/assets/empty.png'
export
default
{
name
:
'selectStaffDialog'
,
data
()
{
return
{
// 表格组件
userInfo
:
{},
staffList
:
[],
selectList
:
[],
fnCallBack
:
false
,
url
:
url
,
loading
:
true
,
tableSearchForm
:
{
staffName
:
''
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
},
// 表格参数
tableParams
:
{
listName
:
'list'
,
// 行数据的key
mutiSelectUniqueKey
:
'userOneId'
,
// 多选ref的名称
mutiSelectName
:
'list'
,
tableColumns
:
[
{
label
:
'姓名'
,
prop
:
'staffName'
},
{
label
:
'部门'
,
prop
:
'departmentName'
},
{
label
:
'跟进员工类型'
,
prop
:
'followerTypeName'
}
]
}
}
},
props
:
{
isMutiSelectVisible
:
{
type
:
Boolean
,
default
:
false
},
searchForm
:
{
type
:
Object
,
default
:
()
=>
{}
},
selectedStaffList
:
{
type
:
Array
,
default
:
()
=>
[]
}
},
mounted
()
{
this
.
userInfo
=
this
.
$globalState
.
session
this
.
selectList
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
selectedStaffList
))
this
.
selectList
.
map
(
item
=>
(
item
.
userOneId
=
item
.
staffUUID
))
this
.
getList
({},
true
)
},
methods
:
{
getList
(
page
,
isResetPage
=
false
)
{
var
params
=
{
...
this
.
searchForm
,
pageNum
:
isResetPage
?
1
:
this
.
$refs
.
mutiProRef
.
page
.
pageNum
,
pageSize
:
isResetPage
?
10
:
this
.
$refs
.
mutiProRef
.
page
.
pageSize
}
this
.
loading
=
true
this
.
$apis
.
giftBag
.
getFollowerStaffListApi
(
params
).
then
(
res
=>
{
// 重置分页组件
if
(
this
.
$refs
.
mutiProRef
&&
isResetPage
)
{
this
.
$refs
.
mutiProRef
.
page
.
pageNum
=
1
this
.
$refs
.
mutiProRef
.
page
.
pageSize
=
10
}
this
.
staffList
=
res
.
data
this
.
loading
=
false
this
.
fnCallBack
=
true
this
.
$refs
.
mutiProRef
.
tableTotal
=
res
.
count
this
.
$nextTick
(()
=>
{
this
.
recoverySelected
()
})
this
.
$refs
.
mutiProRef
.
tableHeightValues
=
'50vh'
})
},
recoverySelected
()
{
if
(
this
.
selectedStaffList
&&
this
.
selectedStaffList
.
length
)
{
this
.
selectedStaffList
.
forEach
(
row
=>
{
row
.
userOneId
=
row
.
staffUUID
this
.
$nextTick
(()
=>
{
let
idx
=
this
.
$refs
.
mutiProRef
.
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
].
data
.
findIndex
(
item
=>
item
.
userOneId
==
row
.
staffUUID
)
if
(
idx
>
-
1
)
{
try
{
this
.
$refs
.
mutiProRef
.
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
].
toggleRowSelection
(
this
.
$refs
.
mutiProRef
.
$refs
[
this
.
tableParams
.
mutiSelectName
+
'MutiTable'
].
data
[
idx
],
true
)
let
id
=
this
.
selectList
.
findIndex
(
item
=>
item
.
staffUUID
==
row
.
staffUUID
)
if
(
id
>
-
1
)
this
.
selectList
.
splice
(
id
,
1
)
}
catch
(
err
)
{
console
.
log
(
err
)
}
}
})
})
}
},
handleMutiSelectConfirm
()
{
var
selectedData
=
[...
this
.
$refs
.
mutiProRef
.
mutiSelectArr
[
this
.
tableParams
.
mutiSelectName
],
...
this
.
selectList
]
this
.
$emit
(
'handleMutiSelectConfirm'
,
selectedData
)
},
handleMutiSelectClose
()
{
this
.
$emit
(
'handleMutiSelectClose'
)
}
}
}
</
script
>
<
style
>
.muti-pro
.m-t-10
{
margin-top
:
10px
;
}
.muti-pro
.noproP
{
width
:
100%
;
height
:
20px
;
font-family
:
PingFangSC-Medium
;
font-size
:
16px
;
color
:
#666666
;
line-height
:
20px
;
font-weight
:
500
;
text-align
:
center
;
}
</
style
>
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