| | |
| | | /** 工艺参数 */ |
| | | export interface Parameter { |
| | | id?: number; |
| | | code?: string; |
| | | name?: string; |
| | | type?: number; |
| | | unit?: string; |
| | | requiredFlag?: boolean; |
| | | dictType?: string; |
| | | apiUrl?: string; |
| | | paramCode?: string; |
| | | paramName?: string; |
| | | paramType?: number; |
| | | unitMeasureId?: number; |
| | | unitMeasureName?: string; |
| | | required?: boolean; |
| | | remark?: string; |
| | | createTime?: Date; |
| | | } |
| | | } |
| | | |
| | | /** 查询工艺参数分页 */ |
| | | export function getParameterPage(params: PageParam) { |
| | | export function getParameterPage(params: PageParam & { |
| | | paramCode?: string; |
| | | paramName?: string; |
| | | paramType?: number; |
| | | }) { |
| | | return requestClient.get<PageResult<MesPdParameterApi.Parameter>>( |
| | | '/mes/pro/process-design/parameter/page', |
| | | '/mes/pd/process-param/page', |
| | | { params }, |
| | | ); |
| | | } |
| | |
| | | /** 查询工艺参数精简列表 */ |
| | | export function getParameterSimpleList() { |
| | | return requestClient.get<MesPdParameterApi.Parameter[]>( |
| | | '/mes/pro/process-design/parameter/simple-list', |
| | | '/mes/pd/process-param/simple-list', |
| | | ); |
| | | } |
| | | |
| | | /** 查询工艺参数详情 */ |
| | | export function getParameter(id: number) { |
| | | return requestClient.get<MesPdParameterApi.Parameter>( |
| | | `/mes/pro/process-design/parameter/get?id=${id}`, |
| | | `/mes/pd/process-param/get?id=${id}`, |
| | | ); |
| | | } |
| | | |
| | | /** 新增工艺参数 */ |
| | | export function createParameter(data: MesPdParameterApi.Parameter) { |
| | | return requestClient.post( |
| | | '/mes/pro/process-design/parameter/create', |
| | | '/mes/pd/process-param/create', |
| | | data, |
| | | ); |
| | | } |
| | |
| | | /** 修改工艺参数 */ |
| | | export function updateParameter(data: MesPdParameterApi.Parameter) { |
| | | return requestClient.put( |
| | | '/mes/pro/process-design/parameter/update', |
| | | '/mes/pd/process-param/update', |
| | | data, |
| | | ); |
| | | } |
| | |
| | | /** 删除工艺参数 */ |
| | | export function deleteParameter(id: number) { |
| | | return requestClient.delete( |
| | | `/mes/pro/process-design/parameter/delete?id=${id}`, |
| | | `/mes/pd/process-param/delete?id=${id}`, |
| | | ); |
| | | } |
| | | |
| | | /** 导出工艺参数 */ |
| | | export function exportParameterExcel(params: any) { |
| | | return requestClient.download( |
| | | '/mes/pd/process-param/export-excel', |
| | | { params }, |
| | | ); |
| | | } |