Merge branch 'dev' of ssh://192.168.5.5:29418/web/crm-web into dev
| | |
| | | client_status_id: [{ required: true, message: "请选择客户状态", trigger: ["change",'blur' ] }], |
| | | member_id: [{ required: false, message: "请选择销售负责人", trigger: ["change",'blur' ] }], |
| | | approvalOpinion: [{ required: true, message: "请输入审批意见", trigger: ["change",'blur' ] }], |
| | | contact_name: [{ required: true, message: "请输入联系人姓名", trigger: ["change",'blur' ] }], |
| | | contact_phone: [ |
| | | { required: false, message: "", trigger:["change",'blur' ] }, |
| | | { required: true, message: "请输入联系人手机", trigger:["change",'blur' ] }, |
| | | { len: 11, message: "长度在11个字符", trigger: ["change",'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}$/, |
| | |
| | | } else { |
| | | this.$parent.getData() |
| | | } |
| | | if (this.editConfig.isResh) { |
| | | this.$emit("reshData") |
| | | } |
| | | } |
| | | }) |
| | | } else { |
| | |
| | | client_name: row.name, |
| | | number: "", |
| | | codeStandID:'', |
| | | next_follow_time: row.next_visit_time |
| | | next_follow_time: row.next_visit_time, |
| | | client_id:row.id |
| | | } |
| | | this.editFollowupConfig.visible = true |
| | | }, |
| | |
| | | :model="editConfig.infomation" |
| | | :rules="rules" |
| | | label-position="right" |
| | | label-width="120px" |
| | | label-width="110px" |
| | | size="mini" |
| | | > |
| | | <!-- 信息 --> |
| | |
| | | <div v-if="isUnflod" class="basic-info-title">基本信息</div> |
| | | <div class="basic-info-view"> |
| | | <el-row> |
| | | <el-col :span="12" v-if="isUnflod"> |
| | | <!-- <el-col :span="12" v-if="isUnflod"> |
| | | <el-form-item label="联系人编号" prop="number"> |
| | | <WordInput |
| | | v-if="codenumer && (explain != '' || isIdDisabled) && method == 0" |
| | |
| | | > |
| | | <span v-else>自动生成</span> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-col> --> |
| | | <el-col :span="12"> |
| | | <el-form-item label="联系人姓名" prop="name"> |
| | | <el-input v-model="editConfig.infomation.name"></el-input> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-col :span="12" style='height:47px;'> |
| | | <el-form-item v-if="isUnflod" label="首要联系人" prop="is_first"> |
| | | <el-switch v-model="editConfig.infomation.is_first" active-color="#2E68DB" inactive-color="#AEB9CA"> |
| | | </el-switch> |
| | |
| | | dialogWidth: "50%", |
| | | editConfig: this.editContactsConfig, |
| | | rules: { |
| | | name: [{ required: true, message: "请输入", trigger: ["change",'blur'] }], |
| | | name: [{ required: true, message: "请输入联系人姓名", trigger: ["change",'blur'] }], |
| | | number: [{ required: true, message: "请输入", trigger: ["change",'blur'] }], |
| | | client_name: [{ required: true, message: "请选择客户名称", trigger: ["change",'blur'] }], |
| | | member_id: [{ required: true, message: "请选择", trigger: ["change",'blur'] }], |
| | | phone: [ |
| | | { required: false, message: "", trigger: ["change",'blur'] }, |
| | | { required: false, message: "请输入手机号", trigger: ["change",'blur'] }, |
| | | { len: 11, message: "长度在11个字符", trigger: ["change",'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}$/, |
| | |
| | | this.getCityList(this.editConfig.infomation.province_id, "edit") |
| | | } |
| | | this.getCommonData() |
| | | this.formInfo() |
| | | // this.formInfo() |
| | | }, |
| | | watch: { |
| | | "editContactsConfig.visible"(val) { |
| | | if (val) { |
| | | this.formInfo() |
| | | // this.formInfo() |
| | | } |
| | | }, |
| | | "editContactsConfig.infomation.codeStandID"() { |
| | | this.formInfo() |
| | | // this.formInfo() |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | is_first: data.is_first || false, |
| | | member_id: data.member_id || 0, |
| | | name: data.name || "", |
| | | number: data.number || "", |
| | | // number: data.number || "", |
| | | phone: data.phone || "", |
| | | position: data.position || "", |
| | | province_id: data.province_id || 0, |
| | | region_id: data.region_id || 0, |
| | | wechat: data.wechat || "", |
| | | codeStandID: data.ID, |
| | | codeRule: this.codeRule |
| | | // codeStandID: data.ID, |
| | | // codeRule: this.codeRule |
| | | } |
| | | return params |
| | | }, |
| | |
| | | }, |
| | | selClient(row) { |
| | | console.log(row) |
| | | this.editConfig.infomation.client_name = row.name |
| | | this.clientId = row.id |
| | | this.$set( this.editConfig.infomation,'client_name',row.name) |
| | | }, |
| | | // 清除已选择用户 |
| | | clearupClient() { |
| | | console.log("sssssssss") |
| | | console.log(this.editConfig.infomation.client_name) |
| | | console.log(this.editConfig.infomation.client_name,'sssssssss') |
| | | // if (this.editConfig.infomation.client_name !== "") { |
| | | this.editConfig.infomation.client_name = "" |
| | | this.clientId = 0 |
| | | this.clientId = null |
| | | this.$set(this.editConfig.infomation,'client_name','') |
| | | // } |
| | | }, |
| | | // 添加附件 |
| | |
| | | tableColumn: [ |
| | | { label: "联系人姓名", prop: "name", min: 100, isContactClick: true, default: true }, // 联系人姓名 |
| | | { label: "客户名称", prop: "client_name", min: 190, isClientClick: true }, // 客户名称 |
| | | { label: "联系人编号", prop: "number", min: 100 }, // 联系人编号 |
| | | // { label: "联系人编号", prop: "number", min: 100 }, // 联系人编号 |
| | | { label: "职务", prop: "position", min: 120 }, // 职务 |
| | | { label: "手机", prop: "phone", min: 100 }, // 手机号码 |
| | | { label: "销售负责人", prop: "member_name", min: 120 }, // 销售负责人 |
| | |
| | | v-if="editConfig.visible" |
| | | :edit-client-manage-config="editConfig" |
| | | @salesOpportunityClick="salesOpportunityClick" |
| | | @reshData='reshData' |
| | | /> |
| | | <!-- 新建/编辑销售机会 --> |
| | | <AddSalesOpportunityDialog v-if="editOpportunityConfig.visible" :edit-common-config="editOpportunityConfig" /> |
| | |
| | | ...this.commonConfig.infomation, |
| | | sales_leads_id: this.commonConfig.infomation.id |
| | | } |
| | | this.editConfig.isResh = true |
| | | this.editConfig.infomation.codeStandID='' |
| | | this.editConfig.visible = true |
| | | }) |
| | |
| | | .then(() => { |
| | | this.editConfig.title = "新建" |
| | | this.editConfig.isSalesOpportunity = true |
| | | this.editConfig.isResh = true |
| | | this.editConfig.infomation = { |
| | | ...this.commonConfig.infomation, |
| | | sales_leads_id: this.commonConfig.infomation.id |
| | |
| | | console.log(res) |
| | | this.$message.success("推进成功") |
| | | this.handleClose() |
| | | this.$parent.getData() |
| | | this.reshData() |
| | | }) |
| | | }, |
| | | reshData(){ |
| | | this.$parent.getData() |
| | | }, |
| | | // 销售机会 |
| | | salesOpportunityClick(item) { |
| | | console.log(item) |
| | |
| | | return { |
| | | editVisible: false, |
| | | title: "", |
| | | infomation: {}, |
| | | search_map: {} |
| | | clientId: 0, |
| | | infomation: {} |
| | | } |
| | | } |
| | | } |
| | |
| | | tableList: [], |
| | | searchSelOptions: [], |
| | | loading: false, |
| | | // search_map: {}, |
| | | search_map: {}, |
| | | tableColumn: [ |
| | | { label: "联系人姓名", prop: "name", isContactClick: true, default: true }, // 联系人姓名 |
| | | { label: "联系人编号", prop: "number" }, // 联系人编号 |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | this.search_map = { |
| | | client_id: this.editConfig.clientId |
| | | } |
| | | this.setTable() |
| | | this.getData() |
| | | }, |
| | |
| | | async getData() { |
| | | this.loading = true |
| | | await getContactList({ |
| | | search_map: this.editConfig.search_map, |
| | | search_map: this.search_map, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }) |
| | |
| | | // 搜索 |
| | | searchClick(val, content) { |
| | | console.log(val, content) |
| | | this.editConfig.search_map = { |
| | | this.search_map = { |
| | | [val.value]: content |
| | | } |
| | | this.getData() |
| | | }, |
| | | resetClick() { |
| | | this.editConfig.search_map = {} |
| | | this.search_map = {} |
| | | this.getData() |
| | | } |
| | | } |
| | |
| | | // console.log() |
| | | this.loading = true |
| | | let params = {} |
| | | let sourceTyle = (this.addConfig.keywordType === "销售明细单"||this.addConfig.keywordType ==='客户名称') ? 1 : 2 |
| | | let sourceTyle = this.addConfig.keywordType === "销售明细单" || this.addConfig.keywordType === "客户名称" ? 1 : 2 |
| | | if (this.addConfig.id) { |
| | | params = { |
| | | sourceID: this.addConfig.id, |
| | | sourceId: this.addConfig.id, |
| | | sourceType: sourceTyle, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize, |
| | |
| | | addBtnClick() { |
| | | this.editConfig.visible = true |
| | | this.editConfig.title = "新建" |
| | | this.editConfig.sourceType = this.addConfig.keywordType ==='客户名称'?1:this.sourceType |
| | | this.editConfig.sourceType = this.addConfig.keywordType === "客户名称" ? 1 : this.sourceType |
| | | this.editConfig.infomation = { ...this.addConfig, saleDetailNumber: "" } |
| | | } |
| | | } |
| | |
| | | let sourceTyle = this.addConfig.keywordType === "销售明细单" ? 1 : 2 |
| | | if (this.addConfig.id) { |
| | | params = { |
| | | sourceID: this.addConfig.id, |
| | | sourceId: this.addConfig.id, |
| | | sourceType: sourceTyle, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | |
| | | let params = {} |
| | | if (this.addConfig.id) { |
| | | params = { |
| | | sourceID: this.addConfig.id, |
| | | sourceId: this.addConfig.id, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | } |
| | |
| | | infomation: {} |
| | | }, |
| | | clientId: this.editCommonConfig.infomation.client_id, |
| | | saleChanceId: this.editCommonConfig.infomation.saleChanceId, |
| | | saleChanceId: this.editCommonConfig.infomation.sale_chance_id, |
| | | subbillId: this.editCommonConfig.infomation.subbillId, |
| | | productId: 1, |
| | | isNoProduct: true, |
| | |
| | | } |
| | | this.getCommonData() |
| | | this.formInfo() |
| | | if (this.editConfig.title === '编辑'){ |
| | | if (this.editConfig.title === "编辑") { |
| | | this.isContact = false |
| | | this.getContactList(this.editConfig.infomation.contact_id) |
| | | } |
| | |
| | | status_id: data.status_id || 0, |
| | | threats: data.threats || "", |
| | | whether_established: data.whether_established || "", |
| | | |
| | | remark: data.remark || "", |
| | | detail_address: data.detail_address || "", |
| | | |
| | |
| | | // 获取联系人列表 |
| | | getContactList(id) { |
| | | getContactList({ |
| | | clientId: id, |
| | | page: 0, |
| | | pageSize: 0, |
| | | search_map: {} |
| | | search_map: { |
| | | client_id: id |
| | | } |
| | | }).then((res) => { |
| | | if (res.code == 200) { |
| | | this.contactNamelist = res.data.list |
| | |
| | | if (value === "client") { |
| | | this.clientId = item.id |
| | | this.editConfig.infomation.client_name = item.name |
| | | this.editConfig.infomation.contact_name = '' |
| | | this.editConfig.infomation.contact_name = "" |
| | | this.contactId = 0 |
| | | this.isContact = false |
| | | this.getContactList(item.id) |
| | |
| | | this.editSelectClientConfig.editVisible = true |
| | | } else if (value === "contact") { |
| | | this.editSelectContactConfig.editVisible = true |
| | | this.editSelectContactConfig.clientId = this.clientId |
| | | } |
| | | }, |
| | | selClient(row, value) { |
| | |
| | | } else if (value === "client") { |
| | | this.editConfig.infomation.client_name = row.name |
| | | this.clientId = row.id |
| | | this.editConfig.infomation.contact_name = '' |
| | | this.editConfig.infomation.contact_name = "" |
| | | this.contactId = 0 |
| | | this.isContact = false |
| | | this.getContactList(row.id) |
| | |
| | | let params = {} |
| | | if (this.addConfig.id) { |
| | | params = { |
| | | sourceID: this.addConfig.id, |
| | | sourceId: this.addConfig.id, |
| | | sourceType: 1, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | |
| | | // 请求数据 |
| | | async getData() { |
| | | this.loading = true |
| | | await getServiceOrderList({ |
| | | console.log(this.addConfig) |
| | | let params = {} |
| | | if (this.addConfig.keywordType === "服务合同") { |
| | | params = { |
| | | serviceContractId: this.addConfig.serviceContractId, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | } |
| | | } else { |
| | | params = { |
| | | keyword: this.keyword, |
| | | keywordType: this.keywordType, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize, |
| | | sourceId: this.addConfig.id |
| | | }) |
| | | pageSize: this.pagerOptions.pageSize |
| | | } |
| | | } |
| | | await getServiceOrderList(params) |
| | | .then((res) => { |
| | | console.log(res) |
| | | if (res.code === 200) { |
| | |
| | | this.codenumberList.length > 0 ? this.codenumberList.replace(/,/g, "") : "" |
| | | console.log(this.codenumberList.replace(/,/g, "")) |
| | | }, |
| | | validateFormNumber(){ |
| | | this.$set(this.editConfig.infomation,'serviceNumber',this.editConfig.infomation.serviceNumber) |
| | | this.$refs.form.validateField('serviceNumber') |
| | | }, |
| | | // 配置编码规范的跳转 |
| | | numberClick() { |
| | | window.open("http://www.fai365.com:9080/facilty", "_blank") |