import request from '@/utils/request' 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 }) } // 获取所有项目 export function getProductList(params) { return request({ url: '/product/page', method: 'get', params }) } // // 获取所有父项目对应的子项目 // export function getProductSonList(params) { // return request({ // url: '/product/father', // method: 'get', // params // }) // } // 添加物料 export function addMaterial(data) { return request({ url: '/material/add', method: 'post', data }) } // 添加标准 export function addStandards(data) { return request({ url: '/standards/add', method: 'post', data }) } // 添加规格 export function addSpecifications(data) { return request({ url: '/specifications/add', method: 'post', 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 }) }