Просмотр исходного кода

Merge branch 'feature_20260228_周报半月报动态配置' into uat(dev)

# Conflicts:
#	src/views/week/doubleHistoricalWeeklyDetils.vue
#	src/views/week/doubleWeekly.vue
#	src/views/week/doubleWeeklyApproval.vue
#	src/views/week/doubleWeeklyDetils.vue
zhujindu 1 день назад
Родитель
Сommit
fd64bb4f51

+ 68 - 43
src/views/week/doubleHistoricalWeeklyDetils.vue

@@ -3,7 +3,6 @@
     <!--        顶部条-->
     <div class="navBarTOP">
       <van-nav-bar class="navBar" title="半月报详情" left-arrow @click-left="onClickLeft" />
-      <!--      <p style="margin-left: 16px;    font-size: 14px;">{{title}}</p>-->
     </div>
     <div class="lineGrey"></div>
     <div class="lineGrey"></div>
@@ -200,46 +199,70 @@
         <van-collapse-item name="17" title="超好贴分销店下单">
           <veryGoodPlaceOrder :reportTargetAll="reportTargetAll"></veryGoodPlaceOrder>
         </van-collapse-item>
-        <van-collapse-item title="上期工作成果" name="7">
-          <div style="margin-top: -10px">
-            <div v-for="(item, index) in reportContentsList2" :key="index">
-              <!--              <p class="texttitle"><span class="opint"></span><span>{{selectDictLabel(weekType,item.doubleWeekType)}}</span></p>-->
-              <p class="texttitle texttitle2">计划工作进度</p>
-              <div style="padding: 10px 0; min-height: 32px" class="contentContainer">
-                <van-field
-                  v-model="reportContentsList1[index].doubleWeekContent"
-                  rows="4"
-                  autosize
-                  readonly
-                  type="textarea" />
-              </div>
-              <p class="texttitle texttitle2">实际工作进度</p>
-              <div style="padding: 10px 0; min-height: 32px" class="contentContainer">
-                <van-field
-                  v-model="item.doubleWeekContent"
-                  rows="4"
-                  autosize
-                  readonly
-                  type="textarea" />
+        <van-collapse-item title="客户开拓" name="6">
+          <van-row>
+            <van-col span="24"><span class="leftTitle">非片客户开发</span></van-col>
+            <van-col span="24"
+              ><p>
+                全年开发数:<span class="colorbalck">{{
+                  Micrometer(reportTargetAll.customerAct)
+                }}</span>
+              </p></van-col
+            >
+            <van-col span="24"
+              ><p>
+                全年进度率:<span class="colorbalck">{{ reportTargetAll.customerYearRate }}%</span>
+              </p></van-col
+            >
+          </van-row>
+        </van-collapse-item>
+        <div class="contentContainer" v-if="reportTarget.isHistory == '0'">
+          <!-- isHistory 是否为历史汇报:0-新汇报 1-历史汇报 -->
+          <reportCustom
+            ref="reportCustom"
+            :disabled="true"
+            :reportCustomData="reportTarget.customTaskList"></reportCustom>
+        </div>
+        <template v-else>
+          <van-collapse-item title="上期工作成果" name="7">
+            <div style="margin-top: -10px">
+              <div v-for="(item, index) in reportContentsList2" :key="index">
+                <p class="texttitle texttitle2">计划工作进度</p>
+                <div style="padding: 10px 0; min-height: 32px" class="contentContainer">
+                  <van-field
+                    v-model="reportContentsList1[index].doubleWeekContent"
+                    rows="4"
+                    autosize
+                    readonly
+                    type="textarea" />
+                </div>
+                <p class="texttitle texttitle2">实际工作进度</p>
+                <div style="padding: 10px 0; min-height: 32px" class="contentContainer">
+                  <van-field
+                    v-model="item.doubleWeekContent"
+                    rows="4"
+                    autosize
+                    readonly
+                    type="textarea" />
+                </div>
               </div>
             </div>
-          </div>
-        </van-collapse-item>
-        <van-collapse-item title="本期工作规划" name="8">
-          <div style="margin-top: -10px">
-            <div v-for="(item2, index2) in reportContentsList3" :key="index2">
-              <!--              <p class="texttitle"><span class="opint"></span><span>{{selectDictLabel(weekType,item2.doubleWeekType)}}</span></p>-->
-              <div style="padding: 10px 0; min-height: 32px" class="contentContainer">
-                <van-field
-                  v-model="item2.doubleWeekContent"
-                  rows="4"
-                  autosize
-                  readonly
-                  type="textarea" />
+          </van-collapse-item>
+          <van-collapse-item title="本期工作规划" name="8">
+            <div style="margin-top: -10px">
+              <div v-for="(item2, index2) in reportContentsList3" :key="index2">
+                <div style="padding: 10px 0; min-height: 32px" class="contentContainer">
+                  <van-field
+                    v-model="item2.doubleWeekContent"
+                    rows="4"
+                    autosize
+                    readonly
+                    type="textarea" />
+                </div>
               </div>
             </div>
-          </div>
-        </van-collapse-item>
+          </van-collapse-item>
+        </template>
       </van-collapse>
       <div
         class="contentContainer"
@@ -278,7 +301,6 @@
             <div style="padding: 10px 0">
               <van-field v-model="item.remarkContent" rows="4" autosize readonly type="textarea" />
             </div>
-            <!-- <p style="text-align: right">点评时间:{{ item.createTime }}</p> -->
           </div>
         </div>
       </div>
@@ -301,10 +323,6 @@
       <van-button type="info" size="small" plain class="Btn1" @click="submint">提交点评</van-button>
     </div>
     <br />
-    <!--    <div class="envelopes" @click="openEnterpriseChat" >-->
-    <!--      <img :src="envelopes">-->
-    <!--      <p>红包奖励</p>-->
-    <!--    </div>-->
     <br /><br />
     <br /><br />
   </div>
@@ -330,6 +348,7 @@ import ZYSAP from '@/views/componentsTarget/ZYSAP';
 import veryGoodPlaceOrder from '@/views/componentsTarget/veryGoodPlaceOrder';
 import neiwaiqiangpingtu from '@/views/componentsTarget/neiwaiqiangpingtu';
 import zhiganwaiqiangSAP from '@/views/componentsTarget/zhiganwaiqiangSAP';
+import reportCustom from './reportCustom';
 export default {
   name: 'home',
   components: {
@@ -340,6 +359,7 @@ export default {
     veryGoodPlaceOrder,
     neiwaiqiangpingtu,
     zhiganwaiqiangSAP,
+    reportCustom,
   },
   data() {
     return {
@@ -382,6 +402,7 @@ export default {
       managerRemarkContent: '',
       isDiy: false,
       type: '-1',
+      JZQuota: false,
       //
     };
   },
@@ -471,7 +492,7 @@ export default {
     formatter(value) {
       return value.replace(
         /[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi,
-        ''
+        '',
       );
     },
     submint() {
@@ -544,6 +565,10 @@ export default {
       });
       getDetailById({ reportId: this.$route.query.reportId }).then((res) => {
         loading1.clear();
+        this.JZQuota = false;
+        if (res.data.postType == 'JZ') {
+          this.JZQuota = true;
+        }
         this.title =
           res.data.deptName + '-' + res.data.postName + '-' + res.data.nickName + '的半月报';
         this.ptitle = res.data.pdeptName + '-' + res.data.ppostName + '-' + res.data.pnickName;

+ 236 - 127
src/views/week/doubleWeekly.vue

@@ -213,68 +213,86 @@
         <van-collapse-item name="17" title="超好贴分销店下单">
           <veryGoodPlaceOrder :reportTargetAll="reportTargetAll"></veryGoodPlaceOrder>
         </van-collapse-item>
-        <van-collapse-item title="上期工作成果" name="7" class="collapsettitle">
-          <template #title>
-            <div>上期工作成果 <span class="colorRed">(必填)</span></div>
-          </template>
-          <div style="margin-top: -10px">
-            <div class="weekContent" v-for="(item2, index2) in reportContentsList2" :key="index2">
-              <!--              <p class="texttitle"><span class="opint"></span><span>{{ item2.title }}</span><span-->
-              <!--                  class="colorRed">(必填)</span></p>-->
-              <p class="texttitle texttitle2">计划工作进度</p>
-              <p class="contentContainerp1">
-                <van-field
-                  v-model="reportContentsList3[index2].doubleWeekContent"
-                  rows="4"
-                  autosize
-                  readonly
-                  :formatter="formatter"
-                  type="textarea" />
-              </p>
-              <!--              <p style="min-height: 32px;">{{ reportContentsList3[index2].doubleWeekContent }}</p>-->
-              <p class="texttitle texttitle2">实际工作进度</p>
-              <p class="contentContainerp">
-                <van-field
-                  v-model="item2.doubleWeekContent"
-                  rows="4"
-                  autosize
-                  maxlength="800"
-                  :formatter="formatter"
-                  type="textarea"
-                  show-word-limit />
-              </p>
-            </div>
-          </div>
+        <van-collapse-item title="客户开拓" name="6">
+          <van-row>
+            <van-col span="24"><span class="leftTitle">非片客户开发</span></van-col>
+            <van-col span="24"
+              ><p>
+                全年开发数:<span class="colorbalck">{{
+                  Micrometer(reportTargetAll.customerAct)
+                }}</span>
+              </p></van-col
+            >
+            <van-col span="24"
+              ><p>
+                全年进度率:<span class="colorbalck">{{ reportTargetAll.customerYearRate }}%</span>
+              </p></van-col
+            >
+          </van-row>
         </van-collapse-item>
-        <van-collapse-item title="本期工作规划" name="8" class="collapsettitle">
-          <template #title>
-            <div>本期工作规划 <span class="colorRed">(必填)</span></div>
-          </template>
-          <div style="margin-top: -10px">
-            <div class="weekContent" v-for="(item, index) in reportContentsList1" :key="index">
-              <!--              <p class="texttitle"><span class="opint"></span><span>{{ item.title }}</span><span-->
-              <!--                  class="colorRed">(必填)</span></p>-->
-              <p class="contentContainerp">
-                <van-field
-                  v-model="item.doubleWeekContent"
-                  rows="4"
-                  autosize
-                  maxlength="800"
-                  type="textarea"
-                  show-word-limit
-                  :formatter="formatter" />
-              </p>
+        <!-- isHistory 是否为历史汇报:0-新汇报 1-历史汇报 -->
+        <div class="contentContainer" v-if="reportTarget.isHistory == '0'">
+          <reportCustom
+            ref="reportCustom"
+            :reportCustomData="reportTarget.customTaskList"></reportCustom>
+        </div>
+        <template v-else>
+          <van-collapse-item title="上期工作成果" name="7" class="collapsettitle">
+            <template #title>
+              <div>上期工作成果 <span class="colorRed">(必填)</span></div>
+            </template>
+            <div style="margin-top: -10px">
+              <div class="weekContent" v-for="(item2, index2) in reportContentsList2" :key="index2">
+                <p class="texttitle texttitle2">计划工作进度</p>
+                <p class="contentContainerp1">
+                  <van-field
+                    v-model="reportContentsList3[index2].doubleWeekContent"
+                    rows="4"
+                    autosize
+                    readonly
+                    :formatter="formatter"
+                    type="textarea" />
+                </p>
+                <p class="texttitle texttitle2">实际工作进度</p>
+                <p class="contentContainerp">
+                  <van-field
+                    v-model="item2.doubleWeekContent"
+                    rows="4"
+                    autosize
+                    maxlength="800"
+                    :formatter="formatter"
+                    type="textarea"
+                    show-word-limit />
+                </p>
+              </div>
             </div>
-          </div>
-        </van-collapse-item>
+          </van-collapse-item>
+          <van-collapse-item title="本期工作规划" name="8" class="collapsettitle">
+            <template #title>
+              <div>本期工作规划 <span class="colorRed">(必填)</span></div>
+            </template>
+            <div style="margin-top: -10px">
+              <div class="weekContent" v-for="(item, index) in reportContentsList1" :key="index">
+                <p class="contentContainerp">
+                  <van-field
+                    v-model="item.doubleWeekContent"
+                    rows="4"
+                    autosize
+                    maxlength="800"
+                    type="textarea"
+                    show-word-limit
+                    :formatter="formatter" />
+                </p>
+              </div>
+            </div>
+          </van-collapse-item>
+        </template>
       </van-collapse>
       <br />
       <br />
-      <!--      <div class="contentborder">-->
       <van-button type="info" size="small" plain class="Btn100" @click="submint"
         >提交半月报</van-button
       >
-      <!--      </div>-->
     </div>
     <br />
     <br />
@@ -296,6 +314,7 @@ import ZYSAP from '@/views/componentsTarget/ZYSAP';
 import veryGoodPlaceOrder from '@/views/componentsTarget/veryGoodPlaceOrder';
 import neiwaiqiangpingtu from '@/views/componentsTarget/neiwaiqiangpingtu';
 import zhiganwaiqiangSAP from '@/views/componentsTarget/zhiganwaiqiangSAP';
+import reportCustom from './reportCustom';
 
 export default {
   name: 'home',
@@ -307,6 +326,7 @@ export default {
     veryGoodPlaceOrder,
     neiwaiqiangpingtu,
     zhiganwaiqiangSAP,
+    reportCustom,
   },
   data() {
     return {
@@ -338,6 +358,7 @@ export default {
       weekType: [],
       temporaryShow: '',
       type: '-1',
+      JZQuota: false,
     };
   },
   created() {
@@ -378,7 +399,7 @@ export default {
     formatter(value) {
       return value.replace(
         /[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi,
-        ''
+        '',
       );
     },
     getDetailById() {
@@ -390,6 +411,10 @@ export default {
       getDetailById({ reportId: this.$route.query.reportId }).then((res) => {
         loading1.clear();
         if (res.code == 200) {
+          this.JZQuota = false;
+          if (res.data.postType == 'JZ') {
+            this.JZQuota = true;
+          }
           if (res.data.status != '0' && res.data.status != '2') {
             this.$dialog
               .alert({
@@ -411,7 +436,7 @@ export default {
             for (var i = 0; i < res.data.reportContents.length; i++) {
               reportContentsdata[i].title = this.selectDictLabel(
                 this.weekType,
-                res.data.reportContents[i].doubleWeekType
+                res.data.reportContents[i].doubleWeekType,
               );
               if (res.data.reportContents[i].type == '2') {
                 reportContentsList1.push(reportContentsdata[i]);
@@ -525,97 +550,181 @@ export default {
       });
     },
     tsContentsFn() {
+      if (this.isclick) {
+        if (this.reportTarget.isHistory == '1') {
+          this.reportTarget.reportContents = [];
+          this.reportTarget.reportContents = this.reportContentsList2
+            .concat(this.reportContentsList1)
+            .concat(this.reportContentsList3);
+          this.tsContentsFun(null);
+        } else {
+          // 新的
+          if (this.reportTarget.customTaskList && this.reportTarget.customTaskList.length) {
+            // 配置任务
+            this.filterReportCustomData((reportCustomAnswers) => {
+              this.tsContentsFun(reportCustomAnswers);
+            });
+          } else {
+            // 没有配置任务
+            this.tsContentsFun(null);
+          }
+        }
+      }
+    },
+    tsContentsFun(reportCustomAnswers) {
       let loading1 = this.$toast.loading({
         duration: 0,
         message: '数据提交中...',
         forbidClick: true,
       });
-      if (this.isclick) {
-        this.reportTarget.reportContents = [];
-        this.reportTarget.reportContents = this.reportContentsList2
-          .concat(this.reportContentsList1)
-          .concat(this.reportContentsList3);
-        this.reportTarget.status = '1';
-        this.isclick = false;
-        tsContents(this.reportTarget).then((res) => {
-          loading1.clear();
-          this.isclick = true;
-          if (res.code == 200) {
-            this.$dialog
-              .alert({
-                title: '系统提示',
-                message: '暂存成功',
-              })
-              .then(() => {
-                // if(this.$route.query.reportId!=undefined){
-                //   window.location.replace(window.location.origin+"/mobile/myHistoricalDaily")
-                // }else{
-                //   window.location.replace(window.location.origin+"/mobile/home")
-                // }
-              });
+      if (reportCustomAnswers) this.reportTarget.reportCustomAnswers = reportCustomAnswers;
+      this.reportTarget.status = '1';
+      this.isclick = false;
+      tsContents(this.reportTarget).then((res) => {
+        loading1.clear();
+        this.isclick = true;
+        if (res.code == 200) {
+          this.$dialog
+            .alert({
+              title: '系统提示',
+              message: '暂存成功',
+            })
+            .then(() => {
+              // if(this.$route.query.reportId!=undefined){
+              //   window.location.replace(window.location.origin+"/mobile/myHistoricalDaily")
+              // }else{
+              //   window.location.replace(window.location.origin+"/mobile/home")
+              // }
+            });
+        } else {
+          this.$toast.fail(res.msg);
+        }
+      });
+    },
+    reportCustomTabstoreVal(callback) {
+      // 必填校验
+      this.$refs.reportCustom.$refs.tabstoreVal
+        .validate()
+        .then(() => {
+          // 验证通过
+          this.filterReportCustomData(callback);
+        })
+        .catch((errors) => {
+          this.toastLoading().clear();
+          return;
+        });
+    },
+    filterReportCustomData(callback) {
+      let reportCustomData = this.$refs.reportCustom ? this.$refs.reportCustom.fromData : {} || {};
+      let reportCustomAnswers = [];
+      for (let i = 0; i < reportCustomData.length; i++) {
+        let customData = reportCustomData[i].sfaReportCustomCollections
+          ? reportCustomData[i].sfaReportCustomCollections
+          : [];
+        for (let x = 0; x < customData.length; x++) {
+          if (
+            customData[x].reportCustomCollectionType == 'dx' ||
+            customData[x].reportCustomCollectionType == 'duox'
+          ) {
+            let optionData = customData[x].sfaReportCustomOptions;
+            for (let y = 0; y < optionData.length; y++) {
+              if (optionData[y].answerValue == 'Y') {
+                reportCustomAnswers.push({
+                  reportCustomTaskId: customData[x].reportCustomTaskId,
+                  reportCustomCollectionId: optionData[y].reportCustomCollectionId,
+                  reportCustomOptionId: optionData[y].reportCustomOptionId,
+                  answerValue: 'Y',
+                });
+              }
+            }
           } else {
-            this.$toast.fail(res.msg);
+            if (customData[x].answerValue)
+              reportCustomAnswers.push({
+                reportCustomTaskId: customData[x].reportCustomTaskId,
+                reportCustomCollectionId: customData[x].reportCustomCollectionId,
+                answerValue: customData[x].answerValue,
+              });
           }
-        });
+        }
       }
+      console.log(reportCustomAnswers);
+      callback && callback(reportCustomAnswers);
     },
     // 提交日报
     submint() {
-      let loading1 = this.$toast.loading({
-        duration: 0,
-        message: '数据提交中...',
-        forbidClick: true,
-      });
       if (this.isclick) {
-        this.reportTarget.reportContents = [];
-        for (var x = 0; x < this.reportContentsList2.length; x++) {
-          if (this.reportContentsList2[x].doubleWeekContent.trim() == '') {
-            this.$toast('请完善上期半月报内容!');
+        // 旧的
+        if (this.reportTarget.isHistory == '1') {
+          this.reportTarget.reportContents = [];
+          for (var x = 0; x < this.reportContentsList2.length; x++) {
+            if (this.reportContentsList2[x].doubleWeekContent.trim() == '') {
+              this.$toast('请完善上期半月报内容!');
+              return false;
+            }
+          }
+          for (var j = 0; j < this.reportContentsList1.length; j++) {
+            if (this.reportContentsList1[j].doubleWeekContent.trim() == '') {
+              this.$toast('请完善本期半月报内容!');
+              return false;
+            }
+          }
+          if (this.reportContentsList2[0].doubleWeekContent.length > 800) {
+            this.$toast('上期半月报内容超过800字!');
             return false;
           }
-        }
-        for (var j = 0; j < this.reportContentsList1.length; j++) {
-          if (this.reportContentsList1[j].doubleWeekContent.trim() == '') {
-            this.$toast('请完善本期半月报内容!');
+          if (this.reportContentsList1[0].doubleWeekContent.length > 800) {
+            this.$toast('本期半月报内容超过800字!');
             return false;
           }
-        }
-        if (this.reportContentsList2[0].doubleWeekContent.length > 800) {
-          this.$toast('上期半月报内容超过800字!');
-          return false;
-        }
-        if (this.reportContentsList1[0].doubleWeekContent.length > 800) {
-          this.$toast('本期半月报内容超过800字!');
-          return false;
-        }
-        this.reportTarget.reportContents = this.reportContentsList2
-          .concat(this.reportContentsList1)
-          .concat(this.reportContentsList3);
-        this.reportTarget.status = '1';
-        this.isclick = false;
-        updateReport(this.reportTarget).then((res) => {
-          loading1.clear();
-          this.isclick = true;
-          if (res.code == 200) {
-            this.$dialog
-              .alert({
-                title: '系统提示',
-                message: '提交成功',
-              })
-              .then(() => {
-                if (this.$route.query.reportId != undefined) {
-                  window.location.replace(window.location.origin + '/mobile/myHistoricalDaily');
-                } else {
-                  this.onClickLeft();
-                  // window.location.replace(window.location.origin + '/mobile/home');
-                }
-              });
+          this.reportTarget.reportContents = this.reportContentsList2
+            .concat(this.reportContentsList1)
+            .concat(this.reportContentsList3);
+          this.submintFun();
+        } else {
+          // 新的
+          if (this.reportTarget.customTaskList && this.reportTarget.customTaskList.length) {
+            // 配置任务
+            this.reportCustomTabstoreVal((reportCustomAnswers) => {
+              this.submintFun(reportCustomAnswers);
+            });
           } else {
-            this.$toast.fail(res.msg);
+            // 没有配置任务
+            this.submintFun(null);
           }
-        });
+        }
       }
     },
+    submintFun(reportCustomAnswers) {
+      let loading1 = this.$toast.loading({
+        duration: 0,
+        message: '数据提交中...',
+        forbidClick: true,
+      });
+      if (reportCustomAnswers) this.reportTarget.reportCustomAnswers = reportCustomAnswers;
+      this.reportTarget.status = '1';
+      this.isclick = false;
+      updateReport(this.reportTarget).then((res) => {
+        loading1.clear();
+        this.isclick = true;
+        if (res.code == 200) {
+          this.$dialog
+            .alert({
+              title: '系统提示',
+              message: '提交成功',
+            })
+            .then(() => {
+              if (this.$route.query.reportId != undefined) {
+                window.location.replace(window.location.origin + '/mobile/myHistoricalDaily');
+              } else {
+                this.onClickLeft();
+                // window.location.replace(window.location.origin + '/mobile/home');
+              }
+            });
+        } else {
+          this.$toast.fail(res.msg);
+        }
+      });
+    },
     getReportInfo() {
       let loading1 = this.$toast.loading({
         duration: 0,

+ 68 - 37
src/views/week/doubleWeeklyApproval.vue

@@ -199,46 +199,70 @@
         <van-collapse-item name="17" title="超好贴分销店下单">
           <veryGoodPlaceOrder :reportTargetAll="reportTargetAll"></veryGoodPlaceOrder>
         </van-collapse-item>
-        <van-collapse-item title="上期工作成果" name="7">
-          <div style="margin-top: -10px">
-            <div v-for="(item, index) in reportContentsList2" :key="index">
-              <!--              <p class="texttitle"><span class="opint"></span><span>{{selectDictLabel(weekType,item.doubleWeekType)}}</span></p>-->
-              <p class="texttitle texttitle2">计划工作进度</p>
-              <div style="padding: 10px 0; min-height: 32px" class="contentContainer">
-                <van-field
-                  v-model="reportContentsList1[index].doubleWeekContent"
-                  rows="4"
-                  autosize
-                  readonly
-                  type="textarea" />
-              </div>
-              <p class="texttitle texttitle2">实际工作进度</p>
-              <div style="padding: 10px 0; min-height: 32px" class="contentContainer">
-                <van-field
-                  v-model="item.doubleWeekContent"
-                  rows="4"
-                  autosize
-                  readonly
-                  type="textarea" />
+        <van-collapse-item title="客户开拓" name="6">
+          <van-row>
+            <van-col span="24"><span class="leftTitle">非片客户开发</span></van-col>
+            <van-col span="24"
+              ><p>
+                全年开发数:<span class="colorbalck">{{
+                  Micrometer(reportTargetAll.customerAct)
+                }}</span>
+              </p></van-col
+            >
+            <van-col span="24"
+              ><p>
+                全年进度率:<span class="colorbalck">{{ reportTargetAll.customerYearRate }}%</span>
+              </p></van-col
+            >
+          </van-row>
+        </van-collapse-item>
+        <div class="contentContainer" v-if="reportTarget.isHistory == '0'">
+          <!-- isHistory 是否为历史汇报:0-新汇报 1-历史汇报 -->
+          <reportCustom
+            ref="reportCustom"
+            :disabled="true"
+            :reportCustomData="reportTarget.customTaskList"></reportCustom>
+        </div>
+        <template v-else>
+          <van-collapse-item title="上期工作成果" name="7">
+            <div style="margin-top: -10px">
+              <div v-for="(item, index) in reportContentsList2" :key="index">
+                <p class="texttitle texttitle2">计划工作进度</p>
+                <div style="padding: 10px 0; min-height: 32px" class="contentContainer">
+                  <van-field
+                    v-model="reportContentsList1[index].doubleWeekContent"
+                    rows="4"
+                    autosize
+                    readonly
+                    type="textarea" />
+                </div>
+                <p class="texttitle texttitle2">实际工作进度</p>
+                <div style="padding: 10px 0; min-height: 32px" class="contentContainer">
+                  <van-field
+                    v-model="item.doubleWeekContent"
+                    rows="4"
+                    autosize
+                    readonly
+                    type="textarea" />
+                </div>
               </div>
             </div>
-          </div>
-        </van-collapse-item>
-        <van-collapse-item title="本期工作规划" name="8">
-          <div style="margin-top: -10px">
-            <div v-for="(item2, index2) in reportContentsList3" :key="index2">
-              <!--              <p class="texttitle"><span class="opint"></span><span>{{selectDictLabel(weekType,item2.doubleWeekType)}}</span></p>-->
-              <div style="padding: 10px 0; min-height: 32px" class="contentContainer">
-                <van-field
-                  v-model="item2.doubleWeekContent"
-                  rows="4"
-                  autosize
-                  readonly
-                  type="textarea" />
+          </van-collapse-item>
+          <van-collapse-item title="本期工作规划" name="8">
+            <div style="margin-top: -10px">
+              <div v-for="(item2, index2) in reportContentsList3" :key="index2">
+                <div style="padding: 10px 0; min-height: 32px" class="contentContainer">
+                  <van-field
+                    v-model="item2.doubleWeekContent"
+                    rows="4"
+                    autosize
+                    readonly
+                    type="textarea" />
+                </div>
               </div>
             </div>
-          </div>
-        </van-collapse-item>
+          </van-collapse-item>
+        </template>
       </van-collapse>
       <div class="contentContainer">
         <p class="contentContainerTitle">打分 <span>请点亮小星星,一颗小星星代表1分</span></p>
@@ -296,6 +320,7 @@ import ZYSAP from '@/views/componentsTarget/ZYSAP';
 import veryGoodPlaceOrder from '@/views/componentsTarget/veryGoodPlaceOrder';
 import neiwaiqiangpingtu from '@/views/componentsTarget/neiwaiqiangpingtu';
 import zhiganwaiqiangSAP from '@/views/componentsTarget/zhiganwaiqiangSAP';
+import reportCustom from './reportCustom';
 
 export default {
   name: 'home',
@@ -307,6 +332,7 @@ export default {
     veryGoodPlaceOrder,
     neiwaiqiangpingtu,
     zhiganwaiqiangSAP,
+    reportCustom,
   },
   data() {
     return {
@@ -340,6 +366,7 @@ export default {
       updateReport: {},
       weekType: [],
       type: '-1',
+      JZQuota: false,
     };
   },
   created() {
@@ -363,7 +390,7 @@ export default {
     formatter(value) {
       return value.replace(
         /[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi,
-        ''
+        '',
       );
     },
     reject() {
@@ -447,6 +474,10 @@ export default {
       getDetailById({ reportId: this.$route.query.reportId }).then((res) => {
         loading1.clear();
         if (res.code == 200) {
+          this.JZQuota = false;
+          if (res.data.postType == 'JZ') {
+            this.JZQuota = true;
+          }
           if (res.data.status != '1') {
             this.$dialog
               .alert({

+ 62 - 41
src/views/week/doubleWeeklyDetils.vue

@@ -3,14 +3,12 @@
     <!--        顶部条-->
     <div class="navBarTOP">
       <van-nav-bar class="navBar" title="半月报详情" left-arrow @click-left="onClickLeft" />
-      <!--      <p style="text-align: right;margin-right: 16px;color: #1e5398;">{{title}}</p>-->
     </div>
     <div class="lineGrey"></div>
     <div class="lineGrey"></div>
     <div class="lineGrey"></div>
     <div class="lineGrey"></div>
     <div class="lineGrey"></div>
-    <!--    <div class="lineGrey"></div>-->
     <!--        主体内容-->
     <div class="container linep">
       <van-collapse v-model="activeNames">
@@ -200,49 +198,70 @@
         <van-collapse-item name="17" title="超好贴分销店下单">
           <veryGoodPlaceOrder :reportTargetAll="reportTargetAll"></veryGoodPlaceOrder>
         </van-collapse-item>
-        <van-collapse-item title="上期工作成果" name="7">
-          <div style="margin-top: -10px">
-            <div v-for="(item, index) in reportContentsList2" :key="index">
-              <!--              <p class="texttitle"><span class="opint"></span><span>{{selectDictLabel(weekType,item.doubleWeekType)}}</span></p>-->
-              <p class="texttitle texttitle2">计划工作进度</p>
-              <div style="padding: 10px 0; min-height: 32px" class="contentContainer">
-                <van-field
-                  v-model="reportContentsList1[index].doubleWeekContent"
-                  rows="4"
-                  autosize
-                  readonly
-                  type="textarea" />
-              </div>
-              <!--              <p  style="min-height: 32px;">{{reportContentsList1[index].doubleWeekContent}}</p>-->
-              <p class="texttitle texttitle2">实际工作进度</p>
-              <div style="padding: 10px 0; min-height: 32px" class="contentContainer">
-                <van-field
-                  v-model="item.doubleWeekContent"
-                  rows="4"
-                  autosize
-                  readonly
-                  type="textarea" />
+        <van-collapse-item title="客户开拓" name="6">
+          <van-row>
+            <van-col span="24"><span class="leftTitle">非片客户开发</span></van-col>
+            <van-col span="24"
+              ><p>
+                全年开发数:<span class="colorbalck">{{
+                  Micrometer(reportTargetAll.customerAct)
+                }}</span>
+              </p></van-col
+            >
+            <van-col span="24"
+              ><p>
+                全年进度率:<span class="colorbalck">{{ reportTargetAll.customerYearRate }}%</span>
+              </p></van-col
+            >
+          </van-row>
+        </van-collapse-item>
+        <div class="contentContainer" v-if="reportTarget.isHistory == '0'">
+          <!-- isHistory 是否为历史汇报:0-新汇报 1-历史汇报 -->
+          <reportCustom
+            ref="reportCustom"
+            :disabled="true"
+            :reportCustomData="reportTarget.customTaskList"></reportCustom>
+        </div>
+        <template v-else>
+          <van-collapse-item title="上期工作成果" name="7">
+            <div style="margin-top: -10px">
+              <div v-for="(item, index) in reportContentsList2" :key="index">
+                <p class="texttitle texttitle2">计划工作进度</p>
+                <div style="padding: 10px 0; min-height: 32px" class="contentContainer">
+                  <van-field
+                    v-model="reportContentsList1[index].doubleWeekContent"
+                    rows="4"
+                    autosize
+                    readonly
+                    type="textarea" />
+                </div>
+                <p class="texttitle texttitle2">实际工作进度</p>
+                <div style="padding: 10px 0; min-height: 32px" class="contentContainer">
+                  <van-field
+                    v-model="item.doubleWeekContent"
+                    rows="4"
+                    autosize
+                    readonly
+                    type="textarea" />
+                </div>
               </div>
-              <!--              <p>{{}}</p>-->
             </div>
-          </div>
-        </van-collapse-item>
-        <van-collapse-item title="本期工作规划" name="8">
-          <div style="margin-top: -10px">
-            <div v-for="(item2, index2) in reportContentsList3" :key="index2">
-              <!--              <p class="texttitle"><span class="opint"></span><span>{{selectDictLabel(weekType,item2.doubleWeekType)}}</span></p>-->
-              <!--              <p>{{item2.doubleWeekContent}}</p>-->
-              <div style="padding: 10px 0; min-height: 32px" class="contentContainer">
-                <van-field
-                  v-model="item2.doubleWeekContent"
-                  rows="4"
-                  autosize
-                  readonly
-                  type="textarea" />
+          </van-collapse-item>
+          <van-collapse-item title="本期工作规划" name="8">
+            <div style="margin-top: -10px">
+              <div v-for="(item2, index2) in reportContentsList3" :key="index2">
+                <div style="padding: 10px 0; min-height: 32px" class="contentContainer">
+                  <van-field
+                    v-model="item2.doubleWeekContent"
+                    rows="4"
+                    autosize
+                    readonly
+                    type="textarea" />
+                </div>
               </div>
             </div>
-          </div>
-        </van-collapse-item>
+          </van-collapse-item>
+        </template>
         <div
           class="contentContainer"
           v-if="reportTarget.status > 1 || reportTarget.reportRemarks != null">
@@ -309,6 +328,7 @@ import ZYSAP from '@/views/componentsTarget/ZYSAP';
 import veryGoodPlaceOrder from '@/views/componentsTarget/veryGoodPlaceOrder';
 import neiwaiqiangpingtu from '@/views/componentsTarget/neiwaiqiangpingtu';
 import zhiganwaiqiangSAP from '@/views/componentsTarget/zhiganwaiqiangSAP';
+import reportCustom from './reportCustom';
 
 export default {
   name: 'home',
@@ -320,6 +340,7 @@ export default {
     veryGoodPlaceOrder,
     neiwaiqiangpingtu,
     zhiganwaiqiangSAP,
+    reportCustom,
   },
   data() {
     return {

+ 268 - 174
src/views/week/weekly.vue

@@ -73,102 +73,110 @@
             <veryGoodPlaceOrder :reportTargetAll="reportTargetAll"></veryGoodPlaceOrder>
           </van-collapse-item>
         </template>
-        <van-collapse-item title="上周工作成果" name="8">
-          <div style="margin-top: -10px">
-            <div v-for="(item2, index2) in reportContentsList2" :key="index2">
-              <div v-if="index2 < 7">
-                <p class="texttitle">
+        <!-- isHistory 是否为历史汇报:0-新汇报 1-历史汇报 -->
+        <div class="contentContainer" v-if="reportTarget.isHistory == '0'">
+          <reportCustom
+            ref="reportCustom"
+            :reportCustomData="reportTarget.customTaskList"></reportCustom>
+        </div>
+        <template v-else>
+          <van-collapse-item title="上周工作成果" name="8">
+            <div style="margin-top: -10px">
+              <div v-for="(item2, index2) in reportContentsList2" :key="index2">
+                <div v-if="index2 < 7">
+                  <p class="texttitle">
+                    <span class="opint"></span
+                    ><span v-if="!reportTarget.hideWeekDate">{{
+                      weeklyTimeDivision(item2.contentTime, 0)
+                    }}</span
+                    ><span>{{ weeklyTimeDivision(item2.contentTime, 1) }}</span
+                    ><span v-if="index2 < 5" class="colorRed">(必填)</span>
+                  </p>
+                  <p>
+                    <span class="blackcolor">上午:</span
+                    >{{ reportContentsList3[index2].weekContentAm }}
+                  </p>
+                  <p>
+                    <span class="blackcolor">下午:</span
+                    >{{ reportContentsList3[index2].weekContentPm }}
+                  </p>
+                  <p class="texttitle texttitle2">实际工作进度</p>
+                  <p>
+                    <van-field
+                      class="weeklyinput"
+                      v-model="item2.weekContentAm"
+                      label="上午:"
+                      placeholder="请输入" />
+                    <van-field
+                      class="weeklyinput"
+                      v-model="item2.weekContentPm"
+                      label="下午:"
+                      placeholder="请输入" />
+                  </p>
+                </div>
+                <p v-if="index2 == 7" class="texttitle"><span class="opint"></span>上周工作重点</p>
+                <div v-if="index2 == 7" style="padding: 10px 0" class="contentContainer1">
+                  <van-field
+                    v-model="reportContentsList3[index2].weekContentSummary"
+                    rows="4"
+                    autosize
+                    readonly
+                    type="textarea" />
+                </div>
+                <p v-if="index2 == 7" class="texttitle">
+                  <span class="opint"></span>上周工作成果<span class="colorRed">(必填)</span>
+                </p>
+                <div v-if="index2 == 7" style="padding: 10px 0" class="contentContainer">
+                  <van-field
+                    v-model="item2.weekContentSummary"
+                    rows="4"
+                    autosize
+                    maxlength="800"
+                    show-word-limit
+                    type="textarea" />
+                </div>
+              </div>
+            </div>
+          </van-collapse-item>
+          <van-collapse-item title="本周工作规划" name="9">
+            <div style="margin-top: -10px">
+              <div v-for="(item, index) in reportContentsList1" :key="index">
+                <p class="texttitle" v-if="index < 7">
                   <span class="opint"></span
                   ><span v-if="!reportTarget.hideWeekDate">{{
-                    weeklyTimeDivision(item2.contentTime, 0)
+                    weeklyTimeDivision(item.contentTime, 0)
                   }}</span
-                  ><span>{{ weeklyTimeDivision(item2.contentTime, 1) }}</span
-                  ><span v-if="index2 < 5" class="colorRed">(必填)</span>
-                </p>
-                <p>
-                  <span class="blackcolor">上午:</span
-                  >{{ reportContentsList3[index2].weekContentAm }}
+                  ><span>{{ weeklyTimeDivision(item.contentTime, 1) }}</span
+                  ><span v-if="index < 5" class="colorRed">(必填)</span>
                 </p>
-                <p>
-                  <span class="blackcolor">下午:</span
-                  >{{ reportContentsList3[index2].weekContentPm }}
-                </p>
-                <p class="texttitle texttitle2">实际工作进度</p>
-                <p>
+                <p v-if="index < 7">
                   <van-field
                     class="weeklyinput"
-                    v-model="item2.weekContentAm"
                     label="上午:"
-                    placeholder="请输入" />
+                    placeholder="请输入"
+                    v-model="item.weekContentAm" />
                   <van-field
                     class="weeklyinput"
-                    v-model="item2.weekContentPm"
                     label="下午:"
-                    placeholder="请输入" />
+                    placeholder="请输入"
+                    v-model="item.weekContentPm" />
                 </p>
-              </div>
-              <p v-if="index2 == 7" class="texttitle"><span class="opint"></span>上周工作重点</p>
-              <div v-if="index2 == 7" style="padding: 10px 0" class="contentContainer1">
-                <van-field
-                  v-model="reportContentsList3[index2].weekContentSummary"
-                  rows="4"
-                  autosize
-                  readonly
-                  type="textarea" />
-              </div>
-              <p v-if="index2 == 7" class="texttitle">
-                <span class="opint"></span>上周工作成果<span class="colorRed">(必填)</span>
-              </p>
-              <div v-if="index2 == 7" style="padding: 10px 0" class="contentContainer">
-                <van-field
-                  v-model="item2.weekContentSummary"
-                  rows="4"
-                  autosize
-                  maxlength="800"
-                  show-word-limit
-                  type="textarea" />
-              </div>
-            </div>
-          </div>
-        </van-collapse-item>
-        <van-collapse-item title="本周工作规划" name="9">
-          <div style="margin-top: -10px">
-            <div v-for="(item, index) in reportContentsList1" :key="index">
-              <p class="texttitle" v-if="index < 7">
-                <span class="opint"></span
-                ><span v-if="!reportTarget.hideWeekDate">{{
-                  weeklyTimeDivision(item.contentTime, 0)
-                }}</span
-                ><span>{{ weeklyTimeDivision(item.contentTime, 1) }}</span
-                ><span v-if="index < 5" class="colorRed">(必填)</span>
-              </p>
-              <p v-if="index < 7">
-                <van-field
-                  class="weeklyinput"
-                  label="上午:"
-                  placeholder="请输入"
-                  v-model="item.weekContentAm" />
-                <van-field
-                  class="weeklyinput"
-                  label="下午:"
-                  placeholder="请输入"
-                  v-model="item.weekContentPm" />
-              </p>
-              <p v-if="index == 7" class="texttitle">
-                <span class="opint"></span>本周工作重点<span class="colorRed">(必填)</span>
-              </p>
-              <div v-if="index == 7" style="padding: 10px 0" class="contentContainer">
-                <van-field
-                  v-model="item.weekContentSummary"
-                  rows="4"
-                  autosize
-                  maxlength="800"
-                  show-word-limit
-                  type="textarea" />
+                <p v-if="index == 7" class="texttitle">
+                  <span class="opint"></span>本周工作重点<span class="colorRed">(必填)</span>
+                </p>
+                <div v-if="index == 7" style="padding: 10px 0" class="contentContainer">
+                  <van-field
+                    v-model="item.weekContentSummary"
+                    rows="4"
+                    autosize
+                    maxlength="800"
+                    show-word-limit
+                    type="textarea" />
+                </div>
               </div>
             </div>
-          </div>
-        </van-collapse-item>
+          </van-collapse-item>
+        </template>
       </van-collapse>
       <br />
       <br />
@@ -192,6 +200,7 @@ import cizhuanjiaoSAP from '@/views/componentsTarget/cizhuanjiaoSAP';
 import neiqiangzhonggaoduanSAP from '@/views/componentsTarget/neiqiangzhonggaoduanSAP';
 import moshouqiSAP from '@/views/componentsTarget/moshouqiSAP';
 import fangshuiSAP from '@/views/componentsTarget/fangshuiSAP';
+import reportCustom from './reportCustom';
 export default {
   name: 'home',
   components: {
@@ -206,6 +215,7 @@ export default {
     neiqiangzhonggaoduanSAP,
     moshouqiSAP,
     fangshuiSAP,
+    reportCustom,
   },
   data() {
     return {
@@ -288,7 +298,7 @@ export default {
           var dayTime = res.data.date;
           this.type = res.data.userType;
           this.timeList = this.parseTimeParagraph(
-            dayTime.slice(0, 4) + '-' + dayTime.slice(4, 6) + '-' + dayTime.slice(6, 8)
+            dayTime.slice(0, 4) + '-' + dayTime.slice(4, 6) + '-' + dayTime.slice(6, 8),
           );
           if (res.data.status != '0' && res.data.status != '2') {
             this.$dialog
@@ -394,115 +404,199 @@ export default {
       });
     },
     tsContentsFn() {
-      let loading1 = this.$toast.loading({
-        duration: 0,
-        message: '数据提交中...',
-        forbidClick: true,
-      });
       if (this.isclick) {
-        this.reportTarget.reportContents = [];
-        this.reportTarget.reportContents = this.reportContentsList2
-          .concat(this.reportContentsList1)
-          .concat(this.reportContentsList3);
-        this.reportTarget.status = '1';
-        console.log(this.reportContentsList1);
-        console.log(this.reportContentsList2);
-        console.log(this.reportContentsList3);
-        console.log(this.reportTarget.reportContents);
-        this.isclick = false;
-        tsContents(this.reportTarget).then((res) => {
-          loading1.clear();
-          this.isclick = true;
-          if (res.code == 200) {
-            this.$dialog
-              .alert({
-                title: '系统提示',
-                message: '暂存成功',
-              })
-              .then(() => {
-                // if(this.$route.query.reportId!=undefined){
-                //   window.location.replace(window.location.origin+"/mobile/myHistoricalDaily")
-                // }else{
-                //   window.location.replace(window.location.origin+"/mobile/home")
-                // }
-              });
+        if (this.reportTarget.isHistory == '1') {
+          this.reportTarget.reportContents = [];
+          this.reportTarget.reportContents = this.reportContentsList2
+            .concat(this.reportContentsList1)
+            .concat(this.reportContentsList3);
+          console.log(this.reportContentsList1);
+          console.log(this.reportContentsList2);
+          console.log(this.reportContentsList3);
+          console.log(this.reportTarget.reportContents);
+          this.tsContentsFun(null);
+        } else {
+          // 新的
+          if (this.reportTarget.customTaskList && this.reportTarget.customTaskList.length) {
+            // 配置任务
+            this.filterReportCustomData((reportCustomAnswers) => {
+              this.tsContentsFun(reportCustomAnswers);
+            });
           } else {
-            this.$toast.fail(res.msg);
+            // 没有配置任务
+            this.tsContentsFun(null);
           }
-        });
+        }
       }
     },
-    // 提交日报
-    submint() {
+    tsContentsFun(reportCustomAnswers) {
       let loading1 = this.$toast.loading({
         duration: 0,
         message: '数据提交中...',
         forbidClick: true,
       });
-      if (this.isclick) {
-        this.reportTarget.reportContents = [];
-        for (var j = 0; j < 5; j++) {
+      if (reportCustomAnswers) this.reportTarget.reportCustomAnswers = reportCustomAnswers;
+      this.reportTarget.status = '1';
+      this.isclick = false;
+      tsContents(this.reportTarget).then((res) => {
+        loading1.clear();
+        this.isclick = true;
+        if (res.code == 200) {
+          this.$dialog
+            .alert({
+              title: '系统提示',
+              message: '暂存成功',
+            })
+            .then(() => {
+              // if(this.$route.query.reportId!=undefined){
+              //   window.location.replace(window.location.origin+"/mobile/myHistoricalDaily")
+              // }else{
+              //   window.location.replace(window.location.origin+"/mobile/home")
+              // }
+            });
+        } else {
+          this.$toast.fail(res.msg);
+        }
+      });
+    },
+    reportCustomTabstoreVal(callback) {
+      // 必填校验
+      this.$refs.reportCustom.$refs.tabstoreVal
+        .validate()
+        .then(() => {
+          // 验证通过
+          this.filterReportCustomData(callback);
+        })
+        .catch((errors) => {
+          this.toastLoading().clear();
+          return;
+        });
+    },
+    filterReportCustomData(callback) {
+      let reportCustomData = this.$refs.reportCustom ? this.$refs.reportCustom.fromData : {} || {};
+      let reportCustomAnswers = [];
+      for (let i = 0; i < reportCustomData.length; i++) {
+        let customData = reportCustomData[i].sfaReportCustomCollections
+          ? reportCustomData[i].sfaReportCustomCollections
+          : [];
+        for (let x = 0; x < customData.length; x++) {
           if (
-            this.reportContentsList1[j].weekContentAm.trim() == '' ||
-            this.reportContentsList1[j].weekContentPm.trim() == ''
+            customData[x].reportCustomCollectionType == 'dx' ||
+            customData[x].reportCustomCollectionType == 'duox'
           ) {
-            this.$toast('请完善本周规划内容!');
-            return false;
+            let optionData = customData[x].sfaReportCustomOptions;
+            for (let y = 0; y < optionData.length; y++) {
+              if (optionData[y].answerValue == 'Y') {
+                reportCustomAnswers.push({
+                  reportCustomTaskId: customData[x].reportCustomTaskId,
+                  reportCustomCollectionId: optionData[y].reportCustomCollectionId,
+                  reportCustomOptionId: optionData[y].reportCustomOptionId,
+                  answerValue: 'Y',
+                });
+              }
+            }
+          } else {
+            if (customData[x].answerValue)
+              reportCustomAnswers.push({
+                reportCustomTaskId: customData[x].reportCustomTaskId,
+                reportCustomCollectionId: customData[x].reportCustomCollectionId,
+                answerValue: customData[x].answerValue,
+              });
           }
         }
-        for (var x = 0; x < 5; x++) {
-          if (
-            this.reportContentsList2[x].weekContentAm.trim() == '' ||
-            this.reportContentsList2[x].weekContentPm.trim() == ''
-          ) {
-            this.$toast('请完善上周周报内容!');
+      }
+      console.log(reportCustomAnswers);
+      callback && callback(reportCustomAnswers);
+    },
+    // 提交日报
+    submint() {
+      if (this.isclick) {
+        // 旧的
+        if (this.reportTarget.isHistory == '1') {
+          this.reportTarget.reportContents = [];
+          for (var j = 0; j < 5; j++) {
+            if (
+              this.reportContentsList1[j].weekContentAm.trim() == '' ||
+              this.reportContentsList1[j].weekContentPm.trim() == ''
+            ) {
+              this.$toast('请完善本周规划内容!');
+              return false;
+            }
+          }
+          for (var x = 0; x < 5; x++) {
+            if (
+              this.reportContentsList2[x].weekContentAm.trim() == '' ||
+              this.reportContentsList2[x].weekContentPm.trim() == ''
+            ) {
+              this.$toast('请完善上周周报内容!');
+              return false;
+            }
+          }
+          if (this.reportContentsList2[7].weekContentSummary.trim() == '') {
+            this.$toast('请完善上周工作成果!');
             return false;
           }
-        }
-        if (this.reportContentsList2[7].weekContentSummary.trim() == '') {
-          this.$toast('请完善上周工作成果!');
-          return false;
-        }
-        if (this.reportContentsList1[7].weekContentSummary.trim() == '') {
-          this.$toast('请完善本周工作重点!');
-          return false;
-        }
-        if (this.reportContentsList1[7].weekContentSummary.length > 800) {
-          this.$toast('上周工作重点超过800字');
-          return false;
-        }
-        if (this.reportContentsList2[7].weekContentSummary.length > 800) {
-          this.$toast('上周工作成果超过800字!');
-          return false;
-        }
-        this.reportTarget.reportContents = this.reportContentsList2
-          .concat(this.reportContentsList1)
-          .concat(this.reportTarget.reportContents);
-        this.reportTarget.status = '1';
-        this.isclick = false;
-        updateReport(this.reportTarget).then((res) => {
-          loading1.clear();
-          this.isclick = true;
-          if (res.code == 200) {
-            this.$dialog
-              .alert({
-                title: '系统提示',
-                message: '提交成功',
-              })
-              .then(() => {
-                if (this.$route.query.reportId != undefined) {
-                  window.location.replace(window.location.origin + '/mobile/myHistoricalDaily');
-                } else {
-                  this.onClickLeft();
-                  // window.location.replace(window.location.origin + '/mobile/home');
-                }
-              });
+          if (this.reportContentsList1[7].weekContentSummary.trim() == '') {
+            this.$toast('请完善本周工作重点!');
+            return false;
+          }
+          if (this.reportContentsList1[7].weekContentSummary.length > 800) {
+            this.$toast('上周工作重点超过800字');
+            return false;
+          }
+          if (this.reportContentsList2[7].weekContentSummary.length > 800) {
+            this.$toast('上周工作成果超过800字!');
+            return false;
+          }
+          this.reportTarget.reportContents = this.reportContentsList2
+            .concat(this.reportContentsList1)
+            .concat(this.reportTarget.reportContents);
+          this.submintFun();
+        } else {
+          // 新的
+          if (this.reportTarget.customTaskList && this.reportTarget.customTaskList.length) {
+            // 配置任务
+            this.reportCustomTabstoreVal((reportCustomAnswers) => {
+              this.submintFun(reportCustomAnswers);
+            });
           } else {
-            this.$toast.fail(res.msg);
+            // 没有配置任务
+            this.submintFun(null);
           }
-        });
+        }
       }
     },
+    submintFun(reportCustomAnswers) {
+      let loading1 = this.$toast.loading({
+        duration: 0,
+        message: '数据提交中...',
+        forbidClick: true,
+      });
+      if (reportCustomAnswers) this.reportTarget.reportCustomAnswers = reportCustomAnswers;
+      this.reportTarget.status = '1';
+      this.isclick = false;
+      updateReport(this.reportTarget).then((res) => {
+        loading1.clear();
+        this.isclick = true;
+        if (res.code == 200) {
+          this.$dialog
+            .alert({
+              title: '系统提示',
+              message: '提交成功',
+            })
+            .then(() => {
+              if (this.$route.query.reportId != undefined) {
+                window.location.replace(window.location.origin + '/mobile/myHistoricalDaily');
+              } else {
+                this.onClickLeft();
+                // window.location.replace(window.location.origin + '/mobile/home');
+              }
+            });
+        } else {
+          this.$toast.fail(res.msg);
+        }
+      });
+    },
     getReportInfo() {
       let loading1 = this.$toast.loading({
         duration: 0,
@@ -517,7 +611,7 @@ export default {
         var dayTime = res.data.date;
         this.YFQuota = res.data.postType == 'YF' ? true : false;
         this.timeList = this.parseTimeParagraph(
-          dayTime.slice(0, 4) + '-' + dayTime.slice(4, 6) + '-' + dayTime.slice(6, 8)
+          dayTime.slice(0, 4) + '-' + dayTime.slice(4, 6) + '-' + dayTime.slice(6, 8),
         );
         this.powerGrade = res.data.positionId;
         this.showButton = res.data.showButton;

+ 77 - 62
src/views/week/weeklyApproval.vue

@@ -58,74 +58,87 @@
             <veryGoodPlaceOrder :reportTargetAll="reportTargetAll"></veryGoodPlaceOrder>
           </van-collapse-item>
         </template>
-        <van-collapse-item title="上周工作成果" name="8">
-          <div style="margin-top: -10px">
-            <div v-for="(item2, index2) in reportContentsList2" :key="index2">
-              <div v-if="index2 < 7">
-                <p class="texttitle">
+        <div class="contentContainer" v-if="reportTarget.isHistory == '0'">
+          <!-- isHistory 是否为历史汇报:0-新汇报 1-历史汇报 -->
+          <reportCustom
+            ref="reportCustom"
+            :disabled="true"
+            :reportCustomData="reportTarget.customTaskList"></reportCustom>
+        </div>
+        <template v-else>
+          <van-collapse-item title="上周工作成果" name="8">
+            <div style="margin-top: -10px">
+              <div v-for="(item2, index2) in reportContentsList2" :key="index2">
+                <div v-if="index2 < 7">
+                  <p class="texttitle">
+                    <span class="opint"></span
+                    ><span v-if="!reportTarget.hideWeekDate">{{
+                      weeklyTimeDivision(item2.contentTime, 0)
+                    }}</span
+                    ><span>{{ weeklyTimeDivision(item2.contentTime, 1) }}</span>
+                  </p>
+                  <p>
+                    <span class="colorbalck">上午:</span
+                    >{{ reportContentsList1[index2].weekContentAm }}
+                  </p>
+                  <p>
+                    <span class="colorbalck">下午:</span
+                    >{{ reportContentsList1[index2].weekContentPm }}
+                  </p>
+                  <p class="texttitle texttitle2">实际工作进度</p>
+                  <p><span class="colorbalck">上午:</span>{{ item2.weekContentAm }}</p>
+                  <p><span class="colorbalck">下午:</span>{{ item2.weekContentPm }}</p>
+                </div>
+                <p v-if="index2 == 7" class="texttitle"><span class="opint"></span>上周工作重点</p>
+                <div v-if="index2 == 7" style="padding: 10px 0" class="contentContainer">
+                  <van-field
+                    v-model="reportContentsList1[index2].weekContentSummary"
+                    rows="4"
+                    autosize
+                    readonly
+                    type="textarea" />
+                </div>
+                <p v-if="index2 == 7" class="texttitle"><span class="opint"></span>上周工作成果</p>
+                <div v-if="index2 == 7" style="padding: 10px 0" class="contentContainer">
+                  <van-field
+                    v-model="item2.weekContentSummary"
+                    rows="4"
+                    autosize
+                    readonly
+                    type="textarea" />
+                </div>
+              </div>
+            </div>
+          </van-collapse-item>
+          <van-collapse-item title="本周工作规划" name="9">
+            <div style="margin-top: -10px">
+              <div v-for="(item, index) in reportContentsList3" :key="index">
+                <p v-if="index < 7" class="texttitle">
                   <span class="opint"></span
                   ><span v-if="!reportTarget.hideWeekDate">{{
-                    weeklyTimeDivision(item2.contentTime, 0)
+                    weeklyTimeDivision(item.contentTime, 0)
                   }}</span
-                  ><span>{{ weeklyTimeDivision(item2.contentTime, 1) }}</span>
+                  ><span>{{ weeklyTimeDivision(item.contentTime, 1) }}</span>
                 </p>
-                <p>
-                  <span class="colorbalck">上午:</span
-                  >{{ reportContentsList1[index2].weekContentAm }}
+                <p v-if="index < 7">
+                  <span class="colorbalck">上午:</span>{{ item.weekContentAm }}
                 </p>
-                <p>
-                  <span class="colorbalck">下午:</span
-                  >{{ reportContentsList1[index2].weekContentPm }}
+                <p v-if="index < 7">
+                  <span class="colorbalck">下午:</span>{{ item.weekContentPm }}
                 </p>
-                <p class="texttitle texttitle2">实际工作进度</p>
-                <p><span class="colorbalck">上午:</span>{{ item2.weekContentAm }}</p>
-                <p><span class="colorbalck">下午:</span>{{ item2.weekContentPm }}</p>
-              </div>
-              <p v-if="index2 == 7" class="texttitle"><span class="opint"></span>上周工作重点</p>
-              <div v-if="index2 == 7" style="padding: 10px 0" class="contentContainer">
-                <van-field
-                  v-model="reportContentsList1[index2].weekContentSummary"
-                  rows="4"
-                  autosize
-                  readonly
-                  type="textarea" />
-              </div>
-              <p v-if="index2 == 7" class="texttitle"><span class="opint"></span>上周工作成果</p>
-              <div v-if="index2 == 7" style="padding: 10px 0" class="contentContainer">
-                <van-field
-                  v-model="item2.weekContentSummary"
-                  rows="4"
-                  autosize
-                  readonly
-                  type="textarea" />
-              </div>
-            </div>
-          </div>
-        </van-collapse-item>
-        <van-collapse-item title="本周工作规划" name="9">
-          <div style="margin-top: -10px">
-            <div v-for="(item, index) in reportContentsList3" :key="index">
-              <p v-if="index < 7" class="texttitle">
-                <span class="opint"></span
-                ><span v-if="!reportTarget.hideWeekDate">{{
-                  weeklyTimeDivision(item.contentTime, 0)
-                }}</span
-                ><span>{{ weeklyTimeDivision(item.contentTime, 1) }}</span>
-              </p>
-              <p v-if="index < 7"><span class="colorbalck">上午:</span>{{ item.weekContentAm }}</p>
-              <p v-if="index < 7"><span class="colorbalck">下午:</span>{{ item.weekContentPm }}</p>
-              <p v-if="index == 7" class="texttitle"><span class="opint"></span>本周工作重点</p>
-              <div v-if="index == 7" style="padding: 10px 0" class="contentContainer">
-                <van-field
-                  v-model="item.weekContentSummary"
-                  rows="4"
-                  autosize
-                  readonly
-                  type="textarea" />
+                <p v-if="index == 7" class="texttitle"><span class="opint"></span>本周工作重点</p>
+                <div v-if="index == 7" style="padding: 10px 0" class="contentContainer">
+                  <van-field
+                    v-model="item.weekContentSummary"
+                    rows="4"
+                    autosize
+                    readonly
+                    type="textarea" />
+                </div>
               </div>
             </div>
-          </div>
-        </van-collapse-item>
+          </van-collapse-item>
+        </template>
       </van-collapse>
       <div class="contentContainer">
         <p class="contentContainerTitle">打分 <span>请点亮小星星,一颗小星星代表1分</span></p>
@@ -185,6 +198,7 @@ import cizhuanjiaoSAP from '@/views/componentsTarget/cizhuanjiaoSAP';
 import neiqiangzhonggaoduanSAP from '@/views/componentsTarget/neiqiangzhonggaoduanSAP';
 import moshouqiSAP from '@/views/componentsTarget/moshouqiSAP';
 import fangshuiSAP from '@/views/componentsTarget/fangshuiSAP';
+import reportCustom from './reportCustom';
 export default {
   name: 'weeklyApproval',
   components: {
@@ -199,6 +213,7 @@ export default {
     neiqiangzhonggaoduanSAP,
     moshouqiSAP,
     fangshuiSAP,
+    reportCustom,
   },
   data() {
     return {
@@ -264,7 +279,7 @@ export default {
     formatter(value) {
       return value.replace(
         /[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi,
-        ''
+        '',
       );
     },
     reject() {
@@ -361,7 +376,7 @@ export default {
           var dayTime = res.data.date;
           this.type = res.data.userType;
           this.timeList = this.parseTimeParagraph(
-            dayTime.slice(0, 4) + '-' + dayTime.slice(4, 6) + '-' + dayTime.slice(6, 8)
+            dayTime.slice(0, 4) + '-' + dayTime.slice(4, 6) + '-' + dayTime.slice(6, 8),
           );
           if (res.data.status != '1') {
             this.$dialog

+ 76 - 61
src/views/week/weeklyApprovalDetils.vue

@@ -58,74 +58,87 @@
             <veryGoodPlaceOrder :reportTargetAll="reportTargetAll"></veryGoodPlaceOrder>
           </van-collapse-item>
         </template>
-        <van-collapse-item title="上周工作成果" name="8">
-          <div style="margin-top: -10px">
-            <div v-for="(item2, index2) in reportContentsList2" :key="index2">
-              <div v-if="index2 < 7">
-                <p class="texttitle">
+        <div class="contentContainer" v-if="reportTarget.isHistory == '0'">
+          <!-- isHistory 是否为历史汇报:0-新汇报 1-历史汇报 -->
+          <reportCustom
+            ref="reportCustom"
+            :disabled="true"
+            :reportCustomData="reportTarget.customTaskList"></reportCustom>
+        </div>
+        <template v-else>
+          <van-collapse-item title="上周工作成果" name="8">
+            <div style="margin-top: -10px">
+              <div v-for="(item2, index2) in reportContentsList2" :key="index2">
+                <div v-if="index2 < 7">
+                  <p class="texttitle">
+                    <span class="opint"></span
+                    ><span v-if="!reportTarget.hideWeekDate">{{
+                      weeklyTimeDivision(item2.contentTime, 0)
+                    }}</span
+                    ><span>{{ weeklyTimeDivision(item2.contentTime, 1) }}</span>
+                  </p>
+                  <p>
+                    <span class="colorbalck">上午:</span
+                    >{{ reportContentsList1[index2].weekContentAm }}
+                  </p>
+                  <p>
+                    <span class="colorbalck">下午:</span
+                    >{{ reportContentsList1[index2].weekContentPm }}
+                  </p>
+                  <p class="texttitle texttitle2">实际工作进度</p>
+                  <p><span class="colorbalck">上午:</span>{{ item2.weekContentAm }}</p>
+                  <p><span class="colorbalck">下午:</span>{{ item2.weekContentPm }}</p>
+                </div>
+                <p v-if="index2 == 7" class="texttitle"><span class="opint"></span>上周工作重点</p>
+                <div v-if="index2 == 7" style="padding: 10px 0" class="contentContainer">
+                  <van-field
+                    v-model="reportContentsList1[index2].weekContentSummary"
+                    rows="4"
+                    autosize
+                    readonly
+                    type="textarea" />
+                </div>
+                <p v-if="index2 == 7" class="texttitle"><span class="opint"></span>上周工作成果</p>
+                <div v-if="index2 == 7" style="padding: 10px 0" class="contentContainer">
+                  <van-field
+                    v-model="item2.weekContentSummary"
+                    rows="4"
+                    autosize
+                    readonly
+                    type="textarea" />
+                </div>
+              </div>
+            </div>
+          </van-collapse-item>
+          <van-collapse-item title="本周工作规划" name="9">
+            <div style="margin-top: -10px">
+              <div v-for="(item, index) in reportContentsList3" :key="index">
+                <p v-if="index < 7" class="texttitle">
                   <span class="opint"></span
                   ><span v-if="!reportTarget.hideWeekDate">{{
-                    weeklyTimeDivision(item2.contentTime, 0)
+                    weeklyTimeDivision(item.contentTime, 0)
                   }}</span
-                  ><span>{{ weeklyTimeDivision(item2.contentTime, 1) }}</span>
+                  ><span>{{ weeklyTimeDivision(item.contentTime, 1) }}</span>
                 </p>
-                <p>
-                  <span class="colorbalck">上午:</span
-                  >{{ reportContentsList1[index2].weekContentAm }}
+                <p v-if="index < 7">
+                  <span class="colorbalck">上午:</span>{{ item.weekContentAm }}
                 </p>
-                <p>
-                  <span class="colorbalck">下午:</span
-                  >{{ reportContentsList1[index2].weekContentPm }}
+                <p v-if="index < 7">
+                  <span class="colorbalck">下午:</span>{{ item.weekContentPm }}
                 </p>
-                <p class="texttitle texttitle2">实际工作进度</p>
-                <p><span class="colorbalck">上午:</span>{{ item2.weekContentAm }}</p>
-                <p><span class="colorbalck">下午:</span>{{ item2.weekContentPm }}</p>
-              </div>
-              <p v-if="index2 == 7" class="texttitle"><span class="opint"></span>上周工作重点</p>
-              <div v-if="index2 == 7" style="padding: 10px 0" class="contentContainer">
-                <van-field
-                  v-model="reportContentsList1[index2].weekContentSummary"
-                  rows="4"
-                  autosize
-                  readonly
-                  type="textarea" />
-              </div>
-              <p v-if="index2 == 7" class="texttitle"><span class="opint"></span>上周工作成果</p>
-              <div v-if="index2 == 7" style="padding: 10px 0" class="contentContainer">
-                <van-field
-                  v-model="item2.weekContentSummary"
-                  rows="4"
-                  autosize
-                  readonly
-                  type="textarea" />
-              </div>
-            </div>
-          </div>
-        </van-collapse-item>
-        <van-collapse-item title="本周工作规划" name="9">
-          <div style="margin-top: -10px">
-            <div v-for="(item, index) in reportContentsList3" :key="index">
-              <p v-if="index < 7" class="texttitle">
-                <span class="opint"></span
-                ><span v-if="!reportTarget.hideWeekDate">{{
-                  weeklyTimeDivision(item.contentTime, 0)
-                }}</span
-                ><span>{{ weeklyTimeDivision(item.contentTime, 1) }}</span>
-              </p>
-              <p v-if="index < 7"><span class="colorbalck">上午:</span>{{ item.weekContentAm }}</p>
-              <p v-if="index < 7"><span class="colorbalck">下午:</span>{{ item.weekContentPm }}</p>
-              <p v-if="index == 7" class="texttitle"><span class="opint"></span>本周工作重点</p>
-              <div v-if="index == 7" style="padding: 10px 0" class="contentContainer">
-                <van-field
-                  v-model="item.weekContentSummary"
-                  rows="4"
-                  autosize
-                  readonly
-                  type="textarea" />
+                <p v-if="index == 7" class="texttitle"><span class="opint"></span>本周工作重点</p>
+                <div v-if="index == 7" style="padding: 10px 0" class="contentContainer">
+                  <van-field
+                    v-model="item.weekContentSummary"
+                    rows="4"
+                    autosize
+                    readonly
+                    type="textarea" />
+                </div>
               </div>
             </div>
-          </div>
-        </van-collapse-item>
+          </van-collapse-item>
+        </template>
         <div
           class="contentContainer"
           v-if="reportTarget.status > 1 || reportTarget.reportRemarks != null">
@@ -199,6 +212,7 @@ import cizhuanjiaoSAP from '@/views/componentsTarget/cizhuanjiaoSAP';
 import neiqiangzhonggaoduanSAP from '@/views/componentsTarget/neiqiangzhonggaoduanSAP';
 import moshouqiSAP from '@/views/componentsTarget/moshouqiSAP';
 import fangshuiSAP from '@/views/componentsTarget/fangshuiSAP';
+import reportCustom from './reportCustom';
 
 export default {
   name: 'home',
@@ -214,6 +228,7 @@ export default {
     neiqiangzhonggaoduanSAP,
     moshouqiSAP,
     fangshuiSAP,
+    reportCustom,
   },
   data() {
     return {
@@ -303,7 +318,7 @@ export default {
           this.type = res.data.userType;
           this.ptitle = res.data.pdeptName + '-' + res.data.ppostName + '-' + res.data.pnickName;
           this.timeList = this.parseTimeParagraph(
-            dayTime.slice(0, 4) + '-' + dayTime.slice(4, 6) + '-' + dayTime.slice(6, 8)
+            dayTime.slice(0, 4) + '-' + dayTime.slice(4, 6) + '-' + dayTime.slice(6, 8),
           );
           this.reportTargetAll = res.data.reportTargetAll;
           this.reportTarget = res.data;

+ 77 - 62
src/views/week/weeklyHistoricalDetils.vue

@@ -59,74 +59,87 @@
             <veryGoodPlaceOrder :reportTargetAll="reportTargetAll"></veryGoodPlaceOrder>
           </van-collapse-item>
         </template>
-        <van-collapse-item title="上周工作成果" name="8">
-          <div style="margin-top: -10px">
-            <div v-for="(item2, index2) in reportContentsList2" :key="index2">
-              <div v-if="index2 < 7">
-                <p class="texttitle">
+        <div class="contentContainer" v-if="reportTarget.isHistory == '0'">
+          <!-- isHistory 是否为历史汇报:0-新汇报 1-历史汇报 -->
+          <reportCustom
+            ref="reportCustom"
+            :disabled="true"
+            :reportCustomData="reportTarget.customTaskList"></reportCustom>
+        </div>
+        <template v-else>
+          <van-collapse-item title="上周工作成果" name="8">
+            <div style="margin-top: -10px">
+              <div v-for="(item2, index2) in reportContentsList2" :key="index2">
+                <div v-if="index2 < 7">
+                  <p class="texttitle">
+                    <span class="opint"></span
+                    ><span v-if="!reportTarget.hideWeekDate">{{
+                      weeklyTimeDivision(item2.contentTime, 0)
+                    }}</span
+                    ><span>{{ weeklyTimeDivision(item2.contentTime, 1) }}</span>
+                  </p>
+                  <p>
+                    <span class="colorbalck">上午:</span
+                    >{{ reportContentsList1[index2].weekContentAm }}
+                  </p>
+                  <p>
+                    <span class="colorbalck">下午:</span
+                    >{{ reportContentsList1[index2].weekContentPm }}
+                  </p>
+                  <p class="texttitle texttitle2">实际工作进度</p>
+                  <p><span class="colorbalck">上午:</span>{{ item2.weekContentAm }}</p>
+                  <p><span class="colorbalck">下午:</span>{{ item2.weekContentPm }}</p>
+                </div>
+                <p v-if="index2 == 7" class="texttitle"><span class="opint"></span>上周工作重点</p>
+                <div v-if="index2 == 7" style="padding: 10px 0" class="contentContainer">
+                  <van-field
+                    v-model="reportContentsList1[index2].weekContentSummary"
+                    rows="4"
+                    autosize
+                    readonly
+                    type="textarea" />
+                </div>
+                <p v-if="index2 == 7" class="texttitle"><span class="opint"></span>上周工作成果</p>
+                <div v-if="index2 == 7" style="padding: 10px 0" class="contentContainer">
+                  <van-field
+                    v-model="item2.weekContentSummary"
+                    rows="4"
+                    autosize
+                    readonly
+                    type="textarea" />
+                </div>
+              </div>
+            </div>
+          </van-collapse-item>
+          <van-collapse-item title="本周工作规划" name="9">
+            <div style="margin-top: -10px">
+              <div v-for="(item, index) in reportContentsList3" :key="index">
+                <p v-if="index < 7" class="texttitle">
                   <span class="opint"></span
                   ><span v-if="!reportTarget.hideWeekDate">{{
-                    weeklyTimeDivision(item2.contentTime, 0)
+                    weeklyTimeDivision(item.contentTime, 0)
                   }}</span
-                  ><span>{{ weeklyTimeDivision(item2.contentTime, 1) }}</span>
+                  ><span>{{ weeklyTimeDivision(item.contentTime, 1) }}</span>
                 </p>
-                <p>
-                  <span class="colorbalck">上午:</span
-                  >{{ reportContentsList1[index2].weekContentAm }}
+                <p v-if="index < 7">
+                  <span class="colorbalck">上午:</span>{{ item.weekContentAm }}
                 </p>
-                <p>
-                  <span class="colorbalck">下午:</span
-                  >{{ reportContentsList1[index2].weekContentPm }}
+                <p v-if="index < 7">
+                  <span class="colorbalck">下午:</span>{{ item.weekContentPm }}
                 </p>
-                <p class="texttitle texttitle2">实际工作进度</p>
-                <p><span class="colorbalck">上午:</span>{{ item2.weekContentAm }}</p>
-                <p><span class="colorbalck">下午:</span>{{ item2.weekContentPm }}</p>
-              </div>
-              <p v-if="index2 == 7" class="texttitle"><span class="opint"></span>上周工作重点</p>
-              <div v-if="index2 == 7" style="padding: 10px 0" class="contentContainer">
-                <van-field
-                  v-model="reportContentsList1[index2].weekContentSummary"
-                  rows="4"
-                  autosize
-                  readonly
-                  type="textarea" />
-              </div>
-              <p v-if="index2 == 7" class="texttitle"><span class="opint"></span>上周工作成果</p>
-              <div v-if="index2 == 7" style="padding: 10px 0" class="contentContainer">
-                <van-field
-                  v-model="item2.weekContentSummary"
-                  rows="4"
-                  autosize
-                  readonly
-                  type="textarea" />
+                <p v-if="index == 7" class="texttitle"><span class="opint"></span>本周工作重点</p>
+                <div v-if="index == 7" style="padding: 10px 0" class="contentContainer">
+                  <van-field
+                    v-model="item.weekContentSummary"
+                    rows="4"
+                    autosize
+                    readonly
+                    type="textarea" />
+                </div>
               </div>
             </div>
-          </div>
-        </van-collapse-item>
-        <van-collapse-item title="本周工作规划" name="9">
-          <div style="margin-top: -10px">
-            <div v-for="(item, index) in reportContentsList3" :key="index">
-              <p v-if="index < 7" class="texttitle">
-                <span class="opint"></span
-                ><span v-if="!reportTarget.hideWeekDate">{{
-                  weeklyTimeDivision(item.contentTime, 0)
-                }}</span
-                ><span>{{ weeklyTimeDivision(item.contentTime, 1) }}</span>
-              </p>
-              <p v-if="index < 7"><span class="colorbalck">上午:</span>{{ item.weekContentAm }}</p>
-              <p v-if="index < 7"><span class="colorbalck">下午:</span>{{ item.weekContentPm }}</p>
-              <p v-if="index == 7" class="texttitle"><span class="opint"></span>本周工作重点</p>
-              <div v-if="index == 7" style="padding: 10px 0" class="contentContainer">
-                <van-field
-                  v-model="item.weekContentSummary"
-                  rows="4"
-                  autosize
-                  readonly
-                  type="textarea" />
-              </div>
-            </div>
-          </div>
-        </van-collapse-item>
+          </van-collapse-item>
+        </template>
       </van-collapse>
       <div
         class="contentContainer"
@@ -211,6 +224,7 @@ import cizhuanjiaoSAP from '@/views/componentsTarget/cizhuanjiaoSAP';
 import neiqiangzhonggaoduanSAP from '@/views/componentsTarget/neiqiangzhonggaoduanSAP';
 import moshouqiSAP from '@/views/componentsTarget/moshouqiSAP';
 import fangshuiSAP from '@/views/componentsTarget/fangshuiSAP';
+import reportCustom from './reportCustom';
 export default {
   name: 'home',
   components: {
@@ -225,6 +239,7 @@ export default {
     neiqiangzhonggaoduanSAP,
     moshouqiSAP,
     fangshuiSAP,
+    reportCustom,
   },
   data() {
     return {
@@ -345,7 +360,7 @@ export default {
     formatter(value) {
       return value.replace(
         /[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi,
-        ''
+        '',
       );
     },
     submint() {
@@ -408,7 +423,7 @@ export default {
             res.data.deptName + '-' + res.data.postName + '-' + res.data.nickName + '的周报';
           this.ptitle = res.data.pdeptName + '-' + res.data.ppostName + '-' + res.data.pnickName;
           this.timeList = this.parseTimeParagraph(
-            dayTime.slice(0, 4) + '-' + dayTime.slice(4, 6) + '-' + dayTime.slice(6, 8)
+            dayTime.slice(0, 4) + '-' + dayTime.slice(4, 6) + '-' + dayTime.slice(6, 8),
           );
           this.reportTargetAll = res.data.reportTargetAll;
           this.reportTarget = res.data;