art: 提交审核结果和修复接口调用
Some checks failed
Release / lint (push) Successful in 30s
Release / Release (push) Failing after 34s

This commit is contained in:
my_ong 2024-12-10 21:10:12 +08:00
parent 85d999056f
commit 7759438980
9 changed files with 6035 additions and 6102 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,345 +1,334 @@
declare namespace material { declare namespace material {
/** /**
* ApplyDTO * ApplyDTO
*/ */
export interface ApplyDTO { export interface ApplyDTO {
/** 申请人 */ /** 申请人 */
applicant?: string; applicant?: string
/** 申请日期 */ /** 申请日期 */
applyDate?: string; applyDate?: string
/** 申请数量 */ /** 申请数量 */
applyNum?: string; applyNum?: string
/** 申请类型 */ /** 申请类型 */
applyType?: 'PURCHASE_RECEIPT' | 'RETURN_RECEIPT' | 'LOAN_OUT' | 'AUDIT'; applyType?: 'PURCHASE_RECEIPT' | 'RETURN_RECEIPT' | 'LOAN_OUT' | 'AUDIT'
/** 物料编码 */ /** 物料编码 */
code?: string; code?: string
/** 确认数量 */ /** 确认数量 */
confirmNum?: string; confirmNum?: string
/** 物料名称 */ /** 物料名称 */
name?: string; name?: string
/** 备注 */ /** 备注 */
remark?: string; remark?: string
/** 物料规格 */ /** 物料规格 */
spec?: string; spec?: string
/** 物料类型 */ /** 物料类型 */
type?: string; type?: string
} }
/** /**
* *
*/ */
export interface ApplyDetail { export interface ApplyDetail {
/** 申请单ID */ /** 申请单ID */
applyId?: number; applyId?: number
/** assignRule */ /** assignRule */
assignRule?: 'LOW_VALUE' | 'HIGH_VALUE'; assignRule?: 'LOW_VALUE' | 'HIGH_VALUE'
/** 确认数量 */ /** 确认数量 */
confirmQuantity?: number; confirmQuantity?: number
/** createdTime */ /** createdTime */
createdTime?: string; createdTime?: string
/** 异常情况说明 */ /** 异常情况说明 */
exceptionRemark?: string; exceptionRemark?: string
/** id */ /** id */
id?: number; id?: number
/** 物料Id */ /** 物料Id */
materialId?: number; materialId?: number
/** 申请数量 */ /** 申请数量 */
quantity?: number; quantity?: number
/** updatedTime */ /** updatedTime */
updatedTime?: string; updatedTime?: string
} }
/** /**
* // * //
*/ */
export interface ApplyForm { export interface ApplyForm {
/** 申请人 */ /** 申请人 */
applicant?: string; applicant?: string
/** 申请日期 */ /** 申请日期 */
applyDate?: string; applyDate?: string
/** 盘点类型1: 全盘 2: 部分盘点) */ /** 盘点类型1: 全盘 2: 部分盘点) */
auditType?: 'ALL' | 'PARTIAL'; auditType?: 'ALL' | 'PARTIAL'
/** createdTime */ /** 是否确认0: 未确认 1: 已确认) */
createdTime?: string; confirm?: boolean
/** 异常原因 */ /** createdTime */
exception?: string; createdTime?: string
/** 处理摘要 */ /** id */
handle?: string; id?: number
/** id */ /** 审核意见 */
id?: number; reviewRemark?: string
/** 是否确认0: 未确认 1: 已确认) */ /** 审核结果(1-待扫码 2-待提交 3-待审核 4-审核通过 5退回) */
isConfirm?: boolean; reviewResult?: 'WAIT_SCAN' | 'WAIT_SUBMIT' | 'WAIT_REVIEW' | 'PASS' | 'REJECT'
/** 结果(系统自动生成) */ /** 盘点审核人 */
result?: string; reviewer?: string
/** 审核结果(1-待扫码 2-待提交 3-待审核 4-审核通过 5退回) */ /** 盘点人 */
reviewResult?: taker?: string
| 'WAIT_SCAN'
| 'WAIT_SUBMIT'
| 'WAIT_REVIEW'
| 'PASS'
| 'REJECT';
/** 盘点审核人 */ /** 类型1: 采购入库申请 2: 归还入库申请 3: 出库外借申请 4: 盘点申请) */
reviewer?: string; type?: 'PURCHASE_RECEIPT' | 'RETURN_RECEIPT' | 'LOAN_OUT' | 'AUDIT'
/** 盘点人 */ /** updatedTime */
taker?: string; updatedTime?: string
}
/** 类型1: 采购入库申请 2: 归还入库申请 3: 出库外借申请 4: 盘点申请) */ /**
type?: 'PURCHASE_RECEIPT' | 'RETURN_RECEIPT' | 'LOAN_OUT' | 'AUDIT'; *
*/
export interface ApplyInfo {
/** 申请单明细 */
applyDetails?: Array<material.ApplyDetail>
/** updatedTime */ /** applyForm */
updatedTime?: string; applyForm?: material.ApplyForm
}
/** /** 扫码的条码集合 */
* detailList?: Array<material.MaterialStockDetail>
*/ }
export interface ApplyInfo {
/** 申请单明细 */
applyDetails?: Array<material.ApplyDetail>;
/** applyForm */ /**
applyForm?: material.ApplyForm; *
*/
export interface AuditApplyInfo {
/** 申请人 */
applicant?: string
/** 扫码的条码集合 */ /** 申请日期 */
detailList?: Array<material.MaterialStockDetail>; applyDate?: string
}
/** /** 盘点类型1: 全盘 2: 部分盘点) */
* auditType?: 'ALL' | 'PARTIAL'
*/
export interface AuditApplyInfo {
/** 申请人 */
applicant?: string;
/** 申请日期 */ /** 是否确认0: 未确认 1: 已确认) */
applyDate?: string; confirm?: boolean
/** 盘点类型1: 全盘 2: 部分盘点) */ /** createdTime */
auditType?: 'ALL' | 'PARTIAL'; createdTime?: string
/** createdTime */ /** id */
createdTime?: string; id?: number
/** 异常原因 */ /** 物料ids */
exception?: string; ids?: Array<string>
/** 处理摘要 */ /** 审核意见 */
handle?: string; reviewRemark?: string
/** id */ /** 审核结果(1-待扫码 2-待提交 3-待审核 4-审核通过 5退回) */
id?: number; reviewResult?: 'WAIT_SCAN' | 'WAIT_SUBMIT' | 'WAIT_REVIEW' | 'PASS' | 'REJECT'
/** 物料ids */ /** 盘点审核人 */
ids?: Array<string>; reviewer?: string
/** 是否确认0: 未确认 1: 已确认) */ /** 盘点人 */
isConfirm?: boolean; taker?: string
/** 结果(系统自动生成) */ /** 类型1: 采购入库申请 2: 归还入库申请 3: 出库外借申请 4: 盘点申请) */
result?: string; type?: 'PURCHASE_RECEIPT' | 'RETURN_RECEIPT' | 'LOAN_OUT' | 'AUDIT'
/** 审核结果(1-待扫码 2-待提交 3-待审核 4-审核通过 5退回) */ /** updatedTime */
reviewResult?: updatedTime?: string
| 'WAIT_SCAN' }
| 'WAIT_SUBMIT'
| 'WAIT_REVIEW'
| 'PASS'
| 'REJECT';
/** 盘点审核人 */ /**
reviewer?: string; * ComparisonResDTO
*/
export interface ComparisonResDTO {
/** 库存明细 */
details?: Array<material.StockDetailInfo>
/** 盘点人 */ /** 差异数据 */
taker?: string; exceptionalData?: Array<material.StocktakingScanExceptionalData>
}
/** 类型1: 采购入库申请 2: 归还入库申请 3: 出库外借申请 4: 盘点申请) */ /**
type?: 'PURCHASE_RECEIPT' | 'RETURN_RECEIPT' | 'LOAN_OUT' | 'AUDIT'; *
*/
export interface Material {
/** 赋码规则(2-低值易耗品(不参与赋码) 1-高价值工具类(参与唯一赋码) */
assignRule?: 'LOW_VALUE' | 'HIGH_VALUE'
/** updatedTime */ /** 编码 */
updatedTime?: string; code?: string
}
/** /** createdTime */
* ComparisonResDTO createdTime?: string
*/
export interface ComparisonResDTO {
/** 库存明细 */
details?: Array<material.StockDetailInfo>;
/** 差异数据 */ /** 备注 */
exceptionalData?: Array<material.StocktakingScanExceptionalData>; description?: string
}
/** /** id */
* id?: number
*/
export interface Material {
/** 赋码规则(2-低值易耗品(不参与赋码) 1-高价值工具类(参与唯一赋码) */
assignRule?: 'LOW_VALUE' | 'HIGH_VALUE';
/** 编码 */ /** 名称 */
code?: string; name?: string
/** createdTime */ /** 规格 */
createdTime?: string; spec?: string
/** 备注 */ /** 库存数量 */
description?: string; stock?: number
/** id */ /** 类型 */
id?: number; type?: string
/** 名称 */ /** updatedTime */
name?: string; updatedTime?: string
}
/** 规格 */ /**
spec?: string; *
*/
export interface MaterialStockDetail {
/** 入库申请单 */
applyId?: number
/** 库存数量 */ /** 条码 */
stock?: number; barcode?: string
/** 类型 */ /** createdTime */
type?: string; createdTime?: string
/** updatedTime */ /** id */
updatedTime?: string; id?: number
}
/** /** 物料ID */
* materialId?: number
*/
export interface MaterialStockDetail {
/** 入库申请单 */
applyId?: number;
/** 条码 */ /** 状态 */
barcode?: string; status?: 'IN' | 'OUT' | 'OFF' | 'LOST'
/** createdTime */ /** updatedTime */
createdTime?: string; updatedTime?: string
}
/** id */ /**
id?: number; *
*/
export interface ReviewDTO {
/** 申请单 */
applyId?: string
/** 物料ID */ /** 审核意见 */
materialId?: number; remark?: string
/** 状态 */ /** 审核结果 */
status?: 'IN' | 'OUT' | 'OFF' | 'LOST'; reviewResult?: 'WAIT_SCAN' | 'WAIT_SUBMIT' | 'WAIT_REVIEW' | 'PASS' | 'REJECT'
}
/** updatedTime */ /**
updatedTime?: string; *
} */
export interface StockDetailInfo {
/** 物料编码 */
materialCode?: string
/** /** 物料名称 */
* materialId?: number
*/
export interface StockDetailInfo {
/** 物料编码 */
materialCode?: string;
/** 物料名称 */ /** 物料名称 */
materialId?: number; materialName?: string
/** 物料名称 */ /** 实际库存(明细数据中统计来的) */
materialName?: string; stockReal?: number
/** 实际库存(明细数据中统计来的 */ /** 在存总数(物料表 */
stockReal?: number; stockTotal?: number
/** 在存总数(物料表) */ /** 扫码数量 */
stockTotal?: number; stockTotalScan?: number
}
/** 扫码数量 */ /**
stockTotalScan?: number; * ()
} */
export interface StocktakingScanDetail {
/** 申请单id */
applyId?: number
/** /** 条码 */
* () barcode?: string
*/
export interface StocktakingScanDetail {
/** 申请单id */
applyId?: number;
/** 条码 */ /** createdTime */
barcode?: string; createdTime?: string
/** createdTime */ /** id */
createdTime?: string; id?: number
/** id */ /** 物料ID */
id?: number; materialId?: number
/** 物料ID */ /** updatedTime */
materialId?: number; updatedTime?: string
}
/** updatedTime */ /**
updatedTime?: string; *
} */
export interface StocktakingScanExceptionalData {
/** 申请单id */
applyId?: number
/** /** 条码 */
* barcode?: string
*/
export interface StocktakingScanExceptionalData {
/** 申请单id */
applyId?: number;
/** 条码 */ /** createdTime */
barcode?: string; createdTime?: string
/** createdTime */ /** 异常处理 */
createdTime?: string; exceptionHandle?: 'INBOUND' | 'OUTBOUND' | 'DISCARD'
/** 异常处理 */ /** 异常类型 */
exceptionHandle?: 'INBOUND' | 'OUTBOUND' | 'DISCARD'; exceptionReason?: 'SOCK_IN_BUT_SCAN_NOT_EXIST' | 'SOCK_OUT_BUT_SCAN_EXIST' | 'SOCK_NOT_EXIST_BUT_SCAN_EXIST'
/** 异常类型 */ /** id */
exceptionReason?: id?: number
| 'SOCK_IN_BUT_SCAN_NOT_EXIST'
| 'SOCK_OUT_BUT_SCAN_EXIST'
| 'SOCK_NOT_EXIST_BUT_SCAN_EXIST';
/** id */ /** 物料ID */
id?: number; materialId?: number
/** 物料ID */ /** materialName */
materialId?: number; materialName?: string
/** materialName */ /** 备注 */
materialName?: string; remark?: string
/** 备注 */ /** updatedTime */
remark?: string; updatedTime?: string
}
/** updatedTime */
updatedTime?: string;
}
} }

View File

@ -2,22 +2,24 @@
* @description / * @description /
* *
*/ */
import searchPage from './searchPage'; import searchPage from './searchPage'
import saveApply from './saveApply'; import saveApply from './saveApply'
import detail from './detail'; import detail from './detail'
import searchAuditPage from './searchAuditPage'; import searchAuditPage from './searchAuditPage'
import auditApply from './auditApply'; import auditApply from './auditApply'
import getComparisonRes from './getComparisonRes'; import getComparisonRes from './getComparisonRes'
import updateReviewResult from './updateReviewResult'; import updateReviewResult from './updateReviewResult'
import saveScanData from './saveScanData'; import saveScanData from './saveScanData'
import submitReview from './submitReview'
export default { export default {
searchPage, searchPage,
saveApply, saveApply,
detail, detail,
searchAuditPage, searchAuditPage,
auditApply, auditApply,
getComparisonRes, getComparisonRes,
updateReviewResult, updateReviewResult,
saveScanData, saveScanData,
}; submitReview,
}

View File

@ -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<void> {
return http({
method: 'post',
url: `/submit-review`,
data: requestBody,
})
.then((data: AxiosResponse<void, unknown>) => {
success(data.data)
})
.catch((error: { code: string; error?: string }) => fail(error))
}

View File

@ -1,32 +0,0 @@
<template>
<a-row bordered>
<a-col :span="8">
<a-button type="primary" width="90%">开始扫码</a-button>
</a-col>
<a-col :span="8"></a-col>
<a-col :span="8">
<a-input ref="snInput" bordered size="large" placeholder="输入条形码" style="width: 90%" />
</a-col>
</a-row>
<vxe-table
ref="applyDetailTableRef"
border
stripe
show-overflow
max-height="500"
:column-config="{ resizable: true }"
:keyboard-config="{ isEsc: true }"
size="medium"
>
<vxe-column type="seq" title="序号" width="60"></vxe-column>
<vxe-column field="id" title="物料id" :visible="false"></vxe-column>
<vxe-column field="name" title="物料名称" />
<vxe-column field="code" title="编码" />
<vxe-column field="spec" title="规格" />
<vxe-column field="type" title="类型" />
<vxe-column field="times" title="库存数量" />
<vxe-column field="oprator" title="盘点数量" />
</vxe-table>
</template>
<script setup lang="ts"></script>

View File

@ -56,7 +56,7 @@
<!-- 审核弹窗 --> <!-- 审核弹窗 -->
<a-modal v-model:open="openResult" title="盘点异常数据:" width="80%" :confirm-loading="confirmLoading" @ok="submit"> <a-modal v-model:open="openResult" title="盘点异常数据:" width="80%" :confirm-loading="confirmLoading" @ok="submit">
<result-form ref="reviewResultRef" :apply-id="applyIdRef"> <result-form :apply-id="applyIdRef">
<a-form layout="vertical" style="margin-top: 20px"> <a-form layout="vertical" style="margin-top: 20px">
<a-form-item label="审核意见"> <a-form-item label="审核意见">
<a-textarea v-model:value="remark" placeholder="请输入审核意见" :row="3" :maxlength="1000" /> <a-textarea v-model:value="remark" placeholder="请输入审核意见" :row="3" :maxlength="1000" />
@ -83,9 +83,8 @@
const auditPage = ref<IPage<material.ApplyForm>>() const auditPage = ref<IPage<material.ApplyForm>>()
const loading = ref(false) const loading = ref(false)
const confirmLoading = ref(false) const confirmLoading = ref(false)
const reviewResult = ref('PASS') const reviewResult = ref<'PASS' | 'REJECT'>('PASS')
const remark = ref('') const remark = ref('')
const reviewResultRef = ref()
// //
const loadData = async (page = 1, size = 10) => { const loadData = async (page = 1, size = 10) => {
@ -109,7 +108,7 @@
const columns = [ const columns = [
{ {
title: '申请id', title: '申请id',
dataIndex: 'applyId', dataIndex: 'id',
}, },
{ {
title: '盘点类型', title: '盘点类型',
@ -166,9 +165,17 @@
// //
const submit = () => { const submit = () => {
confirmLoading.value = true confirmLoading.value = true
const data = reviewResultRef.value.getTableData() api.materialApi.apply.submitReview(
window.console.log(data) {
confirmLoading.value = false applyId: applyIdRef.value,
openResult.value = false reviewResult: reviewResult.value,
remark: remark.value,
},
() => {
confirmLoading.value = false
openResult.value = false
loadData()
},
)
} }
</script> </script>

View File

@ -74,9 +74,11 @@
const handelEditRender = ref<VxeColumnPropTypes.EditRender<undefined, VxeSelectProps>>({ const handelEditRender = ref<VxeColumnPropTypes.EditRender<undefined, VxeSelectProps>>({
name: 'VxeSelect', name: 'VxeSelect',
options: [ options: [
{ label: '入库+1', value: 'INBOUND' }, { label: '标记为丢失', value: 'MARK_LOST' },
{ label: '不入库-1', value: 'OUTBOUND' }, { label: '保持不变', value: 'MARK_KEEP' },
{ label: '丢弃-1', value: 'DISCARD' }, { label: '标记为归还', value: 'MARK_RETURN' },
{ label: '标记为舍弃', value: 'MARK_DISCARD' },
{ label: '标记为新入库', value: 'MARK_NEW' },
], ],
}) })
</script> </script>

View File

@ -128,7 +128,7 @@
applicant: userStore.userName, applicant: userStore.userName,
type: 'AUDIT', type: 'AUDIT',
applyDate: dayjs() + '', applyDate: dayjs() + '',
isConfirm: false, confirm: false,
reviewResult: 'WAIT_SCAN', reviewResult: 'WAIT_SCAN',
}) })