<template>
	<view class="app">
		<view class="content">
			<view class="name">
				服务商家
			</view>
			<view class="details">
				<view class="detailslist">
					<image src="/static/fuwutu.png" mode=""></image>
					<view class="model">
						<view class="top">
							<span>{{nursestationlist.nurseStationName}}</span>
						</view>
						<view class="bottom">
							<span>{{nursestationlist.address}}</span>
						</view>
					</view>
				</view>
				<view class="call">
					<view class="callme" @tap="gophone()">
						<u-icon name="phone-fill" color="#ffffff" size="28"></u-icon>
						联系我们
					</view>
					<view class="Navigation">
						<image src="/static/daohang.png" mode="">导航</image>
					</view>
					
				</view>
			</view>
		</view>
		<view class="content" style="height: 200rpx;">
			<view class="name">
				服务项目
			</view>
			<view class="drug">·{{orderlist.nurseItemName}} </view>
		</view>

		<view class="content" style="height: 390rpx;line-height: 60rpx;padding:3% ;">服务信息
			<view class="contacts">·联系人：{{list.patientName}}</view>
			<view class="contacts">·电话:{{list.phone}}</view>
			<view class="contacts">·地址：{{list.serviceAddress}}</view>
			<view class="contacts">·时间：{{list.serviceDate}}</view>

		</view>
		<view class="Package">套餐信息：
			<span>￥{{orderlist.nurseItemPrice}}</span>
			<view class="detail">
				·{{orderlist.nurseItemName}}
			</view>
		</view>
		<view class="Consumablespackage" v-if='orderlist.itemConsumableList'>耗材包详情：
			<span>￥{{orderlist.itemConsumableList[0].consumablePrice}}</span>
			<view class="detail" >
				·{{orderlist.itemConsumableList[0].consumableDetail}}
			</view>
		</view>
		<view class="remarks">
			<view>备注：</view>
			<input placeholder="">
		</view>
		<view class="evaluate">
			<view class="cancelorder" @tap="cancelorderment()">取消订单</view>
			<view class="cancelorder " style="background: #4C7BC9;">评价</view>
		</view>
	</view>
</template>

<script>
	import baseurl from '@/api/baseurl.js'
	import {
		getOrderPatientInfo,
		getAppStationItemInfo,
		introductionList,
		cancellationOrder
	} from '@/api/ServiceDetails/ServiceDetails.js'
	export default {
		data() {
			return {
				// patientId: 46,
				list:[],
				orderlist:[],//获取耗材包详情
				nursestationlist:[],// 护理站信息列表
				stationId:3,
				stationItemId:3,
				stationItemPriceId:4,
				nurseStationId:2,
				orderNo:'00001511774895025200',
				appointmentOrderId:16,
			}
		},
		onLoad() {
			this.getinfo()
			this.getPatientInfo()
			this.getlist()
		},
		methods: {
			getinfo() {
				getOrderPatientInfo(this.orderNo).then(res => {
					console.log(res)
					this.list = res.data;
					// console.log(this.list)
				})
			},
			// 护理站信息列表
			getlist() {
				introductionList(this.nurseStationId).then(res => {
					this.nursestationlist = res[0];
					console.log(this.nursestationlist)
				})
			},
			//获取耗材包详情
			getPatientInfo(stationId, stationItemId, stationItemPriceId) {
				getAppStationItemInfo(this.stationId, this.stationItemId, this.stationItemPriceId).then(res => {
					this.orderlist = res.data
					console.log(this.orderlist)
					//被护理人信
				})
			},
			cancelorderment(){
					uni.navigateTo({
						url: `/pages/cancelorder/cancelorder?nurseItemPrice=${this.orderlist.nurseItemPrice}`
					})
				},
		}
	}
</script>

<style lang="scss">
	.app {
		height: 135vh;
		padding: 2%;
		font-size: 36rpx;
		padding-top: 10rpx;

		// 服务商家
		.detail {
			margin-top: 3%;
			line-height: 31rpx;
			font-size: 33rpx;
			color: #666666;
			line-height: 31rpx;
			margin-left: 10%;

		}

		.name {
			width: 95%;
			height: 90rpx;
			// margin-left: 3%;
			font-size: 35rpx;
			line-height: 90rpx;
			border-bottom: 1rpx solid #D8D4D4;
			margin: 0 auto;
		}

		//按钮取消订单和评价
		.evaluate {
			display: flex;
			float: right;
			margin-top: 3%;
			font-size: 32rpx;

			.cancelorder {
				margin-left: 1%;
				width: 216rpx;
				height: 68rpx;
				background: #E1AE3C;
				border-radius: 26rpx;
				text-align: center;
				color: #ffffff;
				line-height: 68rpx;
			}
		}

		//备注
		.remarks {
			width: 94%;
			height: 382rpx;
			margin: 10rpx auto;
			padding: 3%;
			font-size: 35rpx;
			height: 96rpx;
			background: #FFFFFF;
			border-radius: 20rpx;
			margin-top: 2%;

			input {
				margin-top: -6%;
				margin-left: 15%;
			}
		}

		/* 耗材包 */
		.Consumablespackage {
			width: 94%;
			// height: 188rpx;
			margin: 10rpx auto;
			padding: 3%;
			font-size: 35rpx;
			height: 188rpx;
			background: #FFFFFF;
			border-radius: 20rpx;
			margin-top: 2%;

			span {

				font-size: 32rpx;
				color: #D43953;
				float: right;


			}
		}

		/* 套餐 */
		.Package {
			width: 94%;
			margin: 10rpx auto;
			padding: 3%;
			font-size: 35rpx;
			height: 243rpx;
			background: #FFFFFF;
			border-radius: 20rpx;
			margin-top: 2%;

			span {

				font-size: 32rpx;
				color: #D43953;
				float: right;


			}
		}

		//服务项目和服务商家
		.content {
			width: 95%;
			height: 336rpx;
			background: #FFFFFF;
			box-shadow: 0px 9px 31px 9px rgba(0, 0, 0, 0.03);
			border-radius: 20px;
			margin: 0 auto;
			font-size: 35rpx;
			margin-top: 2%;

			// 服务信息
			.contacts {
				margin-top: 1%;
				font-size: 33rpx;
				margin-left: 10%;
				color: #666666;
				// line-height: 38rpx;
			}

			.drug {
				font-size: 33rpx;
				color: #666666;
				line-height: 38px;
				margin-left: 12%;
			}

			.details {
				height: 250rpx;
				.call {
					display: flex;
					margin-top: -7%;
					margin-left: 3%;
					.Navigation {
						width: 103rpx;
						height: 48rpx;
						background: #00C176;
						border-radius: 24px;
						font-size: 21rpx;
						color: #ffffff;
						line-height: 48rpx;
						margin-left: 3%;
						text-align: center;
						image {
							width: 24rpx;
							height: 24rpx;
						}
					}

					.callme {
						width: 149rpx;
						height: 48rpx;
						background: #D43953;
						border-radius: 24px;
						font-size: 21rpx;
						color: #ffffff;
						line-height: 48rpx;
						margin-left: 30%;
						text-align: center;
					}
				}

				.detailslist {
					display: flex;

					image {
						width: 182rpx;
						height: 182rpx;
						margin: 20rpx 0 0 20rpx;
					}

					.model {
						width: 70%;
						margin: 30rpx 0 0 20rpx;

						span {
							font-size: 33rpx;
							color: #000000;
						}

						.bottom {
							span {
								font-size: 25rpx;
								color: #969394;
							}
						}
					}
				}

				.submit {
					width: 175rpx;
					height: 68rpx;
					line-height: 68rpx;
					background: #4C7BC9;
					border-radius: 26rpx;
					text-align: center;
					font-size: 32rpx;
					color: #FFFFFF;
					float: right;
					margin-right: 30rpx;
				}

			}
		}
	}
</style>
