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