Commit c8ee91c0 by xuyl

更新页面联调代码

1 parent 8b19a5aa
import request from './request' import request from './request'
const path = 'scrm.api.renewal.insurance.customer.name.list.' const path = 'merchants.api.staff.score.'
const defaultPath = 'scrm.api.renewal.order.'
const profitApi = { const profitApi = {
// 客户名单列表查询
searchProfitList(data = {}) { searchProfitList(data = {}) {
data.method = `${path}get` data.method = `${path}page`
return request(data)
},
exportProfitList(data = {}) {
data.method = `${path}exportList`
return request(data) return request(data)
} }
} }
......
import request from './request'
const path = 'merchants.api.mission.'
const taskManagementApi = {
findMissionDeail(data = {}) {
data.method = `${path}findMissionDeail`
return request(data)
},
findStaffMissionPageList(data = {}) {
data.method = `${path}findStaffMissionPageList`
return request(data)
},
getStaffMissionLink(data = {}) {
data.method = `${path}getStaffMissionLink`
return request(data)
}
}
export { taskManagementApi }
import request from './request' import request from './request'
const path = 'scrm.api.renewal.insurance.customer.name.list.' const path = 'merchants.api.staff.withdrawal.'
const defaultPath = 'scrm.api.renewal.order.' const withdrawalApi = {
const profitApi = {
// 客户名单列表查询 // 客户名单列表查询
searchCustomerList(data = {}) { withdrawalListApi(data = {}) {
data.method = `${path}get` data.method = `${path}page`
return request(data)
},
exportList(data = {}) {
data.method = `${path}exportList`
return request(data)
},
batchWithdrawal(data = {}) {
data.method = `${path}batchWithdrawal`
return request(data) return request(data)
} }
} }
export { profitApi } export { withdrawalApi }
...@@ -130,7 +130,11 @@ export default { ...@@ -130,7 +130,11 @@ export default {
type: Array, type: Array,
default: () => [] default: () => []
}, },
tableTotal: { // tableTotal: {
// type: Number,
// default: 0
// },
tableScore: {
type: Number, type: Number,
default: 0 default: 0
}, },
...@@ -260,9 +264,9 @@ export default { ...@@ -260,9 +264,9 @@ export default {
} }
this.getListApi(params) this.getListApi(params)
.then(res => { .then(res => {
console.log(res)
this.data = this.findVal(res, this.tableParams.listName) this.data = this.findVal(res, this.tableParams.listName)
this.total = this.findVal(res, this.pageConf.totalCount) this.total = this.findVal(res, this.pageConf.totalCount)
this.$emit('sendAlldata',res.data)
this.loading = false this.loading = false
}) })
.catch(() => { .catch(() => {
......
...@@ -24,6 +24,10 @@ ...@@ -24,6 +24,10 @@
<el-form-item label='所属业务场景'> <el-form-item label='所属业务场景'>
<el-select v-model='profitSearchForm.businessScene' placeholder='所属业务场景'> <el-select v-model='profitSearchForm.businessScene' placeholder='所属业务场景'>
<el-option label='全部' value=''></el-option> <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-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label='所属商户:'> <el-form-item label='所属商户:'>
...@@ -43,7 +47,7 @@ ...@@ -43,7 +47,7 @@
<el-form-item label='发放渠道:'> <el-form-item label='发放渠道:'>
<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='0'></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>
...@@ -51,7 +55,7 @@ ...@@ -51,7 +55,7 @@
<el-form-item label='关联任务:'> <el-form-item label='关联任务:'>
<el-input <el-input
clearable clearable
v-model='profitSearchForm.activityName' v-model='profitSearchForm.missionName'
placeholder='请输入关联任务' placeholder='请输入关联任务'
></el-input> ></el-input>
</el-form-item> </el-form-item>
...@@ -87,10 +91,6 @@ export default { ...@@ -87,10 +91,6 @@ export default {
}, },
methods: { methods: {
handleSearch() { handleSearch() {
if (this.profitSearchForm && this.profitSearchForm.rewardTime) {
this.profitSearchForm.rewardBeginTime = this.profitSearchForm.rewardTime[0]
this.profitSearchForm.rewardEndTime = this.profitSearchForm.rewardTime[1]
}
this.$emit('sendSearchForm', this.profitSearchForm) this.$emit('sendSearchForm', this.profitSearchForm)
}, },
reset() { reset() {
...@@ -105,6 +105,9 @@ export default { ...@@ -105,6 +105,9 @@ export default {
}, },
created() { created() {
this.$set(this.profitSearchForm, 'rewardTime', [this.defalutStartTime, this.defalutEndTime]) this.$set(this.profitSearchForm, 'rewardTime', [this.defalutStartTime, this.defalutEndTime])
},
mounted() {
this.handleSearch()
} }
} }
</script> </script>
......
<template> <template>
<div style='margin: 16px'> <div style='margin: 16px'>
<ProfitSearch @sendSearchForm='getSearchForm' /> <ProfitSearch @sendSearchForm='getSearchForm' />
<el-button type='primary' size='small' class='handleOutput'>导出</el-button> <el-button type='primary' size='small' @click='handleOutput'>导出</el-button>
<div class='cumulativeAward'>累计发放奖励:{{ cumulativeAward }}</div> <div class='cumulativeAward'>累计发放奖励:{{ totalScore }}</div>
<d2-table <d2-table
class='my-row-height' class='my-row-height'
ref='withdrawalTable' ref='withdrawalTable'
:hasNum='true' :hasNum='true'
@sendAlldata ='getTotalScore'
:tableParams='profitTableParams' :tableParams='profitTableParams'
:searchForm='profitSearchForm' :searchForm='profitSearchForm'
:getListApi='getListApi' :getListApi='getListApi'
...@@ -19,6 +20,8 @@ ...@@ -19,6 +20,8 @@
<script> <script>
import ProfitSearch from '@/views/profitManagement/profitList/cpns/ProfitSearch' import ProfitSearch from '@/views/profitManagement/profitList/cpns/ProfitSearch'
import { profitApi } from '@/api/profitManagement'
export default { export default {
name: 'WithdrawalSearch', name: 'WithdrawalSearch',
components: { components: {
...@@ -27,15 +30,15 @@ export default { ...@@ -27,15 +30,15 @@ export default {
data() { data() {
return { return {
profitSearchForm:{}, profitSearchForm:{},
cumulativeAward: '10000', totalScore: '',
pageConf: { pageConf: {
pageSize: 'pageSize', pageSize: 'pageSize',
pageNum: 'pageNum', pageNum: 'pageNum',
totalCount: 'data.total' totalCount: 'data.count'
}, },
// getListApi: profitApi.searchProfitList, getListApi: profitApi.searchProfitList,
profitTableParams: { profitTableParams: {
listName: 'data.list', listName: 'data.data',
tableColumns: [ tableColumns: [
{ {
label: '员工名称', label: '员工名称',
...@@ -81,7 +84,10 @@ export default { ...@@ -81,7 +84,10 @@ export default {
// 导出 // 导出
handleOutput() { handleOutput() {
let params = JSON.parse(JSON.stringify(this.profitSearchForm)) let params = JSON.parse(JSON.stringify(this.profitSearchForm))
customerApi.orderListExport(params).then(res => { let pageConfig = {
pageSize:9999,pageNum:1
}
profitApi.exportProfitList({...params,...pageConfig}).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.$Utils.exportFn(res.data) this.$Utils.exportFn(res.data)
} else { } else {
...@@ -93,9 +99,18 @@ export default { ...@@ -93,9 +99,18 @@ export default {
}) })
}, },
getSearchForm(val){ getSearchForm(val){
if (val.rewardTime) delete val.rewardTime let params = JSON.parse(JSON.stringify(val))
this.profitSearchForm = val if (params && params.rewardTime) {
params.rewardBeginTime = params.rewardTime[0]
params.rewardEndTime = params.rewardTime[1]
}
if(params.rewardTime && params.rewardTime.length) delete params.rewardTime
this.profitSearchForm = params
this.$refs.withdrawalTable.refreshTable() this.$refs.withdrawalTable.refreshTable()
},
getTotalScore(val){
let {totalScore} = val
this.totalScore = totalScore
} }
}, },
} }
......
<template> <template>
<div class='taskDetails'> <div>
<div v-for='(item,index) in taskList' :key='index'> <div class='taskDetails' v-for='(item,index) in taskDetails' :key='index'>
<p>{{ item.type }}</p> <div>
<p>{{ item.name }}</p> <p>{{ item.missonTypeName }}</p>
<p>{{ item.desc }}</p> <p>{{ item.missionName }}</p>
<p>{{ item.missonDesc }}</p>
<p>{{ item.text }}</p> <p>{{ item.text }}</p>
<img :src='item.img'> <img :src='item.img'>
<div class='taskAward'> <div class='taskAward'>
<div class='awardMode'> <div class='awardMode'>
<p>奖励模式:{{ item.mode }}</p> <p>奖励模式:{{ item.rewardTypeName }}</p>
<p>触发值:{{ item.attackVal }}</p> <p>触发值:{{ item.triggerValue }}</p>
</div> </div>
<div> <div>
<p>奖励次数:{{ item.times }}</p> <p>奖励次数:{{ item.rewardCount == 1 ? '单次' : '重复累计' }}</p>
<p>奖励积分值:{{ item.awardCount }}</p> <p>奖励积分值:{{ item.rewardScore }}</p>
</div> </div>
</div> </div>
</div> </div>
<div class='copyLine'> <div class='copyLine' id="copy" v-on:click="copy(item.id)">
复制任务提醒链接 复制任务提醒链接
</div> </div>
</div> </div>
</div>
</template> </template>
<script> <script>
import { taskManagementApi } from '@/api/taskManagement'
export default { export default {
name: 'TaskDetails', name: 'TaskDetails',
props: {
taskDetails: {
type: Object,
default: {}
}
},
data() { data() {
return { return {
taskList: [
{
type: '11',
name: '222',
desc: '333',
text: '',
img: '',
mode: '累计奖励',
times: '单次',
attackVal: '10',
awardCount: '10.00',
link: ''
}]
} }
},
methods:{
async copy (id) {
await taskManagementApi.getStaffMissionLink({missionId: id}).then(res =>{
if(res.code == '0' && res.data){
var input = document.createElement('input')
input.value = res.data;
document.body.appendChild(input)
input.select()
document.execCommand('copy')
this.$message.success('复制成功!')
document.body.removeChild(input)
}else{
this.$message.error('复制失败!')
}
})
},
} }
} }
</script> </script>
<style scoped> <style scoped>
.taskDetails{ .taskDetails {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
border: 1px solid #eee; border: 1px solid #eee;
padding: 20px; padding: 20px;
margin-bottom: 20px margin-bottom: 20px;
;
} }
.taskAward { .taskAward {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.awardMode{
.awardMode {
padding-right: 20px; padding-right: 20px;
} }
.copyLine{
.copyLine {
color: #409EFF; color: #409EFF;
cursor: pointer; cursor: pointer;
} }
......
<template> <template>
<div class='taskInfo'> <div class='taskInfo'>
<div v-for='(item,index) in taskInfoList' :key='index'> <div v-for='(item,index) in taskInfoList' :key='index'>
<span> {{item.name}}</span> <span> {{ item.name }}</span>
<span> {{item.value}}</span> <span> {{ item.value }}</span>
</div> </div>
</div> </div>
</template> </template>
...@@ -10,37 +10,52 @@ ...@@ -10,37 +10,52 @@
<script> <script>
export default { export default {
name: 'TaskInfo', name: 'TaskInfo',
data(){ props: {
return{ taskInfo: {
taskInfoList:[ type: Object,
defalut: {}
}
},
data() {
return {
taskInfoList: [
{ {
name:'业务场景:', name: '业务场景:',
value:'1.3业务场景' value: 'businessSceneName'
}, },
{ {
name:'商户:', name: '商户:',
value:'我是商户名称' value: 'merchantName'
}, },
{ {
name:'活动/产品:', name: '活动/产品:',
value:'dasd' value: 'activityName'
}, },
{ {
name:'任务指定人群:', name: '任务指定人群:',
value:'1.3业务标签' value: 'crowdName'
}, },
{ {
name:'发放渠道:', name: '发放渠道:',
value:'广联' value: 'channelName'
} }
] ]
} }
},
created() {
this.taskInfoList.map(item => {
Object.keys(this.taskInfo).forEach(key => {
if (item.value == key) {
item.value = this.taskInfo[key]
} }
})
})
},
} }
</script> </script>
<style scoped> <style scoped>
.taskInfo{ .taskInfo {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
font-size: 14px; font-size: 14px;
......
<template> <template>
<d2-table <d2-table
class="my-row-height" class='my-row-height'
ref="withdrawalTable" ref='Table'
:hasNum="true" :hasNum='true'
:tableParams="withdrawalTableParams" :tableParams='withdrawalTableParams'
:searchForm="withdrawalSearchForm" :searchForm='taskTableSearchForm'
:getListApi="getListApi" :getListApi='getListApi'
:pageConf="pageConf" :pageConf='pageConf'
> >
</d2-table> </d2-table>
</template> </template>
<script> <script>
import { taskManagementApi } from '@/api/taskManagement'
export default { export default {
name: 'TaskTable', name: 'TaskTable',
data(){ props:{
return{ taskTableSearchForm:{
type:Object,
default:{}
}
},
data() {
return {
pageConf: { pageConf: {
pageSize: 'pageSize', pageSize: 'pageSize',
pageNum: 'pageNum', pageNum: 'pageNum',
totalCount: 'data.total', totalCount: 'data.count'
}, },
// getListApi: customerApi.searchCustomerList, getListApi: taskManagementApi.findStaffMissionPageList,
withdrawalTableParams: { withdrawalTableParams: {
mutiSelectUniqueKey:new Date().getTime() + parseInt(Math.random() * 1000), // btnId: new Date().getTime() + parseInt(Math.random() * 1000),
mutiSelectName:'1111', listName: 'data.data',
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'data.list',
tableColumns: [ tableColumns: [
{ {
label: '员工名称', label: '员工名称',
prop: 'withdrawalName', prop: 'staffName'
}, },
{ {
label: '微信昵称', label: '微信昵称',
prop: 'withdrawalId', prop: 'staffNickName'
}, },
{ {
label: '员工手机号', label: '员工手机号',
prop: 'mainBrandName', prop: 'staffPhone'
}, },
{ {
label: '部门', label: '部门',
prop: 'customerNumber', prop: 'staffDepartName'
}, },
{ {
label: '任务状态', label: '任务状态',
prop: 'validCustomerNumber', prop: 'completeStatusName'
}, },
{ {
label: '已获得收益', label: '已获得收益',
prop: 'batchNo', prop: 'gainScore'
},
{
label: '门店渠道',
prop: 'status',
addHtml: 'status',
},
{
label: '提现时间',
prop: 'createdBy',
} }
], ]
},
} }
} }
}
} }
</script> </script>
......
<template> <template>
<div class='analyseTask'> <div class='analyseTask'>
<TaskInfo></TaskInfo> <TaskInfo v-if='hastaskInfo' :taskInfo='taskInfo'></TaskInfo>
<el-form class='taskForm' :inline="true" :model="formInline"> <el-form class='taskForm' :inline='true' v-model='taskTime'>
<el-form-item label="任务时间:"> <el-form-item label='任务时间:'>
<el-select v-model="formInline.region" placeholder="请选择任务时间" @change="changeRegion"> <el-select v-model='taskTime.activityTime' placeholder='请选择任务时间' @change='changeactivityTime'>
<el-option label="区域一" value="shanghai"></el-option> <el-option v-for='(item,index) in taskSelect' :key='index' :label='item.activityTime'
<el-option label="区域二" value="beijing"></el-option> :value='item.activityTime'></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="具体任务:"> <el-form-item label='具体任务:'>
<el-select v-model="formInline.region" placeholder="请选择具体任务"> <el-select v-model='taskTime.missonTypeName' placeholder='请选择具体任务' @change='changeactivityTask'>
<el-option label="区域一" value="shanghai"></el-option> <el-option v-for='(item,index) in taskSelectItem' :key='index' :label='item.missonTypeName'
:value='item.missonTypeName'></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<TaskDetails></TaskDetails> <TaskDetails :taskDetails='taskDetails'></TaskDetails>
<TaskTable></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>
</div> </div>
...@@ -26,25 +27,72 @@ ...@@ -26,25 +27,72 @@
import TaskInfo from '@/views/task/analyseTask/cpns/TaskInfo' import TaskInfo from '@/views/task/analyseTask/cpns/TaskInfo'
import TaskDetails from '@/views/task/analyseTask/cpns/TaskDetails' import TaskDetails from '@/views/task/analyseTask/cpns/TaskDetails'
import TaskTable from '@/views/task/analyseTask/cpns/TaskTable' import TaskTable from '@/views/task/analyseTask/cpns/TaskTable'
import { taskManagementApi } from '@/api/taskManagement'
export default { export default {
name: 'index', name: 'index',
components:{ components: {
TaskInfo, TaskInfo,
TaskDetails, TaskDetails,
TaskTable TaskTable
}, },
data(){ data() {
return{ return {
formInline:{}, hastaskInfo: false,
taskTime:[], searchForm: {},
specificTime:[] taskInfo: {},
taskSelect: [],
taskSelectItem: [],
taskTime: {},
taskDetails: []
}
},
mounted() {
this.$root.eventBus.$on('params', params => {
let taskId = params.taskId
this.primaryInfo(taskId)
})
},
methods: {
primaryInfo(id){
taskManagementApi.findMissionDeail({ id }).then(res => {
let copeWithRes = res.data.platformMerchantMissionDateResponseList
let { businessSceneName, merchantName, activityName, crowdName, channelName } = res.data
this.taskInfo = { businessSceneName, merchantName, activityName, crowdName, channelName }
this.hastaskInfo = Object.values(this.taskInfo).length > 0 ? 'true' : 'false'
this.taskSelect = copeWithRes
this.taskSelectMap = JSON.parse(JSON.stringify(copeWithRes))
this.taskTime.activityTime = copeWithRes[0].activityTime
this.taskTime.missonTypeName = copeWithRes[0].platformMerchantMissionResponseList[0].missonTypeName
this.taskSelectItem = copeWithRes[0].platformMerchantMissionResponseList
this.changeactivityTask(this.taskTime.missonTypeName)
})
},
changeactivityTime(val) {
this.taskSelectMap.forEach(item => {
if (item.activityTime == val) {
this.taskSelectItem = []
this.taskSelectItem.push(...item.platformMerchantMissionResponseList)
} }
})
this.taskTime.missonTypeName = this.taskSelectItem[0].missonTypeName
this.changeactivityTask(this.taskTime.missonTypeName)
}, },
methods:{ changeactivityTask(val) {
changeRegion(){ let selectItem = this.taskSelectItem.filter(item => {
console.log('选择了') return item.missonTypeName == val
})
this.taskDetails = selectItem
let id = selectItem[0].id
this.searchForm = { missionId: id }
this.$nextTick(() => {
this.$refs.taskTable.$refs.Table.refreshTable()
})
}, },
backUp(){ backUp() {
this.$root.to([ this.$root.to([
'任务中心', '任务中心',
'任务平台', '任务平台',
...@@ -58,13 +106,15 @@ export default { ...@@ -58,13 +106,15 @@ export default {
</script> </script>
<style scoped> <style scoped>
.analyseTask{ .analyseTask {
padding: 20px; padding: 20px;
} }
.taskForm{
.taskForm {
padding-top: 20px; padding-top: 20px;
} }
.footer{
.footer {
position: fixed; position: fixed;
bottom: 0; bottom: 0;
width: 100%; width: 100%;
......
...@@ -11,17 +11,32 @@ ...@@ -11,17 +11,32 @@
<script> <script>
export default { export default {
name: 'BasicInfo', name: 'BasicInfo',
props:{
basicInfo:{
type:Object,
default:{}
}
},
data(){ data(){
return{ return{
basicInfoList:[ basicInfoList:[
{infoName:'业务场景:',infoVal:'1.3'}, {infoName:'业务场景:',infoVal:'businessScene'},
{infoName:'商户:',infoVal:'1.3'}, {infoName:'商户:',infoVal:'merchantName'},
{infoName:'活动/产品:',infoVal:'1.3'}, {infoName:'活动/产品:',infoVal:'activityName'},
{infoName:'任务指定人群:',infoVal:'1.3'}, {infoName:'任务指定人群:',infoVal:'crowdName'},
{infoName:'发放渠道:',infoVal:'1.3'}, {infoName:'发放渠道:',infoVal:'channelName'},
{infoName:'备注:',infoVal:'1.3'}, {infoName:'备注:',infoVal:'remark'},
] ]
} }
},
created() {
this.basicInfoList.map(item => {
Object.keys(this.basicInfo).forEach(key => {
if (item.infoVal == key) {
item.infoVal = this.basicInfo[key]
}
})
})
} }
} }
</script> </script>
......
<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' @tab-click='handleClick'>
<el-tab-pane label="第一天" name="first">用户管理</el-tab-pane> <el-tab-pane v-for='(item,index) in taskPlanList' :key='index' :label='item.activityTime' :name='item.activityTime'>
<el-tab-pane label="完整周期" name="fourth"> <div class='taskInfo' v-for='(displayList,idx) in item.platformMerchantMissionResponseList' :key='idx'>
<div class='taskInfo' v-for='(item,index) in taskPlanList' :key='index'> <p class='taskType'>{{ displayList.missonTypeName }}</p>
<p>{{item.taskType}}</p> <p>{{ displayList.missionName }}</p>
<p>{{item.taskName}}</p> <p>{{ displayList.missionDesc }}</p>
<p>{{item.taskDescript}}</p> <p class='taskScore'>奖励积分值:{{ displayList.rewardScore }}</p>
<p>{{item.scornWard}}</p>
</div> </div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
...@@ -18,31 +17,37 @@ ...@@ -18,31 +17,37 @@
<script> <script>
export default { export default {
name: 'taskPlan', name: 'taskPlan',
data(){ props: {
return{ taskPlanList: {
activeName: 'first', type: Array,
taskPlanList:[ default: []
{
taskType:'我是任务类型',
taskName:'我是任务名称',
taskDescript:'我是任务描述',
scornWard:'111'
},
{
taskType:'我是任务类型',
taskName:'我是任务名称',
taskDescript:'我是任务描述',
scornWard:'111'
} }
] },
data() {
return {
activeName: ''
} }
},
created() {
this.activeName = this.taskPlanList[0].activityTime
} }
} }
</script> </script>
<style scoped> <style scoped>
.headline{ .headline {
font-weight: 600; font-weight: 600;
padding-bottom: 20px; padding-bottom: 20px;
} }
.taskInfo{
border: 1px solid #E4E7ED;
padding-left: 20px;
margin-bottom: 16px;
}
.taskType{
font-weight: 600;
}
.taskScore{
margin-top: 30px;
}
</style> </style>
<template> <template>
<div class='observeTask'> <div class='observeTask'>
<BasicInfo></BasicInfo> <BasicInfo v-if='hasbasicInfo' :basicInfo='basicInfo'></BasicInfo>
<taskPlan/> <taskPlan v-if='hastaskPlanList' :taskPlanList='taskPlanList'/>
<div class='footer'> <div class='footer'>
<el-button @click='backUp'>返回</el-button> <el-button @click='backUp'>返回</el-button>
</div> </div>
...@@ -9,16 +9,25 @@ ...@@ -9,16 +9,25 @@
</template> </template>
<script> <script>
import { taskManagementApi } from '@/api/taskManagement'
import BasicInfo from './cpns/BasicInfo' import BasicInfo from './cpns/BasicInfo'
import taskPlan from './cpns/taskPlan' import taskPlan from './cpns/taskPlan'
export default { export default {
name: 'index', name: 'index',
components:{ components: {
BasicInfo, BasicInfo,
taskPlan taskPlan
}, },
methods:{ data(){
backUp(){ return{
hasbasicInfo:false,
hastaskPlanList:false
}
},
methods: {
backUp() {
this.$root.to([ this.$root.to([
'任务中心', '任务中心',
'任务平台', '任务平台',
...@@ -26,16 +35,33 @@ export default { ...@@ -26,16 +35,33 @@ export default {
'任务模板管理', '任务模板管理',
'任务管理列表' '任务管理列表'
]) ])
},
async primaryInfo(id) {
await taskManagementApi.findMissionDeail(id).then(res => {
let { businessScene, merchantName, activityName, crowdName, channelName, remark } = res.data
this.basicInfo = { businessScene, merchantName, activityName, crowdName, channelName, remark }
this.hasbasicInfo = Object.values(this.basicInfo).length > 0 ? 'true' : 'false'
this.taskPlanList = res.data.platformMerchantMissionDateResponseList
this.hastaskPlanList = this.taskPlanList && this.taskPlanList.length ? 'true' : 'false'
})
} }
} },
mounted() {
this.$root.eventBus.$on('params', params => {
let taskId = params.taskId
this.primaryInfo(taskId)
})
},
} }
</script> </script>
<style scoped> <style scoped>
.observeTask{ .observeTask {
padding: 20px; padding: 20px;
} }
.footer{
.footer {
position: fixed; position: fixed;
bottom: 0; bottom: 0;
width: 100%; width: 100%;
......
<template> <template>
<el-dialog title='提示' :visible.sync='dialogVisible' width='30%'> <el-dialog title='提示' :visible.sync='dialogVisible' width='30%'>
<div v-html="textTooltip"></div> <div v-html='textTooltip'></div>
<span slot='footer' class='dialog-footer'> <span slot='footer' class='dialog-footer'>
<el-button @click='dialogVisible = false'>取 消</el-button> <el-button @click='dialogVisible = false'>取 消</el-button>
<el-button type='primary' @click='comfirmDialog()' <el-button type='primary' @click='comfirmDialog()'
...@@ -11,17 +11,31 @@ ...@@ -11,17 +11,31 @@
</template> </template>
<script> <script>
import { withdrawalApi } from '@/api/withdrawalManagement'
export default { export default {
name: 'WithdrawalDialog', name: 'WithdrawalDialog',
props: ['textTooltip','auditId'], props: ['textTooltip', 'auditId'],
data() { data() {
return { return {
dialogVisible: false dialogVisible: false
} }
}, },
methods: { methods: {
comfirmDialog() { async comfirmDialog() {
console.log(this.auditId) const params = {
...JSON.parse(JSON.stringify(
{ idList: this.auditId }
))
}
await withdrawalApi.batchWithdrawal(params).then(res => {
if (res.code == '0'){
this.$message.success('审核成功')
this.dialogVisible = false
}else{
this.$message.error('审核失败')
}
})
} }
} }
} }
......
...@@ -77,15 +77,11 @@ export default { ...@@ -77,15 +77,11 @@ export default {
created() { created() {
this.$set(this.withdrawalSearchForm, 'withdrawalTime', [this.defalutStartTime, this.defalutEndTime]) this.$set(this.withdrawalSearchForm, 'withdrawalTime', [this.defalutStartTime, this.defalutEndTime])
}, },
methods: { mounted() {
copeWithTime(beginTime, endTime, primaryTime) { this.handleSearch()
let searchForm = this.withdrawalSearchForm
searchForm[beginTime] = searchForm[primaryTime] && searchForm[primaryTime][0]
searchForm[endTime] = searchForm[primaryTime] && searchForm[primaryTime][1]
}, },
methods: {
handleSearch() { handleSearch() {
this.withdrawalSearchForm.withdrawalTime && this.copeWithTime('withdrawalBeginTime', 'withdrawalEndTime', 'withdrawalTime')
this.withdrawalSearchForm.reviewTime && this.copeWithTime('reviewBeginTime', 'reviewEndTime', 'reviewTime')
this.$emit('sendSearchForm', this.withdrawalSearchForm) this.$emit('sendSearchForm', this.withdrawalSearchForm)
}, },
reset() { reset() {
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
:searchForm='searchForm' :searchForm='searchForm'
:getListApi='getListApi' :getListApi='getListApi'
:pageConf='pageConf' :pageConf='pageConf'
@sendAlldata = 'getAmountCollection'
> >
<div slot="status" slot-scope="scope"> <div slot="status" slot-scope="scope">
<span v-if="scope.scope.status == '1'">待审核</span> <span v-if="scope.scope.status == '1'">待审核</span>
...@@ -19,79 +20,26 @@ ...@@ -19,79 +20,26 @@
</template> </template>
<script> <script>
import { withdrawalApi } from '@/api/withdrawalManagement'
export default { export default {
name: 'WithdrawalTable', name: 'WithdrawalTable',
props: ['searchForm'], props:{
searchForm:{
type:Object,
default:{}
}
},
data() { data() {
return { return {
pageConf: { pageConf: {
pageSize: 'pageSize', pageSize: 'pageSize',
pageNum: 'pageNum', pageNum: 'pageNum',
totalCount: 'data.total' totalCount: 'data.count'
},
tableData: [
{
id: 1,
staffName: '小徐',
staffPhone: '11111',
withdrawalScore: '2',
status:'1'
},
{
id: 2,
staffName: '小zhang',
staffPhone: '11111',
withdrawalScore: '2',
status:'0'
}, },
{
id: 2,
staffName: '小zhang',
staffPhone: '11111',
withdrawalScore: '2',
status:'0'
},
{
id: 2,
staffName: '小zhang',
staffPhone: '11111',
withdrawalScore: '2',
status:'3'
},
{
id: 23,
staffName: '小zhang',
staffPhone: '11111',
withdrawalScore: '2',
status:'4'
},
{
id: 23,
staffName: '小zhang',
staffPhone: '11111',
withdrawalScore: '2',
status:'4'
},
{
id: 22,
staffName: '小zhang',
staffPhone: '11111',
withdrawalScore: '2',
status:'4'
},
{
id: 21,
staffName: '小zhang',
staffPhone: '11111',
withdrawalScore: '2',
status:'4'
}
],
withdrawalTableParams: { withdrawalTableParams: {
mutiSelectUniqueKey: new Date().getTime() + parseInt(Math.random() * 1000), mutiSelectUniqueKey: 'id',
mutiSelectName: 'list', mutiSelectName: 'list',
// btnId: new Date().getTime() + parseInt(Math.random() * 1000), listName: 'data.data',
listName: 'data.list',
tableColumns: [ tableColumns: [
{ {
label: '员工名称', label: '员工名称',
...@@ -115,7 +63,7 @@ export default { ...@@ -115,7 +63,7 @@ export default {
}, },
{ {
label: '微信昵称', label: '微信昵称',
prop: 'wechatName' prop: 'wechatNickName'
}, },
{ {
label: '微信手机号', label: '微信手机号',
...@@ -123,7 +71,7 @@ export default { ...@@ -123,7 +71,7 @@ export default {
}, },
{ {
label: '微信openid', label: '微信openid',
prop: 'wechatId' prop: 'wechatOpenId'
}, },
{ {
label: '状态', label: '状态',
...@@ -143,11 +91,18 @@ export default { ...@@ -143,11 +91,18 @@ export default {
prop: 'successTime' prop: 'successTime'
} }
] ]
},
getListApi: withdrawalApi.withdrawalListApi,
}
},
methods:{
getAmountCollection(val){
let {receivedAmount,receivingAmount,reviewingAmount,totalAmount,failureAmount} =val
let amountCollection = {receivedAmount,receivingAmount,reviewingAmount,totalAmount,failureAmount}
this.$emit('sendCollection',amountCollection)
} }
// getListApi: customerApi.searchCustomerList,
} }
} }
}
</script> </script>
<style scoped> <style scoped>
......
...@@ -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'
...@@ -25,16 +25,23 @@ ...@@ -25,16 +25,23 @@
</el-button </el-button
> >
</div> </div>
<WithdrawalTable ref='withdrawalTable' :searchForm='searchForm' /> <div class='account'>
<WithdrawalDialog :textTooltip='textTooltip' :selectType='selectType' :auditId='auditId' ref='dialogRef' /> <p>累计提现金额:{{ collectionCash.totalAmount }};</p>
<p>待审核:{{ collectionCash.reviewingAmount }};</p>
<p>到账中:{{ collectionCash.receivingAmount }};</p>
<p>已到账:{{ collectionCash.receivedAmount }}</p>
</div>
<WithdrawalTable ref='withdrawalTable' :searchForm='searchForm' @sendCollection='getCollection' />
<WithdrawalDialog :textTooltip='textTooltip' :auditId='auditId' ref='dialogRef' />
</div> </div>
</template> </template>
<script> <script>
// import { customerApi } from '@/api/customer' import { withdrawalApi } from '@/api/withdrawalManagement'
import WithdrawalSearch from './components/WithdrawalSearch' import WithdrawalSearch from './components/WithdrawalSearch'
import WithdrawalTable from './components/WithdrawalTable' import WithdrawalTable from './components/WithdrawalTable'
import WithdrawalDialog from './components/WithdrawalDialog' import WithdrawalDialog from './components/WithdrawalDialog'
import { profitApi } from '@/api/profitManagement'
export default { export default {
components: { components: {
...@@ -47,14 +54,30 @@ export default { ...@@ -47,14 +54,30 @@ export default {
textTooltip: '', textTooltip: '',
searchForm: {}, searchForm: {},
choiceStatus: [], choiceStatus: [],
auditId: [] auditId: [],
collectionCash:{}
} }
}, },
methods: { methods: {
getCollection(val){
this.collectionCash = val
},
getSearchForm(val) { getSearchForm(val) {
if (val.withdrawalTime) delete val.withdrawalTime let params = JSON.parse(JSON.stringify(val))
if (val.reviewTime) delete val.reviewTime if (params && params.withdrawalTime) {
this.searchForm = val params.withdrawalBeginTime = params.withdrawalTime[0]
params.withdrawalEndTime = params.withdrawalTime[1]
}
if(params.withdrawalTime && params.withdrawalTime.length) delete params.withdrawalTime
if (params && params.reviewTime) {
params.reviewBeginTime = params.reviewTime[0]
params.reviewEndTime = params.reviewTime[1]
}
if(params.reviewTime && params.reviewTime.length) delete params.reviewTime
this.searchForm = params
this.$nextTick(() =>{
this.$refs.withdrawalTable.$refs.withdrawalTable.refreshTable()
})
}, },
getSeletedData() { getSeletedData() {
this.choiceStatus = this.$refs.withdrawalTable.$children[0].mutiSelectArr.list && this.choiceStatus = this.$refs.withdrawalTable.$children[0].mutiSelectArr.list &&
...@@ -65,16 +88,19 @@ export default { ...@@ -65,16 +88,19 @@ export default {
}, },
handleOutput() { handleOutput() {
let params = JSON.parse(JSON.stringify(this.searchForm)) let params = JSON.parse(JSON.stringify(this.searchForm))
// customerApi.orderListExport(params).then(res => { let pageConfig = {
// if (res.code == 0) { pageSize:9999,pageNum:1
// this.$Utils.exportFn(res.data) }
// } else { withdrawalApi.exportList({...params,...pageConfig}).then(res => {
// this.$message({ if (res.code == 0) {
// type: 'error', this.$Utils.exportFn(res.data)
// message: '导出失败!' } else {
// }) this.$message({
// } type: 'error',
// }) message: '导出失败!'
})
}
})
}, },
vertify(selectType, status) { vertify(selectType, status) {
this.getSeletedData() this.getSeletedData()
...@@ -127,4 +153,11 @@ export default { ...@@ -127,4 +153,11 @@ export default {
.btnOptons { .btnOptons {
margin-bottom: 10px; margin-bottom: 10px;
} }
.account{
display: flex;
}
.account>p{
margin-right: 10px;
}
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!