feat(bonus/real-time): 实时奖金 奖金日期添加默认值
This commit is contained in:
parent
c04c817d55
commit
bf1179154a
|
@ -23,4 +23,4 @@ export const realTimeBonus = () =>
|
|||
|
||||
//奖金明细列表
|
||||
export const queryBonusList = params =>
|
||||
http.post('/bonus/api/bonus/query-bonus-first/', { params })
|
||||
http.post('/bonus/api/bonus/query-bonus-first', { params })
|
||||
|
|
|
@ -16,7 +16,9 @@
|
|||
<view class="details-card">
|
||||
<view class="detail-item">
|
||||
<text class="detail-label">奖金日期</text>
|
||||
<text class="detail-value date">{{ bonusData.settleDate }}</text>
|
||||
<text class="detail-value date">{{
|
||||
bonusData.settleDate || formatDate
|
||||
}}</text>
|
||||
</view>
|
||||
<view v-for="(label, key) in detailLabels" :key="key" class="detail-item">
|
||||
<text class="detail-label">{{ label }}</text>
|
||||
|
@ -32,7 +34,7 @@
|
|||
<text class="detail-label total-label">小计(¥)</text>
|
||||
<text class="detail-value total-value">
|
||||
<text class="currency-symbol-small">¥</text>
|
||||
{{ bonusData.subtotal || '0.00' }}
|
||||
{{ bonusData.retailRealSubtotal || '0.00' }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -41,6 +43,7 @@
|
|||
|
||||
<script>
|
||||
import { realTimeBonus } from '@/config/bonus.js'
|
||||
import dayjs from 'dayjs'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -70,6 +73,11 @@ export default {
|
|||
onShow() {
|
||||
this.getRealTimeBonus()
|
||||
},
|
||||
computed: {
|
||||
formatDate() {
|
||||
return dayjs(new Date()).format('YYYY-MM-DD')
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getRealTimeBonus() {
|
||||
realTimeBonus().then(res => {
|
||||
|
|
Loading…
Reference in New Issue