yangfeng
2023-08-25 f417dc0a44d225d4ed19bcb5207250eb1b669455
src/views/client/salesLead/DetailSalesLead.vue
@@ -62,7 +62,7 @@
                </li>
              </ul>
              <div class="business_scope">
                <div class="content-title">{{ "最新进展" }}</div>
                <div class="content-title">{{ "最新进展:" }}</div>
                <div class="content-data">{{ record ? record : "--" }}</div>
              </div>
            </div>
@@ -150,7 +150,9 @@
      isRemarkExpand: true, // 备注信息
      remarkInfoList: [],
      addConfig: {},
      record: ""
      record: "", // 最新进展
      noContactDays: 0,
      newContactDays: ""
    }
  },
  created() {
@@ -168,6 +170,10 @@
    setData(item) {
      if (item.FollowRecord && item.FollowRecord.length > 0) {
        this.record = item.FollowRecord[0].record
        console.log(item.FollowRecord[0].follow_time)
        let follow_time = item.FollowRecord[0].follow_time
        this.newContactDays = follow_time.substring(0, 10)
        this.noContactDays = this.getDiffDay(Date.now(), this.newContactDays)
      }
      this.basicInfoList = [
        {
@@ -216,15 +222,9 @@
      this.dynamicInfoList = [
        {
          leftStr: "未联系天数",
          leftValue: "",
          leftValue: this.noContactDays,
          rightStr: "最新联系日期",
          rightValue: ""
        },
        {
          leftStr: "最新进展",
          leftValue: this.record,
          rightStr: "",
          rightValue: ""
          rightValue: this.newContactDays
        }
      ]
      this.addressInfoList = [
@@ -261,6 +261,19 @@
      } else if (value === "remark") {
        this.isRemarkExpand = !this.isRemarkExpand
      }
    },
    // 计算两个日期之间的差值
    getDiffDay(date_1, date_2) {
      let totalDays, diffDate
      let myDate_1 = date_1
      let myDate_2 = Date.parse(date_2)
      // 将两个日期都转换为毫秒格式,然后做差
      diffDate = Math.abs(myDate_1 - myDate_2) // 取相差毫秒数的绝对值
      totalDays = Math.floor(diffDate / (1000 * 3600 * 24)) // 向下取整
      // console.log(totalDays)
      return totalDays // 相差的天数
    }
  }
}
@@ -329,7 +342,7 @@
              align-items: center;
              height: 40px;
              .content-title {
                width: 220px;
                width: 320px;
                text-align: right;
                color: #555;
              }