|
|
@@ -49,8 +49,10 @@ const startForm = reactive({ starting_cash: 0 })
|
|
|
const endForm = reactive({ actual_cash: 0 })
|
|
|
|
|
|
async function fetch() {
|
|
|
- const r = await getCurrentShift()
|
|
|
- current.value = r.code === 0 ? r.data : null
|
|
|
+ try {
|
|
|
+ const r = await getCurrentShift()
|
|
|
+ current.value = r.code === 0 ? r.data : null
|
|
|
+ } catch (e) { current.value = null }
|
|
|
const l = await getShiftList({ page: 1, page_size: 20 })
|
|
|
if (l.code === 0) { list.value = l.data.list || []; list.value.forEach(s => s.collected_cash = s.collected_cash || 0) }
|
|
|
}
|