From df572949f38b87c9c52c0e69e3202d914bb9c09c Mon Sep 17 00:00:00 2001 From: my_ong <429426262@qq.com> Date: Sat, 15 Mar 2025 12:44:11 +0800 Subject: [PATCH] =?UTF-8?q?sparkles:=20:sparkles:=20=E6=8A=A5=E5=BA=9F?= =?UTF-8?q?=E5=87=BA=E5=BA=93=20=E6=9F=A5=E8=AF=A2=E5=92=8C=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/api-lock.json | 263 +++++++++++++++++- src/api/material/api.d.ts | 46 ++- .../material/mods/apply/getScrapOutById.ts | 21 ++ src/api/material/mods/apply/index.ts | 4 + .../mods/apply/submitScrapOutReview.ts | 22 ++ .../stock/report/outboundReport-page.vue | 81 +++++- 6 files changed, 434 insertions(+), 3 deletions(-) create mode 100644 src/api/material/mods/apply/getScrapOutById.ts create mode 100644 src/api/material/mods/apply/submitScrapOutReview.ts diff --git a/src/api/api-lock.json b/src/api/api-lock.json index 7c83ef0..5440240 100644 --- a/src/api/api-lock.json +++ b/src/api/api-lock.json @@ -3941,6 +3941,79 @@ } ] }, + { + "description": "提交报废出库审核", + "name": "submitScrapOutReview", + "method": "post", + "path": "/scrap-out-review", + "response": { + "typeArgs": [], + "typeName": "", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + }, + "parameters": [ + { + "required": true, + "in": "body", + "name": "requestBody", + "dataType": { + "typeArgs": [], + "typeName": "ReviewDTO", + "isDefsType": true, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + } + } + ] + }, + { + "description": "获取报废出库申请单", + "name": "getScrapOutById", + "method": "get", + "path": "/scrap-out/{applyId}", + "response": { + "typeArgs": [ + { + "typeArgs": [], + "typeName": "ScrapOutApplyDTO", + "isDefsType": true, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + } + ], + "typeName": "Array", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + }, + "parameters": [ + { + "description": "申请单ID", + "required": true, + "in": "path", + "name": "applyId", + "dataType": { + "typeArgs": [], + "typeName": "number", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + } + } + ] + }, { "description": "提交审核", "name": "submitReview", @@ -4506,6 +4579,20 @@ "description": "申请日期", "required": false }, + { + "dataType": { + "typeArgs": [], + "typeName": "number", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + }, + "name": "applyId", + "description": "申请id", + "required": false + }, { "dataType": { "typeArgs": [], @@ -4561,6 +4648,20 @@ "description": "物料编码", "required": false }, + { + "dataType": { + "typeArgs": [], + "typeName": "boolean", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + }, + "name": "confirm", + "description": "是否确认", + "required": false + }, { "dataType": { "typeArgs": [], @@ -4603,6 +4704,34 @@ "description": "备注", "required": false }, + { + "dataType": { + "typeArgs": [], + "typeName": "", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": ["'WAIT_SCAN'", "'WAIT_SUBMIT'", "'WAIT_REVIEW'", "'PASS'", "'REJECT'"], + "typeProperties": [] + }, + "name": "reviewResult", + "description": "审核状态", + "required": false + }, + { + "dataType": { + "typeArgs": [], + "typeName": "string", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + }, + "name": "reviewer", + "description": "审核人", + "required": false + }, { "dataType": { "typeArgs": [], @@ -6143,7 +6272,7 @@ "isDefsType": false, "templateIndex": -1, "compileTemplateKeyword": "#/definitions/", - "enum": ["'IN'", "'OUT'", "'OFF'", "'LOST'"], + "enum": ["'IN'", "'OUT'", "'OFF'", "'LOST'", "'SCRAP_OUT'"], "typeProperties": [] }, "name": "status", @@ -6214,6 +6343,138 @@ } ] }, + { + "name": "ScrapOutApplyDTO", + "templateArgs": [], + "properties": [ + { + "dataType": { + "typeArgs": [], + "typeName": "string", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + }, + "name": "applicant", + "description": "申请人", + "required": false + }, + { + "dataType": { + "typeArgs": [], + "typeName": "string", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + }, + "name": "barcodeList", + "description": "条码集合", + "required": false + }, + { + "dataType": { + "typeArgs": [], + "typeName": "number", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + }, + "name": "confirmQuantity", + "description": "确认数量", + "required": false + }, + { + "dataType": { + "typeArgs": [], + "typeName": "string", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + }, + "name": "name", + "description": "物料名称", + "required": false + }, + { + "dataType": { + "typeArgs": [], + "typeName": "string", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + }, + "name": "price", + "description": "单价", + "required": false + }, + { + "dataType": { + "typeArgs": [], + "typeName": "string", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + }, + "name": "remark", + "description": "报废原因", + "required": false + }, + { + "dataType": { + "typeArgs": [], + "typeName": "string", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + }, + "name": "spec", + "description": "物料规格", + "required": false + }, + { + "dataType": { + "typeArgs": [], + "typeName": "string", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + }, + "name": "type", + "description": "类型", + "required": false + }, + { + "dataType": { + "typeArgs": [], + "typeName": "string", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + }, + "name": "typeName", + "description": "类型名称", + "required": false + } + ] + }, { "description": "库存明细", "name": "StockDetailInfo", diff --git a/src/api/material/api.d.ts b/src/api/material/api.d.ts index 1a74322..f595660 100644 --- a/src/api/material/api.d.ts +++ b/src/api/material/api.d.ts @@ -9,6 +9,9 @@ declare namespace material { /** 申请日期 */ applyDate?: string + /** 申请id */ + applyId?: number + /** 申请数量 */ applyNum?: string @@ -21,6 +24,9 @@ declare namespace material { /** 物料编码 */ code?: string + /** 是否确认 */ + confirm?: boolean + /** 确认数量 */ confirmNum?: string @@ -30,6 +36,12 @@ declare namespace material { /** 备注 */ remark?: string + /** 审核状态 */ + reviewResult?: 'WAIT_SCAN' | 'WAIT_SUBMIT' | 'WAIT_REVIEW' | 'PASS' | 'REJECT' + + /** 审核人 */ + reviewer?: string + /** 物料规格 */ spec?: string @@ -313,7 +325,7 @@ declare namespace material { materialId?: number /** 状态 */ - status?: 'IN' | 'OUT' | 'OFF' | 'LOST' + status?: 'IN' | 'OUT' | 'OFF' | 'LOST' | 'SCRAP_OUT' /** updatedTime */ updatedTime?: string @@ -333,6 +345,38 @@ declare namespace material { reviewResult?: 'WAIT_SCAN' | 'WAIT_SUBMIT' | 'WAIT_REVIEW' | 'PASS' | 'REJECT' } + /** + * ScrapOutApplyDTO + */ + export interface ScrapOutApplyDTO { + /** 申请人 */ + applicant?: string + + /** 条码集合 */ + barcodeList?: string + + /** 确认数量 */ + confirmQuantity?: number + + /** 物料名称 */ + name?: string + + /** 单价 */ + price?: string + + /** 报废原因 */ + remark?: string + + /** 物料规格 */ + spec?: string + + /** 类型 */ + type?: string + + /** 类型名称 */ + typeName?: string + } + /** * 库存明细 */ diff --git a/src/api/material/mods/apply/getScrapOutById.ts b/src/api/material/mods/apply/getScrapOutById.ts new file mode 100644 index 0000000..2f5b3ec --- /dev/null +++ b/src/api/material/mods/apply/getScrapOutById.ts @@ -0,0 +1,21 @@ +/** + * @desc 获取报废出库申请单 + */ +import { defaultSuccess, defaultError, http } from '@/plugins/axios' +import type { AxiosResponse } from 'axios' +export default async function ( + /** 申请单ID */ + applyId: number, + + success: (data: Array) => void = defaultSuccess, + fail: (error: { code: string; error?: string }) => void = defaultError, +): Promise { + return http({ + method: 'get', + url: `/scrap-out/${applyId}`, + }) + .then((data: AxiosResponse, unknown>) => { + success(data.data) + }) + .catch((error: { code: string; error?: string }) => fail(error)) +} diff --git a/src/api/material/mods/apply/index.ts b/src/api/material/mods/apply/index.ts index 6a5ba75..8cb749a 100644 --- a/src/api/material/mods/apply/index.ts +++ b/src/api/material/mods/apply/index.ts @@ -12,6 +12,8 @@ import updateReviewResult from './updateReviewResult' import submitManualStock from './submitManualStock' import getManualStock from './getManualStock' import saveScanData from './saveScanData' +import submitScrapOutReview from './submitScrapOutReview' +import getScrapOutById from './getScrapOutById' import submitReview from './submitReview' import getWaitScanData from './getWaitScanData' @@ -26,6 +28,8 @@ export default { submitManualStock, getManualStock, saveScanData, + submitScrapOutReview, + getScrapOutById, submitReview, getWaitScanData, } diff --git a/src/api/material/mods/apply/submitScrapOutReview.ts b/src/api/material/mods/apply/submitScrapOutReview.ts new file mode 100644 index 0000000..6578900 --- /dev/null +++ b/src/api/material/mods/apply/submitScrapOutReview.ts @@ -0,0 +1,22 @@ +/** + * @desc 提交报废出库审核 + */ +import { defaultSuccess, defaultError, http } from '@/plugins/axios' +import type { AxiosResponse } from 'axios' +export default async function ( + /** 请求体 */ + requestBody: material.ReviewDTO, + + success: (data: void) => void = defaultSuccess, + fail: (error: { code: string; error?: string }) => void = defaultError, +): Promise { + return http({ + method: 'post', + url: `/scrap-out-review`, + data: requestBody, + }) + .then((data: AxiosResponse) => { + success(data.data) + }) + .catch((error: { code: string; error?: string }) => fail(error)) +} diff --git a/src/views/stock/report/outboundReport-page.vue b/src/views/stock/report/outboundReport-page.vue index a7f2dbd..ed6c99a 100644 --- a/src/views/stock/report/outboundReport-page.vue +++ b/src/views/stock/report/outboundReport-page.vue @@ -29,23 +29,61 @@ + + + + + + + + + + + + + + + + + + + + + 审核通过 + 审核不通过 + + + +