|
@@ -19,19 +19,24 @@ export default (props) => {
|
19
|
19
|
setEndDate(e.detail.value)
|
20
|
20
|
}
|
21
|
21
|
const handelShare = () => {
|
22
|
|
- if (roomNum != '' && startDate != '' && endDate != '') {
|
23
|
|
- shareRoom({ hotelId: room.hotelId, personNum: roomNum, roomId: room.roomId, startDate: startDate, endDate: endDate }).then((res) => {
|
24
|
|
- onFinish(res)
|
25
|
|
- setStartDate('')
|
26
|
|
- setEndDate('')
|
27
|
|
- setRoomNum()
|
28
|
|
- })
|
29
|
|
- }
|
|
22
|
+ var myDate = new Date();
|
|
23
|
+ shareRoom({
|
|
24
|
+ hotelId: room.hotelId,
|
|
25
|
+ personNum: roomNum == '' ? 0 : roomNum, roomId: room.roomId,
|
|
26
|
+ startDate: startDate == '' ? myDate.toLocaleDateString() : startDate,
|
|
27
|
+ endDate: endDate == '' ? myDate.toLocaleDateString() : endDate
|
|
28
|
+ }).then((res) => {
|
|
29
|
+ onFinish(res)
|
|
30
|
+ setStartDate('')
|
|
31
|
+ setEndDate('')
|
|
32
|
+ setRoomNum()
|
|
33
|
+ })
|
|
34
|
+
|
30
|
35
|
}
|
31
|
36
|
return (
|
32
|
37
|
<Popup show={showCutover} onClose={onClose}>
|
33
|
38
|
<View className='from-room srl'>
|
34
|
|
- <View style={{marginBottom:'25px'}}>
|
|
39
|
+ <View style={{ marginBottom: '25px' }}>
|
35
|
40
|
<View className='rzline' /><Label className='srl mg'>请输入入住人信息</Label><View className='rzline' />
|
36
|
41
|
</View>
|
37
|
42
|
<View className='srleft'>
|
|
@@ -54,57 +59,7 @@ export default (props) => {
|
54
|
59
|
<Button className='cancel' onClick={onClose}>取消</Button>
|
55
|
60
|
<Button className='btn' onClick={handelShare}>分享</Button>
|
56
|
61
|
</View>
|
57
|
|
-
|
58
|
|
-
|
59
|
|
-
|
60
|
|
-
|
61
|
|
- {/* <mp-form >
|
62
|
|
- <Label style={{color:'black'}}>请输入入住人信息</Label>
|
63
|
|
- <mp-cells footer=' ' >
|
64
|
|
- <mp-cell title='入住人数:' extClass='font'>
|
65
|
|
- <Input focus dataField='nm' onInput={(e) => setRoomNum(e.detail.value)} value={roomNum} type='number' placeholder='请输入入住人数' />
|
66
|
|
- </mp-cell>
|
67
|
|
- <mp-cell title='入住开始时间:' extClass='font'>
|
68
|
|
- <Picker mode='date' onChange={handelStartDate}>
|
69
|
|
- {startDate == '' ? '请选择入住开始时间' : startDate}
|
70
|
|
- </Picker>
|
71
|
|
- </mp-cell>
|
72
|
|
- <mp-cell title='入住结束时间:' extClass='font'>
|
73
|
|
- <Picker mode='date' onChange={handelEndDate}>
|
74
|
|
- {endDate == '' ? '请选择入住结束时间' : endDate}
|
75
|
|
- </Picker>
|
76
|
|
- </mp-cell>
|
77
|
|
- <mp-cell>
|
78
|
|
- <Button className='cancel' onClick={onClose}>取消</Button><Button className='btn' onClick={handelShare}>分享</Button>
|
79
|
|
- </mp-cell>
|
80
|
|
- </mp-cells>
|
81
|
|
- </mp-form> */}
|
82
|
62
|
</View>
|
83
|
|
-
|
84
|
|
-
|
85
|
|
-
|
86
|
|
-
|
87
|
|
-
|
88
|
|
-
|
89
|
|
-
|
90
|
|
- {/* <View className='from-room'>
|
91
|
|
- <Label style={{ color: 'black' }}>请输入入住人信息</Label>
|
92
|
|
- <View className='flex'>
|
93
|
|
- <Label>入住人数:</Label><Input focus dataField='nm' onInput={(e) => setRoomNum(e.detail.value)} value={roomNum} type='number' placeholder='请输入入住人数' /></View>
|
94
|
|
- <View className='flex'>
|
95
|
|
- <Label>入住开始时间:</Label>
|
96
|
|
- <Picker mode='date' className='picker' onChange={handelStartDate}>
|
97
|
|
- {startDate == '' ? '请选择入住开始时间' : startDate}
|
98
|
|
- </Picker>
|
99
|
|
- </View>
|
100
|
|
- <View className='flex'>
|
101
|
|
- <Label>入住结束时间:</Label>
|
102
|
|
- <Picker className='picker' mode='date' onChange={handelEndDate}>
|
103
|
|
- {endDate == '' ? '请选择入住结束时间' : endDate}
|
104
|
|
- </Picker>
|
105
|
|
- </View>
|
106
|
|
- <View><Button className='cancel' onClick={onClose}>取消</Button><Button className='btn' onClick={handelShare}>分享</Button></View>
|
107
|
|
- </View> */}
|
108
|
63
|
</Popup>
|
109
|
64
|
)
|
110
|
65
|
}
|