import axios from "@/assets/axios";
|
|
/**
|
* 产品列表
|
* @returns
|
*/
|
export const getList = (pageCurr, pageSize, data) => {
|
return axios({
|
method: "GET",
|
url: "product/getAllProduct",
|
params: { pageCurr, pageSize, ...data }
|
})
|
}
|
/**
|
* 产品列表 不分页
|
* @returns
|
*/
|
export const getAllProducts = () => {
|
return axios({
|
method: "GET",
|
url: "product/getUpBomUseProduct"
|
})
|
}
|
/**
|
* 产品下载(产品id和版本<当前最新版本>)
|
* @returns
|
*/
|
export const downloadBom = (productId, version) => {
|
return axios({
|
method: "GET",
|
url: "product/downloadProduct",
|
params: { productId, version },
|
responseType: "blob"
|
})
|
}
|
|
/**
|
* 根据母料型号查询子件信息及有关联的散装件信息
|
* @returns
|
*/
|
export const getBomAndMaterial = (productId, version) => {
|
return axios({
|
method: "GET",
|
url: "product/getBomAndMaterial",
|
params: { productId, version }
|
})
|
}
|
|
/**
|
* 批量修改关联关系
|
* @returns
|
*/
|
export const materialRelatedSubmit = (data) => {
|
return axios({
|
method: "POST",
|
url: "worksheetMain/materialRelatedSubmit",
|
data
|
})
|
}
|
/**
|
* 上传产品
|
* @returns
|
*/
|
export const addProduct = (data) => {
|
return axios({
|
method: "POST",
|
url: "product",
|
data
|
})
|
}
|
/**
|
* 产品指定版本的激活 锁定
|
* customCode=1&enabled=1&parentCode=1&version=1
|
* @returns
|
*/
|
export const setpHistoryEnable = (params) => {
|
return axios({
|
method: "GET",
|
url: "product/setpHistoryEnable",
|
params
|
})
|
}
|
/**
|
* 产品操作日志查询
|
* customCode=1&parentCode=1
|
* @returns
|
*/
|
export const getLogList = (params) => {
|
return axios({
|
method: "GET",
|
url: "productLockLog/listByParentCodeAndCustomCode",
|
params
|
})
|
}
|
/**
|
* 根据产品id查询被锁定的物料dwg和产品丝印
|
* @returns
|
*/
|
export const getLockedList = (productId) => {
|
return axios({
|
method: "GET",
|
url: "product/getLockedByProductId",
|
params: { productId }
|
})
|
}
|