Ver código fonte

Merge branch 'feature_20251230_业务员自己可以点评自己' into release

# Conflicts:
#	src/views/week/dailyDetails.vue
zhujindu 4 dias atrás
pai
commit
3bd533051a
1 arquivos alterados com 64 adições e 1 exclusões
  1. 64 1
      src/views/week/dailyDetails.vue

+ 64 - 1
src/views/week/dailyDetails.vue

@@ -540,6 +540,19 @@
             </div>
           </div>
         </div>
+        <div class="contentContainer" v-if="reportTarget.reportRemarks != null">
+          <p class="contentContainerTitle">点评</p>
+          <div style="padding: 10px 0">
+            <van-field
+              v-model="managerRemarkContent"
+              rows="4"
+              autosize
+              maxlength="800"
+              show-word-limit
+              type="textarea"
+              :formatter="formatter" />
+          </div>
+        </div>
       </div>
       <br />
       <div class="contentborder" v-if="reportTarget.status == 2">
@@ -548,6 +561,12 @@
         >
       </div>
       <br />
+      <div class="contentborder" v-if="reportTarget.reportRemarks != null">
+        <van-button type="info" size="small" plain class="Btn1" @click="submintRemark"
+          >提交点评</van-button
+        >
+      </div>
+      <br />
       <br />
     </div>
     <share
@@ -617,6 +636,7 @@ import {
   getReportInfo,
   buryingPoint,
   getDictOption,
+  insertRemark,
 } from '@/api/index';
 import { ImagePreview } from 'vant';
 import visitedRealTime from '@/views/componentsTarget/visitedRealTime';
@@ -705,6 +725,7 @@ export default {
       visitIMG1Flag: false,
       shareVisible: true,
       shareReportConfig: null,
+      managerRemarkContent: '',
     };
   },
   created() {
@@ -802,6 +823,48 @@ export default {
         query: { reportId: this.$route.query.reportId, temporaryShow: 'N' },
       });
     },
+    submintRemark() {
+      let loading1 = this.$toast.loading({
+        duration: 0,
+        message: '数据提交中...',
+        forbidClick: true,
+      });
+      if (this.managerRemarkContent.trim() == '') {
+        this.$toast('点评内容未填写');
+
+        return false;
+      }
+      if (this.managerRemarkContent.length > 800) {
+        this.$toast('点评内容超过800字');
+        return false;
+      }
+      var remak = {
+        remarkContent: this.managerRemarkContent,
+        reportId: this.$route.query.reportId,
+      };
+      insertRemark(remak).then((res) => {
+        loading1.clear();
+        if (res.code == 200) {
+          this.$dialog
+            .alert({
+              title: '系统提示',
+              message: '提交成功',
+            })
+            .then(() => {
+              this.managerRemarkContent = '';
+              this.getDetailById();
+            });
+        } else {
+          this.$toast.fail(res.msg);
+        }
+      });
+    },
+    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() {
       let loading1 = this.$toast.loading({
         duration: 0,
@@ -847,7 +910,7 @@ export default {
                 for (let y = 0; y < sfaReportCustomCollections.length; y++) {
                   let custom = this.shareReportConfig.filter(
                     (val) =>
-                      val.dictValue == sfaReportCustomCollections[y].reportCustomCollectionName
+                      val.dictValue == sfaReportCustomCollections[y].reportCustomCollectionName,
                   );
                   if (custom.length) {
                     custom[0].content = sfaReportCustomCollections[y].answerValue;