From 6da46e7eddc638063e51f5d5bcfc8d3eac97da36 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=A3=8E=E7=BB=A7=E7=BB=AD=E5=90=B9?= <17611323298@163.com>
Date: Fri, 20 Oct 2023 10:05:42 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=8F=91=E7=89=88=E7=9A=84?=
 =?UTF-8?q?=E9=9C=80=E6=B1=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/const/crud/admin/log.js          |   3 +
 src/views/Customer/table.js          |  15 +
 src/views/Receive/index.vue          | 548 +++++++++++++++------------
 src/views/ReceivingRecords/index.vue |   2 +-
 src/views/Statistics/index.vue       |  30 +-
 src/views/Template/Pinspeakwords.vue |  11 +
 6 files changed, 354 insertions(+), 255 deletions(-)

diff --git a/src/const/crud/admin/log.js b/src/const/crud/admin/log.js
index 73a0440..4c99a0e 100644
--- a/src/const/crud/admin/log.js
+++ b/src/const/crud/admin/log.js
@@ -51,6 +51,9 @@ export const tableOption = {
     {
       label: "操作时间",
       prop: "createTime",
+      
+      type: 'datetimerange',
+      search: true
     },
     {
       label: "操作类型",
diff --git a/src/views/Customer/table.js b/src/views/Customer/table.js
index 7cce837..d97c64a 100644
--- a/src/views/Customer/table.js
+++ b/src/views/Customer/table.js
@@ -270,6 +270,21 @@ export default {
                 }
             },
 
+            {
+                label: '成交状态',
+                prop: "deliveryStatus",
+                width: "150px",
+                formatter: (data) => {
+                    let str = '-'
+                    if (data.deliveryStatus == 0) {
+                        str = '未成交'
+                    } else if (data.deliveryStatus == 1) {
+                        str = '已成交'
+                    }
+                    return str
+                }
+            },
+
             {
                 label: "客户阶段",
                 prop: "clientStageName",
diff --git a/src/views/Receive/index.vue b/src/views/Receive/index.vue
index d6f8cd3..95aafac 100644
--- a/src/views/Receive/index.vue
+++ b/src/views/Receive/index.vue
@@ -28,11 +28,15 @@
             "
           >
             <div v-if="permissions.rec_index_checkoutSales">
-              <div @click="showSalesBusiness = true;marketingBusiness=userinformationlist.marketingBusiness" style="display: flex; align-items: center;margin-right: 12px;">
+              <div
+                @click="showMethods"
+                style="display: flex; align-items: center; margin-right: 12px"
+              >
                 <span style="font-size: 14px; color: #333333; margin-left: 4px"
-                  >切换销讲业务</span>
+                  >切换销讲业务</span
+                >
               </div>
-            </div> 
+            </div>
             <div v-if="rec_index_addJ && mg == 0" @click="Addtodigest()">
               <div
                 v-if="arr[aplayerId].status == 0"
@@ -616,17 +620,25 @@
           style="padding: 0px 10px 10px 10px"
         >
           <template v-if="prohibitedlist.guwen.length > 0">
-						<div style="font-size: 26x;padding: 12px 24px;">顾问</div>
-						<div class="title1-12" v-for="(item,index) in  prohibitedlist.guwen" :key='index'>
-							{{index+1}}、{{item}}
-						</div>
-					</template>
-					<template v-if="prohibitedlist.kehu.length > 0">
-						<div style="font-size: 26px;padding: 12px 24px;">客户</div>
-						<div class="title1-12" v-for="(item,index) in  prohibitedlist.kehu" :key='index'>
-							{{index+1}}、{{item}}
-						</div>
-					</template>
+            <div style="font-size: 26x; padding: 12px 24px">顾问</div>
+            <div
+              class="title1-12"
+              v-for="(item, index) in prohibitedlist.guwen"
+              :key="index"
+            >
+              {{ index + 1 }}、{{ item }}
+            </div>
+          </template>
+          <template v-if="prohibitedlist.kehu.length > 0">
+            <div style="font-size: 26px; padding: 12px 24px">客户</div>
+            <div
+              class="title1-12"
+              v-for="(item, index) in prohibitedlist.kehu"
+              :key="index"
+            >
+              {{ index + 1 }}、{{ item }}
+            </div>
+          </template>
         </div>
         <!-- 需求挖掘 -->
         <div v-if="zhixingcenterindex == 2" class="wajueBox">
@@ -649,171 +661,170 @@
           style="height: calc(70vh - 230px)"
           v-if="zhixingcenterindex == 2"
         >
-          <div style="flex-grow: 1;">
-
-          <div
-            style="width: 100%"
-            v-for="(item, index) in keyWordsList"
-            :key="index"
-          >
-            <!--  有二级-->
-            <div v-if="item.children.length">
-              <div
-                class="rateboxcenttit"
-                @click="changeshow1(item)"
-                style="cursor: pointer"
-              >
-                <div style="flex: 1">{{ item.name }}</div>
-                <div style="flex: 1">执行{{ item.fraction || 0 }}%</div>
+          <div style="flex-grow: 1">
+            <div
+              style="width: 100%"
+              v-for="(item, index) in keyWordsList"
+              :key="index"
+            >
+              <!--  有二级-->
+              <div v-if="item.children.length">
                 <div
-                  style="flex: 1"
-                  v-if="item.keywordsList && item.keywordsList.length"
+                  class="rateboxcenttit"
+                  @click="changeshow1(item)"
+                  style="cursor: pointer"
                 >
-                  已匹配({{ item.keywordsList && item.keywordsList.length }})
-                </div>
-                <div style="flex: 1" v-else>未匹配</div>
-                <div style="flex: 0 0 18px">
-                  <i
-                    v-if="item.show"
-                    style="font-size: 18px"
-                    class="el-icon-arrow-up"
-                  ></i>
-                  <i
-                    v-else
-                    style="font-size: 18px"
-                    class="el-icon-arrow-down"
-                  ></i>
+                  <div style="flex: 1">{{ item.name }}</div>
+                  <div style="flex: 1">执行{{ item.fraction || 0 }}%</div>
+                  <div
+                    style="flex: 1"
+                    v-if="item.keywordsList && item.keywordsList.length"
+                  >
+                    已匹配({{ item.keywordsList && item.keywordsList.length }})
+                  </div>
+                  <div style="flex: 1" v-else>未匹配</div>
+                  <div style="flex: 0 0 18px">
+                    <i
+                      v-if="item.show"
+                      style="font-size: 18px"
+                      class="el-icon-arrow-up"
+                    ></i>
+                    <i
+                      v-else
+                      style="font-size: 18px"
+                      class="el-icon-arrow-down"
+                    ></i>
+                  </div>
                 </div>
-              </div>
-              <div
-                v-if="item.show"
-                v-for="(subitem, i) in item.children"
-                :key="i"
-              >
-                <el-tooltip placement="bottom" effect="light">
-                  <div slot="content">
-                    <div class="huashu-title">
-                      客户标签:{{ getKeywordsList(subitem.keywordsList) }}
-                    </div>
-                    <div class="huashu-title">需求挖掘话术</div>
-                    <div class="huashu">
-                      <div
-                        class="huashu-item"
-                        v-for="(question, questionindex) in subitem.modelList"
-                        :key="questionindex"
-                      >
-                        <i
-                          class="el-icon-success"
-                          :style="
-                            question.isAskQuestions == 0
-                              ? 'color: #409eff'
-                              : question.isAskQuestions == 2
-                              ? 'color: orange'
-                              : 'color: #666'
-                          "
-                        ></i>
+                <div
+                  v-if="item.show"
+                  v-for="(subitem, i) in item.children"
+                  :key="i"
+                >
+                  <el-tooltip placement="bottom" effect="light">
+                    <div slot="content">
+                      <div class="huashu-title">
+                        客户标签:{{ getKeywordsList(subitem.keywordsList) }}
+                      </div>
+                      <div class="huashu-title">需求挖掘话术</div>
+                      <div class="huashu">
                         <div
-                          class="text"
-                          :style="
-                            question.isAskQuestions == 0
-                              ? 'color: #409eff'
-                              : question.isAskQuestions == 2
-                              ? 'color: orange'
-                              : 'color:#666'
-                          "
+                          class="huashu-item"
+                          v-for="(question, questionindex) in subitem.modelList"
+                          :key="questionindex"
                         >
-                          {{
-                            question.showFormatExpression ||
-                            question.keywordsName
-                          }}
+                          <i
+                            class="el-icon-success"
+                            :style="
+                              question.isAskQuestions == 0
+                                ? 'color: #409eff'
+                                : question.isAskQuestions == 2
+                                ? 'color: orange'
+                                : 'color: #666'
+                            "
+                          ></i>
+                          <div
+                            class="text"
+                            :style="
+                              question.isAskQuestions == 0
+                                ? 'color: #409eff'
+                                : question.isAskQuestions == 2
+                                ? 'color: orange'
+                                : 'color:#666'
+                            "
+                          >
+                            {{
+                              question.showFormatExpression ||
+                              question.keywordsName
+                            }}
+                          </div>
                         </div>
                       </div>
                     </div>
-                  </div>
-                  <div class="rateboxcent">
-                    <div>{{ subitem.name }}</div>
-                    <div>
-                      <div
-                        class="ratebutton"
-                        v-if="subitem.isAskQuestions == 0"
-                      >
-                        已执行
+                    <div class="rateboxcent">
+                      <div>{{ subitem.name }}</div>
+                      <div>
+                        <div
+                          class="ratebutton"
+                          v-if="subitem.isAskQuestions == 0"
+                        >
+                          已执行
+                        </div>
+                        <div class="ratebutton1" v-else>未执行</div>
                       </div>
-                      <div class="ratebutton1" v-else>未执行</div>
-                    </div>
-                    <div>
-                      <div class="ratebutton" v-if="subitem.selected == 0">
-                        已匹配
+                      <div>
+                        <div class="ratebutton" v-if="subitem.selected == 0">
+                          已匹配
+                        </div>
+                        <div class="ratebutton1" v-else>未匹配</div>
                       </div>
-                      <div class="ratebutton1" v-else>未匹配</div>
+                      <div style="flex: 0 0 18px"></div>
                     </div>
-                    <div style="flex: 0 0 18px"></div>
-                  </div>
-                </el-tooltip>
+                  </el-tooltip>
+                </div>
               </div>
-            </div>
-            <!--     只有一级标签 -->
-            <div v-if="item.children.length == 0">
-              <div class="rateboxcenttit" style="cursor: pointer">
-                <el-tooltip placement="bottom" effect="light">
-                  <div slot="content">
-                    <div class="huashu-title">
-                      客户标签:{{ getKeywordsList(item.keywordsList) }}
-                    </div>
-                    <div class="huashu-title">需求挖掘话术</div>
-                    <div class="huashu">
-                      <div
-                        class="huashu-item"
-                        v-for="(question, index) in item.modelList"
-                        :key="index"
-                      >
-                        <i
-                          class="el-icon-success"
-                          :style="
-                            question.isAskQuestions == 0
-                              ? 'color: #409eff'
-                              : question.isAskQuestions == 2
-                              ? 'color: orange'
-                              : 'color: #666'
-                          "
-                        ></i>
+              <!--     只有一级标签 -->
+              <div v-if="item.children.length == 0">
+                <div class="rateboxcenttit" style="cursor: pointer">
+                  <el-tooltip placement="bottom" effect="light">
+                    <div slot="content">
+                      <div class="huashu-title">
+                        客户标签:{{ getKeywordsList(item.keywordsList) }}
+                      </div>
+                      <div class="huashu-title">需求挖掘话术</div>
+                      <div class="huashu">
                         <div
-                          class="text"
-                          :style="
-                            question.isAskQuestions == 0
-                              ? 'color: #409eff'
-                              : question.isAskQuestions == 2
-                              ? 'color: orange'
-                              : 'color: #666'
-                          "
+                          class="huashu-item"
+                          v-for="(question, index) in item.modelList"
+                          :key="index"
                         >
-                          {{
-                            question.showFormatExpression ||
-                            question.keywordsName
-                          }}
+                          <i
+                            class="el-icon-success"
+                            :style="
+                              question.isAskQuestions == 0
+                                ? 'color: #409eff'
+                                : question.isAskQuestions == 2
+                                ? 'color: orange'
+                                : 'color: #666'
+                            "
+                          ></i>
+                          <div
+                            class="text"
+                            :style="
+                              question.isAskQuestions == 0
+                                ? 'color: #409eff'
+                                : question.isAskQuestions == 2
+                                ? 'color: orange'
+                                : 'color: #666'
+                            "
+                          >
+                            {{
+                              question.showFormatExpression ||
+                              question.keywordsName
+                            }}
+                          </div>
                         </div>
                       </div>
                     </div>
-                  </div>
-                  <div style="display: flex">
-                    <div style="flex: 1">{{ item.name }}</div>
-                    <div style="flex: 1">执行{{ item.fraction || 0 }}%</div>
-                    <div
-                      style="flex: 1"
-                      v-if="item.keywordsList && item.keywordsList.length"
-                    >
-                      已匹配({{
-                        item.keywordsList && item.keywordsList.length
-                      }})
+                    <div style="display: flex">
+                      <div style="flex: 1">{{ item.name }}</div>
+                      <div style="flex: 1">执行{{ item.fraction || 0 }}%</div>
+                      <div
+                        style="flex: 1"
+                        v-if="item.keywordsList && item.keywordsList.length"
+                      >
+                        已匹配({{
+                          item.keywordsList && item.keywordsList.length
+                        }})
+                      </div>
+                      <div style="flex: 1" v-else>未匹配</div>
+                      <div style="flex: 0 0 18px"></div>
                     </div>
-                    <div style="flex: 1" v-else>未匹配</div>
-                    <div style="flex: 0 0 18px"></div>
-                  </div>
-                </el-tooltip>
+                  </el-tooltip>
+                </div>
               </div>
             </div>
           </div>
-          </div>
           <div class="mydesc" v-if="zhixingcenterindex == 2">
             <span style="color: #409eff"
               ><i class="el-icon-success" style="margin-right: 5px"></i
@@ -893,7 +904,7 @@
       >
         <div
           class="viewclace"
-          :class="{bosdttom: item.checked}"
+          :class="{ bosdttom: item.checked }"
           @click="biaojixuanze(item)"
           v-for="(item, index) in tablists"
           :key="index"
@@ -963,12 +974,20 @@
     >
       <div style="width: 80%; margin: 0 auto; font-size: 30px">
         <div>
-          <el-radio v-model="effectiveindex" :label="1">没电指派无录音</el-radio>
-          <el-radio v-model="effectiveindex" :label="2">离线指派无录音</el-radio>
+          <el-radio v-model="effectiveindex" :label="1"
+            >没电指派无录音</el-radio
+          >
+          <el-radio v-model="effectiveindex" :label="2"
+            >离线指派无录音</el-radio
+          >
         </div>
         <div>
-          <el-radio v-model="effectiveindex" :label="3">系统测试误操作</el-radio>
-          <el-radio v-model="effectiveindex" :label="4">非接访场景录音</el-radio>
+          <el-radio v-model="effectiveindex" :label="3"
+            >系统测试误操作</el-radio
+          >
+          <el-radio v-model="effectiveindex" :label="4"
+            >非接访场景录音</el-radio
+          >
         </div>
         <div>
           <el-radio v-model="effectiveindex" :label="5">其他</el-radio>
@@ -1286,8 +1305,6 @@
       </div>
     </el-dialog>
 
-
-    
     <el-dialog
       title="更换销讲业务"
       :visible.sync="showSalesBusiness"
@@ -1295,7 +1312,17 @@
       width="600px"
       :close-on-click-modal="false"
     >
-      <div style="display: flex;align-items: center;">
+      <div style="display: flex; align-items: center; height: 40px">
+        <div class="titel-text" style="margin-left: 20px">模板类型:</div>
+        <el-radio-group
+          v-model="templateStatus"
+          @change="marketingBusinessNoApi"
+        >
+          <el-radio :label="0">首访模板</el-radio>
+          <el-radio :label="1">复访模板</el-radio>
+        </el-radio-group>
+      </div>
+      <div style="display: flex; align-items: center">
         <div class="titel-text" style="margin-left: 20px">销讲业务:</div>
         <el-select
           class="div-inp"
@@ -1303,6 +1330,7 @@
           clearable
           filterable
           collapse-tags
+          :disabled="templateStatus != 0 && templateStatus != 1"
           placeholder="请选择"
         >
           <el-option
@@ -1338,7 +1366,7 @@ export default {
     return {
       showSalesBusiness: false, // 更换销讲业务
       templateList: [], // 销讲业务列表
-      marketingBusiness: '', // 选中的销讲业务
+      marketingBusiness: "", // 选中的销讲业务
 
       keyWordsList: [],
       imgArr: [
@@ -1428,13 +1456,14 @@ export default {
       searchText: "",
       tablists: [], // 角色列表
       roleSelectArr: [0], // 当前选中的角色标记点
-      consultant: '', // 多顾问角色
+      consultant: "", // 多顾问角色
+
+      templateStatus: 0, // 选择的模板类型
     };
   },
   created() {
-    
     // 添加日志
-    this.addOperatingLog()
+    this.addOperatingLog();
     this.rec_index_flag = this.permissions["rec_index_flag"]; //标记顾问
     this.rec_index_addJ = this.permissions["rec_index_addJ"]; //加精
     this.rec_index_wrongword = this.permissions["rec_index_wrongword"]; //常错词
@@ -1509,38 +1538,52 @@ export default {
   },
 
   methods: {
+    // 切换销讲业务
+    showMethods() {
+      this.showSalesBusiness = true;
+      this.marketingBusiness = this.userinformationlist.marketingBusiness;
+
+      this.marketingBusinessNoApi();
+    },
+
     // 添加日志
     addOperatingLog() {
       this.$api.http.addOperatingLog({ logType: 10 });
     },
     // 确认切换销讲业务
     enterSalesBusiness() {
-      this.$api.http.updateMarketingBusiness({
-        marketingBusiness: this.marketingBusiness,
-        id:  this.fileId,
-      }).then(res=> {
-        console.log(res, 'cnmcm,cxcvnklfdkldflkfdalk')
-        if (res.code == 10000) {
-          this.$message.success(res.message);
-          this.init()
-          this.showSalesBusiness = false
-        } else {
-          this.$message.error(res.message);
-        }
-      })
+      this.$api.http
+        .updateMarketingBusiness({
+          marketingBusiness: this.marketingBusiness,
+          id: this.fileId,
+        })
+        .then((res) => {
+          console.log(res, "cnmcm,cxcvnklfdkldflkfdalk");
+          if (res.code == 10000) {
+            this.$message.success(res.message);
+            this.init();
+            this.showSalesBusiness = false;
+          } else {
+            this.$message.error(res.message);
+          }
+        });
     },
 
     // 销讲模板列表
     marketingBusinessNoApi() {
-      this.$api.http.marketingBusinessNoApi({
-        houseId: localStorage.getItem("houseId"),
+      this.templateList = []
+      let obj = {
+        houseId:
+          localStorage.getItem("houseId") || this.userinformationlist.projectId,
         status: 0, // 固定传0
-      }).then(res => {
-        console.log(res, 'asdklasjdkasljsalkd')
+        templateStatus: this.templateStatus,
+      };
+      this.$api.http.marketingBusinessNoApi(obj).then((res) => {
+        console.log(res, "asdklasjdkasljsalkd");
         if (res.code == 10000) {
-          this.templateList = res.data
-        } 
-      })
+          this.templateList = res.data;
+        }
+      });
     },
 
     // 修改销讲业务模板
@@ -2018,7 +2061,9 @@ export default {
                 id: this.fileId,
                 validInvalid: 0,
                 invalidReason: "",
-                houseId: localStorage.getItem("houseId"),
+                houseId:
+                  localStorage.getItem("houseId") ||
+                  this.userinformationlist.projectId,
               })
               .then((res) => {
                 this.$message({
@@ -2056,7 +2101,9 @@ export default {
           validInvalid: 1,
           invalidReason: Number(this.effectiveindex),
           invalidNote: this.effectiveitext,
-          houseId: localStorage.getItem("houseId"),
+          houseId:
+            localStorage.getItem("houseId") ||
+            this.userinformationlist.projectId,
         })
         .then((res) => {
           this.dialogFormVisible13 = false;
@@ -2183,7 +2230,7 @@ export default {
     },
     //标记
     biaoji() {
-      this.tablists = this.tablist.slice(1, this.tablist.length)
+      this.tablists = this.tablist.slice(1, this.tablist.length);
       this.dialogFormVisible11 = true;
     },
     //取消标记
@@ -2192,36 +2239,40 @@ export default {
       this.roleindexbiaoji = this.dshfkjsdkksodofydwfkhwdfkjh;
     },
 
-    
-			// 设置顾问
-			setConsultant() {
-				let arr = this.consultant.split(',') || []
-				console.log(this.consultant,arr)
-				this.tablist.map(obj => {
-					if (arr.includes(obj.speaker.toString())) {
-						obj.name += '顾问'
-					}
-				})
-			},
+    // 设置顾问
+    setConsultant() {
+      let arr = this.consultant.split(",") || [];
+      console.log(this.consultant, arr);
+      this.tablist.map((obj) => {
+        if (arr.includes(obj.speaker.toString())) {
+          obj.name += "顾问";
+        }
+      });
+    },
 
     // 标记选择
     biaojixuanze(item) {
-      item.checked = !item.checked
+      item.checked = !item.checked;
     },
     //确认标记
     subMsg11() {
-  
-      let arr = this.tablists.filter(item => item.checked)
+      let arr = this.tablists.filter((item) => item.checked);
       if (arr.lenght == 0) {
-					this.$message.error('请选择标记角色~');
-					return
-				}
+        this.$message.error("请选择标记角色~");
+        return;
+      }
       this.$api.http
         .markConsultant({
-          speaker: arr.map(item => { return item.speaker }).join(","),
+          speaker: arr
+            .map((item) => {
+              return item.speaker;
+            })
+            .join(","),
           id: this.isd,
           customerId: this.fileId,
-          houseId: localStorage.getItem("houseId"),
+          houseId:
+            localStorage.getItem("houseId") ||
+            this.userinformationlist.projectId,
         })
         .then((res) => {
           this.dialogFormVisible11 = false;
@@ -2253,7 +2304,6 @@ export default {
           this.findCARKeywords();
           this.findBannedWordsByCusId();
           this.Getsthetransliteratecontent();
-          this.marketingBusinessNoApi();
           this.findTabooWordsByCusId();
         });
     },
@@ -2264,7 +2314,6 @@ export default {
         .then((res) => {
           this.prohibitedlist = res.data;
         });
-
     },
     //常错词确认
     subMsg() {
@@ -2325,7 +2374,7 @@ export default {
 
     //常错词点击
     checkMsg(row, index) {
-      console.log(this.rec_index_wrongword)
+      console.log(this.rec_index_wrongword);
       if (!this.rec_index_wrongword) {
         return;
       }
@@ -2345,7 +2394,8 @@ export default {
     },
     correctListFun() {
       let obj = {
-        houseId: localStorage.getItem("houseId"),
+        houseId:
+          localStorage.getItem("houseId") || this.userinformationlist.projectId,
       };
       this.$api.api.correctList(obj).then((res) => {
         this.mistakenList = res.data.map((item) => {
@@ -2360,44 +2410,42 @@ export default {
     },
     //获取销讲词违禁词
     findBannedWordsByCusId() {
-      this.$api.http
-        .findBycusId({ cusId: this.fileId })
-        .then((res) => {
-          let list1 = res.data || [];
-          let level1 = []; // 一级
-          list1.forEach((item) => {
-            if (item.pid == 0) {
-              level1.push({
-                id: item.marketingId,
+      this.$api.http.findBycusId({ cusId: this.fileId }).then((res) => {
+        let list1 = res.data || [];
+        let level1 = []; // 一级
+        list1.forEach((item) => {
+          if (item.pid == 0) {
+            level1.push({
+              id: item.marketingId,
+              rate: item.fraction,
+              name: item.name,
+              percent: 0,
+              ratepercent: 0,
+              show: false,
+              children: [],
+            });
+          }
+        });
+        list1.forEach((item) => {
+          level1.forEach((el) => {
+            if (item.pid == el.id) {
+              if (item.selected == 0) {
+                el.ratepercent += item.fraction;
+              }
+              el.children.push({
+                id: item.id,
                 rate: item.fraction,
+                selected: item.selected,
                 name: item.name,
-                percent: 0,
-                ratepercent: 0,
-                show: false,
-                children: [],
               });
             }
           });
-          list1.forEach((item) => {
-            level1.forEach((el) => {
-              if (item.pid == el.id) {
-                if (item.selected == 0) {
-                  el.ratepercent += item.fraction;
-                }
-                el.children.push({
-                  id: item.id,
-                  rate: item.fraction,
-                  selected: item.selected,
-                  name: item.name,
-                });
-              }
-            });
-          });
-          if (level1.length != 0) {
-            level1[0].show = true;
-          }
-          this.ratelist = level1;
         });
+        if (level1.length != 0) {
+          level1[0].show = true;
+        }
+        this.ratelist = level1;
+      });
     },
 
     //系统分析切换人工校准
@@ -2512,8 +2560,8 @@ export default {
             this.roleList = this.tablist.slice(1);
             if (audopbj[this.AudioIdx].speaker) {
               this.yibiaoji = "已标记";
-              this.consultant = audopbj[this.AudioIdx].speaker
-              this.setConsultant()
+              this.consultant = audopbj[this.AudioIdx].speaker;
+              this.setConsultant();
             }
           }
           this.corpusId = audopbj[this.AudioIdx].id;
diff --git a/src/views/ReceivingRecords/index.vue b/src/views/ReceivingRecords/index.vue
index 136ecf3..149a397 100644
--- a/src/views/ReceivingRecords/index.vue
+++ b/src/views/ReceivingRecords/index.vue
@@ -959,7 +959,7 @@ export default {
       this.findbypage();
       this.findKeywords();
       this.findQuestionList();
-      // this.getMarketingBusiness();// 销讲业务
+      this.getMarketingBusiness();// 销讲业务
       // 获取置业顾问列表
       this.findUserListByHouseId();
     },
diff --git a/src/views/Statistics/index.vue b/src/views/Statistics/index.vue
index c61949b..89990ab 100644
--- a/src/views/Statistics/index.vue
+++ b/src/views/Statistics/index.vue
@@ -75,6 +75,21 @@
             </el-option>
           </el-select>
           <!-- </template> -->
+
+          <div class="titel-text" style="margin-left: 0px">成交状态:</div>
+          <el-select
+            class="div-inp"
+            v-model="deliveryStatus"
+            @change="confirmtimes"
+            multiple
+            clearable
+            filterable
+            collapse-tags
+            placeholder="请选择"
+          >
+            <el-option label="未成交" :value="0"></el-option>
+            <el-option label="已成交" :value="1"></el-option>
+          </el-select>
         </div>
 
         <div style="position: absolute; right: 20px">
@@ -315,7 +330,7 @@ export default {
       efficient: "",
       markCount: "",
       noMarkCount: "",
-
+      deliveryStatus: null, // 
       templateList: [], // 销讲业务列表
       marketingBusiness: [], // 选中的销讲业务
     };
@@ -587,14 +602,21 @@ export default {
       } else {
         dateType = this.TimetoAhoose;
       }
-      this.$api.http
-        .findmatchdata({
+
+
+      let obj = {
           dateType: dateType,
           houseId: this.houseId,
           statDateStart: this.fromobj.starttime,
           marketingBusiness: this.marketingBusiness.join(','),
           statDateEnd: this.fromobj.endoftime,
-        })
+        }
+
+      if (this.deliveryStatus != null) {
+        obj.deliveryStatus = this.deliveryStatus
+      }
+      this.$api.http
+        .findmatchdata(obj)
         .then((res) => {
           this.objlist = res.data.list;
           // this.alllist = [{ name: "有效接待", num: res.data.total }];
diff --git a/src/views/Template/Pinspeakwords.vue b/src/views/Template/Pinspeakwords.vue
index f8504d2..6d13730 100644
--- a/src/views/Template/Pinspeakwords.vue
+++ b/src/views/Template/Pinspeakwords.vue
@@ -216,6 +216,15 @@
                 <el-radio :label="1">否</el-radio>
               </el-radio-group>
             </div>
+
+            <div style="display: flex; align-items: center; height: 40px">
+              <span style="width: 120px">模板类型</span>
+
+              <el-radio-group v-model="inparams.templateStatus">
+                <el-radio :label="0">首访模板</el-radio>
+                <el-radio :label="1">复访模板</el-radio>
+              </el-radio-group>
+            </div>
           </el-col>
           <el-col :span="20"> (提示:拖拽大类可以排序) </el-col>
         </el-row>
@@ -402,6 +411,7 @@ export default {
       inparams: {
         templateName: "", // 话术名称
         defaultTemplate: 1, // 默认模板 0:是,1:否
+        templateStatus: 0, // 模板类型0 首访模板 1复访模板
       },
     };
   },
@@ -539,6 +549,7 @@ export default {
           this.nodelist = res.data.list;
           this.inparams.templateName = res.data.templateName;
           this.inparams.defaultTemplate = res.data.defaultTemplate;
+          this.inparams.templateStatus = res.data.templateStatus;
           console.log(this.inparams);
           this.getHouse2();
           this.checklist.forEach((item) => {