| | |
| | | :visible.sync="editConfig.visible" |
| | | :width="dialogWidth" |
| | | :before-close="handleClose" |
| | | append-to-body |
| | | custom-class="iframe-dialog" |
| | | > |
| | | <el-form |
| | | ref="form" |
| | |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="客户名称" prop="name"> |
| | | <div class="client-name"> |
| | | <div class="custom-name"> |
| | | <el-input v-model="editConfig.infomation.name"></el-input> |
| | | <div class="common-select-btn"><i class="el-icon-house" title="工商查询"></i></div> |
| | | <div class="common-select-btn"><i class="el-icon-search" title="查重"></i></div> |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="联系人手机" prop="contact_phone"> |
| | | <el-input v-model="editConfig.infomation.contact_phone"></el-input> |
| | | <el-input |
| | | v-model="editConfig.infomation.contact_phone" |
| | | maxlength="11" |
| | | show-word-limit |
| | | oninput="value=value.replace(/[^\d]/g,'')" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | |
| | | <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> |
| | |
| | | return { |
| | | visible: false, |
| | | title: "新建", |
| | | isSalesOpportunity: false, |
| | | infomation: {} |
| | | } |
| | | } |
| | |
| | | name: [{ required: true, message: "请输入客户名称", trigger: "blur" }], |
| | | client_status_id: [{ required: true, message: "请选择客户状态", trigger: "change" }], |
| | | member_id: [{ required: true, message: "请选择销售负责人", trigger: "change" }], |
| | | approvalOpinion: [{ required: true, message: "请输入审批意见", trigger: "blur" }] |
| | | approvalOpinion: [{ required: true, message: "请输入审批意见", trigger: "blur" }], |
| | | contact_phone: [ |
| | | { required: false, message: "", trigger: "blur" }, |
| | | { len: 11, message: "长度在11个字符", trigger: "blur" }, |
| | | { |
| | | pattern: /^1(3\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\d|9[0-35-9])\d{8}$/, |
| | | message: "请输入正确的手机号", |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | }, |
| | | memberOptions: [], |
| | | clientStatusOptions: [], // 客户状态 |
| | |
| | | getCommonData() { |
| | | getAllData() |
| | | .then((res) => { |
| | | console.log(res) |
| | | this.memberOptions = res.data.member |
| | | this.clientSourceOptions = res.data.client_origin |
| | | this.clientStatusOptions = res.data.client_status |
| | |
| | | }, |
| | | handleClose() { |
| | | this.editConfig.visible = false |
| | | if (this.editConfig.title === "新建" && this.editConfig.infomation.sales_leads_id) { |
| | | this.$parent.handleClose() |
| | | } |
| | | }, |
| | | // 保存 |
| | | saveClick(formName) { |
| | |
| | | message: "添加成功", |
| | | type: "success" |
| | | }) |
| | | this.$parent.getData() |
| | | 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) => { |
| | |
| | | country_id: 0, |
| | | desc: "", |
| | | email: data.contact_email || "", |
| | | is_first: false, |
| | | is_first: true, |
| | | member_id: 0, |
| | | name: data.contact_name || "", |
| | | number: "", |
| | |
| | | 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 |
| | | }, |
| | |
| | | |
| | | <!-- Add "scoped" attribute to limit CSS to this component only --> |
| | | <style lang="scss" scoped> |
| | | .add-client-manage { |
| | | .basic-info { |
| | | .basic-info-title { |
| | | background-color: #f4f8fe; |
| | | padding-left: 10px; |
| | | font-size: 15px; |
| | | font-weight: bold; |
| | | color: #666; |
| | | height: 42px; |
| | | line-height: 42px; |
| | | } |
| | | .basic-info-view { |
| | | margin-top: 10px; |
| | | padding-right: 40px; |
| | | .client-name { |
| | | display: flex; |
| | | .common-select-btn { |
| | | margin-left: 5px; |
| | | font-size: 18px; |
| | | ::v-deep { |
| | | .iframe-dialog .el-dialog__body { |
| | | .basic-info { |
| | | .basic-info-title { |
| | | background-color: #f4f8fe; |
| | | padding-left: 10px; |
| | | font-size: 15px; |
| | | font-weight: bold; |
| | | color: #666; |
| | | height: 42px; |
| | | line-height: 42px; |
| | | } |
| | | .basic-info-view { |
| | | margin-top: 10px; |
| | | padding-right: 40px; |
| | | .custom-name, |
| | | .common-select { |
| | | display: flex; |
| | | .common-select-btn { |
| | | margin-left: 5px; |
| | | font-size: 18px; |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | .common-select { |
| | | .common-select-sel { |
| | | width: 270px; |
| | | } |
| | | } |
| | | } |
| | | .common-select { |
| | | .annex-view { |
| | | display: flex; |
| | | .common-select-sel { |
| | | width: 270px; |
| | | } |
| | | .common-select-btn { |
| | | margin-left: 5px; |
| | | font-size: 16px; |
| | | cursor: pointer; |
| | | color: #6166d3; |
| | | .setFormat { |
| | | margin-left: 10px; |
| | | } |
| | | } |
| | | } |
| | | // .address-view { |
| | | // margin-top: 10px; |
| | | // padding-right: 40px; |
| | | // } |
| | | .annex-view { |
| | | .unflod-collapse { |
| | | display: flex; |
| | | height: 30px; |
| | | justify-content: center; |
| | | align-items: center; |
| | | color: #6166d3; |
| | | .setFormat { |
| | | margin-left: 10px; |
| | | } |
| | | } |
| | | } |
| | | .unflod-collapse { |
| | | display: flex; |
| | | height: 30px; |
| | | justify-content: center; |
| | | align-items: center; |
| | | color: #6166d3; |
| | | } |
| | | .dialog-footer { |
| | | background-color: #f5f5f5; |
| | | height: 55px; |
| | | line-height: 55px; |
| | | .dialog-footer { |
| | | background-color: #f5f5f5; |
| | | height: 55px; |
| | | line-height: 55px; |
| | | } |
| | | } |
| | | } |
| | | </style> |