funeralash.vue
7.32 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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
<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="jctimeshow = true">
<text>*</text>{{time}}
<image src="../../static/down3.png"></image>
</view>
</view>
</view>
</view>
</view> -->
<u-calendar :show="jctimeshow" 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="jclxshow = true">
<view class="serve-title">寄存类型</view>
<view class="serve-right">
<text>*</text>{{from.type}}
<image src="../../static/down3.png"></image>
</view>
</view>
</view>
</view>
</view> -->
<u-picker :show="jclxshow" @confirm="xzjclx" @cancel="jclxclose" :columns="jclxcolumns"></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="jcgwshow = true">
<text>*</text>{{from.storageLocation}}
<image src="../../static/down3.png"></image>
</view>
</view>
</view>
</view>
</view> -->
<u-picker :show="jcgwshow" @confirm="xzjcgw" @cancel="jcgwclose" :columns="jcgwcolumns"></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,
},
},
jctimeshow:false,
time:"请选择",
from:{
storageStartTime:"",
storageEndTime:"",
storageLocation:"请选择",
type:"请选择",
obituaryOrderNumber: "28827136",
others: "",
rating: "未评价",
relativeRelationship: "亲属",
reservatorName:"",
reservatorPhone: "",
status:"等通知"
},
jclxcolumns:[
['永久', '暂存']
],
jclxshow:false,
jcgwcolumns:[
['第一格', '第二格']
],
jcgwshow: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.storageStartTime = e[0]
var i = e.length - 1
this.from.storageEndTime = e[i]
this.time = this.from.storageStartTime + "-" + this.from.storageEndTime
this.jctimeshow = false
},
timeclose(){
this.jctimeshow = 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
},
// 亲属关系选择
qsgxxz(e){
this.from.relativeRelationship = e.value[0]
this.qsgxshow = false
},
qsgxclose(){
this.qsgxshow = false
},
// 寄存类型的确认
xzjclx(e){
this.from.type = e.value[0]
this.jclxshow = false
},
// 寄存类型弹窗的取消
jclxclose(){
this.jclxshow = false
},
// 寄存格位的确认
xzjcgw(e){
console.log(e);
this.from.storageLocation = e.value[0]
this.jcgwshow = false
},
// 寄存类型弹窗的取消
jcgwclose(){
this.jcgwshow = 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.API.ghjcyy(this.from).then(res=>{
console.log("骨灰寄存",res);
})
uni.navigateTo({
url: '/pages/funeralresult/funeralresult',
})
},
}
}
</script>
<style scoped lang="scss">
@import 'funeralash.scss';
</style>