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

View File

@ -2,22 +2,24 @@
* @description /
*
*/
import searchPage from './searchPage';
import saveApply from './saveApply';
import detail from './detail';
import searchAuditPage from './searchAuditPage';
import auditApply from './auditApply';
import getComparisonRes from './getComparisonRes';
import updateReviewResult from './updateReviewResult';
import saveScanData from './saveScanData';
import searchPage from './searchPage'
import saveApply from './saveApply'
import detail from './detail'
import searchAuditPage from './searchAuditPage'
import auditApply from './auditApply'
import getComparisonRes from './getComparisonRes'
import updateReviewResult from './updateReviewResult'
import saveScanData from './saveScanData'
import submitReview from './submitReview'
export default {
searchPage,
saveApply,
detail,
searchAuditPage,
auditApply,
getComparisonRes,
updateReviewResult,
saveScanData,
};
searchPage,
saveApply,
detail,
searchAuditPage,
auditApply,
getComparisonRes,
updateReviewResult,
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">
<result-form ref="reviewResultRef" :apply-id="applyIdRef">
<result-form :apply-id="applyIdRef">
<a-form layout="vertical" style="margin-top: 20px">
<a-form-item label="审核意见">
<a-textarea v-model:value="remark" placeholder="请输入审核意见" :row="3" :maxlength="1000" />
@ -83,9 +83,8 @@
const auditPage = ref<IPage<material.ApplyForm>>()
const loading = ref(false)
const confirmLoading = ref(false)
const reviewResult = ref('PASS')
const reviewResult = ref<'PASS' | 'REJECT'>('PASS')
const remark = ref('')
const reviewResultRef = ref()
//
const loadData = async (page = 1, size = 10) => {
@ -109,7 +108,7 @@
const columns = [
{
title: '申请id',
dataIndex: 'applyId',
dataIndex: 'id',
},
{
title: '盘点类型',
@ -166,9 +165,17 @@
//
const submit = () => {
confirmLoading.value = true
const data = reviewResultRef.value.getTableData()
window.console.log(data)
confirmLoading.value = false
openResult.value = false
api.materialApi.apply.submitReview(
{
applyId: applyIdRef.value,
reviewResult: reviewResult.value,
remark: remark.value,
},
() => {
confirmLoading.value = false
openResult.value = false
loadData()
},
)
}
</script>

View File

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

View File

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