Toggle navigation
Toggle navigation
This project
Loading...
Sign in
mobile
/
yh_vendor
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
叶弯弯
9 years ago
Commit
995f0f04ee0f525a486b3e4f99b4742442422317
2 parents
c4e7c551
dcdf244d
Merge branch 'develop' of git.yoho.cn:mobile/yh_vendor into develop
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
104 additions
and
17 deletions
ios/YH_Vendor/Info.plist
js/components/DeliveryStats.js
js/components/RefoundStatistics.js
js/components/RequestStats.js
js/components/SaleStatistics.js
js/components/StockStats.js
js/constants/actionTypes.js
js/containers/AccountSettlementContainer.js
js/containers/DeliveryStatsContainer.js
js/containers/RefoundStatisticsContainer.js
js/containers/RequestStatsContainer.js
js/containers/SaleStatisticsContainer.js
js/containers/StockStatsContainer.js
js/reducers/accountSettlement/accountSettlementActions.js
js/reducers/accountSettlement/accountSettlementReducer.js
js/reducers/deliveryStats/deliveryStatsActions.js
js/reducers/deliveryStats/deliveryStatsReducer.js
js/reducers/refoundStatistics/refoundStatisticsActions.js
js/reducers/refoundStatistics/refoundStatisticsReducer.js
js/reducers/requestStats/requestStatsActions.js
js/reducers/requestStats/requestStatsReducer.js
js/reducers/saleStatistics/saleStatisticsActions.js
js/reducers/saleStatistics/saleStatisticsReducer.js
js/reducers/stockStats/stockStatsActions.js
js/reducers/stockStats/stockStatsReducer.js
js/reducers/user/userActions.js
js/services/HomeService.js
ios/YH_Vendor/Info.plist
View file @
995f0f0
...
...
@@ -21,7 +21,7 @@
<key>
CFBundleSignature
</key>
<string>
????
</string>
<key>
CFBundleVersion
</key>
<string>
1.0.0.201606170
3
</string>
<string>
1.0.0.201606170
4
</string>
<key>
Fabric
</key>
<dict>
<key>
APIKey
</key>
...
...
js/components/DeliveryStats.js
View file @
995f0f0
...
...
@@ -2,6 +2,7 @@
import
React
,
{
Component
}
from
'react'
;
import
FixedHeaderList
from
'./FixedHeaderList'
;
import
LoadingIndicator
from
'./indicator/LoadingIndicator'
;
import
{
StyleSheet
,
...
...
@@ -42,6 +43,7 @@ export default class DeliveryStats extends Component {
hideLoadingFooter
=
{
this
.
props
.
hideLoadingFooter
}
requestData
=
{
this
.
props
.
requestData
}
/
>
{
showDatePickerIOS
}
{
!
this
.
props
.
hideLoadingFooter
?
null
:
<
LoadingIndicator
isVisible
=
{
this
.
props
.
isFetching
}
/>
}
<
/View
>
);
}
...
...
js/components/RefoundStatistics.js
View file @
995f0f0
...
...
@@ -15,7 +15,8 @@ import TrendTextSection from './TrendTextSection';
import
Placeholder
from
'./Placeholder'
;
import
CalendarTrigger
from
'./calendar/CalendarTrigger'
;
import
CalendarPicker
from
'./calendar/CalendarPicker'
;
import
ChartView
from
'./chart/ChartView'
import
ChartView
from
'./chart/ChartView'
;
import
LoadingIndicator
from
'./indicator/LoadingIndicator'
;
export
default
class
RefoundStatistics
extends
Component
{
...
...
@@ -107,7 +108,9 @@ export default class RefoundStatistics extends Component {
xData
=
{
this
.
props
.
sixMonths
}
yData
=
{
this
.
props
.
sixMonthValue
}
/
>
<
LoadingIndicator
isVisible
=
{
this
.
props
.
isFetching
}
/
>
{
this
.
state
.
showPicker
?
<
CalendarPicker
calendarModes
=
{
this
.
calendarModes
}
selectMode
=
{
this
.
state
.
selectMode
}
selected
=
{
this
.
state
.
selected
}
onCancel
=
{
this
.
onCancel
}
onOK
=
{
this
.
onOK
}
/> : null
}
<
/ScrollView
>
...
...
js/components/RequestStats.js
View file @
995f0f0
...
...
@@ -2,6 +2,7 @@
import
React
,
{
Component
}
from
'react'
;
import
FixedHeaderList
from
'./FixedHeaderList'
;
import
LoadingIndicator
from
'./indicator/LoadingIndicator'
;
import
{
StyleSheet
,
...
...
@@ -42,6 +43,7 @@ export default class RequestStats extends Component {
hideLoadingFooter
=
{
this
.
props
.
hideLoadingFooter
}
requestData
=
{
this
.
props
.
requestData
}
/
>
{
showDatePickerIOS
}
{
!
this
.
props
.
hideLoadingFooter
?
null
:
<
LoadingIndicator
isVisible
=
{
this
.
props
.
isFetching
}
/>
}
<
/View
>
);
}
...
...
js/components/SaleStatistics.js
View file @
995f0f0
...
...
@@ -6,7 +6,8 @@ import TrendTextSection from './TrendTextSection';
import
Placeholder
from
'./Placeholder'
;
import
CalendarTrigger
from
'./calendar/CalendarTrigger'
;
import
CalendarPicker
from
'./calendar/CalendarPicker'
;
import
ChartView
from
'./chart/ChartView'
import
ChartView
from
'./chart/ChartView'
;
import
LoadingIndicator
from
'./indicator/LoadingIndicator'
;
const
{
Component
,
...
...
@@ -110,7 +111,7 @@ export default class SaleStatistics extends Component {
}
render
()
{
return
(
<
ScrollView
contentContainerStyle
=
{
styles
.
contentContainer
}
>
<
CalendarTrigger
date
=
{
this
.
state
.
selectdDate
}
toogleSelector
=
{
this
.
toogleSelector
}
/
>
...
...
@@ -123,9 +124,12 @@ export default class SaleStatistics extends Component {
xData
=
{
this
.
props
.
sevenDays
}
yData
=
{
this
.
props
.
trendInSevenDays
}
/
>
<
LoadingIndicator
isVisible
=
{
this
.
props
.
isFetching
}
/
>
{
this
.
state
.
showPicker
?
<
CalendarPicker
calendarModes
=
{
this
.
calendarModes
}
selectMode
=
{
this
.
state
.
selectMode
}
selected
=
{
this
.
state
.
selected
}
onCancel
=
{
this
.
onCancel
}
onOK
=
{
this
.
onOK
}
/> : null
}
<
/ScrollView
>
);
...
...
js/components/StockStats.js
View file @
995f0f0
...
...
@@ -4,6 +4,7 @@ import React, {Component} from 'react';
import
PlainTextSection
from
'./PlainTextSection'
;
import
Placeholder
from
'./Placeholder'
;
import
LoadMoreIndicator
from
'./indicator/LoadMoreIndicator'
;
import
LoadingIndicator
from
'./indicator/LoadingIndicator'
;
import
moment
from
'moment'
;
import
{
...
...
@@ -98,6 +99,7 @@ export default class StockStats extends Component {
/
>
}}
/
>
{
!
this
.
props
.
hideLoadingFooter
?
null
:
<
LoadingIndicator
isVisible
=
{
isFetching
}
/>
}
<
/View
>
);
}
...
...
js/constants/actionTypes.js
View file @
995f0f0
...
...
@@ -64,6 +64,7 @@ export default keyMirror({
ACCOUNT_LIST_REQUEST
:
null
,
ACCOUNT_LIST_SUCCESS
:
null
,
ACCOUNT_LIST_FAILURE
:
null
,
ACCOUNT_LIST_CLEAN
:
null
,
GO_TO_SALE_STATS
:
null
,
GO_TO_REFOUND_STATS
:
null
,
...
...
@@ -77,14 +78,17 @@ export default keyMirror({
STOCK_STATS_REQUEST
:
null
,
STOCK_STATS_SUCCESS
:
null
,
STOCK_STATS_FAILURE
:
null
,
STOCK_STATS_CLEAN
:
null
,
SALE_STATS_REQUEST
:
null
,
SALE_STATS_SUCCESS
:
null
,
SALE_STATS_FAILURE
:
null
,
SALE_STATS_CLEAN
:
null
,
DELIVERY_STATS_REQUEST
:
null
,
DELIVERY_STATS_SUCCESS
:
null
,
DELIVERY_STATS_FAILURE
:
null
,
DELIVERY_STATS_CLEAN
:
null
,
CHOOSE_DELIVERY_START_DATE
:
null
,
CHOOSE_DELIVERY_END_DATE
:
null
,
SHOW_DELIVERY_DATEPICKER_IOS
:
null
,
...
...
@@ -93,6 +97,7 @@ export default keyMirror({
REQUEST_STATS_REQUEST
:
null
,
REQUEST_STATS_SUCCESS
:
null
,
REQUEST_STATS_FAILURE
:
null
,
REQUEST_STATS_CLEAN
:
null
,
CHOOSE_REQUEST_START_DATE
:
null
,
CHOOSE_REQUEST_END_DATE
:
null
,
SHOW_REQUEST_DATEPICKER_IOS
:
null
,
...
...
@@ -101,6 +106,7 @@ export default keyMirror({
REFOUND_STATS_REQUEST
:
null
,
REFOUND_STATS_SUCCESS
:
null
,
REFOUND_STATS_FAILURE
:
null
,
REFOUND_STATS_CLEAN
:
null
,
SWITCH_SHOP
:
null
,
LOGOUT
:
null
,
...
...
js/containers/AccountSettlementContainer.js
View file @
995f0f0
...
...
@@ -55,6 +55,10 @@ export default class AccountSettlementContainer extends Component {
this
.
props
.
actions
.
nextPageOfDataRequest
();
}
componentWillUnmount
()
{
this
.
props
.
actions
.
accountSettlementClean
();
}
render
()
{
let
{
actStmt
}
=
this
.
props
;
...
...
js/containers/DeliveryStatsContainer.js
View file @
995f0f0
...
...
@@ -59,7 +59,7 @@ export default class DeliveryStatsContainer extends Component {
}
componentWillUnmount
()
{
this
.
props
.
actions
.
showDatePickerIOS
(
false
,
this
.
props
.
deliveryStats
.
isStartDate
);
this
.
props
.
actions
.
deliveryStatsClean
(
);
}
_requestData
()
{
...
...
js/containers/RefoundStatisticsContainer.js
View file @
995f0f0
...
...
@@ -64,6 +64,10 @@ export default class RefoundStatisticsContainer extends Component {
this
.
props
.
actions
.
refoundStats
(
params
);
}
componentWillUnmount
()
{
this
.
props
.
actions
.
refoundStatsClean
();
}
onChangeDate
(
selected
)
{
let
monthStr
=
''
;
...
...
@@ -131,6 +135,7 @@ export default class RefoundStatisticsContainer extends Component {
sixMonths
=
{
this
.
props
.
refoundStats
.
sixMonths
.
toJS
()}
sixMonthValue
=
{
this
.
props
.
refoundStats
.
trendInSixMonth
.
toJS
()}
onChangeDate
=
{
this
.
onChangeDate
}
isFetching
=
{
this
.
props
.
refoundStats
.
isFetching
}
/
>
<
/View
>
);
...
...
js/containers/RequestStatsContainer.js
View file @
995f0f0
...
...
@@ -59,7 +59,7 @@ export default class RequestStatsContainer extends Component {
}
componentWillUnmount
()
{
this
.
props
.
actions
.
showDatePickerIOS
(
false
,
this
.
props
.
requestStats
.
isStartDate
);
this
.
props
.
actions
.
requestStatsClean
(
);
}
_requestData
()
{
...
...
js/containers/SaleStatisticsContainer.js
View file @
995f0f0
...
...
@@ -67,6 +67,10 @@ class SalestisticsContainer extends Component {
this
.
props
.
actions
.
saleStats
(
params
);
}
componentWillUnmount
()
{
this
.
props
.
actions
.
saleStatsClean
();
}
onChangeDate
(
selected
)
{
let
params
=
{};
...
...
@@ -147,6 +151,7 @@ class SalestisticsContainer extends Component {
sevenDays
=
{
this
.
props
.
saleStats
.
sevenDays
.
toJS
()}
trendInSevenDays
=
{
this
.
props
.
saleStats
.
trendInSevenDays
.
toJS
()}
onChangeDate
=
{
this
.
onChangeDate
}
isFetching
=
{
this
.
props
.
saleStats
.
isFetching
}
/
>
<
/View
>
);
...
...
js/containers/StockStatsContainer.js
View file @
995f0f0
...
...
@@ -57,6 +57,10 @@ export default class StockStatsContainer extends Component {
this
.
_requestData
();
}
componentWillUnmount
()
{
this
.
props
.
actions
.
stockStatsClean
();
}
_requestData
()
{
let
params
=
{
page
:
this
.
props
.
stockStats
.
currentPage
+
1
,
...
...
js/reducers/accountSettlement/accountSettlementActions.js
View file @
995f0f0
...
...
@@ -6,6 +6,7 @@ const {
ACCOUNT_LIST_REQUEST
,
ACCOUNT_LIST_SUCCESS
,
ACCOUNT_LIST_FAILURE
,
ACCOUNT_LIST_CLEAN
,
}
=
require
(
'../../constants/actionTypes'
).
default
;
...
...
@@ -57,3 +58,9 @@ export function nextPageOfDataRequest() {
};
}
export
function
accountSettlementClean
()
{
return
{
type
:
ACCOUNT_LIST_CLEAN
,
}
}
...
...
js/reducers/accountSettlement/accountSettlementReducer.js
View file @
995f0f0
...
...
@@ -7,6 +7,7 @@ const {
ACCOUNT_LIST_REQUEST
,
ACCOUNT_LIST_SUCCESS
,
ACCOUNT_LIST_FAILURE
,
ACCOUNT_LIST_CLEAN
,
SWITCH_SHOP
,
LOGOUT
,
}
=
require
(
'../../constants/actionTypes'
).
default
;
...
...
@@ -38,6 +39,7 @@ export default function messageReducer(state = initialState, action) {
return
nextState
;
}
break
;
case
ACCOUNT_LIST_CLEAN
:
case
SWITCH_SHOP
:
case
LOGOUT
:
return
initialState
;
...
...
js/reducers/deliveryStats/deliveryStatsActions.js
View file @
995f0f0
...
...
@@ -6,6 +6,7 @@ const {
DELIVERY_STATS_REQUEST
,
DELIVERY_STATS_SUCCESS
,
DELIVERY_STATS_FAILURE
,
DELIVERY_STATS_CLEAN
,
CHOOSE_DELIVERY_START_DATE
,
CHOOSE_DELIVERY_END_DATE
,
SHOW_DELIVERY_DATEPICKER_IOS
,
...
...
@@ -123,3 +124,9 @@ export function requestData(params) {
})
};
}
export
function
deliveryStatsClean
()
{
return
{
type
:
DELIVERY_STATS_CLEAN
,
}
}
...
...
js/reducers/deliveryStats/deliveryStatsReducer.js
View file @
995f0f0
...
...
@@ -7,6 +7,7 @@ const {
DELIVERY_STATS_REQUEST
,
DELIVERY_STATS_SUCCESS
,
DELIVERY_STATS_FAILURE
,
DELIVERY_STATS_CLEAN
,
CHOOSE_DELIVERY_START_DATE
,
CHOOSE_DELIVERY_END_DATE
,
SHOW_DELIVERY_DATEPICKER_IOS
,
...
...
@@ -69,7 +70,7 @@ export default function deliveryStatsReducer(state = initialState, action) {
let
nextState
=
action
.
isStartDate
?
state
.
set
(
'startDay'
,
action
.
selectedDate
)
:
state
.
set
(
'endDay'
,
action
.
selectedDate
);
return
nextState
;
}
case
DELIVERY_STATS_CLEAN
:
case
SWITCH_SHOP
:
case
LOGOUT
:
return
initialState
;
...
...
js/reducers/refoundStatistics/refoundStatisticsActions.js
View file @
995f0f0
...
...
@@ -6,6 +6,7 @@ const {
REFOUND_STATS_REQUEST
,
REFOUND_STATS_SUCCESS
,
REFOUND_STATS_FAILURE
,
REFOUND_STATS_CLEAN
,
}
=
require
(
'../../constants/actionTypes'
).
default
;
...
...
@@ -44,3 +45,9 @@ export function refoundStats(params) {
};
}
export
function
refoundStatsClean
()
{
return
{
type
:
REFOUND_STATS_CLEAN
,
}
}
...
...
js/reducers/refoundStatistics/refoundStatisticsReducer.js
View file @
995f0f0
...
...
@@ -9,7 +9,7 @@ const {
REFOUND_STATS_REQUEST
,
REFOUND_STATS_SUCCESS
,
REFOUND_STATS_FAILURE
,
REFOUND_STATS_CLEAN
,
SWITCH_SHOP
,
LOGOUT
,
}
=
require
(
'../../constants/actionTypes'
).
default
;
...
...
@@ -69,6 +69,7 @@ export default function refoundStatisticsReducer(state = initialState, action) {
.
set
(
'error'
,
action
.
payload
);
}
break
;
case
REFOUND_STATS_CLEAN
:
case
SWITCH_SHOP
:
case
LOGOUT
:
return
initialState
;
...
...
js/reducers/requestStats/requestStatsActions.js
View file @
995f0f0
...
...
@@ -6,6 +6,7 @@ const {
REQUEST_STATS_REQUEST
,
REQUEST_STATS_SUCCESS
,
REQUEST_STATS_FAILURE
,
REQUEST_STATS_CLEAN
,
CHOOSE_REQUEST_START_DATE
,
CHOOSE_REQUEST_END_DATE
,
SHOW_REQUEST_DATEPICKER_IOS
,
...
...
@@ -102,3 +103,9 @@ export function requestData(params) {
})
};
}
export
function
requestStatsClean
()
{
return
{
type
:
REQUEST_STATS_CLEAN
,
}
}
...
...
js/reducers/requestStats/requestStatsReducer.js
View file @
995f0f0
...
...
@@ -7,6 +7,7 @@ const {
REQUEST_STATS_REQUEST
,
REQUEST_STATS_SUCCESS
,
REQUEST_STATS_FAILURE
,
REQUEST_STATS_CLEAN
,
CHOOSE_REQUEST_START_DATE
,
CHOOSE_REQUEST_END_DATE
,
SHOW_REQUEST_DATEPICKER_IOS
,
...
...
@@ -69,6 +70,7 @@ export default function requestStatsReducer(state = initialState, action) {
let
nextState
=
action
.
isStartDate
?
state
.
set
(
'startDay'
,
action
.
selectedDate
)
:
state
.
set
(
'endDay'
,
action
.
selectedDate
);
return
nextState
;
}
case
REQUEST_STATS_CLEAN
:
case
SWITCH_SHOP
:
case
LOGOUT
:
return
initialState
;
...
...
js/reducers/saleStatistics/saleStatisticsActions.js
View file @
995f0f0
...
...
@@ -15,6 +15,7 @@ const {
SALE_STATS_REQUEST
,
SALE_STATS_SUCCESS
,
SALE_STATS_FAILURE
,
SALE_STATS_CLEAN
,
}
=
require
(
'../../constants/actionTypes'
).
default
;
...
...
@@ -53,3 +54,9 @@ export function saleStats(params) {
};
}
export
function
saleStatsClean
()
{
return
{
type
:
SALE_STATS_CLEAN
,
}
}
...
...
js/reducers/saleStatistics/saleStatisticsReducer.js
View file @
995f0f0
...
...
@@ -20,6 +20,7 @@ const {
SALE_STATS_SUCCESS
,
SALE_STATS_FAILURE
,
SALE_STATS_CLEAN
,
SWITCH_SHOP
,
LOGOUT
,
...
...
@@ -79,6 +80,7 @@ export default function saleStatisticsReducer(state = initialState, action) {
return
state
.
set
(
'isFetching'
,
false
)
.
set
(
'error'
,
action
.
payload
);
case
SALE_STATS_CLEAN
:
case
SWITCH_SHOP
:
case
LOGOUT
:
return
initialState
;
...
...
js/reducers/stockStats/stockStatsActions.js
View file @
995f0f0
...
...
@@ -6,7 +6,7 @@ const {
STOCK_STATS_REQUEST
,
STOCK_STATS_SUCCESS
,
STOCK_STATS_FAILURE
,
STOCK_STATS_CLEAN
,
}
=
require
(
'../../constants/actionTypes'
).
default
;
export
function
request
()
{
...
...
@@ -49,6 +49,12 @@ export function requestData(params) {
};
}
export
function
stockStatsClean
()
{
return
{
type
:
STOCK_STATS_CLEAN
,
}
}
let
testStockStatsData
=
{
sum
:
'100'
,
totalAmount
:
'100000.00'
,
...
...
js/reducers/stockStats/stockStatsReducer.js
View file @
995f0f0
...
...
@@ -7,7 +7,7 @@ const {
STOCK_STATS_REQUEST
,
STOCK_STATS_SUCCESS
,
STOCK_STATS_FAILURE
,
STOCK_STATS_CLEAN
,
SWITCH_SHOP
,
LOGOUT
,
}
=
require
(
'../../constants/actionTypes'
).
default
;
...
...
@@ -40,6 +40,7 @@ export default function stockStatsReducer(state = initialState, action) {
.
set
(
'error'
,
action
.
playload
);
return
nextState
;
}
case
STOCK_STATS_CLEAN
:
case
SWITCH_SHOP
:
case
LOGOUT
:
return
initialState
;
...
...
js/reducers/user/userActions.js
View file @
995f0f0
...
...
@@ -225,10 +225,10 @@ export function pwdModifySubmit(pid, oldPwd, newPwd,newPwdConfirm) {
})
.
catch
((
error
)
=>
{
Alert
.
alert
(
error
.
message
||
'服务错误'
,
''
,
[{
text
:
'OK'
}]
);
'修改失败'
,
error
.
message
?
error
.
message
:
'服务错误'
,
[{
text
:
'OK'
}]
);
dispatch
(
modifySubmitFailure
(
error
));
});
};
...
...
js/services/HomeService.js
View file @
995f0f0
...
...
@@ -10,7 +10,7 @@ export default class UserService {
}
async
overview
(
shopId
)
{
let
dateId
=
moment
().
subtract
(
1
,
'days'
).
format
(
'YYYYMMDD'
);
//20160524
let
dateId
=
moment
().
format
(
'YYYYMMDD'
);
//20160524
return
await
this
.
api
.
get
({
url
:
''
,
body
:
{
...
...
Please
register
or
login
to post a comment