From ebddc02611b0373c1d5bfa342bd781fb5eb82009 Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期二, 01 八月 2023 14:23:31 +0800 Subject: [PATCH] 侧边栏样式机销售明细单增加销售机会选择弹窗 --- src/store/modules/getClientName.js | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 57 insertions(+), 1 deletions(-) diff --git a/src/store/modules/getClientName.js b/src/store/modules/getClientName.js index 0070ce8..18637e3 100644 --- a/src/store/modules/getClientName.js +++ b/src/store/modules/getClientName.js @@ -1,13 +1,33 @@ import { getClientList } from "@/api/client/client" // 瀵煎叆鎺ュ彛 +import { getContactList } from "@/api/client/contacts" +import { getSaleChanceList } from "@/api/sales/salesOpportunity" +import { getSalesLeadsList } from "@/api/client/salesLead" +import { getMasterOrderList } from "@/api/sales/masterOrder" import { Message } from "element-ui" export default { state: { - clientList: [] // 瀹㈡埛鍒楄〃 + clientList: [], // 瀹㈡埛鍒楄〃 + contactNamelist: [], // 鑱旂郴浜� + saleChancelist: [], // 閿�鍞満浼� + saleLeadlist: [], // 閿�鍞嚎绱� + masterOrderList: [] // 閿�鍞�诲崟 }, mutations: { clientNameList(state, payload) { state.clientList = payload + }, + contactNameList(state, payload) { + state.contactNamelist = payload + }, + saleChancelist(state, payload) { + state.saleChancelist = payload + }, + saleLeadlist(state, payload) { + state.saleLeadlist = payload + }, + masterOrderList(state, payload) { + state.masterOrderList = payload } }, actions: { @@ -19,6 +39,42 @@ Message.error(res.msg) } }) + }, + geContact(context) { + getContactList().then((res) => { + if (res.code == 200) { + context.commit("contactNameList", res.data.list) + } else { + Message.error(res.msg) + } + }) + }, + geChance(context) { + getSaleChanceList().then((res) => { + if (res.code == 200) { + context.commit("saleChancelist", res.data.list) + } else { + Message.error(res.msg) + } + }) + }, + geLead(context) { + getSalesLeadsList().then((res) => { + if (res.code == 200) { + context.commit("saleLeadlist", res.data.list) + } else { + Message.error(res.msg) + } + }) + }, + geMaster(context) { + getMasterOrderList().then((res) => { + if (res.code == 200) { + context.commit("masterOrderList", res.data.list) + } else { + Message.error(res.msg) + } + }) } } } -- Gitblit v1.8.0