From c8018f2e55a147bef3b9118c0cec66227295772f Mon Sep 17 00:00:00 2001
From: songshankun <songshankun@foxmail.com>
Date: 星期一, 16 十月 2023 16:48:42 +0800
Subject: [PATCH] fix: 修复添加销售子单时 更换客户名称,销售总单并未更换的问题
---
src/store/modules/getClientName.js | 114 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 113 insertions(+), 1 deletions(-)
diff --git a/src/store/modules/getClientName.js b/src/store/modules/getClientName.js
index 18637e3..194f2b0 100644
--- a/src/store/modules/getClientName.js
+++ b/src/store/modules/getClientName.js
@@ -3,6 +3,13 @@
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 {
@@ -11,7 +18,14 @@
contactNamelist: [], // 鑱旂郴浜�
saleChancelist: [], // 閿�鍞満浼�
saleLeadlist: [], // 閿�鍞嚎绱�
- masterOrderList: [] // 閿�鍞�诲崟
+ masterOrderList: [], // 閿�鍞�诲崟
+ serviceContractList: [], // 鏈嶅姟鍚堝悓
+ getContractList: [], // 鍚堝悓璁㈠崟
+ salesDetailsList: [], // 閿�鍞槑缁嗗崟
+ quotationList: [], // 鎶ヤ环鍗�
+ serviceOrderList: [], // 瀹㈡埛鏈嶅姟鍗�
+ productList: [], // 浜у搧鍒楄〃
+ salesReturnList: [] // 閿�鍞��璐у崟
},
mutations: {
clientNameList(state, payload) {
@@ -28,6 +42,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: {
@@ -49,6 +84,9 @@
}
})
},
+ getContactFilter({ commit }, newData) {
+ commit("contactNameList", newData)
+ },
geChance(context) {
getSaleChanceList().then((res) => {
if (res.code == 200) {
@@ -57,6 +95,9 @@
Message.error(res.msg)
}
})
+ },
+ getChanceFilter({commit},newData){
+ commit("saleChancelist",newData)
},
geLead(context) {
getSalesLeadsList().then((res) => {
@@ -75,6 +116,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