yangfeng
2023-08-09 acdff03246ce648082192dfb069c3a006a7fbee6
src/views/client/client/AddClientManageDialog.vue
@@ -5,6 +5,8 @@
      :visible.sync="editConfig.visible"
      :width="dialogWidth"
      :before-close="handleClose"
      append-to-body
      custom-class="iframe-dialog"
    >
      <el-form
        ref="form"
@@ -475,7 +477,7 @@
      <div slot="footer" class="dialog-footer">
        <!-- <el-button type="primary" size="small" @click="editConfig.visible = false">保并提交审批</el-button> -->
        <el-button type="primary" size="small" @click="saveClick('form')">保存</el-button>
        <el-button size="small" @click="editConfig.visible = false">取消</el-button>
        <el-button size="small" @click="handleClose">取消</el-button>
      </div>
    </el-dialog>
  </div>
@@ -492,6 +494,7 @@
        return {
          visible: false,
          title: "新建",
          isSalesOpportunity: false,
          infomation: {}
        }
      }
@@ -546,7 +549,6 @@
    getCommonData() {
      getAllData()
        .then((res) => {
          console.log(res)
          this.memberOptions = res.data.member
          this.clientSourceOptions = res.data.client_origin
          this.clientStatusOptions = res.data.client_status
@@ -567,6 +569,9 @@
    },
    handleClose() {
      this.editConfig.visible = false
      if (this.editConfig.title === "新建" && this.editConfig.infomation.sales_leads_id) {
        this.$parent.handleClose()
      }
    },
    // 保存
    saveClick(formName) {
@@ -585,7 +590,13 @@
                    message: "添加成功",
                    type: "success"
                  })
                  if (this.editConfig.isSalesOpportunity) {
                    this.$emit("salesOpportunityClick", this.editConfig.infomation)
                  } else if (this.editConfig.title === "新建" && this.editConfig.infomation.sales_leads_id) {
                    this.$parent.handleClose()
                  } else {
                  this.$parent.getData()
                  }
                }
              })
              .catch((err) => {
@@ -657,7 +668,8 @@
        registration_time: data.registration_time || "",
        remark: data.remark || "",
        representative: data.representative || "",
        service_member_id: data.service_member_id || 0
        service_member_id: data.service_member_id || 0,
        sales_leads_id: data.sales_leads_id || 0
      }
      return params
    },
@@ -677,7 +689,8 @@
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
.add-client-manage {
::v-deep {
  .iframe-dialog .el-dialog__body {
  .basic-info {
    .basic-info-title {
      background-color: #f4f8fe;
@@ -727,4 +740,5 @@
    line-height: 55px;
  }
}
}
</style>