|
@@ -455,7 +455,7 @@
|
|
|
"></div>
|
|
"></div>
|
|
|
<div class="rule-content">
|
|
<div class="rule-content">
|
|
|
<div class="rule-title">未打开邮件自动跟进</div>
|
|
<div class="rule-title">未打开邮件自动跟进</div>
|
|
|
- <div class="rule-desc">3天后发送提醒邮件,更换主题行</div>
|
|
|
|
|
|
|
+ <div class="rule-desc">{{ newCampaign.rules.noOpenFollowupDays }}天后发送提醒邮件,更换主题行</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="rule-config" v-if="newCampaign.rules.noOpenFollowup">
|
|
<div class="rule-config" v-if="newCampaign.rules.noOpenFollowup">
|
|
|
<el-select style="width: 90px;" v-model="newCampaign.rules.noOpenFollowupDays" placeholder="请选择">
|
|
<el-select style="width: 90px;" v-model="newCampaign.rules.noOpenFollowupDays" placeholder="请选择">
|
|
@@ -632,9 +632,9 @@
|
|
|
<button v-if="currentStep < 5" class="btn btn-primary" @click="currentStep++">
|
|
<button v-if="currentStep < 5" class="btn btn-primary" @click="currentStep++">
|
|
|
下一步 <i class="fas fa-arrow-right"></i>
|
|
下一步 <i class="fas fa-arrow-right"></i>
|
|
|
</button>
|
|
</button>
|
|
|
- <button v-else class="btn btn-primary" @click="createCampaign">
|
|
|
|
|
- <i class="fas fa-rocket"></i> {{ isEditMode ? "保存活动" : "创建活动" }}
|
|
|
|
|
- </button>
|
|
|
|
|
|
|
+ <el-button :loading="loading" style="height: 41px;" v-else class="btn btn-primary" @click="createCampaign">
|
|
|
|
|
+ <i class="fas fa-rocket" style="margin-right: 6px;"></i> {{ isEditMode ? "保存活动" : "创建活动" }}
|
|
|
|
|
+ </el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -888,6 +888,7 @@
|
|
|
|
|
|
|
|
const goToStep = (step) => { currentStep.value = step }
|
|
const goToStep = (step) => { currentStep.value = step }
|
|
|
|
|
|
|
|
|
|
+ const loading = ref(false)
|
|
|
const createCampaign = async () => {
|
|
const createCampaign = async () => {
|
|
|
if (!newCampaign.value.name) {
|
|
if (!newCampaign.value.name) {
|
|
|
currentStep.value = 1
|
|
currentStep.value = 1
|
|
@@ -904,6 +905,7 @@
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
try {
|
|
try {
|
|
|
|
|
+ loading.value = true
|
|
|
const typeMap = { prospect: 1, nurture: 2, reactivate: 3, promote: 4, seasonal: 5, exhibition: 6, other: 7 }
|
|
const typeMap = { prospect: 1, nurture: 2, reactivate: 3, promote: 4, seasonal: 5, exhibition: 6, other: 7 }
|
|
|
const priorityMap = { urgent: 1, high: 2, medium: 3, low: 4 }
|
|
const priorityMap = { urgent: 1, high: 2, medium: 3, low: 4 }
|
|
|
const channelConfig = newCampaign.value.channels.reduce((acc, channel) => {
|
|
const channelConfig = newCampaign.value.channels.reduce((acc, channel) => {
|
|
@@ -952,6 +954,8 @@
|
|
|
closeCreateModal()
|
|
closeCreateModal()
|
|
|
}).catch(err => {
|
|
}).catch(err => {
|
|
|
ElMessage.error(err?.message || '更新营销活动失败')
|
|
ElMessage.error(err?.message || '更新营销活动失败')
|
|
|
|
|
+ }).finally(() => {
|
|
|
|
|
+ loading.value = false
|
|
|
})
|
|
})
|
|
|
} else {
|
|
} else {
|
|
|
await addMarketing(payload).then(res => {
|
|
await addMarketing(payload).then(res => {
|
|
@@ -960,6 +964,8 @@
|
|
|
closeCreateModal()
|
|
closeCreateModal()
|
|
|
}).catch(err => {
|
|
}).catch(err => {
|
|
|
ElMessage.error(err?.message || '创建营销活动失败')
|
|
ElMessage.error(err?.message || '创建营销活动失败')
|
|
|
|
|
+ }).finally(() => {
|
|
|
|
|
+ loading.value = false
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
} catch (error) {
|
|
} catch (error) {
|