bug: 展示数量和需要扫码的物料
This commit is contained in:
parent
2899f7f857
commit
861b77aa93
@ -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
|
||||
}
|
||||
|
||||
|
||||
|
||||
]
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
13
src/api/material/api.d.ts
vendored
13
src/api/material/api.d.ts
vendored
@ -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
|
||||
}
|
||||
}
|
||||
|
21
src/api/material/mods/apply/getWaitScanData.ts
Normal file
21
src/api/material/mods/apply/getWaitScanData.ts
Normal file
@ -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<material.WaitScanInfo>) => void = defaultSuccess,
|
||||
fail: (error: { code: string; error?: string }) => void = defaultError,
|
||||
): Promise<void> {
|
||||
return http({
|
||||
method: 'get',
|
||||
url: `/wait-scan-data/${applyId}`,
|
||||
})
|
||||
.then((data: AxiosResponse<Array<material.WaitScanInfo>, unknown>) => {
|
||||
success(data.data)
|
||||
})
|
||||
.catch((error: { code: string; error?: string }) => fail(error))
|
||||
}
|
@ -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,
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
style="margin-top: 20px; margin-bottom: 20px"
|
||||
@press-enter="autoInsertOneRow"
|
||||
/>
|
||||
<slot></slot>
|
||||
<a-row style="margin-bottom: 20px">
|
||||
<a-col :span="12">
|
||||
<a-statistic title="扫码合计" :value="totalValue" style="margin-right: 50px" />
|
||||
|
@ -90,8 +90,13 @@
|
||||
wrap-class-name="full-modal"
|
||||
:confirm-loading="confirmLoading"
|
||||
@ok="handleOk"
|
||||
@cancel="cancel"
|
||||
>
|
||||
<scan-form ref="scanFormRef" :apply-id="applyIdRef" :total-value="88"></scan-form>
|
||||
<scan-form ref="scanFormRef" :apply-id="applyIdRef" :total-value="totalValue">
|
||||
<p>
|
||||
{{ msg }}
|
||||
</p>
|
||||
</scan-form>
|
||||
</a-modal>
|
||||
<!-- 盘点结果弹窗 -->
|
||||
<a-modal
|
||||
@ -131,6 +136,8 @@
|
||||
confirm: false,
|
||||
reviewResult: 'WAIT_SCAN',
|
||||
})
|
||||
const msg = ref()
|
||||
const totalValue = ref(0) // 盘点总值
|
||||
|
||||
//列表数据
|
||||
const auditPage = ref<IPage<material.ApplyForm>>()
|
||||
@ -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<boolean>(false)
|
||||
|
Loading…
x
Reference in New Issue
Block a user