/** * 批产合同管理接口 */ import request from '@/utils/request' import qs from 'qs' // 任务列表查询 export function getTaskList(params) { return request({ url: 'task/listPage', method: 'get', params }) } // 查询基本信息,合同流程详情 export function getContractDetail(id) { return request({ url: 'contract/selectById', method: 'get', params: { id: id } }) } // 添加任务 export function addTask(params) { return request({ url: 'task/add', method: 'post', params }) } // 修改任务 export function updateTask(params) { return request({ url: 'task/update', method: 'post', params }) } // 批量导入 export function batchImportTask(fileobj) { const param = new FormData() param.append('fs', fileobj) return request({ url: 'task/imp', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param }) } // 批量导出 export function batchExportTask(params) { return request({ url: 'task/listExp', method: 'post', timeout: 120000, params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } // 批量导出 export function batchExportDevice(params) { return request({ url: 'device/listExp', method: 'post', timeout: 120000, params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } // 任务列表查询 export function getDeviceListPage(params) { return request({ url: 'device/listPage', method: 'get', params }) } // 删除任务 export function delTask(taskId) { return request({ url: 'task/delete', method: 'post', params: { taskId: taskId } }) } // 新增批次 export function updateBatch(params, data) { return request({ url: 'batch/add', method: 'post', params, data // paramsSerializer: params => { // return qs.stringify(params, { indices: false }) // } }) } // 项目名称 export function getProjectList() { return request({ url: 'project/getProject', method: 'get' }) } // 合同下拉 export function getContractList() { return request({ url: 'contract/getContract', method: 'get' }) } // 获取批次号 export function getBatchNumber(devtypeId) { return request({ url: 'batch/getBatchNumber', method: 'get', params: { devtypeId: devtypeId } }) } // 获取项目对应设备类型 export function getTypeList(id) { return request({ url: 'project/getDevTypes', method: 'get', params: { projectId: id } }) } // 获取批次列表 export function getBatchList(devtypeId, taskId) { return request({ url: 'batch/getBatchList', method: 'get', params: { devtypeId: devtypeId, taskId: taskId } }) } // 设备类型下拉 export function getModelList(devtypeName) { return request({ url: 'deviceType/getModel', method: 'get', params: { devtypeName: devtypeName } }) } // 批量导入 export function batchImportDevice(fileobj) { const param = new FormData() param.append('fs', fileobj) return request({ url: 'device/imp', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param }) } // 查询履历列表 export function getQualityList(params) { return request({ url: 'productRepairRecords/listPage', method: 'get', params }) } // 履历批量导入 export function batchImportQuality(fileobj) { const param = new FormData() param.append('fs', fileobj) return request({ url: 'productRepairRecords/imp', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param }) } // 履历批量导出 export function batchExportQuality(params) { return request({ url: 'productRepairRecords/listExp', method: 'post', timeout: 120000, params, responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } // 添加履历 export function addQuality(params) { return request({ url: 'productRepairRecords/add', method: 'post', params }) } // 修改履历 export function updateQuality(params) { return request({ url: 'productRepairRecords/update', method: 'post', params }) } // 备货任务下拉接口 export function getTaskDownList(params) { return request({ url: 'task/getTask', method: 'get', params }) } // 设备下拉接口 export function getDeviceList(params) { return request({ url: 'device/getDevice', method: 'get', params }) }