fix: 李红攀:V2.0.008采购入库库位推荐的同步
This commit is contained in:
82
src/api/erp/approval/index.ts
Normal file
82
src/api/erp/approval/index.ts
Normal file
@@ -0,0 +1,82 @@
|
||||
import { http } from '@/http/http'
|
||||
|
||||
/** 审批记录 */
|
||||
export interface ApprovalRecord {
|
||||
id?: number
|
||||
processInstanceId: string
|
||||
bizId: string
|
||||
bizTableName: string
|
||||
applicant: string
|
||||
applicantName?: string
|
||||
approver: string
|
||||
approverName?: string
|
||||
assigner?: string
|
||||
assignerName?: string
|
||||
assignReason?: string
|
||||
approvalTime?: string
|
||||
comment?: string
|
||||
approvalResult: number
|
||||
flowType: number
|
||||
parentApprovalId?: number
|
||||
approvalLevel: number
|
||||
processStatus: number
|
||||
sort?: number
|
||||
createTime?: string
|
||||
updateTime?: string
|
||||
}
|
||||
|
||||
/** 提交审批参数 */
|
||||
export interface ApprovalSubmitVO {
|
||||
bizId: string
|
||||
bizTableName: string
|
||||
nextApprover: string
|
||||
remark?: string
|
||||
}
|
||||
|
||||
/** 处理审批参数 */
|
||||
export interface ApprovalProcessVO {
|
||||
id: number
|
||||
approvalResult: number
|
||||
comment?: string
|
||||
nextApprover?: string
|
||||
assignReason?: string
|
||||
}
|
||||
|
||||
/** 审批结果枚举 */
|
||||
export const APPROVAL_RESULT = {
|
||||
PENDING: 0, // 待审批
|
||||
APPROVED: 1, // 通过
|
||||
REJECTED: 2, // 拒绝
|
||||
TRANSFERRED: 3, // 转办
|
||||
}
|
||||
|
||||
/** 审批结果选项 */
|
||||
export const APPROVAL_RESULT_OPTIONS = [
|
||||
{ label: '通过', value: APPROVAL_RESULT.APPROVED },
|
||||
{ label: '拒绝', value: APPROVAL_RESULT.REJECTED },
|
||||
]
|
||||
|
||||
/** 提交审批 */
|
||||
export function submitApproval(data: ApprovalSubmitVO) {
|
||||
return http.post<number>('/erp/approval-record/submit', data)
|
||||
}
|
||||
|
||||
/** 处理审批 */
|
||||
export function processApproval(data: ApprovalProcessVO) {
|
||||
return http.post<boolean>('/erp/approval-record/process', data)
|
||||
}
|
||||
|
||||
/** 获取业务单据的审批记录列表 */
|
||||
export function getApprovalRecordListByBiz(bizId: string, bizTableName: string) {
|
||||
return http.get<ApprovalRecord[]>('/erp/approval-record/list-by-biz', { bizId, bizTableName })
|
||||
}
|
||||
|
||||
/** 获取用户的待办审批列表 */
|
||||
export function getPendingApprovalList(approver: string) {
|
||||
return http.get<ApprovalRecord[]>('/erp/approval-record/pending-list', { approver })
|
||||
}
|
||||
|
||||
/** 终止审批流程 */
|
||||
export function terminateApproval(bizId: string, bizTableName: string) {
|
||||
return http.post<boolean>('/erp/approval-record/terminate', { bizId, bizTableName })
|
||||
}
|
||||
@@ -22,6 +22,7 @@ export interface PurchaseInItem {
|
||||
productCategoryName?: string
|
||||
stockCount?: number
|
||||
totalCount?: number
|
||||
inCount?: number
|
||||
totalPrice?: number
|
||||
totalProductPrice?: number
|
||||
orderItemId?: number
|
||||
@@ -57,6 +58,7 @@ export interface PurchaseIn {
|
||||
isQualified?: boolean
|
||||
returnType?: string | null
|
||||
returnRemark?: string
|
||||
hasApprovalRecords?: boolean
|
||||
}
|
||||
|
||||
/** 审核表单数据 */
|
||||
|
||||
Reference in New Issue
Block a user