| | |
| | | :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="editConfig.infomation.id || 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-row> |
| | | <!-- </el-row> |
| | | <el-row> --> |
| | | <el-col :span="12"> |
| | | <el-form-item label="联系人姓名" prop="contact_name"> |
| | | <el-input v-model="editConfig.infomation.contact_name"></el-input> |
| | |
| | | <el-input v-model="editConfig.infomation.contact_position"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <!-- </el-row> |
| | | <el-row> --> |
| | | <el-col :span="12"> |
| | | <el-form-item label="手机号码" prop="contact_phone"> |
| | | <el-input |
| | |
| | | </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> |
| | |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> --> |
| | | </el-row> |
| | | <!-- <el-row> |
| | | <!-- </el-row> --> |
| | | <!-- <el-row> --> |
| | | <el-col :span="24"> |
| | | <el-form-item label="地址" prop="address"> |
| | | <el-form-item label="详细地址" prop="detail_address"> |
| | | <el-input |
| | | type="textarea" |
| | | :autosize="{ minRows: 2, maxRows: 4 }" |
| | | placeholder="请输入内容" |
| | | v-model="editConfig.infomation.address" |
| | | v-model="editConfig.infomation.detail_address" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> --> |
| | | </el-row> |
| | | </div> |
| | | <!-- 备注信息 --> |
| | | <div v-if="isUnflod" class="basic-info-title">备注信息</div> |
| | |
| | | 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" }], |
| | |
| | | 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 = |
| | |
| | | number: this.editConfig.infomation.number || "", |
| | | 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 |
| | | sales_sources_id: this.editConfig.infomation.sales_sources_id || 0, |
| | | detail_address: this.editConfig.infomation.detail_address || "", |
| | | codeStandID:this.editConfig.infomation.ID, |
| | | codeRule:this.codeRule, |
| | | } |
| | | 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) |
| | | }) |
| | | getAddSalesLeads(params).then((res) => { |
| | | console.log(res) |
| | | this.editConfig.visible = false |
| | | if (res.code === 200) { |
| | | this.$message.success("添加成功") |
| | | this.$parent.getData() |
| | | } |
| | | }) |
| | | } 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) |
| | | }) |
| | | getUpdateSalesLeads(params).then((res) => { |
| | | console.log(res) |
| | | this.editConfig.visible = false |
| | | if (res.code === 200) { |
| | | this.$message.success("编辑成功") |
| | | this.$parent.getData() |
| | | } |
| | | }) |
| | | } |
| | | } else { |
| | | console.log("error submit") |
| | |
| | | .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; |
| | | } |
| | | } |