yanjie 4 lat temu
rodzic
commit
b8ebde53fb

+ 39 - 10
pages/archives/add_archives.vue

xqd xqd xqd
@@ -8,7 +8,7 @@
 			</view>
 			<view class="cu-form-group">
 				<view class="title">就诊人姓名:</view>
-				<input v-model="name" placeholder-style="text-align:right" placeholder="请填写手机号"></input>
+				<input v-model="name" placeholder-style="text-align:right" placeholder="请输入姓名"></input>
 			</view>
 			<view class="cu-form-group">
 				<view class="title">就诊人性别:</view>
@@ -79,7 +79,7 @@
 				date: "请选择出生日期",
 				show: false,
 				guanxi: "请选择",
-				guanxiindex: 0,
+				guanxiindex: -1,
 				guanxilist: [{
 						value: '1',
 						label: '父亲'
@@ -126,25 +126,54 @@
 			// 选中任一radio时,由radio-group触发
 			radioGroupChange(e) {
 				this.value = e
-				console.log(this.value)
 			},
 			bindDateChange({
 				detail
 			}) {
 				this.date = detail.value
-				console.log(this.date)
 			},
 			confirm(e) {
 				this.guanxiindex = e.detail.value
 				this.guanxi = this.guanxilist[e.detail.value].label
 			},
 			addarchives: async function() {
-				console.log(this.imgList[0])
-				console.log(this.name)
-				console.log(this.value)
-				console.log(this.date)
-				console.log(this.guanxiindex)
-				console.log(this.idcrad)
+				let num = 0
+				if (this.value == "男") {
+					num = 1
+				} else {
+					num = 2
+				}
+				if (this.imgList[0] !== undefined && this.name != "" && this.date != "请选择出生日期" && this.guanxiindex != -1 && this.idcrad !=
+					"" && this.$util.isIdCard(this.idcrad)) {
+					let res = await this.$request.post("/api/v1/patient/createPatient", {
+						name: this.name,
+						sex: num,
+						avatar: this.imgList[0],
+						birthday: this.date,
+						relationship_type: this.guanxiindex,
+						card_type: 1,
+						card_number: this.idcrad
+					})
+					console.log(res)
+					if (res.status == 0) {
+						uni.showToast({
+							title: "提交成功",
+							icon: "none",
+							duration: 1500
+						})
+						setTimeout(() => {
+							uni.navigateBack({
+								delta: 1
+							})
+						}, 1500)
+					}
+
+				} else {
+					uni.showToast({
+						title: "请填写完整",
+						icon: "none"
+					})
+				}
 			}
 		}
 	};

+ 19 - 0
pages/archives/my_archives.vue

xqd
@@ -1,5 +1,24 @@
 <template>
 	<view class="main">
+		<view class="cu-list menu-avatar margin-sm" v-for="(item,index) in patientList" :key="index" style="border-radius: 16rpx;box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);">
+			<view class="cu-item">
+				<view class="cu-avatar round lg" :style="'background-image:url('+item.avatar+');'"></view>
+				<view class="content">
+					<view class="text-grey">{{item.name}}</view>
+					<view class="text-gray text-sm flex">
+						<text class="text-cut">
+							{{item.sex==1?'男':'女'}}
+						</text>
+						<text class="text-cut margin-left-sm">
+							{{}}
+						</text>
+					</view>
+				</view>
+				<view class="action">
+					<text class="cuIcon-roundright lg text-gray"></text>
+				</view>
+			</view>
+		</view>
 		<u-empty text="暂无档案" :show="istrue" mode="list" margin-top="300"></u-empty>
 		<view class="cu-bar bg-white tabbar" style="position: fixed;bottom: 0;width: 100%;">
 			<view class="submit" style="background-color: #0B73B9;color: white;" @click="addarchives">

+ 5 - 5
pages/doctor_related/doctor_info.vue

xqd xqd xqd xqd xqd
@@ -2,7 +2,7 @@
 	<view class="main">
 		<view>
 			<view class="pr det-body">
-				<image class="det-bg-img" mode="scaleToFill" src="http://file.supermm.me/miniProgram/images/det/det_bg_01.png"></image>
+				<image class="det-bg-img" mode="scaleToFill" src="../../static/img/doctorbanner.png"></image>
 				<view class="det-head pr plr15 bdr8 m-bg-white mlr15 pt25">
 					<view class="m-xstart pr m-bottom-line pb25 margin-bottom-sm">
 						<view class="m-flex overflow mr10">
@@ -87,7 +87,7 @@
 					</view>
 				</view>
 			</view>
-			<view class="margin-lr-sm mt30 bg-white" style="border-radius: 16rpx; box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);"
+			<view class="margin-lr-sm mt15 bg-white" style="border-radius: 16rpx; box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);"
 			 v-if="doctor.evaluate.length!=0">
 				<view class="f18 fb flex align-center plr15 pt15">患者评价 <text class="f12 m-gray-letter margin-left-xs">({{doctor.evaluate.length}})</text>
 				</view>
@@ -217,7 +217,7 @@
 			},
 			phonezixun() {
 				uni.navigateTo({
-					url: "info_write"
+					url: "info_write?doctor=" + JSON.stringify(this.doctor)
 				})
 			},
 			xuantime() {
@@ -234,7 +234,7 @@
 		height: 340rpx;
 		background-color: #fff;
 		border-radius: 16rpx;
-		margin-top: 60rpx;
+		margin-top: 30rpx;
 		box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);
 	}
 
@@ -251,7 +251,7 @@
 		z-index: 1;
 		display: block;
 		width: 100%;
-		height: 400rpx;
+		height: 267rpx;
 	}
 
 	.det-head {

+ 22 - 30
pages/doctor_related/info_write.vue

xqd xqd xqd xqd xqd xqd xqd
@@ -2,12 +2,12 @@
 	<view class="main">
 		<view class="cu-list menu-avatar">
 			<view class="cu-item">
-				<view class="cu-avatar round lg" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big10001.jpg);"></view>
+				<view class="cu-avatar round lg" :style="'background-image:url('+doctor.avatar+');'"></view>
 				<view class="content">
-					<view class="text-grey">医生姓名</view>
+					<view class="text-grey">{{doctor.name}}</view>
 					<view class="text-gray text-sm flex">
 						<text class="text-cut">
-							科室名称 医生资质
+							{{doctor.office.name}} {{doctor.qualification.name}}
 						</text>
 					</view>
 				</view>
@@ -38,7 +38,7 @@
 					<text class="text-grey">咨询时间</text>
 				</view>
 				<view class="action">
-					<text class="text-grey text-sm">10分钟</text>
+					<text class="text-grey text-sm">{{doctor.phone_minutes}}分钟</text>
 				</view>
 			</view>
 			<view class="cu-item">
@@ -46,7 +46,7 @@
 					<text class="text-grey">咨询费用</text>
 				</view>
 				<view class="action">
-					<text class="text-grey text-sm">19.9元</text>
+					<text class="text-grey text-sm">{{doctor.phone_price}}元</text>
 				</view>
 			</view>
 		</view>
@@ -63,11 +63,11 @@
 				<view class="popup_title_text">选择就诊人</view>
 			</view>
 			<scroll-view style="height: 70%;" scroll-y="true">
-				<view class="popup_list" v-for="(item, index) in list" @click="value=item.name,showpeople=false">
+				<view class="popup_list" v-for="(item, index) in patientList" :key="index" :data-index="index" @click="value=item.name,showpeople=false">
 					<view class="popup_list_title">
 						<view class="title">{{item.name}}</view>
 						<view class="body">
-							男 18天
+							{{item.sex==1?'男':'女'}}
 						</view>
 					</view>
 					<view class="popup_list_button flex align-center">
@@ -122,32 +122,16 @@
 	export default {
 		onLoad(options) {
 			this.phonenum = this.phoneList[0].num
+			this.doctor = JSON.parse(options.doctor)
+			console.log(this.doctor)
+		},
+		onShow() {
+			this.getarchives()
 		},
 		data() {
 			return {
 				/* 就诊人 */
 				showpeople: false,
-				list: [{
-						name: '测试1',
-						disabled: false
-					},
-					{
-						name: '测试2',
-						disabled: false
-					},
-					{
-						name: '测试3',
-						disabled: false
-					},
-					{
-						name: '测试4',
-						disabled: false
-					},
-					{
-						name: '测试5',
-						disabled: false
-					}
-				],
 				// u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
 				value: '',
 				/* 接听号码 */
@@ -168,7 +152,9 @@
 				phoneValue: '',
 				showinput: '其他手机号',
 				phonenum: "",
-				phonedata: ""
+				phonedata: "",
+				patientList: [],
+				doctor: {}
 			}
 		},
 		methods: {
@@ -208,7 +194,13 @@
 			confirmphone() {
 				this.phonenum = this.phonedata
 				this.showphone = !this.showphone
-			}
+			},
+			getarchives: async function() {
+				let res = await this.$request.post("/api/v1/patient/patientList")
+				if (res.status == 0) {
+					this.patientList = res.data.data
+				}
+			},
 
 		}
 	};

BIN
static/img/doctorbanner.png