Blame view

pages/mydeathdetail/mydeathdetail.vue 9.72 KB
1f3f2378   起风了   我的第一次
1
2
3
4
5
6
7
8
9
  <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="top">
  			<view class="topphone">
  				<view class="topphonebg"><image src="../../static/btn.png"></image></view>
0d8fdbbf   起风了   gps修改
10
  				<view @click="lxdh" class="topphonetext"><image src="../../static/phone1.png"></image>联系电话</view>
1f3f2378   起风了   我的第一次
11
12
  			</view>
  			<!-- <view class="topimg"><image src="../../static/img/05.jpg" mode="widthFix"></image></view> -->
0d8fdbbf   起风了   gps修改
13
14
  			<!-- <map v-if="mapshow" style="width: 100%; height: 300px;" :latitude="latitude" :longitude="longitude" :markers="covers"> -->
  			<map v-if="mapshow" style="width: 100%; height: 300px;" :latitude="latitude" :longitude="longitude" scale="18" :polyline="polyline">
1f3f2378   起风了   我的第一次
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
  			</map>
  		</view>
  			
  			<view class="message-list">
  			<view class="titleall-box">
  				<view class="titleall-left"><view class="titleall-left-line"></view>逝者信息</view>
  			</view>
  			<view class="info-box">
  				<view class="info-box-list">
  					<view class="info-box-width">
  						<view>{{info.deceasedName}}</view>
  						<view class="info-box-small">逝者姓名</view>
  					</view>
  					<view class="info-box-width">
  						<view>{{info.deceasedAge}}</view>
  						<view class="info-box-small">逝者年龄</view>
  					</view>
  				</view>
  				<view class="info-box-list">
  					<view class="info-box-width">
  						<view>{{info.deceasedSex == '0' ? '男' : '女'}}</view>
  						<view class="info-box-small">逝者性别</view>
  					</view>
  				</view>
  			</view>
  			</view>
  			
  			<view class="message-list">
  			<view class="titleall-box">
  				<view class="titleall-left"><view class="titleall-left-line"></view>预约人信息</view>
  			</view>
  			<view class="info-box">
  				<view class="info-box-list">
  					<view class="info-box-width">
  						<view>{{info.contactName}}</view>
  						<view class="info-box-small">预约人姓名</view>
  					</view>
  					<view class="info-box-width">
  						<view>{{info.contactPhone}}</view>
  						<view class="info-box-small">预约人电话</view>
  					</view>
  				</view>
1f3f2378   起风了   我的第一次
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
  			</view>
  			</view>
  			
  			<view class="message-list">
  			<view class="titleall-box">
  				<view class="titleall-left"><view class="titleall-left-line"></view>死亡相关信息</view>
  			</view>
  			<view class="info-box">
  				<view class="info-box-list">
  					<view class="info-box-width">
  						<view>{{info.deathdate}}</view>
  						<view class="info-box-small">死亡日期</view>
  					</view>
  					<view class="info-box-width">
  						<view>{{info.deathCase}}</view>
  						<view class="info-box-small">死亡原因</view>
  					</view>
  				</view>
  			</view>
  			</view>
  			
30c714a7   起风了   zh
78
79
  			<!-- <view class="message-list">
  				<view class="titleall-box">
a9c5bb83   起风了   修改
80
  					<view class="titleall-left"><view class="titleall-left-line"></view>派遣司机收敛工</view>
1f3f2378   起风了   我的第一次
81
  				</view>
30c714a7   起风了   zh
82
83
84
  				<view class="info-box">
  					<view class="info-box-list">
  						<view class="info-box-width width100">
a9c5bb83   起风了   修改
85
86
87
88
  							<view class="">
  								<view @click="sjshow = true">{{sjinfo.name}}</view>
  								<view class="info-box-small">司机</view>
  							</view>
30c714a7   起风了   zh
89
90
  						</view>
  					</view>
a9c5bb83   起风了   修改
91
  					<u-picker :show="sjshow" @confirm="sjconfirm" @cancel="sjclose" :columns="sjcolumns"></u-picker>
30c714a7   起风了   zh
92
93
  					<view class="info-box-list">
  						<view class="info-box-width width100">
a9c5bb83   起风了   修改
94
95
  							<view @click="slgshow = true">{{slginfo.name}}</view>
  							<view class="info-box-small">收敛工</view>
30c714a7   起风了   zh
96
  						</view>
1f3f2378   起风了   我的第一次
97
  					</view>
a9c5bb83   起风了   修改
98
  					<u-picker :show="slgshow" @confirm="slgconfirm" @cancel="slgclose" :columns="slgcolumns"></u-picker>
1f3f2378   起风了   我的第一次
99
100
  				</view>
  			</view> -->
1f3f2378   起风了   我的第一次
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
  		</view>
  		</view>
  	</view>
  </template>
  
  <script>
  	export default {
  		data() {
  			return {
  				OrderType: 0,
  				nvConfig:{
  					title:"报丧订单详情",
  					bgColor:"#ffffff",
  					color:"#000000",
  					fixedAssist:{
  						hide:true,
  					},
  				},
  				price:0,
  				number:0,
  				info:{},
  				fwinfo:[],
  				
  				// 地图
  				mapshow:true,
  				id:0, // 使用 marker点击事件 需要填写id
  				title: 'map',
  				latitude: 39.909,
  				longitude: 116.39742,
  				covers: [{
  					latitude: 39.909,
  					longitude: 116.39742,
  					iconPath: '../../../static/location.png'
  				}],
0d8fdbbf   起风了   gps修改
135
136
137
138
139
140
141
  				
  				polyline: [{
  				    points: [],
  				    color: "#31c27c",
  				    width: 10,
  				    arrowLine: true,
  				    borderWidth: 2 //线的边框宽度,还有很多参数,请看文档 
a9c5bb83   起风了   修改
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
  				}],
  				
  				sjinfo:{
  					name:"请选择"
  				},
  				sjshow:false,
  				sjcolumns:[
  					['男', '女']
  				],
  				slginfo:{
  					name:"请选择"
  				},
  				slgshow:false,
  				slgcolumns:[
  					['男', '女']
  				],
1f3f2378   起风了   我的第一次
158
159
160
161
162
163
164
  			};
  		},
  		onPageScroll(e) {this.$refs.nv.pageScroll(e)},
  		computed:{
  			pageTop(){return parseInt(88*uni.getSystemInfoSync().windowWidth/750) + uni.getSystemInfoSync().statusBarHeight}
  		},
  		onLoad(params) {
a9c5bb83   起风了   修改
165
166
  			this.getcllist();
  			this.getclglist();
1f3f2378   起风了   我的第一次
167
168
169
  			this.info = JSON.parse(params.info)
  			console.log(this.info);
  			this.getbsdetail(this.info.orderNumber)
a9c5bb83   起风了   修改
170
  			
1f3f2378   起风了   我的第一次
171
172
173
  			// this.OrderType = params.type;
  		},
  		methods:{
a9c5bb83   起风了   修改
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
  			// 获取车辆信息
  			getcllist(){
  				var info = {
  					pageNum: 1,
  					pageSize: 10,
  					vehicleStatus: "0",
  				}
  				this.API.getcllist(info).then(res=>{
  					console.log("车辆情况",res);
  				})
  			},
  			// 
  			sjconfirm(e){
  				this.sjshow = false
  			},
  			sjclose(){
  				this.sjshow = false
  			},
  			// 获取收敛工信息
  			getclglist(){
  				// 收敛工司机
  				var info = {
  				        pageNum: 1,
  				        pageSize: 10,
  				        position: "收敛工",
  				        status: "0",
  				};
  				this.API.getclglist(info).then(res=>{
  					console.log("收敛工",res);
  				})
  			},
  			slgconfirm(e){
  				this.slgshow = false
  			},
  			slgclose(){
  				this.slgshow = false
  			},
  			// 
0d8fdbbf   起风了   gps修改
212
213
214
215
216
217
218
219
220
221
222
223
  			lxdh(){
  				uni.showModal({
  					title: '联系电话',
  					content: '028-36241643',
  					success: function(res) {
  						if (res.confirm) {
  							console.log('点击了确认')
  						} else {
  							console.log('点击了取消')
  						}
  					}
  				})
0d8fdbbf   起风了   gps修改
224
  			},
1f3f2378   起风了   我的第一次
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
  			/**
  			 * 返回点击
  			 */
  			onBack(){
  				uni.navigateBack();
  			},
  			/**
  			 * 订单tab点击
  			 */
  			onOrderTab(type){
  				this.OrderType = type;
  				// #ifdef H5
  				uni.redirectTo({
  					url: '/pages/MyOrderList/MyOrderList?type=' + type,
  				})
  				//#endif
  			},
  			/**
  			 * 订单列表点击
  			 */
  			// onOrderList(){
  			// 	uni.navigateTo({
  			// 		url: '/pages/OrderDetails/OrderDetails',
  			// 	})
  			// },
  			// 获取订单详情
  			getbsdetail(id){
  				id = parseInt(id)
  				console.log(typeof(id));
  				this.API.getbsdetail(id).then(res=>{
  					console.log(11111);
  					console.log("用户订单",res);
0d8fdbbf   起风了   gps修改
257
258
259
260
261
  					if(res.data.vehicleNumber != null){
  						this.getGps(res.data.vehicleNumber);
  					}else{
  						this.mapshow = false
  					}
1f3f2378   起风了   我的第一次
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
  					this.number = res.data.funeralOrderDetailsInfoPo.quantityNumber
  					this.price = res.data.funeralOrderDetailsInfoPo.unitPrice
  					this.API.getspjcxx(res.data.funeralOrderDetailsInfoPo.productId).then(res1=>{
  						console.log("获取库存基础信息",res1);
  						this.fwinfo = res1.rows
  					})
  				})
  			},
  			// 获取gps定位
  			getGps(vehicleNumber){
  				var EndTime = Date.parse(new Date());
  				EndTime = this.parseTime(EndTime)
  				console.log("当前时间",EndTime);
  				var BeginTime = Date.parse(new Date()) - 1800000
  				BeginTime = this.parseTime(BeginTime)
  				var info = {
  					request:{
  						"Action":"GetVehicleTrackData",
  						"UserId":"user",
  						"Pwd":"6B18CFA67F76F079B0BFFBD773DC4494",
  						"PlateNum":vehicleNumber,
  						"ColorCode":"0",
  						"BeginTime":"20231010090000",
  						"EndTime":"20231010150000",
  						"MinSpeed":"1",
  						"NeedAddress":"0",
0d8fdbbf   起风了   gps修改
288
289
290
291
292
293
294
295
296
297
298
  						
  						// "Action":"GetVehicleGpsInfo",
  						// "UserId":"user",
  						// "Pwd":"6B18CFA67F76F079B0BFFBD773DC4494",
  						// "Vehicles":[
  						// 	{
  						// 	"PlateNum":vehicleNumber,
  						// 	"ColorCode":"1"
  						// 	}
  						// ],
  						// "NeedAddress":0
1f3f2378   起风了   我的第一次
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
  					}
  				}
  				info.request.BeginTime = BeginTime;
  				info.request.EndTime = EndTime
  				info.request = JSON.stringify(info.request)
  				this.API.getGps(info).then(res=>{
  					console.log("gps",res);
  					if(res.Msg == "未找到指定时间段内车辆的轨迹信息!"){
  						this.mapshow = false
  					}else{
  						var len = res.Data.length - 1
  						this.latitude = res.Data[len].Latitude
  						this.longitude = res.Data[len].Longitude
  						this.covers[0].latitude = res.Data[len].Latitude
  						this.covers[0].longitude = res.Data[len].Longitude
0d8fdbbf   起风了   gps修改
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
  						
  						// this.latitude = data[0][1]
  						// this.longitude = data[0][0]
  						let points = []
  						res.Data.forEach(item => {
  						    points.push({
  								latitude: item.Latitude,
  						        longitude: item.Longitude
  						    })
  						})
  						this.polyline = [{
  							points: points,
  						    color: "#31c27c",
  						    width: 4,
  						    arrowLine: true,
  						    // borderWidth: 2 //线的边框宽度,还有很多参数,请看文档 
  						}]
1f3f2378   起风了   我的第一次
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
  					}
  					
  				})
  			},
  			parseTime(EndTime){
  			    var date = new Date(EndTime);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
  			    var Y = date.getFullYear() + '';
  			    var M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1)+ '';
  			    var D = (date.getDate() < 10 ? '0'+date.getDate() : date.getDate())+ '';
  			    var h = (date.getHours() < 10 ? '0'+date.getHours() : date.getHours())+ '';
  			    var m = (date.getMinutes() < 10 ? '0'+date.getMinutes() : date.getMinutes())+ '';
  			    var s = (date.getSeconds() < 10 ? '0'+date.getSeconds() : date.getSeconds())+ '';
  			
  			    let strDate = Y+M+D+h+m+s;
  				console.log(strDate) //2020-05-08 17:44:56 
  				return strDate;
  			},
  
        /**
         * 评价点击
         */
        onEvaluate(){
  			  uni.navigateTo({
            url: '/pages/MyEvaluatePush/MyEvaluatePush'
          })
        }
  		}
  	}
  </script>
  
  <style scoped lang="scss">
  	@import 'mydeathdetail.scss';
  	.ssss{
  		
  	}
  </style>