diff --git a/src/api/api-lock.json b/src/api/api-lock.json index 75f6a60..da7e899 100644 --- a/src/api/api-lock.json +++ b/src/api/api-lock.json @@ -3771,6 +3771,89 @@ } ] }, + { + "description": "提交人工盘点数据", + "name": "submitManualStock", + "method": "post", + "path": "/manual/audit-apply", + "response": { + "typeArgs": [], + "typeName": "", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + }, + "parameters": [ + { + "required": true, + "in": "body", + "name": "requestBody", + "dataType": { + "typeArgs": [ + { + "typeArgs": [], + "typeName": "ManualStockDetail", + "isDefsType": true, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + } + ], + "typeName": "Array", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + } + } + ] + }, + { + "description": "获取人工盘点数据", + "name": "getManualStock", + "method": "get", + "path": "/manual/data/{applyId}", + "response": { + "typeArgs": [ + { + "typeArgs": [], + "typeName": "ManualStockDTO", + "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": "saveScanData", @@ -5503,6 +5586,281 @@ } ] }, + { + "name": "ManualStockDTO", + "templateArgs": [], + "properties": [ + { + "dataType": { + "typeArgs": [], + "typeName": "number", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + }, + "name": "applyId", + "description": "申请id", + "required": false + }, + { + "dataType": { + "typeArgs": [], + "typeName": "string", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + }, + "name": "code", + "description": "编码", + "required": false + }, + { + "dataType": { + "typeArgs": [], + "typeName": "number", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + }, + "name": "manualStock", + "description": "手动核实库存数量", + "required": false + }, + { + "dataType": { + "typeArgs": [], + "typeName": "number", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + }, + "name": "materialId", + "description": "物料id", + "required": false + }, + { + "dataType": { + "typeArgs": [], + "typeName": "string", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + }, + "name": "msg", + "description": "异常原因", + "required": false + }, + { + "dataType": { + "typeArgs": [], + "typeName": "string", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + }, + "name": "name", + "description": "名称", + "required": false + }, + { + "dataType": { + "typeArgs": [], + "typeName": "number", + "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": "spec", + "description": "规格", + "required": false + }, + { + "dataType": { + "typeArgs": [], + "typeName": "number", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + }, + "name": "stock", + "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", + "required": false + } + ] + }, + { + "description": "人工手动核实物料库存明细", + "name": "ManualStockDetail", + "templateArgs": [], + "properties": [ + { + "dataType": { + "typeArgs": [], + "typeName": "number", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + }, + "name": "applyId", + "description": "申请id", + "required": false + }, + { + "dataType": { + "typeArgs": [], + "typeName": "string", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + }, + "name": "createdTime", + "required": false + }, + { + "dataType": { + "typeArgs": [], + "typeName": "number", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + }, + "name": "id", + "required": false + }, + { + "dataType": { + "typeArgs": [], + "typeName": "number", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + }, + "name": "manualStock", + "description": "手动核实库存数量", + "required": false + }, + { + "dataType": { + "typeArgs": [], + "typeName": "number", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + }, + "name": "materialId", + "description": "物料id", + "required": false + }, + { + "dataType": { + "typeArgs": [], + "typeName": "string", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + }, + "name": "msg", + "description": "异常原因", + "required": false + }, + { + "dataType": { + "typeArgs": [], + "typeName": "number", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + }, + "name": "stock", + "description": "库存数量", + "required": false + }, + { + "dataType": { + "typeArgs": [], + "typeName": "string", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + }, + "name": "updatedTime", + "required": false + } + ] + }, { "description": "物料信息", "name": "Material", diff --git a/src/api/material/api.d.ts b/src/api/material/api.d.ts index e939b98..1a74322 100644 --- a/src/api/material/api.d.ts +++ b/src/api/material/api.d.ts @@ -185,6 +185,73 @@ declare namespace material { exceptionalData?: Array } + /** + * ManualStockDTO + */ + export interface ManualStockDTO { + /** 申请id */ + applyId?: number + + /** 编码 */ + code?: string + + /** 手动核实库存数量 */ + manualStock?: number + + /** 物料id */ + materialId?: number + + /** 异常原因 */ + msg?: string + + /** 名称 */ + name?: string + + /** 价格 */ + price?: number + + /** 规格 */ + spec?: string + + /** 库存数量 */ + stock?: number + + /** 类型 */ + type?: string + + /** typeName */ + typeName?: string + } + + /** + * 人工手动核实物料库存明细 + */ + export interface ManualStockDetail { + /** 申请id */ + applyId?: number + + /** createdTime */ + createdTime?: string + + /** id */ + id?: number + + /** 手动核实库存数量 */ + manualStock?: number + + /** 物料id */ + materialId?: number + + /** 异常原因 */ + msg?: string + + /** 库存数量 */ + stock?: number + + /** updatedTime */ + updatedTime?: string + } + /** * 物料信息 */ diff --git a/src/api/material/mods/apply/getManualStock.ts b/src/api/material/mods/apply/getManualStock.ts new file mode 100644 index 0000000..46a457e --- /dev/null +++ b/src/api/material/mods/apply/getManualStock.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: `/manual/data/${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 54518d6..6a5ba75 100644 --- a/src/api/material/mods/apply/index.ts +++ b/src/api/material/mods/apply/index.ts @@ -9,6 +9,8 @@ import searchAuditPage from './searchAuditPage' import auditApply from './auditApply' import getComparisonRes from './getComparisonRes' import updateReviewResult from './updateReviewResult' +import submitManualStock from './submitManualStock' +import getManualStock from './getManualStock' import saveScanData from './saveScanData' import submitReview from './submitReview' import getWaitScanData from './getWaitScanData' @@ -21,6 +23,8 @@ export default { auditApply, getComparisonRes, updateReviewResult, + submitManualStock, + getManualStock, saveScanData, submitReview, getWaitScanData, diff --git a/src/api/material/mods/apply/submitManualStock.ts b/src/api/material/mods/apply/submitManualStock.ts new file mode 100644 index 0000000..9aae6d8 --- /dev/null +++ b/src/api/material/mods/apply/submitManualStock.ts @@ -0,0 +1,22 @@ +/** + * @desc 提交人工盘点数据 + */ +import { defaultSuccess, defaultError, http } from '@/plugins/axios' +import type { AxiosResponse } from 'axios' +export default async function ( + /** 请求体 */ + requestBody: Array, + + success: (data: void) => void = defaultSuccess, + fail: (error: { code: string; error?: string }) => void = defaultError, +): Promise { + return http({ + method: 'post', + url: `/manual/audit-apply`, + data: requestBody, + }) + .then((data: AxiosResponse) => { + success(data.data) + }) + .catch((error: { code: string; error?: string }) => fail(error)) +} diff --git a/src/views/stock/component/manual-form.vue b/src/views/stock/component/manual-form.vue index bda57ff..e51daa8 100644 --- a/src/views/stock/component/manual-form.vue +++ b/src/views/stock/component/manual-form.vue @@ -51,7 +51,7 @@ + + +