|
@@ -20,10 +20,13 @@ export default class transactionCustomer extends Taro.Component {
|
20
|
20
|
],
|
21
|
21
|
recordId: undefined, // 埋点ID
|
22
|
22
|
inputValue: '',
|
23
|
|
- screenVisible: true,
|
|
23
|
+ screenVisible: false,
|
24
|
24
|
statusList: ['全部状态', '认筹', '到访', '签约'],
|
25
|
25
|
statusIndex: -1,
|
26
|
|
- dateSel: '2018-04-22',
|
|
26
|
+ visitDate: '',
|
|
27
|
+ visitDate2: '',
|
|
28
|
+ reportDate: '',
|
|
29
|
+ reportDate2: '',
|
27
|
30
|
}
|
28
|
31
|
|
29
|
32
|
componentWillUnmount() {
|
|
@@ -52,17 +55,43 @@ export default class transactionCustomer extends Taro.Component {
|
52
|
55
|
})
|
53
|
56
|
console.log(item, inx, "eeeeeeeeeeee")
|
54
|
57
|
}
|
55
|
|
- onDateChange = e => {
|
56
|
|
- console.log(e.detail.value, "e.detail.value")
|
|
58
|
+ onVisitDateChange = e => {
|
57
|
59
|
this.setState({
|
58
|
|
- dateSel: e.detail.value
|
59
|
|
- },
|
60
|
|
- console.log(this.state.dateSel, "e.detail.value")
|
61
|
|
- )
|
62
|
|
-
|
|
60
|
+ visitDate: e.detail.value
|
|
61
|
+ })
|
|
62
|
+ }
|
|
63
|
+ onVisitDateChange2 = e => {
|
|
64
|
+ this.setState({
|
|
65
|
+ visitDate2: e.detail.value
|
|
66
|
+ })
|
|
67
|
+ }
|
|
68
|
+ onReportDateChange = e => {
|
|
69
|
+ this.setState({
|
|
70
|
+ reportDate: e.detail.value
|
|
71
|
+ })
|
|
72
|
+ }
|
|
73
|
+ onReportDateChange2 = e => {
|
|
74
|
+ this.setState({
|
|
75
|
+ reportDate2: e.detail.value
|
|
76
|
+ })
|
|
77
|
+ }
|
|
78
|
+ saveBtn() {
|
|
79
|
+ this.setState({
|
|
80
|
+ screenVisible: false,
|
|
81
|
+ })
|
|
82
|
+ }
|
|
83
|
+ cancelBtn() {
|
|
84
|
+ this.setState({
|
|
85
|
+ screenVisible: false,
|
|
86
|
+ })
|
|
87
|
+ }
|
|
88
|
+ toMyCustomer() {
|
|
89
|
+ Taro.navigateTo({
|
|
90
|
+ url: `/pages/person/customerAnalysis/myCustomer`
|
|
91
|
+ })
|
63
|
92
|
}
|
64
|
93
|
renderScreenBox() {
|
65
|
|
- const { statusList, statusIndex, dateSel } = this.state
|
|
94
|
+ const { statusList, statusIndex, visitDate, visitDate2, reportDate, reportDate2 } = this.state
|
66
|
95
|
return (
|
67
|
96
|
<View className="mask">
|
68
|
97
|
<View className="content">
|
|
@@ -70,17 +99,48 @@ export default class transactionCustomer extends Taro.Component {
|
70
|
99
|
<View className="status-box">
|
71
|
100
|
{
|
72
|
101
|
statusList.map((item, index) => (
|
73
|
|
- <View className={index == statusIndex ? 'checked' : 'status-item'} onClick={this.chooseStatus.bind(this, item, index)}>{item}</View>
|
|
102
|
+ <View key={index + 'status'} className={index == statusIndex ? 'checked' : 'status-item'} onClick={this.chooseStatus.bind(this, item, index)}>{item}</View>
|
74
|
103
|
))
|
75
|
104
|
}
|
76
|
105
|
</View>
|
77
|
|
- <View>
|
78
|
|
- <Picker mode='date' onChange={this.onDateChange}>
|
|
106
|
+ <View className="time-box">
|
|
107
|
+ 到访时间:
|
|
108
|
+ <Picker mode='date' onChange={this.onVisitDateChange}>
|
|
109
|
+ <View className='picker'>
|
|
110
|
+ {visitDate}
|
|
111
|
+ {!visitDate && <Text className="placeholder">起始时间</Text>}
|
|
112
|
+ </View>
|
|
113
|
+ </Picker>-<Picker mode='date' onChange={this.onVisitDateChange2}>
|
79
|
114
|
<View className='picker'>
|
80
|
|
- 当前选择:{dateSel}
|
|
115
|
+ {visitDate2}
|
|
116
|
+ {!visitDate2 && <Text className="placeholder">结束时间</Text>}
|
81
|
117
|
</View>
|
82
|
118
|
</Picker>
|
83
|
119
|
</View>
|
|
120
|
+ <View className="time-box" style="margin-top:16px">
|
|
121
|
+ 报备时间:
|
|
122
|
+ <Picker mode='date' onChange={this.onReportDateChange}>
|
|
123
|
+ <View className='picker'>
|
|
124
|
+ {reportDate}
|
|
125
|
+ {!reportDate && <Text className="placeholder">起始时间</Text>}
|
|
126
|
+ </View>
|
|
127
|
+ </Picker>-<Picker mode='date' onChange={this.onReportDateChange2}>
|
|
128
|
+ <View className='picker'>
|
|
129
|
+ {reportDate2}
|
|
130
|
+ {!reportDate2 && <Text className="placeholder">结束时间</Text>}
|
|
131
|
+ </View>
|
|
132
|
+ </Picker>
|
|
133
|
+ </View>
|
|
134
|
+ <View className="bottom-btn">
|
|
135
|
+ <View className="save" onClick={this.saveBtn}>
|
|
136
|
+ 保存
|
|
137
|
+ </View>
|
|
138
|
+ <View className="cancel" onClick={this.cancelBtn}>
|
|
139
|
+ 取消
|
|
140
|
+ </View>
|
|
141
|
+ <View>
|
|
142
|
+ </View>
|
|
143
|
+ </View>
|
84
|
144
|
</View>
|
85
|
145
|
</View>
|
86
|
146
|
)
|
|
@@ -101,8 +161,8 @@ export default class transactionCustomer extends Taro.Component {
|
101
|
161
|
</View>
|
102
|
162
|
<View style="padding:10px">
|
103
|
163
|
{
|
104
|
|
- list.map(item => (
|
105
|
|
- <View class="item">
|
|
164
|
+ list.map((item, index) => (
|
|
165
|
+ <View class="item" key={index + 'list'} onClick={this.toMyCustomer}>
|
106
|
166
|
<Image src={require('@assets/default-avatar.png')} className='img'></Image>
|
107
|
167
|
<View className="name">
|
108
|
168
|
{item.name}
|