From af2b318da9d4c51b5b8afb2f4cefe86ff049bc7c Mon Sep 17 00:00:00 2001
From: songshankun <songshankun@foxmail.com>
Date: 星期二, 17 十月 2023 21:16:45 +0800
Subject: [PATCH] feat: 添加缺失的请求

---
 src/store/modules/getClientName.js |  136 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 135 insertions(+), 1 deletions(-)

diff --git a/src/store/modules/getClientName.js b/src/store/modules/getClientName.js
index 18637e3..94d01e9 100644
--- a/src/store/modules/getClientName.js
+++ b/src/store/modules/getClientName.js
@@ -1,21 +1,40 @@
 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"
 import { getMasterOrderList } from "@/api/sales/masterOrder"
+import { getServiceContractList } from "@/api/serviceManage/serviceContract"
+import { getContractList } from "@/api/sales/contractManage"
+import { getSalesDetailsList } from "@/api/sales/salesDetails"
+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: [], // 閿�鍞嚎绱�
-    masterOrderList: [] // 閿�鍞�诲崟
+    masterOrderList: [], // 閿�鍞�诲崟
+    serviceContractList: [], // 鏈嶅姟鍚堝悓
+    getContractList: [], // 鍚堝悓璁㈠崟
+    salesDetailsList: [], // 閿�鍞槑缁嗗崟
+    quotationList: [], // 鎶ヤ环鍗�
+    serviceOrderList: [], // 瀹㈡埛鏈嶅姟鍗�
+    productList: [], // 浜у搧鍒楄〃
+    salesReturnList: [] // 閿�鍞��璐у崟
   },
   mutations: {
     clientNameList(state, payload) {
       state.clientList = payload
+    },
+    subOrderList(state,payload){
+      state.subOrderList=payload
     },
     contactNameList(state, payload) {
       state.contactNamelist = payload
@@ -28,6 +47,27 @@
     },
     masterOrderList(state, payload) {
       state.masterOrderList = payload
+    },
+    serviceContractList(state, payload) {
+      state.serviceContractList = payload
+    },
+    contractList(state, payload) {
+      state.contractList = payload
+    },
+    salesDetailsList(state, payload) {
+      state.salesDetailsList = payload
+    },
+    quotationList(state, payload) {
+      state.quotationList = payload
+    },
+    serviceOrderList(state, payload) {
+      state.serviceOrderList = payload
+    },
+    productList(state, payload) {
+      state.productList = payload
+    },
+    salesReturnList(state, payload) {
+      state.salesReturnList = payload
     }
   },
   actions: {
@@ -40,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) {
@@ -49,6 +101,9 @@
         }
       })
     },
+    getContactFilter({ commit }, newData) {
+      commit("contactNameList", newData)
+    },
     geChance(context) {
       getSaleChanceList().then((res) => {
         if (res.code == 200) {
@@ -56,7 +111,12 @@
         } else {
           Message.error(res.msg)
         }
+      },err=>{
+        console.error(err)
       })
+    },
+    getChanceFilter({commit},newData){
+      commit("saleChancelist",newData)
     },
     geLead(context) {
       getSalesLeadsList().then((res) => {
@@ -67,6 +127,9 @@
         }
       })
     },
+    getLeadFilter({commit},newData){
+      commit("saleLeadlist",newData)
+    },
     geMaster(context) {
       getMasterOrderList().then((res) => {
         if (res.code == 200) {
@@ -75,6 +138,77 @@
           Message.error(res.msg)
         }
       })
+    },
+    geServiceContract(context) {
+      getServiceContractList().then((res) => {
+        if (res.code == 200) {
+          context.commit("serviceContractList", res.data.list)
+        } else {
+          Message.error(res.msg)
+        }
+      })
+    },
+    geContract(context) {
+      getContractList().then((res) => {
+        if (res.code == 200) {
+          context.commit("contractList", res.data.list)
+        } else {
+          Message.error(res.msg)
+        }
+      })
+    },
+    geSalesDetails(context) {
+      getSalesDetailsList().then((res) => {
+        if (res.code == 200) {
+          context.commit("salesDetailsList", res.data.list)
+        } else {
+          Message.error(res.msg)
+        }
+      })
+    },
+    getSalesDetailsFliter({commit},newData){
+      commit("salesDetailsList", newData)
+    },
+    geQuotation(context) {
+      getQuotationList().then((res) => {
+        if (res.code == 200) {
+          context.commit("quotationList", res.data.list)
+        } else {
+          Message.error(res.msg)
+        }
+      })
+    },
+    geServiceOrder(context) {
+      getServiceOrderList().then((res) => {
+        if (res.code == 200) {
+          context.commit("serviceOrderList", res.data.data)
+        } else {
+          Message.error(res.msg)
+        }
+      })
+    },
+    geProductList(context) {
+      getProductList({ productName: "", productNumber: "", page: 1, pageSize: 10 }).then((res) => {
+        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