|
|
@@ -95,6 +95,10 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="info-row">
|
|
|
+ <view class="info-item">
|
|
|
+ <text class="info-label">待领取</text>
|
|
|
+ <text class="info-value error">{{ getReceiveCount(item) }}</text>
|
|
|
+ </view>
|
|
|
<view class="info-item">
|
|
|
<text class="info-label">申购状态</text>
|
|
|
<text class="info-value" :class="'purchase-status-' + getPurchaseStatus(item)">{{ getPurchaseStatusText(item) }}</text>
|
|
|
@@ -228,6 +232,14 @@
|
|
|
return val != null ? val.toString() : '0'
|
|
|
}
|
|
|
|
|
|
+ // 获取待领取数量
|
|
|
+ const getReceiveCount = (item: any | null): string => {
|
|
|
+ if (item == null) return '0'
|
|
|
+ const jsonItem = item as UTSJSONObject
|
|
|
+ const val = jsonItem['pendingReceiveCount']
|
|
|
+ return val != null ? val.toString() : '0'
|
|
|
+ }
|
|
|
+
|
|
|
// 获取已完成数量
|
|
|
const getFinishedCount = (item: any | null): string => {
|
|
|
if (item == null) return '0'
|
|
|
@@ -356,21 +368,23 @@
|
|
|
url: `/pages/apply/applyInfo?id=${applyId}`
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
- // 初始化
|
|
|
- loadData(true)
|
|
|
-
|
|
|
+
|
|
|
// 页面显示时刷新列表
|
|
|
onShow(() => {
|
|
|
- loadData(true)
|
|
|
- loadPendingReceiveCount()
|
|
|
+ if(currentUserId.length > 0){
|
|
|
+ loadData(true)
|
|
|
+ loadPendingReceiveCount()
|
|
|
+ }
|
|
|
})
|
|
|
|
|
|
onMounted(() => {
|
|
|
const userInfo = getUserInfo()
|
|
|
if (userInfo != null) {
|
|
|
- const userName = userInfo['userName']
|
|
|
- currentUserId = userName != null ? userName.toString() : ''
|
|
|
+ const userId = userInfo['userId']
|
|
|
+ currentUserId = userId != null ? userId.toString() : ''
|
|
|
+ console.log("currentUserId:" + currentUserId)
|
|
|
+ // 初始化
|
|
|
+ loadData(true)
|
|
|
}
|
|
|
// 获取页面参数,判断是否从index.uvue跳转过来
|
|
|
const pages = getCurrentPages()
|
|
|
@@ -636,6 +650,9 @@
|
|
|
&.warning {
|
|
|
color: #faad14;
|
|
|
}
|
|
|
+ &.error {
|
|
|
+ color: #ff0000;
|
|
|
+ }
|
|
|
&.primary {
|
|
|
color: #007aff;
|
|
|
}
|