assayApply.js
2.42 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
import request from '@/utils/request'
import { ContentTypeEnum } from '@/utils/httpEnum'
// 化验送样单(对齐 PC 端 api/warehouse-manage/sample-submission)
const baseUrl = '/procurement/assay/apply'
/**
* 生成送样单编号(直接返回编号字符串)
*/
export function assayApplyGenerateCodeApi() {
return request({
url: baseUrl + '/generateCode',
method: 'get'
})
}
/**
* 分页查询化验送样单列表
* params: pageIndex, pageSize, weighingTicketCode, productName,
* planCode, approvalStatus, createBy, deleted(boolean)
*/
export function assayApplyQueryApi(params) {
return request({
url: baseUrl + '/query',
method: 'get',
params
})
}
/**
* 分页查询可选过磅码单列表(码单编号选择)
* params: pageIndex, pageSize, code, workshopId
*/
export function assayApplyTicketPageApi(params) {
return request({
url: baseUrl + '/ticketPage',
method: 'get',
params
})
}
/**
* 根据过磅码单ID查询码单数据(含计划编号下拉选项 planOptions)
*/
export function assayApplyTicketDataApi(ticketId) {
return request({
url: baseUrl + '/ticketData',
method: 'get',
params: { ticketId }
})
}
/**
* 根据过磅码单与采购计划查询过磅品种下拉选项
* params: { ticketId(可选), planId }
*/
export function assayApplyBreedOptionsApi(params) {
return request({
url: baseUrl + '/breedOptions',
method: 'get',
params
})
}
/**
* 新增化验送样单
* data: { weighingTicketId, procurementPlanId, productId, department }
*/
export function assayApplyCreateApi(data) {
return request({
url: baseUrl,
method: 'post',
data,
contentType: ContentTypeEnum.JSON
})
}
/**
* 查询化验送样单详情
*/
export function assayApplyDetailApi(params) {
return request({
url: baseUrl,
method: 'get',
params
})
}
/**
* 修改化验送样单
* data: { id, weighingTicketId, procurementPlanId, productId, department }
*/
export function assayApplyUpdateApi(data) {
return request({
url: baseUrl,
method: 'put',
data,
contentType: ContentTypeEnum.JSON
})
}
/**
* 提交审核
*/
export function assayApplySubmitApi(id) {
return request({
url: baseUrl + '/submit?id=' + id,
method: 'put'
})
}
/**
* 取消化验送样单
*/
export function assayApplyCancelApi(id) {
return request({
url: baseUrl + '/cancel?id=' + id,
method: 'put'
})
}