Browse Source

init xqc_770

bding 1 year ago
parent
commit
cd17ab9f2a

+ 8 - 0
src/api/modules/rai/raiApi.js

@@ -1202,10 +1202,18 @@ const raiInterface = {
   activitySignupTempMsg: (params) => {
     return http.post("/cygx/activitySignup/tempMsg", params);
   },
+  // 发送模板消息
+  activityTripSignupTempMsg: (params) => {
+    return http.post("/cygx/special/trip/tempMsg", params);
+  },
   // 模版消息发送客户类型列表
   activitySendGroupList: (params) => {
     return http.get("/cygx/activitySignup/tempMsg/sendGroupList", params);
   },
+  // 模版消息发送客户类型列表
+  activityTripSendGroupList: (params) => {
+    return http.get("/cygx/special/trip/tempMsg/sendGroupList", params);
+  },
 };
 
 /* 权益小程序管理 专项调研模块*/

+ 2 - 2
src/views/Home.vue

@@ -49,7 +49,7 @@
                   <a :href="`/${item.level_path}`" class="el-level-path" :style="`display: block;color:${item.level_path===activePath ? '#FDB863 ' : '#fff'}`" @click="(e) => e.preventDefault() ">
                     <img :src="item.icon_path" alt="" style="width:24px;height:24px;" />
                     <span class="titleLetter" v-show="isCollapse">{{isCollapse?MenuLetterMap[item.name]||'':''}}</span>
-                    <span style="display:inline-block; width:96px; text-align:left;font-size:15px;margin-left:15px;">{{item.name}}</span>
+                    <span style="display:inline-block; width:96px; text-align:left;font-size:15px;margin-left:20px;">{{item.name}}</span>
                   </a>
                 </el-menu-item>
                 
@@ -57,7 +57,7 @@
                   <template slot="title">
                     <img :src="item.icon_path" alt="" style="width:24px;height:24px;" />
                     <span class="titleLetter" v-show="isCollapse">{{isCollapse?MenuLetterMap[item.name]||'':''}}</span>
-                    <span style="display:inline-block; width:96px; text-align:left;font-size:15px; margin-left:15px;"
+                    <span style="display:inline-block; width:96px; text-align:left;font-size:15px; margin-left:20px;"
                         >{{item.name}}</span>
                   </template>
                   <el-menu-item

+ 1 - 3
src/views/rai_manage/activityManage/applyManage.vue

@@ -38,7 +38,7 @@
             </el-tooltip>
           </template>
           <el-button type="primary" @click="addOutbound('新增预约纪要')">新增预约纪要</el-button>
-          <el-button v-if="tabsPitchonType !== 4" type="primary" @click="sendMessage">发送模板消息</el-button>
+          <el-button type="primary" @click="sendMessage">发送模板消息</el-button>
         </div>
         <div>
           <el-select placeholder="行业" clearable v-model="industry" @change="conditionChange" style="margin-bottom: 20px">
@@ -288,7 +288,6 @@ 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) {
         num.forEach((item) => {
           this.numberFull = summation.some((key) => key >= item);
@@ -353,7 +352,6 @@ export default {
     },
     //新增报名
     addapply() {
-      console.log(123);
       if (!this.selectList) {
         return this.$message.warning("请先选择活动");
       } else if (this.isGenre) {

+ 23 - 92
src/views/rai_manage/activityManage/specialResearch.vue

@@ -2,21 +2,15 @@
   <div class="container special-research">
     <div class="top-wrap">
       <div class="tabs-content">
-        <span @click="tabsHandle(item)" :class="['item', tabsActive == item.id && 'active-item']" v-for="item in tabsTop" :key="item.id">{{
-          item.name
-        }}</span>
+        <span @click="tabsHandle(item)" :class="['item', tabsActive == item.id && 'active-item']" v-for="item in tabsTop" :key="item.id">{{ item.name }}</span>
       </div>
     </div>
     <div class="top-wrap">
       <div>
         <el-button v-if="tabsActive == 2" type="primary" style="margin-right: 20px" @click="addapply">新增报名</el-button>
+        <el-button v-if="tabsActive == 2" type="primary" @click="sendMessage" style="margin-right: 20px">发送模板消息</el-button>
         <el-select placeholder="请选择行业" clearable v-model="industryValue" @change="changeHandel" style="margin: 0 20px 20px 0">
-          <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 v-model="status" @change="changeHandel" style="margin: 0 30px 20px 0">
           <el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.id"></el-option>
@@ -35,14 +29,7 @@
     <el-card>
       <el-table @selection-change="selectChange" :data="dataList" style="width: 100%; margin-top: 20px" border>
         <el-table-column v-if="tabsActive == 2" align="center" type="selection" width="55"> </el-table-column>
-        <el-table-column
-          v-for="item in tableColums"
-          :key="item.label"
-          :label="item.label"
-          :width="item.widthsty"
-          :min-width="item.minwidthsty"
-          align="center"
-        >
+        <el-table-column v-for="item in tableColums" :key="item.label" :label="item.label" :width="item.widthsty" :min-width="item.minwidthsty" align="center">
           <template slot-scope="{ row }">
             <span @click="handleRowClick(row, item.key)" :style="handleRowStyle(item.key)">{{ handleRowContent(row, item.key) }}</span>
           </template>
@@ -52,9 +39,7 @@
             <div v-if="tabsActive == 1">
               <template v-if="row.PublishStatus !== 4">
                 <span class="editsty" v-if="row.PublishStatus == 1" @click="applyHandleAllOperate(row.ActivityId, '下线')">下线 &nbsp;&nbsp;</span>
-                <span class="editsty" v-if="row.PublishStatus == 3" @click="applyHandleAllOperate(row.ActivityId, '重新发布')"
-                  >重新发布 &nbsp;&nbsp;</span
-                >
+                <span class="editsty" v-if="row.PublishStatus == 3" @click="applyHandleAllOperate(row.ActivityId, '重新发布')">重新发布 &nbsp;&nbsp;</span>
                 <span v-if="row.PublishStatus == 0" class="editsty" @click="applyHandleAllOperate(row.ActivityId, '发布')">发布 &nbsp;&nbsp;</span>
                 <span class="editsty" @click="editBtn(row.ActivityId, row.PublishStatus, '')">编辑 &nbsp;&nbsp;</span>
                 <span class="editsty" v-if="row.PublishStatus == 1" @click="editBtn(row.ActivityId, row.PublishStatus, '行程')">确定行程</span>
@@ -62,15 +47,8 @@
               </template>
             </div>
             <div v-else>
-              <span
-                class="editsty"
-                v-if="row.PublishStatus == 1 && isStart(row.ActivityTime)"
-                @click="applyHandleAllOperate(row.ActivityId, '取消发布')"
-                >取消发布 &nbsp;&nbsp;</span
-              >
-              <span class="editsty" v-if="row.PublishStatus !== 1" @click="applyHandleAllOperate(row.ActivityId, '重新发布')"
-                >重新发布 &nbsp;&nbsp;</span
-              >
+              <span class="editsty" v-if="row.PublishStatus == 1 && isStart(row.ActivityTime)" @click="applyHandleAllOperate(row.ActivityId, '取消发布')">取消发布 &nbsp;&nbsp;</span>
+              <span class="editsty" v-if="row.PublishStatus !== 1" @click="applyHandleAllOperate(row.ActivityId, '重新发布')">重新发布 &nbsp;&nbsp;</span>
               <span class="editsty" @click="editBtn(row.ActivityId, row.PublishStatus, '行程')">编辑 &nbsp;&nbsp;</span>
               <span class="editsty" v-if="row.IsShowUpdateMeeting" @click="particularsSubmit(row.ActivityId)"> 修改到会情况 </span>
               <span class="editsty" v-if="row.IsShowSubmitMeeting" @click="particularsSubmit(row.ActivityId)"> 提交到会情况 </span>
@@ -84,70 +62,11 @@
         <m-page :total="total" :page_no="page_no" :pageSize="10" @handleCurrentChange="handleCurrentChange" />
       </el-col>
     </el-card>
-    <!-- <el-dialog width="1000px" v-dialogDrag :modal-append-to-body="false" center :title="dialogTitle" :visible.sync="dialogVisibleActivity" :before-close="handleCloseSubject">
-      <div class="rai-detail-wrap" v-if="dialogTitle == '活动详情'">
-        <div class="activity-top">
-          {{ activityDetail.ResearchTheme }}
-        </div>
-        <p>所属行业: {{ activityDetail.ChartPermissionName }}</p>
-        <p v-if="tabsActive == 1">预期时间: {{ activityDetail.ActivityTimeText }}</p>
-        <p v-else>活动开始时间: {{ activityDetail.ActivityTimeTextByDay }}</p>
-        <p>调研形式: {{ activityDetail.SpecialType == 1 ? "线上" : "线下" }} {{ activityDetail.SpecialType == 2 && activityDetail.City ? "(" + activityDetail.City + ")" : "" }}</p>
-        <template v-if="!activityDetail.IndustrialName && !activityDetail.IndustrialSubjectName">
-          <p>相关主题: {{ activityDetail.Label }}</p>
-        </template>
-        <template v-else>
-          <p>产业名称: {{ activityDetail.IndustrialName }}</p>
-          <p>相关公司: {{ activityDetail.IndustrialSubjectName }}</p>
-        </template>
-        <div class="text-box">
-          <div style="flex-shrink: 0">活动可见:</div>
-          <div>
-            <span>{{ activityDetail.CustomerName }}</span>
-            <div>
-              <span v-if="activityDetail.Scale.includes('3')"> 100亿以上</span>
-              <span v-if="activityDetail.Scale.includes('2')"> 150~100亿</span>
-            </div>
-          </div>
-        </div>
-        <p v-if="activityDetail.Host">主持人: {{ activityDetail.Host }}</p>
-        <p v-if="activityDetail.Host">主持人: {{ activityDetail.PersonInCharge }}</p>
-        <el-image v-if="tabsActive == 1" style="width: 0px; height: 0px" :src="activityDetail.TripImgLink" id="TripImgLink" :preview-src-list="previewList"></el-image>
-        <el-image v-else style="width: 0px; height: 0px" :src="activityDetail.TripImgLinkFix" id="TripImgLink" :preview-src-list="previewList"></el-image>
-        <div class="arrange" @click.stop="imgLink">
-          查看行程安排
-          <i class="el-icon-d-arrow-right"></i>
-        </div>
-      </div>
-      <div v-else>
-        <el-table :data="interestData" style="width: 100%; margin: 20px 0" height="400px" border>
-          <el-table-column min-width="" prop="RealName" align="center" label="姓名"></el-table-column>
-          <el-table-column min-width="" prop="CompanyName" align="center" label="公司名称"></el-table-column>
-          <el-table-column min-width="" prop="SellerName" align="center" label="所属销售"></el-table-column>
-          <el-table-column min-width="180" prop="CreateTime" align="center" label="反馈时间"></el-table-column>
-        </el-table>
-        <div class="dialog-footer">
-          <a :href="exportInterest" download>
-            <el-button type="primary" @click="confirmSubmit">下载名单</el-button>
-          </a>
-          <el-button style="margin-left: 20px" @click="handleCloseSubject">取消</el-button>
-        </div>
-      </div>
-    </el-dialog> -->
-    <special-research-dlg
-      :specialDetailId="specialDetailId"
-      :dialogVisibleActivity.sync="dialogVisibleActivity"
-      :dialogTitle="dialogTitle"
-      :tabsActive="tabsActive"
-    />
-    <partical-dialog
-      :offlineId="offlineId"
-      :dialogVisiblepartica.sync="dialogVisiblepartica"
-      :particlaDlg="particlaDlg"
-      :submitDialog.sync="submitDialog"
-    />
+    <special-research-dlg :specialDetailId="specialDetailId" :dialogVisibleActivity.sync="dialogVisibleActivity" :dialogTitle="dialogTitle" :tabsActive="tabsActive" />
+    <partical-dialog :offlineId="offlineId" :dialogVisiblepartica.sync="dialogVisiblepartica" :particlaDlg="particlaDlg" :submitDialog.sync="submitDialog" />
     <apply-dialog :addDialogVisible.sync="addDialogVisible" :selectList="selectList" :signUpAdd="signUpAdd" :addDialogType="addDialogType" />
     <particulars-all :particularsDialogVisible.sync="particularsDialogVisible" :dialogVisibleList="dialogVisibleList" />
+    <template-message :messageDialog.sync="messageDialogVisible" :selectionArr="selectionArr" typeMessage="确定行程"/>
   </div>
 </template>
 
@@ -159,9 +78,10 @@ import ParticalDialog from "../components/particalDialog.vue";
 import ApplyDialog from "../components/apply/applyDialog.vue";
 import ParticularsAll from "./specialResearch/particularsAll.vue";
 import SpecialResearchDlg from "../components/special/specialResearchDlg.vue";
+import TemplateMessage from "../components/apply/templateMessage.vue";
 export default {
   name: "",
-  components: { mPage, ParticalDialog, ApplyDialog, ParticularsAll, SpecialResearchDlg },
+  components: { mPage, ParticalDialog, ApplyDialog, ParticularsAll, SpecialResearchDlg, TemplateMessage },
   props: {},
   data() {
     return {
@@ -194,6 +114,8 @@ export default {
       particularsDialogVisible: false,
       dialogVisibleList: {},
       specialDetailId: null,
+      messageDialogVisible: false, // 发送模版消息
+      selectionArr: {},
     };
   },
   computed: {
@@ -423,6 +345,7 @@ export default {
     },
     // 新增活动报名的表格选择
     selectChange(selection) {
+      this.selectionArr = selection;
       let arr = [];
       selection.forEach((item) => {
         arr.push(item.ActivityId);
@@ -440,6 +363,14 @@ export default {
       this.industryValue = "";
       this.getsDataList();
     },
+    // 发送模版消息
+    sendMessage() {
+      if (this.selectList && this.selectList.split(",").length === 1) {
+        this.messageDialogVisible = true;
+      } else {
+        this.$message.error("请选择一个活动");
+      }
+    },
   },
   beforeRouteEnter(to, from, next) {
     if (from.path !== "/addResearch" && from.path !== "/determineTravel" && from.path !== "/editResearch") {

+ 13 - 19
src/views/rai_manage/components/apply/templateMessage.vue

@@ -2,7 +2,7 @@
   <div class="container container-message-dlg">
     <el-dialog width="560px" v-dialogDrag :close-on-click-modal="false" :modal-append-to-body="false" center :visible.sync="messageDialog" title="发送模板消息" :before-close="handleClose">
       <div class="content">
-        <div class="annotation" >
+        <div class="annotation">
           <div class="annotation-box" @click="annotationHandler">
             <img style="margin-right: 5px" src="~@/assets/img/icons/annotation_icon.png" alt="" />
             注释
@@ -10,13 +10,10 @@
         </div>
         <el-form :model="messageForm" :rules="rules" ref="messageFormRef" class="demo-ruleForm">
           <el-form-item prop="sendId">
-            <el-select style="width: 100%" v-model="messageForm.sendId" multiple placeholder="请选择发送对象(可多选)">
+            <el-select style="width: 100%" v-model="messageForm.sendId" multiple placeholder="请选择发送对象(可多选)" :disabled="typeMessage == '确定行程'">
               <el-option v-for="item in sendOptions" :key="item.Id" :label="item.Name" :value="item.Id"> </el-option>
             </el-select>
           </el-form-item>
-          <!-- <el-form-item prop="beforeText">
-            <el-input type="textarea" :rows="2" placeholder="请输入首段提示文字" v-model="messageForm.beforeText"> </el-input>
-          </el-form-item> -->
           <el-form-item prop="activityName">
             <el-input type="textarea" :rows="2" placeholder="请输入活动名称(20字内)" v-model="messageForm.activityName"> </el-input>
           </el-form-item>
@@ -55,6 +52,10 @@ export default {
       required: true,
       default: false,
     },
+    typeMessage: {
+      type: String,
+      default: "",
+    },
   },
   data() {
     return {
@@ -67,7 +68,6 @@ export default {
       },
       rules: {
         sendId: [{ required: true, message: "请选择发送对象", trigger: "change" }],
-        // beforeText: [{ required: true, message: "请输入首段提示文字", trigger: "blur" }],
         activityName: [{ required: true, message: "请输入活动名称", trigger: "blur" }],
         content: [{ required: true, message: "请输入变更内容", trigger: "blur" }],
       },
@@ -76,16 +76,7 @@ export default {
         label: "Name",
         value: "Id",
       },
-      sendOptions: [
-        {
-          value: 1,
-          label: "东南",
-        },
-        {
-          value: 17,
-          label: "西北",
-        },
-      ],
+      sendOptions: [],
     };
   },
   computed: {},
@@ -101,9 +92,10 @@ export default {
   mounted() {},
   methods: {
     async activitySendGroupList() {
-      const res = await raiInterface.activitySendGroupList();
+      const res = this.typeMessage == "确定行程" ? await raiInterface.activityTripSendGroupList() : await raiInterface.activitySendGroupList();
       if (res.Ret === 200) {
         this.sendOptions = res.Data;
+        this.messageForm.sendId = this.typeMessage == "确定行程" ? [1] : [7];
       }
     },
     // 点击了注释
@@ -138,13 +130,15 @@ export default {
     confirmPerson() {
       this.$refs["messageFormRef"].validate(async (valid) => {
         if (valid) {
-          const res = await raiInterface.activitySignupTempMsg({
+          let params = {
             ActivityIds: this.selectionArr[0].ActivityId + "",
+            ResearchTheme: this.selectionArr[0].ResearchTheme || "",
             SendGroup: this.messageForm.sendId.join(","),
             // FirstText: this.messageForm.beforeText,
             ActivityName: this.messageForm.activityName,
             Content: this.messageForm.content,
-          });
+          };
+          const res = this.typeMessage == "确定行程" ? await raiInterface.activityTripSignupTempMsg(params) : await raiInterface.activitySignupTempMsg(params);
           if (res.Ret === 200) {
             this.$message.success("发送成功");
             this.handleClose();