src/views/client/contacts/AddContactsDialog.vue
@@ -14,7 +14,7 @@
        :model="editConfig.infomation"
        :rules="rules"
        label-position="right"
        label-width="308px"
        label-width="120px"
        size="mini"
      >
        <!-- 信息 -->
@@ -41,12 +41,17 @@
                      :fetch-suggestions="querySearchAsync"
                      value-key="name"
                      @select="handleSelectClient"
                      style="width: 100%"
                    ></el-autocomplete>
                    <div class="common-select-btn" @click="selClientClick">
                      <i class="el-icon-circle-plus-outline" title="选择"></i>
                    </div>
                    <div class="common-select-btn" @click="clearupClient">
                      <i class="el-icon-edit-outline" title="清除"></i>
                    <div
                      v-if="editConfig.infomation.client_name && editConfig.infomation.client_name.length > 0"
                      class="common-select-btn"
                      @click="clearupClient"
                    >
                      <i class="el-icon-remove-outline" title="清除"></i>
                    </div>
                  </div>
                </el-form-item>
@@ -68,7 +73,7 @@
              </el-col>
              <el-col :span="12">
                <el-form-item v-if="isUnflod" label="销售负责人" prop="member_id">
                  <el-select v-model="editConfig.infomation.member_id" placeholder="请选择" size="mini">
                  <el-select v-model="editConfig.infomation.member_id" placeholder="请选择" size="mini" style="width: 100%">
                    <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id">
                    </el-option>
                  </el-select>
@@ -87,7 +92,13 @@
              </el-col>
              <el-col :span="12">
                <el-form-item v-if="isUnflod" label="生日" prop="birthday">
                  <el-date-picker v-model="editConfig.infomation.birthday" type="date" placeholder="选择日期">
                  <el-date-picker
                    v-model="editConfig.infomation.birthday"
                    value-format="yyyy-MM-dd"
                    type="date"
                    style="width: 100%"
                    placeholder="选择日期"
                  >
                  </el-date-picker>
                </el-form-item>
              </el-col>
@@ -267,7 +278,7 @@
  },
  data() {
    return {
      dialogWidth: "80%",
      dialogWidth: "50%",
      editConfig: this.editContactsConfig,
      rules: {
        name: [{ required: true, message: "请输入", trigger: "blur" }],
@@ -312,7 +323,8 @@
        editVisible: false,
        title: "",
        infomation: {}
      }
      },
      clientId: this.editContactsConfig.infomation.client_id
    }
  },
  created() {
@@ -329,18 +341,11 @@
        this.editConfig.infomation.province_id === 0 ? "" : this.editConfig.infomation.province_id
      this.editConfig.infomation.city_id =
        this.editConfig.infomation.city_id === 0 ? "" : this.editConfig.infomation.city_id
      getAllData()
        .then((res) => {
          console.log(res)
          this.memberOptions = res.data.member
          // this.countryOptions = res.data.country
          this.provinceOptions = res.data.province
          // this.cityOptions = res.data.city
          // this.regionOptions = res.data.region
        })
        .catch((err) => {
          console.log(err)
        })
      getAllData().then((res) => {
        console.log(res)
        this.memberOptions = res.data.member
        this.provinceOptions = res.data.province
      })
    },
    handleClose() {
      this.editConfig.visible = false
@@ -397,7 +402,7 @@
        id: this.editConfig.title === "新建" ? 0 : data.id,
        birthday: data.birthday || "",
        city_id: data.city_id || 0,
        client_id: parseInt(data.client_id) || 0,
        client_id: this.clientId || 0,
        country_id: data.country_id || 0,
        desc: data.desc || "",
        email: data.email || "",
@@ -425,7 +430,8 @@
      }
    },
    handleSelectClient(item) {
      this.editConfig.infomation.client_id = item.id
      this.editConfig.infomation.client_name = item.name
      this.clientId = item.id
    },
    selClientClick() {
      this.editSelectClientConfig.editVisible = true
@@ -433,12 +439,16 @@
    selClient(row) {
      console.log(row)
      this.editConfig.infomation.client_name = row.name
      this.editConfig.infomation.client_id = row.id
      this.clientId = row.id
    },
    // 清除已选择用户
    clearupClient() {
      console.log("sssssssss")
      console.log(this.editConfig.infomation.client_name)
      // if (this.editConfig.infomation.client_name !== "") {
      this.editConfig.infomation.client_name = ""
      this.editConfig.infomation.client_id = 0
      this.clientId = 0
      // }
    },
    // 添加附件
    addAnnexClick() {},
@@ -501,7 +511,7 @@
        }
        .common-select {
          .common-select-sel {
            width: 270px;
            width:100%;
          }
        }
      }
@@ -519,6 +529,7 @@
      justify-content: center;
      align-items: center;
      color: #6166d3;
      cursor: pointer;
    }
    .dialog-footer {
      background-color: #f5f5f5;