auditorium.vue
6.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
<template>
<view class="page">
<pyh-nv ref="nv" :config="nvConfig"></pyh-nv>
<view class="listBox" :style="{'padding-top':(pageTop +'px')}">
<view class="content">
<view class="message-list">
<view class="info-box">
<view class="info-box-list">
<view class="serve">
<view class="serve-title">报丧人</view>
<view class="serve-right" @click="bspersonshow = true">
<text>*</text>{{bspersoninfo.name}}
<image src="../../static/down3.png"></image>
</view>
</view>
</view>
</view>
</view>
<u-picker :show="bspersonshow" @confirm="bspersonconfirm" @cancel="bspersonclose" :columns="bspersoncolumns"></u-picker>
<!-- <view class="message-list">
<view class="info-box">
<view class="info-box-list">
<view class="serve">
<view class="serve-title">礼堂时间</view>
<view class="serve-right" @click="ltsjshow = true">
<text>*</text>{{time}}
<image src="../../static/down3.png"></image>
</view>
</view>
</view>
</view>
</view> -->
<u-calendar :show="ltsjshow" mode="range" @confirm="timeconfirm" @close="timeclose"></u-calendar>
<!-- <view class="message-list">
<view class="info-box">
<view class="info-box-list">
<view class="serve" @click="ltwzshow = true">
<view class="serve-title">礼堂位置</view>
<view class="serve-right">
<text>*</text>{{from.hallLocation}}
<image src="../../static/down3.png"></image>
</view>
</view>
</view>
</view>
</view> -->
<u-picker :show="ltwzshow" @confirm="xzltwz" @cancel="ltwzclose" :columns="jclxcolumns"></u-picker>
<view class="message-list">
<view class="info-box">
<view class="info-box-list">
<view class="serve" @click="qsgxshow = true">
<view class="serve-title">亲属关系</view>
<view class="serve-right">
<text>*</text>{{from.relativeRelationship}}
<image src="../../static/down3.png"></image>
</view>
</view>
</view>
</view>
</view>
<u-picker :show="qsgxshow" @confirm="qsgxxz" @cancel="qsgxclose" :columns="qsgxcolumns"></u-picker>
<view class="message-list">
<view class="info-box">
<view class="info-box-list">
<view class="info-box-width width100">
<view>
<input v-model="from.others" class="input-text" type="text" placeholder="请输入" placeholder-class="inputtext" />
</view>
<view class="info-box-small">预约意向</view>
</view>
</view>
</view>
</view>
<view class="page-footer">
<view class="footer-buy">
<view class="cart-add" @click="open">
<view><image src="../../static/btn3.png"></image></view>
<view class="cart-add-text"><image src="../../static/phone.png"></image><text>联系电话</text></view>
</view>
<view class="buy-at" @click="funeralresult">
<image src="../../static/btn4.png"></image>
<text>立即预约</text>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
OrderType: 0,
nvConfig:{
title:"礼堂预约",
bgColor:"#ffffff",
color:"#000000",
fixedAssist:{
hide:true,
},
},
ltsjshow:false,
time:"请选择",
from:{
scheduledStartTime:"",
scheduledEndTime:"",
hallLocation:"请选择",
obituaryOrderNumber: "24681216",
others: "暂时没有",
rating: "未评价",
relativeRelationship: "请选择",
reservatorName: "",
reservatorPhone: "",
status: "等通知",
},
jclxcolumns:[
['第一栋', '第二栋']
],
ltwzshow:false,
qsgxshow:false,
qsgxcolumns:[
['爱人','兄弟','父母','其他']
],
bspersoninfo:{
name:"",
obituaryOrderNumber:"",
},
bspersonshow:false,
bspersonlist:[],
bspersoncolumns:[],
};
},
onPageScroll(e) {this.$refs.nv.pageScroll(e)},
computed:{
pageTop(){return parseInt(88*uni.getSystemInfoSync().windowWidth/750) + uni.getSystemInfoSync().statusBarHeight}
},
onLoad(params) {
this.OrderType = params.type;
this.getbsinfo();
},
methods:{
open(){
console.log("123",this.contentshow);
var that = this
uni.showModal({
title: '联系电话',
content: '如有问题请拨打电话:' + "02836241643",
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
// 获取用户的报丧记录
getbsinfo(){
console.log("userinfo",uni.getStorageSync("USERS_KEY"));
var info = {
userId:uni.getStorageSync("USERS_KEY").userId
}
this.API.getbsinfo(info).then(res=>{
console.log("获取用户报丧信息",res);
this.bzpersonlist = res.rows;
this.bspersoninfo.name = res.rows[0].deceasedName
this.bspersoninfo.obituaryOrderNumber = res.rows[0].orderNumber
var info = []
for(let i = 0;i < res.rows.length;i++){
info.push(res.rows[i].deceasedName)
}
this.bspersoncolumns.push(info)
})
},
// 礼堂时间选择
timeconfirm(e){
console.log(e);
this.from.scheduledStartTime = e[0]
var i = e.length - 1
this.from.scheduledEndTime = e[i]
this.time = this.from.scheduledStartTime + "-" + this.from.scheduledEndTime
this.ltsjshow = false
},
timeclose(){
this.ltsjshow = false
},
// 报丧人确定
bspersonconfirm(e){
this.bspersonshow = false
this.bspersoninfo.name = e.value[0]
this.bspersoninfo.obituaryOrderNumber = this.bspersonlist[e.indexs[0]].orderNumber
},
bspersonclose(){
this.bspersonshow = false
},
// 礼堂位置的确认
xzltwz(e){
console.log(e);
this.from.hallLocation = e.value[0]
this.ltwzshow = false
},
// 礼堂位置弹窗的取消
ltwzclose(){
this.ltwzshow = false
},
// 亲属关系选择
qsgxxz(e){
this.from.relativeRelationship = e.value[0]
this.qsgxshow = false
},
qsgxclose(){
this.qsgxshow = false
},
funeralresult(){
var user = uni.getStorageSync('USERS_KEY')
this.from.reservatorName = user.nickName
this.from.reservatorPhone = user.phonenumber
this.from.obituaryOrderNumber = this.bspersoninfo.obituaryOrderNumber
// this.from.handledTime = user.loginDate;
this.API.ltyy(this.from).then(res=>{
console.log("礼堂预约",res);
})
uni.navigateTo({
url: '/pages/funeralresult/funeralresult',
})
},
}
}
</script>
<style scoped lang="scss">
@import 'auditorium.scss';
</style>