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