🆕 盘点列表查询
This commit is contained in:
parent
83ad52c793
commit
d18fbd21e9
18
src/api/acl/mods/user/all.ts
Normal file
18
src/api/acl/mods/user/all.ts
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
/**
|
||||||
|
* @desc 所有用户
|
||||||
|
*/
|
||||||
|
import { defaultSuccess, defaultError, http } from '@/plugins/axios';
|
||||||
|
import type { AxiosResponse } from 'axios';
|
||||||
|
export default async function (
|
||||||
|
success: (data: Array<acl.User>) => void = defaultSuccess,
|
||||||
|
fail: (error: { code: string; error?: string }) => void = defaultError,
|
||||||
|
): Promise<void> {
|
||||||
|
return http({
|
||||||
|
method: 'get',
|
||||||
|
url: `/user-all`,
|
||||||
|
})
|
||||||
|
.then((data: AxiosResponse<Array<acl.User>, unknown>) => {
|
||||||
|
success(data.data);
|
||||||
|
})
|
||||||
|
.catch((error: { code: string; error?: string }) => fail(error));
|
||||||
|
}
|
@ -3,6 +3,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
import saveOrUpdateUser from './saveOrUpdateUser';
|
import saveOrUpdateUser from './saveOrUpdateUser';
|
||||||
|
import all from './all';
|
||||||
import sexes from './sexes';
|
import sexes from './sexes';
|
||||||
import detail from './detail';
|
import detail from './detail';
|
||||||
import deleteUser from './deleteUser';
|
import deleteUser from './deleteUser';
|
||||||
@ -16,6 +17,7 @@ import users from './users';
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
saveOrUpdateUser,
|
saveOrUpdateUser,
|
||||||
|
all,
|
||||||
sexes,
|
sexes,
|
||||||
detail,
|
detail,
|
||||||
deleteUser,
|
deleteUser,
|
||||||
|
@ -1190,6 +1190,32 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"description": "所有用户",
|
||||||
|
"name": "all",
|
||||||
|
"method": "get",
|
||||||
|
"path": "/user-all",
|
||||||
|
"response": {
|
||||||
|
"typeArgs": [
|
||||||
|
{
|
||||||
|
"typeArgs": [],
|
||||||
|
"typeName": "User",
|
||||||
|
"isDefsType": true,
|
||||||
|
"templateIndex": -1,
|
||||||
|
"compileTemplateKeyword": "#/definitions/",
|
||||||
|
"enum": [],
|
||||||
|
"typeProperties": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"typeName": "Array",
|
||||||
|
"isDefsType": false,
|
||||||
|
"templateIndex": -1,
|
||||||
|
"compileTemplateKeyword": "#/definitions/",
|
||||||
|
"enum": [],
|
||||||
|
"typeProperties": []
|
||||||
|
},
|
||||||
|
"parameters": []
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"description": "用户性别",
|
"description": "用户性别",
|
||||||
"name": "sexes",
|
"name": "sexes",
|
||||||
@ -3513,7 +3539,7 @@
|
|||||||
},
|
},
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "类型",
|
"description": "申请单ID",
|
||||||
"required": true,
|
"required": true,
|
||||||
"in": "path",
|
"in": "path",
|
||||||
"name": "applyId",
|
"name": "applyId",
|
||||||
@ -3636,13 +3662,45 @@
|
|||||||
"enum": [
|
"enum": [
|
||||||
"'PASS'",
|
"'PASS'",
|
||||||
"'UN_PASS'",
|
"'UN_PASS'",
|
||||||
"'WAIT'",
|
"'WAIT_AUDIT'",
|
||||||
"'REJECT'"
|
"'REJECT'",
|
||||||
|
"'WAIT_CHECK'"
|
||||||
],
|
],
|
||||||
"typeProperties": []
|
"typeProperties": []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "提交盘点申请单",
|
||||||
|
"name": "auditApply",
|
||||||
|
"method": "post",
|
||||||
|
"path": "/audit-apply",
|
||||||
|
"response": {
|
||||||
|
"typeArgs": [],
|
||||||
|
"typeName": "",
|
||||||
|
"isDefsType": false,
|
||||||
|
"templateIndex": -1,
|
||||||
|
"compileTemplateKeyword": "#/definitions/",
|
||||||
|
"enum": [],
|
||||||
|
"typeProperties": []
|
||||||
|
},
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"required": true,
|
||||||
|
"in": "body",
|
||||||
|
"name": "requestBody",
|
||||||
|
"dataType": {
|
||||||
|
"typeArgs": [],
|
||||||
|
"typeName": "AuditApplyInfo",
|
||||||
|
"isDefsType": true,
|
||||||
|
"templateIndex": -1,
|
||||||
|
"compileTemplateKeyword": "#/definitions/",
|
||||||
|
"enum": [],
|
||||||
|
"typeProperties": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -4283,13 +4341,14 @@
|
|||||||
"enum": [
|
"enum": [
|
||||||
"'PASS'",
|
"'PASS'",
|
||||||
"'UN_PASS'",
|
"'UN_PASS'",
|
||||||
"'WAIT'",
|
"'WAIT_AUDIT'",
|
||||||
"'REJECT'"
|
"'REJECT'",
|
||||||
|
"'WAIT_CHECK'"
|
||||||
],
|
],
|
||||||
"typeProperties": []
|
"typeProperties": []
|
||||||
},
|
},
|
||||||
"name": "reviewResult",
|
"name": "reviewResult",
|
||||||
"description": "审核结果(1-通过 2-不通过 3-待审核 4-退回重新盘点)",
|
"description": "审核结果(1-通过 2-不通过 3-待审核 4-退回重新盘点 5-待盘点)",
|
||||||
"required": false
|
"required": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -4422,6 +4481,249 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"description": "申请单",
|
||||||
|
"name": "AuditApplyInfo",
|
||||||
|
"templateArgs": [],
|
||||||
|
"properties": [
|
||||||
|
{
|
||||||
|
"dataType": {
|
||||||
|
"typeArgs": [],
|
||||||
|
"typeName": "string",
|
||||||
|
"isDefsType": false,
|
||||||
|
"templateIndex": -1,
|
||||||
|
"compileTemplateKeyword": "#/definitions/",
|
||||||
|
"enum": [],
|
||||||
|
"typeProperties": []
|
||||||
|
},
|
||||||
|
"name": "applicant",
|
||||||
|
"description": "申请人",
|
||||||
|
"required": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"dataType": {
|
||||||
|
"typeArgs": [],
|
||||||
|
"typeName": "string",
|
||||||
|
"isDefsType": false,
|
||||||
|
"templateIndex": -1,
|
||||||
|
"compileTemplateKeyword": "#/definitions/",
|
||||||
|
"enum": [],
|
||||||
|
"typeProperties": []
|
||||||
|
},
|
||||||
|
"name": "applyDate",
|
||||||
|
"description": "申请日期",
|
||||||
|
"required": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"dataType": {
|
||||||
|
"typeArgs": [],
|
||||||
|
"typeName": "",
|
||||||
|
"isDefsType": false,
|
||||||
|
"templateIndex": -1,
|
||||||
|
"compileTemplateKeyword": "#/definitions/",
|
||||||
|
"enum": [
|
||||||
|
"'ALL'",
|
||||||
|
"'PARTIAL'"
|
||||||
|
],
|
||||||
|
"typeProperties": []
|
||||||
|
},
|
||||||
|
"name": "auditType",
|
||||||
|
"description": "盘点类型(1: 全盘 2: 部分盘点)",
|
||||||
|
"required": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"dataType": {
|
||||||
|
"typeArgs": [],
|
||||||
|
"typeName": "string",
|
||||||
|
"isDefsType": false,
|
||||||
|
"templateIndex": -1,
|
||||||
|
"compileTemplateKeyword": "#/definitions/",
|
||||||
|
"enum": [],
|
||||||
|
"typeProperties": []
|
||||||
|
},
|
||||||
|
"name": "createdTime",
|
||||||
|
"required": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"dataType": {
|
||||||
|
"typeArgs": [],
|
||||||
|
"typeName": "string",
|
||||||
|
"isDefsType": false,
|
||||||
|
"templateIndex": -1,
|
||||||
|
"compileTemplateKeyword": "#/definitions/",
|
||||||
|
"enum": [],
|
||||||
|
"typeProperties": []
|
||||||
|
},
|
||||||
|
"name": "exception",
|
||||||
|
"description": "异常原因",
|
||||||
|
"required": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"dataType": {
|
||||||
|
"typeArgs": [],
|
||||||
|
"typeName": "",
|
||||||
|
"isDefsType": false,
|
||||||
|
"templateIndex": -1,
|
||||||
|
"compileTemplateKeyword": "#/definitions/",
|
||||||
|
"enum": [
|
||||||
|
"'NO_ACTION'",
|
||||||
|
"'IGNORE_AND_SAVE'",
|
||||||
|
"'REPLENISH'",
|
||||||
|
"'OTHER'"
|
||||||
|
],
|
||||||
|
"typeProperties": []
|
||||||
|
},
|
||||||
|
"name": "handle",
|
||||||
|
"description": "处理方式(1-无需处理 2-忽略并修改库存 3-补充库存 4-其他)",
|
||||||
|
"required": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"dataType": {
|
||||||
|
"typeArgs": [],
|
||||||
|
"typeName": "number",
|
||||||
|
"isDefsType": false,
|
||||||
|
"templateIndex": -1,
|
||||||
|
"compileTemplateKeyword": "#/definitions/",
|
||||||
|
"enum": [],
|
||||||
|
"typeProperties": []
|
||||||
|
},
|
||||||
|
"name": "id",
|
||||||
|
"required": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"dataType": {
|
||||||
|
"typeArgs": [
|
||||||
|
{
|
||||||
|
"typeArgs": [],
|
||||||
|
"typeName": "string",
|
||||||
|
"isDefsType": false,
|
||||||
|
"templateIndex": -1,
|
||||||
|
"compileTemplateKeyword": "#/definitions/",
|
||||||
|
"enum": [],
|
||||||
|
"typeProperties": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"typeName": "Array",
|
||||||
|
"isDefsType": false,
|
||||||
|
"templateIndex": -1,
|
||||||
|
"compileTemplateKeyword": "#/definitions/",
|
||||||
|
"enum": [],
|
||||||
|
"typeProperties": []
|
||||||
|
},
|
||||||
|
"name": "ids",
|
||||||
|
"description": "物料ids",
|
||||||
|
"required": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"dataType": {
|
||||||
|
"typeArgs": [],
|
||||||
|
"typeName": "boolean",
|
||||||
|
"isDefsType": false,
|
||||||
|
"templateIndex": -1,
|
||||||
|
"compileTemplateKeyword": "#/definitions/",
|
||||||
|
"enum": [],
|
||||||
|
"typeProperties": []
|
||||||
|
},
|
||||||
|
"name": "isConfirm",
|
||||||
|
"description": "是否确认(0: 未确认 1: 已确认)",
|
||||||
|
"required": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"dataType": {
|
||||||
|
"typeArgs": [],
|
||||||
|
"typeName": "string",
|
||||||
|
"isDefsType": false,
|
||||||
|
"templateIndex": -1,
|
||||||
|
"compileTemplateKeyword": "#/definitions/",
|
||||||
|
"enum": [],
|
||||||
|
"typeProperties": []
|
||||||
|
},
|
||||||
|
"name": "result",
|
||||||
|
"description": "结果(系统自动生成)",
|
||||||
|
"required": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"dataType": {
|
||||||
|
"typeArgs": [],
|
||||||
|
"typeName": "",
|
||||||
|
"isDefsType": false,
|
||||||
|
"templateIndex": -1,
|
||||||
|
"compileTemplateKeyword": "#/definitions/",
|
||||||
|
"enum": [
|
||||||
|
"'PASS'",
|
||||||
|
"'UN_PASS'",
|
||||||
|
"'WAIT_AUDIT'",
|
||||||
|
"'REJECT'",
|
||||||
|
"'WAIT_CHECK'"
|
||||||
|
],
|
||||||
|
"typeProperties": []
|
||||||
|
},
|
||||||
|
"name": "reviewResult",
|
||||||
|
"description": "审核结果(1-通过 2-不通过 3-待审核 4-退回重新盘点 5-待盘点)",
|
||||||
|
"required": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"dataType": {
|
||||||
|
"typeArgs": [],
|
||||||
|
"typeName": "string",
|
||||||
|
"isDefsType": false,
|
||||||
|
"templateIndex": -1,
|
||||||
|
"compileTemplateKeyword": "#/definitions/",
|
||||||
|
"enum": [],
|
||||||
|
"typeProperties": []
|
||||||
|
},
|
||||||
|
"name": "reviewer",
|
||||||
|
"description": "盘点审核人",
|
||||||
|
"required": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"dataType": {
|
||||||
|
"typeArgs": [],
|
||||||
|
"typeName": "string",
|
||||||
|
"isDefsType": false,
|
||||||
|
"templateIndex": -1,
|
||||||
|
"compileTemplateKeyword": "#/definitions/",
|
||||||
|
"enum": [],
|
||||||
|
"typeProperties": []
|
||||||
|
},
|
||||||
|
"name": "taker",
|
||||||
|
"description": "盘点人",
|
||||||
|
"required": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"dataType": {
|
||||||
|
"typeArgs": [],
|
||||||
|
"typeName": "",
|
||||||
|
"isDefsType": false,
|
||||||
|
"templateIndex": -1,
|
||||||
|
"compileTemplateKeyword": "#/definitions/",
|
||||||
|
"enum": [
|
||||||
|
"'PURCHASE_RECEIPT'",
|
||||||
|
"'RETURN_RECEIPT'",
|
||||||
|
"'LOAN_OUT'",
|
||||||
|
"'AUDIT'"
|
||||||
|
],
|
||||||
|
"typeProperties": []
|
||||||
|
},
|
||||||
|
"name": "type",
|
||||||
|
"description": "类型(1: 采购入库申请 2: 归还入库申请 3: 出库外借申请 4: 盘点申请)",
|
||||||
|
"required": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"dataType": {
|
||||||
|
"typeArgs": [],
|
||||||
|
"typeName": "string",
|
||||||
|
"isDefsType": false,
|
||||||
|
"templateIndex": -1,
|
||||||
|
"compileTemplateKeyword": "#/definitions/",
|
||||||
|
"enum": [],
|
||||||
|
"typeProperties": []
|
||||||
|
},
|
||||||
|
"name": "updatedTime",
|
||||||
|
"required": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"description": "全局错误",
|
"description": "全局错误",
|
||||||
"name": "GlobalError",
|
"name": "GlobalError",
|
||||||
|
54
src/api/material/api.d.ts
vendored
54
src/api/material/api.d.ts
vendored
@ -97,8 +97,8 @@ declare namespace material {
|
|||||||
/** 结果(系统自动生成) */
|
/** 结果(系统自动生成) */
|
||||||
result?: string;
|
result?: string;
|
||||||
|
|
||||||
/** 审核结果(1-通过 2-不通过 3-待审核 4-退回重新盘点) */
|
/** 审核结果(1-通过 2-不通过 3-待审核 4-退回重新盘点 5-待盘点) */
|
||||||
reviewResult?: 'PASS' | 'UN_PASS' | 'WAIT' | 'REJECT';
|
reviewResult?: 'PASS' | 'UN_PASS' | 'WAIT_AUDIT' | 'REJECT' | 'WAIT_CHECK';
|
||||||
|
|
||||||
/** 盘点审核人 */
|
/** 盘点审核人 */
|
||||||
reviewer?: string;
|
reviewer?: string;
|
||||||
@ -127,6 +127,56 @@ declare namespace material {
|
|||||||
detailList?: Array<material.MaterialStockDetail>;
|
detailList?: Array<material.MaterialStockDetail>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请单
|
||||||
|
*/
|
||||||
|
export interface AuditApplyInfo {
|
||||||
|
/** 申请人 */
|
||||||
|
applicant?: string;
|
||||||
|
|
||||||
|
/** 申请日期 */
|
||||||
|
applyDate?: string;
|
||||||
|
|
||||||
|
/** 盘点类型(1: 全盘 2: 部分盘点) */
|
||||||
|
auditType?: 'ALL' | 'PARTIAL';
|
||||||
|
|
||||||
|
/** createdTime */
|
||||||
|
createdTime?: string;
|
||||||
|
|
||||||
|
/** 异常原因 */
|
||||||
|
exception?: string;
|
||||||
|
|
||||||
|
/** 处理方式(1-无需处理 2-忽略并修改库存 3-补充库存 4-其他) */
|
||||||
|
handle?: 'NO_ACTION' | 'IGNORE_AND_SAVE' | 'REPLENISH' | 'OTHER';
|
||||||
|
|
||||||
|
/** id */
|
||||||
|
id?: number;
|
||||||
|
|
||||||
|
/** 物料ids */
|
||||||
|
ids?: Array<string>;
|
||||||
|
|
||||||
|
/** 是否确认(0: 未确认 1: 已确认) */
|
||||||
|
isConfirm?: boolean;
|
||||||
|
|
||||||
|
/** 结果(系统自动生成) */
|
||||||
|
result?: string;
|
||||||
|
|
||||||
|
/** 审核结果(1-通过 2-不通过 3-待审核 4-退回重新盘点 5-待盘点) */
|
||||||
|
reviewResult?: 'PASS' | 'UN_PASS' | 'WAIT_AUDIT' | 'REJECT' | 'WAIT_CHECK';
|
||||||
|
|
||||||
|
/** 盘点审核人 */
|
||||||
|
reviewer?: string;
|
||||||
|
|
||||||
|
/** 盘点人 */
|
||||||
|
taker?: string;
|
||||||
|
|
||||||
|
/** 类型(1: 采购入库申请 2: 归还入库申请 3: 出库外借申请 4: 盘点申请) */
|
||||||
|
type?: 'PURCHASE_RECEIPT' | 'RETURN_RECEIPT' | 'LOAN_OUT' | 'AUDIT';
|
||||||
|
|
||||||
|
/** updatedTime */
|
||||||
|
updatedTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 物料信息
|
* 物料信息
|
||||||
*/
|
*/
|
||||||
|
22
src/api/material/mods/apply/auditApply.ts
Normal file
22
src/api/material/mods/apply/auditApply.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: material.AuditApplyInfo,
|
||||||
|
|
||||||
|
success: (data: void) => void = defaultSuccess,
|
||||||
|
fail: (error: { code: string; error?: string }) => void = defaultError,
|
||||||
|
): Promise<void> {
|
||||||
|
return http({
|
||||||
|
method: 'post',
|
||||||
|
url: `/audit-apply`,
|
||||||
|
data: requestBody,
|
||||||
|
})
|
||||||
|
.then((data: AxiosResponse<void, unknown>) => {
|
||||||
|
success(data.data);
|
||||||
|
})
|
||||||
|
.catch((error: { code: string; error?: string }) => fail(error));
|
||||||
|
}
|
@ -4,7 +4,7 @@
|
|||||||
import { defaultSuccess, defaultError, http } from '@/plugins/axios';
|
import { defaultSuccess, defaultError, http } from '@/plugins/axios';
|
||||||
import type { AxiosResponse } from 'axios';
|
import type { AxiosResponse } from 'axios';
|
||||||
export default async function (
|
export default async function (
|
||||||
/** 类型 */
|
/** 申请单ID */
|
||||||
applyId: number,
|
applyId: number,
|
||||||
|
|
||||||
success: (data: material.ApplyInfo) => void = defaultSuccess,
|
success: (data: material.ApplyInfo) => void = defaultSuccess,
|
||||||
|
@ -6,10 +6,12 @@ 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';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
searchPage,
|
searchPage,
|
||||||
saveApply,
|
saveApply,
|
||||||
detail,
|
detail,
|
||||||
searchAuditPage,
|
searchAuditPage,
|
||||||
|
auditApply,
|
||||||
};
|
};
|
||||||
|
@ -16,7 +16,7 @@ export interface Params {
|
|||||||
/** 创建日期 */
|
/** 创建日期 */
|
||||||
createDate?: string;
|
createDate?: string;
|
||||||
/** 审核状态 */
|
/** 审核状态 */
|
||||||
reviewResult?: 'PASS' | 'UN_PASS' | 'WAIT' | 'REJECT';
|
reviewResult?: 'PASS' | 'UN_PASS' | 'WAIT_AUDIT' | 'REJECT' | 'WAIT_CHECK';
|
||||||
}
|
}
|
||||||
|
|
||||||
export default async function (
|
export default async function (
|
||||||
|
@ -8,9 +8,9 @@
|
|||||||
|
|
||||||
<a-form-item label="申请类型" name="applyType">
|
<a-form-item label="申请类型" name="applyType">
|
||||||
<a-radio-group v-model:value="formData.applyType" button-style="solid" style="width: 40%;">
|
<a-radio-group v-model:value="formData.applyType" button-style="solid" style="width: 40%;">
|
||||||
<a-radio-button value='1' v-if="applyType === 'PURCHASE_RECEIPT'">采购入库</a-radio-button>
|
<a-radio-button value='PURCHASE_RECEIPT' v-if="applyType === 'PURCHASE_RECEIPT'">采购入库</a-radio-button>
|
||||||
<a-radio-button value='2' v-if="applyType === 'RETURN_RECEIPT'">归还入库</a-radio-button>
|
<a-radio-button value='RETURN_RECEIPT' v-if="applyType === 'PURCHASE_RECEIPT'">归还入库</a-radio-button>
|
||||||
<a-radio-button value='3' v-if="applyType === 'LOAN_OUT'">出库外借</a-radio-button>
|
<a-radio-button value='LOAN_OUT' v-if="applyType === 'LOAN_OUT'">出库外借</a-radio-button>
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="申请日期" name="applyDate" style="width: 40%;">
|
<a-form-item label="申请日期" name="applyDate" style="width: 40%;">
|
||||||
|
@ -12,32 +12,53 @@
|
|||||||
<!-- 页面表格内容 -->
|
<!-- 页面表格内容 -->
|
||||||
<div style="min-height: calc(100vh - 305px)">
|
<div style="min-height: calc(100vh - 305px)">
|
||||||
<!-- 表格行 -->
|
<!-- 表格行 -->
|
||||||
<a-table :columns="columns" :data-source="auditPage?.records" bordered :pagination="pagination"
|
<a-table :columns="columns" :data-source="auditPage?.records" bordered :pagination="pagination" :loading="loading"
|
||||||
:loading="loading" row-key="key">
|
row-key="key">
|
||||||
|
<template #bodyCell="{ column, record }">
|
||||||
|
<template v-if="column.dataIndex === 'auditType'">
|
||||||
|
{{ record.auditType === 'ALL' ? '全部盘点' : '部分盘点' }}
|
||||||
|
</template>
|
||||||
|
<template v-if="column.dataIndex === 'reviewResult'">
|
||||||
|
<template v-if="record.reviewResult === 'WAIT_CHECK'"> 待盘点</template>
|
||||||
|
<template v-if="record.reviewResult === 'PASS'"> 通过</template>
|
||||||
|
<template v-if="record.reviewResult === 'REJECT'"> 拒绝 </template>
|
||||||
|
<template v-if="record.reviewResult === 'UN_PASS'"> 未通过</template>
|
||||||
|
<template v-if="record.reviewResult === 'WAIT_AUDIT'"> 待审核</template>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
|
||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
</page-container>
|
</page-container>
|
||||||
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import api from '@/api';
|
import api from '@/api';
|
||||||
import { IPage } from '@/api/api'
|
import { IPage } from '@/api/api'
|
||||||
const searchKey = ref('')
|
import { useUserStore } from '@/stores/user'
|
||||||
|
|
||||||
|
|
||||||
|
const searchKey = ref('')
|
||||||
const auditPage = ref<IPage<material.ApplyForm>>()
|
const auditPage = ref<IPage<material.ApplyForm>>()
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
|
|
||||||
|
|
||||||
|
const userStore = useUserStore()
|
||||||
// 加载数据的方法
|
// 加载数据的方法
|
||||||
const loadData = async (page = 1, size = 10) => {
|
const loadData = async (page = 1, size = 10) => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
api.materialApi.apply.searchAuditPage(
|
api.materialApi.apply.searchAuditPage(
|
||||||
{
|
{
|
||||||
page: page,
|
page: page,
|
||||||
size: size
|
size: size,
|
||||||
|
taker: userStore.userName,
|
||||||
|
reviewResult: 'WAIT_CHECK',
|
||||||
}, (data) => {
|
}, (data) => {
|
||||||
auditPage.value = data
|
auditPage.value = data
|
||||||
loading.value = false
|
loading.value = false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//初始加载
|
//初始加载
|
||||||
loadData()
|
loadData()
|
||||||
@ -49,21 +70,39 @@ const columns = [
|
|||||||
dataIndex: 'auditType',
|
dataIndex: 'auditType',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '盘点人',
|
title: '申请人',
|
||||||
dataIndex: 'applicant',
|
dataIndex: 'applicant',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: '盘点审核人',
|
|
||||||
dataIndex: 'reviewer',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: '盘点人',
|
title: '盘点人',
|
||||||
dataIndex: 'taker',
|
dataIndex: 'taker',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '任务状态',
|
||||||
|
dataIndex: 'reviewResult',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '盘点审核人',
|
||||||
|
dataIndex: 'reviewer',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '创建时间',
|
title: '创建时间',
|
||||||
dataIndex: 'createdTime',
|
dataIndex: 'createdTime',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '盘点结果(系统生成)',
|
||||||
|
dataIndex: 'result',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '异常原因',
|
||||||
|
dataIndex: 'exception',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '处理方式',
|
||||||
|
dataIndex: 'handle',
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
//分页信息
|
//分页信息
|
||||||
@ -78,4 +117,5 @@ const pagination = computed(() => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
97
src/views/stock/stocktaking/form.ts
Normal file
97
src/views/stock/stocktaking/form.ts
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
import { FormItem, FormConfig } from '@/components/form-render/form-render-types'
|
||||||
|
|
||||||
|
|
||||||
|
export const config: FormConfig = {
|
||||||
|
layout: 'horizontal',
|
||||||
|
colon: true,
|
||||||
|
hideRequiredMark: false,
|
||||||
|
labelAlign: 'right',
|
||||||
|
scrollToFirstError: false,
|
||||||
|
validateOnRuleChange: true,
|
||||||
|
labelCol: {
|
||||||
|
span: 4,
|
||||||
|
offset: 0,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
export const formItems = (materialOptions: Array<{ value: string | undefined, label: string | undefined }>,
|
||||||
|
required : Ref<boolean>,
|
||||||
|
persons: Array<{ value: string | undefined, label: string | undefined }>): FormItem[] => [
|
||||||
|
{
|
||||||
|
group: 'form',
|
||||||
|
type: 'radio',
|
||||||
|
config: {
|
||||||
|
autoLink: true,
|
||||||
|
hasFeedback: false,
|
||||||
|
label: '盘点类型',
|
||||||
|
name: 'auditType',
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
properties: {
|
||||||
|
size: 'default',
|
||||||
|
optionType: 'button',
|
||||||
|
buttonStyle: 'solid',
|
||||||
|
defaultValue: "ALL",
|
||||||
|
options: [{ value: "ALL", label: "全部盘点" }, { value: "PARTIAL", label: "部分盘点" }]
|
||||||
|
},
|
||||||
|
rules: [],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
group: 'form',
|
||||||
|
type: 'select',
|
||||||
|
hidden: true,
|
||||||
|
config: {
|
||||||
|
autoLink: true,
|
||||||
|
hasFeedback: false,
|
||||||
|
label: '物料选择',
|
||||||
|
name: 'ids',
|
||||||
|
},
|
||||||
|
properties: {
|
||||||
|
size: 'default',
|
||||||
|
mode: 'multiple',
|
||||||
|
required: required.value,
|
||||||
|
placeholder: '请选择物料',
|
||||||
|
options: materialOptions,
|
||||||
|
},
|
||||||
|
rules: [],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
group: 'form',
|
||||||
|
type: 'select',
|
||||||
|
config: {
|
||||||
|
autoLink: true,
|
||||||
|
hasFeedback: false,
|
||||||
|
label: '盘点人员',
|
||||||
|
name: 'taker',
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
properties: {
|
||||||
|
size: 'default',
|
||||||
|
type: 'text',
|
||||||
|
allowClear: false,
|
||||||
|
bordered: true,
|
||||||
|
showCount: false,
|
||||||
|
options: persons,
|
||||||
|
placeholder: '请输入盘点人员',
|
||||||
|
},
|
||||||
|
rules: [],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
group: 'form',
|
||||||
|
config: {
|
||||||
|
autoLink: true,
|
||||||
|
hasFeedback: false,
|
||||||
|
label: '审核人员',
|
||||||
|
name: 'reviewer',
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
properties: {
|
||||||
|
size: 'default',
|
||||||
|
controls: true,
|
||||||
|
placeholder: '请填写审核人员',
|
||||||
|
options: persons,
|
||||||
|
},
|
||||||
|
rules: [],
|
||||||
|
}
|
||||||
|
]
|
@ -8,7 +8,7 @@
|
|||||||
@search="loadData()"></a-input-search>
|
@search="loadData()"></a-input-search>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="6">
|
<a-col :span="6">
|
||||||
<a-button type="primary" style="margin-left: 10px">
|
<a-button type="primary" style="margin-left: 10px" @click="formDrawer?.show()">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<icon-font type="icon-plus" />
|
<icon-font type="icon-plus" />
|
||||||
</template>
|
</template>
|
||||||
@ -20,32 +20,115 @@
|
|||||||
<!-- 页面表格内容 -->
|
<!-- 页面表格内容 -->
|
||||||
<div style="min-height: calc(100vh - 305px)">
|
<div style="min-height: calc(100vh - 305px)">
|
||||||
<!-- 表格行 -->
|
<!-- 表格行 -->
|
||||||
<a-table :columns="columns" :data-source="auditPage?.records" bordered :pagination="pagination"
|
<a-table :columns="columns" :data-source="auditPage?.records" bordered :pagination="pagination" :loading="loading"
|
||||||
:loading="loading" row-key="key">
|
row-key="key">
|
||||||
|
<template #bodyCell="{ column, record }">
|
||||||
|
<template v-if="column.dataIndex === 'auditType'">
|
||||||
|
{{ record.auditType === 'ALL' ? '全部盘点' : '部分盘点' }}
|
||||||
|
</template>
|
||||||
|
<template v-if="column.dataIndex === 'reviewResult'">
|
||||||
|
<template v-if="record.reviewResult === 'WAIT_CHECK'"> 待盘点</template>
|
||||||
|
<template v-if="record.reviewResult === 'PASS'"> 通过</template>
|
||||||
|
<template v-if="record.reviewResult === 'REJECT'"> 拒绝 </template>
|
||||||
|
<template v-if="record.reviewResult === 'UN_PASS'"> 未通过</template>
|
||||||
|
<template v-if="record.reviewResult === 'WAIT_AUDIT'"> 待审核</template>
|
||||||
|
</template>
|
||||||
|
<template v-if="column.dataIndex === 'operation'">
|
||||||
|
<a-button type="link">
|
||||||
|
<template #icon>
|
||||||
|
<icon-font type="icon-edit" />
|
||||||
|
</template>
|
||||||
|
盘点作业
|
||||||
|
</a-button>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
|
||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
</page-container>
|
</page-container>
|
||||||
|
|
||||||
|
<form-drawer ref="formDrawer" v-model="applyForm" :form-items="items" :config="formConfig"
|
||||||
|
:disabled-fields=disabledFields @ok="doSave" title="盘点申请" />
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import api from '@/api';
|
import api from '@/api';
|
||||||
import { IPage } from '@/api/api'
|
import { IPage } from '@/api/api'
|
||||||
const searchKey = ref('')
|
import FormDrawer from '@/components/form-render/form-drawer.vue'
|
||||||
|
import { config, formItems } from './form'
|
||||||
|
import { notification } from 'ant-design-vue'
|
||||||
|
import dayjs from 'dayjs';
|
||||||
|
import { useUserStore } from '@/stores/user'
|
||||||
|
|
||||||
|
|
||||||
|
const searchKey = ref('')
|
||||||
|
const userStore = useUserStore()
|
||||||
|
const applyForm = ref<Partial<material.AuditApplyInfo>>({
|
||||||
|
auditType: 'ALL',
|
||||||
|
applicant: userStore.userName,
|
||||||
|
type: 'AUDIT',
|
||||||
|
applyDate: dayjs()+'',
|
||||||
|
isConfirm : false,
|
||||||
|
reviewResult: 'WAIT_CHECK'
|
||||||
|
|
||||||
|
})
|
||||||
const auditPage = ref<IPage<material.ApplyForm>>()
|
const auditPage = ref<IPage<material.ApplyForm>>()
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
|
|
||||||
|
const materialList = ref<Array<{ value: string | undefined, label: string | undefined }>>([])
|
||||||
|
const personList = ref<Array<{ value: string | undefined, label: string | undefined }>>([])
|
||||||
|
const required = ref(false)
|
||||||
|
//获取所有物料
|
||||||
|
api.materialApi.material.all((data) => {
|
||||||
|
materialList.value = data.map(item => {
|
||||||
|
return {
|
||||||
|
value: item?.id + '',
|
||||||
|
label: item?.name
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
api.aclApi.user.all((data) => {
|
||||||
|
personList.value = data.map(item => {
|
||||||
|
return {
|
||||||
|
value: item?.name,
|
||||||
|
label: item?.fullName
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const disabledFields = computed(() => {
|
||||||
|
if (applyForm.value?.auditType !== 'ALL') {
|
||||||
|
required.value = true
|
||||||
|
}
|
||||||
|
return applyForm.value?.auditType === 'ALL' ? ['materials'] : []
|
||||||
|
})
|
||||||
|
|
||||||
|
//表单
|
||||||
|
const formDrawer = ref<typeof FormDrawer>()
|
||||||
|
const formConfig = computed(() => {
|
||||||
|
return config
|
||||||
|
})
|
||||||
|
//表单配置
|
||||||
|
const items = computed(() => {
|
||||||
|
|
||||||
|
return formItems(materialList.value, required, personList.value)
|
||||||
|
})
|
||||||
// 加载数据的方法
|
// 加载数据的方法
|
||||||
const loadData = async (page = 1, size = 10) => {
|
const loadData = async (page = 1, size = 10) => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
api.materialApi.apply.searchAuditPage(
|
api.materialApi.apply.searchAuditPage(
|
||||||
{
|
{
|
||||||
page: page,
|
page: page,
|
||||||
size: size
|
size: size,
|
||||||
|
taker: userStore.userName,
|
||||||
|
reviewResult: 'WAIT_CHECK',
|
||||||
}, (data) => {
|
}, (data) => {
|
||||||
auditPage.value = data
|
auditPage.value = data
|
||||||
loading.value = false
|
loading.value = false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//初始加载
|
//初始加载
|
||||||
loadData()
|
loadData()
|
||||||
@ -57,21 +140,31 @@ const columns = [
|
|||||||
dataIndex: 'auditType',
|
dataIndex: 'auditType',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '盘点人',
|
title: '申请人',
|
||||||
dataIndex: 'applicant',
|
dataIndex: 'applicant',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: '盘点审核人',
|
|
||||||
dataIndex: 'reviewer',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: '盘点人',
|
title: '盘点人',
|
||||||
dataIndex: 'taker',
|
dataIndex: 'taker',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '任务状态',
|
||||||
|
dataIndex: 'reviewResult',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '盘点审核人',
|
||||||
|
dataIndex: 'reviewer',
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '创建时间',
|
title: '创建时间',
|
||||||
dataIndex: 'createdTime',
|
dataIndex: 'createdTime',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
dataIndex: 'operation',
|
||||||
|
width: 400,
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
//分页信息
|
//分页信息
|
||||||
@ -86,4 +179,18 @@ const pagination = computed(() => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const doSave = (_data: material.AuditApplyInfo) => {
|
||||||
|
api.materialApi.apply.auditApply(_data, () => {
|
||||||
|
formDrawer.value?.close()
|
||||||
|
notification.success({
|
||||||
|
message: '操作成功',
|
||||||
|
description: '盘点申请保存成功,页面将自动刷新!',
|
||||||
|
onClose: () => {
|
||||||
|
loadData(1)
|
||||||
|
},
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user