Commit acea7e18 by 王志慧

fixed

1 parent a20db7ef
...@@ -186,7 +186,7 @@ export default { ...@@ -186,7 +186,7 @@ export default {
let list = [] let list = []
for (let v of nodes) { for (let v of nodes) {
if (v.nodeParam && JSON.parse(v.nodeParam).stage == stages[k].value) { if (v.nodeParam && JSON.parse(v.nodeParam).stage == stages[k].value) {
list.push({ ...JSON.parse(v.nodeParam), nodeId: v.nodeId }) list.push({ ...JSON.parse(v.nodeParam), nodeId: v.instNodeId })
} }
} }
list = list.filter(item => item.day) list = list.filter(item => item.day)
......
...@@ -68,13 +68,13 @@ ...@@ -68,13 +68,13 @@
<div class="task-type flex"> <div class="task-type flex">
受众客户:全旅程阶段客户 受众客户:全旅程阶段客户
<div> <div>
<div v-if="value.dataTag" class="flex"> <div v-if="value.dataTag&&value.dataTag.length>0" class="flex">
、标签客户 、标签客户
<div class="tag" v-for="tag in value.dataTag" :key="tag.labelId">{{ tag.labelName }}</div> <div class="tag" v-for="tag in value.dataTag" :key="tag.labelId">{{ tag.labelName }}</div>
</div> </div>
</div> </div>
</div> </div>
<div class="task-type-edit" @click="setCriteria(value)"> <div class="task-type-edit" @click="setCriteria(value)" v-show="[ 7, 8, 9].includes(value.taskType)">
<img src="@/assets/config/icon-edit.png" /> <img src="@/assets/config/icon-edit.png" />
<a>设置条件</a> <a>设置条件</a>
</div> </div>
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
</div> </div>
<!-- --> <!-- -->
<div class="step-item-name flex-column-center"> <div class="step-item-name flex-column-center">
<div v-if="value.taskType == 9" class="task-type"> <div v-if="value.taskType == 9||value.taskType ==10" class="task-type">
{{ stage_prefix[value.taskType].label }} {{ stage_prefix[value.taskType].label }}
<span v-for="(tpl, index) in value.taskParam && value.taskParam.attContentList" :key="index"> <span v-for="(tpl, index) in value.taskParam && value.taskParam.attContentList" :key="index">
<template v-if="tpl.attType == 1">{{ tpl.attContent }}</template> <template v-if="tpl.attType == 1">{{ tpl.attContent }}</template>
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
<a>编辑内容</a> <a>编辑内容</a>
</div> </div>
</div> </div>
<div class="task-tpl-wrap flex" v-if="value.taskType == 9"> <div class="task-tpl-wrap flex" v-if="value.taskType == 9||value.taskType==10">
<div v-for="(tpl, index) in value.taskParam && value.taskParam.attContentList" :key="index"> <div v-for="(tpl, index) in value.taskParam && value.taskParam.attContentList" :key="index">
<img class="tpl-img" :src="tpl.attContent" v-if="tpl.attType == 2" /> <img class="tpl-img" :src="tpl.attContent" v-if="tpl.attType == 2" />
<div v-if="tpl.attType == 7" class="mini-program flex"> <div v-if="tpl.attType == 7" class="mini-program flex">
......
<template> <template>
<GLDialog v-if="visible" :title="title" :visible.sync="visible" mode="big" :before-close="handleClose"> <GLDialog v-if="visible" :title="title" :visible.sync="visible" mode="big" :before-close="handleClose">
<el-form :model="tplForm" class="basic-form" :rules="tplRules" ref="tplForm" label-width="154px"> <el-form :model="tplForm" class="basic-form" :rules="tplRules" ref="tplForm" label-width="154px">
<template v-if="[7, 8, 9, 10].includes(taskType)"> <template v-if="[7, 8, 9].includes(taskType)">
<el-form-item label="跟进员工类型:"> <el-form-item label="跟进员工类型:" prop="followerTypeId">
<el-select v-model="tplForm.followerTypeId" @change="valueChange" @focus="groupFocus" :size="size" value-key="id" placeholder="请选择"> <el-select v-model="tplForm.followerTypeId" @change="valueChange" @focus="groupFocus" :size="size" value-key="id" placeholder="请选择">
<el-option v-for="item in followList" :key="item.id" :label="item.followName" :value="item.id"></el-option> <el-option v-for="item in followList" :key="item.id" :label="item.followName" :value="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</template> </template>
<el-form-item label="营销内容:"> <el-form-item :label="labelName+':'">
<GLEditor ref="welcome" :form="'customer'" style="line-height: 12px; width: 580px" boxHeight="200" :btnList="btnList" @previewWord="previewForm"></GLEditor> <GLEditor ref="welcome" :form="'customer'" style="line-height: 12px; width: 580px" boxHeight="200" :btnList="btnList" @previewWord="previewForm"></GLEditor>
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -68,6 +68,7 @@ export default { ...@@ -68,6 +68,7 @@ export default {
data() { data() {
return { return {
visible: false, visible: false,
labelName: '',
tplForm: { tplForm: {
followerTypeId: '', followerTypeId: '',
staffUserIds: '', staffUserIds: '',
...@@ -75,7 +76,7 @@ export default { ...@@ -75,7 +76,7 @@ export default {
attContentList: [] attContentList: []
}, },
tplRules: { tplRules: {
// userList: [{ validator: validatorUser, trigger: 'change' }], followerTypeId: [{ required: true, message: '请选择员工类型', trigger: 'change' }]
}, },
followList: [], followList: [],
...@@ -217,16 +218,20 @@ export default { ...@@ -217,16 +218,20 @@ export default {
switch (this.taskType) { switch (this.taskType) {
case 7: case 7:
this.title = '企微提醒模版' this.title = '企微提醒模版'
this.labelName = '提醒内容'
break break
case 5: case 5:
this.title = '门店助手提醒模版' this.title = '门店助手提醒模版'
this.labelName = '提醒内容'
break break
case 8: case 8:
case 9: case 9:
this.title = '营销模板' this.title = '营销模板'
this.labelName = '营销内容'
break break
case 10: case 10:
this.title = '短信模版' this.title = '短信模版'
this.labelName = '短信内容'
break break
} }
} }
...@@ -357,7 +362,6 @@ export default { ...@@ -357,7 +362,6 @@ export default {
}) })
}, },
previewForm(val) { previewForm(val) {
console.log(val)
const value = this.$common.utils.deepClone(val) const value = this.$common.utils.deepClone(val)
if (value[0] && !value[0].attContent) value.splice(0, 1) if (value[0] && !value[0].attContent) value.splice(0, 1)
this.tplForm.attContentList = this.$common.utils.deepClone(value) this.tplForm.attContentList = this.$common.utils.deepClone(value)
...@@ -384,8 +388,16 @@ export default { ...@@ -384,8 +388,16 @@ export default {
this.$emit('dialogClose', false) this.$emit('dialogClose', false)
}, },
handleSelect() { handleSelect() {
this.$refs.tplForm.validate(valid => {
if (valid) {
if (this.tplForm.attachments.length == 0) {
this.$message.error(`请输入${this.labelName}`)
return
}
this.$emit('confirm', this.tplForm) this.$emit('confirm', this.tplForm)
} }
})
}
} }
} }
</script> </script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!