Commit c8663000 by 前端

代码覆盖处理

1 parent f9164b13
<template>
<el-form
size='small'
size="small"
inline
ref='withdrawalForm'
:model='profitSearchForm'
label-width='120px'
class='demo-form-inline'
ref="withdrawalForm"
:model="profitSearchForm"
label-width="120px"
class="demo-form-inline"
>
<el-form-item label='员工名称'>
<el-form-item label="员工名称">
<el-input
clearable
v-model='profitSearchForm.staffName'
placeholder='请输入员工名称'
v-model="profitSearchForm.staffName"
placeholder="请输入员工名称"
></el-input>
</el-form-item>
<el-form-item label='员工手机号'>
<el-form-item label="员工手机号">
<el-input
clearable
v-model='profitSearchForm.staffPhone'
placeholder='请输入员工手机号'
v-model="profitSearchForm.staffPhone"
placeholder="请输入员工手机号"
></el-input>
</el-form-item>
<el-form-item label='所属业务场景'>
<el-select v-model='profitSearchForm.businessScene' 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-form-item label="所属业务场景">
<el-select
v-model="profitSearchForm.businessScene"
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-select>
</el-form-item>
<el-form-item label='所属商户:'>
<el-form-item label="所属商户:">
<el-input
clearable
v-model='profitSearchForm.merchantName'
placeholder='请输入所属商户'
v-model="profitSearchForm.merchantName"
placeholder="请输入所属商户"
></el-input>
</el-form-item>
<el-form-item label='所属活动/产品:'>
<el-form-item label="所属活动/产品:">
<el-input
clearable
v-model='profitSearchForm.activityName'
placeholder='请输入所属活动/产品'
v-model="profitSearchForm.activityName"
placeholder="请输入所属活动/产品"
></el-input>
</el-form-item>
<el-form-item label='发放渠道:'>
<el-select v-model='profitSearchForm.channel' placeholder='请选择发放渠道'>
<el-option label='全部' value=''></el-option>
<el-option label='广联' value='1'></el-option>
<el-option label='门店' value='2'></el-option>
<el-option label='服务商' value='3'></el-option>
<el-form-item label="发放渠道:">
<el-select
v-model="profitSearchForm.channel"
placeholder="请选择发放渠道"
>
<el-option label="全部" value=""></el-option>
<el-option label="广联" value="1"></el-option>
<el-option label="门店" value="2"></el-option>
<el-option label="服务商" value="3"></el-option>
</el-select>
</el-form-item>
<el-form-item label='关联任务:'>
<el-form-item label="关联任务:">
<el-input
clearable
v-model='profitSearchForm.missionName'
placeholder='请输入关联任务'
v-model="profitSearchForm.missionName"
placeholder="请输入关联任务"
></el-input>
</el-form-item>
<el-form-item label='奖励时间'>
<el-form-item label="奖励时间">
<el-date-picker
value-format='yyyy-MM-dd'
v-model='profitSearchForm.rewardTime'
type='daterange'
range-separator='至'
start-placeholder='开始日期'
end-placeholder='结束日期'>
value-format="yyyy-MM-dd"
v-model="profitSearchForm.rewardTime"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type='primary' @click='handleSearch'
>查询
</el-button
>
<el-button @click='reset'>重置</el-button>
<el-button type="primary" @click="handleSearch">查询 </el-button>
<el-button @click="reset">重置</el-button>
</el-form-item>
</el-form>
</template>
......@@ -83,12 +87,12 @@
import { nearlyAMonth } from '@/mixin/nearlyAMonth'
export default {
name: 'ProfitSearch',
mixins:[nearlyAMonth],
mixins: [nearlyAMonth],
data() {
return {
profitSearchForm: {
businessScene:'',
channel:''
businessScene: '',
channel: '',
},
}
},
......@@ -100,21 +104,25 @@ export default {
Object.keys(this.profitSearchForm).forEach((key) => {
this.profitSearchForm[key] = ''
})
this.$set(this.profitSearchForm, 'rewardTime', [this.defalutStartTime, this.defalutEndTime])
this.$set(this.profitSearchForm, 'rewardTime', [
this.defalutStartTime,
this.defalutEndTime,
])
this.$nextTick(() => {
this.handleSearch()
})
}
},
},
created() {
this.$set(this.profitSearchForm, 'rewardTime', [this.defalutStartTime, this.defalutEndTime])
this.$set(this.profitSearchForm, 'rewardTime', [
this.defalutStartTime,
this.defalutEndTime,
])
},
mounted() {
this.handleSearch()
}
},
}
</script>
<style scoped>
</style>
<style scoped></style>
<template>
<div style='margin: 16px'>
<ProfitSearch @sendSearchForm='getSearchForm' />
<el-button type='primary' size='small' @click='handleOutput'>导出</el-button>
<div class='cumulativeAward'>累计发放奖励:{{ totalScore }}</div>
<div style="margin: 16px">
<ProfitSearch @sendSearchForm="getSearchForm" />
<el-button type="primary" size="small" @click="handleOutput"
>导出</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'
class="my-row-height"
ref="profitTable"
:hasNum="true"
@sendAlldata="getTotalScore"
:tableParams="profitTableParams"
:searchForm="profitSearchForm"
:getListApi="getListApi"
: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="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>
</div>
</template>
......@@ -37,16 +40,16 @@ import { profitApi } from '@/api/profitManagement'
export default {
name: 'WithdrawalSearch',
components: {
ProfitSearch
ProfitSearch,
},
data() {
return {
profitSearchForm:{},
profitSearchForm: {},
totalScore: '',
pageConf: {
pageSize: 'pageSize',
pageNum: 'pageNum',
totalCount: 'data.count'
totalCount: 'data.count',
},
getListApi: profitApi.searchProfitList,
profitTableParams: {
......@@ -54,44 +57,44 @@ 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',
},
],
},
}
},
methods: {
......@@ -99,41 +102,43 @@ export default {
handleOutput() {
let params = JSON.parse(JSON.stringify(this.profitSearchForm))
let pageConfig = {
pageSize:9999,pageNum:1
pageSize: 9999,
pageNum: 1,
}
profitApi.exportProfitList({...params,...pageConfig}).then(res => {
profitApi.exportProfitList({ ...params, ...pageConfig }).then((res) => {
if (res.code == 0) {
this.$Utils.exportFn(res.data)
} else {
this.$message({
type: 'error',
message: '导出失败!'
message: '导出失败!',
})
}
})
},
getSearchForm(val){
getSearchForm(val) {
let params = JSON.parse(JSON.stringify(val))
if (params && params.rewardTime) {
params.rewardBeginTime = params.rewardTime[0]
params.rewardEndTime = params.rewardTime[1]
}
if(params.rewardTime && params.rewardTime.length) delete params.rewardTime
if (params.rewardTime && params.rewardTime.length)
delete params.rewardTime
this.profitSearchForm = params
setTimeout(() =>{
this.$refs.profitTable.refreshTable(false,true)
},500)
setTimeout(() => {
this.$refs.profitTable.refreshTable(false, true)
}, 500)
},
getTotalScore(val){
let {totalScore} = val
getTotalScore(val) {
let { totalScore } = val
this.totalScore = totalScore
}
},
},
}
</script>
<style scoped>
.cumulativeAward{
.cumulativeAward {
margin: 16px 0;
}
.my-row-height >>> .el-table__body-wrapper .el-table__row {
......
<template>
<div>
<div class='taskDetails' v-for='(item,index) in taskDetails' :key='index'>
<div class='leftContent'>
<div class="taskDetails" v-for="(item, index) in taskDetails" :key="index">
<div class="leftContent">
<p>{{ item.missonTypeName }}</p>
<p>{{ item.missionName }}</p>
<p>{{ item.missonDesc }}</p>
<template v-if='item.platformMerchantMissionMaterialResponseList && item.platformMerchantMissionMaterialResponseList.length'>
<div v-for='(sub,idx,) in item.platformMerchantMissionMaterialResponseList' :key='idx'>
<template
v-if="
item.platformMerchantMissionMaterialResponseList &&
item.platformMerchantMissionMaterialResponseList.length
"
>
<div
v-for="(
sub, idx
) in item.platformMerchantMissionMaterialResponseList"
:key="idx"
>
<template v-if="sub.materialType == '1'">
<p v-html='tramWord(sub.materialContent)'></p>
<p v-html="tramWord(sub.materialContent)"></p>
</template>
<template v-if="sub.materialType == '2'">
<img class='displayImg' :src='sub.materialContent'>
<img class="displayImg" :src="sub.materialContent" />
</template>
<template v-if="sub.materialType == '3'">
<video class='displayImg' :src='sub.materialContent' />
<video class="displayImg" :src="sub.materialContent" />
</template>
<template v-if="sub.materialType == '4'">
<p class='content'>{{sub.materialContent}}</p>
<p class="content">{{ sub.materialContent }}</p>
</template>
</div>
</template>
<div class='taskAward'>
<div class='showInfoForm'>
<span v-if='item.rewardTypeName'>奖励模式:{{ item.rewardTypeName }}</span>
<span v-if='item.rewardCountName'>奖励次数:{{ item.rewardCountName }}</span>
<div class="taskAward">
<div class="showInfoForm">
<span v-if="item.rewardTypeName"
>奖励模式:{{ item.rewardTypeName }}</span
>
<span v-if="item.rewardCountName"
>奖励次数:{{ item.rewardCountName }}</span
>
<span v-if="item.rewardCountName == '重复累计'">
重复次数:{{ item.repeatCount == '-1' ? '无限制' : item.repeatCount }}
重复次数:{{
item.repeatCount == '-1' ? '无限制' : item.repeatCount
}}
</span>
<span v-if='item.triggerValue'>触发值:{{ item.triggerValue }}</span>
<span v-if='item.rewardScore'>奖励积分值:{{ item.rewardScore }}</span>
<span v-if="item.triggerValue"
>触发值:{{ item.triggerValue }}</span
>
<span v-if="item.rewardScore"
>奖励积分值:{{ item.rewardScore }}</span
>
<span v-if="item.minTriggerValue"
>最低指标:{{ item.minTriggerValue }}</span
>
</div>
</div>
</div>
<div v-if="item.missonType != '1'" class='copyLine' id='copy' v-on:click='copy(item.id)'>
<div
v-if="item.missonType != '1'"
class="copyLine"
id="copy"
v-on:click="copy(item.id)"
>
复制任务提醒链接
</div>
</div>
......@@ -48,43 +76,48 @@ export default {
props: {
taskDetails: {
type: Array,
default: []
}
default: [],
},
},
data() {
return {}
},
methods: {
tramWord(val) {
let htm = val.replace(/\[([\u4E00-\u9FA56]{1,4}|OK|NO|666)]/gi, function(res) {
let word = res.replace(/\[|\]/gi, '')
const list = emoji.flat(Infinity)
let index = parseInt(list.indexOf(word)) + 1
if (index < 10) {
index = '00' + index
} else if (index >= 10 && index < 100) {
index = '0' + index
let htm = val.replace(
/\[([\u4E00-\u9FA56]{1,4}|OK|NO|666)]/gi,
function (res) {
let word = res.replace(/\[|\]/gi, '')
const list = emoji.flat(Infinity)
let index = parseInt(list.indexOf(word)) + 1
if (index < 10) {
index = '00' + index
} else if (index >= 10 && index < 100) {
index = '0' + index
}
return `<img style='width:25px;height:25px' src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index}.png">`
}
return `<img style='width:25px;height:25px' src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index}.png">`
})
)
return htm
},
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('复制失败!')
}
})
}
}
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>
......@@ -97,10 +130,10 @@ export default {
padding: 20px;
margin-bottom: 20px;
}
.leftContent{
.leftContent {
width: 70%;
}
.content{
.content {
height: auto;
word-wrap: break-word;
word-break: break-all;
......@@ -110,7 +143,6 @@ export default {
justify-content: space-between;
}
.showInfoForm {
margin-top: 10px;
width: 700px;
......@@ -122,10 +154,10 @@ export default {
width: 50%;
}
.copyLine {
color: #409EFF;
color: #409eff;
cursor: pointer;
}
.displayImg{
.displayImg {
width: 500px;
height: 300px;
}
......
<template>
<div class='taskPlan'>
<div class='headline'>任务计划</div>
<el-tabs v-model='activeName' type='card'>
<el-tab-pane v-for='(item,index) in taskPlanList' :key='index'
:label="item.activityTime =='-1'?'完整周期' : item.activityTime" :name='item.activityTime'>
<div class='taskInfo' v-for='(displayList,idx) in item.platformMerchantMissionResponseList' :key='idx'>
<p class='taskType'>{{ displayList.missonTypeName }}</p>
<div class="taskPlan">
<div class="headline">任务计划</div>
<el-tabs v-model="activeName" type="card">
<el-tab-pane
v-for="(item, index) in taskPlanList"
:key="index"
:label="item.activityTime == '-1' ? '完整周期' : item.activityTime"
:name="item.activityTime"
>
<div
class="taskInfo"
v-for="(displayList, idx) in item.platformMerchantMissionResponseList"
:key="idx"
>
<p class="taskType">{{ displayList.missonTypeName }}</p>
<p>{{ displayList.missionName }}</p>
<p>{{ displayList.missonDesc }}</p>
<template
v-if='displayList.platformMerchantMissionMaterialResponseList && displayList.platformMerchantMissionMaterialResponseList.length'>
<div v-for='(sub,idx,) in displayList.platformMerchantMissionMaterialResponseList' :key='idx'>
v-if="
displayList.platformMerchantMissionMaterialResponseList &&
displayList.platformMerchantMissionMaterialResponseList.length
"
>
<div
v-for="(
sub, idx
) in displayList.platformMerchantMissionMaterialResponseList"
:key="idx"
>
<template v-if="sub.materialType == '1'">
<p v-html='tramWord(sub.materialContent)'></p>
<p v-html="tramWord(sub.materialContent)"></p>
</template>
<template v-if="sub.materialType == '2'">
<img class='displayImg' :src='sub.materialContent'>
<img class="displayImg" :src="sub.materialContent" />
</template>
<template v-if="sub.materialType == '3'">
<video class='displayImg' :src='sub.materialContent' />
<video class="displayImg" :src="sub.materialContent" />
</template>
<template v-if="sub.materialType == '4'">
<p>{{ sub.materialContent }}</p>
</template>
</div>
</template>
<div class='showInfoForm'>
<span v-if='displayList.rewardTypeName'>奖励模式:{{ displayList.rewardTypeName }}</span>
<span v-if='displayList.rewardCountName'>奖励次数:{{ displayList.rewardCountName }}</span>
<div class="showInfoForm">
<span v-if="displayList.rewardTypeName"
>奖励模式:{{ displayList.rewardTypeName }}</span
>
<span v-if="displayList.rewardCountName"
>奖励次数:{{ displayList.rewardCountName }}</span
>
<span v-if="displayList.rewardCountName == '重复累计'">
重复次数:{{ displayList.repeatCount == '-1' ? '无限制' : displayList.repeatCount }}
重复次数:{{
displayList.repeatCount == '-1'
? '无限制'
: displayList.repeatCount
}}
</span>
<span v-if='displayList.triggerValue'>触发值:{{ displayList.triggerValue }}</span>
<span v-if='displayList.rewardScore'>奖励积分值:{{ displayList.rewardScore }}</span>
<span v-if="displayList.triggerValue"
>触发值:{{ displayList.triggerValue }}</span
>
<span v-if="displayList.rewardScore"
>奖励积分值:{{ displayList.rewardScore }}</span
>
<span v-if="displayList.minTriggerValue"
>最低指标:{{ displayList.minTriggerValue }}</span
>
</div>
</div>
</el-tab-pane>
......@@ -49,47 +81,50 @@ export default {
props: {
taskPlanList: {
type: Array,
default: []
}
default: [],
},
},
data() {
return {
activeName: ''
activeName: '',
}
},
watch: {
taskPlanList:{
handler(newVal,oldVal){
taskPlanList: {
handler(newVal, oldVal) {
if (!oldVal || newVal !== oldVal) {
this.activeName = newVal && newVal[0].activityTime
this.taskPlanList = newVal
}
},
immediate: true,
deep: true
}
deep: true,
},
},
methods:{
methods: {
tramWord(val) {
let htm = val.replace(/\[([\u4E00-\u9FA56]{1,4}|OK|NO|666)]/gi, function(res) {
let word = res.replace(/\[|\]/gi, '')
const list = emoji.flat(Infinity)
let index = parseInt(list.indexOf(word)) + 1
if (index < 10) {
index = '00' + index
} else if (index >= 10 && index < 100) {
index = '0' + index
let htm = val.replace(
/\[([\u4E00-\u9FA56]{1,4}|OK|NO|666)]/gi,
function (res) {
let word = res.replace(/\[|\]/gi, '')
const list = emoji.flat(Infinity)
let index = parseInt(list.indexOf(word)) + 1
if (index < 10) {
index = '00' + index
} else if (index >= 10 && index < 100) {
index = '0' + index
}
return `<img style='width:25px;height:25px' src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index}.png">`
}
return `<img style='width:25px;height:25px' src="https://img01.glsx.com.cn/weapp/resource/saas/scrm/emoji/${index}.png">`
})
)
return htm
},
}
},
}
</script>
<style scoped>
.taskPlan{
.taskPlan {
margin-top: 20px;
}
.headline {
......@@ -98,7 +133,7 @@ export default {
}
.taskInfo {
border: 1px solid #E4E7ED;
border: 1px solid #e4e7ed;
padding-left: 20px;
padding-right: 20px;
margin-bottom: 16px;
......@@ -110,7 +145,7 @@ export default {
.displayImg {
width: 500px;
height: 300px
height: 300px;
}
.showInfoForm {
......
<template>
<div style='margin: 16px'>
<div style="margin: 16px">
<el-form
size='small'
size="small"
inline
ref='withdrawalForm'
:model='withdrawalSearchForm'
label-width='100px'
class='demo-form-inline'
ref="withdrawalForm"
:model="withdrawalSearchForm"
label-width="100px"
class="demo-form-inline"
>
<el-form-item label='员工名称'>
<el-form-item label="员工名称">
<el-input
clearable
v-model='withdrawalSearchForm.staffName'
placeholder='请输入员工名称'
v-model="withdrawalSearchForm.staffName"
placeholder="请输入员工名称"
></el-input>
</el-form-item>
<el-form-item label='员工手机号'>
<el-form-item label="员工手机号">
<el-input
clearable
v-model='withdrawalSearchForm.staffPhone'
placeholder='请输入员工手机号'
v-model="withdrawalSearchForm.staffPhone"
placeholder="请输入员工手机号"
></el-input>
</el-form-item>
<el-form-item label='状态'>
<el-select v-model='withdrawalSearchForm.status' placeholder='请选择状态'>
<el-option label='全部' value=''></el-option>
<el-option label='待审核' value='1'></el-option>
<el-option label='到账中' value='2'></el-option>
<el-option label='已到账' value='3'></el-option>
<el-option label='到账失败' value='4'></el-option>
<el-form-item label="门店名称">
<el-input
clearable
v-model="withdrawalSearchForm.merchantName"
placeholder="请输入门店名称"
></el-input>
</el-form-item>
<el-form-item label="状态">
<el-select
v-model="withdrawalSearchForm.status"
placeholder="请选择状态"
>
<el-option label="全部" value=""></el-option>
<el-option label="待审核" value="1"></el-option>
<el-option label="到账中" value="2"></el-option>
<el-option label="已到账" value="3"></el-option>
<el-option label="到账失败" value="4"></el-option>
</el-select>
</el-form-item>
<el-form-item label='提现时间'>
<el-form-item label="提现时间">
<el-date-picker
value-format='yyyy-MM-dd'
v-model='withdrawalSearchForm.withdrawalTime'
type='daterange'
range-separator='至'
start-placeholder='开始日期'
end-placeholder='结束日期'>
value-format="yyyy-MM-dd"
v-model="withdrawalSearchForm.withdrawalTime"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item label='审核时间'>
<el-form-item label="审核时间">
<el-date-picker
value-format='yyyy-MM-dd'
v-model='withdrawalSearchForm.reviewTime'
type='daterange'
range-separator='至'
start-placeholder='开始日期'
end-placeholder='结束日期'>
value-format="yyyy-MM-dd"
v-model="withdrawalSearchForm.reviewTime"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type='primary'
@click='handleSearch'
>查询
</el-button
>
<el-button @click='reset'>重置</el-button>
<el-button type="primary" @click="handleSearch">查询 </el-button>
<el-button @click="reset">重置</el-button>
</el-form-item>
</el-form>
</div>
......@@ -72,15 +80,18 @@ export default {
data() {
return {
withdrawalSearchForm: {
status:''
}
status: '',
},
}
},
created() {
this.$set(this.withdrawalSearchForm, 'withdrawalTime', [this.defalutStartTime, this.defalutEndTime])
this.$set(this.withdrawalSearchForm, 'withdrawalTime', [
this.defalutStartTime,
this.defalutEndTime,
])
},
mounted() {
this.handleSearch()
this.handleSearch()
},
methods: {
handleSearch() {
......@@ -90,15 +101,16 @@ export default {
Object.keys(this.withdrawalSearchForm).forEach((key) => {
this.withdrawalSearchForm[key] = ''
})
this.$set(this.withdrawalSearchForm, 'withdrawalTime', [this.defalutStartTime, this.defalutEndTime])
this.$set(this.withdrawalSearchForm, 'withdrawalTime', [
this.defalutStartTime,
this.defalutEndTime,
])
this.$nextTick(() => {
this.handleSearch()
})
}
}
},
},
}
</script>
<style scoped>
</style>
<style scoped></style>
<template>
<d2-table
class='my-row-height'
ref='withdrawalTable'
:hasNum='true'
:tableParams='withdrawalTableParams'
:searchForm='searchForm'
:getListApi='getListApi'
:pageConf='pageConf'
@sendAlldata = 'getAmountCollection'
class="my-row-height"
ref="withdrawalTable"
:hasNum="true"
:tableParams="withdrawalTableParams"
:searchForm="searchForm"
:getListApi="getListApi"
:pageConf="pageConf"
@sendAlldata="getAmountCollection"
>
<div slot="status" slot-scope="scope">
<span v-if="scope.scope.status == '1'">待审核</span>
......@@ -22,18 +22,18 @@
import { withdrawalApi } from '@/api/withdrawalManagement'
export default {
name: 'WithdrawalTable',
props:{
searchForm:{
type:Object,
default:{}
}
props: {
searchForm: {
type: Object,
default: {},
},
},
data() {
return {
pageConf: {
pageSize: 'pageSize',
pageNum: 'pageNum',
totalCount: 'data.count'
totalCount: 'data.count',
},
withdrawalTableParams: {
mutiSelectUniqueKey: 'id',
......@@ -42,66 +42,82 @@ export default {
tableColumns: [
{
label: '员工名称',
prop: 'staffName'
prop: 'staffName',
},
{
label: '员工手机号',
prop: 'staffPhone'
prop: 'staffPhone',
},
{
label: '门店名称',
prop: 'merchantName',
},
{
label: '积分值',
prop: 'withdrawalScore'
prop: 'withdrawalScore',
},
{
label: '提现金额(元)',
prop: 'withdrawalAmount'
prop: 'withdrawalAmount',
},
{
label: '提现时间',
prop: 'withdrawalTime'
prop: 'withdrawalTime',
},
{
label: '微信昵称',
prop: 'wechatNickName'
prop: 'wechatNickName',
},
{
label: '微信手机号',
prop: 'wechatPhone'
prop: 'wechatPhone',
},
{
label: '微信openid',
prop: 'wechatOpenId'
prop: 'wechatOpenId',
},
{
label: '状态',
prop: 'status',
addHtml:'status'
addHtml: 'status',
},
{
label: '审核人',
prop: 'reviewer'
prop: 'reviewer',
},
{
label: '审核时间',
prop: 'reviewTime'
prop: 'reviewTime',
},
{
label: '到账时间',
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)
methods: {
getAmountCollection(val) {
let {
receivedAmount,
receivingAmount,
reviewingAmount,
totalAmount,
failureAmount,
} = val
let amountCollection = {
receivedAmount,
receivingAmount,
reviewingAmount,
totalAmount,
failureAmount,
}
}
}
this.$emit('sendCollection', amountCollection)
},
},
}
</script>
<style scoped>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!