yangfeng
2023-08-21 46ed69e3b72658140a40127f4bae16bef9a02d56
src/store/modules/getClientName.js
@@ -8,6 +8,7 @@
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 { Message } from "element-ui"
export default {
@@ -21,7 +22,8 @@
    getContractList: [], // 合同订单
    salesDetailsList: [], // 销售明细单
    quotationList: [], // 报价单
    serviceOrderList: [] // 客户服务单
    serviceOrderList: [], // 客户服务单
    productList: [] // 产品列表
  },
  mutations: {
    clientNameList(state, payload) {
@@ -53,6 +55,9 @@
    },
    serviceOrderList(state, payload) {
      state.serviceOrderList = payload
    },
    productList(state, payload) {
      state.productList = payload
    }
  },
  actions: {
@@ -145,6 +150,16 @@
          Message.error(res.msg)
        }
      })
    },
    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)
        } else {
          Message.error(res.msg)
        }
      })
    }
  }
}