Bläddra i källkod

Merge branch 'feature_20251117_日报填写内容自定义配置' into release

zhujindu 1 dag sedan
förälder
incheckning
71e05b1353

+ 113 - 0
src/components/componentZCheckbox.vue

@@ -0,0 +1,113 @@
+<template>
+  <div class="zSelect">
+    <div>
+      <div class="checkbox">
+        <van-checkbox-group v-model="zSelectValuec" @change="checkboxclick">
+          <van-checkbox
+            :disabled="disabled"
+            :name="item[id] + ''"
+            v-for="(item, index) in zCheckboxcolumns"
+            :key="index"
+            shape="square"
+            >{{ item.customOption }}
+          </van-checkbox>
+        </van-checkbox-group>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'zSelect',
+  props: {
+    zCheckboxcolumns: [],
+    textc: '',
+    rules: false,
+    answerType: '',
+    collectionType: '',
+    disabled: false,
+    id: '',
+  },
+  data() {
+    return {
+      zSelect: false,
+      zSelectValuec: [],
+    };
+  },
+  watch: {
+    zCheckboxcolumns: {
+      // 返显
+      handler(val) {
+        this.zSelectValuec = [];
+        for (let i = 0; i < val.length; i++) {
+          if (val[i].answerValue == 'Y') {
+            this.zSelectValuec.push(String(val[i][this.id]));
+          }
+        }
+      },
+      immediate: true,
+    },
+  },
+  activated() {
+    // this.checkboxvalFn();
+  },
+  methods: {
+    checkboxvalFn() {
+      if (this.checkboxval == '' || this.checkboxval == undefined) {
+        this.zSelectValuec = [];
+      } else {
+        this.zSelectValuec = this.checkboxval.split(',');
+      }
+    },
+    checkboxclick(value) {
+      var typeval = [...this.zCheckboxcolumns];
+      typeval.forEach((item) => {
+        if (value.includes(item[this.id] + '')) {
+          item.answerValue = 'Y';
+        } else {
+          item.answerValue = 'N';
+        }
+      });
+      let datalist = {
+        id: this.textc,
+        answerValue: typeval,
+      };
+      this.zSelectValuec = value;
+      this.$emit('zSelectVal', datalist);
+      this.zSelect = false;
+    },
+  },
+};
+</script>
+
+<style scoped>
+.van-f-red {
+  color: red;
+  width: 4px;
+  display: inline-block;
+}
+
+.zSelect .z-cell {
+  padding: 10px 16px 0 16px;
+  font-size: 16px;
+}
+
+/*.checkbox{padding: 10px 16px 0 16px;background-color: white;}*/
+.checkbox .van-checkbox {
+  padding-bottom: 10px;
+}
+</style>
+<style lang="scss">
+.zSelect {
+  .checkbox .van-checkbox__icon .van-icon {
+    border: 1px solid #333 !important;
+  }
+
+  .checkbox .van-checkbox__icon--checked .van-icon {
+    border: 1px solid #1989fa !important;
+    color: #1989fa;
+    background-color: #fff;
+  }
+}
+</style>

+ 117 - 0
src/components/componentZRadio.vue

@@ -0,0 +1,117 @@
+<template>
+  <div class="zSelect">
+    <div class="checkbox">
+      <van-radio-group v-model="zradioc" @change="radiofn" :disabled="disabled">
+        <van-radio
+          :name="item[id] + ''"
+          @click="radioclick"
+          v-for="(item, index) in zRadiocolumns"
+          :key="index"
+          >{{ item.customOption }}</van-radio
+        >
+      </van-radio-group>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'zSelect',
+  props: {
+    textc: '',
+    zRadiocolumns: [],
+    answerType: '',
+    collectionType: '',
+    disabled: false,
+    id: '',
+  },
+  data() {
+    return {
+      radioChange: false,
+      zradioc: '',
+    };
+  },
+  watch: {
+    zRadiocolumns: {
+      // 返显
+      handler(val) {
+        for (let i = 0; i < val.length; i++) {
+          if (val[i].answerValue == 'Y') {
+            this.zradioc = String(val[i][this.id]);
+          }
+        }
+      },
+      immediate: true,
+    },
+  },
+  methods: {
+    radiofn(value) {
+      this.radioChange = true;
+      var typeval = [...this.zRadiocolumns];
+      for (var k = 0; k < this.zRadiocolumns.length; k++) {
+        typeval[k].answerValue = 'N';
+        if (this.zRadiocolumns[k][this.id] == value) {
+          typeval[k].answerValue = 'Y';
+        }
+      }
+      let datalist = {
+        id: this.textc,
+        answerValue: typeval,
+      };
+      this.$emit('zSelectVal', datalist);
+    },
+    radioclick() {
+      if (this.disabled) return;
+      if (!this.radioChange) {
+        this.zradioc = '';
+      }
+      this.radioChange = false;
+    },
+  },
+};
+</script>
+
+<style scoped>
+.van-f-red {
+  color: red;
+  width: 4px;
+  display: inline-block;
+}
+
+.zSelect .z-cell {
+  padding: 10px 16px 0 16px;
+  font-size: 16px;
+}
+
+.checkbox .van-radio {
+  padding-bottom: 10px;
+}
+</style>
+<style>
+.checkbox .van-radio__icon {
+  border: 1px solid #333;
+  border-radius: 80px;
+  width: 1em;
+}
+
+.checkbox .van-radio__icon .van-icon {
+  border: 0 !important;
+  height: 1em;
+  width: 1em;
+}
+
+.checkbox .van-radio__icon--checked .van-icon {
+  color: #1989fa;
+  background-color: #fff;
+  display: block;
+  height: 14px;
+  width: 14px;
+  margin: 2px auto;
+  background-color: #1989fa;
+  color: transparent;
+}
+
+.checkbox .van-radio__icon--checked {
+  border: 1px solid #1989fa;
+}
+</style>

+ 11 - 19
src/components/share.vue

@@ -55,25 +55,11 @@
             </div>
           </div>
         </div>
-        <!-- <template
-          v-for="(item, index) in reportTarget.reportContents"
-          v-if="reportTarget.reportContents && reportTarget.reportContents.length > 0">
-          <div :class="['text']">{{ filterText(index) }}</div>
-          <div class="content">{{ item.dayContent }}</div>
-        </template> -->
-        <template v-if="checkedPlan">
-          <div :class="['text']">今日机会与挑战总结</div>
-          <div class="content">
-            {{
-              reportTarget.reportContents.length ? reportTarget.reportContents[0].dayContent : ''
-            }}
-          </div>
-          <div :class="['text']">明日工作计划</div>
-          <div class="content">
-            {{
-              reportTarget.reportContents.length ? reportTarget.reportContents[1].dayContent : ''
-            }}
-          </div>
+        <template v-if="checkedPlan && reportContents">
+          <template v-for="value in reportContents">
+            <div :class="['text']">{{ value.dictValue }}</div>
+            <div class="content">{{ value.content }}</div>
+          </template>
         </template>
         <template v-if="photosData && photosData.length">
           <div class="text">今日拜访照片</div>
@@ -170,6 +156,12 @@ export default {
       type: Boolean,
       default: true,
     },
+    reportContents: {
+      type: Array,
+      default() {
+        return [];
+      },
+    },
   },
   data() {
     return {

+ 241 - 161
src/views/week/daily.vue

@@ -404,57 +404,67 @@
         </div>
       </van-collapse>
       <div class="contentContainer">
-        <div v-if="GZQuota">
-          <p class="contentContainerTitle">今日项目跟进数<span class="colorRed">(必填)</span></p>
-          <div style="padding: 10px 0">
-            <van-field v-model="reportContents[2].projectFollowNum" type="digit" />
+        <!-- isHistory 是否为历史汇报:0-新汇报 1-历史汇报 -->
+        <reportCustom
+          ref="reportCustom"
+          v-if="reportTarget.isHistory == '0'"
+          :reportCustomData="reportTarget.customTaskList"></reportCustom>
+        <template v-else>
+          <div v-if="GZQuota">
+            <p class="contentContainerTitle">今日项目跟进数<span class="colorRed">(必填)</span></p>
+            <div style="padding: 10px 0">
+              <van-field v-model="reportContents[2].projectFollowNum" type="digit" />
+            </div>
+            <p class="contentContainerTitle">
+              今日TUC成功报备数量<span class="colorRed">(必填)</span>
+            </p>
+            <div style="padding: 10px 0">
+              <van-field v-model="reportContents[3].tucReportingSuccessNum" type="digit" />
+            </div>
+          </div>
+          <div
+            v-if="
+              (this.$route.query.reportId && notVisitReason) || reportTarget.showNotVisitReason
+            ">
+            <p class="contentContainerTitle">
+              截至日报提交时间,今日拜访0家店的原因<span class="colorRed">(必填)</span>
+            </p>
+            <div style="padding: 10px 0">
+              <van-field
+                v-model="notVisitReason"
+                rows="3"
+                autosize
+                maxlength="1000"
+                show-word-limit
+                type="textarea"
+                :formatter="formatter" />
+            </div>
           </div>
           <p class="contentContainerTitle">
-            今日TUC成功报备数量<span class="colorRed">(必填)</span>
+            今日机会与挑战总结<span class="colorRed">(必填)</span>
           </p>
           <div style="padding: 10px 0">
-            <van-field v-model="reportContents[3].tucReportingSuccessNum" type="digit" />
+            <van-field
+              v-model="reportContents[0].dayContent"
+              rows="4"
+              autosize
+              maxlength="800"
+              show-word-limit
+              type="textarea"
+              :formatter="formatter" />
           </div>
-        </div>
-        <!-- 今日未拜访原因 如果为false,则不展示;如果为true,则展示,需要展示“今日拜访0家店的原因” -->
-        <div
-          v-if="(this.$route.query.reportId && notVisitReason) || reportTarget.showNotVisitReason">
-          <p class="contentContainerTitle">
-            截至日报提交时间,今日拜访0家店的原因<span class="colorRed">(必填)</span>
-          </p>
+          <p class="contentContainerTitle">明日工作规划 <span class="colorRed">(必填)</span></p>
           <div style="padding: 10px 0">
             <van-field
-              v-model="notVisitReason"
-              rows="3"
+              v-model="reportContents[1].dayContent"
+              rows="4"
               autosize
-              maxlength="1000"
+              maxlength="800"
               show-word-limit
               type="textarea"
               :formatter="formatter" />
           </div>
-        </div>
-        <p class="contentContainerTitle">今日机会与挑战总结<span class="colorRed">(必填)</span></p>
-        <div style="padding: 10px 0">
-          <van-field
-            v-model="reportContents[0].dayContent"
-            rows="4"
-            autosize
-            maxlength="800"
-            show-word-limit
-            type="textarea"
-            :formatter="formatter" />
-        </div>
-        <p class="contentContainerTitle">明日工作规划 <span class="colorRed">(必填)</span></p>
-        <div style="padding: 10px 0">
-          <van-field
-            v-model="reportContents[1].dayContent"
-            rows="4"
-            autosize
-            maxlength="800"
-            show-word-limit
-            type="textarea"
-            :formatter="formatter" />
-        </div>
+        </template>
       </div>
       <br />
     </div>
@@ -485,6 +495,7 @@ import ZYPlaceOrder from '@/views/componentsTarget/ZYPlaceOrder';
 import performanceSAP from '@/views/componentsTarget/performanceSAP';
 import ZYSAP from '@/views/componentsTarget/ZYSAP';
 import veryGoodPlaceOrder from '@/views/componentsTarget/veryGoodPlaceOrder';
+import reportCustom from './reportCustom';
 
 export default {
   name: 'daily',
@@ -496,6 +507,7 @@ export default {
     performanceSAP,
     ZYSAP,
     veryGoodPlaceOrder,
+    reportCustom,
   },
   data() {
     return {
@@ -711,151 +723,219 @@ export default {
       });
     },
     tsContentsFn() {
-      let loading1 = this.$toast.loading({
-        duration: 0,
-        message: '数据提交中...',
-        forbidClick: true,
-      });
+      this.toastLoading(0, '加载中...', true);
       if (this.isclick) {
-        this.reportContents[0].contentTime = this.parseTime(new Date(), '{y}-{m}-{d}');
-        this.reportContents[1].contentTime = this.parseTime(new Date(), '{y}-{m}-{d}');
-        if (this.GZQuota) {
-          this.reportContents[2].contentTime = this.parseTime(new Date(), '{y}-{m}-{d}');
-          this.reportContents[3].contentTime = this.parseTime(new Date(), '{y}-{m}-{d}');
-        }
-        this.reportTarget.reportContents = this.reportContents;
-        this.reportTarget.notVisitReason = this.notVisitReason;
-        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 (this.reportTarget.isHistory == '1') {
+          this.reportContents[0].contentTime = this.parseTime(new Date(), '{y}-{m}-{d}');
+          this.reportContents[1].contentTime = this.parseTime(new Date(), '{y}-{m}-{d}');
+          if (this.GZQuota) {
+            this.reportContents[2].contentTime = this.parseTime(new Date(), '{y}-{m}-{d}');
+            this.reportContents[3].contentTime = this.parseTime(new Date(), '{y}-{m}-{d}');
+          }
+          this.reportTarget.reportContents = this.reportContents;
+          this.reportTarget.notVisitReason = this.notVisitReason;
+          this.tsContentsFun();
+        } else {
+          // 新的
+          if (this.reportTarget.customTaskList && this.reportTarget.customTaskList.length) {
+            // 配置任务
+            this.filterReportCustomData((reportCustomAnswers) => {
+              this.tsContentsFun(reportCustomAnswers);
+            });
           } else {
-            this.$toast.fail(res.msg);
+            // 没有配置任务
+            this.tsContentsFun(null);
           }
-        });
+        }
       }
     },
+    tsContentsFun(reportCustomAnswers) {
+      if (reportCustomAnswers) this.reportTarget.reportCustomAnswers = reportCustomAnswers;
+      this.reportTarget.status = '1';
+      this.isclick = false;
+      tsContents(this.reportTarget).then((res) => {
+        this.toastLoading().clear();
+        this.isclick = true;
+        if (res.code == 200) {
+          this.$dialog
+            .alert({
+              title: '系统提示',
+              message: '暂存成功',
+            })
+            .then(() => {});
+        } else {
+          this.$toast.fail(res.msg);
+        }
+      });
+    },
     // 提交日报
     submint() {
-      let loading1 = this.$toast.loading({
-        duration: 0,
-        message: '数据提交中...',
-        forbidClick: true,
-      });
+      this.toastLoading(0, '加载中...', true);
       if (this.isclick) {
-        if (this.GZQuota) {
-          if (this.reportContents[2].projectFollowNum.trim() == '') {
-            this.$toast('请输入今日项目跟进数量!');
-            return false;
+        // 旧的
+        if (this.reportTarget.isHistory == '1') {
+          if (this.GZQuota) {
+            if (this.reportContents[2].projectFollowNum.trim() == '') {
+              this.$toast('请输入今日项目跟进数量!');
+              return false;
+            }
+            if (this.reportContents[3].tucReportingSuccessNum.trim() == '') {
+              this.$toast('请输入今日TUC成功报备数量!');
+              return false;
+            }
           }
-          if (this.reportContents[3].tucReportingSuccessNum.trim() == '') {
-            this.$toast('请输入今日TUC成功报备数量!');
-            return false;
+          if (
+            (this.$route.query.reportId && this.notVisitReason) ||
+            this.reportTarget.showNotVisitReason
+          ) {
+            if (this.notVisitReason.trim() == '') {
+              this.$toast('请输入今日拜访0家店的原因!');
+              return false;
+            }
+            this.reportTarget.notVisitReason = this.notVisitReason;
           }
-        }
-        if (
-          (this.$route.query.reportId && this.notVisitReason) ||
-          this.reportTarget.showNotVisitReason
-        ) {
-          if (this.notVisitReason.trim() == '') {
-            this.$toast('请输入今日拜访0家店的原因!');
+          if (this.reportContents[0].dayContent.trim() == '') {
+            this.$toast('请输入日报内容!');
             return false;
-          }
-          this.reportTarget.notVisitReason = this.notVisitReason;
-        }
-        if (this.reportContents[0].dayContent.trim() == '') {
-          this.$toast('请输入日报内容!');
-          return false;
-        } else if (this.reportContents[0].dayContent.length > 800) {
-          this.$toast('日报内容太长!');
-          return false;
-        } else if (this.reportContents[1].dayContent.trim() == '') {
-          this.$toast('请输入明日工作规划!');
+          } else if (this.reportContents[0].dayContent.length > 800) {
+            this.$toast('日报内容太长!');
+            return false;
+          } else if (this.reportContents[1].dayContent.trim() == '') {
+            this.$toast('请输入明日工作规划!');
 
-          return false;
-        } else if (this.reportContents[1].dayContent.length > 800) {
-          this.$toast('明日工作规划内容太长!');
-          return false;
-        } else {
+            return false;
+          } else if (this.reportContents[1].dayContent.length > 800) {
+            this.$toast('明日工作规划内容太长!');
+            return false;
+          }
           this.reportContents[0].contentTime = this.parseTime(new Date(), '{y}-{m}-{d}');
           this.reportContents[1].contentTime = this.parseTime(new Date(), '{y}-{m}-{d}');
           if (this.GZQuota) {
             this.reportContents[2].contentTime = this.parseTime(new Date(), '{y}-{m}-{d}');
             this.reportContents[3].contentTime = this.parseTime(new Date(), '{y}-{m}-{d}');
           }
-          // this.reportContents[4].contentTime = this.parseTime(new Date(), '{y}-{m}-{d}')
           this.reportTarget.reportContents = this.reportContents;
-
-          this.reportTarget.status = '1';
-          this.isclick = false;
-          updateReport(this.reportTarget).then((res) => {
-            loading1.clear();
-            this.isclick = true;
-            if (res.code == 200) {
-              if (this.reportTarget.reportPostType == 'fx') {
-                this.$dialog
-                  .alert({
-                    message: '已提交,是否分享',
-                    showCancelButton: true,
-                    confirmButtonText: '分享',
-                    cancelButtonText: '返回首页',
-                    className: 'dailyShareBtn',
-                  })
-                  .then(() => {
-                    buryingPoint({
-                      systemModel: '日报审核',
-                      buryingPointType: 2,
-                      buryingPointValue: this.$route.query.reportId,
-                      buryingPointName: '日报提交分享',
-                      buryingPointPosition: '日报提交',
-                    });
-                    // 跳转历史汇报详情 分享汇报
-                    this.$router.replace({
-                      path: 'dailyDetails',
-                      query: { reportId: res.data, sourceType: 'daily' },
-                    });
-                  })
-                  .catch(() => {
-                    if (this.$route.query.reportId != undefined) {
-                      window.location.replace(window.location.origin + '/mobile/home');
-                    } else {
-                      this.onClickLeft();
-                    }
-                  });
-              } else {
-                this.$dialog
-                  .alert({
-                    title: '系统提示',
-                    message: '提交成功',
-                  })
-                  .then(() => {
-                    if (this.$route.query.reportId != undefined) {
-                      window.location.replace(window.location.origin + '/mobile/myHistoricalDaily');
-                    } else {
-                      this.onClickLeft();
-                    }
-                  });
+          this.submintFun();
+        } else {
+          // 新的
+          if (this.reportTarget.customTaskList && this.reportTarget.customTaskList.length) {
+            // 配置任务
+            this.reportCustomTabstoreVal((reportCustomAnswers) => {
+              this.submintFun(reportCustomAnswers);
+            });
+          } else {
+            // 没有配置任务
+            this.submintFun(null);
+          }
+        }
+      }
+    },
+    submintFun(reportCustomAnswers) {
+      this.reportTarget.status = '1';
+      if (reportCustomAnswers) this.reportTarget.reportCustomAnswers = reportCustomAnswers;
+      this.isclick = false;
+      updateReport(this.reportTarget).then((res) => {
+        this.toastLoading().clear();
+        this.isclick = true;
+        if (res.code == 200) {
+          if (this.reportTarget.reportPostType == 'fx') {
+            this.$dialog
+              .alert({
+                message: '已提交,是否分享',
+                showCancelButton: true,
+                confirmButtonText: '分享',
+                cancelButtonText: '返回首页',
+                className: 'dailyShareBtn',
+              })
+              .then(() => {
+                buryingPoint({
+                  systemModel: '日报审核',
+                  buryingPointType: 2,
+                  buryingPointValue: this.$route.query.reportId,
+                  buryingPointName: '日报提交分享',
+                  buryingPointPosition: '日报提交',
+                });
+                // 跳转历史汇报详情 分享汇报
+                this.$router.replace({
+                  path: 'dailyDetails',
+                  query: { reportId: res.data, sourceType: 'daily' },
+                });
+              })
+              .catch(() => {
+                if (this.$route.query.reportId != undefined) {
+                  window.location.replace(window.location.origin + '/mobile/home');
+                } else {
+                  this.onClickLeft();
+                }
+              });
+          } else {
+            this.$dialog
+              .alert({
+                title: '系统提示',
+                message: '提交成功',
+              })
+              .then(() => {
+                if (this.$route.query.reportId != undefined) {
+                  window.location.replace(window.location.origin + '/mobile/myHistoricalDaily');
+                } else {
+                  this.onClickLeft();
+                }
+              });
+          }
+        } 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);
             }
-          });
+          } else {
+            if (customData[x].answerValue)
+              reportCustomAnswers.push({
+                reportCustomTaskId: customData[x].reportCustomTaskId,
+                reportCustomCollectionId: customData[x].reportCustomCollectionId,
+                answerValue: customData[x].answerValue,
+              });
+          }
         }
       }
+      console.log(reportCustomAnswers);
+      callback && callback(reportCustomAnswers);
     },
     // 获取日报数据
     getReportInfo() {

+ 35 - 25
src/views/week/dailyApproval.vue

@@ -425,36 +425,44 @@
         </van-collapse-item>
       </van-collapse>
       <div class="contentContainer">
-        <div v-if="GZQuota">
-          <p class="contentContainerTitle">今日项目跟进数</p>
-          <div style="padding: 10px 0">
-            <van-field readonly v-model="projectFollowNum" type="digit" />
+        <!-- isHistory 是否为历史汇报:0-新汇报 1-历史汇报 -->
+        <reportCustom
+          ref="reportCustom"
+          v-if="reportTarget.isHistory == '0'"
+          :disabled="true"
+          :reportCustomData="reportTarget.customTaskList"></reportCustom>
+        <template v-else>
+          <div v-if="GZQuota">
+            <p class="contentContainerTitle">今日项目跟进数</p>
+            <div style="padding: 10px 0">
+              <van-field readonly v-model="projectFollowNum" type="digit" />
+            </div>
+            <p class="contentContainerTitle">今日TUC成功报备数量</p>
+            <div style="padding: 10px 0">
+              <van-field readonly v-model="tucReportingSuccessNum" type="digit" />
+            </div>
+          </div>
+          <!-- 今日未拜访原因 如果不为空则展示,为空则不展示 -->
+          <div v-if="reportTarget.notVisitReason && reportTarget.notVisitReason != ''">
+            <p class="contentContainerTitle">截至日报提交时间,今日拜访0家店的原因</p>
+            <div style="padding: 10px 0">
+              <van-field
+                readonly
+                v-model="reportTarget.notVisitReason"
+                rows="4"
+                autosize
+                type="textarea" />
+            </div>
           </div>
-          <p class="contentContainerTitle">今日TUC成功报备数量</p>
+          <p class="contentContainerTitle">今日机会与挑战总结</p>
           <div style="padding: 10px 0">
-            <van-field readonly v-model="tucReportingSuccessNum" type="digit" />
+            <van-field v-model="Contents" rows="4" autosize readonly type="textarea" />
           </div>
-        </div>
-        <!-- 今日未拜访原因 如果不为空则展示,为空则不展示 -->
-        <div v-if="reportTarget.notVisitReason && reportTarget.notVisitReason != ''">
-          <p class="contentContainerTitle">截至日报提交时间,今日拜访0家店的原因</p>
+          <p class="contentContainerTitle">明日工作规划</p>
           <div style="padding: 10px 0">
-            <van-field
-              readonly
-              v-model="reportTarget.notVisitReason"
-              rows="4"
-              autosize
-              type="textarea" />
+            <van-field v-model="Content2" rows="4" autosize readonly type="textarea" />
           </div>
-        </div>
-        <p class="contentContainerTitle">今日机会与挑战总结</p>
-        <div style="padding: 10px 0">
-          <van-field v-model="Contents" rows="4" autosize readonly type="textarea" />
-        </div>
-        <p class="contentContainerTitle">明日工作规划</p>
-        <div style="padding: 10px 0">
-          <van-field v-model="Content2" rows="4" autosize readonly type="textarea" />
-        </div>
+        </template>
       </div>
       <div class="contentContainer">
         <p class="contentContainerTitle">打分 <span>请点亮小星星,一颗小星星代表1分</span></p>
@@ -517,6 +525,7 @@ import ZYPlaceOrder from '@/views/componentsTarget/ZYPlaceOrder';
 import performanceSAP from '@/views/componentsTarget/performanceSAP';
 import ZYSAP from '@/views/componentsTarget/ZYSAP';
 import veryGoodPlaceOrder from '@/views/componentsTarget/veryGoodPlaceOrder';
+import reportCustom from './reportCustom';
 export default {
   name: 'daily',
   components: {
@@ -527,6 +536,7 @@ export default {
     performanceSAP,
     ZYSAP,
     veryGoodPlaceOrder,
+    reportCustom,
   },
   data() {
     return {

+ 89 - 41
src/views/week/dailyDetails.vue

@@ -448,36 +448,44 @@
           </van-collapse-item>
         </van-collapse>
         <div class="contentContainer">
-          <div v-if="GZQuota">
-            <p class="contentContainerTitle">今日项目跟进数</p>
-            <div style="padding: 10px 0">
-              <van-field readonly v-model="projectFollowNum" type="digit" />
+          <!-- isHistory 是否为历史汇报:0-新汇报 1-历史汇报 -->
+          <reportCustom
+            ref="reportCustom"
+            v-if="reportTarget.isHistory == '0'"
+            :disabled="true"
+            :reportCustomData="reportTarget.customTaskList"></reportCustom>
+          <template v-else>
+            <div v-if="GZQuota">
+              <p class="contentContainerTitle">今日项目跟进数</p>
+              <div style="padding: 10px 0">
+                <van-field readonly v-model="projectFollowNum" type="digit" />
+              </div>
+              <p class="contentContainerTitle">今日TUC成功报备数量</p>
+              <div style="padding: 10px 0">
+                <van-field readonly v-model="tucReportingSuccessNum" type="digit" />
+              </div>
             </div>
-            <p class="contentContainerTitle">今日TUC成功报备数量</p>
+            <!-- 今日未拜访原因 如果不为空则展示,为空则不展示 -->
+            <div v-if="reportTarget.notVisitReason && reportTarget.notVisitReason != ''">
+              <p class="contentContainerTitle">截至日报提交时间,今日拜访0家店的原因</p>
+              <div style="padding: 10px 0">
+                <van-field
+                  readonly
+                  v-model="reportTarget.notVisitReason"
+                  rows="4"
+                  autosize
+                  type="textarea" />
+              </div>
+            </div>
+            <p class="contentContainerTitle">今日机会与挑战总结</p>
             <div style="padding: 10px 0">
-              <van-field readonly v-model="tucReportingSuccessNum" type="digit" />
+              <van-field v-model="Content" rows="4" autosize readonly type="textarea" />
             </div>
-          </div>
-          <!-- 今日未拜访原因 如果不为空则展示,为空则不展示 -->
-          <div v-if="reportTarget.notVisitReason && reportTarget.notVisitReason != ''">
-            <p class="contentContainerTitle">截至日报提交时间,今日拜访0家店的原因</p>
+            <p class="contentContainerTitle">明日工作规划</p>
             <div style="padding: 10px 0">
-              <van-field
-                readonly
-                v-model="reportTarget.notVisitReason"
-                rows="4"
-                autosize
-                type="textarea" />
+              <van-field v-model="Content2" rows="4" autosize readonly type="textarea" />
             </div>
-          </div>
-          <p class="contentContainerTitle">今日机会与挑战总结</p>
-          <div style="padding: 10px 0">
-            <van-field v-model="Content" rows="4" autosize readonly type="textarea" />
-          </div>
-          <p class="contentContainerTitle">明日工作规划</p>
-          <div style="padding: 10px 0">
-            <van-field v-model="Content2" rows="4" autosize readonly type="textarea" />
-          </div>
+          </template>
         </div>
         <div
           class="contentContainer"
@@ -550,6 +558,7 @@
       @setDailyDetailsBox="setDailyDetailsBox"
       :urlList="urlList"
       :reportRemarksIndex="reportRemarksIndex"
+      :reportContents="reportContents"
       :checkedPlan="checkedPlan"></share>
     <!--分享图片列表 -->
     <el-dialog
@@ -561,11 +570,11 @@
       @close="wuliaoTableClose"
       custom-class="shareImgFlag">
       <div v-if="reportTarget.photoSummary">
-        <p style="margin-bottom: 10px; margin-top: 0; display: flex">
+        <!-- <p style="margin-bottom: 10px; margin-top: 0; display: flex">
           今日总结&明日规划的文本内容<van-checkbox
             v-model="checkedPlan"
             style="margin-left: 10px"></van-checkbox>
-        </p>
+        </p> -->
         <p style="margin-top: 0">请点击勾选想要分享的今日拜访照片</p>
         <div class="shareVisitImg">
           <template v-for="(itemImg, indexImg) in reportTarget.photoSummary">
@@ -607,6 +616,7 @@ import {
   getDetailById,
   getReportInfo,
   buryingPoint,
+  getDictOption,
 } from '@/api/index';
 import { ImagePreview } from 'vant';
 import visitedRealTime from '@/views/componentsTarget/visitedRealTime';
@@ -617,6 +627,7 @@ import performanceSAP from '@/views/componentsTarget/performanceSAP';
 import ZYSAP from '@/views/componentsTarget/ZYSAP';
 import veryGoodPlaceOrder from '@/views/componentsTarget/veryGoodPlaceOrder';
 import share from '@/components/share';
+import reportCustom from './reportCustom';
 
 export default {
   name: 'daily',
@@ -629,6 +640,7 @@ export default {
     ZYSAP,
     veryGoodPlaceOrder,
     share,
+    reportCustom,
   },
   data() {
     return {
@@ -668,7 +680,7 @@ export default {
       Content: '',
       Content2: '',
       reportTargetAll: {},
-      reportContents: [{ dayContent: '' }],
+      reportContents: [],
       reportTarget: {},
       successContent: '',
       projectFollowNum: '',
@@ -692,6 +704,7 @@ export default {
       checkedPlan: true, //今日总结&明日规划
       visitIMG1Flag: false,
       shareVisible: true,
+      shareReportConfig: null,
     };
   },
   created() {
@@ -795,6 +808,10 @@ export default {
         message: '加载中...',
         forbidClick: true,
       });
+      // 获取店招异常原因字典
+      getDictOption({}, 'share_report_config').then((res) => {
+        this.shareReportConfig = res.data;
+      });
       getDetailById({ reportId: this.$route.query.reportId }).then((res) => {
         loading1.clear();
         this.reportTargetAll = res.data.reportTargetAll;
@@ -817,22 +834,53 @@ export default {
         } else {
           this.successContent = res.data.failContent;
         }
-        if (res.data.reportContents.length > 0) {
-          this.Content = res.data.reportContents[0].dayContent;
-          if (res.data.reportContents.length > 1) {
-            this.Content2 = res.data.reportContents[1].dayContent;
-          } else {
-            this.Content2 = '';
-          }
-          if (res.data.reportContents.length > 2) {
-            this.projectFollowNum = res.data.reportContents[2].projectFollowNum;
-            this.tucReportingSuccessNum = res.data.reportContents[3].tucReportingSuccessNum;
+        this.Content = '';
+        this.Content2 = '';
+        this.reportContents = [];
+        // <!-- isHistory 是否为历史汇报:0-新汇报 1-历史汇报 -->
+        if (this.reportTarget.isHistory == '0') {
+          if (this.reportTarget.customTaskList && this.reportTarget.customTaskList.length) {
+            for (let x = 0; x < this.reportTarget.customTaskList.length; x++) {
+              let sfaReportCustomCollections =
+                this.reportTarget.customTaskList[x].sfaReportCustomCollections;
+              if (sfaReportCustomCollections) {
+                for (let y = 0; y < sfaReportCustomCollections.length; y++) {
+                  let custom = this.shareReportConfig.filter(
+                    (val) =>
+                      val.dictValue == sfaReportCustomCollections[y].reportCustomCollectionName
+                  );
+                  if (custom.length) {
+                    custom[0].content = sfaReportCustomCollections[y].answerValue;
+                    this.reportContents = this.reportContents.concat(custom);
+                  }
+                }
+              }
+            }
           }
         } else {
-          this.Content = '';
-          this.Content2 = '';
+          if (res.data.reportContents.length > 0) {
+            this.Content = res.data.reportContents[0].dayContent;
+            if (res.data.reportContents.length > 1) {
+              this.Content2 = res.data.reportContents[1].dayContent;
+            } else {
+              this.Content2 = '';
+            }
+            if (res.data.reportContents.length > 2) {
+              this.projectFollowNum = res.data.reportContents[2].projectFollowNum;
+              this.tucReportingSuccessNum = res.data.reportContents[3].tucReportingSuccessNum;
+            }
+          }
+          this.reportContents = [
+            {
+              dictValue: '今日机会与挑战总结',
+              content: this.Content,
+            },
+            {
+              dictValue: '明日工作计划',
+              content: this.Content2,
+            },
+          ];
         }
-        this.reportContents = res.data.reportContents;
         var imgList = [];
         if (res.data.photoSummary != null) {
           for (var k = 0; k < res.data.photoSummary.length; k++) {

+ 89 - 69
src/views/week/dailyHistoricalDetails.vue

@@ -461,36 +461,44 @@
           </van-collapse-item>
         </van-collapse>
         <div class="contentContainer">
-          <div v-if="GZQuota">
-            <p class="contentContainerTitle">今日项目跟进数</p>
-            <div style="padding: 10px 0">
-              <van-field readonly v-model="projectFollowNum" type="digit" />
+          <!-- isHistory 是否为历史汇报:0-新汇报 1-历史汇报 -->
+          <reportCustom
+            ref="reportCustom"
+            v-if="reportTarget.isHistory == '0'"
+            :disabled="true"
+            :reportCustomData="reportTarget.customTaskList"></reportCustom>
+          <template v-else>
+            <div v-if="GZQuota">
+              <p class="contentContainerTitle">今日项目跟进数</p>
+              <div style="padding: 10px 0">
+                <van-field readonly v-model="projectFollowNum" type="digit" />
+              </div>
+              <p class="contentContainerTitle">今日TUC成功报备数量</p>
+              <div style="padding: 10px 0">
+                <van-field readonly v-model="tucReportingSuccessNum" type="digit" />
+              </div>
+            </div>
+            <!-- 今日未拜访原因 如果不为空则展示,为空则不展示 -->
+            <div v-if="reportTarget.notVisitReason && reportTarget.notVisitReason != ''">
+              <p class="contentContainerTitle">截至日报提交时间,今日拜访0家店的原因</p>
+              <div style="padding: 10px 0">
+                <van-field
+                  readonly
+                  v-model="reportTarget.notVisitReason"
+                  rows="4"
+                  autosize
+                  type="textarea" />
+              </div>
             </div>
-            <p class="contentContainerTitle">今日TUC成功报备数量</p>
+            <p class="contentContainerTitle">今日机会与挑战总结</p>
             <div style="padding: 10px 0">
-              <van-field readonly v-model="tucReportingSuccessNum" type="digit" />
+              <van-field v-model="Content" rows="4" autosize readonly type="textarea" />
             </div>
-          </div>
-          <!-- 今日未拜访原因 如果不为空则展示,为空则不展示 -->
-          <div v-if="reportTarget.notVisitReason && reportTarget.notVisitReason != ''">
-            <p class="contentContainerTitle">截至日报提交时间,今日拜访0家店的原因</p>
+            <p class="contentContainerTitle">明日工作规划</p>
             <div style="padding: 10px 0">
-              <van-field
-                readonly
-                v-model="reportTarget.notVisitReason"
-                rows="4"
-                autosize
-                type="textarea" />
+              <van-field v-model="Content2" rows="4" autosize readonly type="textarea" />
             </div>
-          </div>
-          <p class="contentContainerTitle">今日机会与挑战总结</p>
-          <div style="padding: 10px 0">
-            <van-field v-model="Content" rows="4" autosize readonly type="textarea" />
-          </div>
-          <p class="contentContainerTitle">明日工作规划</p>
-          <div style="padding: 10px 0">
-            <van-field v-model="Content2" rows="4" autosize readonly type="textarea" />
-          </div>
+          </template>
         </div>
         <div
           class="contentContainer"
@@ -598,6 +606,7 @@
       @setDailyDetailsBox="setDailyDetailsBox"
       :urlList="urlList"
       :reportRemarksIndex="reportRemarksIndex"
+      :reportContents="reportContents"
       :checkedPlan="checkedPlan"></share>
     <!--分享图片列表 -->
     <el-dialog
@@ -609,11 +618,11 @@
       @close="wuliaoTableClose"
       custom-class="shareImgFlag">
       <div v-if="reportTarget.photoSummary">
-        <p style="margin-bottom: 10px; margin-top: 0; display: flex">
+        <!-- <p style="margin-bottom: 10px; margin-top: 0; display: flex">
           今日总结&明日规划的文本内容<van-checkbox
             v-model="checkedPlan"
             style="margin-left: 10px"></van-checkbox>
-        </p>
+        </p> -->
         <p style="margin-top: 0">请点击勾选想要分享的今日拜访照片</p>
         <div class="shareVisitImg">
           <template v-for="(itemImg, indexImg) in reportTarget.photoSummary">
@@ -656,6 +665,7 @@ import {
   getDetailById,
   updateReport,
   buryingPoint,
+  getDictOption,
 } from '@/api/index';
 import axios from 'axios';
 import { ImagePreview } from 'vant';
@@ -667,6 +677,7 @@ import performanceSAP from '@/views/componentsTarget/performanceSAP';
 import ZYSAP from '@/views/componentsTarget/ZYSAP';
 import veryGoodPlaceOrder from '@/views/componentsTarget/veryGoodPlaceOrder';
 import share from '@/components/share';
+import reportCustom from './reportCustom';
 
 export default {
   name: 'daily',
@@ -679,6 +690,7 @@ export default {
     ZYSAP,
     veryGoodPlaceOrder,
     share,
+    reportCustom,
   },
   data() {
     return {
@@ -722,7 +734,7 @@ export default {
       Content: '',
       Content2: '',
       reportTargetAll: null,
-      reportContents: [{ dayContent: '' }],
+      reportContents: [],
       reportTarget: {},
       successContent: '',
       managerRemarkContent: '',
@@ -746,7 +758,7 @@ export default {
       checkedPlan: true, //今日总结&明日规划
       setDailyDetailsBoxFlag: true,
       visitIMG1Flag: false,
-      //
+      shareReportConfig: null,
     };
   },
   watch: {
@@ -950,38 +962,16 @@ export default {
         }
       });
     },
-    // submint(){
-    //   let loading1 = this.$toast.loading({
-    //     duration: 0,
-    //     message: '数据提交中...',
-    //     forbidClick: true,
-    //   });
-    //   if(this.managerRemarkContent.trim()==""){
-    //     this.$toast("点评内容未填写")
-    //     return false
-    //   }
-    //   this.reportTarget.managerRemarkContent=this.managerRemarkContent
-    //   this.reportTarget.status=4
-    //   insertRemark(this.reportTarget).then(res=>{
-    //     loading1.clear()
-    //     if(res.code==200){
-    //       this.$dialog.alert({
-    //         title: '系统提示',
-    //         message: '提交成功',
-    //       }).then(() => {
-    //         this.getDetailById()
-    //       });
-    //     }else{
-    //       this.$toast.fail(res.msg)
-    //     }
-    //   })
-    // },
     getDetailById() {
       let loading1 = this.$toast.loading({
         duration: 0,
         message: '加载中...',
         forbidClick: true,
       });
+      // 获取店招异常原因字典
+      getDictOption({}, 'share_report_config').then((res) => {
+        this.shareReportConfig = res.data;
+      });
       getDetailById({ reportId: this.reportId }).then((res) => {
         loading1.clear();
         if (res.code == 500 && this.source == 'share') {
@@ -1019,22 +1009,53 @@ export default {
           } else {
             this.successContent = res.data.failContent;
           }
-          if (res.data.reportContents.length > 0) {
-            this.Content = res.data.reportContents[0].dayContent;
-            if (res.data.reportContents.length > 1) {
-              this.Content2 = res.data.reportContents[1].dayContent;
-            } else {
-              this.Content2 = '';
-            }
-            if (res.data.reportContents.length > 2) {
-              this.projectFollowNum = res.data.reportContents[2].projectFollowNum;
-              this.tucReportingSuccessNum = res.data.reportContents[3].tucReportingSuccessNum;
+          this.Content = '';
+          this.Content2 = '';
+          this.reportContents = [];
+          // <!-- isHistory 是否为历史汇报:0-新汇报 1-历史汇报 -->
+          if (this.reportTarget.isHistory == '0') {
+            if (this.reportTarget.customTaskList && this.reportTarget.customTaskList.length) {
+              for (let x = 0; x < this.reportTarget.customTaskList.length; x++) {
+                let sfaReportCustomCollections =
+                  this.reportTarget.customTaskList[x].sfaReportCustomCollections;
+                if (sfaReportCustomCollections) {
+                  for (let y = 0; y < sfaReportCustomCollections.length; y++) {
+                    let custom = this.shareReportConfig.filter(
+                      (val) =>
+                        val.dictValue == sfaReportCustomCollections[y].reportCustomCollectionName
+                    );
+                    if (custom.length) {
+                      custom[0].content = sfaReportCustomCollections[y].answerValue;
+                      this.reportContents = this.reportContents.concat(custom);
+                    }
+                  }
+                }
+              }
             }
           } else {
-            this.Content = '';
-            this.Content2 = '';
+            if (res.data.reportContents.length > 0) {
+              this.Content = res.data.reportContents[0].dayContent;
+              if (res.data.reportContents.length > 1) {
+                this.Content2 = res.data.reportContents[1].dayContent;
+              } else {
+                this.Content2 = '';
+              }
+              if (res.data.reportContents.length > 2) {
+                this.projectFollowNum = res.data.reportContents[2].projectFollowNum;
+                this.tucReportingSuccessNum = res.data.reportContents[3].tucReportingSuccessNum;
+              }
+            }
+            this.reportContents = [
+              {
+                dictValue: '今日机会与挑战总结',
+                content: this.Content,
+              },
+              {
+                dictValue: '明日工作计划',
+                content: this.Content2,
+              },
+            ];
           }
-          this.reportContents = res.data.reportContents;
           var imgList = [];
           if (res.data.photoSummary != null) {
             for (var k = 0; k < res.data.photoSummary.length; k++) {
@@ -1043,7 +1064,6 @@ export default {
           }
           this.imgList = imgList;
         }
-        this.reportContents = res.data.reportContents;
         var imgList = [];
         if (res.data.photoSummary != null) {
           if (res.data.photoSummary != null) {

+ 282 - 0
src/views/week/reportCustom.vue

@@ -0,0 +1,282 @@
+<template>
+  <div class="reportCustom" v-if="fromData && fromData.length">
+    <van-form ref="tabstoreVal" :disabled="disabled">
+      <template v-for="(value, ind) in fromData">
+        <template v-if="value.sfaReportCustomCollections">
+          <div
+            v-for="(item, index) in value.sfaReportCustomCollections"
+            :key="item.reportCustomCollectionId">
+            <div v-if="item.reportCustomCollectionType == 'sz'" class="formLabel z-cell">
+              <van-cell>
+                <template #title>
+                  <span v-if="item.isMust == '1'" class="van-f-red">*</span>
+                  {{ filterIndex(ind, index) + 1 + '.' }}
+                  {{ item.reportCustomCollectionName }}
+                </template>
+              </van-cell>
+              <van-field
+                :name="item.reportCustomCollectionName"
+                v-model="item.answerValue"
+                :placeholder="item.remark"
+                type="number"
+                @input="numberFn(item, index)"
+                :rules="[
+                  {
+                    required: item.isMust == '1',
+                    message: item.remark || '请输入' + item.reportCustomCollectionName,
+                  },
+                ]"></van-field>
+            </div>
+            <div v-if="item.reportCustomCollectionType == 'wb'" class="formLabel z-cell">
+              <van-cell>
+                <template #title>
+                  <span v-if="item.isMust == '1'" class="van-f-red">*</span>
+                  {{ filterIndex(ind, index) + 1 + '.' }}
+                  {{ item.reportCustomCollectionName }}
+                </template>
+              </van-cell>
+              <van-field
+                :name="item.reportCustomCollectionName"
+                v-model="item.answerValue"
+                :formatter="formatter"
+                autosize
+                type="textarea"
+                maxlength="800"
+                :placeholder="item.remark"
+                :rules="[
+                  {
+                    required: item.isMust == '1',
+                    message: item.remark || '请输入' + item.reportCustomCollectionName,
+                  },
+                ]"></van-field>
+            </div>
+            <div v-if="item.reportCustomCollectionType == 'duox'" class="formLabel z-cell">
+              <van-cell>
+                <template #title>
+                  <span v-if="item.isMust == '1'" class="van-f-red">*</span>
+                  {{ filterIndex(ind, index) + 1 + '.' }}
+                  {{ item.reportCustomCollectionName }}
+                </template>
+              </van-cell>
+              <van-field
+                :name="item.reportCustomCollectionName"
+                :rules="[
+                  {
+                    required: item.isMust == '1',
+                    message: '请选择' + item.reportCustomCollectionName,
+                  },
+                ]">
+                <template #input>
+                  <z-checkbox
+                    :textc="item.reportCustomOptionId"
+                    :zCheckboxcolumns="item.sfaReportCustomOptions"
+                    :id="'reportCustomOptionId'"
+                    :disabled="disabled"
+                    @zSelectVal="zSelectVal"></z-checkbox>
+                </template>
+              </van-field>
+              <p style="color: red; font-size: 12px; margin: 0; text-align: right">
+                {{ item.remark }}
+              </p>
+            </div>
+            <div v-if="item.reportCustomCollectionType == 'dx'" class="formLabel z-cell">
+              <van-cell>
+                <template #title>
+                  <span v-if="item.isMust == '1'" class="van-f-red">*</span>
+                  {{ filterIndex(ind, index) + 1 + '.' }}
+                  {{ item.reportCustomCollectionName }}
+                </template>
+              </van-cell>
+              <van-field
+                :name="item.reportCustomCollectionName"
+                :rules="[
+                  {
+                    required: item.isMust == '1',
+                    message: '请选择' + item.reportCustomCollectionName,
+                  },
+                ]">
+                <template #input>
+                  <z-radio
+                    :answerType="item.reportCustomCollectionType"
+                    :collectionType="item.collectionType"
+                    :textc="item.reportCustomOptionId"
+                    :zRadiocolumns="item.sfaReportCustomOptions"
+                    :id="'reportCustomOptionId'"
+                    :disabled="disabled"
+                    @zSelectVal="zSelectVal"></z-radio>
+                </template>
+              </van-field>
+              <p style="color: red; font-size: 12px; margin: 0; text-align: right">
+                {{ item.remark }}
+              </p>
+            </div>
+          </div>
+        </template>
+      </template>
+    </van-form>
+  </div>
+</template>
+<script>
+import zRadio from '@/components/componentZRadio';
+import zCheckbox from '@/components/componentZCheckbox';
+export default {
+  components: { zRadio, zCheckbox },
+  props: {
+    reportCustomData: {
+      type: Array,
+      default: () => [],
+    },
+    disabled: {
+      type: Boolean,
+      default: false,
+    },
+  },
+  watch: {
+    reportCustomData: {
+      handler(val) {
+        this.postName = localStorage.getItem('postName');
+        this.filterFromData(val);
+      },
+      immediate: true,
+      deep: true,
+    },
+  },
+  data() {
+    return {
+      fromData: null,
+      postName: '',
+    };
+  },
+  methods: {
+    filterIndex(index, subIndex) {
+      let count = 0;
+      for (let i = 0; i < index; i++) {
+        count += this.fromData[i].sfaReportCustomCollections
+          ? this.fromData[i].sfaReportCustomCollections.length
+          : 0;
+      }
+      return count + subIndex;
+    },
+    filterFromData(val) {
+      // 公装销售专员 写死 不用填写 未拜访原因
+      if (this.postName == '公装销售专员') {
+        let fromData = JSON.parse(JSON.stringify(val));
+        let reportCustomAnswers = [];
+        for (let i = 0; i < fromData.length; i++) {
+          let arr1 = fromData[i];
+          let sfaReportCustomCollections = [];
+          let customData = fromData[i].sfaReportCustomCollections
+            ? fromData[i].sfaReportCustomCollections
+            : [];
+          for (let x = 0; x < customData.length; x++) {
+            // sameDayWhetherVisit 2 未拜访
+            if (customData[x].sameDayWhetherVisit != '2') {
+              sfaReportCustomCollections.push(customData[x]);
+            }
+          }
+          arr1.sfaReportCustomCollections = sfaReportCustomCollections;
+          reportCustomAnswers.push(arr1);
+        }
+        console.log(reportCustomAnswers);
+        this.fromData = reportCustomAnswers;
+      } else {
+        this.fromData = val;
+      }
+    },
+    numberFn(val, index) {
+      if (val.answerValue) {
+        if (!/^[+-]?\d*\.{0,1}\d{0,1}$/.test(val.answerValue)) {
+          val.answerValue = val.answerValue.replace(
+            /\.\d{2,}$/,
+            val.answerValue.substr(val.answerValue.indexOf('.'), 3)
+          );
+        }
+      }
+    },
+    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,
+        ''
+      );
+    },
+    zSelectVal(value) {
+      console.log(value);
+      // var collectionAnswerlisd = this.collectionAnswerlisd;
+      // if (collectionAnswerlisd.length > 0) {
+      //   var num = 0;
+      //   for (var a = 0; a < collectionAnswerlisd.length; a++) {
+      //     if (collectionAnswerlisd[a].id == value.id) {
+      //       collectionAnswerlisd[a] = value;
+      //       num = 0;
+      //     } else {
+      //       num = 1;
+      //     }
+      //   }
+      //   if (num > 0) {
+      //     collectionAnswerlisd.push(value);
+      //   }
+      // } else {
+      //   collectionAnswerlisd.push(value);
+      // }
+      // this.collectionAnswerlisd = collectionAnswerlisd;
+    },
+  },
+};
+</script>
+<style lang="scss">
+.reportCustom {
+  .van-f-red {
+    color: red;
+    width: 8px;
+    display: inline-block;
+    line-height: 26px;
+  }
+
+  .formLabel {
+    // margin: 0 16px;
+    border-bottom: 1px solid #f1f1f1;
+  }
+
+  .formLabel .van-cell {
+    padding: 10px 0;
+  }
+
+  .formLabel .van-cell::after {
+    border: 0;
+  }
+
+  .formLabel .van-field {
+    border: 1px solid #f1f1f1;
+    padding: 0;
+    width: 100%;
+    border-radius: 4px;
+    overflow: hidden;
+  }
+  .van-field__control {
+    background-color: white !important;
+    padding: 0 10px;
+  }
+
+  .formLabel .formLabeltitle {
+    position: absolute;
+    top: 8px;
+  }
+
+  .lineGrey {
+    height: 10px;
+    width: 100%;
+    background: #f1f1f1;
+  }
+
+  .z-checkbox .van-radio {
+    padding: 6px 0;
+  }
+
+  .z-cell .van-cell__title {
+    font-size: 16px;
+  }
+  .van-form {
+    background-color: white;
+  }
+}
+</style>