Commit f75cf6cd by xuyl

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

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