|  |  |  | 
|---|
|  |  |  | import { getClientList } from "@/api/client/client" // 导入接口 | 
|---|
|  |  |  | import { getSubOrderList } from "@/api/sales/subOrder" | 
|---|
|  |  |  | import { getContactList } from "@/api/client/contacts" | 
|---|
|  |  |  | import { getSaleChanceList } from "@/api/sales/salesOpportunity" | 
|---|
|  |  |  | import { getSalesLeadsList } from "@/api/client/salesLead" | 
|---|
|  |  |  | 
|---|
|  |  |  | export default { | 
|---|
|  |  |  | state: { | 
|---|
|  |  |  | clientList: [], // 客户列表 | 
|---|
|  |  |  | subOrderList:[],//销售子单 | 
|---|
|  |  |  | contactNamelist: [], // 联系人 | 
|---|
|  |  |  | saleChancelist: [], // 销售机会 | 
|---|
|  |  |  | saleLeadlist: [], // 销售线索 | 
|---|
|  |  |  | 
|---|
|  |  |  | mutations: { | 
|---|
|  |  |  | clientNameList(state, payload) { | 
|---|
|  |  |  | state.clientList = payload | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | subOrderList(state,payload){ | 
|---|
|  |  |  | state.subOrderList=payload | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | contactNameList(state, payload) { | 
|---|
|  |  |  | state.contactNamelist = payload | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | getSubunit(context){ | 
|---|
|  |  |  | getSubOrderList().then((res)=>{ | 
|---|
|  |  |  | if (res.code == 200) { | 
|---|
|  |  |  | context.commit("subOrderList", res.data.list) | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | Message.error(res.msg) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | getSubunitFliter({commit},newData){ | 
|---|
|  |  |  | commit("subOrderList",newData) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | geContact(context) { | 
|---|
|  |  |  | getContactList().then((res) => { | 
|---|
|  |  |  | if (res.code == 200) { | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | getLeadFilter({commit},newData){ | 
|---|
|  |  |  | commit("saleLeadlist",newData) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | geMaster(context) { | 
|---|
|  |  |  | getMasterOrderList().then((res) => { | 
|---|
|  |  |  | if (res.code == 200) { | 
|---|