diff --git a/src/api/repairTest/inventoryScrap.js b/src/api/repairTest/inventoryScrap.js new file mode 100644 index 0000000..b59dcdb --- /dev/null +++ b/src/api/repairTest/inventoryScrap.js @@ -0,0 +1,77 @@ +import request from '@/utils/request' + +// +//获取机具类型树 +export function equipmentTypeTree(data) { + return request({ + url: '/material/select/getDeviceTypeTree', + method: 'post', + data: data + }) +} + +//获取设备编号列表 +export function getMachineListByCode(query) { + return request({ + url: '/material/base/machine/getMachineList', + method: 'get', + params: query + }) +} + +//新增盘带报废 +export function addScrapInfo(data) { + return request({ + url: '/material/scrap/addList ', + method: 'post', + data: data + }) +} + +//获取盘带报废列表 +export function getInventoryList(query) { + return request({ + url: '/material/scrap/inventoryList', + method: 'get', + params: query + }) +} + +//获取盘带报废详情 +export function getScrapInfo(query) { + return request({ + url: '/material/scrap/getDetailsList', + method: 'get', + params: query + }) +} + +//修改盘带报废 +export function editScrapInfo(data) { + return request({ + url: '/material/scrap/updateList ', + method: 'post', + data: data + }) +} + +//一级页面删除盘带报废 +export function applyRemove(data) { + return request({ + url: '/material/scrap/delete ', + method: 'post', + data: data + }) +} + +//盘点报废通过与驳回 +export function inventoryPass(data) { + return request({ + url: '/material/scrap/inventoryApprove', + method: 'post', + data: data + }) +} + + + diff --git a/src/assets/file.png b/src/assets/file.png new file mode 100644 index 0000000..9289fcd Binary files /dev/null and b/src/assets/file.png differ diff --git a/src/utils/download.js b/src/utils/download.js new file mode 100644 index 0000000..2aa8796 --- /dev/null +++ b/src/utils/download.js @@ -0,0 +1,37 @@ +// 下载blob文件 +export const downloadFile = ({ fileData, fileType, fileName }) => { + const blob = new Blob([fileData], { + type: fileType + }) + const link = document.createElement('a') + link.href = URL.createObjectURL(blob) + link.download = fileName + link.style.display = 'none' + document.body.appendChild(link) + link.click() + URL.revokeObjectURL(link.href) + document.body.removeChild(link) +} + +// 通用a链接下载 +export const downloadFileByUrl = (url) => { + const link = document.createElement('a'); + link.href = url; // 设置文件 URL + link.download = ''; // 提供下载提示 + document.body.appendChild(link); // 将链接添加到 DOM + link.click(); // 模拟点击下载 + document.body.removeChild(link); // 下载后移除链接 +} + +// pdf、doc、docx等文件下载 +export const downloadFileData = ({ fileName, fileUrl }) => { + const link = document.createElement('a') + link.setAttribute('download', '') + link.style.display = 'none' + link.href = fileUrl + link.download = fileName + document.body.appendChild(link) + link.click(); + // URL.revokeObjectURL(link.href) + document.body.removeChild(link) +} \ No newline at end of file diff --git a/src/views/repairTest/inventoryScrap/component/addToolsApply.vue b/src/views/repairTest/inventoryScrap/component/addToolsApply.vue new file mode 100644 index 0000000..191429a --- /dev/null +++ b/src/views/repairTest/inventoryScrap/component/addToolsApply.vue @@ -0,0 +1,1128 @@ + + + + diff --git a/src/views/repairTest/inventoryScrap/component/homeApply.vue b/src/views/repairTest/inventoryScrap/component/homeApply.vue new file mode 100644 index 0000000..fa50570 --- /dev/null +++ b/src/views/repairTest/inventoryScrap/component/homeApply.vue @@ -0,0 +1,364 @@ + + + + diff --git a/src/views/repairTest/inventoryScrap/component/queryToolsApply.vue b/src/views/repairTest/inventoryScrap/component/queryToolsApply.vue new file mode 100644 index 0000000..4d0c3ff --- /dev/null +++ b/src/views/repairTest/inventoryScrap/component/queryToolsApply.vue @@ -0,0 +1,246 @@ + + + + diff --git a/src/views/repairTest/inventoryScrap/index.vue b/src/views/repairTest/inventoryScrap/index.vue new file mode 100644 index 0000000..0f00968 --- /dev/null +++ b/src/views/repairTest/inventoryScrap/index.vue @@ -0,0 +1,87 @@ + + + \ No newline at end of file