diff --git a/src/api/teamBill.js b/src/api/teamBill.js index f17118b..b573373 100644 --- a/src/api/teamBill.js +++ b/src/api/teamBill.js @@ -140,6 +140,36 @@ export const processInviteMessage = async (data) => { } } +/** + * 获取团队账单列表 + * @param {string} teamId - 团队ID + * @returns {Promise} + */ +export const getTeamBill = async (teamId) => { + try { + const response = await get(`/team/bill?id=${teamId}`) + return response + } catch (error) { + console.error('Failed to fetch team bill:', error) + throw error + } +} + +/** + * 获取团队账单的工资成员信息 + * @param {string} billId - 账单ID + * @returns {Promise} + */ +export const getTeamBillWorkMembers = async (billId) => { + try { + const response = await get(`/team/bill/work-members?id=${billId}`) + return response + } catch (error) { + console.error('Failed to fetch team bill work members:', error) + throw error + } +} + /** * 获取团队成员工作报告 * @param {string} userId - 用户ID @@ -201,6 +231,11 @@ export const formatBillStatus = (status) => { class: 'pending', color: '#EF4444' }, + 'PAY_OUT': { + text: 'Completed', + class: 'completed', + color: '#10B981' + }, 'PAID': { text: 'Completed', class: 'completed', diff --git a/src/components/team/TeamBillMore.vue b/src/components/team/TeamBillMore.vue index 851af42..de14774 100644 --- a/src/components/team/TeamBillMore.vue +++ b/src/components/team/TeamBillMore.vue @@ -1,78 +1,73 @@