<template>
  <view class="main">
		<uni-nav-bar dark :fixed="true" background-color="#18C7B0" status-bar left-icon="left" height="62.5rpx" width="750rpx"
			title="调配详情" @clickLeft="handleBack"
		/>
		
		<view class="content">
			<view class="header">
				<view class="ti">
					<view class="left">
						<view class="baracode">
							<w-barcode :options="preseObj"></w-barcode>
							<view class="barnum">{{v.preNo}}</view>
						</view>
					</view>
					<view class="mid">
						<text class="title">中药处方笺</text>	
					</view>
					<view class="rig"><text class="title">{{v.type=='1'?"中药处方":v.type=='1'?"中药制剂":""}}</text></view>
				</view>
				<view class="patiinfo">
					<view class="r1">
						<view class="row"><span class="we">姓名：</span>{{v.name}}</view>
						<view class="row"><span class="we">性别：</span>{{v.sex}}</view>
						<view class="row"><span class="we">年龄：</span>{{v.age}}岁</view>
						<view class="row"><span class="we">电话：</span>{{v.contactNumber}}</view>
						<view class="row"><span class="we">当前处方状态：</span>{{v.state=="1"?"配药":v.state=="2"?"煎药":v.state=="3"?"发药":v.state=="4"?"配送":""}}</view>
					</view>
					<view class="r2">
						<view class="row"><span class="we">就诊科室：</span>{{v.department}}</view>
						<view class="row"><span class="we">临床诊断：</span>{{v.disName}}—{{v.symName}}</view>
						<view class="row"><span class="we">开方时间：</span>{{v.prescriptionTime}}</view>
					</view>
					<view class="r3"><span class="we">联系地址：</span>{{v.address}}</view>
				</view>
			</view>
			<view class="rp">
				<view class="title">
					<text class="text">Rp:</text>
				</view>
				<view class="lists">
					<view class="item"  v-for="(x, i) in v.rp" :key="i">
						<view class="le tag-view" @click="handleGetRps(x)">
							<uni-tag :inverted="!selectRps.includes(x)" :text="x.matName+x.matDose+x.matUnitName"  />
						</view>
						<view class="rig">
							<view class="up"> {{x.matUsageName}}</view>
							<view class="do"> {{x.sign}}</view>
						</view>
					</view>
				</view>
				<view class="footer">
					<view class="js">
						剂数：{{v.number}}
						<view v-if="v.daijianCost!==''" class="pies_tips">
							(代煎)
						</view>
					</view>
					<view class="js">{{v.dosageForm}}</view>
					<view class="js">{{v.prescriptionUsage}}</view>
					<view class="js">每次{{v.concentration}}</view>
					<view class="js">{{v.frequency}}</view>
					<view class="freque">{{v.medicationTime}}</view>
				</view>
				<view class="rp-tips">{{v.entrust}}</view>
			</view>
			<view class="amountarea">
				<view class="amount">
					<view class="r1">
						<view class="pijw">药品金额：{{v.prescriptionSum}}</view>
					</view>
					<view class="r2">
						<view class="jyf">煎药费：{{v.daijianCost}}</view>
						<view class="psf">配送费：{{v.distributionCost}}</view>
					</view>
					<view class="r3">
						总金额：{{v.prescriptionTotalSum}}
						<!-- <view class="zjw"></view> -->
					</view>
				</view>
				<view class="service">
					<view class="kf"><span class="we">开方：</span>{{v.operateList[0].operater || ''}}</view>
					<view class="kf"><span class="we">审核：</span>{{v.operateList[1].operater || ''}}</view>
					<view class="kf"><span class="we">调配：</span>{{v.operateList[2].operater || ''}}</view>
					<view class="kf"><span class="we">复核：</span>{{v.operateList[3].operater || ''}}</view>
					<view class="kf"><span class="we">浸泡：</span>{{v.operateList[4].operater || ''}}</view>
					<view class="kf"><span class="we">煎煮：</span>{{v.operateList[5].operater || ''}}</view>
					<view class="kf"><span class="we">打包：</span>{{v.operateList[6].operater || ''}}</view>
					<view class="kf"><span class="we">发药：</span>{{v.operateList[7].operater || ''}}</view>
				</view>
			</view>
			<view class="comment">
				<view class="z">注：</view>
				<text>{{v.entrust1111}}</text>
			</view>
		</view>
		<view class="upload">
			<view class="title">上传照片</view>
			<uni-file-picker 
				:image-styles = "imageStyles"
				fileMediatype="image" 
				mode="grid" 
				:limit="3"
				:del-icon="false"
				:auto-upload="false"
				@select="selectUpload" 
			/>
		</view>
		
		<view class="cooment">
			<view class="title">备注内容</view>
			<view class="tex">
				<textarea placeholder="请输入备注内容" v-model="editForm.comments"  placeholder-style="font-size: 15rpx;" height="60rpx" @input="bindTextInput" class="input" ></textarea>
			</view>
		</view>
		<view class="radio">
			<label for="">
				<switch :checked="isPrint"  style="transform:scale(0.7)" @change="handleChange" /> 上传时直接打印标签
			</label>
		</view>
		<view class="submit">
			<button type="primary" class="bu" @click="handleSubmit">上传</button>
		</view>
		<view class="popup">
			<uni-popup ref="alertDialog" type="dialog">
				<uni-popup-dialog type="center" cancelText="不打印" confirmText="打印" title="打印标签" @confirm="dialogConfirm" @close="dialogClose">
					<view class="cotent" id="printMe">
						<view class="title">{{v.yljgName || '默默事中医院取药标签打印(门诊)'}}</view>
						<view class="body">
							<view class="lef">
								<view class="baracode">
									<w-barcode class="cav" :options="preseObj"></w-barcode>
									<view class="barnum">{{v.preNo}}</view>
								</view>
							</view>
							<view class="rig">
								<view class="hz">患者：<view class="bold">{{v.name}}，{{v.sex}}，{{v.age}}岁</view></view>
								<view class="hz">出生日期：<view class="bold">{{v.birth}}</view></view>
							</view>
						</view>
					</view>
				</uni-popup-dialog>
			</uni-popup>
		</view>
  </view>
</template>

<script>
  export default {
    name: ''
  }
</script>

<script setup>
import { onMounted, ref, getCurrentInstance } from 'vue'
import { selectOrderDetail, upload, sendToUser, updateOrderStatus } from "@/static/js/request.js"
import { saveDepoly } from '@/static/js/api.js'
import debounce from 'lodash.debounce'

import { onLoad } from '@dcloudio/uni-app'

const urlConfig = ref('http://zhongyao.fscuc.cn')
// #ifdef APP-PLUS 
const plug= uni.requireNativePlugin('Html5app-Gprinter');
// #endif

// const preseId = ref(11220822134401)
const preseObj = ref({
		code: '',
		color:['#000'], // 条形码的颜色
		bgColor: '#FFFFFF', // 背景色
		width: 200, // 宽度
		height: 50 // 高度
})

const statusArr = ref([
	{name:'配药',id:'1'},
	{name:'煎药',id:'2'},
	{name:'发药',id:'3'},
	{name:'配送',id:'4'}
])

const typeArr = ref([
	{name:'中药处方',id:'1'},
	{name:'中药制剂',id:'2'}
])

const {proxy} = getCurrentInstance()

const imageStyles =ref({
				width:112.5,
				height:112.5,
				border:{
					color:"#DDDDDD",
					width:1,
					style:'solid',
					radius:'4px'
				}
			})


const depolyImage = ref([])
const barOpations = ref({
	height: 80,
	displayValue: false
})

const selectRps = ref([])

const isPrint = ref(true)
const initPrint =ref(uni.getStorageSync('initPrint'))
const photos = ref([])
const v=ref({
	preNo:'11220822134401',
	presType:'普通处方',
	name:'李某',
	sex:'男',
	age:35,
	contactNumber:'13888888888',
	state: '发药',
	department:'中医内科',
	disName:'胃脘痛病',
	symName:'脾胃虚寒证',
	prescriptionTime:'2023-06-01 15:58',
	address:'浙江省某某事某某去某某事中医院门诊楼三楼302是',
	birth:'',
	rp:[
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'包煎',sign:'医生签名'},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'先煎',sign:'医生签名'},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'包煎',sign:'医生签名'},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'包煎',sign:'医生签名'},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'先煎',sign:'医生签名'},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'包煎',sign:'医生签名'},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'',sign:''},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'',sign:''},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'',sign:''},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'先煎',sign:''},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'包煎',sign:'医生签名'},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'先煎',sign:'医生签名'},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'包煎',sign:'医生签名'},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'包煎',sign:'医生签名'},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'先煎',sign:'医生签名'},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'包煎',sign:'医生签名'},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'',sign:''},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'',sign:''},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'',sign:''},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'先煎',sign:''},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'包煎',sign:'医生签名'},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'先煎',sign:'医生签名'},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'包煎',sign:'医生签名'},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'包煎',sign:'医生签名'},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'先煎',sign:'医生签名'},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'包煎',sign:'医生签名'},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'',sign:''},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'',sign:''},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'',sign:''},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'先煎',sign:''},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'包煎',sign:'医生签名'},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'先煎',sign:'医生签名'},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'包煎',sign:'医生签名'},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'包煎',sign:'医生签名'},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'先煎',sign:'医生签名'},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'包煎',sign:'医生签名'},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'',sign:''},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'',sign:''},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'',sign:''},
		{matName:'车前子',matDose:'6',matUnitName:'g',tips:'先煎',sign:''}
	],
	number:3,
	pies_tips:'待见',
	dosageForm:'汤剂',
	prescriptionUsage:'煎服',
	concentration:'200ml',
	frequency:'一日三次',
	medicationTime:'饭后服',
	entrust:'注意多休息，饮食清单。',
	
	prescriptionSum: '187.00',
	daijianCost:'30.00',
	distributionCost:'10.00',
	prescriptionTotleSum: '227.00',
	
	yljgName:'杭州某某高级中医院',
	operateList:[
		{py:'kf',title:'开方',operater:''},
		{py:'sh',title:'审核',operater:''},
		{py:'tp',title:'调配',operater:''},
		{py:'fh',title:'复核',operater:''},
		{py:'jp',title:'浸泡',operater:''},
		{py:'jz',title:'煎煮',operater:''},
		{py:'db',title:'打包',operater:''},
		{py:'fy',title:'发药',operater:''},
	],
		
	// 	extra_doc:'A医生',
	// 	check_doc:'B医生',
	// 	depoly:'调陪人',
	// 	review:'复核人',
	// 	steep:'浸泡',
	// 	cook:'煎煮人',
	// 	pack:'大宝人',
	// 	dispen:'发药人',
	// },
	entrust1111:'1、本处方当日有效\n  2、取药时请您当面核对药品名称、规格、数量 \n  3、延长处方用量时间原因：慢性病 其他老年病 外地 其他'
})

const editForm =ref({
	urls:[],
	userId:uni.getStorageSync('userId'),
	comments:'',
	weight:'',
	coreId: ''
})
onMounted(() => {

})


const handleRemove = (file, uploadFiles) => {
  console.log(file, uploadFiles)
}

const handlePreview = (uploadFile) => {
  console.log(uploadFile)
}


const bindTextInput = (e)=>{
	console.log(e.detail.value)
}

onLoad(async(options) => {
	console.log('options', options)
	const userId = uni.getStorageSync('userId')
	
	const params = {
		token: uni.getStorageSync('token'),
		data: {
			id: options.id || '',
			preNo: options.preId || '',
			depolyStatus: options.depolyStatus || ''
		}
	}
	console.log("params",params)
	const {data:res} = await selectOrderDetail(params)
	
	if (res.code === 200) {
		v.prescriptionTime = res.data.prescriptionTime,
		v.value.name = res.data.name,
		v.value.sex = res.data.sex,
		v.value.age = res.data.age,
		v.value.contactNumber = res.data.contactNumber
		v.value.address = res.data.address
		v.value.concentration = res.data.concentration
		v.value.frequency = res.data.frequency
		v.value.medicationTime = res.data.medicationTime
		editForm.value.coreId = v.value.id = res.data.id
		console.log('onLoad v.value.v.value.id', v.value.id)
		v.value.disName = res.data.disName,
		v.value.symName = res.data.symName,
		v.value.preNo = res.data.preNo,
		console.log('onLoad v.value.preNo', v.value.preNo)
		preseObj.value.code = v.value.preNo
		v.value.department = res.data.department,
		v.value.dosageForm = res.data.dosageForm,
		v.value.prescriptionUsage = res.data.prescriptionUsage,
		
		v.value.number = res.data.number,
		v.value.prescriptionSum = res.data.prescriptionSum,
		v.value.prescriptionTotalSum = res.data.prescriptionTotalSum,
		v.value.daijianCost = res.data.daijianCost,
		v.value.distributionCost = res.data.distributionCost,
		v.value.prescriptionTotleSum = res.data.prescriptionTotleSum,
		
		v.value.entrust = res.data.entrust
		v.value.rp = res.data.detailList
		v.value.yljgName = res.data.yljgName || ''
		v.value.birth = res.data.patientBirthday.substring(0,10) || ''
		v.value.state = res.data.state
		console.log('res.data.state',res.data.state)
		switch (res.data.state) {
			case '1':
				v.value.state = '配药'
				break
			case '2':
				v.value.state = '煎药'
				break
			case '3':
				v.value.state = '发药'
				break
			case '4':
				v.value.state = '配送'
				break
			case '5':
				v.value.state = '已分配'
				break
			case '6':
				v.value.state = '已传送'
				break
			default:
				v.value.state = '配药'
		}
		
		v.value.operateList[0].operater = res.data.doctor || ''
		v.value.operateList[1].operater = res.data.checkBy || ''
		v.value.operateList[2].operater = res.data.tiaopeiName || ''
		// 循环operateList
		const length = res.data.operateList
		if(length > 0){
			res.data.operateList.forEach((item)=>{
				switch(item.type){
					case '2':
						v.value.operateList[3].operater = item.createBy
						break
					case '3':
						v.value.operateList[4].operater = item.createBy
						break
					case '4':
						v.value.operateList[5].operater = item.createBy
						break
					case '5':
						v.value.operateList[6].operater = item.createBy
						break
					case '6':
						v.value.operateList[7].operater = item.createBy
						break
					defalut:console.log('处方签res.data.operateList数据异常',item.type)
				}
			})
		}
	}
})

const handleGetRps = (v)=>{
	console.log('handleGetRps', v)
	if(!selectRps.value.includes(v)) {
		selectRps.value.push(v)
	} else {
		selectRps.value.splice(selectRps.value.indexOf(v), 1)
	}
}

const handleChange = ()=>{
	isPrint.value = !isPrint.value
	console.log('handleChange', isPrint.value)
}

const handleBack =()=>{
	uni.navigateBack({
		delta: 1
	})
}

const handleSubmit = debounce(async()=>{
	console.log('handleSubmit>>>',editForm.value)
	
	const {data:res} = await saveDepoly({
		token: uni.getStorageSync('token'),
		data: JSON.stringify(editForm.value)
	})
	if(res.code===200){
		console.log('depoly success>>>')
		
	}
	if(isPrint.value){
		// 直接调用接口，然后打印
		// print("#printMe")
		// 打印成功后调用/userPrescription/sendToUser
		
		// if(uni.getStorageSync('initPrint')==true){
		// 	// APP-PLUS
		// 	const ret = printerTsc()
		// 	console.log('ret',ret)
		// 	// APP-PLUS
		// } else {
		// 	uni.$showMsg('打印失败，打印机未连接，请先连接打印机', 2000)
		// 	return
		// }
		
		printerTsc()
		console.log("uni.getStorageSync('token')",uni.getStorageSync('token'))
		const res = await sendToUser({
			token: uni.getStorageSync('token'),
			data: JSON.stringify({id:uni.getStorageSync('userId')})
		})
		const ret = await updateOrderStatus({
			token: uni.getStorageSync('token'),
			data: {
				id:v.value.id,
				status:'1',
			}
		})
		uni.redirectTo({
			url:"/pages/index/index"
		})
		
	} else {
		// 弹窗提醒
		console.log("handleSubmit proxy.$refs.alertDialog",proxy.$refs.alertDialog)
		proxy.$refs.alertDialog.open('center')
	}
	
},500)

const dialogConfirm = debounce(async()=>{
	console.log('dialogConfirm直接调用接口，然后打印')
	// if(uni.getStorageSync('initPrint')==true){
	// 	// #ifdef APP-PLUS
	// 	const ret = printerTsc()
	// 	console.log('ret',ret)
	// 	// #endif
	// } else {
	// 	uni.$showMsg('打印失败，打印机未连接，请先连接打印机', 2000)
	// }
	printerTsc()
	
	// 打印成功后调用/userPrescription/sendToUser
	const res = await sendToUser({
			token: uni.getStorageSync('token'),
			data: JSON.stringify({id:uni.getStorageSync('userId')})
		})
		console.log('sendToUser res',res)
	uni.redirectTo({
		url:"/pages/index/index"
	})
},500)
const dialogClose = debounce(async()=>{
	console.log('dialogClose直接调用接口，不打印')
	const ret = await updateOrderStatus({
		token: uni.getStorageSync('token'),
		data: {
			id:v.value.id,
			status:'1',
		}
	})
	uni.redirectTo({
		url:"/pages/index/index"
	})
},500)

const selectUpload = debounce((e)=>{
	uni.showLoading({
			title: "上传中"
		});
	const tempFilePaths = e.tempFilePaths;
	for (var i = 0; i < tempFilePaths.length; i++) {
		const tempFile = e.tempFiles[i];
		uni.uploadFile({
			url: urlConfig.value + '/common/upload',
			header: {
				'Authorization': 'Bearer '+uni.getStorageSync('token')
			},
			formData: {
				secretFlag: 'N',
				fileLocation: 5
			},
			filePath: tempFilePaths[i],
			name: 'file',
			success: (uploadFileRes) => {
				uni.hideLoading();
				console.log('upload success>>',uploadFileRes)
				const back = JSON.parse(uploadFileRes.data);
				console.log('upload success back >>',back)
				if (back.code == 200) {
					editForm.value.urls.push(back.url)
				}
			},
			fail: () => {
				uni.hideLoading();
				uni.showToast("上传失败，请联系开发！")
			},
			complete: function() {
				uni.hideLoading();
			}
		});
	}
},500)

const printerTsc = ()=>{
	
	//制作标签格式，
	let data=[];  //定义一个数组
	let line={};  //每添加一个，代表一行字
	
	//设置标签纸大小
	line={};
	line.width=80; //mm
	line.height=50; //mm
	line.gap=2; //标签纸之间，间隙长度 mm
	line.page=1; //打印几份
	line.direction=0, //上下反面打印，0=>正方向，1=> 反方向
	data.push(line); //每添加一个，代表一行字
	
	let filePath=plus.io.convertLocalFileSystemURL("static/OpenSans-Bold.ttf")
	//添加文字
	line={};
	line.customText=v.value.yljgName;
	line.x=100;
	line.y=40;
	line.fontSize=20;
	line.fontPath='';
	data.push(line); //每添加一个，代表一行字
	
	//添加图片
	// var imgage=plus.io.convertLocalFileSystemURL("static/gprinter.png"); 
	// line={};
	// line.image=imgage;
	// line.x=20;
	// line.y=65;
	// line.width=80;
	// data.push(line);
	
	
	// //添加黑块
	// line={};
	// line.addBar={x:10,y:10,width:200,height:4};
	// data.push(line);
	
	// //添加方框
	// line={};
	// line.addBox={x:10,y:25,xend:180,yend:50,thickness:2};
	// data.push(line);
					

	// //添加二维码		
	// line={};
	// line.qrcode="https://www.baidu.com/";
	// line.x=205; //横坐标
	// line.y=25; //纵坐标
	// line.width=3; //二维码大小,1-10 之间
	// line.rotation=0;  // 角度：有四个值：0，90，180，270 
	// data.push(line);

				//添加条型码         
	line={};
	line.barcode=v.value.preNo;
	line.x=50; //横坐标
	line.y=150; //纵坐标
	line.type="CODE128"; //条型码类型
	line.height=80; //条型码高度
	line.readable=true; //是否显示文字在条型下方
	line.rotation=0;  // 角度：有四个值：0，90，180，270
	data.push(line)
	
	//患者
	line={};
	line.text='患者：'+v.value.name+', '+v.value.sex+', '+v.value.age+'岁';
	line.x=300;
	line.y=180;
	line.fontSize=14;
	line.fontPath='';
	data.push(line); //每添加一个，代表一行字
	
	//出生
	line={};
	line.customText='出生日期：'+v.value.birth;
	line.x=300;
	line.y=240;
	line.fontSize=13;
	line.fontPath='';
	data.push(line); //每添加一个，代表一行字
	
	// let _this=this;
	
	// #ifdef APP-PLUS
	plug.printer({TSC:data}, ret => {
		// _this.tip = JSON.stringify(ret);
		// console.log('print data', data)
		// console.log('ret',ret)
		// console.log('ret.code',ret.code)
		// const err = JSON.parse(ret)
		// console.log('err',err)
		if(ret.code==1){
			uni.$showMsg('打印失败，打印机未连接，请先连接打印机', 2000)
			console.log('666')
		}
	})
	// #endif

 }

</script>

<style lang="scss">
.main {
	display: flex;
	flex-direction:column;
	justify-content:flex-start;
	width: 750rpx;
	:deep(.uni-nav-bar-text){
		font-size: 20px;
	}
	:deep(.uni-navbar-btn-text){
		font-size: 16px;
	}
	.content{
		margin: 5rpx;
		background-color: #fff;
		flex-direction:column;
		align-items: center;
		.header{
			display: flex;
			flex-direction:column;
			margin:16rpx 16rpx 0;
			.ti{
				display: flex;
				flex-direction:row;
				justify-content: space-between;
				margin-top: 15.22rpx;
				.left{
					align-items: flex-start;
					.baracode{
						display: flex;
						flex-direction:column;
						.barnum{
							font-size: 15rpx;
							display: flex;
							justify-content:center;
							align-items: center;
							letter-spacing: 0.3em;
						}
					}
				}
				.mid{
					display: flex;
					margin-right: 160rpx;
					.title{
						font-size: 23.75rpx;
						font-weight: 800;
					}
				}
				.rig{
					display: flex;
					.title{
						font-size: 16rpx;
						width: 40rpx;
						font-weight: 300;
					}
				}
			}
			.patiinfo{
				display: flex;
				flex-direction:column;
				margin-top: 25.2rpx;
				padding-bottom: 21.45rpx;
				border-bottom: 1px solid #979797;
				.r1{
					display: flex;
					flex-direction:row;
					margin-bottom:15rpx;
					.row{
						font-size: 15rpx;
						font-weight: 400;
						margin-right: 30rpx;
					}
					.we{
						color:#999999;
					}
				}
				.r2{
					display: flex;
					flex-direction:row;
					margin-bottom:15rpx;
					.row{
						font-size: 15rpx;
							font-weight: 400;
							margin-right: 30rpx;
						}
						.we{
							color:#999999;
						}
				}
				.r3{
					display: flex;
					flex-direction:row;
					font-size: 15rpx;
					.we{
						color:#999999;
					}
				}
			}
		}
		.rp{
			display: flex;
			flex-direction:column;
			margin:22.39rpx 17.36rpx 0;
			border-bottom: 1px solid #979797;
			.title{
				font-size: 22rpx;
				margin-bottom: 10rpx;
			}
			.lists{
				display: flex;
				flex-wrap: wrap;
				flex-direction: row;
				justify-content:flex-start;
				align-content:flex-start;
				margin-left:20rpx;
				height: 545rpx;
				.item{
					display: flex;
					justify-content:center;
					align-items: center;
					width: 161rpx;
					margin: 0 10rpx 20rpx 0;
					// position: relative;
					.le{
						display: flex;
						font-size: 12rpx;
						width: 100rpx;
						word-wrap: break-word;
						// z-index: 100;
						// position: absolute;
						
					}
					.tag-view:deep(.uni-tag){
						display: flex;
						justify-content:center;
						align-items: center;
						font-size: 15rpx;
						font-weight:500;
						width: 80rpx;
						padding: 6rpx 6rpx;
					}
					.rig{
						display: flex;
						flex-direction:column;
						margin-left: 5.31rpx;
						width: 200rpx;
						// z-index: 200;
						// position: absolute;
						left:120rpx;
						.up{
							margin-bottom:8rpx;
							font-size: 10rpx;
							height: 12.5rpx;
						}
						.do{
							
							font-size: 12rpx;
							height: 12.5rpx;
						}
					}
				}
			}
			.footer{
				margin: 0 10rpx 8rpx;
				display: flex;
				font-size: 15rpx;
				.js{
					display: flex;
					margin-right: 54.4rpx;
					.pies_tips{}
				}
				.freque{}
			}
			.rp-tips{
				display: flex;
				justify-content:flex-end;
				font-size: 15rpx;
				margin-right: 10rpx;
			}
		}
		.amountarea{
			display: flex;
			margin: 21.3rpx 19.38px 0;
			padding-bottom: 20.94rpx;
			border-bottom: 1px solid #979797;
			.amount{
				display: flex;
				flex-direction:column;
				.r1{
					border: 1px solid #979797;
					font-size: 15rpx;
					width: 287.5rpx;
					display: flex;
					justify-content:center;
					align-items: center;
					height: 33.75rpx;
				}
				.r2{
					display: flex;
					justify-content:center;
					align-items: center;
					font-size: 15rpx;
					height: 33.75rpx;
					width: 287.5rpx;
					border-left: 1px solid #979797;
					border-right: 1px solid #979797;
					.jyf{
						
						width: 143.93rpx;
						display: flex;
						justify-content:center;
						align-items: center;
					}
					.psf{
						border-left: 1px solid #979797;
						width: 143.93rpx;
						display: flex;
						justify-content:center;
						align-items: center;
					}
				}
				.r3{
					display: flex;
					justify-content:center;
					align-items: center;
					height: 33.75rpx;
					font-size: 15rpx;
					border: 1px solid #979797;
				}
			}
			.service{
				display: flex;
				flex-wrap: wrap;
				margin-left: 60rpx;
				.kf{
					font-size: 15rpx;
					margin-right: 60rpx;
					width:90rpx;
					.we{
						font-size: 15rpx;
						color:#999999;
					}
				}
			}
		}
		
		.comment{
			margin: 10rpx 16rpx 10rpx;
			font-size: 15rpx;
			display: flex;
		}
	}
	.upload{
		margin: 0 10rpx 10rpx;
		background-color: #fff;
		flex-direction:column;
		align-items: center;
		padding: 20rpx;
	
		.title{
			font-size: 15rpx;
			margin-bottom:20px;
			color: #333333;
		}
		// :deep(.file-picker__box){
		// 	width: 112.5rpx;
		// 	height: 112.5rpx;
		// 	.file-picker__box-content{
		// 		width: 112.5rpx;
		// 		height: 112.5rpx;
		// 	}
		// }
	}
	.cooment{
		margin: 0 10rpx;
		background-color: #fff;
		flex-direction:column;
		align-items: center;
		padding: 5rpx 10rpx;
		.title{
			font-size: 15rpx;
			margin-bottom:20rpx;
		}
		.tex{
			display: flex;
			justify-content:flex-start;
			align-items: center;
			margin-bottom:12.7rpx;
			border: 1px solid #979797;
			// height: 74.38rpx;
			border-radius: 5rpx;
			.input{
				// height: 74.38rpx;
				// font-size: 15rpx;
				padding: 10rpx;
				// border-radius: 5rpx;
				:deep(.uni-textarea-placeholder){
					font-size: 15rpx;
				}
			}
		}
	}
	.radio{
		display: flex;
		margin: 0 10rpx;
		background-color: #fff;
		// padding: 0 20px 100px;
		flex-direction:column;
		// align-items: center;
		font-size: 15rpx!important;
		:deep(.uni-switch-input.uni-switch-input-checked){
			border-color: #18C7B0;
			background-color: #18C7B0;
		}
	}
	.submit{
		display: flex;
		margin-top: 33.23rpx;
		background-color: #fff;
		align-items: center;
		width: 750rpx;
		height: 62.5rpx;
		.bu{
			display: flex;
			justify-content:center;
			align-items: center;
			height: 40rpx;
			width: 671.25rpx;
			font-size: 17.5rpx;
			border-radius: 3.75rpx;
			background-color: #18c7b0;
			color:#fff;
		}
	}
	
	:deep(.uni-popup-dialog){
		width: 500rpx;
		// height: 268.75rpx;
		display: flex;
		flex-direction: column;
		background-color: #ffffff;
		
		// justify-content:center;
		// align-items: center;
		.uni-dialog-title-text{
			display: flex;
			font-size: 20rpx;
			// padding-top: 20px;
		}
		.uni-dialog-content{
			display: flex;
			margin: 10rpx 20rpx;
			background-color: #fff;
			box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.15);
			.cotent{
				display: flex;
				flex-direction: column;
				width:400rpx;
				height: 112.5rpx;
				.title{
					font-size: 17.5rpx;
					font-weight: 500;
					margin-bottom: 10rpx;
					display: flex;
					align-items: center;
					justify-content:center;
				}
				.body{
					display: flex;
					// flex-direction: column;
					justify-content:center;
					.lef{
						display: flex;
						flex-direction: column;
						width: 200rpx;
						justify-content:center;
						.baracode{
							display: flex;
							flex-direction:column;
							width: 200rpx;
							height: 54.38rpx;
							.cav{
								width:200rpx;
								
							}
							.barnum{
								width:200rpx;
								font-size: 10rpx;
								display: flex;
								color: #333333;
								justify-content:center;
								align-items: center;
								letter-spacing: 0.7em;
							}
						}
					}
					.rig{
						display: flex;
						flex-direction: column;
						width: 340px;
						margin-left: 13.75rpx;
						.hz{
							display: flex;
							margin-bottom: 10rpx;
							font-size: 15rpx;
						}
						.bold{
							font-weight: 500;
						}
					}
				}
			}
		}
		.uni-dialog-button-group{
			display: flex;
			font-size: 17.5rpx;
			.uni-dialog-button{
				display: flex;
				.uni-dialog-button-text{
				}
			}
			.uni-border-left{
				.uni-dialog-button-text{
				color: #18c7b0;
				}
			}
		}
	}
}


</style>
