| | |
| | | import axios from "axios" |
| | | |
| | | // 产品列表 |
| | | export const getProductList = async (data) => { |
| | | return await axios.get(`/api/p/getProductList`, { |
| | | params: data |
| | | export function getProductList(data) { |
| | | return request({ |
| | | url: "/api-wms/v1/product/getProductList", |
| | | method: "post", |
| | | data |
| | | }) |
| | | } |
| | | // 创建产品 |
| | | export function createProduct(data) { |
| | | // 添加产品 |
| | | export function addProduct(data) { |
| | | return request({ |
| | | url: "/api/p/createProduct", |
| | | url: "/api-wms/v1/product/addProduct", |
| | | method: "post", |
| | | data |
| | | }) |
| | | } |
| | | // 删除产品 |
| | | export function deleteProduct(data) { |
| | | export function deleteProduct(id) { |
| | | return request({ |
| | | url: "/api/p/deleteProduct", |
| | | url: `/api-wms/v1/product/deleteProduct/${id}`, |
| | | method: "delete", |
| | | data |
| | | id |
| | | }) |
| | | } |
| | | // 更新产品 |
| | | // 修改产品 |
| | | export function updateProduct(data) { |
| | | return request({ |
| | | url: "/api/p/updateProduct", |
| | | method: "put", |
| | | url: "/api-wms/v1/product/updateProduct", |
| | | method: "post", |
| | | data |
| | | }) |
| | | } |
| | | |
| | | // 添加产品获取产品列表 |
| | | export const getProductListFromGrpc = async (data) => { |
| | | return await axios.get(`/api/p/getProductListFromGrpc`, { |
| | | // 获取产品详情 |
| | | export const getProductDetails = async (data) => { |
| | | return await axios.get(`/api-wms/v1/product/getProductDetails/${data.id}`, { |
| | | params: data |
| | | }) |
| | | } |