|
@@ -4,13 +4,9 @@
|
|
|
<div class="top-wrap" style="margin-bottom: 20px">
|
|
|
<div class="top-card-box">
|
|
|
<div class="tabs-box">
|
|
|
- <span
|
|
|
- v-for="(item, index) in listTitle"
|
|
|
- :key="item.ChartPermissionId"
|
|
|
- @click="tabsBoxBtn(item, index)"
|
|
|
- :class="item.ChartPermissionId == tabsPitchonType ? 'pitch' : ''"
|
|
|
- >{{ item.PermissionName }}</span
|
|
|
- >
|
|
|
+ <span v-for="(item, index) in listTitle" :key="item.ChartPermissionId" @click="tabsBoxBtn(item, index)" :class="item.ChartPermissionId == tabsPitchonType ? 'pitch' : ''">{{
|
|
|
+ item.PermissionName
|
|
|
+ }}</span>
|
|
|
</div>
|
|
|
<div>
|
|
|
<el-input v-model="titleValue" style="width: 521px" placeholder="请输入活动名称" clearable>
|
|
@@ -30,9 +26,9 @@
|
|
|
</template>
|
|
|
<!-- 公司调研下的单独按钮 -->
|
|
|
<template v-if="tabsPitchonType === 3">
|
|
|
- <el-tooltip class="item" effect="dark" content="不限人数的公司调研电话会请点此" placement="bottom">
|
|
|
+ <!-- <el-tooltip class="item" effect="dark" content="不限人数的公司调研电话会请点此" placement="bottom">
|
|
|
<el-button type="primary" v-if="tabsSelectionOne" @click="addOutbound('新增外呼人员')">新增外呼人员</el-button>
|
|
|
- </el-tooltip>
|
|
|
+ </el-tooltip> -->
|
|
|
<el-tooltip class="item" effect="dark" content="公司线下调研、限制人数的公司调研电话会请点此" placement="bottom">
|
|
|
<el-button v-if="tabsPitchonType !== 1" type="primary" @click="addapply">新增报名</el-button>
|
|
|
</el-tooltip>
|
|
@@ -42,27 +38,10 @@
|
|
|
</div>
|
|
|
<div>
|
|
|
<el-select placeholder="行业" clearable v-model="industry" @change="conditionChange" style="margin-bottom: 20px">
|
|
|
- <el-option
|
|
|
- v-for="item in chartPermissionList"
|
|
|
- :label="item.PermissionName"
|
|
|
- :key="item.ChartPermissionId"
|
|
|
- :value="item.ChartPermissionId"
|
|
|
- ></el-option>
|
|
|
+ <el-option v-for="item in chartPermissionList" :label="item.PermissionName" :key="item.ChartPermissionId" :value="item.ChartPermissionId"></el-option>
|
|
|
</el-select>
|
|
|
- <el-select
|
|
|
- placeholder="活动类型"
|
|
|
- clearable
|
|
|
- @focus="activityType"
|
|
|
- v-model="cactivityTypeVal"
|
|
|
- @change="conditionChange"
|
|
|
- style="margin-bottom: 20px"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in cactivityTypeList"
|
|
|
- :label="item.ActivityTypeName"
|
|
|
- :key="item.ActivityTypeId"
|
|
|
- :value="item.ActivityTypeId"
|
|
|
- ></el-option>
|
|
|
+ <el-select placeholder="活动类型" clearable @focus="activityType" v-model="cactivityTypeVal" @change="conditionChange" style="margin-bottom: 20px">
|
|
|
+ <el-option v-for="item in cactivityTypeList" :label="item.ActivityTypeName" :key="item.ActivityTypeId" :value="item.ActivityTypeId"></el-option>
|
|
|
</el-select>
|
|
|
<date-picker v-model="issueTime" type="date" range placeholder="活动时间" value-type="format" @change="conditionChange"> </date-picker>
|
|
|
<el-select placeholder="活动状态" clearable v-model="cactivityStatus" @change="conditionChange" style="margin-bottom: 20px">
|
|
@@ -76,14 +55,7 @@
|
|
|
<!-- 表格部分 -->
|
|
|
<el-table @selection-change="selectChange" :data="dataList" style="width: 100%; margin-top: 15px" border ref="multipleTable">
|
|
|
<el-table-column type="selection" align="center" key="ActivityId"></el-table-column>
|
|
|
- <el-table-column
|
|
|
- v-for="item in tableApplyColums"
|
|
|
- :key="item.label"
|
|
|
- :label="item.label"
|
|
|
- :width="item.widthsty"
|
|
|
- :min-width="item.minwidthsty"
|
|
|
- align="center"
|
|
|
- >
|
|
|
+ <el-table-column v-for="item in tableApplyColums" :key="item.label" :label="item.label" :width="item.widthsty" :min-width="item.minwidthsty" align="center">
|
|
|
<template #header>
|
|
|
<span>{{ item.label }}</span>
|
|
|
<el-tooltip
|
|
@@ -96,9 +68,7 @@
|
|
|
</template>
|
|
|
<template slot-scope="{ row }">
|
|
|
<div v-if="item.key == 'ReminderPeopleNum'">
|
|
|
- <span v-if="row.ReminderPeopleNum > 0" class="editsty" @click="particularsBtn('会议提醒人数', row.ActivityId)">{{
|
|
|
- row.ReminderPeopleNum
|
|
|
- }}</span>
|
|
|
+ <span v-if="row.ReminderPeopleNum > 0" class="editsty" @click="particularsBtn('会议提醒人数', row.ActivityId)">{{ row.ReminderPeopleNum }}</span>
|
|
|
<span v-else>--</span>
|
|
|
</div>
|
|
|
<div v-else-if="item.key == 'SignupFailPeopleNum'">
|
|
@@ -185,6 +155,7 @@ export default {
|
|
|
cactivityStatus: 1,
|
|
|
publishStatus: "1", //发布状态
|
|
|
messageDialogVisible: false, //发送消息模版
|
|
|
+ isResearchPoints: false, //
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -225,6 +196,7 @@ export default {
|
|
|
this.tabsPitchonType = item.ChartPermissionId;
|
|
|
this.tableApplyColums = TableApplyColums(item.ChartPermissionId);
|
|
|
this.cactivityTypeVal = "";
|
|
|
+ this.isResearchPoints = false;
|
|
|
this.tabsSelectionOne = item.ChartPermissionId == 2 ? false : true;
|
|
|
this.page_no = 1;
|
|
|
this.getsDataList();
|
|
@@ -274,12 +246,14 @@ export default {
|
|
|
const summation = [];
|
|
|
const genre = [];
|
|
|
let minimum = [];
|
|
|
+ let isResearch = [];
|
|
|
this.selectionArr = selection;
|
|
|
selection.forEach((item) => {
|
|
|
arr.push(item.ActivityId);
|
|
|
num.push(item.LimitPeopleNum);
|
|
|
summation.push(item.SignupPeopleNum);
|
|
|
genre.push(item.ActivityTypeName);
|
|
|
+ isResearch.push(item.IsResearchPoints);
|
|
|
minimum.push(item.LimitPeopleNum - item.SignupPeopleNum);
|
|
|
});
|
|
|
this.activityTypeName = genre;
|
|
@@ -288,15 +262,31 @@ export default {
|
|
|
this.reminder = num.some((item) => item > 0);
|
|
|
this.selectList = str;
|
|
|
this.isGenre = new Set(genre).size > 1 ? true : false;
|
|
|
- console.log(this.isGenre, genre);
|
|
|
- if (this.tabsPitchonType !== 1) {
|
|
|
+ if (this.tabsPitchonType !== 1 && (selection[0] ? selection[0].LimitPeopleNum > 0 : true)) {
|
|
|
num.forEach((item) => {
|
|
|
this.numberFull = summation.some((key) => key >= item);
|
|
|
});
|
|
|
+ }
|
|
|
+ if (this.tabsPitchonType !== 1) {
|
|
|
+ console.log(isResearch, isResearch.length);
|
|
|
+ this.tabsPitchonType == 3 && this.isResearchHandler(isResearch);
|
|
|
this.minimumSummation = Math.min(...minimum);
|
|
|
this.numberLimi = num.includes(0) && num.some((item) => item > 0);
|
|
|
}
|
|
|
},
|
|
|
+ // 公司调研下的判断
|
|
|
+ isResearchHandler(isResearch) {
|
|
|
+ if (isResearch && isResearch.length > 1) {
|
|
|
+ for (let i = 0; i < isResearch.length - 1; i++) {
|
|
|
+ if (isResearch[i] !== isResearch[i + 1]) {
|
|
|
+ this.isResearchPoints = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.isResearchPoints = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
//报名详情的弹框
|
|
|
particularsBtn(val, id) {
|
|
|
this.dialogVisibleId = id;
|
|
@@ -353,15 +343,14 @@ export default {
|
|
|
},
|
|
|
//新增报名
|
|
|
addapply() {
|
|
|
- console.log(123);
|
|
|
if (!this.selectList) {
|
|
|
return this.$message.warning("请先选择活动");
|
|
|
} else if (this.isGenre) {
|
|
|
return this.$message.warning("活动类型不同,无法同时新增报名");
|
|
|
+ } else if (this.isResearchPoints && this.tabsPitchonType == 3) {
|
|
|
+ return this.$message.warning("所选活动无法同时新增报名");
|
|
|
} else {
|
|
|
- if (!this.reminder && this.tabsPitchonType !== 4) {
|
|
|
- return this.$message.warning("请点击新增外呼人员!");
|
|
|
- } else if (this.numberLimi && this.tabsPitchonType !== 4) {
|
|
|
+ if (this.numberLimi && this.tabsPitchonType !== 4) {
|
|
|
return this.$message.warning("不限人数的电话会请新增外呼人员,限制人数的电话会请新增报名");
|
|
|
} else if (this.numberFull && this.tabsPitchonType !== 4) {
|
|
|
return this.$message.warning("新增失败,活动人数超限。");
|