Commit a644db22 by Lin

Merge branch 'saas+v5.8.3' of http://192.168.3.233:8090/glsx/gl_tape into saas+v5.8.3

2 parents 9d9a61a5 0ad661c2
...@@ -12,10 +12,11 @@ ...@@ -12,10 +12,11 @@
<view class="customer-item flex" :key="index"> <view class="customer-item flex" :key="index">
<view class="item-title">{{ item.title }}</view> <view class="item-title">{{ item.title }}</view>
<view class="item-content text-hide"> <view class="item-content text-hide">
<template v-if="item.block"> <template v-if="item.key == 'customerStatus'">
<view :class="['block', item.status == 1 ? 'success' : 'failed']">{{ item.content }}</view> <view :class="['block', orderStatusClass(options.data[item.key])]">{{
orderStatus(options.data[item.key]) || '-' }}</view>
</template> </template>
<text v-else>{{ options.data[item.key] }}</text> <text v-else>{{ formatContent(item.key) }}</text>
</view> </view>
</view> </view>
</template> </template>
...@@ -29,7 +30,10 @@ ...@@ -29,7 +30,10 @@
</view> </view>
<scroll-view class="content" scroll-y> <scroll-view class="content" scroll-y>
<template v-for="(item, index) in taskList"> <template v-for="(item, index) in taskList">
<task-item :key="index" :item="item" :num="index" :type="options.type" @confirmTask="confirmTask" /> <task-item :key="index" :item="{
...item,
qwGroupName: options.data.qwGroupName
}" :num="index" :type="options.type" @confirmTask="confirmTask" />
</template> </template>
<view class="p-b"></view> <view class="p-b"></view>
</scroll-view> </scroll-view>
...@@ -87,6 +91,27 @@ export default { ...@@ -87,6 +91,27 @@ export default {
}, },
mounted() { }, mounted() { },
methods: { methods: {
orderStatus(status) {
return {
1: '待跟进',
2: '已升级',
3: '战败',
4: '已退款',
}[status]
},
orderStatusClass(status) {
return {
1: 'failed',
2: 'success',
3: 'failed',
4: 'failed',
}[status]
},
formatContent(key) {
let { data } = this.options
if (key == 'qwGroupName' && !data[key]) return '客户群不存在'
return data[key] || '-'
},
open(options) { open(options) {
this.options = options this.options = options
this.$refs.popup.open() this.$refs.popup.open()
...@@ -115,11 +140,44 @@ export default { ...@@ -115,11 +140,44 @@ export default {
} }
}, },
confirmTask(options) { confirmTask({ confirmStatus, item }) {
console.log(options) 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() { confirmAllTask() {
console.log('全部任务合并推送') let _this = this,
{ taskList } = this,
taskIds = taskList.filter(item => item.taskStatus == 0).map(item => item.taskId)
uni.showModal({
title: '确认向客户群推送该营销任务?',
content: '推送后将无法撤回。',
confirmColor: '#347BFF',
success(res) {
if (res.confirm) _this.confirmSopTask({
taskIds,
confirmStatus: 1
})
}
})
},
async confirmSopTask(params) {
console.log(params)
return
const data = await uni.$api.customerApi.confirmSopTask(params)
uni.showToast({
title: data ? '提交成功' : '提交失败',
icon: "none",
})
} }
} }
} }
...@@ -220,7 +278,6 @@ export default { ...@@ -220,7 +278,6 @@ export default {
border-radius: 16rpx; border-radius: 16rpx;
height: 64rpx; height: 64rpx;
line-height: 64rpx; line-height: 64rpx;
color: #2C66F7;
font-size: 28rpx; font-size: 28rpx;
} }
......
...@@ -230,7 +230,7 @@ export default { ...@@ -230,7 +230,7 @@ export default {
border-bottom: 1rpx solid #F0F1F5; border-bottom: 1rpx solid #F0F1F5;
&:last-child { &:last-child {
border-bottom: none; // border-bottom: none;
} }
.row-item { .row-item {
......
...@@ -19,6 +19,50 @@ ...@@ -19,6 +19,50 @@
</template> </template>
</view> </view>
</view> </view>
<view class="task-item-content">
<template v-for="(i, index) in messageList">
<view :class="['content-item flex', { 'content-item-message': i.label == '消息内容' }]" :key="index">
<view class="content-item-title">{{ i.label }}</view>
<view class="content-item-content">
<template v-if="i.format">
{{ i.format(item[i.key]) }}
</template>
<template v-else>
<template v-if="i.label == '消息内容'">
<template v-if="[2, 3].includes(item.messageType)">
<template v-if="item.messageType == 2">
<view class="img-box">
<template v-for="value in getImages(item.mediaIds)">
<image :src="value" class="image" v-if="value"></image>
</template>
</view>
</template>
<template v-else>
<video :src="item.mediaIds" class="video" :poster="defaultPoster"></video>
</template>
</template>
<template v-else-if="item.messageType == 4">
<view class="link flex">
<view class="link-text text-hide">{{ item.jumpUrl }}</view>
<view class="copy" @click="copyText(item.jumpUrl)">复制</view>
</view>
</template>
<template v-else>
<text>
{{ item[i.key] }}
</text>
</template>
</template>
<template v-else>
<text>
{{ item[i.key] }}
</text>
</template>
</template>
</view>
</view>
</template>
</view>
</view> </view>
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
...@@ -31,10 +75,32 @@ export default { ...@@ -31,10 +75,32 @@ export default {
}, },
data() { data() {
return {} return {
defaultPoster: 'https://img02.glsx.com.cn/weapp/resource/app-zyzs/equity/tire-tips-1.webp'
}
}, },
watch: {}, watch: {},
computed: {}, computed: {
messageList() {
let { type } = this
return type == 'task' ? [
{ label: '目标群', key: 'qwGroupName' },
{ label: '消息类型', key: 'messageType', format: (type) => this.messageType(type) },
{ label: '消息内容', key: 'messageContent' },
] : [
{ label: '消息内容', key: 'messageContent' },
{ label: '推送时间', key: 'pushTime' },
{
label: '推送结果', key: 'pushResult', format: (status) => {
return {
2: '成功',
3: '失败',
}[status]
}
},
]
}
},
mounted() { }, mounted() { },
methods: { methods: {
messageType(type) { messageType(type) {
...@@ -42,7 +108,7 @@ export default { ...@@ -42,7 +108,7 @@ export default {
1: '文本', 1: '文本',
2: '图片', 2: '图片',
3: '视频', 3: '视频',
4: '网页链接', 4: '网页',
}[type] }[type]
}, },
taskStatus(status) { taskStatus(status) {
...@@ -57,6 +123,20 @@ export default { ...@@ -57,6 +123,20 @@ export default {
item: this.item item: this.item
}) })
}, },
copyText(data) {
uni.setClipboardData({
data,
success: function () {
uni.showToast({
title: '复制成功',
icon: 'success'
})
}
})
},
getImages(mediaIds) {
return mediaIds.split(',')
},
} }
} }
</script> </script>
...@@ -129,5 +209,61 @@ export default { ...@@ -129,5 +209,61 @@ export default {
} }
} }
&-content {
background-color: #fff;
padding: 28rpx 32rpx;
border-radius: 32rpx;
display: flex;
flex-wrap: wrap;
gap: 28rpx 40rpx;
.content-item {
width: calc(50% - 20rpx);
font-size: 26rpx;
&-title {
color: #999EA8;
flex-shrink: 0;
width: 120rpx;
}
&-content {
width: calc(100% - 136rpx);
color: #292D33;
flex-shrink: 0;
margin-left: 16rpx;
.link {
&-text {
max-width: 93%;
}
.copy {
margin-left: 16rpx;
color: #2C66F7;
flex-shrink: 0;
}
}
.video, .image {
width: 160rpx;
height: 160rpx;
border-radius: 16rpx;
}
.img-box {
display: flex;
flex-wrap: wrap;
gap: 24rpx;
}
}
}
.content-item-message {
width: 100%;
align-items: flex-start;
}
}
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -203,7 +203,7 @@ export default { ...@@ -203,7 +203,7 @@ export default {
.setting-box { .setting-box {
position: relative; position: relative;
width: toRpx(720); width: toRpx(720);
height: toRpx(880); height: toRpx(1000);
background: #ffffff; background: #ffffff;
border-radius: toRpx(40); border-radius: toRpx(40);
box-sizing: border-box; box-sizing: border-box;
...@@ -225,7 +225,7 @@ export default { ...@@ -225,7 +225,7 @@ export default {
flex-direction: column; flex-direction: column;
font-size: toRpx(32); font-size: toRpx(32);
color: #333333; color: #333333;
padding-top: toRpx(120);
.sprite-icon { .sprite-icon {
margin-bottom: toRpx(12); margin-bottom: toRpx(12);
box-shadow: 0 0 toRpx(24) 0 #3682ef33; box-shadow: 0 0 toRpx(24) 0 #3682ef33;
...@@ -288,7 +288,7 @@ export default { ...@@ -288,7 +288,7 @@ export default {
font-size: toRpx(24); font-size: toRpx(24);
color: #999999; color: #999999;
line-height: toRpx(40); line-height: toRpx(40);
padding-bottom: toRpx(40);
.icon-clone { .icon-clone {
width: toRpx(24); width: toRpx(24);
height: toRpx(24); height: toRpx(24);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!