Authored by 叶弯弯

添加默认值。reviewed by yuliang。

... ... @@ -32,8 +32,8 @@ export default function deliveryStatsReducer(state = initialState, action) {
let {additionInfo, list} = action.payload;
let data = [...origin, ...(list || [])];
let nextState = state.set('isFetching', false)
.set('sum', additionInfo.allNumber)
.set('totalAmount', additionInfo.allAmount)
.set('sum', additionInfo.allNumber || '0')
.set('totalAmount', additionInfo.allAmount || '0.00')
.set('currentPage', action.payload.page)
.set('pageCount', action.payload.totalPage)
.set('jsonData', Immutable.fromJS(data));
... ...
... ... @@ -32,8 +32,8 @@ export default function requestStatsReducer(state = initialState, action) {
let {additionInfo, list} = action.payload;
let data = [...origin, ...(list || [])];
let nextState = state.set('isFetching', false)
.set('sum', additionInfo.allNumber)
.set('totalAmount', additionInfo.allAmount)
.set('sum', additionInfo.allNumber || '0')
.set('totalAmount', additionInfo.allAmount || '0.00')
.set('currentPage', action.payload.page)
.set('pageCount', action.payload.totalPage)
.set('jsonData', Immutable.fromJS(data));
... ...
... ... @@ -28,8 +28,8 @@ export default function stockStatsReducer(state = initialState, action) {
let {additionInfo, list} = action.payload;
let data = [...origin, ...(list || [])];
let nextState = state.set('isFetching',false)
.set('sum', additionInfo.storageTotalNum)
.set('totalAmount', additionInfo.storageTotalMoney)
.set('sum', additionInfo.storageTotalNum || '0')
.set('totalAmount', additionInfo.storageTotalMoney || '0.00')
.set('currentPage', action.payload.page)
.set('pageCount', action.payload.totalPage)
.set('jsonData', Immutable.fromJS(data));
... ...