| | |
| | | <div class="basic-info-view"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="客户名称" prop="customName"> |
| | | <el-input v-model="editConfig.infomation.customName"></el-input> |
| | | <el-form-item label="客户名称" prop="name"> |
| | | <el-input v-model="editConfig.infomation.name"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="销售线索编号" prop="saleLeadNumber"> |
| | | <el-input v-model="editConfig.infomation.saleLeadNumber"></el-input> |
| | | <el-form-item label="销售线索编号" prop="number"> |
| | | <el-input v-model="editConfig.infomation.number"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="联系人姓名" prop="contactName"> |
| | | <el-input v-model="editConfig.infomation.contactName"></el-input> |
| | | <el-form-item label="联系人姓名" prop="contact_name"> |
| | | <el-input v-model="editConfig.infomation.contact_name"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="联系人职务" prop="contactDuties"> |
| | | <el-input v-model="editConfig.infomation.contactDuties"></el-input> |
| | | <el-form-item label="联系人职务" prop="contact_position"> |
| | | <el-input v-model="editConfig.infomation.contact_position"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="手机号码" prop="phoneNumber"> |
| | | <el-input v-model="editConfig.infomation.phoneNumber"></el-input> |
| | | <el-form-item label="手机号码" prop="contact_phone"> |
| | | <el-input v-model="editConfig.infomation.contact_phone"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="商机来源" prop="businessSource"> |
| | | <CommonSelectView |
| | | :common-value="editConfig.infomation.businessSource" |
| | | :common-options="businessSourceOptions" |
| | | @editDropdownBox="editDropdownBox" |
| | | /> |
| | | <el-form-item label="商机来源" prop="sales_sources_id"> |
| | | <div class="common-select"> |
| | | <el-select |
| | | v-model="editConfig.infomation.sales_sources_id" |
| | | placeholder="请选择" |
| | | class="common-select-sel" |
| | | size="mini" |
| | | > |
| | | <el-option |
| | | v-for="item in businessSourceOptions" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | <div class="common-select-btn" @click="editDropdownBox"> |
| | | <i class="el-icon-setting"></i> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="负责人" prop="owner"> |
| | | <el-select v-model="editConfig.infomation.owner" placeholder="请选择" size="mini"> |
| | | <el-form-item label="负责人" prop="member_id"> |
| | | <el-select v-model="editConfig.infomation.member_id" placeholder="请选择" size="mini"> |
| | | <el-option v-for="item in ownerOptions" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | |
| | | </div> |
| | | <!-- 地址信息 --> |
| | | <div v-if="isUnflod" class="basic-info-title">地址信息</div> |
| | | <div v-if="isUnflod" class="address-view"> |
| | | <el-row> |
| | | <div v-if="isUnflod" class="basic-info-view"> |
| | | <!-- <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="定位" prop="position"> |
| | | <el-input v-model="editConfig.infomation.position"></el-input> |
| | |
| | | <div style="height: 100px"></div> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-row> --> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="国家" prop="country"> |
| | |
| | | <div v-if="isUnflod" class="basic-info-view"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="地址" prop="address"> |
| | | <el-form-item label="备注" prop="desc"> |
| | | <el-input |
| | | type="textarea" |
| | | :autosize="{ minRows: 2, maxRows: 4 }" |
| | | placeholder="请输入内容" |
| | | v-model="editConfig.infomation.address" |
| | | v-model="editConfig.infomation.desc" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <script> |
| | | import CommonSelectView from "@/components/makepager/CommonSelectView" |
| | | import EditDropdownDialog from "@/views/other/commonDialog/EditDropdownDialog" |
| | | import { getSalesSourcesList } from "@/api/custom/salesLead" |
| | | import { getSalesSourcesList, getAddSalesLeads, getUpdateSalesLeads } from "@/api/custom/salesLead" |
| | | |
| | | export default { |
| | | name: "AddSalesLeadDialog", |
| | |
| | | visible: false, |
| | | title: "新建", |
| | | infomation: { |
| | | customName: "", |
| | | saleLeadNumber: "LEA50", |
| | | contactName: "", |
| | | contactDuties: "", |
| | | phoneNumber: "", |
| | | name: "", |
| | | number: "LEA50", |
| | | contact_name: "", |
| | | contact_position: "", |
| | | contact_phone: "", |
| | | businessStatus: "", |
| | | businessSource: "1", |
| | | owner: "", |
| | | position: "", |
| | | map: "", |
| | | country: "1", |
| | | province: "1", |
| | | city: "1", |
| | | region: "1", |
| | | address: "" |
| | | sales_sources_id: "", |
| | | member_id: "", |
| | | country: "", |
| | | province: "", |
| | | city: "", |
| | | region: "", |
| | | address: "", |
| | | desc: "", |
| | | id: "" |
| | | } |
| | | } |
| | | } |
| | |
| | | dialogWidth: "80%", |
| | | editConfig: this.editSalesLeadConfig, |
| | | rules: { |
| | | customName: [{ required: true, message: "请输入客户名称", trigger: "blur" }], |
| | | saleLeadNumber: [{ required: true, message: "请输入销售线索编号", trigger: "blur" }], |
| | | name: [{ required: true, message: "请输入客户名称", trigger: "blur" }], |
| | | number: [{ required: true, message: "请输入销售线索编号", trigger: "blur" }], |
| | | businessStatus: [{ required: true, message: "请输入商机状态", trigger: "blur" }], |
| | | businessSource: [{ required: true, message: "请选择商机来源", trigger: "change" }] |
| | | sales_sources_id: [{ required: true, message: "请选择商机来源", trigger: "change" }] |
| | | }, |
| | | businessSourceOptions: [ |
| | | { value: "1", label: "后台注册" }, |
| | | { value: "2", label: "代理商客户" }, |
| | | { value: "3", label: "电话陌生拜访" }, |
| | | { value: "4", label: "直接访问" }, |
| | | { value: "5", label: "项目合作" }, |
| | | { value: "6", label: "个人自找" }, |
| | | { value: "7", label: "二次销售" }, |
| | | { value: "8", label: "公司电话" } |
| | | { id: "1", name: "后台注册" }, |
| | | { id: "2", name: "代理商客户" }, |
| | | { id: "3", name: "电话陌生拜访" }, |
| | | { id: "4", name: "直接访问" }, |
| | | { id: "5", name: "项目合作" }, |
| | | { id: "6", name: "个人自找" }, |
| | | { id: "7", name: "二次销售" }, |
| | | { id: "8", name: "公司电话" } |
| | | ], |
| | | ownerOptions: [ |
| | | { value: "1", label: "BOSS" }, |
| | |
| | | getSalesSourcesList() |
| | | .then((res) => { |
| | | console.log(res) |
| | | // this.businessSourceOptions = res.data.tableList |
| | | this.businessSourceOptions = res.data.list |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err) |
| | |
| | | saveClick(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | alert("submit") |
| | | console.log(this.editConfig.infomation) |
| | | let params = { |
| | | city_id: 0, |
| | | contact_name: this.editConfig.infomation.contact_name || "", |
| | | contact_phone: this.editConfig.infomation.contact_phone || "", |
| | | contact_position: this.editConfig.infomation.contact_position || "", |
| | | country_id: 0, |
| | | id: this.editConfig.title === "新建" ? 0 : this.editConfig.infomation.id, |
| | | desc: this.editConfig.infomation.desc || "", |
| | | member_id: parseInt(this.editConfig.infomation.member_id) || 0, |
| | | name: this.editConfig.infomation.name || "", |
| | | number: this.editConfig.infomation.number || "", |
| | | province_id: 0, |
| | | region_id: 0, |
| | | sales_sources_id: this.editConfig.infomation.sales_sources_id || 0 |
| | | } |
| | | console.log(params) |
| | | if (this.editConfig.title === "新建") { |
| | | getAddSalesLeads(params) |
| | | .then((res) => { |
| | | console.log(res) |
| | | this.editConfig.visible = false |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | message: "添加成功", |
| | | type: "success" |
| | | }) |
| | | this.$parent.getData() |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err) |
| | | }) |
| | | } else { |
| | | getUpdateSalesLeads(params) |
| | | .then((res) => { |
| | | console.log(res) |
| | | this.editConfig.visible = false |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | message: "编辑成功", |
| | | type: "success" |
| | | }) |
| | | this.$parent.getData() |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err) |
| | | }) |
| | | } |
| | | } else { |
| | | console.log("error submit") |
| | | return false |
| | |
| | | .basic-info-view { |
| | | margin-top: 10px; |
| | | padding-right: 40px; |
| | | } |
| | | .address-view { |
| | | margin-top: 10px; |
| | | padding-right: 40px; |
| | | .common-select { |
| | | display: flex; |
| | | .common-select-sel { |
| | | width: 270px; |
| | | } |
| | | .common-select-btn { |
| | | margin-left: 5px; |
| | | font-size: 16px; |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .unflod-collapse { |