diff --git a/pont-config.json b/pont-config.json index d16ebb4..01a538b 100644 --- a/pont-config.json +++ b/pont-config.json @@ -5,30 +5,27 @@ "origins": [ { "name": "auth", - "originUrl": "http://127.0.0.1:7777/v3/api-docs/auth", + "originUrl": "http://127.0.0.1:8888/v3/api-docs/auth", "originType": "SwaggerV3", "usingOperationId": true }, { "name": "acl", - "originUrl": "http://127.0.0.1:7777/v3/api-docs/acl", + "originUrl": "http://127.0.0.1:8888/v3/api-docs/acl", "originType": "SwaggerV3", "usingOperationId": true }, { "name": "dictionary", - "originUrl": "http://127.0.0.1:7777/v3/api-docs/dictionary", + "originUrl": "http://127.0.0.1:8888/v3/api-docs/dictionary", "originType": "SwaggerV3", "usingOperationId": true }, { "name": "material", - "originUrl": "http://127.0.0.1:7777/v3/api-docs/material", + "originUrl": "http://127.0.0.1:8888/v3/api-docs/material", "originType": "SwaggerV3", "usingOperationId": true } - - - ] } diff --git a/src/api/api-lock.json b/src/api/api-lock.json index b3db664..013853d 100644 --- a/src/api/api-lock.json +++ b/src/api/api-lock.json @@ -3857,6 +3857,48 @@ } } ] + }, + { + "description": "获取盘点的待扫码信息", + "name": "getWaitScanData", + "method": "get", + "path": "/wait-scan-data/{applyId}", + "response": { + "typeArgs": [ + { + "typeArgs": [], + "typeName": "WaitScanInfo", + "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": [] + } + } + ] } ] }, @@ -5637,7 +5679,7 @@ "isDefsType": false, "templateIndex": -1, "compileTemplateKeyword": "#/definitions/", - "enum": ["'INBOUND'", "'OUTBOUND'", "'DISCARD'"], + "enum": ["'MARK_LOST'", "'MARK_KEEP'", "'MARK_RETURN'", "'MARK_DISCARD'", "'MARK_NEW'"], "typeProperties": [] }, "name": "exceptionHandle", @@ -5726,6 +5768,40 @@ "required": false } ] + }, + { + "name": "WaitScanInfo", + "templateArgs": [], + "properties": [ + { + "dataType": { + "typeArgs": [], + "typeName": "number", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + }, + "name": "count", + "description": "物料数量", + "required": false + }, + { + "dataType": { + "typeArgs": [], + "typeName": "string", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + }, + "name": "materialName", + "description": "物料名称", + "required": false + } + ] } ] } diff --git a/src/api/material/api.d.ts b/src/api/material/api.d.ts index d8bc28a..4c72eae 100644 --- a/src/api/material/api.d.ts +++ b/src/api/material/api.d.ts @@ -311,7 +311,7 @@ declare namespace material { createdTime?: string /** 异常处理 */ - exceptionHandle?: 'INBOUND' | 'OUTBOUND' | 'DISCARD' + exceptionHandle?: 'MARK_LOST' | 'MARK_KEEP' | 'MARK_RETURN' | 'MARK_DISCARD' | 'MARK_NEW' /** 异常类型 */ exceptionReason?: 'SOCK_IN_BUT_SCAN_NOT_EXIST' | 'SOCK_OUT_BUT_SCAN_EXIST' | 'SOCK_NOT_EXIST_BUT_SCAN_EXIST' @@ -331,4 +331,15 @@ declare namespace material { /** updatedTime */ updatedTime?: string } + + /** + * WaitScanInfo + */ + export interface WaitScanInfo { + /** 物料数量 */ + count?: number + + /** 物料名称 */ + materialName?: string + } } diff --git a/src/api/material/mods/apply/getWaitScanData.ts b/src/api/material/mods/apply/getWaitScanData.ts new file mode 100644 index 0000000..2c00fb6 --- /dev/null +++ b/src/api/material/mods/apply/getWaitScanData.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: `/wait-scan-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 235036a..54518d6 100644 --- a/src/api/material/mods/apply/index.ts +++ b/src/api/material/mods/apply/index.ts @@ -11,6 +11,7 @@ import getComparisonRes from './getComparisonRes' import updateReviewResult from './updateReviewResult' import saveScanData from './saveScanData' import submitReview from './submitReview' +import getWaitScanData from './getWaitScanData' export default { searchPage, @@ -22,4 +23,5 @@ export default { updateReviewResult, saveScanData, submitReview, + getWaitScanData, } diff --git a/src/views/stock/component/scan-form.vue b/src/views/stock/component/scan-form.vue index 3e1dbfd..cd02c4b 100644 --- a/src/views/stock/component/scan-form.vue +++ b/src/views/stock/component/scan-form.vue @@ -10,6 +10,7 @@ style="margin-top: 20px; margin-bottom: 20px" @press-enter="autoInsertOneRow" /> + diff --git a/src/views/stock/stocktaking/stocktaking-page.vue b/src/views/stock/stocktaking/stocktaking-page.vue index 1d7ac64..35f9af4 100644 --- a/src/views/stock/stocktaking/stocktaking-page.vue +++ b/src/views/stock/stocktaking/stocktaking-page.vue @@ -90,8 +90,13 @@ wrap-class-name="full-modal" :confirm-loading="confirmLoading" @ok="handleOk" + @cancel="cancel" > - + +

+ {{ msg }} +

+
>() @@ -259,6 +266,15 @@ const showModal = (applyId: number) => { open.value = true applyIdRef.value = applyId + let m = '需要扫码的物料: ' + //请求获取数据 + api.materialApi.apply.getWaitScanData(applyId, (data) => { + const m = `需要扫码的物料: ${data.map((item) => item.materialName).join(', ') || '无'}` + data.forEach((item) => (totalValue.value += item.count || 0)) + msg.value = m + }) + window.console.log(m) + msg.value = m } // 盘点作业提交数据 @@ -274,6 +290,11 @@ }) } } + // 关闭弹窗事件 + const cancel = () => { + totalValue.value = 0 + msg.value = '' + } // 盘点结果弹窗相关 const openResult = ref(false)