zuozhengqing
2024-02-05 495088e8272e54ad244655b78be53d1400ffd2d4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import { getSupplierList } from "@/api/supplierManage/supplier"
import { Message } from "element-ui"
 
export default{
  state:{
    supplierList:[],  //供应商列表
  },
  mutations:{
    supplierNameList(state, payload) {
      state.supplierList = payload
    },
  },
  actions:{
    getSupplier(context){
      getSupplierList({page:1,pageSize:100,status:1}).then((res) => {
        if (res.code == 200) {
          context.commit("supplierNameList", res.data.list)
        } else {
          Message.error(res.msg)
        }
      })
    }
  }
 
}