|
@@ -18,6 +18,7 @@ class SearchProcess extends Component {
|
|
data: [],
|
|
data: [],
|
|
StageCount: [],
|
|
StageCount: [],
|
|
field: '',
|
|
field: '',
|
|
|
|
+ field_name: '',
|
|
store_id: '',
|
|
store_id: '',
|
|
};
|
|
};
|
|
}
|
|
}
|
|
@@ -48,16 +49,17 @@ class SearchProcess extends Component {
|
|
|
|
|
|
_onClickLeaf = (item) => {
|
|
_onClickLeaf = (item) => {
|
|
this._fetchStageCount(item.item.field, item.item.id);
|
|
this._fetchStageCount(item.item.field, item.item.id);
|
|
- this.setState({field: item.item.field, store_id: item.item.id});
|
|
|
|
|
|
+ this.setState({field: item.item.field, field_name: item.item.name, store_id: item.item.id});
|
|
};
|
|
};
|
|
|
|
|
|
- _onStagePress = (stage_id, event) => {
|
|
|
|
- const {field, store_id} = this.state;
|
|
|
|
|
|
+ _onStagePress = (stage_id, event, text) => {
|
|
|
|
+ const {field, store_id, field_name} = this.state;
|
|
let param = '';
|
|
let param = '';
|
|
if (field && store_id) {
|
|
if (field && store_id) {
|
|
param = field + '_' + store_id;
|
|
param = field + '_' + store_id;
|
|
}
|
|
}
|
|
- this.state.callback(stage_id, event, param);
|
|
|
|
|
|
+ const searchText = field_name + '-' + text
|
|
|
|
+ this.state.callback(stage_id, event, param, searchText);
|
|
this.props.navigation.goBack();
|
|
this.props.navigation.goBack();
|
|
};
|
|
};
|
|
|
|
|
|
@@ -65,16 +67,16 @@ class SearchProcess extends Component {
|
|
return (
|
|
return (
|
|
<View style={index % 2 === 0 ? styles.tableRowOdd : styles.tableRowEven}>
|
|
<View style={index % 2 === 0 ? styles.tableRowOdd : styles.tableRowEven}>
|
|
<Text
|
|
<Text
|
|
- onPress={() => this._onStagePress(data.stage_id, 'stage')}
|
|
|
|
|
|
+ onPress={() => this._onStagePress(data.stage_id, 'stage', '总数')}
|
|
style={[styles.tableCell, {width: '30%'}]}>{data.stage}</Text>
|
|
style={[styles.tableCell, {width: '30%'}]}>{data.stage}</Text>
|
|
<Text
|
|
<Text
|
|
- onPress={() => this._onStagePress(data.stage_id, 'total')}
|
|
|
|
|
|
+ onPress={() => this._onStagePress(data.stage_id, 'total', '总数')}
|
|
style={[styles.tableCell, {width: '20%'}]}>{data.total_count}</Text>
|
|
style={[styles.tableCell, {width: '20%'}]}>{data.total_count}</Text>
|
|
<Text
|
|
<Text
|
|
- onPress={() => this._onStagePress(data.stage_id, 'today')}
|
|
|
|
|
|
+ onPress={() => this._onStagePress(data.stage_id, 'today', '今日')}
|
|
style={[styles.tableCell, {width: '25%'}]}>{data.today_count}</Text>
|
|
style={[styles.tableCell, {width: '25%'}]}>{data.today_count}</Text>
|
|
<Text
|
|
<Text
|
|
- onPress={() => this._onStagePress(data.stage_id, 'overdue')}
|
|
|
|
|
|
+ onPress={() => this._onStagePress(data.stage_id, 'overdue', '逾期')}
|
|
style={[styles.tableCell, {width: '25%'}]}>{data.overdue_count}</Text>
|
|
style={[styles.tableCell, {width: '25%'}]}>{data.overdue_count}</Text>
|
|
</View>
|
|
</View>
|
|
);
|
|
);
|