Commit 9b37430f by 前端

Merge branch 'xuyl_dev_v2.12.0' into 'v2.12.0'

Xuyl dev v2.12.0

See merge request !13
2 parents 534fe1c9 4d2ad04f
...@@ -48,8 +48,8 @@ ...@@ -48,8 +48,8 @@
<el-select v-model='profitSearchForm.channel' placeholder='请选择发放渠道'> <el-select v-model='profitSearchForm.channel' placeholder='请选择发放渠道'>
<el-option label='全部' value=''></el-option> <el-option label='全部' value=''></el-option>
<el-option label='广联' value='1'></el-option> <el-option label='广联' value='1'></el-option>
<el-option label='服务商' value='2'></el-option> <el-option label='门店' value='2'></el-option>
<el-option label='门店' value='3'></el-option> <el-option label='服务商' value='3'></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label='关联任务:'> <el-form-item label='关联任务:'>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<div class='cumulativeAward'>累计发放奖励:{{ totalScore }}</div> <div class='cumulativeAward'>累计发放奖励:{{ totalScore }}</div>
<d2-table <d2-table
class='my-row-height' class='my-row-height'
ref='withdrawalTable' ref='profitTable'
:hasNum='true' :hasNum='true'
@sendAlldata ='getTotalScore' @sendAlldata ='getTotalScore'
:tableParams='profitTableParams' :tableParams='profitTableParams'
...@@ -13,6 +13,18 @@ ...@@ -13,6 +13,18 @@
:getListApi='getListApi' :getListApi='getListApi'
:pageConf='pageConf' :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>
</div>
<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> </d2-table>
</div> </div>
</template> </template>
...@@ -58,7 +70,8 @@ export default { ...@@ -58,7 +70,8 @@ export default {
}, },
{ {
label: '发放渠道', label: '发放渠道',
prop: 'channel' prop: 'channel',
addHtml: 'channel'
}, },
{ {
label: '所属活动/产品', label: '所属活动/产品',
...@@ -70,7 +83,8 @@ export default { ...@@ -70,7 +83,8 @@ export default {
}, },
{ {
label: '所属业务场景', label: '所属业务场景',
prop: 'businessScene' prop: 'businessScene',
addHtml:'businessScene'
}, },
{ {
label: '奖励时间', label: '奖励时间',
...@@ -106,7 +120,9 @@ export default { ...@@ -106,7 +120,9 @@ export default {
} }
if(params.rewardTime && params.rewardTime.length) delete params.rewardTime if(params.rewardTime && params.rewardTime.length) delete params.rewardTime
this.profitSearchForm = params this.profitSearchForm = params
this.$refs.withdrawalTable.refreshTable() setTimeout(() =>{
this.$refs.profitTable.refreshTable()
},500)
}, },
getTotalScore(val){ getTotalScore(val){
let {totalScore} = val let {totalScore} = val
......
...@@ -5,8 +5,22 @@ ...@@ -5,8 +5,22 @@
<p>{{ item.missonTypeName }}</p> <p>{{ item.missonTypeName }}</p>
<p>{{ item.missionName }}</p> <p>{{ item.missionName }}</p>
<p>{{ item.missonDesc }}</p> <p>{{ item.missonDesc }}</p>
<p>{{ item.text }}</p> <template
<img :src='item.img'> v-if=" item.platformMerchantMissionMaterialResponseList && item.platformMerchantMissionMaterialResponseList[0].materialType == '1'">
<p>{{ item.platformMerchantMissionMaterialResponseList[0].materialContent }}</p>
</template>
<template
v-if="item.platformMerchantMissionMaterialResponseList &&item.platformMerchantMissionMaterialResponseList[0].materialType == '2'">
<img :src='item.platformMerchantMissionMaterialResponseList[0].materialContent'>
</template>
<template
v-if="item.platformMerchantMissionMaterialResponseList &&item.platformMerchantMissionMaterialResponseList[0].materialType == '3'">
<video :src='item.platformMerchantMissionMaterialResponseList[0].materialContent' />
</template>
<template
v-if="item.platformMerchantMissionMaterialResponseList && item.platformMerchantMissionMaterialResponseList[0].materialType == '4'">
<p>{{ item.platformMerchantMissionMaterialResponseList[0].materialContent }}</p>
</template>
<div class='taskAward'> <div class='taskAward'>
<div class='awardMode'> <div class='awardMode'>
<p>奖励模式:{{ item.rewardTypeName }}</p> <p>奖励模式:{{ item.rewardTypeName }}</p>
...@@ -18,7 +32,7 @@ ...@@ -18,7 +32,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class='copyLine' id="copy" v-on:click="copy(item.id)"> <div class='copyLine' id='copy' v-on:click='copy(item.id)'>
复制任务提醒链接 复制任务提醒链接
</div> </div>
</div> </div>
...@@ -27,35 +41,34 @@ ...@@ -27,35 +41,34 @@
<script> <script>
import { taskManagementApi } from '@/api/taskManagement' import { taskManagementApi } from '@/api/taskManagement'
export default { export default {
name: 'TaskDetails', name: 'TaskDetails',
props: { props: {
taskDetails: { taskDetails: {
type: Object, type: Array,
default: {} default: []
} }
}, },
data() { data() {
return { return {}
}
}, },
methods:{ methods: {
async copy (id) { async copy(id) {
await taskManagementApi.getStaffMissionLink({missionId: id}).then(res =>{ await taskManagementApi.getStaffMissionLink({ missionId: id }).then(res => {
if(res.code == '0' && res.data){ if (res.code == '0' && res.data) {
var input = document.createElement('input') var input = document.createElement('input')
input.value = res.data; input.value = res.data
document.body.appendChild(input) document.body.appendChild(input)
input.select() input.select()
document.execCommand('copy') document.execCommand('copy')
this.$message.success('复制成功!') this.$message.success('复制成功!')
document.body.removeChild(input) document.body.removeChild(input)
}else{ } else {
this.$message.error('复制失败!') this.$message.error('复制失败!')
} }
}) })
}, }
} }
} }
</script> </script>
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<TaskDetails :taskDetails='taskDetails'></TaskDetails> <TaskDetails v-if='hasTaskDetails' :taskDetails='taskDetails'></TaskDetails>
<TaskTable ref='taskTable' :taskTableSearchForm='searchForm'></TaskTable> <TaskTable ref='taskTable' :taskTableSearchForm='searchForm'></TaskTable>
<div class='footer'> <div class='footer'>
<el-button @click='backUp'>返回</el-button> <el-button @click='backUp'>返回</el-button>
...@@ -40,6 +40,7 @@ export default { ...@@ -40,6 +40,7 @@ export default {
data() { data() {
return { return {
hastaskInfo: false, hastaskInfo: false,
hasTaskDetails:false,
searchForm: {}, searchForm: {},
taskInfo: {}, taskInfo: {},
taskSelect: [], taskSelect: [],
...@@ -48,7 +49,7 @@ export default { ...@@ -48,7 +49,7 @@ export default {
taskDetails: [] taskDetails: []
} }
}, },
mounted() { mounted() {
this.$root.eventBus.$on('params', params => { this.$root.eventBus.$on('params', params => {
let taskId = params.taskId let taskId = params.taskId
this.primaryInfo(taskId) this.primaryInfo(taskId)
...@@ -57,8 +58,8 @@ export default { ...@@ -57,8 +58,8 @@ export default {
methods: { methods: {
primaryInfo(id){ primaryInfo(id) {
taskManagementApi.findMissionDeail({ id }).then(res => { taskManagementApi.findMissionDeail({ id }).then(res => {
let copeWithRes = res.data.platformMerchantMissionDateResponseList let copeWithRes = res.data.platformMerchantMissionDateResponseList
let { businessSceneName, merchantName, activityName, crowdName, channelName } = res.data let { businessSceneName, merchantName, activityName, crowdName, channelName } = res.data
this.taskInfo = { businessSceneName, merchantName, activityName, crowdName, channelName } this.taskInfo = { businessSceneName, merchantName, activityName, crowdName, channelName }
...@@ -69,7 +70,7 @@ export default { ...@@ -69,7 +70,7 @@ export default {
this.taskTime.missonTypeName = copeWithRes[0].platformMerchantMissionResponseList[0].missonTypeName this.taskTime.missonTypeName = copeWithRes[0].platformMerchantMissionResponseList[0].missonTypeName
this.taskSelectItem = copeWithRes[0].platformMerchantMissionResponseList this.taskSelectItem = copeWithRes[0].platformMerchantMissionResponseList
this.changeactivityTask(this.taskTime.missonTypeName) this.changeactivityTask(this.taskTime.missonTypeName)
}) })
}, },
changeactivityTime(val) { changeactivityTime(val) {
this.taskSelectMap.forEach(item => { this.taskSelectMap.forEach(item => {
...@@ -82,10 +83,12 @@ export default { ...@@ -82,10 +83,12 @@ export default {
this.changeactivityTask(this.taskTime.missonTypeName) this.changeactivityTask(this.taskTime.missonTypeName)
}, },
changeactivityTask(val) { changeactivityTask(val) {
let selectItem = this.taskSelectItem.filter(item => { let selectItem = this.taskSelectItem && this.taskSelectItem.filter(item => {
return item.missonTypeName == val return item.missonTypeName == val
}) })
this.taskDetails = selectItem this.taskDetails = selectItem
this.hasTaskDetails = this.taskDetails && this.taskDetails.length ? 'true' : 'false'
let id = selectItem[0].id let id = selectItem[0].id
this.searchForm = { missionId: id } this.searchForm = { missionId: id }
this.$nextTick(() => { this.$nextTick(() => {
......
<template> <template>
<div class='taskPlan'> <div class='taskPlan'>
<div class='headline'>任务计划</div> <div class='headline'>任务计划</div>
<el-tabs v-model='activeName' type='card' @tab-click='handleClick'> <el-tabs v-model='activeName' type='card'>
<el-tab-pane v-for='(item,index) in taskPlanList' :key='index' :label='item.activityTime' :name='item.activityTime'> <el-tab-pane v-for='(item,index) in taskPlanList' :key='index' :label='item.activityTime' :name='item.activityTime'>
<div class='taskInfo' v-for='(displayList,idx) in item.platformMerchantMissionResponseList' :key='idx'> <div class='taskInfo' v-for='(displayList,idx) in item.platformMerchantMissionResponseList' :key='idx'>
<p class='taskType'>{{ displayList.missonTypeName }}</p> <p class='taskType'>{{ displayList.missonTypeName }}</p>
...@@ -29,7 +29,7 @@ export default { ...@@ -29,7 +29,7 @@ export default {
} }
}, },
created() { created() {
this.activeName = this.taskPlanList[0].activityTime this.activeName = this.taskPlanList && this.taskPlanList[0].activityTime
} }
} }
</script> </script>
......
...@@ -36,8 +36,8 @@ export default { ...@@ -36,8 +36,8 @@ export default {
'任务管理列表' '任务管理列表'
]) ])
}, },
async primaryInfo(id) { primaryInfo(id) {
await taskManagementApi.findMissionDeail(id).then(res => { taskManagementApi.findMissionDeail({ id }).then(res => {
let { businessScene, merchantName, activityName, crowdName, channelName, remark } = res.data let { businessScene, merchantName, activityName, crowdName, channelName, remark } = res.data
this.basicInfo = { businessScene, merchantName, activityName, crowdName, channelName, remark } this.basicInfo = { businessScene, merchantName, activityName, crowdName, channelName, remark }
this.hasbasicInfo = Object.values(this.basicInfo).length > 0 ? 'true' : 'false' this.hasbasicInfo = Object.values(this.basicInfo).length > 0 ? 'true' : 'false'
......
...@@ -329,7 +329,6 @@ export default { ...@@ -329,7 +329,6 @@ export default {
}, },
// 跳转查看详情 // 跳转查看详情
handleViewDetail(scope) { handleViewDetail(scope) {
console.log(scope)
this.$root.to([ this.$root.to([
'任务中心', '任务中心',
'任务平台', '任务平台',
......
...@@ -78,7 +78,7 @@ export default { ...@@ -78,7 +78,7 @@ export default {
this.$set(this.withdrawalSearchForm, 'withdrawalTime', [this.defalutStartTime, this.defalutEndTime]) this.$set(this.withdrawalSearchForm, 'withdrawalTime', [this.defalutStartTime, this.defalutEndTime])
}, },
mounted() { mounted() {
this.handleSearch() this.handleSearch()
}, },
methods: { methods: {
handleSearch() { handleSearch() {
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
<d2-table <d2-table
class='my-row-height' class='my-row-height'
ref='withdrawalTable' ref='withdrawalTable'
:tableData='tableData'
:hasNum='true' :hasNum='true'
:tableParams='withdrawalTableParams' :tableParams='withdrawalTableParams'
:searchForm='searchForm' :searchForm='searchForm'
......
...@@ -9,14 +9,14 @@ ...@@ -9,14 +9,14 @@
>批量审核 >批量审核
</el-button </el-button
> >
<!-- <el-button--> <!-- <el-button-->
<!-- size='small'--> <!-- size='small'-->
<!-- type='primary'--> <!-- type='primary'-->
<!-- @click="handleDialog('transfer')"--> <!-- @click="handleDialog('transfer')"-->
<!-- >--> <!-- >-->
<!-- 批量重新发起转账--> <!-- 批量重新发起转账-->
<!-- </el-button--> <!-- </el-button-->
<!-- >--> <!-- >-->
<el-button <el-button
size='small' size='small'
type='primary' type='primary'
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
<p>到账中:{{ collectionCash.receivingAmount }};</p> <p>到账中:{{ collectionCash.receivingAmount }};</p>
<p>已到账:{{ collectionCash.receivedAmount }}</p> <p>已到账:{{ collectionCash.receivedAmount }}</p>
</div> </div>
<WithdrawalTable ref='withdrawalTable' :searchForm='searchForm' @sendCollection='getCollection' /> <WithdrawalTable ref='table' :searchForm='searchForm' @sendCollection='getCollection' />
<WithdrawalDialog :textTooltip='textTooltip' :auditId='auditId' ref='dialogRef' /> <WithdrawalDialog :textTooltip='textTooltip' :auditId='auditId' ref='dialogRef' />
</div> </div>
</template> </template>
<script> <script>
...@@ -55,11 +55,11 @@ export default { ...@@ -55,11 +55,11 @@ export default {
searchForm: {}, searchForm: {},
choiceStatus: [], choiceStatus: [],
auditId: [], auditId: [],
collectionCash:{} collectionCash: {}
} }
}, },
methods: { methods: {
getCollection(val){ getCollection(val) {
this.collectionCash = val this.collectionCash = val
}, },
getSearchForm(val) { getSearchForm(val) {
...@@ -68,30 +68,30 @@ export default { ...@@ -68,30 +68,30 @@ export default {
params.withdrawalBeginTime = params.withdrawalTime[0] params.withdrawalBeginTime = params.withdrawalTime[0]
params.withdrawalEndTime = params.withdrawalTime[1] params.withdrawalEndTime = params.withdrawalTime[1]
} }
if(params.withdrawalTime && params.withdrawalTime.length) delete params.withdrawalTime if (params.withdrawalTime && params.withdrawalTime.length) delete params.withdrawalTime
if (params && params.reviewTime) { if (params && params.reviewTime) {
params.reviewBeginTime = params.reviewTime[0] params.reviewBeginTime = params.reviewTime[0]
params.reviewEndTime = params.reviewTime[1] params.reviewEndTime = params.reviewTime[1]
} }
if(params.reviewTime && params.reviewTime.length) delete params.reviewTime if (params.reviewTime && params.reviewTime.length) delete params.reviewTime
this.searchForm = params this.searchForm = params
this.$nextTick(() =>{ setTimeout(() => {
this.$refs.withdrawalTable.$refs.withdrawalTable.refreshTable() this.$refs.table.$refs.withdrawalTable.refreshTable()
}) }, 500)
}, },
getSeletedData() { getSeletedData() {
this.choiceStatus = this.$refs.withdrawalTable.$children[0].mutiSelectArr.list && this.choiceStatus = this.$refs.table.$children[0].mutiSelectArr.list &&
this.$refs.withdrawalTable.$children[0].mutiSelectArr.list.map(item => { this.$refs.table.$children[0].mutiSelectArr.list.map(item => {
let {status,id,...params} = item let { status, id, ...params } = item
return {status,id} return { status, id }
}) })
}, },
handleOutput() { handleOutput() {
let params = JSON.parse(JSON.stringify(this.searchForm)) let params = JSON.parse(JSON.stringify(this.searchForm))
let pageConfig = { let pageConfig = {
pageSize:9999,pageNum:1 pageSize: 9999, pageNum: 1
} }
withdrawalApi.exportList({...params,...pageConfig}).then(res => { withdrawalApi.exportList({ ...params, ...pageConfig }).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.$Utils.exportFn(res.data) this.$Utils.exportFn(res.data)
} else { } else {
...@@ -105,13 +105,13 @@ export default { ...@@ -105,13 +105,13 @@ export default {
vertify(selectType, status) { vertify(selectType, status) {
this.getSeletedData() this.getSeletedData()
let errMsg = selectType == 'check' ? '请选择待审核的提现记录!' : '请选择到账失败的提现记录' let errMsg = selectType == 'check' ? '请选择待审核的提现记录!' : '请选择到账失败的提现记录'
if ((selectType && (this.choiceStatus &&!this.choiceStatus.length) ) || !(selectType && (this.choiceStatus && this.choiceStatus.every(item => item.status == status)))) { if ((selectType && (this.choiceStatus && !this.choiceStatus.length)) || !(selectType && (this.choiceStatus && this.choiceStatus.every(item => item.status == status)))) {
this.$message({ this.$message({
type: 'error', type: 'error',
message: errMsg message: errMsg
}) })
return false return false
}else{ } else {
return true return true
} }
}, },
...@@ -124,10 +124,10 @@ export default { ...@@ -124,10 +124,10 @@ export default {
vertifycheck = this.vertify('transfer', '4') vertifycheck = this.vertify('transfer', '4')
} }
if (vertifycheck) { if (vertifycheck) {
this.auditId = this.choiceStatus.map(item =>item.id) this.auditId = this.choiceStatus.map(item => item.id)
const checkText = `<p>审核通过, 系统将自动转账至员工的微信零钱中</p><p>是否确定审核?</p>` const checkText = `<p>审核通过, 系统将自动转账至员工的微信零钱中</p><p>是否确定审核?</p>`
const transferText = `<p>手动发起转账,系统将重新发起转账至员工的微信零钱中</p><p>是否确定发起?</p>` const transferText = `<p>手动发起转账,系统将重新发起转账至员工的微信零钱中</p><p>是否确定发起?</p>`
this.textTooltip = type == 'check' ? checkText : transferText this.textTooltip = type == 'check' ? checkText : transferText
this.$refs.dialogRef.dialogVisible = true this.$refs.dialogRef.dialogVisible = true
} }
} }
...@@ -153,10 +153,12 @@ export default { ...@@ -153,10 +153,12 @@ export default {
.btnOptons { .btnOptons {
margin-bottom: 10px; margin-bottom: 10px;
} }
.account{
.account {
display: flex; display: flex;
} }
.account>p{
.account > p {
margin-right: 10px; margin-right: 10px;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!