Commit f75cf6cd by xuyl

收益管理、查看任务、任务分析更新联调

1 parent cb662c3c
<template>
<div style='margin: 16px'>
<ProfitSearch @sendSearchForm='getSearchForm' />
<ProfitSearch ref='profitSearch' @sendSearchForm='getSearchForm' />
<el-button type='primary' size='small' @click='handleOutput'
>导出
</el-button
......@@ -80,6 +80,7 @@ export default {
employeeCount: '',
totalPoints: ''
},
verificationWriteOff:true,
profitSearchForm: {},
dialogVisible: false,
totalScore: '',
......@@ -108,24 +109,6 @@ export default {
prop: 'rewardScore'
},
{
label: '支持积分提现',
prop: 'isWithdrawal',
addHtml: 'isWithdrawal'
},
{
label: '核销状态',
prop: 'exchangeStatus',
addHtml: 'exchangeStatus'
},
{
label: '核销人',
prop: 'exchangeStaff'
},
{
label: '核销时间',
prop: 'exchangeTime'
},
{
label: '关联任务',
prop: 'missionName'
},
......@@ -150,6 +133,24 @@ export default {
{
label: '奖励时间',
prop: 'rewardTime'
},
{
label: '支持积分提现',
prop: 'isWithdrawal',
addHtml: 'isWithdrawal'
},
{
label: '核销状态',
prop: 'exchangeStatus',
addHtml: 'exchangeStatus'
},
{
label: '核销时间',
prop: 'exchangeTime'
},
{
label: '核销人',
prop: 'exchangeStaff'
}
]
}
......@@ -166,16 +167,21 @@ export default {
return
}
this.choiceData.forEach(item => {
if (item.isWithdrawal == '2' || item.exchangeStatus == '2') {
this.$message({
type: 'error',
message: '所选中的积分记录包含「是否积分提现=否」或「核销状态=已核销」,请剔除后再进行操作!'
})
return
if (item.isWithdrawal == '2' || item.exchangeStatus == '1') {
console.log(item)
this.verificationWriteOff = false
} else {
this.verificationWriteOff = true
}
})
this.processSelectedData()
this.dialogVisible = true
if (!this.verificationWriteOff){
return this.$message({
type: 'error',
message: '所选中的积分记录包含「是否积分提现=否」或「核销状态=已核销」,请剔除后再进行操作!'
})
}
this.processSelectedData()
this.dialogVisible = true
},
processSelectedData() {
let obj = {}
......@@ -203,10 +209,11 @@ export default {
let arr = []
this.processArray && this.processArray.forEach(item => arr.push(item.id))
const params = { idList: arr }
await profitApi.verificationPoints({ params }).then(res => {
await profitApi.verificationPoints({ ...params }).then(res => {
if (res.code == '0') {
this.$message.success('积分核销成功')
this.dialogVisible = false
this.$refs.profitSearch.reset()
} else {
this.$message.error('积分核销失败')
}
......
......@@ -43,6 +43,11 @@ export default {
name: '发放渠道:',
value: 'channelName',
id:'channelName'
},
{
name: '积分提现:',
value: 'withdrawalFlag',
id:'withdrawalFlag'
}
]
}
......@@ -55,6 +60,9 @@ export default {
Object.keys(newVal).forEach(key => {
if (item.id == key) {
item.value = newVal[key]
if (item.id == 'withdrawalFlag') {
item.value = '1' ? '员工发起提现' : item.value = '2' ? '运营从后台核销' : ''
}
}
})
})
......
......@@ -2,8 +2,8 @@
<div class='basicInfo'>
<div class='headline'>基础信息</div>
<div v-for='(item,index) in basicInfoList' :key='index' class='basicInfoList'>
<span class='infoName'>{{item.infoName}}</span>
<span>{{item.infoVal}}</span>
<span class='infoName'>{{ item.infoName }}</span>
<span>{{ item.infoVal }}</span>
</div>
</div>
</template>
......@@ -11,33 +11,39 @@
<script>
export default {
name: 'BasicInfo',
props:{
basicInfo:{
type:Object,
default:{}
props: {
basicInfo: {
type: Object,
default: {}
}
},
data(){
return{
basicInfoList:[
{infoName:'业务场景:',infoVal:'businessSceneName',id:'businessSceneName'},
{infoName:'商户:',infoVal:'merchantName',id:'merchantName'},
{infoName:'活动/产品:',infoVal:'activityName',id:'activityName'},
{infoName:'任务指定人群:',infoVal:'crowdName',id:'crowdName'},
{infoName:'发放渠道:',infoVal:'channelName',id:'channelName'},
{infoName:'备注:',infoVal:'remark',id:'remark'},
data() {
return {
basicInfoList: [
{ infoName: '业务场景:', infoVal: 'businessSceneName', id: 'businessSceneName' },
{ infoName: '商户:', infoVal: 'merchantName', id: 'merchantName' },
{ infoName: '活动/产品:', infoVal: 'activityName', id: 'activityName' },
{ infoName: '任务指定人群:', infoVal: 'crowdName', id: 'crowdName' },
{ infoName: '发放渠道:', infoVal: 'channelName', id: 'channelName' },
{ infoName: '积分提现:', infoVal: 'withdrawalFlag', id: 'withdrawalFlag' },
{ infoName: '备注:', infoVal: 'remark', id: 'remark' }
]
}
},
watch: {
basicInfo:{
handler(newVal,oldVal){
basicInfo: {
handler(newVal, oldVal) {
console.log(newVal, oldVal)
if (!oldVal || newVal !== oldVal) {
this.basicInfoList.map(item => {
Object.keys(newVal).forEach(key => {
if (item.id == key) {
item.infoVal = newVal[key]
if (item.id == 'withdrawalFlag') {
item.infoVal = '1' ? '员工发起提现' : item.infoVal = '2' ? '运营从后台核销' : ''
}
}
})
})
}
......@@ -50,16 +56,18 @@ export default {
</script>
<style scoped>
.headline{
.headline {
font-weight: 600;
padding-bottom: 20px;
}
.basicInfoList{
.basicInfoList {
font-size: 14px;
display: flex;
padding: 8px 0;
}
.infoName{
.infoName {
color: #999999;
width: 120px;
padding-right: 16px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!