Fixiaobai
2023-09-09 34a7e21b3508ac0f5f011d958210fdb7176d726b
src/api/standardLibrary.js
@@ -1,9 +1,34 @@
import request from '@/utils/request'
export function getMaterialList(params) {
export function addProduct(data) {
  return request({
    url: '/product/addProduct',
    method: 'post',
    data
  })
}
export function getMaterialList() {
  return request({
    url: '/material/list',
    method: 'get',
  })
}
//获取所有版本
export function getVersion(params){
  return request({
    url: '/product/chooseVersion',
    method: 'get',
    params
  })
}
//添加同一个型号的其他版本
export function addVersion(params){
  return request({
    url: '/product/addVersion',
    method: 'post',
    params
  })
}
@@ -17,14 +42,14 @@
  })
}
// 获取所有父项目对应的子项目
export function getProductSonList(params) {
  return request({
    url: '/product/father',
    method: 'get',
    params
  })
}
// // 获取所有父项目对应的子项目
// export function getProductSonList(params) {
//   return request({
//     url: '/product/father',
//     method: 'get',
//     params
//   })
// }
// 添加物料
export function addMaterial(data) {
@@ -52,3 +77,21 @@
    data
  })
}
// 批量删除
export function deleteListApi(ids) {
  return request({
    url: '/product/deleteList',
    method: 'delete',
    params: {ids: ids.toString()}
  })
}
// 失去焦点更新
export function blurUpdateApi(obj) {
  return request({
    url: '/product/write',
    method: 'post',
    params: obj
  })
}