zouyu
2023-09-08 c8ec099f3bf0d9cdc7e670ea2223c71e333d1e34
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
import request from '@/utils/request'
 
const Api = {
    addStandardProjectGroup: "/productModel/selectfather", // 添加标准-->选择项目分组
    productModelSelectmater: "/productModel/selectmater", // 选择样品名称
    addproductModel: "/productModel/addproductModel", // 添加标准
    selectproductModel: "/productModel/selectproductModel", // 查询标准模版列表
    deleteProductModel: "/productModel/delproductModel", // 删除标准模版
    selectproductModelById: "/productModel/selectproductModelById", // 根据id查询
    updateProductModel: "/productModel/writeproductModel", // 更新标准 -->编辑
    deleteList: "/productModel/delAllproductModel", // 批量删除
    getSample: "/material/getSample"  //获取基础数据样品名称
}
 
export function getSample() {
    return request({
        url: Api.getSample,
        method: 'get'
    })
}
 
export function addStandardProjectGroupApi() {
    return request({
        url: Api.addStandardProjectGroup,
        method: 'get'
    })
}
 
export function productModelSelectmaterApi() {
    return request({
        url: Api.productModelSelectmater,
        method: "get"
    })
}
 
export function addproductModelApi(formData) {
    return request({
        url: Api.addproductModel,
        method: 'post',
        data: formData
    })
}
 
export function updateProductModelApi(formData) {
    return request({
        url: Api.updateProductModel + '?id=' + formData.id,
        method: 'post',
        data:  formData
    })
}
 
export function selectproductModelApi(params) {
    return request({
        url: Api.selectproductModel,
        method: "get",
        params: params
    })
}
 
export function deleteProductModelApi(id){
    return request({
        url: Api.deleteProductModel,
        method: "post",
        params: {id: id}
    })
}
 
export function selectproductModelByIdApi(id){
    return request({
        url: Api.selectproductModelById,
        method: "get",
        params: {id: id}
    })
}
 
export function deleteListApi(id){
    return request({
        url: Api.deleteList,
        method: "post",
        params:{ids: id.toString()}
    })
}