feat(历史薪资): 新增组件,调整样式
This commit is contained in:
parent
3e1de889ea
commit
4e3f6af963
@ -2,21 +2,31 @@
|
|||||||
<div class="history-salary gradient-background-circles">
|
<div class="history-salary gradient-background-circles">
|
||||||
<MobileHeader title="History Salary" />
|
<MobileHeader title="History Salary" />
|
||||||
|
|
||||||
|
<!-- 内容 -->
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<!-- Host Salary 卡片 -->
|
<!-- 历史薪资 -->
|
||||||
<div class="host-salary-card">
|
<div
|
||||||
<div class="salary-header">
|
style="
|
||||||
<h3>Host Salary</h3>
|
background-color: white;
|
||||||
<button class="info-btn" @click="showHelpInfo">
|
padding: 16px;
|
||||||
<span>?</span>
|
border-radius: 12px;
|
||||||
</button>
|
box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.25);
|
||||||
|
margin-bottom: 12px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<div style="display: flex; flex-direction: column; gap: 10px">
|
||||||
|
<div>History Salary</div>
|
||||||
|
<div style="font-weight: 600">${{ totalSalary }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="salary-amount">${{ totalSalary }}</div>
|
<div class="info-btn" @click="showHelpInfo">?</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Work Report 部分 -->
|
<!-- 工作报告 -->
|
||||||
<div class="work-report-section">
|
<div style="margin-bottom: 20px">
|
||||||
<h3>Work report:</h3>
|
<div style="margin: 10px 1%; font-weight: 600; color: rgba(0, 0, 0, 0.4)">Work report:</div>
|
||||||
|
|
||||||
<!-- 加载状态 -->
|
<!-- 加载状态 -->
|
||||||
<div v-if="loading" class="loading-container">
|
<div v-if="loading" class="loading-container">
|
||||||
@ -25,46 +35,22 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 报告列表 -->
|
<!-- 报告列表 -->
|
||||||
<div v-else-if="workReports.length > 0" class="report-list">
|
<div
|
||||||
<div
|
v-else-if="workReports.length > 0"
|
||||||
|
style="display: flex; flex-direction: column; gap: 12px"
|
||||||
|
>
|
||||||
|
<!-- 进度信息 -->
|
||||||
|
<workReportBox
|
||||||
v-for="report in workReports"
|
v-for="report in workReports"
|
||||||
:key="report.id"
|
:key="report.id"
|
||||||
class="report-item"
|
:type="report.status"
|
||||||
>
|
:date="report.date"
|
||||||
<div class="report-header">
|
:target="report.target"
|
||||||
<span class="report-date">{{ report.date }}</span>
|
:salary="report.salary"
|
||||||
<span :class="['status-badge', report.status.toLowerCase().replace(' ', '-')]">
|
:days="report.timeDays"
|
||||||
{{ report.status }}
|
more="true"
|
||||||
</span>
|
@showMore="showReportDetail(report)"
|
||||||
</div>
|
></workReportBox>
|
||||||
|
|
||||||
<div class="report-details">
|
|
||||||
<div class="detail-row">
|
|
||||||
<div class="detail-item">
|
|
||||||
<span class="detail-label">Level:</span>
|
|
||||||
<span class="detail-value">{{ report.target }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="detail-item">
|
|
||||||
<span class="detail-label">Salary:</span>
|
|
||||||
<span class="detail-value">{{ report.salary }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="detail-row">
|
|
||||||
<div class="detail-item">
|
|
||||||
<span class="detail-label">Time(Days):</span>
|
|
||||||
<span class="detail-value">{{ report.timeDays }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="detail-item">
|
|
||||||
<!-- More 按钮 -->
|
|
||||||
<button v-if="report.hasDetails" class="more-btn" @click="showReportDetail(report)">
|
|
||||||
<span>More</span>
|
|
||||||
<span class="arrow">></span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 空数据状态 -->
|
<!-- 空数据状态 -->
|
||||||
@ -75,64 +61,53 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 详情模态框 -->
|
<!-- 遮罩层 -->
|
||||||
<div v-if="showDetailModal" class="modal-overlay" @click="closeDetailModal">
|
<div v-if="showDetailModal || showHelpModal" class="modal-overlay" @click="closeModal">
|
||||||
<div class="detail-modal" @click.stop>
|
<!-- 详情模态框 -->
|
||||||
<div class="detail-header">
|
<div v-if="showDetailModal" class="modal-item">
|
||||||
<h3>{{ selectedReport?.date || 'Work Details' }}</h3>
|
<div class="detail-modal" @click.stop>
|
||||||
<button class="close-btn" @click="closeDetailModal">×</button>
|
<div class="detail-header">
|
||||||
</div>
|
<h3>{{ selectedReport?.date || 'Work Details' }}</h3>
|
||||||
|
<button class="close-btn" @click="closeModal">×</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="detail-content">
|
<div class="detail-content">
|
||||||
<!-- 等级卡片 -->
|
<!-- 等级卡片 -->
|
||||||
<!-- <div v-if="levelData" class="level-card">
|
<div v-if="selectedReport" class="level-card">
|
||||||
<div class="level-header">
|
<div class="level-stats">
|
||||||
<h4>{{ levelData.level }}</h4>
|
<div class="stat-row">
|
||||||
</div>
|
<div class="stat-item">
|
||||||
<div class="level-stats">
|
<span class="stat-label">Time(Days)</span>
|
||||||
<div class="stat-row">
|
<span class="stat-value">{{ selectedReport.timeDays }}</span>
|
||||||
<div class="stat-item">
|
|
||||||
<span class="stat-label">Time (hours)</span>
|
|
||||||
<span class="stat-value">{{ levelData.timeHours }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="stat-item">
|
|
||||||
<span class="stat-label">Target</span>
|
|
||||||
<span class="stat-value">{{ levelData.target }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="stat-item">
|
|
||||||
<span class="stat-label">Host Salary</span>
|
|
||||||
<span class="stat-value">${{ levelData.hostSalary }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="stat-row">
|
|
||||||
<div class="stat-item">
|
|
||||||
<span class="stat-label">Agent Salary</span>
|
|
||||||
<span class="stat-value">${{ levelData.agentSalary }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="stat-item">
|
|
||||||
<span class="stat-label">Total Salary</span>
|
|
||||||
<span class="stat-value">${{ levelData.totalSalary }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="stat-item">
|
|
||||||
<!– 空占位 –>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>-->
|
|
||||||
|
|
||||||
<!-- 每日薪资列表 -->
|
|
||||||
<div v-if="dailyTargets.length > 0" class="daily-salary">
|
|
||||||
<h4>Daily salary:</h4>
|
|
||||||
<div class="daily-list">
|
|
||||||
<div v-for="daily in dailyTargets" :key="daily.dateNumber" class="daily-item">
|
|
||||||
<div class="daily-date">{{ formatDateNumber(daily.dateNumber) }}</div>
|
|
||||||
<div class="daily-info">
|
|
||||||
<div class="daily-target">
|
|
||||||
<span>Level: {{ getLevelFromPolicy(daily.acceptGiftValue) }}</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="daily-time">
|
<div class="stat-item">
|
||||||
<span>Time: </span>
|
<span class="stat-label">Target</span>
|
||||||
<span class="time-value">{{ Math.min(formatOnlineTime(daily.onlineTime), 120) }}/120</span>
|
<span class="stat-value">{{ selectedReport.target }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="stat-item">
|
||||||
|
<span class="stat-label">Salary</span>
|
||||||
|
<span class="stat-value">${{ selectedReport.salary }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 每日薪资列表 -->
|
||||||
|
<div v-if="dailyTargets.length > 0" class="daily-salary">
|
||||||
|
<h4>Daily salary:</h4>
|
||||||
|
<div class="daily-list">
|
||||||
|
<div v-for="daily in dailyTargets" :key="daily.dateNumber" class="daily-item">
|
||||||
|
<div class="daily-date">{{ formatDateNumber(daily.dateNumber) }}</div>
|
||||||
|
<div class="daily-info">
|
||||||
|
<div class="daily-target">
|
||||||
|
<span>Level: {{ getLevelFromPolicy(daily.acceptGiftValue) }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="daily-time">
|
||||||
|
<span>Time: </span>
|
||||||
|
<span class="time-value"
|
||||||
|
>{{ Math.min(formatOnlineTime(daily.onlineTime), 120) }}/120</span
|
||||||
|
>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -140,89 +115,73 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 帮助模态框 -->
|
<!-- 帮助模态框 -->
|
||||||
<div v-if="showHelpModal" class="modal-overlay" @click="closeHelpModal">
|
<div v-if="showHelpModal" class="modal-item">
|
||||||
<div class="help-modal-content" @click.stop>
|
<div
|
||||||
<div class="help-modal-header">
|
style="
|
||||||
<h3>Work Report Help</h3>
|
background-color: white;
|
||||||
<button class="close-btn" @click="closeHelpModal">×</button>
|
border-radius: 12px;
|
||||||
</div>
|
width: 90%;
|
||||||
|
max-width: 400px;
|
||||||
|
max-height: 80vh;
|
||||||
|
overflow: hidden;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
"
|
||||||
|
@click.stop
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
style="
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
padding: 16px;
|
||||||
|
position: relative;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<div style="margin: 0; font-size: 18px; font-weight: 600; color: #333">Help</div>
|
||||||
|
<div
|
||||||
|
style="
|
||||||
|
position: absolute;
|
||||||
|
right: 10px;
|
||||||
|
color: black;
|
||||||
|
|
||||||
<div class="help-modal-body">
|
display: flex;
|
||||||
<div class="help-section">
|
align-items: center;
|
||||||
<p class="help-description">
|
justify-content: center;
|
||||||
Shown below is the work report of the members "More" can view more work detailed.
|
"
|
||||||
|
@click="closeModal"
|
||||||
|
>
|
||||||
|
×
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="help-modal-body">
|
||||||
|
<p>Shown below is the work report of the members "More" can view more work detailed.</p>
|
||||||
|
<p>Status Description:</p>
|
||||||
|
<p>(1)Completed: The system has completed the settlement report.</p>
|
||||||
|
<p>
|
||||||
|
(2)Pending: There is currently a dispute, and the system cannot perform a settlement.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
<p>(3)Out of account: waiting for system verification.</p>
|
||||||
|
<p>(4)In progress: work now in progress.</p>
|
||||||
<div class="help-section">
|
|
||||||
<h4>Status Description:</h4>
|
|
||||||
<div class="status-list">
|
|
||||||
<div class="status-item">
|
|
||||||
<span class="status-number">(1)</span>
|
|
||||||
<span class="status-name">Completed:</span>
|
|
||||||
<span class="status-desc">The system has completed the settlement report.</span>
|
|
||||||
</div>
|
|
||||||
<div class="status-item">
|
|
||||||
<span class="status-number">(2)</span>
|
|
||||||
<span class="status-name">Pending:</span>
|
|
||||||
<span class="status-desc">There is currently a dispute, and the system cannot perform a settlement.</span>
|
|
||||||
</div>
|
|
||||||
<div class="status-item">
|
|
||||||
<span class="status-number">(3)</span>
|
|
||||||
<span class="status-name">Out of account:</span>
|
|
||||||
<span class="status-desc">waiting for system verification.</span>
|
|
||||||
</div>
|
|
||||||
<div class="status-item">
|
|
||||||
<span class="status-number">(4)</span>
|
|
||||||
<span class="status-name">In progress:</span>
|
|
||||||
<span class="status-desc">work now in progress.</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 薪资信息弹窗 -->
|
|
||||||
<div v-if="showSalaryModal" class="modal-overlay" @click="showSalaryModal = false">
|
|
||||||
<div class="modal" @click.stop>
|
|
||||||
<h3>Salary Information</h3>
|
|
||||||
<div class="salary-breakdown">
|
|
||||||
<div class="breakdown-item">
|
|
||||||
<span>Base Salary:</span>
|
|
||||||
<span>$8,000</span>
|
|
||||||
</div>
|
|
||||||
<div class="breakdown-item">
|
|
||||||
<span>Performance Bonus:</span>
|
|
||||||
<span>$3,000</span>
|
|
||||||
</div>
|
|
||||||
<div class="breakdown-item">
|
|
||||||
<span>Commission:</span>
|
|
||||||
<span>$1,345</span>
|
|
||||||
</div>
|
|
||||||
<div class="breakdown-total">
|
|
||||||
<span>Total:</span>
|
|
||||||
<span>$12,345</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<button @click="showSalaryModal = false">Close</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {onMounted, ref} from 'vue'
|
import { onMounted, ref } from 'vue'
|
||||||
import MobileHeader from '../components/MobileHeader.vue'
|
import MobileHeader from '../components/MobileHeader.vue'
|
||||||
import {getTeamMemberWork, getTeamReleasePolicy} from '../api/teamBill.js'
|
import { getTeamMemberWork, getTeamReleasePolicy } from '../api/teamBill.js'
|
||||||
import {getTeamId, getUserId, getUserProfile} from "@/utils/userStore.js";
|
import { getTeamId, getUserId, getUserProfile } from '@/utils/userStore.js'
|
||||||
import {getUserIdentity} from "@/api/wallet.js";
|
import { getUserIdentity } from '@/api/wallet.js'
|
||||||
|
import workReportBox from '@/components/HostCenter/workReportBox.vue'
|
||||||
|
|
||||||
const totalSalary = ref('0.00')
|
const totalSalary = ref('0.00')
|
||||||
const showSalaryModal = ref(false)
|
|
||||||
const showHelpModal = ref(false)
|
const showHelpModal = ref(false)
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const showDetailModal = ref(false)
|
const showDetailModal = ref(false)
|
||||||
@ -280,7 +239,7 @@ const getLevelFromPolicy = (giftValue) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 如果都不匹配,返回最低等级
|
// 如果都不匹配,返回最低等级
|
||||||
return Math.min(...policyData.value.policy.map(p => p.level))
|
return Math.min(...policyData.value.policy.map((p) => p.level))
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取工作报告数据
|
// 获取工作报告数据
|
||||||
@ -296,32 +255,40 @@ const fetchWorkReports = async (userId) => {
|
|||||||
|
|
||||||
const userIdentity = await getUserIdentity()
|
const userIdentity = await getUserIdentity()
|
||||||
|
|
||||||
workReports.value = targets.map(target => ({
|
workReports.value = targets.map((target) => ({
|
||||||
id: target.id,
|
id: target.id,
|
||||||
date: target.billTitle,
|
date: `${target.billBelong.toString().substring(0, 4)}.${target.billBelong
|
||||||
|
.toString()
|
||||||
|
.substring(4, 6)}`,
|
||||||
status: getStatusText(target.status),
|
status: getStatusText(target.status),
|
||||||
target: getLevelFromPolicy(target.target?.acceptGiftValue), // 使用政策数据计算等级
|
target: getLevelFromPolicy(target.target?.acceptGiftValue), // 使用政策数据计算等级
|
||||||
salary: formatSalaryValue(
|
salary:
|
||||||
userIdentity.body?.agent
|
formatSalaryValue(
|
||||||
? (target.target?.settlementResult?.ownSalary || 0) + (target.target?.settlementResult?.memberSalary || 0)
|
userIdentity.body?.agent
|
||||||
: userIdentity.body?.anchor
|
? (target.target?.settlementResult?.ownSalary || 0) +
|
||||||
|
(target.target?.settlementResult?.memberSalary || 0)
|
||||||
|
: userIdentity.body?.anchor
|
||||||
? target.target?.settlementResult?.memberSalary
|
? target.target?.settlementResult?.memberSalary
|
||||||
: null
|
: null
|
||||||
) || '-',
|
) || '-',
|
||||||
totalSalary: formatSalaryValue(target.target?.settlementResult?.totalSalary) || '-',
|
totalSalary: formatSalaryValue(target.target?.settlementResult?.totalSalary) || '-',
|
||||||
timeDays: target.target?.effectiveDay || '-',
|
timeDays: target.target?.effectiveDay || '-',
|
||||||
hasDetails: target.target && target.target.dailyTargets && target.target.dailyTargets.length > 0,
|
hasDetails:
|
||||||
originalData: target // 保存原始数据用于详情显示
|
target.target && target.target.dailyTargets && target.target.dailyTargets.length > 0,
|
||||||
|
originalData: target, // 保存原始数据用于详情显示
|
||||||
}))
|
}))
|
||||||
|
|
||||||
// 计算总薪资 - 根据用户身份选择对应的薪资字段
|
// 计算总薪资 - 根据用户身份选择对应的薪资字段
|
||||||
const totalAmount = targets.reduce((sum, target) => {
|
const totalAmount = targets.reduce((sum, target) => {
|
||||||
let salary = 0
|
let salary = 0
|
||||||
|
|
||||||
// 根据用户身份决定使用哪个薪资字段
|
// 根据用户身份决定使用哪个薪资字段
|
||||||
if (userIdentity.body?.agent) {
|
if (userIdentity.body?.agent) {
|
||||||
// agent 为 true 时,使用 ownSalary
|
// agent 为 true 时,使用 ownSalary
|
||||||
salary = parseFloat((target.target?.settlementResult?.ownSalary || 0) + (target.target?.settlementResult?.memberSalary || 0))
|
salary = parseFloat(
|
||||||
|
(target.target?.settlementResult?.ownSalary || 0) +
|
||||||
|
(target.target?.settlementResult?.memberSalary || 0)
|
||||||
|
)
|
||||||
} else if (userIdentity.body?.anchor) {
|
} else if (userIdentity.body?.anchor) {
|
||||||
// anchor 为 true 时,使用 memberSalary
|
// anchor 为 true 时,使用 memberSalary
|
||||||
salary = parseFloat(target.target?.settlementResult?.memberSalary || 0)
|
salary = parseFloat(target.target?.settlementResult?.memberSalary || 0)
|
||||||
@ -343,8 +310,8 @@ const fetchWorkReports = async (userId) => {
|
|||||||
target: '-',
|
target: '-',
|
||||||
salary: '-',
|
salary: '-',
|
||||||
timeDays: '-',
|
timeDays: '-',
|
||||||
diamond: '-'
|
diamond: '-',
|
||||||
}
|
},
|
||||||
]
|
]
|
||||||
} finally {
|
} finally {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
@ -361,9 +328,9 @@ const formatSalaryValue = (value) => {
|
|||||||
// 格式化状态文本(与 TeamBillView 保持一致)
|
// 格式化状态文本(与 TeamBillView 保持一致)
|
||||||
const getStatusText = (status) => {
|
const getStatusText = (status) => {
|
||||||
const statusMap = {
|
const statusMap = {
|
||||||
'UNPAID': 'In Progress',
|
UNPAID: 'In Progress',
|
||||||
'HANG_UP': 'Pending',
|
HANG_UP: 'Pending',
|
||||||
'PAID': 'Completed'
|
PAID: 'Completed',
|
||||||
}
|
}
|
||||||
return statusMap[status] || status
|
return statusMap[status] || status
|
||||||
}
|
}
|
||||||
@ -382,13 +349,6 @@ const showReportDetail = (report) => {
|
|||||||
showDetailModal.value = true
|
showDetailModal.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
// 关闭详情模态框
|
|
||||||
const closeDetailModal = () => {
|
|
||||||
showDetailModal.value = false
|
|
||||||
selectedReport.value = null
|
|
||||||
dailyTargets.value = []
|
|
||||||
}
|
|
||||||
|
|
||||||
// 格式化在线时间(为 Daily Salary 显示分钟数)
|
// 格式化在线时间(为 Daily Salary 显示分钟数)
|
||||||
const formatOnlineTime = (minutes) => {
|
const formatOnlineTime = (minutes) => {
|
||||||
const mins = parseInt(minutes) || 0
|
const mins = parseInt(minutes) || 0
|
||||||
@ -412,9 +372,12 @@ const showHelpInfo = () => {
|
|||||||
showHelpModal.value = true
|
showHelpModal.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
// 关闭帮助模态框
|
// 关闭遮罩层
|
||||||
const closeHelpModal = () => {
|
const closeModal = () => {
|
||||||
showHelpModal.value = false
|
showHelpModal.value = false
|
||||||
|
showDetailModal.value = false
|
||||||
|
selectedReport.value = null
|
||||||
|
dailyTargets.value = []
|
||||||
}
|
}
|
||||||
|
|
||||||
// 组件挂载时获取数据
|
// 组件挂载时获取数据
|
||||||
@ -426,6 +389,11 @@ onMounted(async () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
* {
|
||||||
|
color: rgba(0, 0, 0, 0.8);
|
||||||
|
font-family: 'SF Pro Text';
|
||||||
|
}
|
||||||
|
|
||||||
.history-salary {
|
.history-salary {
|
||||||
font-family: -apple-system, BlinkMacSystemFont, sans-serif;
|
font-family: -apple-system, BlinkMacSystemFont, sans-serif;
|
||||||
}
|
}
|
||||||
@ -441,8 +409,7 @@ onMounted(async () => {
|
|||||||
background-color: white;
|
background-color: white;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
margin-bottom: 20px;
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||||
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.salary-header {
|
.salary-header {
|
||||||
@ -460,24 +427,24 @@ onMounted(async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.info-btn {
|
.info-btn {
|
||||||
width: 20px;
|
padding: 5px;
|
||||||
height: 20px;
|
height: 10%;
|
||||||
border-radius: 10px;
|
aspect-ratio: 1/1;
|
||||||
border: 1px solid #8B5CF6;
|
border-radius: 50%;
|
||||||
background-color: #8B5CF6;
|
border: 1px solid black;
|
||||||
|
font-weight: 600;
|
||||||
|
color: black;
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
font-size: 12px;
|
|
||||||
color: white;
|
|
||||||
cursor: pointer;
|
|
||||||
font-weight: 600;
|
|
||||||
transition: all 0.2s;
|
transition: all 0.2s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.info-btn:hover {
|
.info-btn:active {
|
||||||
background-color: #7C3AED;
|
background-color: #7c3aed;
|
||||||
border-color: #7C3AED;
|
border-color: #7c3aed;
|
||||||
}
|
}
|
||||||
|
|
||||||
.salary-amount {
|
.salary-amount {
|
||||||
@ -487,18 +454,6 @@ onMounted(async () => {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Work Report 部分 */
|
|
||||||
.work-report-section {
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.work-report-section h3 {
|
|
||||||
margin: 0 0 16px 0;
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 500;
|
|
||||||
color: #666;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 加载状态 */
|
/* 加载状态 */
|
||||||
.loading-container {
|
.loading-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -512,15 +467,19 @@ onMounted(async () => {
|
|||||||
width: 32px;
|
width: 32px;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
border: 3px solid #f3f3f3;
|
border: 3px solid #f3f3f3;
|
||||||
border-top: 3px solid #8B5CF6;
|
border-top: 3px solid #8b5cf6;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
animation: spin 1s linear infinite;
|
animation: spin 1s linear infinite;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes spin {
|
@keyframes spin {
|
||||||
0% { transform: rotate(0deg); }
|
0% {
|
||||||
100% { transform: rotate(360deg); }
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 空数据状态 */
|
/* 空数据状态 */
|
||||||
@ -537,18 +496,12 @@ onMounted(async () => {
|
|||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.report-list {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 报告项目 */
|
/* 报告项目 */
|
||||||
.report-item {
|
.report-item {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.report-header {
|
.report-header {
|
||||||
@ -573,19 +526,19 @@ onMounted(async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.status-badge.in-progress {
|
.status-badge.in-progress {
|
||||||
background-color: #3B82F6;
|
background-color: #3b82f6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-badge.pending {
|
.status-badge.pending {
|
||||||
background-color: #EF4444;
|
background-color: #ef4444;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-badge.completed {
|
.status-badge.completed {
|
||||||
background-color: #10B981;
|
background-color: #10b981;
|
||||||
}
|
}
|
||||||
|
|
||||||
.status-badge.out-of-account {
|
.status-badge.out-of-account {
|
||||||
background-color: #9CA3AF;
|
background-color: #9ca3af;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 报告详情 */
|
/* 报告详情 */
|
||||||
@ -621,7 +574,7 @@ onMounted(async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.total-salary {
|
.total-salary {
|
||||||
color: #10B981 !important;
|
color: #10b981 !important;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -632,7 +585,7 @@ onMounted(async () => {
|
|||||||
gap: 4px;
|
gap: 4px;
|
||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
color: #8B5CF6;
|
color: #8b5cf6;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@ -640,7 +593,7 @@ onMounted(async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.more-btn:hover {
|
.more-btn:hover {
|
||||||
color: #7C3AED;
|
color: #7c3aed;
|
||||||
}
|
}
|
||||||
|
|
||||||
.arrow {
|
.arrow {
|
||||||
@ -795,40 +748,12 @@ onMounted(async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.time-value {
|
.time-value {
|
||||||
color: #10B981;
|
color: #10b981;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 帮助模态框样式 */
|
|
||||||
.help-modal-content {
|
|
||||||
background-color: white;
|
|
||||||
border-radius: 12px;
|
|
||||||
width: 90%;
|
|
||||||
max-width: 400px;
|
|
||||||
max-height: 80vh;
|
|
||||||
overflow: hidden;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
.help-modal-header {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
padding: 16px;
|
|
||||||
border-bottom: 1px solid #e5e7eb;
|
|
||||||
background-color: #f8f9fa;
|
|
||||||
}
|
|
||||||
|
|
||||||
.help-modal-header h3 {
|
|
||||||
margin: 0;
|
|
||||||
font-size: 18px;
|
|
||||||
font-weight: 600;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.help-modal-body {
|
.help-modal-body {
|
||||||
padding: 20px;
|
padding: 0 20px 20px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -875,7 +800,7 @@ onMounted(async () => {
|
|||||||
|
|
||||||
.status-number {
|
.status-number {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #8B5CF6;
|
color: #8b5cf6;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -895,11 +820,8 @@ onMounted(async () => {
|
|||||||
/* 弹窗样式 */
|
/* 弹窗样式 */
|
||||||
.modal-overlay {
|
.modal-overlay {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
inset: 0;
|
||||||
left: 0;
|
background-color: rgba(0, 0, 0, 0.5);
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
background-color: rgba(0,0,0,0.5);
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@ -907,6 +829,12 @@ onMounted(async () => {
|
|||||||
padding: 16px;
|
padding: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.modal-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
.modal {
|
.modal {
|
||||||
background: white;
|
background: white;
|
||||||
padding: 24px;
|
padding: 24px;
|
||||||
@ -949,7 +877,7 @@ onMounted(async () => {
|
|||||||
.modal button {
|
.modal button {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
background-color: #3B82F6;
|
background-color: #3b82f6;
|
||||||
color: white;
|
color: white;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
@ -959,6 +887,24 @@ onMounted(async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.modal button:active {
|
.modal button:active {
|
||||||
background-color: #2563EB;
|
background-color: #2563eb;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 360px) {
|
||||||
|
* {
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: 360px) {
|
||||||
|
* {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: 768px) {
|
||||||
|
* {
|
||||||
|
font-size: 24px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user