2213980799@qq.com 1 год назад
Родитель
Сommit
1648f0a7ca

+ 23 - 2
src/api/saleManage/contact.js

@@ -49,7 +49,7 @@ export async function contactSave(data) {
  * 客户证书资质信息分页
  */
 export async function contactQcPackPageAPI(params) {
-  const res = await request.get(`/main/professionCertification/selectByRelationIdAndType`, {params});
+  const res = await request.get(`/main/professionCertification/selectByRelationIdAndType`, { params });
   if (res.data.code == 0) {
     return res.data.data;
   }
@@ -90,7 +90,7 @@ export async function contactQcPackDetailAPI(id) {
  * 删除客户证书资质包
  */
 export async function contactQcPackDeleteAPI(data) {
-  const res = await request.delete(`/main/professionCertification/delete`, {data});
+  const res = await request.delete(`/main/professionCertification/delete`, { data });
   if (res.data.code == 0) {
     return res.data.data;
   }
@@ -207,3 +207,24 @@ export async function contactQueryByCategoryIdsAPI(data) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+
+/**
+ * 发布动态
+ */
+export async function updateContactDynamics(data) {
+  const res = await request.put('/eom/contact/updateContactDynamics', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 回复动态
+ */
+ export async function updateContactComment(data) {
+  const res = await request.put('/eom/contact/updateContactComment', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 1 - 9
src/store/modules/user.js

@@ -57,15 +57,7 @@ export default {
   mutations: {
     // 设置登录用户的信息
     setUserInfo(state, info) {
-      // 当前登录信息
-      if (info?.loginChangeGroupVOList.length > 0) {
-        sessionStorage['currentUser'] = JSON.stringify({
-          currentGroupId: info.loginChangeGroupVOList[0].groupId,
-          currentRoleId:
-            info.loginChangeGroupVOList[0].loginChangeRoleVOList[0]
-              .roleId
-        });
-      }
+    
       state.info = info;
     },
     // 设置登录用户的菜单

+ 14 - 5
src/views/login/index.vue

@@ -124,8 +124,8 @@ export default {
       // 表单数据
       form: {
         loginName: 'mes111',
-          loginPwd: '123456',
-          remember: true
+        loginPwd: '123456',
+        remember: true
       },
       // 验证码base64数据
       captcha: '',
@@ -175,12 +175,19 @@ export default {
         login(this.form)
           .then((res) => {
             localStorage.setItem(`userId-${SYSTEM_NAME}`, res.data.userId);
-           
+            // 当前登录信息
+            if (res.data?.loginChangeGroupVOList.length > 0) {
+              sessionStorage['currentUser'] = JSON.stringify({
+                currentGroupId: res.data.loginChangeGroupVOList[0].groupId,
+                currentRoleId:
+                  res.data.loginChangeGroupVOList[0].loginChangeRoleVOList[0]
+                    .roleId
+              });
+            }
             this.$store.commit('user/setUserInfo', res.data);
             this.loading = false;
             this.$message.success(res.message);
 
-    
             this.$store.dispatch('user/getCurrentUserAuthorityDept');
             this.goHome();
           })
@@ -192,7 +199,9 @@ export default {
     },
     /* 跳转到首页 */
     goHome() {
-      this.$router.push(this.$route?.query?.from ?? '/home/index').catch(() => {});
+      this.$router
+        .push(this.$route?.query?.from ?? '/home/index')
+        .catch(() => {});
     },
     /* 更换图形验证码 */
     changeCaptcha() {

+ 44 - 0
src/views/saleManage/contact/components/darwerComponents/comment.js

@@ -0,0 +1,44 @@
+const comment = {
+    status: "成功",
+    code: 200,
+    data: [
+      {
+        id: 'comment0001', //主键id
+        date: '2018-07-05 08:30',  //评论时间
+        ownerId: 'talents100020', //文章的id
+        fromId: 'errhefe232213',  //评论者id
+        fromName: '犀利的评论家',   //评论者昵称
+        fromAvatar: 'http://ww4.sinaimg.cn/bmiddle/006DLFVFgy1ft0j2pddjuj30v90uvagf.jpg', //评论者头像
+        likeNum: 3, //点赞人数
+        content: 'xxx',  //评论内容
+        reply: [  //回复,或子评论
+          {
+            id: '34523244545',  //主键id
+            commentId: 'comment0001',  //父评论id,即父亲的id
+            fromId: 'observer223432',  //评论者id
+            fromName: '夕阳红',  //评论者昵称
+            fromAvatar: 'https://wx4.sinaimg.cn/mw690/69e273f8gy1ft1541dmb7j215o0qv7wh.jpg', //评论者头像
+            toId: 'errhefe232213',  //被评论者id
+            toName: '犀利的评论家',  //被评论者昵称
+            toAvatar: 'http://ww4.sinaimg.cn/bmiddle/006DLFVFgy1ft0j2pddjuj30v90uvagf.jpg',  //被评论者头像
+            content: 'xxx',  //评论内容
+            date: '2025-01-05 08:35'   //评论时间
+          },
+          {
+            id: '34523244545',
+            commentId: 'comment0001',
+            fromId: 'observer567422',
+            fromName: '清晨一缕阳光',
+            fromAvatar: 'http://imgsrc.baidu.com/imgad/pic/item/c2fdfc039245d688fcba1b80aec27d1ed21b245d.jpg',
+            toId: 'observer223432',
+            toName: '夕阳红',
+            toAvatar: 'https://wx4.sinaimg.cn/mw690/69e273f8gy1ft1541dmb7j215o0qv7wh.jpg',
+            content: 'xxx!',
+            date: '2025-071-05 08:50'
+          }
+        ]
+      }
+    ]
+  };
+   
+  export {comment}

+ 18 - 0
src/views/saleManage/contact/components/darwerComponents/comment.scss

@@ -0,0 +1,18 @@
+$color-main: #409EFF;
+$color-success: #67C23A;
+$color-warning: #E6A23C;
+$color-danger: #F56C6C;
+$color-info: #909399;
+ 
+$text-main: #303133;
+$text-normal: #606266;
+$text-minor: #909399;  //次要文字
+$text-placeholder: #C0C4CC;
+$text-333: #333;
+ 
+$border-first: #DCDFE6;
+$border-second: #E4E7ED;
+$border-third: #EBEEF5;
+$border-fourth: #F2F6FC;
+ 
+$content-bg-color: #fff

+ 335 - 0
src/views/saleManage/contact/components/darwerComponents/comment.vue

@@ -0,0 +1,335 @@
+<!--评论模块-->
+<template>
+  <div class="container">
+    <div
+      class="comment"
+      v-for="(item, index) in contactDynamicsList"
+      :key="index"
+    >
+      <div class="info">
+        <img class="avatar" :src="item.fromAvatar" width="36" height="36" />
+        <div class="right">
+          <div class="name">{{ item.fromName }}</div>
+          <div class="date">{{ item.date }}</div>
+        </div>
+      </div>
+      <div class="content">{{ item.content }}</div>
+      <div class="control">
+        <!-- <span class="like" :class="{active: item.isLike}" @click="likeClick(item)">
+            <i class="iconfont icon-like"></i>
+            <span class="like-num">{{item.likeNum > 0 ? item.likeNum + '人赞' : '赞'}}</span>
+          </span> -->
+        <span class="comment-reply" @click="showCommentInput(item)">
+          <i class="iconfont icon-comment"></i>
+          <span>评论</span>
+        </span>
+      </div>
+      <div class="reply">
+        <div class="item" v-for="reply in item.reply" :key="reply.id">
+          <div class="reply-content">
+            <span class="from-name">{{ reply.fromName }}</span
+            ><span>: </span>
+            <span class="to-name">{{ reply.toName&&'@'+reply.toName }}</span>
+            <span>{{ reply.content }}</span>
+          </div>
+          <div class="reply-bottom">
+            <span>{{ reply.date }}</span>
+            <span class="reply-text" @click="showCommentInput(item, reply)">
+              <i class="iconfont icon-comment"></i>
+              <span>回复</span>
+            </span>
+          </div>
+        </div>
+        <!-- <div
+          class="write-reply"
+          v-if="item.reply.length > 0"
+          @click="showCommentInput(item)"
+        >
+          <i class="el-icon-edit"></i>
+          <span class="add-comment">添加新评论</span>
+        </div> -->
+        <transition name="fade">
+          <div class="input-wrapper" v-if="item.id && showItemId === item.id">
+            <el-input
+              class="gray-bg-input"
+              v-model="inputComment"
+              type="textarea"
+              :rows="3"
+              autofocus
+              placeholder="写下你的评论"
+            >
+            </el-input>
+            <div class="btn-control">
+              <span class="cancel" @click="cancel">取消</span>
+              <el-button class="btn" type="success" round @click="commitComment"
+                >确定</el-button
+              >
+            </div>
+          </div>
+        </transition>
+      </div>
+    </div>
+  </div>
+</template>
+   
+  <script>
+import Vue from 'vue';
+import { updateContactComment,contactDetail } from '@/api/saleManage/contact';
+
+import * as CommentData from './comment.js';
+import { mapGetters } from 'vuex';
+
+export default {
+  components: {},
+  data() {
+    return {
+      inputComment: '',
+      showItemId: '',
+      contactDynamicsList: [],
+      row: {},
+      item: {},
+      reply: {}
+    };
+  },
+  computed: {
+    ...mapGetters(['user'])
+  },
+  methods: {
+    /**
+     * 点赞
+     */
+    likeClick(item) {
+      if (item.isLike === null) {
+        Vue.$set(item, 'isLike', true);
+        item.likeNum++;
+      } else {
+        if (item.isLike) {
+          item.likeNum--;
+        } else {
+          item.likeNum++;
+        }
+        item.isLike = !item.isLike;
+      }
+    },
+
+    /**
+     * 点击取消按钮
+     */
+    cancel() {
+      this.showItemId = '';
+    },
+
+    /**
+     * 提交评论
+     */
+    async commitComment() {
+      await updateContactComment({
+        id:this.row.id,
+        contactDynamicsList: [
+          {
+            id: '', //主键id
+            date: '', //评论时间
+            commentId: this.item.id,
+            fromId: this.user.info.userId, //评论者id
+            fromName: this.user.info.name, //评论者昵称
+            fromAvatar: this.user.info.avatar && this.user.info.avatar[0]?.url, //评论者头像
+            toId: this.reply.fromId, //被评论者id
+            toName: this.reply.fromName, //被评论者昵称
+            toAvatar: this.reply.fromAvatar, //被评论者头像
+            content: this.inputComment //评论内容
+          }
+        ]
+      });
+      this.showItemId = '';
+      const data = await contactDetail(this.row.id);
+      this.init(data.base);
+    },
+    /**
+     * 点击评论按钮显示输入框
+     * item: 当前大评论
+     * reply: 当前回复的评论
+     */
+    showCommentInput(item, reply) {
+    //   if (reply) {
+    //     this.inputComment = '@' + reply.fromName + ' ';
+    //   } else {
+    //     this.inputComment = '';
+    //   }
+    this.inputComment = ''
+      this.item = item;
+      this.reply = reply||{};
+      this.showItemId = item.id;
+    },
+    init(row) {
+      this.row = row;
+      this.contactDynamicsList = row.contactDynamicsList;
+      this.$forceUpdate()
+    }
+  },
+  created() {}
+};
+</script>
+   
+  <style scoped lang="scss">
+@import './comment.scss';
+
+.container {
+  padding: 0 10px;
+  box-sizing: border-box;
+  .comment {
+    display: flex;
+    flex-direction: column;
+    padding: 10px;
+    border-bottom: 1px solid $border-fourth;
+    .info {
+      display: flex;
+      align-items: center;
+      .avatar {
+        border-radius: 50%;
+      }
+      .right {
+        display: flex;
+        flex-direction: column;
+        margin-left: 10px;
+        .name {
+          font-size: 16px;
+          color: $text-main;
+          margin-bottom: 5px;
+          font-weight: 500;
+        }
+        .date {
+          font-size: 12px;
+          color: $text-minor;
+        }
+      }
+    }
+    .content {
+      font-size: 16px;
+      color: $text-main;
+      line-height: 20px;
+      padding: 10px 0;
+    }
+    .control {
+      display: flex;
+      align-items: center;
+      font-size: 14px;
+      color: $text-minor;
+      .like {
+        display: flex;
+        align-items: center;
+        margin-right: 20px;
+        cursor: pointer;
+        &.active,
+        &:hover {
+          color: $color-main;
+        }
+        .iconfont {
+          font-size: 14px;
+          margin-right: 5px;
+        }
+      }
+      .comment-reply {
+        display: flex;
+        align-items: center;
+        cursor: pointer;
+        &:hover {
+          color: $text-333;
+        }
+        .iconfont {
+          font-size: 16px;
+          margin-right: 5px;
+        }
+      }
+    }
+    .reply {
+      margin: 10px 0;
+      border-left: 2px solid $border-first;
+      .item {
+        margin: 0 10px;
+        padding: 10px 0;
+        border-bottom: 1px dashed $border-third;
+        .reply-content {
+          display: flex;
+          align-items: center;
+          font-size: 14px;
+          color: $text-main;
+          .from-name {
+            color: $color-main;
+          }
+          .to-name {
+            color: $color-main;
+            margin-left: 5px;
+            margin-right: 5px;
+          }
+        }
+        .reply-bottom {
+          display: flex;
+          align-items: center;
+          margin-top: 6px;
+          font-size: 12px;
+          color: $text-minor;
+          .reply-text {
+            display: flex;
+            align-items: center;
+            margin-left: 10px;
+            cursor: pointer;
+            &:hover {
+              color: $text-333;
+            }
+            .icon-comment {
+              margin-right: 5px;
+            }
+          }
+        }
+      }
+      .write-reply {
+        display: flex;
+        align-items: center;
+        font-size: 14px;
+        color: $text-minor;
+        padding: 10px;
+        cursor: pointer;
+        &:hover {
+          color: $text-main;
+        }
+        .el-icon-edit {
+          margin-right: 5px;
+        }
+      }
+      .fade-enter-active,
+      fade-leave-active {
+        transition: opacity 0.5s;
+      }
+      .fade-enter,
+      .fade-leave-to {
+        opacity: 0;
+      }
+      .input-wrapper {
+        padding: 10px;
+        .gray-bg-input,
+        .el-input__inner {
+          /*background-color: #67C23A;*/
+        }
+        .btn-control {
+          display: flex;
+          justify-content: flex-end;
+          align-items: center;
+          padding-top: 10px;
+          .cancel {
+            font-size: 16px;
+            color: $text-normal;
+            margin-right: 20px;
+            cursor: pointer;
+            &:hover {
+              color: $text-333;
+            }
+          }
+          .confirm {
+            font-size: 16px;
+          }
+        }
+      }
+    }
+  }
+}
+</style>

+ 153 - 77
src/views/saleManage/contact/components/drawer.vue

@@ -14,97 +14,142 @@
         >客户级别:{{ getDictValue('供应商级别', row.base.level + '') }}</span
       >
     </div>
-    <headerTitle title="摘要卡片" style="margin-top: 15px"></headerTitle>
 
-    <div class="card">
-      <span>销售订单总额:</span>
-      <span> 退货单总额:</span>
-      <span>回款总额:</span>
-      <span> 退款总额:</span>
-      <span>待回款总额:</span>
-    </div>
-    <div class="ele-body" style="height: calc(100% - 124px)">
-      <el-tabs
-        v-model="activeName"
-        style="width: calc(100% - 350px)"
-        type="border-card"
-      >
-        <el-tab-pane label="详细信息" name="详细信息">
-          <contactInfo ref="contactInfoRef"></contactInfo>
-        </el-tab-pane>
-        <el-tab-pane label="银行信息" name="银行信息">
-          <bankInfo ref="bankInfoRef"></bankInfo>
-        </el-tab-pane>
-        <el-tab-pane label="联系人信息" name="联系人信息">
-          <linkInfo ref="linkInfoREf"></linkInfo
-        ></el-tab-pane>
-        <el-tab-pane label="跟进记录" name="跟进记录">
-          <followList ref="followListRef" ></followList
-        ></el-tab-pane>
-        <el-tab-pane label="商机" name="商机">
-          <businessOpportunity
-            :key="row.base.id"
-            :contactId="row.base.id"
-            :contactName="row.base.name"
-          ></businessOpportunity>
-        </el-tab-pane>
+    <div class="ele-body" style="height:100%">
+      <div style="width: calc(100% - 350px);height:100%">
+        <headerTitle title="摘要卡片" style="margin-top: 15px"></headerTitle>
+
+        <div class="card">
+          <span>销售订单总额:</span>
+          <span> 退货单总额:</span>
+          <span>回款总额:</span>
+          <span> 退款总额:</span>
+          <span>待回款总额:</span>
+        </div>
+        <el-tabs v-model="activeName" type="border-card" style="height: calc(100% - 124px)">
+          <el-tab-pane label="详细信息" name="详细信息">
+            <contactInfo ref="contactInfoRef"></contactInfo>
+          </el-tab-pane>
+          <el-tab-pane label="银行信息" name="银行信息">
+            <bankInfo ref="bankInfoRef"></bankInfo>
+          </el-tab-pane>
+          <el-tab-pane label="联系人信息" name="联系人信息">
+            <linkInfo ref="linkInfoREf"></linkInfo
+          ></el-tab-pane>
+          <el-tab-pane label="跟进记录" name="跟进记录">
+            <followList ref="followListRef"></followList
+          ></el-tab-pane>
+          <el-tab-pane label="商机" name="商机">
+            <businessOpportunity
+              :key="row.base.id"
+              :contactId="row.base.id"
+              :contactName="row.base.name"
+            ></businessOpportunity>
+          </el-tab-pane>
 
-        <el-tab-pane label="报价单" name="报价单">
-          <quotation :key="row.base.id" :contactData="row.base"></quotation>
-        </el-tab-pane>
+          <el-tab-pane label="报价单" name="报价单">
+            <quotation :key="row.base.id" :contactData="row.base"></quotation>
+          </el-tab-pane>
 
-        <el-tab-pane label="销售订单" name="销售订单">
-          <saleOrder :key="row.base.id" :contactData="row.base"></saleOrder>
-        </el-tab-pane>
+          <el-tab-pane label="销售订单" name="销售订单">
+            <saleOrder :key="row.base.id" :contactData="row.base"></saleOrder>
+          </el-tab-pane>
 
-        <el-tab-pane label="销售合同" name="销售合同">
-          <contractBook
-            :key="row.base.id"
-            :contactData="row.base"
-          ></contractBook>
-        </el-tab-pane>
-        <el-tab-pane label="回款" name="回款"> </el-tab-pane>
-        <el-tab-pane label="发货单" name="发货单"
-          ><invoice :key="row.base.id" :contactData="row.base"></invoice
-        ></el-tab-pane>
-        <el-tab-pane label="退货单" name="退货单"
-          ><returnGoods :key="row.base.id" :contactData="row.base"></returnGoods
-        ></el-tab-pane>
-        <el-tab-pane label="对账单" name="对账单">
-          <accountstatement :key="row.base.id" :contactData="row.base"></accountstatement>
-        </el-tab-pane>
+          <el-tab-pane label="销售合同" name="销售合同">
+            <contractBook
+              :key="row.base.id"
+              :contactData="row.base"
+            ></contractBook>
+          </el-tab-pane>
+          <!-- <el-tab-pane label="回款" name="回款"> </el-tab-pane> -->
+          <el-tab-pane label="发货单" name="发货单"
+            ><invoice :key="row.base.id" :contactData="row.base"></invoice
+          ></el-tab-pane>
+          <el-tab-pane label="退货单" name="退货单"
+            ><returnGoods
+              :key="row.base.id"
+              :contactData="row.base"
+            ></returnGoods
+          ></el-tab-pane>
+          <el-tab-pane label="对账单" name="对账单">
+            <accountstatement
+              :key="row.base.id"
+              :contactData="row.base"
+            ></accountstatement>
+          </el-tab-pane>
           <!-- <invoiceManage :key="row.base.id"></invoiceManage> -->
-        
-        <el-tab-pane label="开票信息" name="开票信息">
-          <invoiceManage :key="row.base.id" :contactData="row.base"></invoiceManage>
-        </el-tab-pane>
-        <el-tab-pane label="应收信息" name="应收信息"
-          ><receivableManage :key="row.base.id" :contactData="row.base"></receivableManage
-        ></el-tab-pane>
-        <el-tab-pane label="证书资质" name="证书资质">
-          <certificateTable ref="certificateTableRef"></certificateTable>
-        </el-tab-pane>
-        <el-tab-pane label="其他信息" name="其他信息">
-          <otherForm ref="otherFormRef"></otherForm>
-        </el-tab-pane>
-      </el-tabs>
-      <el-card class="box-card" style="width: 350px; margin-left: 15px">
+
+          <el-tab-pane label="开票信息" name="开票信息">
+            <invoiceManage
+              :key="row.base.id"
+              :contactData="row.base"
+            ></invoiceManage>
+          </el-tab-pane>
+          <el-tab-pane label="应收信息" name="应收信息"
+            ><receivableManage
+              :key="row.base.id"
+              :contactData="row.base"
+            ></receivableManage
+          ></el-tab-pane>
+          <el-tab-pane label="证书资质" name="证书资质">
+            <certificateTable ref="certificateTableRef"></certificateTable>
+          </el-tab-pane>
+          <el-tab-pane label="其他信息" name="其他信息">
+            <otherForm ref="otherFormRef"></otherForm>
+          </el-tab-pane>
+        </el-tabs>
+      </div>
+
+      <el-card class="box-card" style="width: 350px; margin-left: 15px;height:100%">
         <div slot="header" class="clearfix">
           <span>客户动态</span>
-          <el-button style="float: right; padding: 3px 0" type="text"
+          <el-button
+            style="float: right; padding: 3px 0"
+            type="text"
+            @click="commitCommentVisible = true"
             >新建</el-button
           >
         </div>
-        <tinymce-editor v-model="content" :init="{ height: 525 }" />
+        <!-- <tinymce-editor v-model="content" :init="{ height: 525 }" /> -->
+        <comment :key="row.base.id" ref="commentRef"></comment>
       </el-card>
+      <ele-modal
+        custom-class="ele-dialog-form long-dialog-form"
+        :centered="true"
+        :visible.sync="commitCommentVisible"
+        :close-on-click-modal="false"
+        :append-to-body="true"
+        width="500px"
+      >
+        <el-form label-width="90px" ref="form" class="el-form-box">
+          <el-form-item label="动态内容">
+            <el-input
+              class="gray-bg-input"
+              v-model="inputComment"
+              type="textarea"
+              :rows="3"
+              autofocus
+              placeholder="发布内容"
+            >
+            </el-input>
+          </el-form-item>
+        </el-form>
+        <div slot="footer" class="footer">
+          <el-button @click="commitCommentVisible = false">取消</el-button>
+          <el-button type="primary" @click="commitComment">发布</el-button>
+        </div>
+      </ele-modal>
     </div>
   </el-drawer>
 </template>
 
 <script>
-import { contactDetail } from '@/api/saleManage/contact';
+import { contactDetail, updateContactDynamics } from '@/api/saleManage/contact';
 import dictMixins from '@/mixins/dictMixins';
 import contactInfo from './darwerComponents/contactInfo.vue';
+
+import comment from './darwerComponents/comment.vue';
+
 //银行
 import bankInfo from './darwerComponents/bankInfo.vue';
 //联系人
@@ -134,6 +179,8 @@ import receivableManage from '@/views/financialManage/receivableManage/index.vue
 //跟进
 import followList from './darwerComponents/followList.vue';
 import TinymceEditor from '@/components/TinymceEditor/index.vue';
+import { mapGetters } from 'vuex';
+
 export default {
   mixins: [dictMixins],
 
@@ -151,7 +198,10 @@ export default {
     receivableManage,
     invoice,
     followList,
-    TinymceEditor,returnGoods,accountstatement
+    TinymceEditor,
+    returnGoods,
+    accountstatement,
+    comment
   },
   data() {
     return {
@@ -159,13 +209,17 @@ export default {
       title: '',
       activeName: '详细信息',
       row: {},
-      content: ''
+      content: '',
+      commitCommentVisible: false,
+      inputComment: ''
     };
   },
   created() {
     this.requestDict('供应商级别');
   },
-
+  computed: {
+    ...mapGetters(['user'])
+  },
   methods: {
     async open(row) {
       this.row = await contactDetail(row.id);
@@ -177,8 +231,30 @@ export default {
         this.$refs.otherFormRef.init(this.row.other);
         this.$refs.certificateTableRef.init(this.row.base);
         this.$refs.followListRef.init(this.row);
-        
+        this.$refs.commentRef.init(this.row.base);
+      });
+    },
+    async commitComment() {
+      await updateContactDynamics({
+        id: this.row.base.id,
+        contactDynamicsList: [
+          {
+            id: '', //主键id
+            date: '', //评论时间
+            ownerId: '', //文章的id
+            fromId: this.user.info.userId, //评论者id
+            fromName: this.user.info.name, //评论者昵称
+            fromAvatar: this.user.info.avatar && this.user.info.avatar[0]?.url, //评论者头像
+            content: this.inputComment, //评论内容
+            reply: [
+              //回复,或子评论
+            ]
+          }
+        ]
       });
+      this.commitCommentVisible = false;
+      this.row = await contactDetail(this.row.base.id);
+      this.$refs.commentRef.init(this.row.base);
     },
     handleClose(done) {
       this.$confirm('确认关闭?')

+ 6 - 2
src/views/saleManage/saleOrder/invoice/components/print-template.vue

@@ -97,6 +97,7 @@
             <!-- <td style="padding: 2.5px"> 型号 </td> -->
             <td style="padding: 2.5px"> 单位 </td>
             <td style="padding: 2.5px"> 数量 </td>
+            <td style="padding: 2.5px"> 块数 </td>
             <td style="padding: 2.5px"> 强度 </td>
             <td style="padding: 2.5px"> 密度 </td>
             <td style="padding: 2.5px" v-if="isPrintPrice"> 单价(元) </td>
@@ -110,6 +111,7 @@
             <!-- <td style="padding: 2.5px">{{ item.modelType }}</td> -->
             <td style="padding: 2.5px">{{ item.measuringUnit }}</td>
             <td style="padding: 2.5px">{{ item.totalCount }}</td>
+            <td style="padding: 2.5px">{{ item.blockCount }}</td>
             <td style="padding: 2.5px">{{
               item.extField.packagingStrength
             }}</td>
@@ -169,7 +171,7 @@
               承运人:{{ this.formData.driverNames }}</td
             >
             <td colspan="3" style="padding: 2.5px">
-              装卸工:{{ this.formData.deviceName }}</td
+              装卸工:{{ this.formData.carName }}</td
             >
             <td colspan="3" style="padding: 2.5px"> 签收人:</td>
             <td colspan="3" style="padding: 2.5px">
@@ -234,7 +236,8 @@ export default {
       QRvisible: false,
       isPrintPrice: false,
       codeList: [],
-      formData: {}
+      formData: {},
+      carName:""
     };
   },
 
@@ -244,6 +247,7 @@ export default {
       getSendSaleOrderrecordDetail(id).then((data) => {
         if (JSON.stringify(data) != '{}') {
           this.formData = data;
+          this.formData['carName']=data.carList.map(item=>item.name).toString()
           this.formData.projectName = data.saleOrder?.projectName;
           this.formData.driverNames = data.logisticTrakListNoteVOList
             .map((item) => item.driverName)