yangfeng
2023-08-18 96fdf32bd5612b6c16dcbcc8352a9f54adcc8e7e
src/views/client/contacts/index.vue
@@ -57,6 +57,12 @@
    isDetail: {
      type: Boolean,
      default: false
    },
    addConfig: {
      type: Object,
      default: () => {
        return {}
      }
    }
  },
  mixins: [pageMixin],
@@ -113,7 +119,14 @@
  },
  created() {
    this.setTable()
    this.getData()
    if (!this.isDetail) {
      this.search_map = {}
    } else {
      this.search_map = {
        [this.addConfig.id_name]: this.addConfig.client_name
      }
    }
    this.getData(this.search_map)
  },
  methods: {
    setTable() {
@@ -125,8 +138,8 @@
          { label: "联系人编号", prop: "number", min: 100 }, // 联系人编号
          { label: "职务", prop: "position", min: 120 }, // 职务
          { label: "手机", prop: "phone", min: 100 }, // 手机号码
          { label: "销售负责人", prop: "member_id", min: 120 }, // 销售负责人
          { label: "首要联系人", prop: "is_first", min: 90 } // 首要联系人
          { label: "销售负责人", prop: "member_name", min: 120 }, // 销售负责人
          { label: "首要联系人", prop: "is_first", isFirst: true, min: 90 } // 首要联系人
        ]
      }
      this.searchOptions = []
@@ -152,8 +165,8 @@
                return {
                  ...item,
                  client_name: item.Client.name,
                  is_first: item.is_first ? "是" : "否",
                  client_id: item.Client.id
                  client_id: item.Client.id,
                  member_name: item.member.username
                }
              })
              this.tableList.tableInfomation = list || []
@@ -188,7 +201,8 @@
    addBtnClick() {
      this.editConfig.visible = true
      this.editConfig.title = "新建"
      this.editConfig.infomation = {}
      console.log(this.addIdConfig)
      this.editConfig.infomation = { ...this.addConfig }
    },
    // 编辑
    handleClick(row) {