Kaynağa Gözat

feature_20251106_0家店拜访原因空格

sunny 4 hafta önce
ebeveyn
işleme
fae5f38a62
1 değiştirilmiş dosya ile 7 ekleme ve 15 silme
  1. 7 15
      src/views/week/daily.vue

+ 7 - 15
src/views/week/daily.vue

@@ -430,7 +430,7 @@
               maxlength="1000"
               show-word-limit
               type="textarea"
-              :formatter="formatterKG" />
+              :formatter="formatter" />
           </div>
         </div>
         <p class="contentContainerTitle">今日机会与挑战总结<span class="colorRed">(必填)</span></p>
@@ -629,16 +629,6 @@ export default {
   },
   methods: {
     // return value.replace(/[^\u4E00-\u9FA5|\d|\a-zA-Z|\r\n\s,.?!,。?!"…—()&_%【】{}:“”‘#~@;:;¥$=()-+-·——/*{}[\]]|\r\n\s/g, '');
-
-    formatterKG(value) {
-      // 去除所有空格
-      value = value.replace(/\s/g, '');
-      // 保留原有的特殊字符过滤逻辑
-      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,
-        ''
-      );
-    },
     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,
@@ -729,10 +719,12 @@ export default {
       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}');
-        this.reportContents[2].contentTime = this.parseTime(new Date(), '{y}-{m}-{d}');
-        this.reportContents[3].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.notVisitReason = this.notVisitReason;
         this.reportTarget.status = '1';
         this.isclick = false;
         tsContents(this.reportTarget).then((res) => {
@@ -779,7 +771,7 @@ export default {
           (this.$route.query.reportId && this.notVisitReason) ||
           this.reportTarget.showNotVisitReason
         ) {
-          if (this.notVisitReason === '') {
+          if (this.notVisitReason.trim() == '') {
             this.$toast('请输入今日拜访0家店的原因!');
             return false;
           }