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
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
118 additions
and
176 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
This diff is collapsed.
Click to expand it.
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