Commit 38ce3bee by 李伟康

refactor(CustomerOpportunities): 将任务相关术语统一替换为活动

- 将界面显示中的"今日任务"改为"今日活动"
- 将描述文案中的"营销任务"改为"营销活动"
- 将按钮文字中的"推送运营任务"改为"推送运营活动"
- 将记录标题中的"任务记录"改为"活动记录"
- 更新CustomerPopup组件中的确认逻辑,支持批量操作选择
- 移除TaskItem组件中的独立操作按钮,简化状态展示
- 调整样式类名以适应新的功能结构
1 parent 07b4217b
...@@ -26,7 +26,10 @@ ...@@ -26,7 +26,10 @@
<view :class="['sprite-icon', subIcon]"></view> <view :class="['sprite-icon', subIcon]"></view>
{{ subTitle }} {{ subTitle }}
<template v-if="options.type == 'task' && taskList.length"> <template v-if="options.type == 'task' && taskList.length">
<view class="btn flex" @click="confirmAllTask">全部任务合并推送</view> <view class="btn-box flex">
<view class="btn primary-btn flex" @click="confirmAllTask(1)">立即推送</view>
<view class="btn flex" @click="confirmAllTask(2)">暂不推送</view>
</view>
</template> </template>
</view> </view>
<template v-if="loadComplete"> <template v-if="loadComplete">
...@@ -36,7 +39,7 @@ ...@@ -36,7 +39,7 @@
<task-item :key="index" :item="{ <task-item :key="index" :item="{
...item, ...item,
qwGroupName: options.data.qwGroupName qwGroupName: options.data.qwGroupName
}" :num="index" :type="options.type" @confirmTask="confirmTask" /> }" :num="index" :type="options.type"/>
</template> </template>
<view class="p-b"></view> <view class="p-b"></view>
</view> </view>
...@@ -81,15 +84,15 @@ export default { ...@@ -81,15 +84,15 @@ export default {
let { type } = this.options, let { type } = this.options,
title = { title = {
task: '客户基础信息', task: '客户基础信息',
taskRecord: '任务记录' taskRecord: '活动记录'
}[type] }[type]
return title return title
}, },
subTitle() { subTitle() {
let { type } = this.options, let { type } = this.options,
title = { title = {
task: '推送运营任务', task: '推送运营活动',
taskRecord: '任务记录(近7天)' taskRecord: '活动记录(近7天)'
}[type] }[type]
return title return title
}, },
...@@ -161,32 +164,18 @@ export default { ...@@ -161,32 +164,18 @@ export default {
} }
}, },
confirmTask({ confirmStatus, item }) { confirmAllTask(confirmStatus) {
let _this = this
uni.showModal({
title: confirmStatus == 1 ? '确认向客户群推送该营销任务?' : '确认不触达该营销任务?',
content: confirmStatus == 1 ? '推送后将无法撤回。' : '本次任务将终止执行。',
confirmColor: '#347BFF',
success(res) {
if (res.confirm) _this.confirmSopTask({
taskId: item.taskId,
confirmStatus
})
}
})
},
confirmAllTask() {
let _this = this, let _this = this,
{ taskList } = this, { taskList } = this,
taskIds = taskList.filter(item => item.taskStatus == 0).map(item => item.taskId) taskIds = taskList.filter(item => item.taskStatus == 0).map(item => item.taskId)
uni.showModal({ uni.showModal({
title: '确认向客户群推送该营销任务?', title: confirmStatus == 1 ? '确认向客户群推送该营销活动?' : '确认不推送该营销活动?',
content: '推送后将无法撤回。', content: confirmStatus == 1 ? '推送后将无法撤回。' : '本次活动将终止执行。',
confirmColor: '#347BFF', confirmColor: '#347BFF',
success(res) { success(res) {
if (res.confirm) _this.confirmSopTask({ if (res.confirm) _this.confirmSopTask({
taskIds, taskIds,
confirmStatus: 1 confirmStatus
}, true) }, true)
} }
}) })
...@@ -315,15 +304,25 @@ export default { ...@@ -315,15 +304,25 @@ export default {
margin-right: toRpx(18); margin-right: toRpx(18);
} }
.btn { .btn-box {
margin-left: auto; margin-left: auto;
background-color: #2C66F7;
color: #FFFFFF; .btn {
margin-left: toRpx(16);
padding: 0 toRpx(32); padding: 0 toRpx(32);
border-radius: toRpx(16); border-radius: toRpx(8);
height: toRpx(64); border: toRpx(2) solid #DCE1E6;
line-height: toRpx(64); color: #292D33;
font-size: toRpx(28); font-size: toRpx(26);
height: toRpx(56);
line-height: toRpx(56);
}
.primary-btn {
border-color: #2C66F71A;
background-color: #2C66F70D;
color: #2C66F7;
}
} }
} }
...@@ -332,9 +331,11 @@ export default { ...@@ -332,9 +331,11 @@ export default {
height: toRpx(28); height: toRpx(28);
} }
} }
.scroll-content{
.scroll-content {
height: calc(100% - #{toRpx(128)}); height: calc(100% - #{toRpx(128)});
} }
.nothing { .nothing {
height: calc(100% - #{toRpx(484)}); height: calc(100% - #{toRpx(484)});
} }
......
...@@ -47,8 +47,8 @@ ...@@ -47,8 +47,8 @@
</view> </view>
<view class="row-item action-col"> <view class="row-item action-col">
<view class="action-btn primary-btn" v-if="type == 0" @click="pushTask(item)">推送运营任务</view> <view class="action-btn primary-btn" v-if="type == 0" @click="pushTask(item)">推送运营活动</view>
<view class="action-btn secondary-btn" @click="viewTaskRecord(item)">查看任务记录</view> <view class="action-btn secondary-btn" @click="viewTaskRecord(item)">查看活动记录</view>
</view> </view>
</view> </view>
<template v-if="noMore"> <template v-if="noMore">
......
<template> <template>
<view class="task-item"> <view class="task-item">
<view class="task-item-title flex"> <view class="task-item-title flex">
<view class="tag flex">任务{{ num + 1 }}</view> <view class="tag flex">活动{{ num + 1 }}</view>
<view class="text flex"> <view class="text flex">
向客户群发送消息 向客户群发送消息
<template v-if="type == 'taskRecord'"> <template v-if="type == 'taskRecord'">
...@@ -10,11 +10,7 @@ ...@@ -10,11 +10,7 @@
</template> </template>
</view> </view>
<view class="btn-box flex"> <view class="btn-box flex">
<template v-if="item.taskStatus == 0"> <template v-if="item.taskStatus != 0">
<view class="btn primary-btn" @click="confirmTask(1)">立即推送</view>
<view class="btn" @click="confirmTask(2)">暂不推送</view>
</template>
<template v-else>
<view :class="['status flex', taskStatusClass(item.taskStatus)]">{{ taskStatus(item.taskStatus) }}</view> <view :class="['status flex', taskStatusClass(item.taskStatus)]">{{ taskStatus(item.taskStatus) }}</view>
</template> </template>
</view> </view>
...@@ -39,7 +35,8 @@ ...@@ -39,7 +35,8 @@
</template> </template>
<template v-else> <template v-else>
<!-- <video controls :src="item.mediaIds" class="video" ></video> --> <!-- <video controls :src="item.mediaIds" class="video" ></video> -->
<DomVideoPlayer class="video" ref="domVideoPlayer" :src="item.mediaIds" :poster="defaultPoster" controls /> <DomVideoPlayer class="video" ref="domVideoPlayer" :src="item.mediaIds" :poster="defaultPoster"
controls />
</template> </template>
</template> </template>
<template v-else-if="item.messageType == 4"> <template v-else-if="item.messageType == 4">
...@@ -197,24 +194,6 @@ export default { ...@@ -197,24 +194,6 @@ export default {
.btn-box { .btn-box {
margin-left: auto; margin-left: auto;
.btn {
margin-left: toRpx(16);
padding: 0 toRpx(32);
border-radius: toRpx(8);
border: toRpx(2) solid #DCE1E6;
color: #292D33;
font-size: toRpx(26);
height: toRpx(56);
line-height: toRpx(56);
}
.primary-btn {
border-color: #2C66F71A;
background-color: #2C66F70D;
color: #2C66F7;
}
.status { .status {
display: inline-block; display: inline-block;
padding: 0 toRpx(32); padding: 0 toRpx(32);
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
<view class="tips flex"> <view class="tips flex">
<view class="today flex"> <view class="today flex">
<view class="sprite-icon icon-customer-sop-1"></view> <view class="sprite-icon icon-customer-sop-1"></view>
今日任务({{ toDay }}) 今日活动({{ toDay }})
</view> </view>
<view class="text">根据SOP策略生成营销任务,请及时推送客户</view> <view class="text">根据SOP策略生成营销活动,请及时推送客户</view>
</view> </view>
<view class="tabs-box flex"> <view class="tabs-box flex">
<template v-for="(tab, index) in tabs"> <template v-for="(tab, index) in tabs">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!