瀏覽代碼

CRM17.0(支持添加销售会议)

bding 3 天之前
父節點
當前提交
ecf1d1c668

+ 32 - 0
api/roadshow/index.js

@@ -187,6 +187,38 @@ export const roadShowQuestionAdd = params => {
 	return httpPost('/roadshow/question/save', params)
 }
 
+/**
+ * ficc新增
+ */
+export const addActivityFicc = params => {
+	return httpPost('/roadshow_seller/add', params)
+}
 
+/**
+ * 活动FICC销售列表
+ */
+export const sellerFiccList = params => {
+	return httpGet('/custom/seller/activity_ficc/list', params)
+}
 
+/**
+ * 活动FICC列表
+ */
+export const sellerFiccActivityList = params => {
+	return httpGet('/roadshow_seller/list', params)
+}
+
+/**
+ * 活动FICC删除
+ */
+export const deleteActivityFicc = params => {
+	return httpPost('/roadshow_seller/delete', params)
+}
+
+/**
+ * 活动详情接口
+ */
+export const detailActivityFicc = params => {
+	return httpGet('/roadshow_seller/activity/detail', params)
+}
 

+ 197 - 0
pages-approve/activity/ficcActivityDetail.vue

@@ -0,0 +1,197 @@
+<template>
+  <view class="activity-detail" v-if="info">
+    <image :src="statusImg" mode="aspectFill" class="status-img" v-if="statusImg && TemplateMsg"></image>
+    <view class="section white-wrap">
+      <view class="info-item flex">
+        <view class="label">活动时间:</view>
+        <view v-if="info.RsActivitySellerItem.StartDate === info.RsActivitySellerItem.EndDate">
+          {{ info.RsActivitySellerItem.StartDate }}({{ info.RsActivitySellerItem.StartWeek }}) {{ info.RsActivitySellerItem.StartTime }}~{{ info.RsActivitySellerItem.EndTime }}
+        </view>
+        <view v-else>
+          {{ info.RsActivitySellerItem.StartDate }}({{ info.RsActivitySellerItem.StartWeek }}) {{ info.RsActivitySellerItem.StartTime }}~{{ info.RsActivitySellerItem.EndDate }}({{
+            info.RsActivitySellerItem.EndWeek
+          }}){{ info.RsActivitySellerItem.EndTime }}
+        </view>
+      </view>
+      <view class="info-item flex">
+        <view class="label">销售:</view>
+        <view>{{ info.RsActivitySellerItem.SellerName }}</view>
+      </view>
+      <view class="info-item flex">
+        <view class="label">活动类型:</view>
+        <view>{{ info.RsActivityItem.ActivityType }}</view>
+      </view>
+      <view class="info-item flex">
+        <view class="label">会议主题:</view>
+        <view>{{ info.RsActivityItem.Theme }}</view>
+      </view>
+      <view class="info-item flex">
+        <view class="label">客户名称:</view>
+        <view>{{ info.CompanyDetail.CompanyName }}</view>
+      </view>
+    </view>
+    <view class="section white-wrap">
+      <template v-if="info.CompanyDetail.EnglishCompany === 1">
+        <view class="info-item flex">
+          <view class="label">所属国家:</view>
+          <view>{{ info.CompanyDetail.EnglishCountry }}</view>
+        </view>
+        <view class="info-item flex">
+          <view class="label">累计点击量:</view>
+          <view>{{ info.CompanyDetail.EnglishViewTotal }}</view>
+        </view>
+      </template>
+      <template v-else>
+        <view class="info-item flex">
+          <view class="label">客户状态:</view>
+          <view>{{ info.CompanyDetail.Status }}</view>
+        </view>
+        <view class="info-item flex">
+          <view class="label">所属行业:</view>
+          <view>{{ info.CompanyDetail.IndustryName }}</view>
+        </view>
+        <view class="info-item flex">
+          <view class="label">开通品种:</view>
+          <view>{{ info.CompanyDetail.PermissionName }}</view>
+        </view>
+        <view class="info-item flex">
+          <view class="label">累计阅读报告次数:</view>
+          <view>{{ info.CompanyDetail.ReportReadTotal }}</view>
+        </view>
+      </template>
+      <view class="line"></view>
+
+      <view class="info-item flex">
+        <view class="label">提交人:</view>
+        <view>
+          {{ info.RsActivityItem.SysUserRealName }}
+        </view>
+      </view>
+      <view class="info-item flex">
+        <view class="label">提交时间:</view>
+        <view>{{ info.RsActivityItem.CreateTime | formatTime }}</view>
+      </view>
+    </view>
+    <!-- 填写客户问答按钮 -->
+    <view class="fix-bottom-wrap btns-wrap flex" v-if="!TemplateMsg">
+      <button class="pass-btn" style="width: 100%" @click="delActivityHandle">删除</button>
+    </view>
+  </view>
+</template>
+
+<script>
+import { detailActivityFicc, deleteActivityFicc } from "@/api/roadshow/index.js";
+import moment from "@/pages-roadshow/utils/_moment.js";
+export default {
+  computed: {
+    statusImg() {
+      if (!this.info) return "";
+      switch (this.info.RsActivitySellerItem.Status) {
+        case 2:
+          return "https://hzstatic.hzinsights.com/yb_xcx/add_activity.png"; //添加
+        case 4:
+          return require("../static/roadshow/del-ico.png"); //删除
+          return "";
+      }
+    },
+  },
+  data() {
+    return {
+      RsActivityId: null, //活动id
+      info: null,
+      TemplateMsg: false,
+    };
+  },
+  onLoad(options) {
+    this.RsActivityId = options.RsActivityId;
+    this.TemplateMsg = options.TemplateMsg || false;
+  },
+  onShow() {
+    this.getDetail();
+  },
+  methods: {
+    // 获取详情
+    async getDetail() {
+      const res = await detailActivityFicc({
+        RsActivityId: this.RsActivityId,
+      });
+      if (res.code === 200) {
+        this.info = res.data;
+      }
+    },
+    delActivityHandle() {
+      uni.showModal({
+        content: "删除该活动后,将从日历中移除,确定继续吗?",
+        showCancel: true,
+        cancelColor: "#A9AFB8",
+        confirmColor: "#3385FF",
+        success: async ({ confirm, cancel }) => {
+          if (confirm) {
+            const { code } = await deleteActivityFicc({ RsActivityId: Number(this.RsActivityId) });
+
+            if (code !== 200) return;
+            uni.navigateBack({
+              delta: 1,
+            });
+          }
+        },
+      });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.activity-detail {
+  padding-bottom: 200rpx;
+  .status-img {
+    position: absolute;
+    right: 35rpx;
+    top: 112rpx;
+    width: 160rpx;
+    height: 160rpx;
+    z-index: 10;
+  }
+
+  .section {
+    margin-bottom: 14rpx;
+    padding: 33rpx 34rpx;
+
+    .line {
+      width: 100%;
+      height: 0;
+      border-top: 1px dashed rgba(112, 112, 112, 0.21);
+      margin: 30rpx 0;
+    }
+  }
+
+  .info-item {
+    margin-bottom: 20rpx;
+
+    .label {
+      flex-shrink: 0;
+      color: #666;
+      margin-right: 20rpx;
+    }
+  }
+
+  .btns-wrap {
+    justify-content: center;
+
+    button {
+      width: 260rpx;
+      height: 70rpx;
+      border-radius: 28px;
+      border: none;
+      margin: 0 15px;
+      font-size: 15px;
+      color: #fff;
+      line-height: 70rpx;
+    }
+
+    .pass-btn {
+      background-color: #3385ff;
+    }
+  }
+}
+</style>

+ 47 - 15
pages-approve/activity/list.vue

@@ -36,7 +36,22 @@
 						<view class="status approve-list-status-cancel" v-if="item.Status=='5'">已撤回</view>
 						<view class="status approve-list-status-cancel" v-if="item.Status=='6'">已结束</view>
 					</block>
-					
+					<!-- FICC 新增活动 -->
+					<block v-else-if="['活动','拜访'].includes(activity_type)">					
+						<view class="title flex">
+							<image src="../../static/man.png" mode="aspectFill" class="icon">
+							</image>
+							<view>{{item.CompanyName}}</view>
+						</view>
+						<view class="content">
+								<view class="info">活动类型:{{item.ActivityType}}</view>
+								<view class="info">销售:{{ item.SysUserRealName }} </view>
+								<view class="info">提交时间:{{item.CreateTime|formatTime}}</view>	
+						</view>
+						<view class="delete-box">
+							<view class="delete-btn approve-list-status-wait" @click.stop="delActivityHandle(item,'ficc')">删除</view>
+						</view>
+					</block>
 					<!-- 其他 -->
 					<block v-else-if="['内部会议','报告电话会'].includes(activity_type)">
 						<view class="content">
@@ -55,10 +70,10 @@
 								</view>
 						</view>
 					</block>
+
 				</view>
 			</block>
 			
-			
 			<!-- 事项 -->
 			<block v-else>
 				<view class="item white-wrap" v-for="item in list" :key="item.RsMattersId">
@@ -75,13 +90,6 @@
 								<view class="info" v-if="item.MatterContent">事项内容:{{item.MatterContent}} </view>
 								
 								<view class="info">添加时间:{{item.CreateTime|formatTime}}</view>
-								<!-- <view class="info" v-if="item.EditReason" style="display: flex;">
-									<view>最近修改记录:</view> 
-									<view>
-										<view>{{item.EditReason}}</view>
-										<view style="color: #999;">{{item.ModifyTime|formatTime}}</view>
-									</view>	
-								</view> -->
 								
 								<view class="bot-btns">
 										<van-button type="primary" plain color="#3385FF" class="btn" size="small" block round 
@@ -106,7 +114,9 @@
 		calendarTypeList,
 		matterList,
 		delMatter,
-		delActivity
+		delActivity,
+		sellerFiccActivityList,
+		deleteActivityFicc
 	} from '@/api/roadshow/index.js';
 	import { getRole,editInfoBack } from './checkRole.js';
 	import moment from '@/pages-roadshow/utils/_moment.js';
@@ -192,6 +202,11 @@
 					CurrentIndex: this.page,
 					CalendarType: this.activity_type==='内部会议' ? 1 : 2
 				})
+				: this.activity_type === '活动'
+				? await sellerFiccActivityList({
+					PageSize: 20,
+					CurrentIndex: this.page,
+				})
 				: this.activity_type === '事项'
 				? await matterList({
 					PageSize: 20,
@@ -210,10 +225,13 @@
 			},
 
 			goDetail(e) {
-				if(!['活动申请','活动审批'].includes(this.activity_type)) return;
+				
+				if(!['活动申请','活动审批','活动','拜访'].includes(this.activity_type)) return;
+
+				let linkUrl = ['活动','拜访'].includes(this.activity_type) ? `/pages-approve/activity/ficcActivityDetail?RsActivityId=${e.RsActivityId}` : `/pages-approve/activity/detail?RsCalendarId=${e.RsCalendarId}&RsCalendarResearcherId=${e.RsCalendarResearcherId}`
 				
 				uni.navigateTo({
-					url: `/pages-approve/activity/detail?RsCalendarId=${e.RsCalendarId}&RsCalendarResearcherId=${e.RsCalendarResearcherId}`
+					url: linkUrl
 				})
 			},
 			
@@ -224,7 +242,7 @@
 			},
 			
 			/* 删除活动/事项 */
-			delActivityHandle({RsCalendarId,RsCalendarResearcherId,RsMattersId}) {
+			delActivityHandle({RsCalendarId,RsCalendarResearcherId,RsMattersId,RsActivityId},type='') {
 				uni.showModal({
 					content: '删除该活动后,将从日历中移除,确定继续吗?',
 					showCancel: true,
@@ -236,7 +254,7 @@
 					}) => {
 						if (confirm) {
 							console.log('用户点击确定');
-							const { code } = RsMattersId ? await delMatter({ RsMattersId }) : await delActivity({
+							const { code } = type == 'ficc' ? await deleteActivityFicc({RsActivityId:RsActivityId}) : RsMattersId ? await delMatter({ RsMattersId }) : await delActivity({
 								RsCalendarId,
 								RsCalendarResearcherId
 							})
@@ -312,7 +330,7 @@
 			/* 活动是否已开始 */
 			haveActiyityStart({ StartDate,StartTime }) {
 				return moment(`${StartDate} ${StartTime}`).valueOf() > new Date().getTime()
-			}
+			},
 		}
 	}
 </script>
@@ -370,6 +388,20 @@
 					margin-left: 20rpx;
 				}
 			}
+			.delete-box {
+				display: flex;
+				align-items: center;
+				justify-content: flex-end;
+			}
+			.delete-btn {
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				width: 136rpx;
+				height: 40rpx;
+				border: 1rpx solid #3385FF;
+				border-radius: 50px;
+			}
 		}
 	}
 </style>

+ 1 - 1
pages-approve/search/index.vue

@@ -90,7 +90,7 @@
 					})
 				}else if(this.type==='roadshow'){
 					let id = uni.setStorageSync('roadshow_compantyId',e.CompanyId)
-          let englishCompany = uni.setStorageSync('roadshow_isEnglishCompany',e.EnglishCompany)
+          			let englishCompany = uni.setStorageSync('roadshow_isEnglishCompany',e.EnglishCompany)
 					uni.navigateBack({
 						delta: 1
 					});

+ 335 - 0
pages-roadshow/addActivity/ficcAdd.vue

@@ -0,0 +1,335 @@
+<template>
+  <view class="addactiyity-container">
+    <van-form>
+      <van-field
+        :value="formData.activityType"
+        is-link
+        readonly
+        clickable
+        name="picker"
+        label="活动类型"
+        placeholder="选择活动类型"
+        @click.native="
+          () => {
+            isActivityPicker = true;
+          }
+        "
+      />
+      <van-field :value="formData.meetingTheme" clickable label="会议主题" type="textarea" rows="1" autosize placeholder="请输入会议主题" @change="bindInputHandle('meetingTheme', $event)" />
+      <van-field :value="formData.companyName" is-link readonly clickable label="客户名称" placeholder="客户名称" @click.native="goSearchCompany" />
+      <van-field
+        :value="formatSellerLable(formData.sellerUser)"
+        is-link
+        readonly
+        clickable
+        name="picker"
+        label="销售"
+        type="textarea"
+        rows="1"
+        autosize
+        placeholder="选择销售员"
+        @click.native="clickRsChoose(0)"
+      />
+      <van-field
+        :value="formatterLabelTime(formData.selectResearchers[0].startTime)"
+        is-link
+        readonly
+        clickable
+        name="datetimePicker"
+        label="开始时间"
+        placeholder="选择开始时间"
+        @click.native="clickTimeChoose(0, 'start')"
+      />
+
+      <van-field
+        :value="formatterLabelTime(formData.selectResearchers[0].endTime)"
+        is-link
+        readonly
+        clickable
+        name="datetimePicker"
+        label="结束时间"
+        placeholder="选择结束时间"
+        @click.native="clickTimeChoose(0, 'end')"
+      />
+    </van-form>
+
+    <div class="submit-bot">
+      <van-button type="primary" plain color="#3385FF" class="btn" size="small" block round @click="cancelHandle">取消</van-button>
+      <van-button type="primary" color="#3385FF" class="btn" size="small" block round @click="submitFiccHandle">确定</van-button>
+    </div>
+
+    <!-- 选择活动类型 -->
+    <van-popup :show="isActivityPicker" position="bottom">
+      <van-picker show-toolbar :columns="activiytyTypes" :default-index="activiytyTypes.indexOf(formData.activityType)" @confirm="confirmActivityType" @cancel="isActivityPicker = false" />
+    </van-popup>
+
+    <!-- 选择时间 -->
+    <van-popup :show="isTimePicker" position="bottom">
+      <van-datetime-picker
+        :value="pickerForm.time"
+        type="datetime"
+        :formatter="formatterPickerTime"
+        @confirm="confirmTime"
+        @cancel="
+          () => {
+            isTimePicker = false;
+            pickerForm.time = '';
+          }
+        "
+      />
+    </van-popup>
+
+    <!-- 选择销售 -->
+    <van-popup :show="isResearcherPicker" position="bottom">
+      <view class="select-rs-header">
+        <text class="cancel" @click="cancelResearcher">取消</text>
+        <text class="ensure" @click="confirmResearcher">确认</text>
+      </view>
+      <van-tree-select :items="ficcSellerList" :main-active-index="rs_picker.firstindex" :active-id="rs_picker.id" @click-nav="clickFirstHandle" @click-item="clickItemHandle" />
+    </van-popup>
+  </view>
+</template>
+
+<script>
+import { addActivityFicc, sellerFiccList } from "@/api/roadshow/index.js";
+import { getDefaultOption } from "./common.js";
+import { validateForm } from "../utils/validate.js";
+import mixin from "./mixin.js";
+const moment = require("../utils/_moment.js");
+moment.locale("zh-cn");
+export default {
+  mixins: [mixin],
+  data() {
+    return {
+      formData: {
+        activityType: "参会", // 活动类型
+        meetingTheme: "", // 会议主题
+        companyName: "", // 客户名称
+        sellerUser: "", // 销售
+        companyId: "", //客户ID
+        englishCompany: "",
+        selectResearchers: [
+          {
+            researcherId: "",
+            startTime: "",
+            endTime: "",
+          },
+        ],
+      }, // 表单数据
+      activiytyTypes: ["参会", "拜访"],
+      ficcSellerList: [],
+    };
+  },
+  methods: {
+    // 初始化处理时间
+    initDefaultTime() {
+      const now = new Date();
+      const start = new Date(now.setHours(9, 0, 0, 0)); // 今天上午9:00
+      const end = start.getTime() + 60 * 60 * 1000; // 加1小时
+
+      this.formData.selectResearchers[0].startTime = start.getTime();
+      this.formData.selectResearchers[0].endTime = end;
+    },
+    /* 提交表单 */
+    async submitFiccHandle() {
+      let isCheck = validateForm(this.formData.activityType, this.formData);
+      if (!isCheck) return;
+
+      let parmas = {
+        ActivityType: this.formData.activityType,
+        Theme: this.formData.meetingTheme,
+        CompanyId: this.formData.companyId || 0,
+        CompanyName: this.formData.companyName || "",
+
+        SellerId: this.formData.sellerUser.toString(),
+        SellerName: this.formatSellerLable(this.formData.sellerUser),
+        StartDate: moment(this.formData.selectResearchers[0].startTime).format("YYYY-MM-DD"),
+        EndDate: moment(this.formData.selectResearchers[0].endTime).format("YYYY-MM-DD"),
+        StartTime: moment(this.formData.selectResearchers[0].startTime).format("HH:mm:ss"),
+        EndTime: moment(this.formData.selectResearchers[0].endTime).format("HH:mm:ss"),
+        StartWeek: moment(this.formData.selectResearchers[0].startTime).format("ddd"),
+        EndWeek: moment(this.formData.selectResearchers[0].endTime).format("ddd"),
+
+        EnglishCompany: 0,
+      };
+
+      const res = await addActivityFicc(parmas);
+
+      if (res.code !== 200) return;
+      let link = {
+        text: "添加成功,已加入销售员日历",
+        content: `可前往【我的日历】-【 活动 】查看`,
+        link: "/pages-roadshow/myCalendar/index",
+        query: {
+          type: "活动",
+        },
+      };
+      this.addActivityLink(link);
+    },
+    async getSellerList() {
+      const res = await sellerFiccList();
+      if (res.code === 200) {
+        const ficcList = this.formatSellerList(res.data.List || []);
+        this.ficcSellerList = ficcList;
+      }
+    },
+    formatSellerList(list) {
+      list.forEach((group) => {
+        // 对组做处理
+        group.text = group.GroupName;
+        group.value = group.GroupId;
+        group.id = group.GroupId;
+        // 如果有列表
+        if (group.Child) {
+          group.Child.forEach((item) => {
+            item.text = item.AdminName;
+            item.value = item.AdminId;
+            item.id = item.AdminId;
+          });
+        }
+        group.children = group.Child || [];
+      });
+      return list;
+    },
+    formatSellerLable(val) {
+      let userName = [];
+      const result = this.ficcSellerList.flatMap((group) =>
+        group.Child
+          ? group.Child.map((child) => ({
+              ...child,
+              GroupName: group.GroupName,
+            }))
+          : []
+      );
+      result.forEach((item) => {
+        if (val.includes(item.AdminId)) {
+          userName.push(item.AdminName);
+        }
+      });
+      return userName.toString();
+    },
+  },
+
+  onLoad(options) {
+    this.initDefaultTime();
+  },
+
+  onShow() {
+    this.getSellerList();
+    if (uni.getStorageSync("roadshow_compantyId")) {
+      this.formData.companyId = Number(uni.getStorageSync("roadshow_compantyId"));
+      this.formData.englishCompany = Number(uni.getStorageSync("roadshow_isEnglishCompany"));
+      this.getCompanyInfo();
+      uni.removeStorageSync("roadshow_compantyId");
+      uni.removeStorageSync("roadshow_isEnglishCompany");
+    }
+  },
+  watch: {
+    "formData.selectResearchers": {
+      handler(val) {
+        if (val[0].startTime && this.selectObj.type == "start") {
+          this.formData.selectResearchers[0].endTime = val[0].startTime + 3600000;
+        } else if (val[0].endTime <= val[0].startTime && this.selectObj.type == "end") {
+          uni.showToast({
+            title: "结束时间不能早于或等于开始时间",
+            icon: "none",
+          });
+          this.formData.selectResearchers[0].endTime = val[0].startTime + 3600000;
+        }
+      },
+      deep: true,
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.addactiyity-container {
+  padding-bottom: 200rpx;
+
+  .add-user-btn {
+    background-color: #fff;
+    margin-top: 20rpx;
+    padding: 20rpx 0;
+    color: #3385ff;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+  }
+
+  .del-cont {
+    font-size: 50rpx;
+    color: #f00;
+    display: flex;
+    justify-content: flex-end;
+    padding: 10rpx 30rpx;
+  }
+
+  .submit-bot {
+    position: fixed;
+    left: 0;
+    right: 0;
+    bottom: 0;
+    z-index: 99;
+    height: 140rpx;
+    padding: 0 150rpx;
+    background-color: #fff;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    padding-bottom: constant(safe-area-inset-bottom);
+    padding-bottom: env(safe-area-inset-bottom);
+    box-shadow: 0px -2px 6px rgba(110, 119, 141, 0.07);
+
+    .btn {
+      // width: 100%;
+      width: 260rpx;
+      height: 60rpx;
+      margin-right: 30rpx;
+    }
+  }
+
+  .select-rs-header {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    padding: 30rpx 20rpx;
+
+    .cancel {
+      color: #969799;
+    }
+
+    .ensure {
+      color: #576b95;
+    }
+  }
+}
+</style>
+<style lang="scss">
+.addactiyity-container {
+  .van-tree-select {
+    .van-tree-select__item--active {
+      color: #1989fa !important;
+    }
+
+    .van-sidebar-item--selected {
+      border-color: #1989fa !important;
+    }
+  }
+  .van-tree-select__item {
+    font-weight: normal;
+  }
+
+  .company-info {
+    background: #d5e6ff;
+    padding: 10rpx 30rpx;
+    margin-bottom: 20rpx;
+    view {
+      margin: 12rpx 0;
+      color: #666;
+      text-indent: -140rpx;
+      margin-left: 140rpx;
+    }
+  }
+}
+</style>

+ 3 - 2
pages-roadshow/addActivity/mixin.js

@@ -453,8 +453,9 @@ export default {
 		/* 选择研究员项 路演 公开会议为单选 其余多选*/
 		clickItemHandle({detail}) {
 			const { activityType } = this.formData;
+			console.log(detail);
 			
-			if(['内部会议', '报告电话会'].includes(activityType)) {
+			if(['内部会议', '报告电话会', '参会', '拜访'].includes(activityType)) {
 				
 				let index = this.rs_picker.id.indexOf(detail.AdminId);
 				index > -1 ? this.rs_picker.id.splice(index, 1) : this.rs_picker.id.push(detail.AdminId);
@@ -478,7 +479,7 @@ export default {
 		confirmResearcher() {
 			console.log('确认选择')
 			this.formData.selectResearchers[this.selectRsIndex].researcherId =  this.rs_picker.id;
-			
+			['参会', '拜访'].includes(this.formData.activityType) && (this.formData.sellerUser = this.rs_picker.id);
 			this.isResearcherPicker = false;
 		},
 		chooseResearcher({target}){

+ 41 - 1
pages-roadshow/utils/validate.js

@@ -6,10 +6,12 @@ export const validateForm = (type,form) => {
 	switch (type) {
 		case '内部会议': return validateInsideMeeting(form);
 		case '公开会议': return validateOpenMeeting(form);
-		case '路演': return validateRoadshow(form);
+		case '路演': 
 		case '沙龙': return validateRoadshow(form);
 		case '报告电话会': return validateTelmeeting(form);
 		case '事项': return validateMatter(form);
+		case '参会':
+		case '拜访': return validateActivity(form);
 	}
 	
 }
@@ -195,6 +197,44 @@ const validateMatter = ({ startTime,endTime,matterContent }) => {
 	return haveCheck
 }
 
+/* ficc添加活动校验 */
+const validateActivity = ({ activityType,meetingTheme, companyId,sellerUser,selectResearchers }) => {
+	let haveCheck = false;
+	
+	if(!activityType){
+		Toast('请选择活动类型')
+		return haveCheck 
+	}
+	if(!meetingTheme){
+		Toast('请输入会议主题')
+		return haveCheck 
+	}
+	if(!companyId){
+		Toast('请选择客户')
+		return haveCheck 
+	}
+	if(!sellerUser){
+		Toast('请选择销售')
+		return haveCheck 
+	}
+	
+	let haveFull_startTime = selectResearchers.every(item => item.startTime);
+	let haveFull_endTime = selectResearchers.every(item => item.endTime);
+	
+	if(!haveFull_startTime){
+		Toast('请选择开始时间')
+		return haveCheck 
+	}
+	if(!haveFull_endTime){
+		Toast('请选择结束时间')
+		return haveCheck 
+	}
+	
+	haveCheck = true;
+	return haveCheck
+}
+
+
 /* 提示框 */
 export const Toast = (title,icon="none",duration=1500) => {
 	uni.showToast({

+ 14 - 0
pages.json

@@ -182,6 +182,13 @@
           "style": {
             "navigationBarTitleText": "客户问答"
           }
+        },
+        {
+        	"path" : "activity/ficcActivityDetail",
+        	"style" : 
+        	{
+        		"navigationBarTitleText" : "活动详情"
+        	}
         }
       ]
     },
@@ -229,6 +236,13 @@
 				"style": {
 				  "navigationBarTitleText": "添加事项"
 				}
+			 },
+			 {
+			 	"path" : "addActivity/ficcAdd",
+			 	"style" : 
+			 	{
+			 		"navigationBarTitleText" : "添加活动"
+			 	}
 			 }
 		 ]
 	 },