From d7c06cca16d12ecf5d0f233395dcf6062261b39b Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期三, 29 十一月 2023 17:01:28 +0800 Subject: [PATCH] 服务管理模块新增增加负责人默认值 --- src/store/modules/getClientName.js | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 53 insertions(+), 4 deletions(-) diff --git a/src/store/modules/getClientName.js b/src/store/modules/getClientName.js index 90f5a17..94d01e9 100644 --- a/src/store/modules/getClientName.js +++ b/src/store/modules/getClientName.js @@ -1,4 +1,5 @@ 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" @@ -9,11 +10,13 @@ import { getQuotationList } from "@/api/sales/quotation" import { getServiceOrderList } from "@/api/serviceManage/clientServiceOrder" import { getProductList } from "@/api/common/other" +import { getSalesReturnList } from "@/api/sales/salesReturn" import { Message } from "element-ui" export default { state: { clientList: [], // 瀹㈡埛鍒楄〃 + subOrderList:[],//閿�鍞瓙鍗� contactNamelist: [], // 鑱旂郴浜� saleChancelist: [], // 閿�鍞満浼� saleLeadlist: [], // 閿�鍞嚎绱� @@ -23,11 +26,15 @@ salesDetailsList: [], // 閿�鍞槑缁嗗崟 quotationList: [], // 鎶ヤ环鍗� serviceOrderList: [], // 瀹㈡埛鏈嶅姟鍗� - productList: [] // 浜у搧鍒楄〃 + productList: [], // 浜у搧鍒楄〃 + salesReturnList: [] // 閿�鍞��璐у崟 }, mutations: { clientNameList(state, payload) { state.clientList = payload + }, + subOrderList(state,payload){ + state.subOrderList=payload }, contactNameList(state, payload) { state.contactNamelist = payload @@ -58,6 +65,9 @@ }, productList(state, payload) { state.productList = payload + }, + salesReturnList(state, payload) { + state.salesReturnList = payload } }, actions: { @@ -70,6 +80,18 @@ } }) }, + 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) { @@ -79,6 +101,9 @@ } }) }, + getContactFilter({ commit }, newData) { + commit("contactNameList", newData) + }, geChance(context) { getSaleChanceList().then((res) => { if (res.code == 200) { @@ -86,7 +111,12 @@ } else { Message.error(res.msg) } + },err=>{ + console.error(err) }) + }, + getChanceFilter({commit},newData){ + commit("saleChancelist",newData) }, geLead(context) { getSalesLeadsList().then((res) => { @@ -96,6 +126,9 @@ Message.error(res.msg) } }) + }, + getLeadFilter({commit},newData){ + commit("saleLeadlist",newData) }, geMaster(context) { getMasterOrderList().then((res) => { @@ -133,6 +166,9 @@ } }) }, + getSalesDetailsFliter({commit},newData){ + commit("salesDetailsList", newData) + }, geQuotation(context) { getQuotationList().then((res) => { if (res.code == 200) { @@ -153,13 +189,26 @@ }, geProductList(context) { getProductList({ productName: "", productNumber: "", page: 1, pageSize: 10 }).then((res) => { - if (res.data.code == 200) { - console.log(res.data.data.data) - context.commit("productList", res.data.data.data) + if (res.code == 200) { + console.log(res.data.data) + context.commit("productList", res.data.data) } else { Message.error(res.msg) } }) + }, + geReturnList(context) { + getSalesReturnList({ productName: "", productNumber: "", page: 1, pageSize: 10 }).then((res) => { + if (res.code == 200) { + console.log(res.data.list) + context.commit("salesReturnList", res.data.list) + } else { + Message.error(res.msg) + } + }) + }, + getReturnListFliter({commit},newData){ + commit("salesReturnList",newData) } } } -- Gitblit v1.8.0