Commit 484f1145 by 前端

Merge branch 'kuangyq_dev_v3.0.0' into 'v3.0.0'

Kuangyq dev v3.0.0

See merge request !49
2 parents 370396ed 74a5ec5f
...@@ -277,8 +277,8 @@ ...@@ -277,8 +277,8 @@
type="file" type="file"
style="opacity: 0" style="opacity: 0"
:id="item.type + 'file'" :id="item.type + 'file'"
ref="file" ref="fileVideo"
class="welcome-input" class="welcome-input upload-video"
:accept="item.accept || 'video/*'" :accept="item.accept || 'video/*'"
@change="(e) => handleVideoChange(e)" @change="(e) => handleVideoChange(e)"
/> />
...@@ -646,6 +646,7 @@ export default { ...@@ -646,6 +646,7 @@ export default {
ATT_TYPE.VEDIO ATT_TYPE.VEDIO
) )
} }
document.querySelector('.upload-video').value = ''
var reader = new FileReader() var reader = new FileReader()
reader.readAsDataURL(file) reader.readAsDataURL(file)
reader.onload = (e) => { reader.onload = (e) => {
...@@ -655,7 +656,6 @@ export default { ...@@ -655,7 +656,6 @@ export default {
const fileUrl = splitStr[splitStr.length - 1] + '@' + arrBase64[1] const fileUrl = splitStr[splitStr.length - 1] + '@' + arrBase64[1]
// const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1] // const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
this.videoList.uploadApi({ file: fileUrl }).then((res) => { this.videoList.uploadApi({ file: fileUrl }).then((res) => {
console.log(res)
if (res) { if (res) {
this.$notify({ this.$notify({
title: '提示', title: '提示',
...@@ -707,7 +707,7 @@ export default { ...@@ -707,7 +707,7 @@ export default {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let file = e.srcElement.files[0] let file = e.srcElement.files[0]
// 默认10MB // 默认10MB
const limitSize = this.videoList.limitSize || 10 const limitSize = this.videoList.limitSize || 50
const isLt = file.size / 1024 / 1024 < limitSize const isLt = file.size / 1024 / 1024 < limitSize
if (!isLt) { if (!isLt) {
_this.$message.error('上传视频大小不能超过' + limitSize + 'MB!') _this.$message.error('上传视频大小不能超过' + limitSize + 'MB!')
......
...@@ -24,10 +24,10 @@ ...@@ -24,10 +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.0 新车权益销售' value='0'></el-option>
<el-option label='1.1 新车精品升级' value='1'></el-option> <el-option label='1.1 次新车精品升级' value='1'></el-option>
<el-option label='1.2 新车膨胀金活动' value='2'></el-option> <el-option label='1.2 次新车线上转化' value='2'></el-option>
<el-option label='1.3 售后直播众筹活动' value='3'></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='所属商户:'>
......
...@@ -14,10 +14,10 @@ ...@@ -14,10 +14,10 @@
:pageConf='pageConf' :pageConf='pageConf'
> >
<div slot="businessScene" slot-scope="scope"> <div slot="businessScene" slot-scope="scope">
<span v-if="scope.scope.businessScene == '0'">1.0 新车权益升级</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 == '1'">1.1 次新车精品升级</span>
<span v-if="scope.scope.businessScene == '2'">1.2 新车膨胀金活动</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 == '3'">1.3 存量用户众筹</span>
</div> </div>
<div slot="channel" slot-scope="scope"> <div slot="channel" slot-scope="scope">
<span v-if="scope.scope.channel == '1'">广联</span> <span v-if="scope.scope.channel == '1'">广联</span>
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
size="small" size="small"
:disabled="isEditor" :disabled="isEditor"
> >
<el-option label="1.3存量用户众筹" :value="3"></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">
...@@ -58,10 +58,10 @@ ...@@ -58,10 +58,10 @@
placeholder="请选择任务指定人群" placeholder="请选择任务指定人群"
size="small" size="small"
> >
<el-option label="1.0新车权益销售" value="0"></el-option> <el-option label="1.0 新车权益升级" value="0"></el-option>
<el-option label="1.1次新车精品升级" value="1"></el-option> <el-option label="1.1 新车精品升级" value="1"></el-option>
<el-option label="1.2次新车线上转化" value="2"></el-option> <el-option label="1.2 次新车膨胀金活动" value="2"></el-option>
<el-option label="1.3存量用户众筹" value="3"></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="channel"> <el-form-item label="发放渠道:" prop="channel">
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
> >
<el-select <el-select
v-model="itm.missonType" v-model="itm.missonType"
placeholder="请选择任务类型:" placeholder="请选择任务类型"
@change="selectTaskType(item, index, itm, index1)" @change="selectTaskType(item, index, itm, index1)"
size="small" size="small"
:disabled="isEditor && activityStatus == 2" :disabled="isEditor && activityStatus == 2"
...@@ -168,13 +168,19 @@ ...@@ -168,13 +168,19 @@
<el-form-item <el-form-item
:prop="'missionList.' + index1 + '.missionMaterialList'" :prop="'missionList.' + index1 + '.missionMaterialList'"
:rules="taskFormRules.attachmentList" :rules="taskFormRules.attachmentList"
v-if="itm.missonType && itm.missonType != 1" v-if="itm.missonType && itm.missonType == 2"
> >
<label slot="label" class="required">分享素材:</label> <label slot="label" class="required">分享素材:</label>
<GLEditor <GLEditor
:id="'missionList' + itm.id + 'welcome'" :id="
:key="'missionList' + itm.id + 'welcome'" 'missionList' + (itm.taskid || itm.id) + 'welcome'
:ref="'missionList' + itm.id + 'welcome'" "
:key="
'missionList' + (itm.taskid || itm.id) + 'welcome'
"
:ref="
'missionList' + (itm.taskid || itm.id) + 'welcome'
"
:form="'customer'" :form="'customer'"
style="line-height: 12px" style="line-height: 12px"
:btnList="btnList" :btnList="btnList"
...@@ -238,7 +244,8 @@ ...@@ -238,7 +244,8 @@
<el-input <el-input
v-model="itm.minTriggerValue" v-model="itm.minTriggerValue"
type="number" type="number"
oninput="value=value.replace(/^0[0-9]|[^0-9]/g, '')" :min="1"
oninput="value=value.replace(/^0|[^0-9]/g, '')"
size="small" size="small"
:disabled="isEditor && activityStatus == 2" :disabled="isEditor && activityStatus == 2"
></el-input> ></el-input>
...@@ -275,6 +282,20 @@ ...@@ -275,6 +282,20 @@
</el-form-item> </el-form-item>
<el-form-item <el-form-item
v-if="itm.rewardType == 1" v-if="itm.rewardType == 1"
label="最低指标:"
>
<el-input
v-model="itm.minTriggerValue"
type="number"
:min="1"
oninput="value=value.replace(/^0|[^0-9]/g, '')"
size="small"
:disabled="isEditor && activityStatus == 2"
placeholder="默认为从1开始判断循环奖励"
></el-input>
</el-form-item>
<el-form-item
v-if="itm.rewardType == 1"
label="触发值:" label="触发值:"
:prop="'missionList.' + index1 + '.triggerValue'" :prop="'missionList.' + index1 + '.triggerValue'"
:rules="taskFormRules.triggerValue" :rules="taskFormRules.triggerValue"
...@@ -409,7 +430,7 @@ export default { ...@@ -409,7 +430,7 @@ export default {
name: '视频', name: '视频',
funcName: '', funcName: '',
type: 'video', type: 'video',
limitSize: 10, // 限制视频大小 // limitSize: 10, // 限制视频大小
limitNum: 1, // 限制视频数量 limitNum: 1, // 限制视频数量
uploadApi: commonApi.uploadImgApi, uploadApi: commonApi.uploadImgApi,
}, },
...@@ -431,7 +452,7 @@ export default { ...@@ -431,7 +452,7 @@ export default {
activityImage: '', activityImage: '',
// 公共任务类型 // 公共任务类型
basicObj: { basicObj: {
id: '', taskid: '',
missonType: '', missonType: '',
missionName: '', missionName: '',
missonDesc: '', missonDesc: '',
...@@ -447,7 +468,7 @@ export default { ...@@ -447,7 +468,7 @@ export default {
}, },
// 浏览指标任务类型 // 浏览指标任务类型
browseObj: { browseObj: {
missionMaterialList: [], // missionMaterialList: [],
rewardType: '', rewardType: '',
rewardCount: '', rewardCount: '',
repeatCount: '', repeatCount: '',
...@@ -456,14 +477,14 @@ export default { ...@@ -456,14 +477,14 @@ export default {
}, },
// 访客指标任务类型 // 访客指标任务类型
visitorObj: { visitorObj: {
missionMaterialList: [], // missionMaterialList: [],
rewardType: '', rewardType: '',
triggerValue: '', triggerValue: '',
minTriggerValue: '', minTriggerValue: '',
}, },
// 成单指标任务类型 // 成单指标任务类型
orderObj: { orderObj: {
missionMaterialList: [], // missionMaterialList: [],
rewardType: '', rewardType: '',
triggerValue: '', triggerValue: '',
minTriggerValue: '', minTriggerValue: '',
...@@ -706,7 +727,7 @@ export default { ...@@ -706,7 +727,7 @@ export default {
this.taskList[index].missionList.unshift({ this.taskList[index].missionList.unshift({
...this.basicObj, ...this.basicObj,
}) })
this.taskList[index].missionList[0].id = this.getUuid() this.taskList[index].missionList[0].taskid = this.getUuid()
console.log(this.taskList[index].missionList[0]) console.log(this.taskList[index].missionList[0])
}, },
// 任务选择类型切换 // 任务选择类型切换
...@@ -763,25 +784,20 @@ export default { ...@@ -763,25 +784,20 @@ export default {
} }
// 沿用任务名称以及id // 沿用任务名称以及id
taskItem.missonType = task.missonType taskItem.missonType = task.missonType
taskItem.id = task.id taskItem.taskid = task.taskid
// 任务类型=浏览、访客、成单时,默认添加活动专属链接 // 任务类型=浏览、访客、成单时,默认添加活动专属链接
if (taskItem.missonType != 1 && taskItem.missonType != 2) { if (taskItem.missonType != 1 && taskItem.missonType != 2) {
taskItem.linkStatus = true taskItem.linkStatus = true
// this.$set(taskItem, 'missionMaterialList', [
// {
// materialType: 4,
// materialContent: '#活动专属链接#',
// },
// ])
} else { } else {
taskItem.linkStatus = false taskItem.linkStatus = false
} }
this.$nextTick(() => { this.$nextTick(() => {
this.$set(this.taskList[dateTaskIndex].missionList, taskIndex, taskItem) this.$set(this.taskList[dateTaskIndex].missionList, taskIndex, taskItem)
var box = document.getElementById('missionList' + task.id + 'welcome') var box = document.getElementById(
'missionList' + task.taskid + 'welcome'
)
if (box) { if (box) {
var editName = 'missionList' + task.id + 'welcome' var editName = 'missionList' + task.taskid + 'welcome'
console.log(this.$refs[editName])
this.$refs[editName][0].resetItem() this.$refs[editName][0].resetItem()
} }
}) })
...@@ -801,7 +817,6 @@ export default { ...@@ -801,7 +817,6 @@ export default {
}, },
shareMatrial(val) { shareMatrial(val) {
this.shareEditor = val this.shareEditor = val
// this.getEditor()
}, },
// 删除任务 // 删除任务
delTask(dateTask, dateTaskIndex, task, taskIndex) { delTask(dateTask, dateTaskIndex, task, taskIndex) {
...@@ -906,11 +921,12 @@ export default { ...@@ -906,11 +921,12 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$set(itm, 'triggerValue', '') this.$set(itm, 'triggerValue', '')
this.$set(itm, 'rewardCount', '') this.$set(itm, 'rewardCount', '')
this.$set(itm, 'minTriggerValue', '')
}) })
} else { } else {
this.$nextTick(() => { this.$nextTick(() => {
this.$set(itm, 'rewardCount', '') this.$set(itm, 'rewardCount', '')
this.$set(itm, 'minTriggerValue', '') this.$set(itm, 'minTriggerValue', '1')
}) })
} }
}, },
...@@ -965,12 +981,18 @@ export default { ...@@ -965,12 +981,18 @@ export default {
}, },
// 提交任务 // 提交任务
submitTask() { submitTask() {
// 遍历重复次数 // 遍历
this.taskList.map((item) => { this.taskList.map((item) => {
item.missionList.map((itm) => { item.missionList.map((itm) => {
// 重复次数处理
if (itm.repeatCount || itm.repeatFlag) { if (itm.repeatCount || itm.repeatFlag) {
itm.repeatCount = itm.repeatCount ? itm.repeatCount : -1 itm.repeatCount = itm.repeatCount ? itm.repeatCount : -1
} }
// 最低指标处理
if (itm.rewardType == 1 && !itm.minTriggerValue) {
itm.minTriggerValue = 1
}
// 自定义uuid删除
delete itm.id delete itm.id
}) })
}) })
...@@ -1053,7 +1075,7 @@ export default { ...@@ -1053,7 +1075,7 @@ export default {
} }
) )
}, },
// 取消s // 取消
cancelSubmit() { cancelSubmit() {
this.$root.to([ this.$root.to([
'任务中心', '任务中心',
......
...@@ -5,8 +5,7 @@ ...@@ -5,8 +5,7 @@
<p>{{ item.missonTypeName }}</p> <p>{{ item.missonTypeName }}</p>
<p>{{ item.missionName }}</p> <p>{{ item.missionName }}</p>
<p>{{ item.missonDesc }}</p> <p>{{ item.missonDesc }}</p>
<template <template v-if='item.platformMerchantMissionMaterialResponseList && item.platformMerchantMissionMaterialResponseList.length'>
v-if='item.platformMerchantMissionMaterialResponseList && item.platformMerchantMissionMaterialResponseList.length'>
<div v-for='(sub,idx,) in item.platformMerchantMissionMaterialResponseList' :key='idx'> <div v-for='(sub,idx,) in item.platformMerchantMissionMaterialResponseList' :key='idx'>
<template v-if="sub.materialType == '1'"> <template v-if="sub.materialType == '1'">
<p v-html='tramWord(sub.materialContent)'></p> <p v-html='tramWord(sub.materialContent)'></p>
...@@ -18,7 +17,7 @@ ...@@ -18,7 +17,7 @@
<video class='displayImg' :src='sub.materialContent' /> <video class='displayImg' :src='sub.materialContent' />
</template> </template>
<template v-if="sub.materialType == '4'"> <template v-if="sub.materialType == '4'">
<p class='content'>{{ sub.materialContent }}</p> <p class='content'>{{sub.materialContent}}</p>
</template> </template>
</div> </div>
</template> </template>
...@@ -31,7 +30,6 @@ ...@@ -31,7 +30,6 @@
</span> </span>
<span v-if='item.triggerValue'>触发值:{{ item.triggerValue }}</span> <span v-if='item.triggerValue'>触发值:{{ item.triggerValue }}</span>
<span v-if='item.rewardScore'>奖励积分值:{{ item.rewardScore }}</span> <span v-if='item.rewardScore'>奖励积分值:{{ item.rewardScore }}</span>
<span v-if='item.minTriggerValue'>最低指标:{{ item.minTriggerValue }}</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -45,7 +43,6 @@ ...@@ -45,7 +43,6 @@
<script> <script>
import { taskManagementApi } from '@/api/taskManagement' import { taskManagementApi } from '@/api/taskManagement'
import emoji from '@/utils/emo' import emoji from '@/utils/emo'
export default { export default {
name: 'TaskDetails', name: 'TaskDetails',
props: { props: {
...@@ -68,7 +65,7 @@ export default { ...@@ -68,7 +65,7 @@ export default {
} else if (index >= 10 && index < 100) { } else if (index >= 10 && index < 100) {
index = '0' + index 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 return htm
}, },
...@@ -100,17 +97,14 @@ export default { ...@@ -100,17 +97,14 @@ export default {
padding: 20px; padding: 20px;
margin-bottom: 20px; margin-bottom: 20px;
} }
.leftContent{
.leftContent {
width: 70%; width: 70%;
} }
.content{
.content {
height: auto; height: auto;
word-wrap: break-word; word-wrap: break-word;
word-break: break-all; word-break: break-all;
} }
.taskAward { .taskAward {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
...@@ -127,13 +121,11 @@ export default { ...@@ -127,13 +121,11 @@ export default {
padding-bottom: 8px; padding-bottom: 8px;
width: 50%; width: 50%;
} }
.copyLine { .copyLine {
color: #409EFF; color: #409EFF;
cursor: pointer; cursor: pointer;
} }
.displayImg{
.displayImg {
width: 500px; width: 500px;
height: 300px; height: 300px;
} }
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
</span> </span>
<span v-if='displayList.triggerValue'>触发值:{{ displayList.triggerValue }}</span> <span v-if='displayList.triggerValue'>触发值:{{ displayList.triggerValue }}</span>
<span v-if='displayList.rewardScore'>奖励积分值:{{ displayList.rewardScore }}</span> <span v-if='displayList.rewardScore'>奖励积分值:{{ displayList.rewardScore }}</span>
<span v-if='displayList.minTriggerValue'>最低指标:{{ displayList.minTriggerValue }}</span>
</div> </div>
</div> </div>
</el-tab-pane> </el-tab-pane>
......
...@@ -59,10 +59,14 @@ ...@@ -59,10 +59,14 @@
:pageConf="pageConf" :pageConf="pageConf"
> >
<div slot="businessScene" slot-scope="scope"> <div slot="businessScene" slot-scope="scope">
<span v-if="scope.scope.businessScene == 0">1.0新车权益销售</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 == 1">1.1 新车精品升级</span>
<span v-if="scope.scope.businessScene == 2">1.2次新车线上转化</span> <span v-if="scope.scope.businessScene == 2"
<span v-if="scope.scope.businessScene == 3">1.3存量用户众筹</span> >1.2 次新车膨胀金活动</span
>
<span v-if="scope.scope.businessScene == 3"
>1.3 售后直播众筹活动</span
>
</div> </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"
...@@ -128,19 +132,19 @@ const sceneOption = [ ...@@ -128,19 +132,19 @@ const sceneOption = [
value: '', value: '',
}, },
{ {
label: '1.0新车权益销售', label: '1.0 新车权益升级',
value: '0', value: '0',
}, },
{ {
label: '1.1次新车精品升级', label: '1.1 新车精品升级',
value: '1', value: '1',
}, },
{ {
label: '1.2次新车线上转化', label: '1.2 次新车膨胀金活动',
value: '2', value: '2',
}, },
{ {
label: '1.3存量用户众筹', label: '1.3 售后直播众筹活动',
value: '3', value: '3',
}, },
] ]
......
...@@ -22,13 +22,6 @@ ...@@ -22,13 +22,6 @@
placeholder='请输入员工手机号' placeholder='请输入员工手机号'
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label='门店名称'>
<el-input
clearable
v-model='withdrawalSearchForm.merchantName'
placeholder='请输入门店名称'
></el-input>
</el-form-item>
<el-form-item label='状态'> <el-form-item label='状态'>
<el-select v-model='withdrawalSearchForm.status' placeholder='请选择状态'> <el-select v-model='withdrawalSearchForm.status' placeholder='请选择状态'>
<el-option label='全部' value=''></el-option> <el-option label='全部' value=''></el-option>
......
...@@ -49,10 +49,6 @@ export default { ...@@ -49,10 +49,6 @@ export default {
prop: 'staffPhone' prop: 'staffPhone'
}, },
{ {
label: '门店名称',
prop: 'merchantName'
},
{
label: '积分值', label: '积分值',
prop: 'withdrawalScore' prop: 'withdrawalScore'
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!