33 lines
1.0 KiB
Vue
33 lines
1.0 KiB
Vue
<template>
|
|
<view class="page">
|
|
<fy-header title="工资条" back />
|
|
<view v-if="!rows.length" class="empty">暂无工资条</view>
|
|
<view v-for="r in rows" :key="r.id || r.month" class="card item">
|
|
<text class="t">{{ r.month || r.period || '工资条' }}</text>
|
|
<text class="s">应发 {{ r.gross || r.shouldPay || '-' }} · 实发 {{ r.net || r.actual || '-' }}</text>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import FyHeader from '../../components/fy-header.vue'
|
|
import { store } from '../../utils/store.js'
|
|
import { asList } from '../../utils/format.js'
|
|
import { oaGet } from '../../utils/api.js'
|
|
|
|
export default {
|
|
components: { FyHeader },
|
|
data() { return { rows: [] } },
|
|
onShow() {
|
|
oaGet('/profile/payslips', store.token).then((d) => { this.rows = asList(d) }).catch(() => { this.rows = [] })
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
.item { margin: 16rpx 24rpx; padding: 24rpx; }
|
|
.t { display: block; font-weight: 600; }
|
|
.s { font-size: 24rpx; color: #6B7280; }
|
|
.empty { padding: 80rpx; text-align: center; color: #6B7280; }
|
|
</style>
|