Commit 00f9d689 by 前端

Merge branch 'v2.12.0' of http://192.168.3.233:8090/glsx-web/glsx-oss-task into kyq_dev

2 parents 5b95b4c4 6865d575
...@@ -26,10 +26,10 @@ const taskApi = { ...@@ -26,10 +26,10 @@ const taskApi = {
}, },
// 获取所有未结束活动 // 获取所有未结束活动
getActivityBypage(data) { getActivityBypage(data) {
data.method = 'scrm.api.shopmall.crowd.activity.page' data.method = 'scrm.api.assistant.crowd.activity.page'
return request( return request(
data, data,
'scrm.api.shopmall.crowd.activity.page', 'scrm.api.assistant.crowd.activity.page',
[], [],
Vue.prototype.otherUrl Vue.prototype.otherUrl
) )
......
...@@ -347,7 +347,7 @@ export default { ...@@ -347,7 +347,7 @@ export default {
props: { props: {
btnList: Array, btnList: Array,
form: String, form: String,
previewList: { previewData: {
type: Array, type: Array,
default: () => [], default: () => [],
}, },
...@@ -371,7 +371,7 @@ export default { ...@@ -371,7 +371,7 @@ export default {
loading: false, loading: false,
emotionStatus: false, emotionStatus: false,
guestForm: {}, guestForm: {},
// previewList: [], previewList: this.previewData,
sendType: '', sendType: '',
sendTime: '', sendTime: '',
sendDate: '', sendDate: '',
......
<template> <template>
<div class="w-textarea" ref="wTextarea" v-bind="$attr"> <div class="w-textarea" ref="wTextarea">
<div contenteditable="true" class="w-textarea_input" ref="wTextareaContent" :id="contentId" @keydown="textareaKeydown($event)" @click="inputClick($event)" @focus="onFocus" @blur="onBlur" @keydown.delete="handleDelete($event)" @input="handleInput($event.target)"></div> <div
</div> contenteditable="true"
</template> class="w-textarea_input"
<script> ref="wTextareaContent"
:id="contentId"
@keydown="textareaKeydown($event)"
@click="inputClick($event)"
@focus="onFocus"
@blur="onBlur"
@keydown.delete="handleDelete($event)"
@input="handleInput($event.target)"
></div>
</div>
</template>
<script>
import emoji from '../../utils/emo' import emoji from '../../utils/emo'
export default { export default {
name: 'wTextarea', name: 'wTextarea',
...@@ -19,20 +30,20 @@ export default { ...@@ -19,20 +30,20 @@ export default {
// 记录当前选中tag的ID // 记录当前选中tag的ID
currentTagId: null, currentTagId: null,
// 当前光标位置 // 当前光标位置
savedRange: {} savedRange: {},
} }
}, },
props: { props: {
value: { value: {
type: String, type: String,
default: '' default: '',
}, },
tag: { tag: {
// 自定义模版标签的标签名 // 自定义模版标签的标签名
type: String, type: String,
// 默认使用wise作为标签名,并添加了默认样式 // 默认使用wise作为标签名,并添加了默认样式
// 当使用其他标签名的时候,需要另写标签样式 // 当使用其他标签名的时候,需要另写标签样式
default: 'wise' default: 'wise',
}, },
tools: { tools: {
// 自定义扩展功能:超链接'link',模版标签'tag' // 自定义扩展功能:超链接'link',模版标签'tag'
...@@ -40,15 +51,15 @@ export default { ...@@ -40,15 +51,15 @@ export default {
default() { default() {
return [ return [
{ type: 'link', text: '添加超链接' }, { type: 'link', text: '添加超链接' },
{ type: 'tag', text: '添加模版标签' } { type: 'tag', text: '添加模版标签' },
] ]
} },
}, },
maxlength: { maxlength: {
// 最大输入长度 // 最大输入长度
type: [String, Number], type: [String, Number],
default: '' default: '',
} },
}, },
computed: { computed: {
count() { count() {
...@@ -57,7 +68,7 @@ export default { ...@@ -57,7 +68,7 @@ export default {
let text = let text =
num < 0 ? `已超出${Math.abs(num)}个字符` : `还可以输入${num}个字符` num < 0 ? `已超出${Math.abs(num)}个字符` : `还可以输入${num}个字符`
return { num, text } return { num, text }
} },
}, },
mounted() { mounted() {
// 初始化数据 // 初始化数据
...@@ -199,7 +210,7 @@ export default { ...@@ -199,7 +210,7 @@ export default {
) )
.replace(/<wise.+?>(.+?)(?:<\/wise>)/g, '$1') .replace(/<wise.+?>(.+?)(?:<\/wise>)/g, '$1')
.replace(/<br>/g, '\n') .replace(/<br>/g, '\n')
const replaceImg = cutImg.replace(/(\d){3}.png">/g, function(str) { const replaceImg = cutImg.replace(/(\d){3}.png">/g, function (str) {
let s = list[parseInt(str.split('.')[0]) - 1] let s = list[parseInt(str.split('.')[0]) - 1]
return `[${s}]` return `[${s}]`
}) })
...@@ -296,7 +307,7 @@ export default { ...@@ -296,7 +307,7 @@ export default {
) { ) {
this.savedRange = range this.savedRange = range
} }
} },
}, },
watch: { watch: {
value(val) { value(val) {
...@@ -304,11 +315,11 @@ export default { ...@@ -304,11 +315,11 @@ export default {
if (!this.isLocked) { if (!this.isLocked) {
this.$refs.wTextareaContent.innerHTML = val this.$refs.wTextareaContent.innerHTML = val
} }
} },
} },
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.w-textarea { .w-textarea {
wise { wise {
user-select: none; user-select: none;
...@@ -338,7 +349,7 @@ export default { ...@@ -338,7 +349,7 @@ export default {
} }
} }
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
$borderColor: #e5e5e5; $borderColor: #e5e5e5;
$bgColor: #f5f7fa; $bgColor: #f5f7fa;
$textColor: #666; $textColor: #666;
......
...@@ -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
......
...@@ -7,13 +7,18 @@ ...@@ -7,13 +7,18 @@
:before-close="handleClose" :before-close="handleClose"
> >
<div class="activity-box"> <div class="activity-box">
<span>系统中已存在活动不可选择;</span>
<span v-if="isClone">复制功能,活动天数不一致的活动不可选择</span>
<div class="model-item-panel" v-if="activityData.length"> <div class="model-item-panel" v-if="activityData.length">
<div <div
class="model-item" class="model-item"
:class="{ checked: selectItem == item }" :class="{
checked: selectItem == item && item.taskStatus != 1,
abandon: item.taskStatus == 1,
}"
v-for="(item, index) in activityData" v-for="(item, index) in activityData"
:key="index" :key="index"
@click="handleSelectItem(item)" @click="!item.taskStatus && handleSelectItem(item)"
> >
<img class="model-item-img" :src="item.activityImg" alt="" /> <img class="model-item-img" :src="item.activityImg" alt="" />
<div class="model-item-title" :title="item.activityName"> <div class="model-item-title" :title="item.activityName">
...@@ -63,6 +68,8 @@ export default { ...@@ -63,6 +68,8 @@ export default {
return { return {
activityDiaVisible: false, activityDiaVisible: false,
loading: false, loading: false,
isClone: false,
taskDateNum: 0,
activityData: [], activityData: [],
selectItem: {}, selectItem: {},
pageParam: { pageParam: {
...@@ -73,8 +80,10 @@ export default { ...@@ -73,8 +80,10 @@ export default {
} }
}, },
methods: { methods: {
init(merchantId) { init(merchantId, isClone, taskDateNum) {
this.activityDiaVisible = true this.activityDiaVisible = true
this.isClone = isClone
this.taskDateNum = taskDateNum
this.getActivityData(merchantId) this.getActivityData(merchantId)
}, },
getActivityData(merchantId) { getActivityData(merchantId) {
...@@ -91,10 +100,26 @@ export default { ...@@ -91,10 +100,26 @@ export default {
this.activityData.map((item) => { this.activityData.map((item) => {
item.startTime = dayjs(item.startTime).format('YYYY-MM-DD') item.startTime = dayjs(item.startTime).format('YYYY-MM-DD')
item.endTime = dayjs(item.endTime).format('YYYY-MM-DD') item.endTime = dayjs(item.endTime).format('YYYY-MM-DD')
if (this.isClone) {
console.log(this.taskDateNum)
let activityDays = this.getDateByDays(item.startTime, item.endTime)
if (activityDays != this.taskDateNum) {
item.taskStatus = 1
}
}
}) })
console.log(this.activityData, 'this.activityData') console.log(this.activityData, 'this.activityData')
}) })
}, },
// 根据日期获取天数
getDateByDays(startDate, endDdate) {
let d1 = Date.parse(new Date(startDate))
let d2 = Date.parse(new Date(endDdate))
// 时间戳相减 / 天数
let day = parseInt((d2 - d1) / (1000 * 60 * 60 * 24)) + 1
return day
},
handleSelectItem(item) { handleSelectItem(item) {
console.log(item) console.log(item)
this.selectItem = item this.selectItem = item
...@@ -156,6 +181,9 @@ export default { ...@@ -156,6 +181,9 @@ export default {
&.checked { &.checked {
border: 2px solid #5850ff; border: 2px solid #5850ff;
} }
&.abandon {
cursor: not-allowed;
}
&:nth-child(4n) { &:nth-child(4n) {
margin-right: 0px; margin-right: 0px;
} }
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
placeholder="请选择业务场景" placeholder="请选择业务场景"
size="small" size="small"
> >
<el-option label="1.3存量用户众筹" :value="4"></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="商户:" prop="merchantId"> <el-form-item label="商户:" prop="merchantId">
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
:remote-method="remoteMethod" :remote-method="remoteMethod"
placeholder="请选择商户" placeholder="请选择商户"
size="small" size="small"
@focus="selectMerchant"
@change="changeMerchant" @change="changeMerchant"
> >
<el-option <el-option
...@@ -166,7 +165,7 @@ ...@@ -166,7 +165,7 @@
:form="'customer'" :form="'customer'"
style="line-height: 12px" style="line-height: 12px"
:btnList="btnList" :btnList="btnList"
:previewList="itm.missionMaterialList" :previewData="itm.missionMaterialList"
@getEditor="getEditor(item, index, itm, index1)" @getEditor="getEditor(item, index, itm, index1)"
@shareMatrial="shareMatrial" @shareMatrial="shareMatrial"
></GLEditor> ></GLEditor>
...@@ -303,7 +302,7 @@ export default { ...@@ -303,7 +302,7 @@ export default {
return { return {
// 基础信息表单 // 基础信息表单
basicForm: { basicForm: {
businessScene: 4, businessScene: 3,
merchantId: '', merchantId: '',
merchantName: '', merchantName: '',
activityId: '', activityId: '',
...@@ -325,6 +324,8 @@ export default { ...@@ -325,6 +324,8 @@ export default {
isClone: false, isClone: false,
// 活动弹框 // 活动弹框
activityDiaVisible: false, activityDiaVisible: false,
// 活动日期天数
taskDateNum: 0,
btnList: [ btnList: [
{ {
name: '表情', name: '表情',
...@@ -460,15 +461,17 @@ export default { ...@@ -460,15 +461,17 @@ export default {
this.isEditor = true this.isEditor = true
// this.taskList = params.task.missionDateList // this.taskList = params.task.missionDateList
this.findMissionDeail(params.task.id) this.findMissionDeail(params.task.id)
this.getEditTaskList() // this.getEditTaskList()
this.taskId = params.task.id this.taskId = params.task.id
console.log(this.taskList, '88888') console.log(this.taskList, '88888')
} }
// 判断是否是复制 // 判断是否是复制
if (params && params.id) { if (params && params.id) {
this.getCloneTaskList(params.missionDateList) this.isClone = true
this.findMissionDeail(params.id)
} }
}) })
this.selectMerchant()
}, },
methods: { methods: {
// 点击选择活动/任务 // 点击选择活动/任务
...@@ -488,7 +491,11 @@ export default { ...@@ -488,7 +491,11 @@ export default {
return return
} }
this.activityDiaVisible = true this.activityDiaVisible = true
this.$refs.activityDia.init(this.basicForm.merchantId) this.$refs.activityDia.init(
this.basicForm.merchantId,
this.isClone,
this.taskDateNum
)
// this.$refs.activityDia.init(44209390) // this.$refs.activityDia.init(44209390)
}, },
// 选择商户 // 选择商户
...@@ -501,18 +508,22 @@ export default { ...@@ -501,18 +508,22 @@ export default {
return return
} }
let params = {} let params = {}
// params.sceneCode = 'SC00' + this.basicForm.businessScene params.sceneCode = 'SC00' + this.basicForm.businessScene
params.sceneCode = 'SC003'
params.merchantName = query params.merchantName = query
taskApi.findMerchantByScene(params).then((res) => { taskApi.findMerchantByScene(params).then((res) => {
console.log(res, 'selectMerchant') console.log(res, 'selectMerchant')
this.merchantList = res.data.data this.merchantList = res.data.data
}) })
}, },
// 商户改变 // 商户改变获取商户名
changeMerchant(val) { changeMerchant(val) {
console.log(val) console.log(val)
this.basicForm.merchantName =
val &&
this.merchantList.find((item) => item.merchantId == val).merchantName
console.log(this.basicForm)
}, },
// 根据商户名搜索商户
remoteMethod(query) { remoteMethod(query) {
if (query !== '') { if (query !== '') {
this.selectMerchant(query) this.selectMerchant(query)
...@@ -532,15 +543,13 @@ export default { ...@@ -532,15 +543,13 @@ export default {
// 任务tab切换 // 任务tab切换
handleClick() {}, handleClick() {},
// 任务克隆获取克隆任务计划 // 任务克隆获取克隆任务计划
getCloneTaskList(taskListData) { getCloneTaskList() {
this.taskList = taskListData // 处理克隆日期数据
// 处理克隆数据 this.taskList.map((item) => {
this.taskList.map((item, index) => { if (item.activityTime != -1) {
if (taskListData.length != index + 1) {
item.activityTime = '' item.activityTime = ''
} }
}) })
this.isClone = true
console.log(this.taskList) console.log(this.taskList)
}, },
// 任务编辑处理任务计划数据 // 任务编辑处理任务计划数据
...@@ -559,10 +568,11 @@ export default { ...@@ -559,10 +568,11 @@ export default {
}, },
// 遍历日期 // 遍历日期
setHouseRatesColumn(startTime, endTime) { setHouseRatesColumn(startTime, endTime) {
console.log(this.taskList, 'clone')
this.taskList = []
startTime = new Date(startTime) startTime = new Date(startTime)
endTime = new Date(endTime) endTime = new Date(endTime)
let num = 0 let num = 0
let editList = []
while (endTime.getTime() - startTime.getTime() >= 0) { while (endTime.getTime() - startTime.getTime() >= 0) {
const year = startTime.getFullYear() const year = startTime.getFullYear()
const month = const month =
...@@ -573,44 +583,51 @@ export default { ...@@ -573,44 +583,51 @@ export default {
startTime.getDate().toString().length == 1 startTime.getDate().toString().length == 1
? '0' + startTime.getDate() ? '0' + startTime.getDate()
: startTime.getDate() : startTime.getDate()
// 判断是否为复制页面
if (!this.isClone) {
this.taskList.push({
activityTime: `${year}-${month}-${day}`,
missionList: [],
})
} else {
this.$set(this.taskList[num], 'activityTime', `${month}-${day}`)
}
num++
console.log(num)
startTime.setDate(startTime.getDate() + 1)
}
console.log(editList, 'editList')
// 非复制页面,多添加一个完整周期tab
if (!this.isClone) {
this.taskList.push({ this.taskList.push({
activityTime: '-1', activityTime: `${year}-${month}-${day}`,
missionList: [], missionList: [],
}) })
num++
console.log(num)
startTime.setDate(startTime.getDate() + 1)
} }
// 如果是编辑页面,任务计划回显 console.log(this.taskList, 'clone11')
if (this.isEditor) { // 多添加一个完整周期tab
for (var i = 0; i < this.taskList.length; i++) { this.taskList.push({
for (var j = 0; j < this.taskEditList.missionDateList.length; j++) { activityTime: '-1',
console.log(this.taskEditList.missionDateList[j], '123123') missionList: [],
if ( })
this.taskList[i].activityTime == // 如果是编辑/复制页面,任务计划回显
this.taskEditList.missionDateList[j].activityTime if (this.isEditor || this.isClone) this.dealEcho()
) { // 如果是编辑,还需处理是否可编辑处理
this.taskList[i].missionList = if (this.isEditor) this.getEditTaskList()
this.taskEditList.missionDateList[j].missionList // 如果是克隆,还需处理克隆时间
} if (this.isClone) this.getCloneTaskList()
console.log(this.taskList, 'this.taskList')
return this.taskList
},
// 处理任务计划回显
dealEcho() {
for (var i = 0; i < this.taskList.length; i++) {
for (var j = 0; j < this.taskEditList.missionDateList.length; j++) {
console.log(this.taskEditList.missionDateList[j], '123123')
if (
this.taskList[i].activityTime ==
this.taskEditList.missionDateList[j].activityTime
) {
this.taskList[i].missionList =
this.taskEditList.missionDateList[j].missionList
} }
} }
} }
console.log(this.taskList, 'this.taskList') },
return this.taskList // 根据日期获取天数
getDateByDays(startDate, endDdate) {
let d1 = Date.parse(new Date(startDate))
let d2 = Date.parse(new Date(endDdate))
// 时间戳相减 / 天数
let day = parseInt((d2 - d1) / (1000 * 60 * 60 * 24)) + 1
return day
}, },
// 添加任务 // 添加任务
addTaskType(item, index) { addTaskType(item, index) {
...@@ -725,21 +742,27 @@ export default { ...@@ -725,21 +742,27 @@ export default {
crowd, crowd,
remark, remark,
merchantId, merchantId,
merchantName,
startTime, startTime,
endTime, endTime,
} = res.data } = res.data
this.basicForm.activityId = activityId this.basicForm.activityId = this.isEditor ? activityId : ''
this.basicForm.activityName = activityName this.basicForm.activityName = this.isEditor ? activityName : ''
this.basicForm.businessScene = businessScene this.basicForm.businessScene = businessScene
this.basicForm.channel = channel this.basicForm.channel = channel
this.basicForm.crowd = crowd.split(',') this.basicForm.crowd = crowd.split(',')
this.basicForm.remark = remark this.basicForm.remark = remark
this.basicForm.merchantId = merchantId this.basicForm.merchantId = merchantId
this.basicForm.merchantName = merchantName
this.startTime = startTime this.startTime = startTime
this.endTime = endTime this.endTime = endTime
this.taskEditList = res.data this.taskEditList = res.data
// this.taskList = res.data.missionDateList // this.taskList = res.data.missionDateList
this.setHouseRatesColumn(startTime, endTime) this.setHouseRatesColumn(startTime, endTime)
if (this.isClone) {
this.taskDateNum = this.getDateByDays(startTime, endTime)
console.log(this.taskDateNum, 'taskDateNum')
}
console.log(this.taskList) console.log(this.taskList)
} }
}) })
...@@ -819,7 +842,16 @@ export default { ...@@ -819,7 +842,16 @@ export default {
} }
// 编辑 // 编辑
taskApi.updateMission(params).then((res) => { taskApi.updateMission(params).then((res) => {
console.log(res, 'update') if (res && res.code == 0) {
this.$root.close('*添加任务模板')
this.$root.to([
'任务中心',
'任务平台',
'任务管理',
'任务模板管理',
'任务管理列表',
])
}
}) })
}, },
// 取消 // 取消
......
...@@ -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'
......
...@@ -58,6 +58,12 @@ ...@@ -58,6 +58,12 @@
:tableParams="tableParams" :tableParams="tableParams"
: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="activityStatus" slot-scope="scope"> <div slot="activityStatus" slot-scope="scope">
<span v-if="scope.scope.activityStatus == statusNum.UNPUBLISH" <span v-if="scope.scope.activityStatus == statusNum.UNPUBLISH"
>未发布</span >未发布</span
...@@ -185,7 +191,8 @@ export default { ...@@ -185,7 +191,8 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '业务场景', label: '业务场景',
prop: 'businessSceneName', prop: 'businessScene',
addHtml: 'businessScene',
width: 150, width: 150,
}, },
{ {
...@@ -271,7 +278,7 @@ export default { ...@@ -271,7 +278,7 @@ export default {
['任务中心', '任务平台', '任务管理', '任务模板管理', '*添加任务模板'], ['任务中心', '任务平台', '任务管理', '任务模板管理', '*添加任务模板'],
para para
) )
// this.$root.close('任务模板管理列表') this.$root.close('任务模板管理列表')
}, },
// 删除 // 删除
handleDelete(scope) { handleDelete(scope) {
...@@ -306,6 +313,7 @@ export default { ...@@ -306,6 +313,7 @@ export default {
['任务中心', '任务平台', '任务管理', '任务模板管理', '*添加任务模板'], ['任务中心', '任务平台', '任务管理', '任务模板管理', '*添加任务模板'],
scope scope
) )
this.$root.close('任务模板管理列表')
}, },
// 跳转查看详情 // 跳转查看详情
handleViewDetail(scope) { handleViewDetail(scope) {
......
...@@ -35,6 +35,8 @@ export default { ...@@ -35,6 +35,8 @@ export default {
}else{ }else{
this.$message.error('审核失败') this.$message.error('审核失败')
} }
}).catch(err =>{
this.$message.error('审核失败')
}) })
} }
} }
......
...@@ -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!