Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
glsx-oss-task
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 e372ee0b
authored
Dec 16, 2022
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
联调
1 parent
731c8ac7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
140 additions
and
111 deletions
src/views/profitManagement/profitList/cpns/ProfitSearch.vue
src/views/profitManagement/profitList/index.vue
src/views/task/addTask/index.vue
src/views/task/taskList/index.vue
src/views/profitManagement/profitList/cpns/ProfitSearch.vue
View file @
e372ee0
...
...
@@ -27,10 +27,10 @@
placeholder=
"所属业务场景"
>
<el-option
label=
"全部"
value=
""
></el-option>
<el-option
label=
"1.0
新车权益
升级"
value=
"0"
></el-option>
<el-option
label=
"1.1
新车
精品升级"
value=
"1"
></el-option>
<el-option
label=
"1.2
新车
膨胀金活动"
value=
"2"
></el-option>
<el-option
label=
"1.3
售后直播
众筹活动"
value=
"3"
></el-option>
<el-option
label=
"1.0
车损
升级"
value=
"0"
></el-option>
<el-option
label=
"1.1精品升级"
value=
"1"
></el-option>
<el-option
label=
"1.2膨胀金活动"
value=
"2"
></el-option>
<el-option
label=
"1.3众筹活动"
value=
"3"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"所属商户:"
>
...
...
@@ -135,8 +135,8 @@ export default {
profitSearchForm
:
{
businessScene
:
''
,
channel
:
''
,
isWithdrawal
:
''
,
exchangeStatus
:
''
isWithdrawal
:
''
,
exchangeStatus
:
''
,
},
}
},
...
...
@@ -152,7 +152,7 @@ export default {
this
.
defalutStartTime
,
this
.
defalutEndTime
,
])
this
.
$emit
(
'sendResetTable'
,
'reset'
)
this
.
$emit
(
'sendResetTable'
,
'reset'
)
this
.
$nextTick
(()
=>
{
this
.
handleSearch
()
})
...
...
src/views/profitManagement/profitList/index.vue
View file @
e372ee0
<
template
>
<div
style=
'margin: 16px'
>
<ProfitSearch
ref=
'profitSearch'
@
sendSearchForm=
'getSearchForm'
@
sendResetTable=
'reset'
/>
<el-button
type=
'primary'
size=
'small'
@
click=
'handleOutput'
>
导出
</el-button
>
<el-button
size=
'small'
type=
'primary'
@
click=
'handleWriteOff()'
>
批量核销
</el-button
>
<div
class=
'cumulativeAward'
>
累计发放奖励:
{{
totalScore
}}
</div>
<div
style=
"margin: 16px"
>
<ProfitSearch
ref=
"profitSearch"
@
sendSearchForm=
"getSearchForm"
@
sendResetTable=
"reset"
/>
<el-button
type=
"primary"
size=
"small"
@
click=
"handleOutput"
>
导出
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"handleWriteOff()"
>
批量核销
</el-button>
<div
class=
"cumulativeAward"
>
累计发放奖励:
{{
totalScore
}}
</div>
<d2-table
class=
'my-row-height'
ref=
'profitTable'
:hasNum=
'true'
@
sendAlldata=
'getTotalScore'
:tableParams=
'profitTableParams'
:searchForm=
'profitSearchForm'
:getListApi=
'getListApi'
:pageConf=
'pageConf'
:pageSize=
'[20,50,100,200,500]'
class=
"my-row-height"
ref=
"profitTable"
:hasNum=
"true"
@
sendAlldata=
"getTotalScore"
:tableParams=
"profitTableParams"
:searchForm=
"profitSearchForm"
:getListApi=
"getListApi"
:pageConf=
"pageConf"
:pageSize=
"[20, 50, 100, 200, 500]"
>
<div
slot=
'isWithdrawal'
slot-scope=
'scope'
>
{{
scope
.
scope
.
isWithdrawal
==
'1'
?
'是'
:
scope
.
scope
.
isWithdrawal
==
'2'
?
'否'
:
''
}}
<div
slot=
"isWithdrawal"
slot-scope=
"scope"
>
{{
scope
.
scope
.
isWithdrawal
==
'1'
?
'是'
:
scope
.
scope
.
isWithdrawal
==
'2'
?
'否'
:
''
}}
</div>
<div
slot=
'exchangeStatus'
slot-scope=
'scope'
>
{{
scope
.
scope
.
exchangeStatus
==
'1'
?
'已核销'
:
scope
.
scope
.
exchangeStatus
==
'2'
?
'未核销'
:
''
}}
<div
slot=
"exchangeStatus"
slot-scope=
"scope"
>
{{
scope
.
scope
.
exchangeStatus
==
'1'
?
'已核销'
:
scope
.
scope
.
exchangeStatus
==
'2'
?
'未核销'
:
''
}}
</div>
<div
slot=
'businessScene'
slot-scope=
'scope'
>
<span
v-if=
"scope.scope.businessScene == '0'"
>
1.0 新车权益升级
</span>
<span
v-if=
"scope.scope.businessScene == '1'"
>
1.1 新车精品升级
</span>
<span
v-if=
"scope.scope.businessScene == '2'"
>
1.2 新车膨胀金活动
</span>
<span
v-if=
"scope.scope.businessScene == '3'"
>
1.3 售后直播众筹活动
</span
>
<div
slot=
"businessScene"
slot-scope=
"scope"
>
<span
v-if=
"scope.scope.businessScene == '0'"
>
1.0车损升级
</span>
<span
v-if=
"scope.scope.businessScene == '1'"
>
1.1精品升级
</span>
<span
v-if=
"scope.scope.businessScene == '2'"
>
1.2膨胀金活动
</span>
<span
v-if=
"scope.scope.businessScene == '3'"
>
1.3众筹活动
</span>
</div>
<div
slot=
'channel'
slot-scope=
'scope'
>
<div
slot=
"channel"
slot-scope=
"scope"
>
<span
v-if=
"scope.scope.channel == '1'"
>
广联
</span>
<span
v-if=
"scope.scope.channel == '2'"
>
门店
</span>
<span
v-if=
"scope.scope.channel == '3'"
>
服务商
</span>
</div>
</d2-table>
<el-dialog
title=
'提示'
:visible
.
sync=
'dialogVisible'
width=
'30%'
>
<div
class=
'verificationPoints'
>
核销积分确认,核销后积分不可恢复
</div>
<el-dialog
title=
"提示"
:visible
.
sync=
"dialogVisible"
width=
"30%"
>
<div
class=
"verificationPoints"
>
核销积分确认,核销后积分不可恢复
</div>
<div>
<p>
涉及门店:
{{
writeOffData
.
numberOfStores
}}
家
</p>
<p>
涉及员工数:
{{
writeOffData
.
employeeCount
}}
人
</p>
<p>
核销积分总分:
{{
writeOffData
.
totalPoints
}}
</p>
</div>
<span
slot=
'footer'
class=
'dialog-footer'
>
<el-button
@
click=
'dialogVisible = false'
>
取 消
</el-button>
<el-button
type=
'primary'
@
click=
'handleDebounce'
>
确 定
</el-button
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"handleDebounce"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
...
...
@@ -70,7 +77,7 @@ import { profitApi } from '@/api/profitManagement'
export
default
{
name
:
'WithdrawalSearch'
,
components
:
{
ProfitSearch
ProfitSearch
,
},
data
()
{
return
{
...
...
@@ -78,7 +85,7 @@ export default {
writeOffData
:
{
numberOfStores
:
''
,
employeeCount
:
''
,
totalPoints
:
''
totalPoints
:
''
,
},
verificationWriteOff
:
true
,
profitSearchForm
:
{},
...
...
@@ -89,7 +96,7 @@ export default {
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'data.count'
totalCount
:
'data.count'
,
},
getListApi
:
profitApi
.
searchProfitList
,
profitTableParams
:
{
...
...
@@ -99,63 +106,63 @@ export default {
tableColumns
:
[
{
label
:
'员工名称'
,
prop
:
'staffName'
prop
:
'staffName'
,
},
{
label
:
'员工手机号'
,
prop
:
'staffPhone'
prop
:
'staffPhone'
,
},
{
label
:
'奖励积分值'
,
prop
:
'rewardScore'
prop
:
'rewardScore'
,
},
{
label
:
'关联任务'
,
prop
:
'missionName'
prop
:
'missionName'
,
},
{
label
:
'发放渠道'
,
prop
:
'channel'
,
addHtml
:
'channel'
addHtml
:
'channel'
,
},
{
label
:
'所属活动/产品'
,
prop
:
'activityName'
prop
:
'activityName'
,
},
{
label
:
'所属商户'
,
prop
:
'merchantName'
prop
:
'merchantName'
,
},
{
label
:
'所属业务场景'
,
prop
:
'businessScene'
,
addHtml
:
'businessScene'
addHtml
:
'businessScene'
,
},
{
label
:
'奖励时间'
,
prop
:
'rewardTime'
prop
:
'rewardTime'
,
},
{
label
:
'支持积分提现'
,
prop
:
'isWithdrawal'
,
addHtml
:
'isWithdrawal'
addHtml
:
'isWithdrawal'
,
},
{
label
:
'核销状态'
,
prop
:
'exchangeStatus'
,
addHtml
:
'exchangeStatus'
addHtml
:
'exchangeStatus'
,
},
{
label
:
'核销时间'
,
prop
:
'exchangeTime'
prop
:
'exchangeTime'
,
},
{
label
:
'核销人'
,
prop
:
'exchangeStaff'
}
]
prop
:
'exchangeStaff'
,
}
,
]
,
},
timeout
:
null
timeout
:
null
,
}
},
methods
:
{
...
...
@@ -164,12 +171,16 @@ export default {
if
(
this
.
choiceData
&&
this
.
choiceData
.
length
==
'0'
)
{
this
.
$message
({
type
:
'error'
,
message
:
'请勾选需要核销的积分记录!'
message
:
'请勾选需要核销的积分记录!'
,
})
return
}
this
.
verificationWriteOff
=
this
.
choiceData
.
every
(
item
=>
{
if
(
!
item
.
isWithdrawal
||
item
.
isWithdrawal
==
'1'
||
item
.
exchangeStatus
==
'1'
)
{
this
.
verificationWriteOff
=
this
.
choiceData
.
every
((
item
)
=>
{
if
(
!
item
.
isWithdrawal
||
item
.
isWithdrawal
==
'1'
||
item
.
exchangeStatus
==
'1'
)
{
return
false
}
else
{
return
true
...
...
@@ -178,7 +189,8 @@ export default {
if
(
!
this
.
verificationWriteOff
)
{
return
this
.
$message
({
type
:
'error'
,
message
:
'所选中的积分记录包含「是否积分提现=是」或「核销状态=已核销」,请剔除后再进行操作!'
message
:
'所选中的积分记录包含「是否积分提现=是」或「核销状态=已核销」,请剔除后再进行操作!'
,
})
}
this
.
processSelectedData
()
...
...
@@ -190,10 +202,14 @@ export default {
let
totalPoints
=
0
this
.
choiceDataBack
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
choiceData
))
this
.
processArray
=
this
.
choiceData
.
reduce
((
curr
,
next
)
=>
{
obj
[
next
.
staffPhone
]
?
''
:
obj
[
next
.
staffPhone
]
=
curr
.
push
(
next
)
numberOfStoresArr
.
includes
(
next
.
merchantName
)
?
''
:
numberOfStoresArr
.
push
((
next
.
merchantName
))
obj
[
next
.
staffPhone
]
?
''
:
(
obj
[
next
.
staffPhone
]
=
curr
.
push
(
next
))
numberOfStoresArr
.
includes
(
next
.
merchantName
)
?
''
:
numberOfStoresArr
.
push
(
next
.
merchantName
)
console
.
log
(
totalPoints
)
next
.
rewardScore
?
totalPoints
+=
next
.
rewardScore
:
totalPoints
+=
0
next
.
rewardScore
?
(
totalPoints
+=
next
.
rewardScore
)
:
(
totalPoints
+=
0
)
return
curr
},
[])
this
.
$set
(
this
.
writeOffData
,
'numberOfStores'
,
numberOfStoresArr
.
length
)
...
...
@@ -201,18 +217,35 @@ export default {
this
.
$set
(
this
.
writeOffData
,
'employeeCount'
,
this
.
processArray
.
length
)
},
getSeletedData
()
{
this
.
choiceData
=
this
.
$refs
.
profitTable
.
mutiSelectArr
.
list
&&
this
.
$refs
.
profitTable
.
mutiSelectArr
.
list
.
map
(
item
=>
{
let
{
exchangeStatus
,
staffPhone
,
merchantName
,
isWithdrawal
,
rewardScore
,
id
}
=
item
return
{
exchangeStatus
,
staffPhone
,
merchantName
,
isWithdrawal
,
rewardScore
,
id
}
this
.
choiceData
=
this
.
$refs
.
profitTable
.
mutiSelectArr
.
list
&&
this
.
$refs
.
profitTable
.
mutiSelectArr
.
list
.
map
((
item
)
=>
{
let
{
exchangeStatus
,
staffPhone
,
merchantName
,
isWithdrawal
,
rewardScore
,
id
,
}
=
item
return
{
exchangeStatus
,
staffPhone
,
merchantName
,
isWithdrawal
,
rewardScore
,
id
,
}
})
},
handleDebounce
:
debounce
(
async
function
(){
let
arr
=
[]
this
.
choiceDataBack
&&
this
.
choiceDataBack
.
forEach
(
item
=>
arr
.
push
(
item
.
id
))
const
params
=
{
idList
:
arr
}
await
profitApi
.
verificationPoints
({
...
params
}).
then
(
res
=>
{
handleDebounce
:
debounce
(
async
function
()
{
let
arr
=
[]
this
.
choiceDataBack
&&
this
.
choiceDataBack
.
forEach
((
item
)
=>
arr
.
push
(
item
.
id
))
const
params
=
{
idList
:
arr
}
await
profitApi
.
verificationPoints
({
...
params
})
.
then
((
res
)
=>
{
if
(
res
.
code
==
'0'
)
{
this
.
$message
.
success
(
'积分核销成功'
)
this
.
dialogVisible
=
false
...
...
@@ -220,19 +253,18 @@ export default {
}
else
{
this
.
$message
.
error
(
'积分核销失败'
)
}
}).
catch
(
err
=>
{
})
.
catch
((
err
)
=>
{
this
.
$message
.
error
(
err
)
})
this
.
dialogVisible
=
false
},
1000
),
this
.
dialogVisible
=
false
},
1000
),
// 导出
handleOutput
()
{
let
params
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
profitSearchForm
))
let
pageConfig
=
{
pageSize
:
9999
,
pageNum
:
1
pageNum
:
1
,
}
profitApi
.
exportProfitList
({
...
params
,
...
pageConfig
}).
then
((
res
)
=>
{
if
(
res
.
code
==
0
)
{
...
...
@@ -240,7 +272,7 @@ export default {
}
else
{
this
.
$message
({
type
:
'error'
,
message
:
'导出失败!'
message
:
'导出失败!'
,
})
}
})
...
...
@@ -274,8 +306,8 @@ export default {
getTotalScore
(
val
)
{
let
{
totalScore
}
=
val
this
.
totalScore
=
totalScore
}
}
}
,
}
,
}
</
script
>
...
...
src/views/task/addTask/index.vue
View file @
e372ee0
...
...
@@ -18,7 +18,8 @@
size=
"small"
:disabled=
"isEditor"
>
<el-option
label=
"1.3 售后直播众筹活动"
:value=
"3"
></el-option>
<el-option
label=
"1.2膨胀金活动"
:value=
"2"
></el-option>
<el-option
label=
"1.3众筹活动"
:value=
"3"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"商户:"
prop=
"merchantId"
>
...
...
@@ -60,10 +61,10 @@
placeholder=
"请选择任务指定人群"
size=
"small"
>
<el-option
label=
"1.0
新车权益
升级"
value=
"0"
></el-option>
<el-option
label=
"1.1
新车
精品升级"
value=
"1"
></el-option>
<el-option
label=
"1.2
次新车
膨胀金活动"
value=
"2"
></el-option>
<el-option
label=
"1.3
售后直播
众筹活动"
value=
"3"
></el-option>
<el-option
label=
"1.0
车损
升级"
value=
"0"
></el-option>
<el-option
label=
"1.1精品升级"
value=
"1"
></el-option>
<el-option
label=
"1.2膨胀金活动"
value=
"2"
></el-option>
<el-option
label=
"1.3众筹活动"
value=
"3"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"发放渠道:"
prop=
"channel"
>
...
...
src/views/task/taskList/index.vue
View file @
e372ee0
...
...
@@ -77,14 +77,10 @@
:pageConf=
"pageConf"
>
<div
slot=
"businessScene"
slot-scope=
"scope"
>
<span
v-if=
"scope.scope.businessScene == 0"
>
1.0 新车权益升级
</span>
<span
v-if=
"scope.scope.businessScene == 1"
>
1.1 新车精品升级
</span>
<span
v-if=
"scope.scope.businessScene == 2"
>
1.2 次新车膨胀金活动
</span
>
<span
v-if=
"scope.scope.businessScene == 3"
>
1.3 售后直播众筹活动
</span
>
<span
v-if=
"scope.scope.businessScene == 0"
>
1.0车损升级
</span>
<span
v-if=
"scope.scope.businessScene == 1"
>
1.1精品升级
</span>
<span
v-if=
"scope.scope.businessScene == 2"
>
1.2膨胀金活动
</span>
<span
v-if=
"scope.scope.businessScene == 3"
>
1.3众筹活动
</span>
</div>
<div
slot=
"activityStatus"
slot-scope=
"scope"
>
<span
v-if=
"scope.scope.activityStatus == statusNum.UNPUBLISH"
...
...
@@ -150,19 +146,19 @@ const sceneOption = [
value
:
''
,
},
{
label
:
'1.0
新车权益
升级'
,
label
:
'1.0
车损
升级'
,
value
:
'0'
,
},
{
label
:
'1.1
新车
精品升级'
,
label
:
'1.1精品升级'
,
value
:
'1'
,
},
{
label
:
'1.2
次新车
膨胀金活动'
,
label
:
'1.2膨胀金活动'
,
value
:
'2'
,
},
{
label
:
'1.3
售后直播
众筹活动'
,
label
:
'1.3众筹活动'
,
value
:
'3'
,
},
]
...
...
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