yuyu
2023-08-08 0d452c10ee16e40a3ca3d176e5ebebcb4bd16a87
src/api/standardLibrary.js
@@ -1,88 +1,5 @@
import request from '@/utils/request'
// 查询所有标准数据
export function getStandardsList() {
  return request({
    url: '/standards/list',
    method: 'get'
  })
}
// 分页查询所有标准数据
export function getStandardsListOfPage(params) {
  return request({
    url: '/standards/list_page',
    method: 'get',
    params
  })
}
// 添加类型
export function addStandards(data) {
  return request({
    url: '/standards/add',
    method: 'post',
    data
  })
}
// 根据标准查询所有型号 参数IdOrNameOfSerialNumber, standardsId
export function getSerialNumberList(params) {
  return request({
    url: '/serial-number/list',
    method: 'get',
    params
  })
}
// 添加型号
export function addSerialNumber(data) {
  return request({
    url: '/serial-number/add',
    method: 'post',
    data
  })
}
// 根据型号查询所有产品规格 参数serialNumberId, specificationsName
export function getSpecificationsList(params) {
  return request({
    url: '/specifications/list',
    method: 'get',
    params
  })
}
// 添加产品规格
export function addSpecifications(data) {
  return request({
    url: '/specifications/add',
    method: 'post',
    data
  })
}
// 编辑产品规格
export function updateSpecifications(data) {
  return request({
    url: '/specifications/update',
    method: 'put',
    data
  })
}
// 更新规格状态
export function updateSpeState(data) {
  return request({
    url: '/specifications/update_spe_state',
    method: 'put',
    data
  })
}
// 规格详情页接口
// 根据规格id查询所有物料 specificationsId
export function getMaterialList(params) {
  return request({
    url: '/material/list',
@@ -91,10 +8,19 @@
  })
}
// 根据物料id,获取对应的物料详情
export function getMaterialDetail(params) {
// 获取所有项目
export function getProductList(params) {
  return request({
    url: '/material/list_id',
    url: '/product/page',
    method: 'get',
    params
  })
}
// 获取所有父项目对应的子项目
export function getProductSonList(params) {
  return request({
    url: '/product/father',
    method: 'get',
    params
  })
@@ -109,65 +35,20 @@
  })
}
// 编辑物料信息
export function updateMaterial(data) {
// 添加标准
export function addStandards(data) {
  return request({
    url: '/material/update',
    method: 'put',
    data
  })
}
// 删除物料信息
export function deleteMaterial(params) {
  return request({
    url: '/material/delete',
    method: 'delete',
    params
  })
}
// 根据物料id查询所有标准分类 specificationsId
export function getProductList(params) {
  return request({
    url: '/product/list',
    method: 'get',
    params
  })
}
// 添加标准分类
export function addProduct(data) {
  return request({
    url: '/product/add',
    url: '/standards/add',
    method: 'post',
    data
  })
}
// 查询标准分类详情,对应的标准详情
export function getProductProductId(params) {
// 添加规格
export function addSpecifications(data) {
  return request({
    url: '/product/productId',
    method: 'get',
    params
  })
}
// 编辑子项目信息
export function updateProduct(data) {
  return request({
    url: '/product/update',
    method: 'put',
    url: '/specifications/add',
    method: 'post',
    data
  })
}
// 删除子项目信息
export function deleteProduct(params) {
  return request({
    url: '/product/delete',
    method: 'delete',
    params
  })
}