容错
Showing
2 changed files
with
28 additions
and
10 deletions
| ... | @@ -26,7 +26,11 @@ | ... | @@ -26,7 +26,11 @@ |
| 26 | </view> | 26 | </view> |
| 27 | <view class="info-row"> | 27 | <view class="info-row"> |
| 28 | <text class="label">认证地址</text> | 28 | <text class="label">认证地址</text> |
| 29 | <text class="value">{{ form.provinceStr + form.cityStr + form.regionStr || '-' }}</text> | 29 | <text class="value">{{ |
| 30 | (form.provinceStr || '') + | ||
| 31 | (form.cityStr || '') + | ||
| 32 | (form.regionStr || '') | ||
| 33 | }}</text> | ||
| 30 | </view> | 34 | </view> |
| 31 | <view class="info-row"> | 35 | <view class="info-row"> |
| 32 | <text class="label">详细地址</text> | 36 | <text class="label">详细地址</text> | ... | ... |
| ... | @@ -135,17 +135,24 @@ async function getList() { | ... | @@ -135,17 +135,24 @@ async function getList() { |
| 135 | renewYear: 0, | 135 | renewYear: 0, |
| 136 | newCount: 0 | 136 | newCount: 0 |
| 137 | } | 137 | } |
| 138 | const res = await api.listNewAPI(queryParams.value) | 138 | try { |
| 139 | list.value = res.rows | 139 | const res = await api.listNewAPI(queryParams.value) |
| 140 | for (const val of list.value) { | 140 | list.value = res.rows || [] |
| 141 | statistical.value.renewYear += val.renewYear | 141 | for (const val of list.value) { |
| 142 | statistical.value.totalCost += val.finalPrice * 1 | 142 | statistical.value.renewYear += val.renewYear |
| 143 | if (val.isNew == 1) { | 143 | statistical.value.totalCost += val.finalPrice * 1 |
| 144 | statistical.value.newCount += 1 | 144 | if (val.isNew == 1) { |
| 145 | statistical.value.newCount += 1 | ||
| 146 | } | ||
| 147 | statistical.value.allCount += 1 | ||
| 145 | } | 148 | } |
| 146 | statistical.value.allCount += 1 | 149 | total.value = res.total |
| 150 | } catch (e) { | ||
| 151 | console.error('获取列表失败', e) | ||
| 152 | list.value = [] | ||
| 153 | } finally { | ||
| 154 | uni.hideLoading() | ||
| 147 | } | 155 | } |
| 148 | total.value = res.total | ||
| 149 | } | 156 | } |
| 150 | 157 | ||
| 151 | function audit(recordId, flag) { | 158 | function audit(recordId, flag) { |
| ... | @@ -201,6 +208,13 @@ function doApproval(recordId, flag, reason) { | ... | @@ -201,6 +208,13 @@ function doApproval(recordId, flag, reason) { |
| 201 | icon: 'none' | 208 | icon: 'none' |
| 202 | }) | 209 | }) |
| 203 | getList() | 210 | getList() |
| 211 | }).catch((e) => { | ||
| 212 | console.error('审批操作失败', e) | ||
| 213 | uni.hideLoading() | ||
| 214 | uni.showToast({ | ||
| 215 | title: '操作失败', | ||
| 216 | icon: 'none' | ||
| 217 | }) | ||
| 204 | }) | 218 | }) |
| 205 | } | 219 | } |
| 206 | 220 | ... | ... |
-
Please register or sign in to post a comment