| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486 | <template>	<view class="content">		<view class="cont" v-if="prescribe!=null">			<view class="other-info"  >				<view class="title">处方笺</view>				<view class="item">					<view class="left">						<text class="label">医生姓名:</text>						<text class="text">{{prescribe.doctorName || '--'}} </text>					</view>				</view>				<view class="item">					<view class="left">						<text class="label">患者姓名:</text>						<text class="text">{{prescribe.userFamilyName || '--'}} </text>					</view>				</view>				<view class="item">					<view class="left">						<text class="label">患者年龄:</text>						<text class="text">{{prescribe.userFamilyAge || '--'}}岁 </text>					</view>				</view>				<view class="item">					<view class="left">						<text class="label">患者性别:</text>						<text class="text">{{prescribe.userFamilyGender==1?"男":"女"}} </text>					</view>				</view>				 			</view>			<view class="other-info "  >				<view class="item">					<view class="left">						<text class="label">处方单号:</text>						<text class="text">{{prescribe.pid || '--'}}</text>					</view>				</view>				<view class="item">					<view class="left">						<text class="label">开方时间:</text>						<text class="text">{{prescribe.createdTime || '--'}}</text>					</view>				</view>				<view class="item">					<view class="left">						<text class="label">医生诊断:</text>						<view class="text">{{prescribe.tags || '--'}}</view>					</view>				</view>				<view class="item" v-if="prescribe.status==2">					<view class="left">						<text class="label">审核意见:</text>						<text class="text">{{prescribe.reason}}</text>					</view>				</view>				<view class="item">					<view class="left">						<text class="label">审方时间:</text>						<text class="text">{{prescribe.auditTime || '--'}}</text>					</view>				</view>				<view class="item">					<view class="left">						<text class="label">审方药师:</text>						<text class="text">{{prescribe.auditApothecaryName || '--'}}</text>					</view>				</view>			</view>			<view class="drug-cont"  >				<view class="title">药品信息</view>				<view class="drug-item" v-for="(item) in drugs">					<view class="drug">						<view class="left">							<image :src="item.image==''?'https://bjyjb-1362704775.cos.ap-chongqing.myqcloud.com/shop/image/drug.svg':item.image"  ></image>							<view class="name-cont">								<view class="name-box">									<!-- <view class="tag" v-if="item.drugType==1">西药</view>									<view class="tag" v-if="item.drugType==2">中药</view> -->									<view class="name">{{item.drugName}}</view>								</view>								<view class="spec">{{item.spec}}</view>								<view class="price">									<view class="left">										<!-- {{item.drugPrice}}元 -->									</view>									<view class="num" v-if="item.drugType==1">X{{item.amount}}</view>								</view>							</view>						</view>					</view>					<!-- v-if="item.drugType==1" -->					<view class="drug-use">						<!-- <view class="name">用药频率:{{item.usageFrequencyUnit}}</view>						<view class="name">单次用量:{{item.usagePerUseCount}}</view> -->						<view class="name">使用说明:{{item.instructions}}</view>						<!-- <view class="name">备注:{{item.remark}} </view> -->					</view>									</view>			</view>			<!-- <view class="other-info" v-if="prescribe.prescribeType==2" >				<view class="title left">用药说明</view>				<view class="item">					<view class="left">						<text class="label">用药数量:</text>						<text class="text"> {{usage.counts}}</text>					</view>				</view>				<view class="item">					<view class="left">						<text class="label">用药频率:</text>						<text class="text"> {{usage.usageFrequencyUnit}}</text>					</view>				</view>				<view class="item">					<view class="left">						<text class="label">单次用量:</text>						<text class="text">{{usage.usagePerUseCount}} </text>					</view>				</view>				<view class="item">					<view class="left">						<text class="label">用药方法:</text>						<text class="text">{{usage.usageMethod}} </text>					</view>				</view>				<view class="item">					<view class="left">						<text class="label">备注:</text>						<text class="text">{{usage.remark}}  </text>					</view>				</view>							</view>			<view  v-if="prescribe.status==1" class="other-info">				<view class="sign">					出方医生签名					<image :src="prescribe.doctorSignUrl"></image>				</view>				<view class="sign">					处方医生签名					<image :src="prescribe.prescribeDoctorSignUrl"></image>				</view>				<view class="sign">					药师签名					<image :src="prescribe.drugDoctorSignUrl"></image>				</view>			</view> -->			<view class="drug-cont" v-if="prescribe.dstFilePath">				<view class="title">处方单</view>				<image style="width: 100%;" :src="prescribe.dstFilePath" mode="widthFix" @click="showImg"></image>			</view>			<view class="btn-box"  v-if="source!='order'&&prescribe.status==0">				<view class="btn pay" @click="addPrescribe">进入开方</view>			</view>			<view class="btn-box"  v-if="source!='order'&&prescribe.storeOrderId!=null&&prescribe.storeOrderId>0&&prescribe.status==1">				<view class="btn pay" @click="navTo('/pages_order/storeOrderDetail?orderId='+prescribe.storeOrderId)">药品订单</view>			</view>		</view>	</view></template> <script  >	import {getPrescribeById} from '@/api/prescribe.js'	export default {		data() {			return {				doctor:null,				drugs:[],				prescribe:null,				prescribeId:null,				usage:{},				source: '', // order从订单详情来的			}		},		 		onLoad(options) {			this.source = options.source || ''			if(options.prescribeId!=null){				this.prescribeId=options.prescribeId;			}			else if (options.hasOwnProperty('q') && options.q) {				// 通过下面这步解码,可以拿到url的值				const url = decodeURIComponent(options.q)				// // 对url中携带的参数提取处理				const obj = this.$urlToObj(url)				this.prescribeId=obj.prescribeId;			}		},		onShow() {			this.getPrescribeById();		},		methods: {			showImg(item) {				 //预览图片				 uni.previewImage({				 	urls: [this.prescribe.dstFilePath],				 	current: 0				 });			},			navTo(url){				uni.navigateTo({					url: url				})			},			copyOrderSn() {				uni.setClipboardData({					data: this.order.orderSn,					success: function () {						uni.showToast({							title:'复制成功',							icon:'none'						})					}				})			},			getPrescribeById(){				var data={prescribeId:this.prescribeId}				getPrescribeById(this.prescribeId).then(					res => {						if(res.code==200){							this.prescribe=res.data;							this.drugs=res.data.drugRspList;							// this.doctor=res.data.doctor;							this.usage=JSON.parse(this.prescribe.usageJson)													}					},					err => {					}				);							},			 			navTo(url){				uni.navigateTo({					url: url				})			},			addPrescribe() {				if(!this.prescribe.jumpUrl) {					uni.showToast({						icon:'none',						title: "暂无开方链接",					});					return				}				uni.navigateTo({				 	url: '/pages/index/webview?url='+encodeURIComponent(this.prescribe.jumpUrl)				})			}		}	}</script><style lang="scss">	page{		background: #f6f6f6;	}</style><style scoped lang="scss">	.content{		position: relative;		.cont{			position: relative;			padding: 0rpx 20rpx 120rpx;			z-index: 999;			width: 100%;			display: flex;			flex-direction: column;		}		 		 		.other-info{			margin-top: 20upx;			background-color: #fff;			border-radius: 20upx;			padding: 0 30upx;			.title{				text-align: center;				height: 80upx;				line-height: 80upx;				font-size: 32upx;				color: #000;				font-weight: bold;							}			.left{				text-align: left;			}			.item{				min-height: 80upx;				display: flex;				align-items: center;				justify-content: space-between;				&:last-child{					border-bottom: none;				}				.left{					flex: 1;					display: flex;					align-items: center;					.label{						min-width: 140rpx;						font-size: 28upx;						color: #000;					}					.text{						font-size: 28upx;						color: #1b1b1b;					}				}							}			.sign{				width: 100%;				display: flex;				align-items: center;				justify-content: flex-start;				margin: 15rpx 0rpx;				color: #9B9B9B;				font-size: 24rpx;				image{					margin-left: 20rpx;					width: 240rpx;					height: 100rpx;				}			}		}		.drug-cont{			margin-top: 20upx;			background-color: #fff;			border-radius: 20upx;			padding: 0 30upx 30rpx;			.title{				height: 80upx;				line-height: 80upx;				font-size: 30upx;				color: #000;				font-weight: bold;				border-bottom: 1upx solid #eeeeee;				margin-bottom: 10rpx;			}			.drug-item{				padding: 15rpx;				background-color: #f8f8f8;				display: flex;				flex-direction: column;				align-items: flex-start;				justify-content: flex-start;				margin-bottom: 10rpx;				&:last-child{					margin-bottom: 0rpx;				}				.drug{					width: 100%;					display: flex;					align-items: flex-start;					justify-content: space-between;					.left{						width:100%;						display: flex;						align-items: flex-start;						justify-content: flex-start;						image{							border-radius: 5rpx;							width:100rpx;							height:100rpx;						}						.name-cont{							width: calc(100% - 110rpx);							margin-left: 10rpx;							display: flex;							flex-direction: column;							align-items: flex-start;							justify-content: space-between;							.name-box{								width: 100%;								display: flex;								align-items: flex-start;								justify-content: flex-start;								.tag{									width: 80rpx;									display: flex;									align-items: center;									justify-content: center;									border-radius: 5rpx;									font-size: 24rpx;									border: 1rpx solid #2583EB;									color: #2583EB;									background-color: #f6fefb;								}								.name{									width: calc(100% - 85rpx );									margin-left: 5rpx;									font-size: 30rpx;									color: #111;								}															}							.spec{								font-size: 24rpx;								color: #bfbfbf;							}							.price{								width: 100%;								display: flex;								align-items: center;								justify-content: space-between;								.left{									font-size: 24rpx;									color: red;								}								.num{									font-size: 26rpx;									color: #111;								}							}						}					}								}				.drug-use{					margin: 10rpx 0rpx;					.name{						margin-top: 10rpx;						font-size: 24rpx;						color: #bfbfbf;					}				}				.btns{					width: 100%;					display: flex;					align-items: center;					justify-content: flex-end;					.btn{						margin-left: 10rpx;						border-radius: 30rpx;						border: 1rpx solid #2583EB;						color: #2583EB;						font-size: 26rpx;						padding: 5rpx 15rpx;					}					.red{						border: 1rpx solid red;						color: red;					}					.green{						border: 1rpx solid #2583EB;						color: #2583EB;					}				}				 			}		}		.btn-box{		 	height: 100rpx;		 	z-index: 9999;		 	width: 100%;		 	padding: 0rpx 30upx;		 	position: fixed;		 	bottom: 0;		 	left: 0;		 	box-sizing: border-box;		 	background-color: #ffffff;		 	display: flex;		 	align-items: center;		 	justify-content: flex-end;		 	.btn{				padding: 15rpx 30rpx;				margin-left: 10rpx;		 		text-align: center;		 		font-size: 28upx;		 		font-family: PingFang SC;		 		color: #FFFFFF;		 		background: #2583EB;		 		border-radius: 45upx;		 	}			.red{				border: 1rpx solid #db5053;				background: #db5053;				color: #FFFFFF;			}		}	}</style>
 |