index.vue 63 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993
  1. <!-- 薪资统计(深色科技风)—— 对接 POST /hr/payroll/batches/statistics -->
  2. <template>
  3. <main class="salary-stat-view" v-loading="summaryLoading">
  4. <div class="fx-layer" aria-hidden="true">
  5. <span class="fx-orb fx-orb--a"></span>
  6. <span class="fx-orb fx-orb--b"></span>
  7. <span class="fx-orb fx-orb--c"></span>
  8. <span class="fx-scan"></span>
  9. <span class="fx-vignette"></span>
  10. <span class="fx-corner fx-corner--tl"></span>
  11. <span class="fx-corner fx-corner--tr"></span>
  12. <span class="fx-corner fx-corner--bl"></span>
  13. <span class="fx-corner fx-corner--br"></span>
  14. </div>
  15. <header class="stat-title">
  16. <div class="stat-title__wing stat-title__wing--left"><i></i><i></i><i></i></div>
  17. <div class="stat-title__frame">
  18. <span class="stat-title__shine"></span>
  19. <i class="stat-title__deco stat-title__deco--left"></i>
  20. <div class="stat-title__inner">
  21. <span class="stat-title__tag">SALARY ANALYTICS</span>
  22. <h1>薪资统计</h1>
  23. </div>
  24. <i class="stat-title__deco stat-title__deco--right"></i>
  25. </div>
  26. <div class="stat-title__wing stat-title__wing--right"><i></i><i></i><i></i></div>
  27. </header>
  28. <section class="stat-filter">
  29. <el-form :inline="true" label-width="80px" class="stat-filter-form" @submit.native.prevent>
  30. <!-- Y22:统计区间改为月份范围(后端 startMonth / endMonth 本就支持区间),趋势图随之可看季度 / 年度 -->
  31. <el-form-item label="统计区间">
  32. <el-date-picker v-model="where.statRange" type="monthrange" value-format="yyyy-MM" range-separator="~"
  33. start-placeholder="开始月份" end-placeholder="结束月份" clearable popper-class="dark-popper"
  34. style="width: 260px" />
  35. <span class="stat-filter__quick">
  36. <el-link type="primary" :underline="false" @click="quickRange('HALF_YEAR')">近 6 个月</el-link>
  37. <el-link type="primary" :underline="false" @click="quickRange('YEAR')">本年度</el-link>
  38. <el-link type="primary" :underline="false" @click="quickRange('ALL')">全部</el-link>
  39. </span>
  40. </el-form-item>
  41. <!-- 工资条明细接口只支持单个核算月份,故与统计区间分开,避免「区间被静默当成单月」 -->
  42. <el-form-item label="明细月份">
  43. <el-date-picker v-model="where.payrollMonth" type="month" value-format="yyyy-MM" placeholder="工资条明细按月筛选"
  44. clearable popper-class="dark-popper" style="width: 180px" />
  45. </el-form-item>
  46. <el-form-item label="所属机构">
  47. <el-select v-model="where.organizationId" filterable clearable popper-class="dark-popper" placeholder="请选择"
  48. style="width: 170px">
  49. <el-option v-for="item in legalEntities" :key="item.id" :label="item.name" :value="item.id" />
  50. </el-select>
  51. </el-form-item>
  52. <el-form-item label="所属部门">
  53. <el-select v-model="where.departmentId" filterable clearable popper-class="dark-popper" placeholder="按部门统计与筛明细"
  54. style="width: 170px">
  55. <el-option v-for="item in departmentOptions" :key="item.id" :label="item.name" :value="item.id" />
  56. </el-select>
  57. </el-form-item>
  58. <el-form-item label="工资条状态" label-width="90px">
  59. <el-select v-model="where.status" clearable popper-class="dark-popper" placeholder="请选择" style="width: 130px">
  60. <el-option v-for="item in payslipStatusOptions" :key="item.value" :label="item.label" :value="item.value" />
  61. </el-select>
  62. </el-form-item>
  63. <el-form-item>
  64. <el-button type="primary" icon="el-icon-search" @click="search">查询</el-button>
  65. <el-button icon="el-icon-refresh" @click="reset">重置</el-button>
  66. </el-form-item>
  67. </el-form>
  68. <p class="stat-filter__tip">
  69. <i class="el-icon-lock"></i>
  70. <!-- 文字必须包在单个 span 里:flex 容器会把裸文本拆成多个匿名 flex 项横向错开折行 -->
  71. <span>
  72. 数量 / 状态 / 完成率,以及<b>金额类指标(应发 / 实发 / 单位成本 / 人均)</b>均由服务端一次聚合返回
  73. (金额口径:仅计入已核算、已确认、已锁定批次)。
  74. <b>「所属部门」同时作用于上方汇总与下方明细</b>:汇总按核算时冻结的员工部门统计
  75. (自动包含全部下级部门);明细按工资条当前部门筛选,两者口径可能不完全一致。
  76. 到人的金额明细不在本页直接展示,需从明细行「查看金额」按需调取
  77. (按人金额受菜单权限与当前组织范围控制,无权查看时显示「***」)。
  78. </span>
  79. </p>
  80. </section>
  81. <section class="metric-grid">
  82. <article v-for="(card, index) in kpiCards" :key="card.key" class="metric-card"
  83. :class="[`metric-card--delay-${index}`, card.tone]">
  84. <span class="metric-card__border"></span>
  85. <span class="metric-card__scan"></span>
  86. <span class="metric-card__glow"></span>
  87. <span class="metric-card__corners" aria-hidden="true"></span>
  88. <span class="metric-icon">
  89. <span class="metric-icon__ring"></span>
  90. <span class="metric-icon__pulse"></span>
  91. <i :class="card.icon"></i>
  92. </span>
  93. <div class="metric-copy">
  94. <span class="metric-label">{{ card.label }}</span>
  95. <strong class="metric-value">{{ card.value }}<span v-if="card.unit" class="metric-unit">{{ card.unit
  96. }}</span></strong>
  97. </div>
  98. <span class="metric-card__code">0{{ index + 1 }}</span>
  99. </article>
  100. </section>
  101. <!--
  102. 金额类指标:★ 2026-10-09 后端已补金额聚合。
  103. POST /hr/payroll/batches/statistics 现返回「按状态 + 按月」的
  104. 应发 / 扣款 / 实发 / 单位成本金额,口径为**仅计入已核算、已确认或已锁定批次**
  105. (草稿与已取消批次不计入)。
  106. -->
  107. <section class="amount-panel">
  108. <div class="panel-header">
  109. <h2><em></em>金额类指标</h2>
  110. <span class="panel-sub">
  111. 口径:仅计入已核算 / 已确认 / 已锁定批次,草稿与已取消批次不计入
  112. </span>
  113. </div>
  114. <div class="amount-grid">
  115. <div v-for="item in amountMetrics" :key="item.key" class="amount-card">
  116. <span class="amount-card__label">{{ item.label }}</span>
  117. <span class="amount-card__value">{{ item.value }}</span>
  118. <span class="amount-card__hint">{{ item.hint }}</span>
  119. </div>
  120. </div>
  121. <div v-if="statusAmountRows.length" class="amount-status">
  122. <div class="amount-status__title">按批次状态拆分</div>
  123. <el-table :data="statusAmountRows" size="mini" border>
  124. <el-table-column prop="label" label="批次状态" min-width="110" />
  125. <el-table-column prop="grossText" label="应发合计" align="right" min-width="110" />
  126. <el-table-column prop="deductionText" label="扣款合计" align="right" min-width="110" />
  127. <el-table-column prop="netText" label="实发合计" align="right" min-width="110" />
  128. <el-table-column prop="costText" label="单位成本" align="right" min-width="110" />
  129. </el-table>
  130. </div>
  131. </section>
  132. <section class="panel-grid">
  133. <article class="panel">
  134. <span class="panel__corners" aria-hidden="true"></span>
  135. <span class="panel__scan"></span>
  136. <div class="panel-header">
  137. <h2><em></em>批次状态分布</h2>
  138. <span class="panel-sub">共 {{ fmtNum(summary.totalBatchCount) }} 个批次</span>
  139. </div>
  140. <div ref="batchChart" class="chart"></div>
  141. </article>
  142. <article class="panel">
  143. <span class="panel__corners" aria-hidden="true"></span>
  144. <span class="panel__scan"></span>
  145. <div class="panel-header">
  146. <h2><em></em>工资条状态分布</h2>
  147. <span class="panel-sub">已发布 {{ fmtNum(summary.publishedPayslipCount) }} · 已确认 {{
  148. fmtNum(summary.confirmedPayslipCount) }}</span>
  149. </div>
  150. <div ref="payslipChart" class="chart"></div>
  151. </article>
  152. <article class="panel trend-panel">
  153. <span class="panel__corners" aria-hidden="true"></span>
  154. <span class="panel__scan"></span>
  155. <div class="panel-header">
  156. <h2><em></em>月度核算趋势</h2>
  157. <span class="panel-sub">{{ statRangeText }} · 整体核算完成率 {{ completionRateText }}</span>
  158. </div>
  159. <div ref="trendChart" class="chart"></div>
  160. </article>
  161. </section>
  162. <section class="panel table-panel">
  163. <span class="panel__corners" aria-hidden="true"></span>
  164. <span class="panel__scan"></span>
  165. <div class="panel-header table-panel-header">
  166. <h2><em></em>工资条明细</h2>
  167. <el-button v-if="$hasPermission('hr:hrPayrollStat:export')" type="primary" icon="el-icon-download"
  168. size="small" plain @click="openExport">受控导出</el-button>
  169. </div>
  170. <div class="table-wrap">
  171. <ele-pro-table ref="table" :columns="columns" :datasource="datasource" row-key="id" :page-size="pageSize"
  172. highlight-current-row @columns-change="handleColumnChange" :cache-key="$tableCacheKey(cacheKeyUrl)">
  173. <template v-slot:status="{ row }">
  174. <el-tag size="mini" :type="getPayslipTagType(row.payslipStatus)">{{ row.payslipStatusLabel }}</el-tag>
  175. </template>
  176. <template v-slot:effective="{ row }">
  177. <el-tag size="mini" :type="row.currentEffective ? 'success' : 'info'">{{ row.currentEffectiveLabel
  178. }}</el-tag>
  179. </template>
  180. <template v-slot:action="{ row }">
  181. <el-link v-if="$hasPermission('hr:hrPayrollStat:viewAmount')" type="primary" :underline="false"
  182. icon="el-icon-view" :disabled="!row.resultId" @click="openDetail(row)">查看金额</el-link>
  183. </template>
  184. <template slot="empty"><el-empty description="暂无工资条数据" /></template>
  185. </ele-pro-table>
  186. </div>
  187. </section>
  188. <!-- 金额明细(受控薪资结果:GET /hr/payroll/batches/results/{resultId}) -->
  189. <el-dialog title="工资条金额明细" :visible.sync="detailVisible" width="820px" append-to-body :close-on-click-modal="false"
  190. custom-class="salary-stat-dialog">
  191. <div v-loading="detailLoading" class="slip-detail">
  192. <el-alert type="info" :closable="false" show-icon
  193. title="金额字段受菜单权限与当前组织范围控制:显示「***」表示当前无权查看,显示「—」表示该员工该月尚未录入,不是 0。" />
  194. <div class="slip-detail-head">
  195. <span class="slip-detail-name">{{ detailResult?.employeeName || detailRow?.employeeName || '-' }}</span>
  196. <span class="slip-detail-meta">
  197. {{ detailRow?.payrollMonth || '' }}
  198. <template v-if="detailRow?.batchNo"> · {{ detailRow.batchNo }}</template>
  199. <template v-if="detailResult?.resultVersion"> · 版本 v{{ detailResult.resultVersion }}</template>
  200. </span>
  201. <el-button size="mini" icon="el-icon-refresh" :loading="detailLoading" @click="loadDetail">重新获取</el-button>
  202. </div>
  203. <el-descriptions :column="3" border size="small">
  204. <el-descriptions-item label="基本工资">{{ fmtMoney(detailResult?.basicAmount) }}</el-descriptions-item>
  205. <el-descriptions-item label="岗位工资">{{ fmtMoney(detailResult?.positionAmount) }}</el-descriptions-item>
  206. <el-descriptions-item label="绩效工资">{{ fmtMoney(detailResult?.performanceAmount) }}</el-descriptions-item>
  207. <el-descriptions-item label="津贴补贴">{{ fmtMoney(detailResult?.allowanceAmount) }}</el-descriptions-item>
  208. <el-descriptions-item label="奖金">{{ fmtMoney(detailResult?.bonusAmount) }}</el-descriptions-item>
  209. <el-descriptions-item label="应发工资">{{ fmtMoney(detailResult?.grossAmount) }}</el-descriptions-item>
  210. <el-descriptions-item label="扣款合计">{{ fmtMoney(detailResult?.deductionAmount) }}</el-descriptions-item>
  211. <el-descriptions-item label="实发工资">{{ fmtMoney(detailResult?.netAmount) }}</el-descriptions-item>
  212. <el-descriptions-item label="企业用工成本">{{ fmtMoney(detailResult?.employerCost) }}</el-descriptions-item>
  213. </el-descriptions>
  214. <el-table :data="detailResult?.itemDetails || []" size="mini" border class="slip-detail-table"
  215. empty-text="暂无薪资项目明细">
  216. <el-table-column type="index" label="序号" width="60" align="center" />
  217. <el-table-column label="项目名称" min-width="150">
  218. <template slot-scope="scope">{{ scope.row.itemName }}</template>
  219. </el-table-column>
  220. <el-table-column label="项目编码" min-width="130">
  221. <template slot-scope="scope">{{ scope.row.itemCode || '-' }}</template>
  222. </el-table-column>
  223. <el-table-column label="方向" width="110" align="center">
  224. <template slot-scope="scope">{{ salaryItemTypeLabel(scope.row.itemType) }}</template>
  225. </el-table-column>
  226. <el-table-column label="金额" width="120" align="right">
  227. <template slot-scope="scope">{{ fmtMoney(scope.row.finalAmount) }}</template>
  228. </el-table-column>
  229. <el-table-column label="计算轨迹" min-width="180">
  230. <template slot-scope="scope">{{ scope.row.calculationTrace || '-' }}</template>
  231. </el-table-column>
  232. </el-table>
  233. </div>
  234. </el-dialog>
  235. <!-- 受控导出(批次维度;契约 body 只有 reason,仅审批锁定批次可导出) -->
  236. <el-dialog title="受控导出薪资结果" :visible.sync="exportVisible" width="520px" append-to-body :close-on-click-modal="false"
  237. custom-class="salary-stat-dialog">
  238. <el-alert type="warning" :closable="false" show-icon
  239. title="导出仅支持审批锁定的批次,生成与下载都会写入审计。" />
  240. <el-form label-width="110px" class="export-form">
  241. <el-form-item label="薪资批次" required>
  242. <el-select v-model="exportForm.batchId" filterable popper-class="dark-popper" placeholder="请选择审批锁定的批次"
  243. style="width: 100%">
  244. <el-option v-for="item in batchOptions" :key="item.id"
  245. :label="`${item.batchNo || item.id} · ${item.payrollMonth || '-'} · ${item.batchStatusLabel}`"
  246. :value="String(item.id)" />
  247. </el-select>
  248. <div class="export-hint">
  249. 下拉已按「审批锁定」过滤(服务端筛选 + 翻页取全),共 {{ batchOptions.length }} 个可导出批次。
  250. </div>
  251. </el-form-item>
  252. <el-form-item label="导出原因" required>
  253. <el-input v-model.trim="exportForm.reason" maxlength="200" show-word-limit placeholder="请填写导出业务原因(写入审计)" />
  254. </el-form-item>
  255. </el-form>
  256. <template slot="footer">
  257. <el-button @click="exportVisible = false">取消</el-button>
  258. <el-button type="primary" :loading="exportLoading" @click="submitExport">确认导出</el-button>
  259. </template>
  260. </el-dialog>
  261. </main>
  262. </template>
  263. <script>
  264. import * as echarts from 'echarts';
  265. import tabMixins from '@/mixins/tableColumnsMixin';
  266. /* 机构选项取登录缓存;组织列表接口仅用于「部门」选项 */
  267. import { listOrganizations } from '@/api/system/organization';
  268. import { getOrgOptions, getCurrentOrgId } from '@/utils/current-org';
  269. import { getPayrollStatistics, toPieData } from '@/api/salary/statistics';
  270. /* 薪资项目方向字典(Y22/Y13:明细方向列不再直接显示 EARNING 这类原始枚举值) */
  271. import { salaryItemTypeLabel } from '@/api/salary/fieldSetting';
  272. import {
  273. getSalarySlipPageList, getSalarySlipDetail, exportSalarySlip, getBatchPageList,
  274. normalizeBatchStatus, PAYSLIP_STATUS_OPTIONS
  275. } from '@/api/salary/salarySlip';
  276. import { download } from '@/utils/file';
  277. const PIE_COLORS = ['#00eaff', '#7af0ff', '#2cffb0', '#ffb020', '#ff7a59', '#9d8cff', '#4aa8ff'];
  278. export default {
  279. name: 'SalaryStat',
  280. mixins: [tabMixins],
  281. data() {
  282. return {
  283. where: { statRange: [], payrollMonth: '', organizationId: '', departmentId: '', status: '' },
  284. legalEntities: [], departmentOptions: [],
  285. // 默认公司(当前登录用户所在法人):加载组织后计算一次,初始化与重置共用
  286. defaultOrganizationId: '',
  287. payslipStatusOptions: PAYSLIP_STATUS_OPTIONS,
  288. summary: {}, summaryLoading: false,
  289. pageSize: this.$store.state.tablePageSize || 20,
  290. cacheKeyUrl: 'salary-stat-dashboard',
  291. charts: {}, resizeObserver: null, resizeFrame: null,
  292. detailVisible: false, detailLoading: false, detailRow: null, detailResult: null,
  293. exportVisible: false, exportLoading: false,
  294. batchOptions: [],
  295. exportForm: { batchId: '', reason: '' },
  296. columns: [
  297. { label: '序号', type: 'index', width: 55, align: 'center' },
  298. { prop: 'batchNo', label: '批次单号', showOverflowTooltip: true, align: 'left', minWidth: 150 },
  299. { prop: 'employeeName', label: '姓名', showOverflowTooltip: true, align: 'left', minWidth: 100 },
  300. { prop: 'payrollMonth', label: '核算月份', showOverflowTooltip: true, align: 'center', minWidth: 100 },
  301. { columnKey: 'status', label: '工资条状态', width: 120, align: 'center', slot: 'status' },
  302. { prop: 'resultVersion', label: '结果版本', width: 95, align: 'center', formatter: (row) => (row.resultVersion == null ? '—' : `v${row.resultVersion}`) },
  303. { prop: 'versionNo', label: '工资条版本', width: 105, align: 'center', formatter: (row) => (row.versionNo == null ? '—' : `v${row.versionNo}`) },
  304. { columnKey: 'effective', label: '版本状态', width: 105, align: 'center', slot: 'effective' },
  305. { prop: 'publishTime', label: '发布时间', showOverflowTooltip: true, align: 'left', minWidth: 150, formatter: (row) => this.fmtDateTime(row.publishTime) },
  306. { prop: 'confirmTime', label: '确认时间', showOverflowTooltip: true, align: 'left', minWidth: 150, formatter: (row) => this.fmtDateTime(row.confirmTime) },
  307. { columnKey: 'action', label: '操作', width: 110, align: 'center', slot: 'action' }
  308. ]
  309. };
  310. },
  311. computed: {
  312. styleResponsive() { return this.$store.state.theme?.styleResponsive !== false; },
  313. kpiCards() {
  314. const s = this.summary || {};
  315. const rate = Number(s.calculationCompletionRate);
  316. const hasRate = Number.isFinite(rate);
  317. return [
  318. { key: 'batch', label: '核算批次数', value: this.fmtNum(s.totalBatchCount), icon: 'el-icon-files', tone: '' },
  319. { key: 'employee', label: '期望核算人数', value: this.fmtNum(s.totalEmployeeCount), icon: 'el-icon-user', tone: '' },
  320. { key: 'calculated', label: '已核算人数', value: this.fmtNum(s.totalCalculatedEmployeeCount), icon: 'el-icon-circle-check', tone: '' },
  321. {
  322. key: 'rate',
  323. label: '核算完成率',
  324. value: hasRate ? rate.toFixed(2) : '—',
  325. unit: hasRate ? '%' : '',
  326. icon: 'el-icon-data-line',
  327. tone: 'metric-card--orange'
  328. },
  329. { key: 'exception', label: '未关闭异常', value: this.fmtNum(s.openExceptionCount), icon: 'el-icon-warning-outline', tone: '' }
  330. ];
  331. },
  332. /**
  333. * 金额类指标(★ 2026-10-09 后端已补聚合金额,不再是占位)。
  334. * 取不到时显示「—」而不是 0 —— 避免把「无权限/无数据」误读成「金额为 0」。
  335. */
  336. amountMetrics() {
  337. const s = this.summary || {};
  338. return [
  339. {
  340. key: 'gross',
  341. label: '应发工资总额',
  342. value: this.moneyText(s.totalGrossAmount),
  343. hint: '已核算 / 确认 / 锁定批次汇总'
  344. },
  345. {
  346. key: 'net',
  347. label: '实发工资总额',
  348. value: this.moneyText(s.totalNetAmount),
  349. hint: `已确认工资条 ${this.fmtNum(s.confirmedPayslipCount)} 条`
  350. },
  351. {
  352. key: 'cost',
  353. label: '企业用工成本',
  354. value: this.moneyText(s.totalEmployerCostAmount),
  355. hint: '含企业承担的社保公积金等'
  356. },
  357. {
  358. key: 'avg',
  359. label: '人均应发工资',
  360. value: this.moneyText(s.averageGrossAmount),
  361. hint: `应发合计 ÷ 可计入金额批次的结果员工数(${this.fmtNum(s.amountCalculatedEmployeeCount)} 人)`
  362. }
  363. ];
  364. },
  365. /** 按批次状态拆分的金额(后端 batchStatusAmounts) */
  366. statusAmountRows() {
  367. const list = (this.summary && this.summary.batchStatusAmounts) || [];
  368. return list.map((row) => ({
  369. ...row,
  370. grossText: this.fmtMoney(row.grossAmount),
  371. deductionText: this.fmtMoney(row.deductionAmount),
  372. netText: this.fmtMoney(row.netAmount),
  373. costText: this.fmtMoney(row.employerCostAmount)
  374. }));
  375. },
  376. /** 当前统计区间文案,用于趋势图副标题 */
  377. statRangeText() {
  378. const [from, to] = this.where.statRange || [];
  379. if (from && to) return from === to ? from : `${from} ~ ${to}`;
  380. if (from) return `${from} 起`;
  381. return '全部可见月份';
  382. },
  383. /**
  384. * 整体核算完成率文案。
  385. * 复测 P1-8:接口失败 / 无权限时 summary 为空,这里必须显示「—」,
  386. * 不能显示 0.00% —— 否则会把「取不到」误读成「真实完成率为 0」。
  387. */
  388. completionRateText() {
  389. const num = Number(this.summary?.calculationCompletionRate);
  390. return Number.isFinite(num) ? `${num.toFixed(2)}%` : '—';
  391. }
  392. },
  393. mounted() {
  394. this.observeResize();
  395. this.initFilter();
  396. },
  397. beforeDestroy() {
  398. Object.values(this.charts).forEach((c) => c && c.dispose());
  399. if (this.resizeObserver) this.resizeObserver.disconnect();
  400. if (this.resizeFrame) cancelAnimationFrame(this.resizeFrame);
  401. /* 复测 P2-7:不支持 ResizeObserver 的环境走 window.resize 兜底,销毁时必须解绑,
  402. 否则反复进出页面会累积监听器 */
  403. window.removeEventListener('resize', this.resizeCharts);
  404. },
  405. methods: {
  406. /* 初始化:先确定默认公司(当前用户所在法人)再加载数据,避免首屏用空条件查询 */
  407. async initFilter() {
  408. await this.loadOrganizations();
  409. this.search();
  410. },
  411. /**
  412. * 数量类格式化:取不到(接口失败 / 字段缺失 / 无权限)一律显示「—」。
  413. * 复测 P1-8:原来 return '0',接口 403 或加载失败时页面显示
  414. * 「核算批次数 0、期望核算人数 0、完成率 0.00%」,会被当成真实业务量为 0。
  415. */
  416. fmtNum(val) {
  417. const num = Number(val);
  418. if (!Number.isFinite(num)) return '—';
  419. return num.toLocaleString('zh-CN');
  420. },
  421. /** 金额:脱敏字符串原样展示,null/空值给 — */
  422. fmtMoney(val) {
  423. if (val === null || val === undefined || val === '') return '—';
  424. const num = Number(val);
  425. if (!Number.isFinite(num)) return String(val);
  426. return num.toLocaleString('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 });
  427. },
  428. /** 带 ¥ 的金额文本;取不到仍是「—」(不能变成 ¥ 0.00) */
  429. moneyText(val) {
  430. const text = this.fmtMoney(val);
  431. return text === '—' ? '—' : `¥ ${text}`;
  432. },
  433. fmtDateTime(val) {
  434. if (!val) return '—';
  435. return String(val).replace('T', ' ').slice(0, 16);
  436. },
  437. getPayslipTagType(status) {
  438. const hit = PAYSLIP_STATUS_OPTIONS.find((item) => item.value === status);
  439. return hit ? hit.tagType : 'info';
  440. },
  441. async loadOrganizations() {
  442. try {
  443. /* 所属机构选项:登录缓存 loginChangeGroupVOList(不再调组织列表接口) */
  444. this.legalEntities = getOrgOptions();
  445. /* 部门选项仍需组织列表按父级筛选 */
  446. const list = await listOrganizations().catch(() => []);
  447. const records = Array.isArray(list) ? list : [];
  448. const parents = new Map(records.map((item) => [String(item.id), item]));
  449. this.departmentOptions = records
  450. .filter((item) => parents.has(String(item.parentId || 0)))
  451. .map((item) => ({ id: item.id, name: item.name }));
  452. // 默认公司 = 当前登录用户所在的所属机构(与后端薪资数据范围校验口径一致)
  453. this.defaultOrganizationId =
  454. getCurrentOrgId() || this.legalEntities[0]?.id || '';
  455. if (!this.where.organizationId && this.defaultOrganizationId) {
  456. this.where.organizationId = this.defaultOrganizationId;
  457. }
  458. } catch (error) {
  459. console.error('加载组织架构失败', error);
  460. }
  461. },
  462. /** 统计条件:月份区间同时作为统计起止月(公司未选时回落到用户所在机构) */
  463. statQuery() {
  464. const [from, to] = this.where.statRange || [];
  465. return {
  466. companyId: this.where.organizationId || this.defaultOrganizationId || undefined,
  467. /* ★ C6:后端已支持按部门汇总(核算时冻结的员工部门,自动含下级部门) */
  468. deptId: this.where.departmentId || undefined,
  469. startMonth: from || undefined,
  470. endMonth: to || from || undefined
  471. };
  472. },
  473. /**
  474. * 快捷区间(Y22):近 6 个月 / 本年度 / 全部。
  475. * 用本地日期算边界,避免手写月份字符串出错。
  476. */
  477. quickRange(type) {
  478. const now = new Date();
  479. const pad = (n) => String(n).padStart(2, '0');
  480. const fmt = (y, m) => `${y}-${pad(m)}`;
  481. if (type === 'ALL') {
  482. this.where.statRange = [];
  483. } else if (type === 'YEAR') {
  484. this.where.statRange = [fmt(now.getFullYear(), 1), fmt(now.getFullYear(), now.getMonth() + 1)];
  485. } else {
  486. const start = new Date(now.getFullYear(), now.getMonth() - 5, 1);
  487. this.where.statRange = [
  488. fmt(start.getFullYear(), start.getMonth() + 1),
  489. fmt(now.getFullYear(), now.getMonth() + 1)
  490. ];
  491. }
  492. this.search();
  493. },
  494. async loadSummary() {
  495. const query = this.statQuery();
  496. /* 所属机构未就绪时不请求,避免后端「必须指定所属机构」校验失败 */
  497. if (!query.companyId) {
  498. this.summary = {};
  499. return;
  500. }
  501. this.summaryLoading = true;
  502. try {
  503. this.summary = await getPayrollStatistics(query);
  504. } catch (error) {
  505. this.summary = {};
  506. console.error('加载薪资统计汇总失败', error);
  507. this.$message.error(error.message || '加载统计汇总失败');
  508. } finally {
  509. this.summaryLoading = false;
  510. this.$nextTick(() => this.initCharts());
  511. }
  512. },
  513. async initCharts() {
  514. await this.$nextTick();
  515. if (!this.$refs.batchChart || !this.$refs.payslipChart || !this.$refs.trendChart) return;
  516. this.charts.batch = this.ensureChart('batchChart', this.charts.batch);
  517. this.charts.payslip = this.ensureChart('payslipChart', this.charts.payslip);
  518. this.charts.trend = this.ensureChart('trendChart', this.charts.trend);
  519. Object.values(this.charts).forEach((chart) => chart && chart.resize());
  520. this.renderBatchChart();
  521. this.renderPayslipChart();
  522. this.renderTrendChart();
  523. },
  524. ensureChart(refName, instance) {
  525. const el = this.$refs[refName];
  526. if (!el) return instance;
  527. const existing = echarts.getInstanceByDom(el);
  528. if (existing) return existing;
  529. if (instance && !instance.isDisposed()) instance.dispose();
  530. return echarts.init(el);
  531. },
  532. observeResize() {
  533. if (window.ResizeObserver) {
  534. this.resizeObserver = new ResizeObserver(() => {
  535. cancelAnimationFrame(this.resizeFrame);
  536. this.resizeFrame = requestAnimationFrame(this.resizeCharts);
  537. });
  538. if (this.$el) this.resizeObserver.observe(this.$el);
  539. } else {
  540. window.addEventListener('resize', this.resizeCharts);
  541. }
  542. },
  543. resizeCharts() {
  544. Object.values(this.charts).forEach((chart) => {
  545. if (chart && !chart.isDisposed() && chart.getDom()?.offsetParent) chart.resize();
  546. });
  547. },
  548. tooltipStyle() {
  549. return {
  550. backgroundColor: 'rgba(4, 18, 36, .94)',
  551. borderColor: 'rgba(0, 210, 255, .35)',
  552. borderWidth: 1,
  553. padding: [9, 12],
  554. textStyle: { color: '#e8f7ff', fontSize: 12 },
  555. extraCssText: 'border-radius:4px;box-shadow:0 0 18px rgba(0,180,255,.18)'
  556. };
  557. },
  558. emptyOption(text) {
  559. return {
  560. title: {
  561. text, left: 'center', top: 'middle',
  562. textStyle: { color: '#6f97b0', fontSize: 13, fontWeight: 'normal' }
  563. }
  564. };
  565. },
  566. /** 环形图公共配置(批次状态 / 工资条状态) */
  567. pieOption(data) {
  568. return {
  569. color: PIE_COLORS,
  570. tooltip: { trigger: 'item', formatter: '{b}: {c} 条 ({d}%)', ...this.tooltipStyle() },
  571. legend: {
  572. orient: 'vertical', right: 10, top: 'center', icon: 'circle',
  573. itemWidth: 10, itemHeight: 10, textStyle: { color: '#8fc4de', fontSize: 12 }
  574. },
  575. series: [{
  576. type: 'pie', radius: ['45%', '70%'], center: ['36%', '50%'],
  577. avoidLabelOverlap: true,
  578. itemStyle: { borderRadius: 6, borderColor: 'rgba(3,20,40,0.9)', borderWidth: 2 },
  579. label: { show: false },
  580. emphasis: {
  581. label: { show: true, fontSize: 14, fontWeight: 'bold', formatter: '{b}\n{c}', color: '#e4f6ff' }
  582. },
  583. data
  584. }]
  585. };
  586. },
  587. renderBatchChart() {
  588. const chart = this.charts.batch;
  589. if (!chart) return;
  590. const data = toPieData(this.summary.batchStatusDistribution);
  591. chart.setOption(data.length ? this.pieOption(data) : this.emptyOption('暂无批次数据'), true);
  592. },
  593. renderPayslipChart() {
  594. const chart = this.charts.payslip;
  595. if (!chart) return;
  596. const data = toPieData(this.summary.payslipStatusDistribution);
  597. chart.setOption(data.length ? this.pieOption(data) : this.emptyOption('暂无工资条数据'), true);
  598. },
  599. renderTrendChart() {
  600. const chart = this.charts.trend;
  601. if (!chart) return;
  602. const trend = Array.isArray(this.summary.monthlyCalculationTrend)
  603. ? this.summary.monthlyCalculationTrend
  604. : [];
  605. if (!trend.length) {
  606. chart.setOption(this.emptyOption('暂无月度核算数据'), true);
  607. return;
  608. }
  609. const months = trend.map((item) => item.payrollMonth || '-');
  610. chart.setOption({
  611. color: ['#00eaff', '#2cffb0', '#ffb020'],
  612. tooltip: {
  613. trigger: 'axis',
  614. axisPointer: { type: 'shadow', shadowStyle: { color: 'rgba(0,200,255,0.08)' } },
  615. ...this.tooltipStyle()
  616. },
  617. legend: {
  618. top: 0, right: 10, icon: 'roundRect', itemWidth: 12, itemHeight: 8,
  619. textStyle: { color: '#8fc4de', fontSize: 12 }
  620. },
  621. grid: { top: 44, right: 56, bottom: 34, left: 52 },
  622. xAxis: {
  623. type: 'category', data: months,
  624. axisLine: { lineStyle: { color: 'rgba(0,220,255,.45)' } },
  625. axisTick: { show: false },
  626. axisLabel: { color: '#8fd0ef', fontSize: 11 }
  627. },
  628. yAxis: [{
  629. type: 'value', name: '人数',
  630. nameTextStyle: { color: '#6fa9c8', fontSize: 11 },
  631. axisLine: { show: false }, axisTick: { show: false },
  632. axisLabel: { color: '#6fa9c8', fontSize: 10 },
  633. splitLine: { lineStyle: { color: 'rgba(0,190,255,.14)', type: 'dashed' } }
  634. }, {
  635. type: 'value', name: '完成率', max: 100, min: 0,
  636. nameTextStyle: { color: '#6fa9c8', fontSize: 11 },
  637. axisLine: { show: false }, axisTick: { show: false },
  638. axisLabel: { color: '#6fa9c8', fontSize: 10, formatter: '{value}%' },
  639. splitLine: { show: false }
  640. }],
  641. series: [
  642. {
  643. name: '期望核算人数', type: 'bar', barMaxWidth: 26,
  644. data: trend.map((item) => item.employeeCount),
  645. itemStyle: {
  646. borderRadius: [3, 3, 0, 0],
  647. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  648. { offset: 0, color: '#00eaff' }, { offset: 1, color: 'rgba(0,120,200,0.3)' }
  649. ])
  650. }
  651. },
  652. {
  653. name: '已核算人数', type: 'bar', barMaxWidth: 26,
  654. data: trend.map((item) => item.calculatedEmployeeCount),
  655. itemStyle: {
  656. borderRadius: [3, 3, 0, 0],
  657. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  658. { offset: 0, color: '#2cffb0' }, { offset: 1, color: 'rgba(0,150,120,0.28)' }
  659. ])
  660. }
  661. },
  662. {
  663. name: '核算完成率', type: 'line', yAxisIndex: 1, smooth: true, symbolSize: 6,
  664. data: trend.map((item) => item.calculationCompletionRate),
  665. lineStyle: { width: 2, color: '#ffb020' },
  666. itemStyle: { color: '#ffb020' }
  667. }
  668. ]
  669. }, true);
  670. },
  671. async datasource({ page, limit, where, order }) {
  672. /* 表格首屏可能早于「所属机构」就绪触发:用页面默认机构兜底,避免空参数请求被后端拒绝 */
  673. const companyId = (where || {}).companyId || this.where.organizationId || this.defaultOrganizationId;
  674. if (!companyId) {
  675. return { list: [], total: 0, count: 0 };
  676. }
  677. try {
  678. return await getSalarySlipPageList({
  679. ...(where || {}),
  680. companyId,
  681. ...(order || {}),
  682. pageNum: page,
  683. size: limit
  684. });
  685. } catch (error) {
  686. console.error('加载工资条列表失败', error);
  687. this.$message.error(error.message || '加载工资条列表失败');
  688. return { list: [], total: 0 };
  689. }
  690. },
  691. tableWhere() {
  692. return {
  693. payrollMonth: this.where.payrollMonth,
  694. companyId: this.where.organizationId,
  695. deptId: this.where.departmentId,
  696. payslipStatus: this.where.status
  697. };
  698. },
  699. search() {
  700. this.loadSummary();
  701. this.$refs.table.reload({ page: 1, where: this.tableWhere() });
  702. },
  703. reset() {
  704. // 重置后回到默认公司(当前用户所在法人),统计区间回到「全部可见月份」
  705. this.where = {
  706. statRange: [],
  707. payrollMonth: '',
  708. organizationId: this.defaultOrganizationId || '',
  709. departmentId: '',
  710. status: ''
  711. };
  712. this.search();
  713. },
  714. /* ---------------- 金额明细(受控薪资结果) ---------------- */
  715. openDetail(row) {
  716. if (!row?.resultId) {
  717. this.$message.warning('该工资条暂无薪资结果主键,无法查看金额');
  718. return;
  719. }
  720. this.detailVisible = true;
  721. this.detailRow = row;
  722. this.detailResult = null;
  723. this.loadDetail();
  724. },
  725. async loadDetail() {
  726. const row = this.detailRow;
  727. if (!row?.resultId) return;
  728. this.detailLoading = true;
  729. try {
  730. /* 契约:GET /hr/payroll/batches/results/{resultId} 只有 path 参数,无 query */
  731. this.detailResult = await getSalarySlipDetail(row.resultId);
  732. } catch (error) {
  733. this.detailResult = null;
  734. this.$message.error(error.message || '加载金额明细失败');
  735. } finally {
  736. this.detailLoading = false;
  737. }
  738. },
  739. /* ---------------- 受控导出(契约 body 只有 reason;仅审批锁定批次可导出) ---------------- */
  740. /**
  741. * P0-3:可导出判定必须走状态归一。
  742. * 模板状态后端就是返回中文的,批次状态此前直接比对英文字符串 ——
  743. * 一旦后端同款返回中文,这里的本地二次过滤会把**所有**批次都过滤掉,
  744. * 「受控导出」的批次下拉永远是空的。
  745. *
  746. * ★ 2026-10-10:后端已给出稳定枚举,其中 `APPROVED` 是「审批锁定」的**历史兼容值**
  747. * (此前曾被别名归一到 APPROVED_LOCKED)。归一表不再把 APPROVED 并进 APPROVED_LOCKED,
  748. * 故这里显式把 APPROVED 一并算作可导出,历史批次不会从下拉里消失。
  749. */
  750. isExportable(batch) {
  751. const status = normalizeBatchStatus(batch?.batchStatus);
  752. return status === 'APPROVED_LOCKED' || status === 'APPROVED';
  753. },
  754. /** 按状态翻页取全(每页 200,最多 50 页);batchStatus 传空表示不带状态下发 */
  755. async fetchBatchPages(companyId, batchStatus) {
  756. const size = 200;
  757. const maxPages = 50;
  758. const list = [];
  759. for (let pageNum = 1; pageNum <= maxPages; pageNum += 1) {
  760. const page = await getBatchPageList({
  761. companyId,
  762. batchStatus,
  763. pageNum,
  764. size,
  765. sortName: 'createTime',
  766. orderBy: 'descending'
  767. });
  768. const chunk = page.list || [];
  769. list.push(...chunk);
  770. const total = Number(page.count ?? page.total ?? list.length);
  771. if (!chunk.length || chunk.length < size || list.length >= total) break;
  772. }
  773. return list;
  774. },
  775. /**
  776. * 导出批次下拉数据。
  777. * 复测 P2-8:原实现固定 `size: 100` 且不按状态过滤 —— 批次超过 100 条时会误报
  778. * 「没有审批锁定的批次」。
  779. *
  780. * P0-3:先按状态下发(快);**若筛完为空,再不带状态条件取一遍**并本地归一过滤。
  781. * 这样后端状态口径不管是中文还是英文都能取到数据,
  782. * 不会因为「筛选值口径猜错」把导出功能整条静默关掉。
  783. */
  784. async loadExportableBatches() {
  785. const companyId = this.where.organizationId || this.defaultOrganizationId;
  786. if (!companyId) return [];
  787. const filtered = (await this.fetchBatchPages(companyId, 'APPROVED_LOCKED')).filter((item) =>
  788. this.isExportable(item)
  789. );
  790. if (filtered.length) return filtered;
  791. /* 服务端筛选为空:退回「不带状态」再取一次,避免口径不一致导致下拉永远为空 */
  792. const all = await this.fetchBatchPages(companyId, undefined);
  793. return all.filter((item) => this.isExportable(item));
  794. },
  795. async openExport() {
  796. this.exportForm = { batchId: '', reason: '' };
  797. this.exportVisible = true;
  798. try {
  799. this.batchOptions = await this.loadExportableBatches();
  800. if (!this.batchOptions.length) {
  801. this.$message.warning(
  802. '当前法人范围内没有「审批锁定」的批次,后端不允许导出(如果确认存在已锁定批次,请把该批次状态告知管理员核对口径)'
  803. );
  804. } else if (this.batchOptions.length === 1) {
  805. this.exportForm.batchId = String(this.batchOptions[0].id);
  806. }
  807. } catch (error) {
  808. this.batchOptions = [];
  809. this.$message.error(error.message || '加载薪资批次失败');
  810. }
  811. },
  812. async submitExport() {
  813. const form = this.exportForm;
  814. if (!form.batchId) {
  815. this.$message.warning('请选择要导出的薪资批次');
  816. return;
  817. }
  818. if (!String(form.reason || '').trim()) {
  819. this.$message.warning('请填写导出原因');
  820. return;
  821. }
  822. const batch = this.batchOptions.find((item) => String(item.id) === String(form.batchId));
  823. if (!batch || !this.isExportable(batch)) {
  824. this.$message.warning('仅审批锁定的批次可导出,请更换批次');
  825. return;
  826. }
  827. this.exportLoading = true;
  828. try {
  829. /* 契约 body 只有 reason;失败时 API 层已识别 JSON 错误体并抛出业务错误 */
  830. const data = await exportSalarySlip({
  831. batchId: form.batchId,
  832. reason: String(form.reason).trim()
  833. });
  834. download(data, `薪资结果_${batch.batchNo || form.batchId}.xlsx`);
  835. this.exportVisible = false;
  836. this.$message.success('导出任务已提交并记录审计');
  837. } catch (error) {
  838. this.$message.error(error.message || '导出失败');
  839. } finally {
  840. this.exportLoading = false;
  841. }
  842. }
  843. }
  844. };
  845. </script>
  846. <style src="../../../styles/views/HomeView.scss" scoped lang="scss"></style>
  847. <style lang="scss" scoped>
  848. .salary-stat-view {
  849. --bg: #000912;
  850. --panel: rgba(3, 20, 40, 0.72);
  851. --cyan: #00eaff;
  852. --orange: #ffb020;
  853. --text: #e4f6ff;
  854. --muted: #6f97b0;
  855. position: relative;
  856. box-sizing: border-box;
  857. display: grid;
  858. grid-template-rows: repeat(6, auto);
  859. gap: 14px;
  860. min-height: calc(100vh - 104px);
  861. padding: 16px 20px 18px;
  862. overflow-x: hidden;
  863. color: var(--text);
  864. background:
  865. radial-gradient(ellipse 70% 42% at 50% -8%, rgba(0, 150, 220, 0.28), transparent 58%),
  866. radial-gradient(ellipse 38% 32% at 92% 18%, rgba(0, 100, 180, 0.2), transparent 62%),
  867. radial-gradient(ellipse 34% 28% at 6% 78%, rgba(0, 80, 140, 0.18), transparent 60%),
  868. linear-gradient(180deg, #001526 0%, var(--bg) 42%, #00060d 100%);
  869. }
  870. /* 标题 */
  871. .stat-title {
  872. position: relative;
  873. z-index: 1;
  874. display: flex;
  875. flex-wrap: wrap;
  876. align-items: center;
  877. justify-content: center;
  878. gap: 0 10px;
  879. animation: hr-fade-up 0.7s ease both;
  880. }
  881. .stat-title__wing {
  882. display: flex;
  883. align-items: center;
  884. gap: 5px;
  885. opacity: 0.85;
  886. }
  887. .stat-title__wing i {
  888. display: block;
  889. height: 2px;
  890. background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  891. box-shadow: 0 0 10px rgba(0, 230, 255, 0.65);
  892. animation: hr-breathe 3s ease-in-out infinite;
  893. }
  894. .stat-title__wing--left i:nth-child(1) {
  895. width: 54px;
  896. }
  897. .stat-title__wing--left i:nth-child(2) {
  898. width: 28px;
  899. animation-delay: 0.3s;
  900. }
  901. .stat-title__wing--left i:nth-child(3) {
  902. width: 12px;
  903. height: 12px;
  904. border: 1px solid var(--cyan);
  905. transform: rotate(45deg);
  906. box-shadow: 0 0 12px rgba(0, 230, 255, 0.7);
  907. }
  908. .stat-title__wing--right {
  909. flex-direction: row-reverse;
  910. }
  911. .stat-title__wing--right i:nth-child(1) {
  912. width: 54px;
  913. }
  914. .stat-title__wing--right i:nth-child(2) {
  915. width: 28px;
  916. animation-delay: 0.3s;
  917. }
  918. .stat-title__wing--right i:nth-child(3) {
  919. width: 12px;
  920. height: 12px;
  921. border: 1px solid var(--cyan);
  922. transform: rotate(45deg);
  923. box-shadow: 0 0 12px rgba(0, 230, 255, 0.7);
  924. }
  925. .stat-title__frame {
  926. position: relative;
  927. display: flex;
  928. align-items: center;
  929. justify-content: center;
  930. min-width: min(420px, 78vw);
  931. min-height: 58px;
  932. padding: 6px 52px 8px;
  933. overflow: hidden;
  934. background: linear-gradient(180deg, rgba(0, 90, 140, 0.55), rgba(0, 28, 55, 0.25) 55%, rgba(0, 40, 70, 0.4));
  935. clip-path: polygon(34px 0, calc(100% - 34px) 0, 100% 50%, calc(100% - 34px) 100%, 34px 100%, 0 50%);
  936. box-shadow: 0 0 0 1px rgba(0, 230, 255, 0.45) inset, 0 0 32px rgba(0, 190, 255, 0.28), 0 10px 30px rgba(0, 0, 0, 0.35);
  937. }
  938. .stat-title__shine {
  939. position: absolute;
  940. inset: 0;
  941. background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.18) 48%, transparent 62%);
  942. animation: hr-shine-x 4.8s ease-in-out infinite;
  943. }
  944. .stat-title__inner {
  945. position: relative;
  946. z-index: 1;
  947. display: flex;
  948. flex-direction: column;
  949. align-items: center;
  950. }
  951. .stat-title__tag {
  952. margin-bottom: 2px;
  953. color: rgba(120, 220, 255, 0.75);
  954. font-size: 14px;
  955. letter-spacing: 0.32em;
  956. }
  957. .stat-title h1 {
  958. margin: 0;
  959. color: #f2fcff;
  960. font-size: 26px;
  961. font-weight: 700;
  962. letter-spacing: 0.32em;
  963. text-shadow: 0 0 12px rgba(0, 230, 255, 0.75), 0 0 28px rgba(0, 160, 255, 0.35);
  964. }
  965. .stat-title__deco {
  966. position: absolute;
  967. top: 50%;
  968. z-index: 1;
  969. width: 11px;
  970. height: 11px;
  971. border: 1px solid var(--cyan);
  972. transform: translateY(-50%) rotate(45deg);
  973. box-shadow: 0 0 14px rgba(0, 230, 255, 0.8);
  974. animation: hr-breathe 2.8s ease-in-out infinite;
  975. }
  976. .stat-title__deco--left {
  977. left: 16px;
  978. }
  979. .stat-title__deco--right {
  980. right: 16px;
  981. animation-delay: 1.2s;
  982. }
  983. /* 筛选区 */
  984. .stat-filter {
  985. position: relative;
  986. z-index: 1;
  987. padding: 14px 18px 12px;
  988. border: 1px solid rgba(0, 200, 255, 0.22);
  989. background: linear-gradient(165deg, rgba(0, 50, 85, 0.38), rgba(2, 16, 32, 0.78) 42%, rgba(0, 28, 50, 0.55));
  990. box-shadow: 0 14px 36px rgba(0, 0, 0, 0.38), 0 0 28px rgba(0, 150, 220, 0.08) inset;
  991. backdrop-filter: blur(12px);
  992. animation: hr-fade-up 0.65s ease both;
  993. }
  994. .stat-filter-form ::v-deep .el-form-item {
  995. margin-bottom: 8px;
  996. margin-right: 12px;
  997. }
  998. .stat-filter-form ::v-deep .el-form-item__label {
  999. color: #ffffff !important;
  1000. font-size: 14px;
  1001. }
  1002. .stat-filter__tip {
  1003. display: flex;
  1004. align-items: flex-start;
  1005. gap: 6px;
  1006. margin: 4px 0 0;
  1007. padding: 8px 10px;
  1008. border-left: 2px solid rgba(0, 230, 255, 0.55);
  1009. background: rgba(0, 60, 95, 0.28);
  1010. color: #8fc4de;
  1011. font-size: 14px;
  1012. line-height: 18px;
  1013. }
  1014. .stat-filter__tip i {
  1015. margin-top: 1px;
  1016. color: #7af0ff;
  1017. }
  1018. /* 快捷区间 */
  1019. .stat-filter__quick {
  1020. display: inline-flex;
  1021. align-items: center;
  1022. gap: 10px;
  1023. margin-left: 12px;
  1024. font-size: 14px;
  1025. }
  1026. .stat-filter__quick ::v-deep .el-link {
  1027. color: #7af0ff;
  1028. font-size: 14px;
  1029. }
  1030. /* 金额类指标(★ 2026-10-09 后端已补聚合金额) */
  1031. .amount-panel {
  1032. position: relative;
  1033. z-index: 1;
  1034. padding-bottom: 14px;
  1035. border: 1px solid rgba(0, 200, 255, 0.22);
  1036. background: linear-gradient(165deg, rgba(0, 50, 85, 0.38), rgba(2, 16, 32, 0.78) 42%, rgba(0, 28, 50, 0.55));
  1037. box-shadow: 0 14px 36px rgba(0, 0, 0, 0.38), 0 0 28px rgba(0, 150, 220, 0.08) inset;
  1038. backdrop-filter: blur(12px);
  1039. animation: hr-fade-up 0.7s ease both;
  1040. }
  1041. .amount-grid {
  1042. display: grid;
  1043. grid-template-columns: repeat(4, minmax(0, 1fr));
  1044. gap: 12px;
  1045. padding: 0 16px;
  1046. }
  1047. .amount-card {
  1048. display: flex;
  1049. flex-direction: column;
  1050. gap: 6px;
  1051. padding: 14px 16px;
  1052. border: 1px dashed rgba(0, 190, 255, 0.32);
  1053. background: rgba(0, 40, 70, 0.35);
  1054. }
  1055. .amount-card__label {
  1056. color: #8fc4de;
  1057. font-size: 14px;
  1058. line-height: 18px;
  1059. }
  1060. .amount-card__value {
  1061. color: #7fe3ff;
  1062. font-size: 22px;
  1063. font-weight: 700;
  1064. letter-spacing: 0.04em;
  1065. }
  1066. .amount-card__hint {
  1067. color: #5b7f96;
  1068. font-size: 14px;
  1069. line-height: 16px;
  1070. }
  1071. /* ★ 2026-10-09:按批次状态拆分的金额表 */
  1072. .amount-status {
  1073. margin: 14px 16px 0;
  1074. }
  1075. .amount-status__title {
  1076. margin-bottom: 8px;
  1077. color: #8fc4de;
  1078. font-size: 14px;
  1079. }
  1080. .amount-status ::v-deep .el-table,
  1081. .amount-status ::v-deep .el-table th,
  1082. .amount-status ::v-deep .el-table tr,
  1083. .amount-status ::v-deep .el-table td {
  1084. background-color: transparent;
  1085. color: #a9d6ea;
  1086. border-color: rgba(0, 190, 255, 0.2);
  1087. }
  1088. .amount-status ::v-deep .el-table th {
  1089. color: #8fc4de;
  1090. font-weight: 600;
  1091. }
  1092. .amount-status ::v-deep .el-table::before,
  1093. .amount-status ::v-deep .el-table--border::after,
  1094. .amount-status ::v-deep .el-table--border::before {
  1095. background-color: rgba(0, 190, 255, 0.2);
  1096. }
  1097. /* KPI 指标卡 */
  1098. .metric-grid {
  1099. position: relative;
  1100. z-index: 1;
  1101. display: grid;
  1102. grid-template-columns: repeat(5, minmax(0, 1fr));
  1103. gap: 14px;
  1104. }
  1105. .metric-card {
  1106. position: relative;
  1107. display: flex;
  1108. align-items: center;
  1109. min-height: 108px;
  1110. padding: 18px 20px;
  1111. overflow: hidden;
  1112. border: 1px solid rgba(0, 210, 255, 0.22);
  1113. background: linear-gradient(135deg, rgba(0, 55, 95, 0.45), rgba(0, 16, 34, 0.78) 48%, rgba(0, 30, 55, 0.55));
  1114. box-shadow: 0 0 0 1px rgba(0, 60, 100, 0.35) inset, 0 12px 32px rgba(0, 0, 0, 0.35), 0 0 24px rgba(0, 160, 255, 0.08);
  1115. backdrop-filter: blur(10px);
  1116. animation: hr-fade-up 0.65s ease both;
  1117. transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  1118. }
  1119. .metric-card--delay-0 {
  1120. animation-delay: 0.05s;
  1121. }
  1122. .metric-card--delay-1 {
  1123. animation-delay: 0.12s;
  1124. }
  1125. .metric-card--delay-2 {
  1126. animation-delay: 0.19s;
  1127. }
  1128. .metric-card--delay-3 {
  1129. animation-delay: 0.26s;
  1130. }
  1131. .metric-card--delay-4 {
  1132. animation-delay: 0.33s;
  1133. }
  1134. .metric-card:hover {
  1135. transform: translateY(-4px);
  1136. border-color: rgba(0, 230, 255, 0.55);
  1137. box-shadow: 0 0 0 1px rgba(0, 200, 255, 0.25) inset, 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 36px rgba(0, 200, 255, 0.22);
  1138. }
  1139. .metric-card--orange {
  1140. --cyan: #ffb020;
  1141. }
  1142. .metric-card--orange .metric-card__glow {
  1143. background: radial-gradient(circle, rgba(255, 176, 32, 0.24), transparent 68%);
  1144. }
  1145. .metric-card__border {
  1146. position: absolute;
  1147. inset: 0;
  1148. pointer-events: none;
  1149. opacity: 0.85;
  1150. background:
  1151. linear-gradient(90deg, rgba(0, 230, 255, 0.75), transparent 28%) top / 100% 1px no-repeat,
  1152. linear-gradient(180deg, rgba(0, 230, 255, 0.55), transparent 35%) left / 1px 100% no-repeat,
  1153. linear-gradient(270deg, rgba(0, 230, 255, 0.35), transparent 30%) bottom / 100% 1px no-repeat,
  1154. linear-gradient(0deg, rgba(0, 230, 255, 0.35), transparent 30%) right / 1px 100% no-repeat;
  1155. }
  1156. .metric-card__scan {
  1157. position: absolute;
  1158. inset: 0;
  1159. pointer-events: none;
  1160. background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.08) 45%, transparent 70%);
  1161. transform: translateX(-120%);
  1162. }
  1163. .metric-card:hover .metric-card__scan {
  1164. animation: hr-shine-x 1.1s ease;
  1165. }
  1166. .metric-card__corners::before,
  1167. .metric-card__corners::after,
  1168. .metric-card::before,
  1169. .metric-card::after {
  1170. content: "";
  1171. position: absolute;
  1172. width: 16px;
  1173. height: 16px;
  1174. border-color: var(--cyan);
  1175. border-style: solid;
  1176. pointer-events: none;
  1177. z-index: 2;
  1178. filter: drop-shadow(0 0 4px rgba(0, 230, 255, 0.7));
  1179. }
  1180. .metric-card::before {
  1181. top: -1px;
  1182. left: -1px;
  1183. border-width: 2px 0 0 2px;
  1184. }
  1185. .metric-card::after {
  1186. top: -1px;
  1187. right: -1px;
  1188. border-width: 2px 2px 0 0;
  1189. }
  1190. .metric-card__corners::before {
  1191. right: -1px;
  1192. bottom: -1px;
  1193. border-width: 0 2px 2px 0;
  1194. }
  1195. .metric-card__corners::after {
  1196. bottom: -1px;
  1197. left: -1px;
  1198. border-width: 0 0 2px 2px;
  1199. }
  1200. .metric-card__glow {
  1201. position: absolute;
  1202. right: -30px;
  1203. bottom: -40px;
  1204. width: 150px;
  1205. height: 150px;
  1206. border-radius: 50%;
  1207. pointer-events: none;
  1208. background: radial-gradient(circle, rgba(0, 220, 255, 0.28), transparent 68%);
  1209. }
  1210. .metric-icon {
  1211. position: relative;
  1212. display: inline-flex;
  1213. flex: 0 0 60px;
  1214. align-items: center;
  1215. justify-content: center;
  1216. width: 60px;
  1217. height: 60px;
  1218. margin-right: 16px;
  1219. color: var(--cyan);
  1220. border-radius: 50%;
  1221. font-size: 24px;
  1222. z-index: 1;
  1223. background: radial-gradient(circle at 35% 30%, rgba(0, 230, 255, 0.3), rgba(0, 40, 70, 0.15) 55%, transparent);
  1224. }
  1225. .metric-icon__ring {
  1226. position: absolute;
  1227. inset: 0;
  1228. border: 1px solid rgba(0, 230, 255, 0.55);
  1229. border-radius: 50%;
  1230. border-top-color: transparent;
  1231. border-left-color: rgba(0, 230, 255, 0.15);
  1232. box-shadow: 0 0 18px rgba(0, 200, 255, 0.28);
  1233. animation: hr-ring-spin 6s linear infinite;
  1234. }
  1235. .metric-icon__pulse {
  1236. position: absolute;
  1237. inset: -4px;
  1238. border: 1px solid rgba(0, 230, 255, 0.45);
  1239. border-radius: 50%;
  1240. animation: hr-pulse 2.4s ease-out infinite;
  1241. }
  1242. .metric-copy {
  1243. position: relative;
  1244. z-index: 1;
  1245. display: flex;
  1246. min-width: 0;
  1247. flex-direction: column;
  1248. }
  1249. .metric-label {
  1250. color: #8fc4de;
  1251. font-size: 14px;
  1252. line-height: 20px;
  1253. letter-spacing: 0.04em;
  1254. }
  1255. .metric-value {
  1256. margin-top: 3px;
  1257. color: #f5fcff;
  1258. font-size: 28px;
  1259. line-height: 36px;
  1260. font-weight: 720;
  1261. letter-spacing: 0.02em;
  1262. font-variant-numeric: tabular-nums;
  1263. text-shadow: 0 0 14px rgba(0, 220, 255, 0.45), 0 0 2px rgba(255, 255, 255, 0.35);
  1264. }
  1265. .metric-unit {
  1266. margin-left: 2px;
  1267. font-size: 16px;
  1268. font-weight: 500;
  1269. color: #7eb2cd;
  1270. }
  1271. .metric-card__code {
  1272. position: absolute;
  1273. top: 10px;
  1274. right: 12px;
  1275. color: rgba(0, 220, 255, 0.28);
  1276. font-size: 14px;
  1277. font-weight: 700;
  1278. letter-spacing: 0.12em;
  1279. }
  1280. /* 面板(图表 + 表格) */
  1281. .panel-grid {
  1282. position: relative;
  1283. z-index: 1;
  1284. display: grid;
  1285. grid-template-columns: repeat(2, minmax(0, 1fr));
  1286. gap: 14px;
  1287. }
  1288. .trend-panel {
  1289. grid-column: 1 / -1;
  1290. }
  1291. .panel {
  1292. position: relative;
  1293. display: flex;
  1294. flex-direction: column;
  1295. min-width: 0;
  1296. overflow: visible;
  1297. border: 1px solid rgba(0, 200, 255, 0.22);
  1298. background: linear-gradient(165deg, rgba(0, 50, 85, 0.38), rgba(2, 16, 32, 0.78) 42%, rgba(0, 28, 50, 0.55));
  1299. box-shadow: 0 14px 36px rgba(0, 0, 0, 0.38), 0 0 28px rgba(0, 150, 220, 0.08) inset;
  1300. backdrop-filter: blur(12px);
  1301. animation: hr-fade-up 0.75s ease both;
  1302. animation-delay: 0.2s;
  1303. }
  1304. .panel__scan {
  1305. position: absolute;
  1306. left: 0;
  1307. right: 0;
  1308. top: 0;
  1309. height: 40%;
  1310. pointer-events: none;
  1311. background: linear-gradient(180deg, transparent, rgba(0, 220, 255, 0.05), transparent);
  1312. animation: hr-scan-y 11s linear infinite;
  1313. opacity: 0.7;
  1314. }
  1315. .panel__corners::before,
  1316. .panel__corners::after,
  1317. .panel::before,
  1318. .panel::after {
  1319. content: "";
  1320. position: absolute;
  1321. width: 20px;
  1322. height: 20px;
  1323. border-color: var(--cyan);
  1324. border-style: solid;
  1325. pointer-events: none;
  1326. z-index: 3;
  1327. filter: drop-shadow(0 0 6px rgba(0, 230, 255, 0.65));
  1328. }
  1329. .panel::before {
  1330. top: -1px;
  1331. left: -1px;
  1332. border-width: 2px 0 0 2px;
  1333. }
  1334. .panel::after {
  1335. top: -1px;
  1336. right: -1px;
  1337. border-width: 2px 2px 0 0;
  1338. }
  1339. .panel__corners::before {
  1340. right: -1px;
  1341. bottom: -1px;
  1342. border-width: 0 2px 2px 0;
  1343. }
  1344. .panel__corners::after {
  1345. bottom: -1px;
  1346. left: -1px;
  1347. border-width: 0 0 2px 2px;
  1348. }
  1349. .panel-header {
  1350. position: relative;
  1351. z-index: 2;
  1352. display: flex;
  1353. align-items: center;
  1354. justify-content: space-between;
  1355. gap: 10px;
  1356. min-height: 48px;
  1357. padding: 10px 16px 8px;
  1358. }
  1359. .panel-header h2 {
  1360. position: relative;
  1361. display: inline-flex;
  1362. align-items: center;
  1363. gap: 10px;
  1364. margin: 0;
  1365. color: #eaf9ff;
  1366. font-size: 16px;
  1367. font-weight: 650;
  1368. letter-spacing: 0.1em;
  1369. text-shadow: 0 0 12px rgba(0, 200, 255, 0.35);
  1370. }
  1371. .panel-header h2 em {
  1372. display: inline-block;
  1373. width: 4px;
  1374. height: 16px;
  1375. background: linear-gradient(180deg, #7af6ff, rgba(0, 180, 255, 0.1));
  1376. box-shadow: 0 0 10px rgba(0, 230, 255, 0.8);
  1377. }
  1378. .panel-sub {
  1379. color: #6f97b0;
  1380. font-size: 14px;
  1381. letter-spacing: 0.04em;
  1382. }
  1383. .chart {
  1384. position: relative;
  1385. z-index: 1;
  1386. width: 100%;
  1387. min-height: 320px;
  1388. }
  1389. .trend-panel .chart {
  1390. min-height: 300px;
  1391. }
  1392. .table-panel {
  1393. animation-delay: 0.3s;
  1394. }
  1395. .table-panel-header .el-button {
  1396. background: rgba(0, 50, 80, 0.6);
  1397. border-color: rgba(0, 210, 255, 0.4);
  1398. color: #7af0ff;
  1399. }
  1400. .table-wrap {
  1401. position: relative;
  1402. z-index: 1;
  1403. padding: 0 16px 14px;
  1404. }
  1405. </style>
  1406. <!-- Element UI 深色主题覆盖(全局,非 scoped) -->
  1407. <style lang="scss">
  1408. .salary-stat-view {
  1409. .el-input__inner,
  1410. .el-textarea__inner {
  1411. color: #d5f1ff !important;
  1412. border-color: rgba(0, 210, 255, 0.38);
  1413. background: linear-gradient(180deg, rgba(0, 40, 70, 0.9), rgba(0, 18, 36, 0.95));
  1414. box-shadow: 0 0 12px rgba(0, 160, 255, 0.12) inset;
  1415. }
  1416. .el-input__inner:hover,
  1417. .el-input.is-focus .el-input__inner {
  1418. border-color: rgba(0, 230, 255, 0.7);
  1419. }
  1420. .el-input__inner::placeholder {
  1421. color: #b0c8d8 !important;
  1422. }
  1423. .el-input__suffix,
  1424. .el-input__prefix {
  1425. color: #b0c8d8;
  1426. }
  1427. .el-input__icon {
  1428. color: #b0c8d8;
  1429. }
  1430. .el-select .el-input__inner {
  1431. color: #d5f1ff !important;
  1432. }
  1433. .el-select-dropdown__item {
  1434. color: #c8e6f5;
  1435. }
  1436. .el-select-dropdown__item.hover,
  1437. .el-select-dropdown__item:hover {
  1438. background: rgba(0, 80, 130, 0.45);
  1439. color: #7af0ff;
  1440. }
  1441. .el-select-dropdown {
  1442. background: rgba(3, 20, 40, 0.96);
  1443. border-color: rgba(0, 210, 255, 0.35);
  1444. }
  1445. .el-select-dropdown__empty {
  1446. color: #6f97b0;
  1447. }
  1448. .el-date-editor .el-range-input {
  1449. color: #d5f1ff !important;
  1450. background: transparent;
  1451. }
  1452. .el-date-editor .el-range-separator {
  1453. color: #b0c8d8;
  1454. }
  1455. .el-date-editor .el-input__inner {
  1456. color: #d5f1ff !important;
  1457. }
  1458. .el-date-picker,
  1459. .el-picker-panel {
  1460. background: rgba(3, 20, 40, 0.96);
  1461. border-color: rgba(0, 210, 255, 0.35);
  1462. }
  1463. .el-picker-panel__icon-btn {
  1464. color: #ffffff;
  1465. }
  1466. .el-date-table th {
  1467. color: #ffffff;
  1468. border-bottom-color: rgba(0, 190, 255, 0.2);
  1469. }
  1470. .el-date-table td .el-date-table-cell__text {
  1471. color: #c8e6f5;
  1472. }
  1473. .el-date-table td.today .el-date-table-cell__text {
  1474. color: #7af0ff;
  1475. }
  1476. .el-date-table td.current:not(.disabled) .el-date-table-cell__text {
  1477. background: #00eaff;
  1478. color: #000912;
  1479. }
  1480. .el-button--primary {
  1481. background: linear-gradient(180deg, rgba(0, 90, 140, 0.7), rgba(0, 40, 70, 0.85));
  1482. border-color: rgba(0, 210, 255, 0.5);
  1483. color: #7af0ff;
  1484. }
  1485. .el-button--primary:hover {
  1486. border-color: rgba(0, 230, 255, 0.8);
  1487. box-shadow: 0 0 16px rgba(0, 180, 255, 0.25);
  1488. }
  1489. .el-button--primary.is-plain {
  1490. background: rgba(0, 50, 80, 0.5);
  1491. }
  1492. .el-button--default {
  1493. background: rgba(0, 40, 70, 0.5);
  1494. border-color: rgba(0, 190, 255, 0.3);
  1495. color: #ffffff;
  1496. }
  1497. .el-button--default:hover {
  1498. border-color: rgba(0, 230, 255, 0.6);
  1499. color: #7af0ff;
  1500. }
  1501. /* 表格深色 */
  1502. .el-table {
  1503. background: transparent;
  1504. color: #d7eef8;
  1505. }
  1506. .el-table th.el-table__cell {
  1507. background: rgba(0, 50, 85, 0.5) !important;
  1508. color: #ffffff !important;
  1509. border-bottom-color: rgba(0, 190, 255, 0.25);
  1510. }
  1511. .el-table th.el-table__cell .cell {
  1512. color: #ffffff !important;
  1513. }
  1514. .el-table th.el-table__cell>.cell {
  1515. color: #ffffff !important;
  1516. }
  1517. .el-table tr {
  1518. background: transparent;
  1519. }
  1520. .el-table td.el-table__cell {
  1521. border-bottom-color: rgba(0, 180, 255, 0.12);
  1522. }
  1523. .el-table--enable-row-transition .el-table__body td.el-table__cell {
  1524. background: transparent;
  1525. }
  1526. .el-table__row:hover>td.el-table__cell {
  1527. background: rgba(0, 70, 110, 0.3) !important;
  1528. }
  1529. .el-table__body tr.current-row>td.el-table__cell {
  1530. background: rgba(0, 120, 180, 0.35) !important;
  1531. }
  1532. .el-table--border,
  1533. .el-table--group {
  1534. border-color: rgba(0, 190, 255, 0.2);
  1535. }
  1536. .el-table--border th.el-table__cell,
  1537. .el-table--border td.el-table__cell {
  1538. border-right-color: rgba(0, 190, 255, 0.15);
  1539. }
  1540. .el-table::before,
  1541. .el-table--border::after {
  1542. background-color: rgba(0, 190, 255, 0.2);
  1543. }
  1544. .el-table__empty-text {
  1545. color: #6f97b0;
  1546. }
  1547. /* ele-pro-table 工具栏(刷新/列设置/全屏)深色化 */
  1548. .ele-table-tool {
  1549. background: transparent !important;
  1550. border-bottom: 1px solid rgba(0, 190, 255, 0.18) !important;
  1551. }
  1552. .ele-table-tool .ele-tool-actions,
  1553. .ele-table-tool .ele-tool-left {
  1554. color: #8fc4de;
  1555. }
  1556. .ele-table-tool .el-button--text,
  1557. .ele-table-tool .el-button {
  1558. color: #8fc4de;
  1559. background: transparent;
  1560. border-color: transparent;
  1561. }
  1562. .ele-table-tool .el-button--text:hover,
  1563. .ele-table-tool .el-button:hover {
  1564. color: #7af0ff;
  1565. }
  1566. .ele-table-tool .el-tooltip i,
  1567. .ele-table-tool i {
  1568. color: #8fc4de;
  1569. }
  1570. .ele-table-tool .el-tooltip:hover i,
  1571. .ele-table-tool .el-button:hover i {
  1572. color: #7af0ff;
  1573. }
  1574. .ele-pro-table-main {
  1575. background: transparent;
  1576. }
  1577. .ele-pro-table-pagination {
  1578. border-top: 1px solid rgba(0, 190, 255, 0.15) !important;
  1579. background: transparent !important;
  1580. }
  1581. /* 全屏模式深色化 */
  1582. .ele-pro-table.ele-pro-table-fullscreen {
  1583. background-color: #000912 !important;
  1584. background: linear-gradient(180deg, #001526 0%, #000912 42%, #00060d 100%) !important;
  1585. z-index: 3000 !important;
  1586. }
  1587. .ele-pro-table.ele-pro-table-fullscreen .ele-table-tool {
  1588. background: transparent !important;
  1589. }
  1590. .ele-pro-table.ele-pro-table-fullscreen .el-table th.el-table__cell {
  1591. background: rgba(0, 50, 85, 0.5) !important;
  1592. color: #ffffff !important;
  1593. }
  1594. .ele-pro-table.ele-pro-table-fullscreen .el-table th.el-table__cell .cell {
  1595. color: #ffffff !important;
  1596. }
  1597. .ele-pro-table.ele-pro-table-fullscreen .el-table,
  1598. .ele-pro-table.ele-pro-table-fullscreen .el-table tr {
  1599. background: transparent !important;
  1600. }
  1601. /* 分页 */
  1602. .el-pagination {
  1603. color: #8fc4de;
  1604. }
  1605. .el-pagination .btn-prev,
  1606. .el-pagination .btn-next {
  1607. color: #8fc4de;
  1608. background: transparent;
  1609. }
  1610. .el-pagination .btn-prev:hover,
  1611. .el-pagination .btn-next:hover {
  1612. color: #7af0ff;
  1613. }
  1614. .el-pagination button:disabled {
  1615. color: #4a6a80;
  1616. }
  1617. .el-pager li {
  1618. background: transparent;
  1619. color: #8fc4de;
  1620. }
  1621. .el-pager li:hover {
  1622. color: #7af0ff;
  1623. }
  1624. .el-pager li.active {
  1625. color: #7af0ff;
  1626. border-bottom: 2px solid #00eaff;
  1627. }
  1628. .el-pagination__total,
  1629. .el-pagination__jump {
  1630. color: #8fc4de;
  1631. }
  1632. .el-pagination .el-input__inner {
  1633. color: #d5f1ff;
  1634. }
  1635. .el-pagination .el-select .el-input__inner {
  1636. color: #d5f1ff;
  1637. }
  1638. /* 标签深色化 */
  1639. .el-tag {
  1640. border-color: rgba(0, 200, 255, 0.35);
  1641. }
  1642. .el-tag--mini {
  1643. color: inherit;
  1644. }
  1645. .el-link {
  1646. color: #7af0ff;
  1647. }
  1648. .el-link.is-disabled {
  1649. color: #4a6a80 !important;
  1650. }
  1651. .el-dialog__wrapper {
  1652. z-index: 9999;
  1653. }
  1654. }
  1655. /* 深色弹框(金额明细 / 受控导出) */
  1656. .salary-stat-dialog {
  1657. background: linear-gradient(165deg, rgba(0, 50, 85, 0.95), rgba(2, 16, 32, 0.98));
  1658. border: 1px solid rgba(0, 210, 255, 0.4);
  1659. box-shadow: 0 0 0 1px rgba(0, 230, 255, 0.25) inset, 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 180, 255, 0.18);
  1660. backdrop-filter: blur(14px);
  1661. }
  1662. .salary-stat-dialog .el-dialog__header {
  1663. padding: 18px 24px 14px;
  1664. border-bottom: 1px solid rgba(0, 190, 255, 0.2);
  1665. }
  1666. .salary-stat-dialog .el-dialog__title {
  1667. color: #eaf9ff;
  1668. font-size: 16px;
  1669. font-weight: 600;
  1670. letter-spacing: 0.06em;
  1671. }
  1672. .salary-stat-dialog .el-dialog__headerbtn .el-dialog__close {
  1673. color: #8fc4de;
  1674. }
  1675. .salary-stat-dialog .el-dialog__body {
  1676. padding: 16px 24px 20px;
  1677. color: #d7eef8;
  1678. }
  1679. .salary-stat-dialog .el-dialog__footer {
  1680. padding: 12px 24px 18px;
  1681. border-top: 1px solid rgba(0, 190, 255, 0.16);
  1682. }
  1683. .salary-stat-dialog .el-alert--info,
  1684. .salary-stat-dialog .el-alert--warning {
  1685. background: rgba(0, 60, 95, 0.4);
  1686. border: 1px solid rgba(0, 190, 255, 0.25);
  1687. }
  1688. .salary-stat-dialog .el-alert__title,
  1689. .salary-stat-dialog .el-alert__description {
  1690. color: #9fd8f0;
  1691. font-size: 14px;
  1692. line-height: 18px;
  1693. }
  1694. .salary-stat-dialog .el-form-item__label {
  1695. color: #ffffff;
  1696. }
  1697. .salary-stat-dialog .slip-detail-head {
  1698. display: flex;
  1699. flex-wrap: wrap;
  1700. align-items: center;
  1701. gap: 10px;
  1702. margin: 14px 0;
  1703. padding-bottom: 12px;
  1704. border-bottom: 1px solid rgba(0, 190, 255, 0.2);
  1705. }
  1706. .salary-stat-dialog .slip-detail-name {
  1707. font-size: 16px;
  1708. font-weight: 600;
  1709. color: #eaf9ff;
  1710. }
  1711. .salary-stat-dialog .slip-detail-meta {
  1712. flex: 1;
  1713. font-size: 14px;
  1714. color: #6f97b0;
  1715. }
  1716. .salary-stat-dialog .slip-detail-table {
  1717. margin-top: 14px;
  1718. }
  1719. .salary-stat-dialog .export-hint {
  1720. margin-top: 6px;
  1721. font-size: 13px;
  1722. line-height: 1.6;
  1723. color: #6f97b0;
  1724. }
  1725. .salary-stat-dialog .el-descriptions__body {
  1726. background: transparent !important;
  1727. }
  1728. .salary-stat-dialog .el-descriptions__body .el-descriptions__table {
  1729. background: transparent !important;
  1730. }
  1731. .salary-stat-dialog .el-descriptions-item__label.is-bordered-label {
  1732. background: rgba(0, 50, 85, 0.5);
  1733. color: #ffffff;
  1734. font-weight: 500;
  1735. }
  1736. .salary-stat-dialog .el-descriptions-item__content {
  1737. background: rgba(2, 16, 32, 0.6);
  1738. color: #d7eef8;
  1739. }
  1740. .salary-stat-dialog .el-descriptions__body .el-descriptions__table.is-bordered .el-descriptions-item__cell {
  1741. border-color: rgba(0, 190, 255, 0.2);
  1742. }
  1743. .salary-stat-dialog .el-table {
  1744. background: transparent;
  1745. color: #d7eef8;
  1746. }
  1747. .salary-stat-dialog .el-table th.el-table__cell {
  1748. background: rgba(0, 50, 85, 0.5) !important;
  1749. color: #ffffff !important;
  1750. border-bottom-color: rgba(0, 190, 255, 0.25);
  1751. }
  1752. .salary-stat-dialog .el-table td.el-table__cell {
  1753. background: rgba(2, 16, 32, 0.5);
  1754. border-bottom-color: rgba(0, 180, 255, 0.12);
  1755. }
  1756. .salary-stat-dialog .el-table--border,
  1757. .salary-stat-dialog .el-table--group {
  1758. border-color: rgba(0, 190, 255, 0.2);
  1759. }
  1760. .salary-stat-dialog .el-table--border th.el-table__cell,
  1761. .salary-stat-dialog .el-table--border td.el-table__cell {
  1762. border-right-color: rgba(0, 190, 255, 0.15);
  1763. }
  1764. .salary-stat-dialog .el-table__empty-text {
  1765. color: #6f97b0;
  1766. }
  1767. /* 响应式 */
  1768. @media (max-width: 1400px) {
  1769. .salary-stat-view .metric-grid {
  1770. grid-template-columns: repeat(3, minmax(0, 1fr));
  1771. }
  1772. .salary-stat-view .amount-grid {
  1773. grid-template-columns: repeat(2, minmax(0, 1fr));
  1774. }
  1775. }
  1776. @media (max-width: 1024px) {
  1777. .salary-stat-view .panel-grid {
  1778. grid-template-columns: 1fr;
  1779. }
  1780. .salary-stat-view .trend-panel {
  1781. grid-column: auto;
  1782. }
  1783. .salary-stat-view .metric-grid {
  1784. grid-template-columns: repeat(2, minmax(0, 1fr));
  1785. }
  1786. .salary-stat-view .amount-grid {
  1787. grid-template-columns: 1fr;
  1788. }
  1789. }
  1790. @media (max-width: 768px) {
  1791. .salary-stat-view .metric-grid {
  1792. grid-template-columns: 1fr;
  1793. }
  1794. .salary-stat-view .stat-title__wing {
  1795. display: none;
  1796. }
  1797. }
  1798. </style>