| | |
| | | :model="editConfig.infomation" |
| | | :rules="rules" |
| | | label-position="right" |
| | | label-width="308px" |
| | | label-width="130px" |
| | | size="mini" |
| | | > |
| | | <!-- 信息 --> |
| | |
| | | <div class="basic-info-view"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="客户名称" prop="name"> |
| | | <el-input v-model="editConfig.infomation.name"></el-input> |
| | | <el-form-item label="销售线索编号" prop="number"> |
| | | <WordInput |
| | | v-if="codenumer && (explain != '' || isIdDisabled)&&method == 0" |
| | | :codenumer="codenumer" |
| | | :sum="sum" |
| | | :disabled="this.editConfig.title !== '新建' || isIdDisabled" |
| | | :inputValue="inputValue" |
| | | @codeList="codeList" |
| | | /> |
| | | <span v-else-if="method == 0" style="color: #f56c6c" |
| | | >请优先配置编码规范 |
| | | <el-button type="text" @click="numberClick"> |
| | | 配置规范 |
| | | </el-button |
| | | ></span |
| | | > |
| | | <span v-else>自动生成</span> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="销售线索编号" prop="number"> |
| | | <el-input v-model="editConfig.infomation.number"></el-input> |
| | | <el-form-item label="意向客户名称" prop="name"> |
| | | <el-input v-model="editConfig.infomation.name" style="width: 100%"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <!-- </el-row> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="商机状态" prop="businessStatus"> |
| | | <el-form-item label="线索状态" prop="businessStatus"> |
| | | <span>{{ editConfig.infomation.businessStatus }}</span> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="商机来源" prop="sales_sources_id"> |
| | | <el-form-item label="线索来源" prop="sales_sources_id"> |
| | | <div class="common-select"> |
| | | <el-select |
| | | v-model="editConfig.infomation.sales_sources_id" |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="负责人" prop="member_id"> |
| | | <el-select v-model="editConfig.infomation.member_id" placeholder="请选择" size="mini"> |
| | | <el-select v-model="editConfig.infomation.member_id" placeholder="请选择" style="width: 100%" size="mini"> |
| | | <el-option v-for="item in memberOptions" :key="item.id" :label="item.username" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | |
| | | import { getAddSalesLeads, getUpdateSalesLeads } from "@/api/client/salesLead" |
| | | import { getAllData } from "@/api/client/client" |
| | | import { getCityList } from "@/api/common/address" |
| | | |
| | | import codeMixin from "@/views/client/followupRecords/mixin/codeMixin"; |
| | | export default { |
| | | name: "AddSalesLeadDialog", |
| | | mixins: [codeMixin], |
| | | props: { |
| | | editSalesLeadConfig: { |
| | | type: Object, |
| | |
| | | computed: {}, |
| | | data() { |
| | | return { |
| | | dialogWidth: "80%", |
| | | dialogWidth: "50%", |
| | | editConfig: this.editSalesLeadConfig, |
| | | rules: { |
| | | name: [{ required: true, message: "请输入客户名称", trigger: "blur" }], |
| | |
| | | businessStatus: [{ required: true, message: "请输入商机状态", trigger: "blur" }], |
| | | sales_sources_id: [{ required: true, message: "请选择商机来源", trigger: "change" }], |
| | | contact_phone: [ |
| | | { required: false, message: "", trigger: "blur" }, |
| | | { required: true, 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}$/, |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | if (this.editConfig.title !== "新建" && this.editConfig.infomation.province_id !== 0) { |
| | | if (this.editConfig.title !== "新建" && this.editConfig.infomation.province_id != 0) { |
| | | this.getCityList(this.editConfig.infomation.province_id, "edit") |
| | | } |
| | | this.getCommonData() |
| | | this.formInfo(); |
| | | }, |
| | | mounted() {}, |
| | | watch:{ |
| | | 'editSalesLeadConfig.visible'(val){ |
| | | if(val){ |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | 'editSalesLeadConfig.infomation.codeStandID'(){ |
| | | this.formInfo() |
| | | } |
| | | }, |
| | | methods: { |
| | | formInfo(){ |
| | | this.objCode.type='销售线索编码' |
| | | this.objCode.codeStandID = '' |
| | | if(this.editConfig.infomation.codeStandID){ |
| | | this.objCode.codeStandID = this.editConfig.infomation.codeStandID; |
| | | } |
| | | this.getRCodeStandardList(); |
| | | }, |
| | | getCommonData() { |
| | | this.editConfig.infomation.country_id = 1 |
| | | this.editConfig.infomation.province_id = |
| | |
| | | province_id: this.editConfig.infomation.province_id || 0, |
| | | region_id: this.editConfig.infomation.region_id || 0, |
| | | sales_sources_id: this.editConfig.infomation.sales_sources_id || 0, |
| | | detail_address: this.editConfig.infomation.detail_address || "" |
| | | detail_address: this.editConfig.infomation.detail_address || "", |
| | | codeStandID:this.editConfig.infomation.ID, |
| | | codeRule:this.codeRule, |
| | | } |
| | | console.log(params) |
| | | if (this.editConfig.title === "新建") { |
| | |
| | | }, |
| | | // 选择省份 |
| | | selProvinceChange(val) { |
| | | this.getCityList(val, "sel") |
| | | this.cityOptions=[] |
| | | if(val){ |
| | | this.getCityList(val, "sel") |
| | | } |
| | | }, |
| | | async getCityList(val, value) { |
| | | await getCityList({ province_id: val }).then((res) => { |
| | | console.log(res) |
| | | if (res.data.code === 200) { |
| | | this.cityOptions = res.data.data.list |
| | | if (res.code === 200) { |
| | | this.cityOptions = res.data.list?res.data.list:[] |
| | | if (value === "sel") { |
| | | this.editConfig.infomation.city_id = "" |
| | | } |
| | |
| | | .common-select { |
| | | display: flex; |
| | | .common-select-sel { |
| | | width: 270px; |
| | | width:100%; |
| | | } |
| | | .common-select-btn { |
| | | margin-left: 5px; |
| | |
| | | height: 30px; |
| | | justify-content: center; |
| | | align-items: center; |
| | | cursor:pointer; |
| | | color: #6166d3; |
| | | } |
| | | } |