yusheng 1 год назад
Родитель
Сommit
be0bbcc543

+ 7 - 17
src/views/purchasingManage/inquiryManage/index.vue

@@ -65,10 +65,7 @@
               {{ row.planCode }}</el-link
             >
           </template>
-          <!-- 状态 -->
-          <template v-slot:status="{ row }">
-            {{ getStatus(row.status) }}
-          </template>
+       
 
           <!-- 操作列 -->
           <template v-slot:action="{ row }">
@@ -169,6 +166,7 @@
   } from '@/api/purchasingManage/inquiryManage';
   import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
   import tabMixins from '@/mixins/tableColumnsMixin';
+  import { reviewStatus } from '@/enum/dict';
 
   export default {
     mixins: [dictMixins, tabMixins],
@@ -317,7 +315,10 @@
             prop: 'status',
             label: '状态',
             align: 'center',
-            slot: 'status',
+            formatter: (_row, _column, cellValue) => {
+              return reviewStatus[cellValue]
+            },
+          
             showOverflowTooltip: true,
             minWidth: 120
           },
@@ -537,18 +538,7 @@
         //     this.$message.error(e.message);
         //   });
       },
-      //获取状态
-      getStatus(status) {
-        return status == 0
-          ? '未提交'
-          : status == 1
-          ? '审核中'
-          : status == 2
-          ? '审核通过'
-          : status == 3
-          ? '审核不通过'
-          : '';
-      }
+
     }
   };
 </script>

+ 8 - 33
src/views/purchasingManage/purchaseNeedManage/index.vue

@@ -53,10 +53,7 @@
               {{ row.requirementName }}</el-link
             >
           </template>
-          <!-- 状态 -->
-          <template v-slot:status="{ row }">
-            {{ getStatus(row.status) }}
-          </template>
+
 
           <!-- 操作列 -->
           <template v-slot:action="{ row }">
@@ -144,6 +141,7 @@
   } from '@/api/purchasingManage/purchaseNeedManage';
   import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
   import tabMixins from '@/mixins/tableColumnsMixin';
+  import { reviewStatus } from '@/enum/dict';
   
   export default {
     mixins: [dictMixins,tabMixins],
@@ -243,7 +241,9 @@
             prop: 'status',
             label: '状态',
             align: 'center',
-            slot: 'status',
+            formatter: (_row, _column, cellValue) => {
+              return reviewStatus[cellValue]
+            },
             showOverflowTooltip: true,
             minWidth: 120
           },
@@ -336,39 +336,14 @@
               businessName: res.requirementName,
               businessType: res.sourceTypeName
             }
-            // callBackMethodType : '1',
-            // callBackMethod : 'proTargetPlanApproveApiImpl.updatePlanApprovalStatus',
-            // pcHandle : '/bpm/handleTask/components/project-manage/plan-manage/submit.vue',
-            // pcView : '/bpm/handleTask/components/project-manage/plan-manage/detailDialog.vue',
-            // miniHandle : '',
-            // miniView : '',
+          
           };
 
           this.$refs.processSubmitDialogRef.init(params);
         });
-        // submit({
-        //   businessId: res.id
-        // })
-        //   .then((res) => {
-        //     this.$message.success('提交成功');
-        //     this.reload();
-        //   })
-        //   .catch((e) => {
-        //     this.$message.error(e.message);
-        //   });
+      
       },
-      //获取状态
-      getStatus(status) {
-        return status == 0
-          ? '未提交'
-          : status == 1
-          ? '审核中'
-          : status == 2
-          ? '审核通过'
-          : status == 3
-          ? '审核不通过'
-          : '';
-      }
+
     }
   };
 </script>

+ 146 - 346
src/views/purchasingManage/purchasePlanManage/index.vue

@@ -1,9 +1,28 @@
 <template>
   <div class="ele-body">
     <el-card shadow="never" v-loading="loading" style="width: 100%">
-      <div class="ele-border-lighter form-content" v-loading="loading">
-        <search-quotation @search="reload"></search-quotation>
-        <div style="margin-bottom: 10px">
+      <!-- <div class="ele-border-lighter form-content" v-loading="loading"> -->
+      <search-quotation @search="reload"></search-quotation>
+      <!-- 数据表格 -->
+      <ele-pro-table
+        ref="table"
+        :columns="columns"
+        :datasource="datasource"
+        height="calc(100vh - 375px)"
+        full-height="calc(100vh - 116px)"
+        tool-class="ele-toolbar-form"
+        default-expand-all
+        row-key="id"
+        :tree-props="{
+          children: 'sonPurchasePlanList',
+          hasChildren: 'hasChildren'
+        }"
+        :page-size="20"
+        @columns-change="handleColumnChange"
+        :cache-key="cacheKeyUrl"
+      >
+        <!-- 表头工具栏 -->
+        <template v-slot:toolbar>
           <el-button
             size="small"
             type="primary"
@@ -34,256 +53,108 @@
             apiUrl="/eom/purchaseplan/export"
             :params="params"
           ></exportButton>
-        </div>
-        <el-table
-          :data="tableList"
-          style="width: 100%; margin-bottom: 20px"
-          height="calc(100vh - 375px)"
-          row-key="id"
-          border
-          default-expand-all
-          :tree-props="{
-            children: 'sonPurchasePlanList',
-            hasChildren: 'hasChildren'
-          }"
-        >
-          <el-table-column
-            prop=""
-            type="index"
-            label="序号"
-            :width="60"
-            :showOverflowTooltip="true"
-            align="center"
-          >
-          </el-table-column>
-          <el-table-column
-            prop="planCode"
-            label="采购计划单编码"
-            :minWidth="200"
-            :sortable="true"
-            :showOverflowTooltip="true"
-            align="center"
-          >
-            <template slot-scope="{ row }">
-              <el-link
-                type="primary"
-                :underline="false"
-                @click="openDetail(row)"
-              >
-                {{ row.planCode }}
-              </el-link>
-            </template>
-          </el-table-column>
-          <el-table-column
-            prop="planCode"
-            label="计划进度"
-            :minWidth="120"
-            :showOverflowTooltip="true"
-            align="center"
-          >
-            <template slot-scope="{ row }">
-              {{ purchasePlanProgressStatusEnum(row.progress) }}
-            </template>
-          </el-table-column>
-          <el-table-column
-            prop="planName"
-            label="采购计划单名称"
-            :minWidth="150"
-            :showOverflowTooltip="true"
-            align="center"
-          >
-          </el-table-column>
-          <el-table-column
-            prop="requirementName"
-            label="采购需求单名称"
-            :minWidth="150"
-            :showOverflowTooltip="true"
-            align="center"
-          >
-            <template slot-scope="{ row }">
-              <el-link
-                type="primary"
-                :underline="false"
-                @click="openNeedDetail(row)"
-              >
-                {{ row.requirementName }}
-              </el-link>
-            </template>
-          </el-table-column>
-          <el-table-column
-            prop="productNames"
-            label="产品名称"
-            :minWidth="120"
-            :showOverflowTooltip="true"
-            align="center"
-          >
-          </el-table-column>
-          <el-table-column
-            prop="sourceTypeName"
-            label="需求类型"
-            :minWidth="120"
-            :showOverflowTooltip="true"
-            align="center"
-          >
-          </el-table-column>
-          <el-table-column
-            prop="requireDeptName"
-            label="需求部门"
-            :minWidth="120"
-            :showOverflowTooltip="true"
-            align="center"
+        </template>
+
+        <!-- 查看详情列 -->
+        <template v-slot:planCode="{ row }">
+          <el-link type="primary" :underline="false" @click="openDetail(row)">
+            {{ row.planCode }}
+          </el-link>
+        </template>
+        <template v-slot:requirementName="{ row }">
+          <el-link
+            type="primary"
+            :underline="false"
+            @click="openNeedDetail(row)"
           >
-          </el-table-column>
-          <el-table-column
-            prop="requireUserName"
-            label="需求人"
-            :minWidth="80"
-            :showOverflowTooltip="true"
-            align="center"
+            {{ row.requirementName }}
+          </el-link>
+        </template>
+        <template v-slot:action="{ row }">
+          <el-link
+            type="primary"
+            :underline="false"
+            icon="el-icon-edit"
+            v-if="
+              (isNeed_process_is_close &&
+                [0, 3].includes(row.status) &&
+                !row.isCut) ||
+              (!isNeed_process_is_close && !row.isCut)
+            "
+            @click="openEdit('edit', row)"
           >
-          </el-table-column>
-          <el-table-column
-            prop="responsibleName"
-            label="负责人"
-            :minWidth="80"
-            :showOverflowTooltip="true"
-            align="center"
+            修改
+          </el-link>
+          <el-link
+            type="primary"
+            :underline="false"
+            icon="el-icon-edit"
+            v-if="isNeed_process_is_close && [0, 3].includes(row.status)"
+            @click="submitPlan(row)"
           >
-          </el-table-column>
-          <el-table-column
-            prop="detailCount"
-            label="明细条数"
-            :minWidth="80"
-            :showOverflowTooltip="true"
-            align="center"
+            提交
+          </el-link>
+          <el-link
+            type="primary"
+            :underline="false"
+            icon="el-icon-edit"
+            v-if="
+              [2].includes(row.status) &&
+              (!row.parentId || row.parentId == 0) &&
+              [0].includes(row.progress) &&
+              !orderSourceType.includes(row.sourceType) &&
+              row.acceptUnpack == 1
+            "
+            @click="handleSplit(row)"
           >
-          </el-table-column>
-          <el-table-column
-            prop="createTime"
-            label="创建时间"
-            :minWidth="160"
-            :showOverflowTooltip="true"
-            align="center"
+            拆分
+          </el-link>
+          <el-link
+            type="primary"
+            :underline="false"
+            v-if="
+              [2].includes(row.status) &&
+              (!row.isCut || (row.parentId && row.parentId != 0)) &&
+              isAddInquiry == 0
+            "
+            icon="el-icon-plus"
+            @click="addInquiry('add', row)"
           >
-          </el-table-column>
-          <el-table-column
-            prop="status"
-            label="状态"
-            :minWidth="80"
-            :showOverflowTooltip="true"
-            align="center"
+            生成核价单
+          </el-link>
+          <el-link
+            type="primary"
+            :underline="false"
+            v-if="
+              [2].includes(row.status) &&
+              (!row.isCut || (row.parentId && row.parentId != 0)) &&
+              isAddInquiry != 0 &&
+              [0, 100, 101, 103].includes(row.progress)
+            "
+            icon="el-icon-plus"
+            @click="addInquiry('add', row)"
           >
-            <template slot-scope="{ row }">
-              {{ getStatus(row.status) }}
-            </template>
-          </el-table-column>
-          <el-table-column
-            prop=""
-            label="操作"
-            :minWidth="200"
-            :resizable="false"
-            align="center"
+            生成核价单
+          </el-link>
+          <el-popconfirm
+            class="ele-action"
+            title="确定要删除此信息吗?"
+            v-if="
+              (isNeed_process_is_close &&
+                [0, 3].includes(row.status) &&
+                !row.isCut) ||
+              (!isNeed_process_is_close && !row.isCut)
+            "
+            @confirm="remove([row.id])"
           >
-            <template slot-scope="{ row }">
-              <el-link
-                type="primary"
-                :underline="false"
-                icon="el-icon-edit"
-                v-if="
-                  (isNeed_process_is_close &&
-                    [0, 3].includes(row.status) &&
-                    !row.isCut) ||
-                  (!isNeed_process_is_close && !row.isCut)
-                "
-                @click="openEdit('edit', row)"
-              >
-                修改
-              </el-link>
-              <el-link
-                type="primary"
-                :underline="false"
-                icon="el-icon-edit"
-                v-if="isNeed_process_is_close && [0, 3].includes(row.status)"
-                @click="submitPlan(row)"
-              >
-                提交
-              </el-link>
-              <el-link
-                type="primary"
-                :underline="false"
-                icon="el-icon-edit"
-                v-if="
-                  [2].includes(row.status) &&
-                  (!row.parentId || row.parentId == 0) &&
-                  [0].includes(row.progress) &&
-                  !orderSourceType.includes(row.sourceType)&&row.acceptUnpack==1
-                "
-                @click="handleSplit(row)"
-              >
-                拆分
-              </el-link>
-              <el-link
-                type="primary"
-                :underline="false"
-                v-if="
-                  [2].includes(row.status) &&
-                  (!row.isCut || (row.parentId && row.parentId != 0)) &&
-                  isAddInquiry == 0
-                "
-                icon="el-icon-plus"
-                @click="addInquiry('add', row)"
-              >
-                生成核价单
+            <template v-slot:reference>
+              <el-link type="danger" :underline="false" icon="el-icon-delete">
+                删除
               </el-link>
-              <el-link
-                type="primary"
-                :underline="false"
-                v-if="
-                  [2].includes(row.status) &&
-                  (!row.isCut || (row.parentId && row.parentId != 0)) &&
-                  isAddInquiry != 0 &&
-                  [0, 100, 101, 103].includes(row.progress)
-                "
-                icon="el-icon-plus"
-                @click="addInquiry('add', row)"
-              >
-                生成核价单
-              </el-link>
-              <el-popconfirm
-                class="ele-action"
-                title="确定要删除此信息吗?"
-                v-if="
-                  (isNeed_process_is_close &&
-                    [0, 3].includes(row.status) &&
-                    !row.isCut) ||
-                  (!isNeed_process_is_close && !row.isCut)
-                "
-                @confirm="remove([row.id])"
-              >
-                <template v-slot:reference>
-                  <el-link
-                    type="danger"
-                    :underline="false"
-                    icon="el-icon-delete"
-                  >
-                    删除
-                  </el-link>
-                </template>
-              </el-popconfirm>
             </template>
-          </el-table-column>
-        </el-table>
-        <el-pagination
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-          :current-page="pageNum"
-          :page-sizes="[10, 20, 30, 40, 50, 100]"
-          :page-size="pageSize"
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="total"
-        >
-        </el-pagination>
-      </div>
+          </el-popconfirm>
+        </template>
+      </ele-pro-table>
     </el-card>
 
     <add-dialog
@@ -341,9 +212,11 @@
   import { orderSourceType } from '@/enum/dict';
   import exportButton from '@/components/upload/exportButton.vue';
   import { getWarehouseListByIds } from '@/api/purchasingManage/returnGoods';
+  import { reviewStatus } from '@/enum/dict';
+  import tabMixins from '@/mixins/tableColumnsMixin';
 
   export default {
-    mixins: [dictMixins],
+    mixins: [dictMixins,tabMixins],
     components: {
       processSubmitDialog,
       searchQuotation,
@@ -358,19 +231,14 @@
     },
     data() {
       return {
-        pageSize: 20,
-        pageNum: 1,
-        where: {},
-        total: 0,
-        selection: [], //单选中集合
-        tableList: [], //单选中集合
-        delVisible: false, //批量删除弹框状态
         loading: false, // 加载状态
         processSubmitDialogFlag: false,
         splitDialogFlag: false, // 加载状态
         isAddInquiry: 0,
         orderSourceType,
-        params: {}
+        params: {},
+        cacheKeyUrl: 'eos-c2e9664a-purchasingManage-purchasePlanManage',
+
       };
     },
     //客户管理数据
@@ -385,12 +253,6 @@
     computed: {
       columns() {
         return [
-          {
-            width: 45,
-            type: 'selection',
-            columnKey: 'selection',
-            align: 'center'
-          },
           {
             columnKey: 'index',
             label: '序号',
@@ -398,7 +260,8 @@
             width: 55,
             align: 'center',
             showOverflowTooltip: true,
-            fixed: 'left'
+            fixed: 'left',
+            className: 'backgroundWhite'
           },
           {
             prop: 'planCode',
@@ -406,12 +269,11 @@
             label: '采购计划单编码',
             align: 'center',
             sortable: true,
-            // showOverflowTooltip: true,
             minWidth: 210
           },
           {
             prop: 'progress',
-            label: '订单进度',
+            label: '计划进度',
             align: 'center',
             showOverflowTooltip: true,
             formatter: (_row, _column, cellValue) => {
@@ -488,13 +350,6 @@
             minWidth: 140
           },
 
-          // {
-          //   prop: 'finishDate',
-          //   label: '完成日期',
-          //   align: 'center',
-          //   showOverflowTooltip: true,
-          //   minWidth: 140
-          // },
           {
             prop: 'createTime',
             label: '创建时间',
@@ -506,17 +361,13 @@
             prop: 'status',
             label: '状态',
             align: 'center',
-            slot: 'status',
+            formatter: (_row, _column, cellValue) => {
+              return reviewStatus[cellValue];
+            },
             showOverflowTooltip: true,
             minWidth: 120
           },
-          // {
-          //   prop: 'remark',
-          //   label: '备注',
-          //   align: 'center',
-          //   showOverflowTooltip: true,
-          //   minWidth: 170
-          // },
+
           {
             columnKey: 'action',
             label: '操作',
@@ -525,14 +376,15 @@
             resizable: false,
             slot: 'action',
             showOverflowTooltip: true,
-            fixed: 'right'
+            fixed: 'right',
+            className: 'backgroundWhite'
           }
         ];
       }
     },
     created() {
       this.requestDict('客户状态');
-      this.datasource();
+      // this.datasource();
       //采购管理采购计划是否可以重复生成核价单
       parameterGetByCode({
         code: 'purchasingManage_purchasePlanManage_isAddInquiry'
@@ -541,51 +393,26 @@
       });
     },
     methods: {
-      purchasePlanProgressStatusEnum(progress) {
-        return purchasePlanProgressStatusEnum.find(
-          (val) => val.value == progress
-        )?.label;
-      },
       /* 表格数据源 */
-      async datasource(
-        pageNum = this.pageNum,
-        pageSize = this.pageSize,
-        where = this.where
-      ) {
+      datasource({ page, limit, where, order }) {
         if (this.saleOrderData.id) {
           where['saleOrderCode'] = this.saleOrderData.orderNo;
         }
         this.params = {
-          pageNum: pageNum,
-          size: pageSize,
+          pageNum: page,
+          size: limit,
           ...where
         };
-        const row = await getTableList(this.params);
-        this.tableList = row.list;
-        this.total = row.count;
-      },
-      handleSizeChange(val) {
-        this.pageSize = val;
-        this.datasource();
-      },
-      handleCurrentChange(val) {
-        this.pageNum = val;
-        this.datasource();
+        return getTableList({
+          pageNum: page,
+          size: limit,
+          ...where
+        });
       },
-      // /* 表格数据源 */
-      // datasource({page, limit, where}) {
-      //   return getTableList({
-      //     pageNum: page,
-      //     size: limit,
-      //     ...where
-      //   });
-      // },
 
       /* 刷新表格 */
       reload(where) {
-        this.where = where;
-        this.pageNum = 1;
-        this.datasource(this.pageNum, this.pageSize, this.where);
+        this.$refs.table.reload({ page: 1, where });
       },
       async submitPlan(row) {
         this.processSubmitDialogFlag = true;
@@ -615,10 +442,6 @@
 
           this.$refs.processSubmitDialogRef.init(params);
         });
-        // row.detailList = [];
-        // await saveAndSubmitPurchasePlanAPI(row);
-        // this.$message.success('提交成功');
-        // this.reload();
       },
       //新增编辑
       openEdit(type, row) {
@@ -650,17 +473,6 @@
         });
       },
 
-      //批量删除
-      allDelBtn() {
-        if (this.selection.length === 0) return;
-        let flag = this.selection.some((item) => [1, 2].includes(item.status));
-        if (flag)
-          return this.$message.warning(
-            '抱歉已审核、审核中的数据不能删除,请检查'
-          );
-        this.delVisible = true;
-      },
-
       //删除接口
       remove(delData) {
         deleteInformation(delData).then((res) => {
@@ -669,12 +481,6 @@
         });
       },
 
-      //删除弹框确定
-      commitBtn() {
-        const dataId = this.selection.map((v) => v.id);
-        this.remove(dataId);
-      },
-
       //查看详情
       openDetail(row) {
         this.$refs.contactDetailDialogRef.open(row);
@@ -684,18 +490,6 @@
         this.$refs.DetailNeedDialogRef.open(row);
       },
 
-      //获取状态
-      getStatus(status) {
-        return status == 0
-          ? '未提交'
-          : status == 1
-          ? '审核中'
-          : status == 2
-          ? '审核通过'
-          : status == 3
-          ? '审核不通过'
-          : '';
-      },
       //生成
       handleAutoGenerate() {
         this.$refs.autogenerateDialogRef.init(this.saleOrderData.id, false);
@@ -708,6 +502,9 @@
   :deep(.el-link--inner) {
     margin-left: 0px !important;
   }
+  // :deep(.is-hidden){
+  //   background: #fff;
+  // }
 
   .sys-organization-list {
     height: calc(100vh - 264px);
@@ -754,4 +551,7 @@
   ::v-deep .el-table__row--level-0 {
     background: rgb(156 249 177);
   }
+  :deep(.backgroundWhite) {
+    background: white;
+  }
 </style>

+ 237 - 221
src/views/saleManage/contact/components/darwerComponents/comment.vue

@@ -14,6 +14,15 @@
         </div>
       </div>
       <div class="content">{{ item.content }}</div>
+      <div class="imgS">
+        <el-image
+          v-for="(url, index) in item.imgs"
+          :key="index"
+          style="width: 80px; height: 80px; margin-right: 5px"
+          :src="url"
+          :preview-src-list="item.imgs"
+      /></div>
+
       <div class="control">
         <!-- <span class="like" :class="{active: item.isLike}" @click="likeClick(item)">
             <i class="iconfont icon-like"></i>
@@ -29,7 +38,9 @@
           <div class="reply-content">
             <span class="from-name">{{ reply.fromName }}</span
             ><span>: </span>
-            <span class="to-name">{{ reply.toName&&'@'+reply.toName }}</span>
+            <span class="to-name">{{
+              reply.toName && '@' + reply.toName
+            }}</span>
             <span>{{ reply.content }}</span>
           </div>
           <div class="reply-bottom">
@@ -48,6 +59,7 @@
           <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
@@ -71,265 +83,269 @@
     </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';
+<script>
+  import Vue from 'vue';
+  import {
+    updateContactComment,
+    contactDetail
+  } from '@/api/saleManage/contact';
 
-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 {
+  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;
         }
-        item.isLike = !item.isLike;
-      }
-    },
+      },
 
-    /**
-     * 点击取消按钮
-     */
-    cancel() {
-      this.showItemId = '';
-    },
+      /**
+       * 点击取消按钮
+       */
+      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;
+      /**
+       * 提交评论
+       */
+      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();
+      }
     },
-    init(row) {
-      this.row = row;
-      this.contactDynamicsList = row.contactDynamicsList;
-      this.$forceUpdate()
-    }
-  },
-  created() {}
-};
+    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 {
+<style scoped lang="scss">
+  @import './comment.scss';
+
+  .container {
+    padding: 0 10px;
+    box-sizing: border-box;
+    .comment {
       display: flex;
-      align-items: center;
-      font-size: 14px;
-      color: $text-minor;
-      .like {
+      flex-direction: column;
+      padding: 10px;
+      border-bottom: 1px solid $border-fourth;
+      .info {
         display: flex;
         align-items: center;
-        margin-right: 20px;
-        cursor: pointer;
-        &.active,
-        &:hover {
-          color: $color-main;
+        .avatar {
+          border-radius: 50%;
         }
-        .iconfont {
-          font-size: 14px;
-          margin-right: 5px;
+        .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;
+          }
         }
       }
-      .comment-reply {
+      .content {
+        font-size: 16px;
+        color: $text-main;
+        line-height: 20px;
+        padding: 10px 0;
+      }
+      .control {
         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 {
+        font-size: 14px;
+        color: $text-minor;
+        .like {
           display: flex;
           align-items: center;
-          font-size: 14px;
-          color: $text-main;
-          .from-name {
+          margin-right: 20px;
+          cursor: pointer;
+          &.active,
+          &:hover {
             color: $color-main;
           }
-          .to-name {
-            color: $color-main;
-            margin-left: 5px;
+          .iconfont {
+            font-size: 14px;
             margin-right: 5px;
           }
         }
-        .reply-bottom {
+        .comment-reply {
           display: flex;
           align-items: center;
-          margin-top: 6px;
-          font-size: 12px;
-          color: $text-minor;
-          .reply-text {
+          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;
-            margin-left: 10px;
-            cursor: pointer;
-            &:hover {
-              color: $text-333;
+            font-size: 14px;
+            color: $text-main;
+            .from-name {
+              color: $color-main;
             }
-            .icon-comment {
+            .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;
+        .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;
+          }
         }
-        .el-icon-edit {
-          margin-right: 5px;
+        .fade-enter-active,
+        fade-leave-active {
+          transition: opacity 0.5s;
         }
-      }
-      .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;*/
+        .fade-enter,
+        .fade-leave-to {
+          opacity: 0;
         }
-        .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;
-            }
+        .input-wrapper {
+          padding: 10px;
+          .gray-bg-input,
+          .el-input__inner {
+            /*background-color: #67C23A;*/
           }
-          .confirm {
-            font-size: 16px;
+          .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>
+</style>

+ 2 - 2
src/views/targetManage/salesTarget/components/addOrEditDialog.vue

@@ -209,7 +209,7 @@ const defForm = {
 };
 import {
   targetDefinitionPage,
-  salesTargetSave
+  salesTargetSave,getById
 } from '@/api/targetManage/index.js';
 import {
   getTargetManageTree,
@@ -314,7 +314,7 @@ export default {
       this.title = type == 'add' ? '新增' : '修改';
       this.dialogType = type;
       if (type !== 'add') {
-        this.form = JSON.parse(JSON.stringify(row));
+      this.form = await getById(row.id);
         if (this.form.departmentId) {
           this.getUserList({ groupId: this.form.departmentId });
         }

+ 3 - 4
src/views/targetManage/salesTarget/components/viewDialog.vue

@@ -206,7 +206,6 @@
     created() {},
     methods: {
       renderContent(h, data) {
-        console.log(data.number&&new Decimal(data.number)/ new Decimal(10000))
         let ratio = +(
           (data.number /
             (data.unit == '万元' ? data.value * 10000 : data.value)) *
@@ -220,14 +219,14 @@
               {data.type && <span class="tree_unit">{data.unit}</span>}
             </div>
             
-            {/* {(data.type && data.value && data.number &&data.number!=0&& (
+            {(data.type && data.value && data.number &&data.number!=0&& (
               <span class="label">
                 完成:
-                {data.unit == '万元' ? new Decimal(data.number).div(new Decimal(10000)) : data.number}
+                {data.unit == '万元' ? Decimal(data.number).div(Decimal(10000)).toString() : data.number}
                 {data.unit}
               </span>
             )) ||
-              ''} */}
+              ''}
 
             {(data.type &&
               data.value &&