소스 검색

feature_20251117_日报填写内容自定义配置

zhujindu 2 주 전
부모
커밋
159784823b
5개의 변경된 파일588개의 추가작업 그리고 226개의 파일을 삭제
  1. 112 0
      src/components/componentZCheckbox.vue
  2. 113 0
      src/components/componentZRadio.vue
  3. 185 123
      src/views/week/daily.vue
  4. 35 25
      src/views/week/dailyDetails.vue
  5. 143 78
      src/views/week/reportCustom.vue

+ 112 - 0
src/components/componentZCheckbox.vue

@@ -0,0 +1,112 @@
+<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: [],
+    checkboxval: '',
+    textc: '',
+    rules: false,
+    answerType: '',
+    collectionType: '',
+    disabled: false,
+    id: '',
+  },
+  data() {
+    return {
+      zSelect: false,
+      zSelectValuec: [],
+    };
+  },
+  watch: {
+    checkboxval: {
+      handler(va) {
+        if (this.checkboxval == '' || this.checkboxval == undefined) {
+          this.zSelectValuec = [];
+        } else {
+          this.zSelectValuec = this.checkboxval.split(',');
+        }
+      },
+      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.value = 'Y';
+        } else {
+          item.value = 'N';
+        }
+      });
+      let datalist = {
+        id: this.textc,
+        value: 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>

+ 113 - 0
src/components/componentZRadio.vue

@@ -0,0 +1,113 @@
+<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: {
+    radio: '',
+    textc: '',
+    zRadiocolumns: [],
+    answerType: '',
+    collectionType: '',
+    disabled: false,
+    id: '',
+  },
+  data() {
+    return {
+      radioChange: false,
+      zradioc: '',
+    };
+  },
+  watch: {
+    radio: {
+      handler(va) {
+        this.zradioc = this.radio;
+      },
+      immediate: true,
+    },
+  },
+  methods: {
+    radiofn(value) {
+      this.radioChange = true;
+      var typeval = [...this.zRadiocolumns];
+      for (var k = 0; k < this.zRadiocolumns.length; k++) {
+        typeval[k].value = 'N';
+        if (this.zRadiocolumns[k][this.id] == value) {
+          typeval[k].value = 'Y';
+        }
+      }
+      let datalist = {
+        id: this.textc,
+        value: 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>

+ 185 - 123
src/views/week/daily.vue

@@ -406,6 +406,7 @@
       <div class="contentContainer">
         <!-- isHistory 是否为历史汇报:0-新汇报 1-历史汇报 -->
         <reportCustom
+          ref="reportCustom"
           v-if="reportTarget.isHistory == '0'"
           :reportCustomData="reportTarget.customTaskList"></reportCustom>
         <template v-else>
@@ -722,151 +723,212 @@ 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")
-                // }
-              });
-          } else {
-            this.$toast.fail(res.msg);
+        // 旧的
+        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 {
+          // 新的
+          this.filterReportCustomData((reportCustomAnswers) => {
+            this.tsContentsFun(reportCustomAnswers);
+          });
+        }
       }
     },
+    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(() => {
+              // 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);
+        }
+      });
+    },
     // 提交日报
     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 {
+          // 新的
+          // 验证通过
+          let reportCustomData = this.$refs.reportCustom
+            ? this.$refs.reportCustom.fromData
+            : {} || {};
+          this.submintFun(reportCustomAnswers);
+        }
+      }
+    },
+    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;
+        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].value == '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/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>
+            <!-- 今日未拜访原因 如果不为空则展示,为空则不展示 -->
+            <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"
@@ -617,6 +625,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 +638,7 @@ export default {
     ZYSAP,
     veryGoodPlaceOrder,
     share,
+    reportCustom,
   },
   data() {
     return {

+ 143 - 78
src/views/week/reportCustom.vue

@@ -1,95 +1,103 @@
 <template>
   <div class="reportCustom" v-if="fromData && fromData.length">
-    <van-form ref="tabstoreVal">
+    <van-form ref="tabstoreVal" :disabled="disabled">
       <template v-for="value in fromData">
         <template v-if="value.sfaReportCustomCollections">
           <div v-for="(item, index) in value.sfaReportCustomCollections" :key="index">
-            <div v-if="item.answerType == 'sz'" class="formLabel z-cell">
+            <div v-if="item.reportCustomCollectionType == 'sz'" class="formLabel z-cell">
               <van-cell>
                 <template #title>
-                  <span v-if="item.isMust == 0" class="van-f-red">*</span>
+                  <span v-if="item.isMust == '1'" class="van-f-red">*</span>
                   {{ 1 + index + '.' }}
-                  {{ item.customName }}
+                  {{ item.reportCustomCollectionName }}
                 </template>
               </van-cell>
               <van-field
+                :name="item.reportCustomCollectionName"
                 v-model="item.answerValue"
                 :placeholder="item.remark"
                 type="number"
-                :disabled="!item.allowWriteAgain"
-                @input="numberFn(item, index)"></van-field>
+                @input="numberFn(item, index)"
+                :rules="[{ required: item.isMust == '1' }]"></van-field>
             </div>
-            <div v-if="item.answerType == 'rq'" class="formLabel z-cell">
+            <div v-if="item.reportCustomCollectionType == 'wb'" class="formLabel z-cell">
               <van-cell>
                 <template #title>
-                  <span v-if="item.isMust == 0" class="van-f-red">*</span>
+                  <span v-if="item.isMust == '1'" class="van-f-red">*</span>
                   {{ 1 + index + '.' }}
-                  {{ item.customName }}
+                  {{ item.reportCustomCollectionName }}
                 </template>
               </van-cell>
               <van-field
-                v-model="item.answerValue"
-                clickable
-                name="calendar"
-                placeholder="点击选择日期"
-                readonly
-                :disabled="!item.allowWriteAgain"
-                @click="showCalendarClick(item, index)" />
-              <p
-                v-if="item.allowWriteAgain"
-                style="color: #444; font-size: 12px; margin: 0; padding: 10px 0; text-align: right">
-                {{ item.remark }}
-              </p>
-            </div>
-            <div v-if="item.answerType == 'wb'" class="formLabel z-cell">
-              <van-cell>
-                <template #title>
-                  <span v-if="item.isMust == 0" class="van-f-red">*</span>
-                  {{ 1 + index + '.' }}
-                  {{ item.customName }}
-                </template>
-              </van-cell>
-              <van-field
-                :disabled="!item.allowWriteAgain"
+                :name="item.reportCustomCollectionName"
                 v-model="item.answerValue"
                 :formatter="formatter"
                 autosize
                 type="textarea"
-                :placeholder="item.remark"></van-field>
+                :placeholder="item.remark"
+                :rules="[{ required: item.isMust == '1' }]"></van-field>
             </div>
-            <div v-if="item.answerType == 'duox'" class="formLabel z-cell">
+            <div v-if="item.reportCustomCollectionType == 'duox'" class="formLabel z-cell">
               <van-cell>
                 <template #title>
-                  <span v-if="item.isMust == 0" class="van-f-red">*</span>
+                  <span v-if="item.isMust == '1'" class="van-f-red">*</span>
                   {{ 1 + index + '.' }}
-                  {{ item.customName }}
+                  {{ item.reportCustomCollectionName }}
                 </template>
               </van-cell>
-              <z-checkbox
-                :disabled="!item.allowWriteAgain"
-                :answerType="item.answerType"
-                :checkboxval="item.answerValue"
-                :collectionType="item.customOptionList"
-                :textc="item.customId"
-                :zCheckboxcolumns="item.customOptionList"
-                @zSelectVal="zSelectVal"></z-checkbox>
+              <van-field
+                :name="item.reportCustomCollectionName"
+                :rules="[
+                  {
+                    required: item.isMust == '1',
+                    message: '请选择' + item.reportCustomCollectionName,
+                  },
+                ]">
+                <template #input>
+                  <z-checkbox
+                    :checkboxval="item.answerValue"
+                    :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; padding: 10px 0; text-align: right">
+                {{ item.remark }}
+              </p>
             </div>
-            <div v-if="item.answerType == 'dx'" class="formLabel z-cell">
+            <div v-if="item.reportCustomCollectionType == 'dx'" class="formLabel z-cell">
               <van-cell>
                 <template #title>
-                  <span v-if="item.isMust == 0" class="van-f-red">*</span>
+                  <span v-if="item.isMust == '1'" class="van-f-red">*</span>
                   {{ 1 + index + '.' }}
-                  {{ item.customName }}
+                  {{ item.reportCustomCollectionName }}
                 </template>
               </van-cell>
-              <z-radio
-                :disabled="!item.allowWriteAgain"
-                :answerType="item.answerType"
-                :collectionType="item.collectionType"
-                :radio="item.answerValue"
-                :textc="item.customId"
-                :zRadiocolumns="item.customOptionList"
-                @zSelectVal="zSelectVal"></z-radio>
+              <van-field
+                :name="item.reportCustomCollectionName"
+                :rules="[
+                  {
+                    required: item.isMust == '1',
+                    message: '请选择' + item.reportCustomCollectionName,
+                  },
+                ]">
+                <template #input>
+                  <z-radio
+                    :answerType="item.reportCustomCollectionType"
+                    :collectionType="item.collectionType"
+                    :radio="item.answerValue"
+                    :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; padding: 10px 0; text-align: right">
+                {{ item.remark }}
+              </p>
             </div>
           </div>
         </template>
@@ -105,8 +113,8 @@
   </div>
 </template>
 <script>
-import zRadio from '@/components/zRadio2';
-import zCheckbox from '@/components/zCheckbox2';
+import zRadio from '@/components/componentZRadio';
+import zCheckbox from '@/components/componentZCheckbox';
 export default {
   components: { zRadio, zCheckbox },
   props: {
@@ -114,6 +122,10 @@ export default {
       type: Array,
       default: () => [],
     },
+    disabled: {
+      type: Boolean,
+      default: false,
+    },
   },
   watch: {
     reportCustomData: {
@@ -144,11 +156,11 @@ export default {
       this.fromData[this.dateIndex].answerValue = this.formatDate(date);
     },
     numberFn(val, index) {
-      if (this.fromData[index].answerName) {
-        if (!/^[+-]?\d*\.{0,1}\d{0,1}$/.test(this.fromData[index].answerName)) {
-          this.fromData[index].answerName = this.fromData[index].answerName.replace(
+      if (val.answerValue) {
+        if (!/^[+-]?\d*\.{0,1}\d{0,1}$/.test(val.answerValue)) {
+          val.answerValue = val.answerValue.replace(
             /\.\d{2,}$/,
-            this.fromData[index].answerName.substr(this.fromData[index].answerName.indexOf('.'), 3)
+            val.answerValue.substr(val.answerValue.indexOf('.'), 3)
           );
         }
       }
@@ -160,30 +172,83 @@ export default {
       );
     },
     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;
-      //       }
+      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 {
+      //   }
+      //   if (num > 0) {
       //     collectionAnswerlisd.push(value);
       //   }
-      //   this.collectionAnswerlisd = collectionAnswerlisd;
+      // } else {
+      //   collectionAnswerlisd.push(value);
+      // }
+      // this.collectionAnswerlisd = collectionAnswerlisd;
     },
   },
 };
 </script>
-<style lang="scss" scoped>
+<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>