sparkles: ✨ 提交人工盘点数据
This commit is contained in:
parent
15cbb02e50
commit
0014b71888
@ -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",
|
||||
|
67
src/api/material/api.d.ts
vendored
67
src/api/material/api.d.ts
vendored
@ -185,6 +185,73 @@ declare namespace material {
|
||||
exceptionalData?: Array<material.StocktakingScanExceptionalData>
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
}
|
||||
|
||||
/**
|
||||
* 物料信息
|
||||
*/
|
||||
|
21
src/api/material/mods/apply/getManualStock.ts
Normal file
21
src/api/material/mods/apply/getManualStock.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.ManualStockDTO>) => void = defaultSuccess,
|
||||
fail: (error: { code: string; error?: string }) => void = defaultError,
|
||||
): Promise<void> {
|
||||
return http({
|
||||
method: 'get',
|
||||
url: `/manual/data/${applyId}`,
|
||||
})
|
||||
.then((data: AxiosResponse<Array<material.ManualStockDTO>, unknown>) => {
|
||||
success(data.data)
|
||||
})
|
||||
.catch((error: { code: string; error?: string }) => fail(error))
|
||||
}
|
@ -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,
|
||||
|
22
src/api/material/mods/apply/submitManualStock.ts
Normal file
22
src/api/material/mods/apply/submitManualStock.ts
Normal file
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* @desc 提交人工盘点数据
|
||||
*/
|
||||
import { defaultSuccess, defaultError, http } from '@/plugins/axios'
|
||||
import type { AxiosResponse } from 'axios'
|
||||
export default async function (
|
||||
/** 请求体 */
|
||||
requestBody: Array<material.ManualStockDetail>,
|
||||
|
||||
success: (data: void) => void = defaultSuccess,
|
||||
fail: (error: { code: string; error?: string }) => void = defaultError,
|
||||
): Promise<void> {
|
||||
return http({
|
||||
method: 'post',
|
||||
url: `/manual/audit-apply`,
|
||||
data: requestBody,
|
||||
})
|
||||
.then((data: AxiosResponse<void, unknown>) => {
|
||||
success(data.data)
|
||||
})
|
||||
.catch((error: { code: string; error?: string }) => fail(error))
|
||||
}
|
@ -51,7 +51,7 @@
|
||||
|
||||
<vxe-column
|
||||
field="manualStock"
|
||||
title="手动何时数量"
|
||||
title="手动核实数量"
|
||||
:edit-render="{ name: 'input', autoSelect: true }"
|
||||
keyboard-config="{edit: true, del: true}"
|
||||
cell-type="number"
|
||||
@ -60,6 +60,17 @@
|
||||
<vxe-number-input v-model="row.manualStock" type="integer"></vxe-number-input>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column
|
||||
field="msg"
|
||||
title="异常原因"
|
||||
:edit-render="{ name: 'input', autoSelect: true }"
|
||||
keyboard-config="{edit: true, del: true}"
|
||||
cell-type="string"
|
||||
>
|
||||
<template #edit="{ row }">
|
||||
<vxe-input v-model="row.msg" placeholder="请输入异常原因" type="text"></vxe-input>
|
||||
</template>
|
||||
</vxe-column>
|
||||
|
||||
<vxe-column field="oprator" title="操作">
|
||||
<template #default="{ row }">
|
||||
@ -78,6 +89,33 @@
|
||||
import { LabeledValue, DefaultOptionType } from 'ant-design-vue/es/select'
|
||||
import { SelectHandler } from 'ant-design-vue/es/vc-select/Select'
|
||||
|
||||
//组件交互
|
||||
|
||||
const props = defineProps({
|
||||
applyId: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 0,
|
||||
},
|
||||
})
|
||||
const getTableData = (): Array<material.ManualStockDetail> => {
|
||||
const $table = tableRef.value
|
||||
if (!$table) {
|
||||
return []
|
||||
}
|
||||
return $table?.getTableData().fullData.map((item) => {
|
||||
// 只需要保存哪一个物料id,库存数量,手动核实数量
|
||||
return {
|
||||
materialId: item.id,
|
||||
stock: item.stock,
|
||||
manualStock: item.manualStock,
|
||||
msg: item.msg,
|
||||
applyId: props.applyId,
|
||||
}
|
||||
})
|
||||
}
|
||||
defineExpose({ getTableData })
|
||||
|
||||
const typeVal = ref('')
|
||||
const slectedList = ref<number[]>([])
|
||||
|
||||
@ -128,11 +166,13 @@
|
||||
spec: string
|
||||
type: string
|
||||
typeName: string
|
||||
quantity: number
|
||||
stock: number
|
||||
manualStock: number
|
||||
disabled: boolean
|
||||
checked: boolean
|
||||
price: number
|
||||
assignRule: boolean
|
||||
msg: string
|
||||
}
|
||||
// vxe引用
|
||||
const tableRef = ref<VxeTableInstance<RowVO>>()
|
||||
@ -193,10 +233,12 @@
|
||||
typeName: m.typeName ? m.typeName : '',
|
||||
type: m.type ? m.type : '',
|
||||
price: m.price ? m.price : 0,
|
||||
quantity: 1,
|
||||
stock: m.stock ? m.stock : 0,
|
||||
manualStock: 0,
|
||||
assignRule: m.assignRule ? m.assignRule : false,
|
||||
disabled: false,
|
||||
checked: false,
|
||||
msg: '',
|
||||
}
|
||||
const $table = tableRef.value
|
||||
if ($table) {
|
||||
|
@ -132,6 +132,7 @@
|
||||
const scanFormRef = ref() // 盘点作业弹窗组件
|
||||
const handleResultRef = ref() // 盘点结果弹窗组件
|
||||
const confirmLoading = ref(false) // 盘点作业弹窗提交按钮loading
|
||||
const manualFormRef = ref() // 手动盘点弹窗组件
|
||||
// 新增申请表单对象
|
||||
const applyForm = ref<Partial<material.AuditApplyInfo>>({
|
||||
auditType: 'SCAN',
|
||||
@ -313,12 +314,18 @@
|
||||
// 人工盘点
|
||||
const openManual = ref<boolean>(false)
|
||||
const showManualModal = (applyId: number) => {
|
||||
console.log('点击传参' + applyId)
|
||||
applyIdRef.value = applyId
|
||||
openManual.value = true
|
||||
}
|
||||
const manualHandle = () => {
|
||||
openManual.value = false
|
||||
//提交数据
|
||||
if (manualFormRef.value) {
|
||||
const res: Array<material.ManualStockDetail> = manualFormRef.value.getTableData()
|
||||
api.materialApi.apply.submitManualStock(res, () => {
|
||||
openManual.value = false
|
||||
loadData(1)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 扫码弹窗
|
||||
|
Loading…
x
Reference in New Issue
Block a user