跟进记录:联系人、销售机会、销售线索根据客户名称进行筛选
| | |
| | | return { |
| | | editVisible: false, |
| | | title: "", |
| | | infomation: {}, |
| | | search_map:{} |
| | | clientId: 0, |
| | | infomation: {} |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | this.search_map = { |
| | | client_id: this.editConfig.clientId |
| | | } |
| | | this.setTable() |
| | | this.getData() |
| | | }, |
| | |
| | | import { getServiceOrderList } from "@/api/serviceManage/clientServiceOrder" |
| | | import { getProductList } from "@/api/common/other" |
| | | import { getSalesReturnList } from "@/api/sales/salesReturn" |
| | | import { getSubOrderList } from "@/api/sales/subOrder" |
| | | import pageMixin from "@/components/makepager/pager/mixin/pageMixin" |
| | | export default { |
| | | name: "EditSelCommonDialog", |
| | |
| | | tableColumn: this.setColumnVisible(this.showCol) |
| | | } |
| | | this.searchSel = { value: "number", label: "销售退货单编号" } |
| | | } else if (this.editConfig.title === "销售子单") { |
| | | this.tableColumn = [ |
| | | { label: "单据编号", prop: "number", isClick: true, default: true }, // 单据编号 |
| | | { label: "负责人", prop: "member_name" } // 负责人 |
| | | ] |
| | | this.showCol = ["单据编号", "负责人"] |
| | | this.tableList = { |
| | | selectIndex: true, |
| | | tableInfomation: [], |
| | | allcol: [], |
| | | showcol: this.showCol, |
| | | tableColumn: this.setColumnVisible(this.showCol) |
| | | } |
| | | this.searchSel = { value: "number", label: "单据编号" } |
| | | } |
| | | this.tableList.allcol = this.tableList.tableColumn.filter((ele) => !ele.default).map((ele) => ele.label) |
| | | this.searchOptions = [] |
| | |
| | | this.getProductList() |
| | | } else if (this.editConfig.title === "销售退货单") { |
| | | this.getSalesReturnList() |
| | | } else if (this.editConfig.title === "销售子单") { |
| | | this.getSubOrderList() |
| | | } |
| | | }, |
| | | // 销售总单 |
| | |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | // 销售子单 |
| | | async getSubOrderList() { |
| | | await getSubOrderList({ |
| | | search_map: this.search_map, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | if (res.data.list && res.data.list.length > 0) { |
| | | const list = res.data.list.map((item) => { |
| | | return { |
| | | ...item, |
| | | member_name: item.member.username |
| | | } |
| | | }) |
| | | this.tableList.tableInfomation = list || [] |
| | | this.pagerOptions.totalCount = res.data.count |
| | | } else { |
| | | this.tableList.tableInfomation = [] |
| | | } |
| | | } |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | handleClose() { |
| | | this.editConfig.editVisible = false |
| | | }, |
| | |
| | | this.$emit("selClient", row, "productName") |
| | | } else if (this.editConfig.title === "销售退货单") { |
| | | this.$emit("selClient", row, "salesReturn") |
| | | } else if (this.editConfig.title === "销售子单") { |
| | | this.$emit("selClient", row, "subbill") |
| | | } |
| | | }, |
| | | // 搜索 |
| | |
| | | addBtnClick() { |
| | | this.editConfig.visible = true |
| | | this.editConfig.title = "新建" |
| | | this.editConfig.infomation = { currency: "人民币" } |
| | | this.editConfig.infomation = { currency: "人民币", ...this.addConfig } |
| | | }, |
| | | // 编辑 |
| | | handleClick(row) { |
| | |
| | | @select="handleSelectClient('subbill', $event)" |
| | | :disabled="isNameChanceEdit" |
| | | ></el-autocomplete> |
| | | <div v-if="!isNameChanceEdit" class="common-select-btn" @click="selClientClick('client')"> |
| | | <div v-if="!isNameChanceEdit" class="common-select-btn" @click="selClientClick('subbill')"> |
| | | <i class="el-icon-circle-plus-outline" title="选择"></i> |
| | | </div> |
| | | <div |
| | |
| | | :edit-common-config="editSelectChanceConfig" |
| | | @selClient="selClient" |
| | | /> |
| | | <!-- 销售子单 --> |
| | | <SelectCommonDialog |
| | | v-if="editSelCommonConfig.editVisible" |
| | | :edit-common-config="editSelCommonConfig" |
| | | @selClient="selClient" |
| | | /> |
| | | <!-- 新建 收款计划 --> |
| | | <AddCollectionPlan v-if="addCollectionConfig.visible" :edit-common-config="addCollectionConfig" /> |
| | | </el-dialog> |
| | |
| | | import codeMixin from "@/views/client/followupRecords/mixin/codeMixin" |
| | | import { getSaleChanceList} from "@/api/sales/salesOpportunity" |
| | | import { getSubOrderList } from "@/api/sales/subOrder" |
| | | import SelectCommonDialog from "@/views/other/commonDialog/SelectCommonDialog" |
| | | |
| | | import {mapActions} from "vuex" |
| | | |
| | |
| | | } |
| | | } |
| | | }, |
| | | components: { CommonFormTableView, SelectClientDialog, SelectChanceDialog, AddCollectionPlan }, |
| | | components: { CommonFormTableView, SelectClientDialog, SelectChanceDialog, AddCollectionPlan, SelectCommonDialog }, |
| | | computed: { |
| | | clientList() { |
| | | return this.$store.state.getClientName.clientList |
| | | }, |
| | | saleChancelist() { |
| | | return this.$store.state.getClientName.saleChancelist |
| | | }, |
| | | subOrderList(){ |
| | | return this.$store.state.getClientName.subOrderList |
| | | } |
| | | // saleChancelist() { |
| | | // return this.$store.state.getClientName.saleChancelist |
| | | // }, |
| | | // subOrderList() { |
| | | // return this.$store.state.getClientName.subOrderList |
| | | // } |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | title: "", |
| | | infomation: {} |
| | | }, |
| | | editSelCommonConfig: { |
| | | editVisible: false, |
| | | title: "", |
| | | infomation: {} |
| | | }, |
| | | clientId: this.editCommonConfig.infomation.client_id, |
| | | saleChanceId: this.editCommonConfig.infomation.saleChanceId, |
| | | subbillId:this.editCommonConfig.infomation.subbillId, |
| | |
| | | }, |
| | | created() { |
| | | this.$store.dispatch("geClient") |
| | | this.$store.dispatch("geChance") |
| | | this.$store.dispatch("getSubunit") |
| | | // this.$store.dispatch("geChance") |
| | | // this.$store.dispatch("getSubunit") |
| | | this.setTableForm() |
| | | this.getCommonData() |
| | | this.formInfo() |
| | |
| | | } else if (value === "chance") { |
| | | restaurants = this.saleChancelist |
| | | }else if(value==="subbill"){ |
| | | let arr=[] |
| | | this.subOrderList.map((item)=>{ |
| | | arr.push(item.client) |
| | | }) |
| | | restaurants=arr |
| | | console.log("子丹",restaurants,arr) |
| | | restaurants = this.subOrderList |
| | | } |
| | | var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants |
| | | cb(results) |
| | |
| | | this.editConfig.infomation.client_name = item.name |
| | | // 需要修改 |
| | | await getSaleChanceList({ |
| | | client_id:this.clientId |
| | | page: 1, |
| | | pageSize: 15, |
| | | search_map: { |
| | | client_id: item.id |
| | | } |
| | | }).then((res)=>{ |
| | | console.log(res) |
| | | this.saleChancelist = res.data.list |
| | | }) |
| | | await getSubOrderList({ |
| | | page:1, |
| | |
| | | client_id:item.id |
| | | } |
| | | }).then((res)=>{ |
| | | this.getSubunitFliter(res.data.list) |
| | | this.subOrderList = res.data.list |
| | | }) |
| | | } else if (value === "chance") { |
| | | this.saleChanceId = item.id |
| | |
| | | }else if(value==="subbill"){ |
| | | console.log("下拉框点击",item) |
| | | this.subbillId = item.id |
| | | this.editConfig.infomation.subbill_name = item.name |
| | | this.editConfig.infomation.subbill_name = item.number |
| | | } |
| | | }, |
| | | selClientClick(value) { |
| | | if (value === "client") { |
| | | this.editSelectClientConfig.editVisible = true |
| | | } else if (value === "chance") { |
| | | this.editSelectChanceConfig.clientId = this.clientId |
| | | this.editSelectChanceConfig.editVisible = true |
| | | }else if(value==="subbill"){ |
| | | this.editSelectChanceConfig.editVisible = true |
| | | this.editSelCommonConfig.title = "销售子单" |
| | | this.editSelCommonConfig.editVisible = true |
| | | this.editSelCommonConfig.clientId = this.clientId |
| | | } |
| | | }, |
| | | selClient(row, value) { |
| | |
| | | this.editConfig.infomation.sale_chance_name = row.name |
| | | this.saleChanceId = row.id |
| | | }else if(value==="subbill"){ |
| | | this.editConfig.infomation.subbill_name = row.name |
| | | this.editConfig.infomation.subbill_name = row.number |
| | | this.subbillId=row.id |
| | | } |
| | | }, |
| | |
| | | client_name: this.detailConfig.infomation.client.name, |
| | | contact_name: this.detailConfig.infomation.contact_name, |
| | | client_id: this.detailConfig.infomation.client_id, |
| | | contact_id: this.detailConfig.infomation.contact_id |
| | | contact_id: this.detailConfig.infomation.contact_id, |
| | | sale_return_nunber: this.detailConfig.infomation.number |
| | | } |
| | | this.setTableForm() |
| | | }, |
| | |
| | | client_name: this.detailConfig.infomation.client.name, |
| | | contact_name: this.detailConfig.infomation.contact_name, |
| | | client_id: this.detailConfig.infomation.client_id, |
| | | contact_id: this.detailConfig.infomation.contact_id |
| | | contact_id: this.detailConfig.infomation.contact_id, |
| | | subbill_name: this.detailConfig.infomation.number |
| | | } |
| | | this.setTableForm() |
| | | }, |
| | |
| | | this.editConfig.infomation = { |
| | | ...this.addConfig, |
| | | currency: "人民币", |
| | | client_name: "", |
| | | client_name: Object.keys(this.addConfig).length === 0 ? "" : this.addConfig.client_name, |
| | | contact_name: "", |
| | | sale_chance_name: "", |
| | | sale_chance_name: Object.keys(this.addConfig).length === 0 ? "" : this.addConfig.sale_chance_name, |
| | | contract_number: "", |
| | | quotation_number: "" |
| | | } |