OfficeSystem/api/verify.js
2025-11-14 14:44:01 +08:00

63 lines
1.4 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import {convertArrayParamsToQuery} from "@/api/utils";
// 审批相关 API
/**
* 获取审核列表
* @param {Object} params 请求参数
* @returns {Promise} 返回审核列表
*/
export const getVerifyList = (params = {}) => {
// 使用通用函数处理数组参数
const { params: processedParams, queryString } = convertArrayParamsToQuery(params);
// 构建请求 URL去掉查询字符串开头的 &
const url = queryString
? `/bst/verify/list?${queryString}`
: '/bst/verify/list';
return uni.$uv.http.get(url, {
params: {
pageNum: 1,
pageSize: 20,
orderByColumn: 'createTime',
isAsc: 'descending',
bstType: 'UPDATE_TASK',
...processedParams
},
custom: {
auth: true
}
});
};
/**
* 获取审核详情
* @param {string|number} id 审核ID
* @returns {Promise} 返回审核详情
*/
export const getVerifyDetail = (id) => {
return uni.$uv.http.get(`/bst/verify/${id}`, {
custom: {
auth: true
}
});
};
/**
* 审核处理(统一接口)
* @param {string|number} id 审核ID
* @param {string|number} status 审核状态1-通过2-驳回
* @param {string} msg 审核意见(可选)
* @returns {Promise} 返回接口响应
*/
export const handleVerify = (id, status, msg = '') => {
return uni.$uv.http.put('/bst/verify/handle', {
id: id.toString(),
status: status.toString(),
msg: msg
}, {
custom: {
auth: true
}
});
};