患者1.2
This commit is contained in:
@@ -0,0 +1,274 @@
|
||||
// pages/consultOrder/consultOrder.js
|
||||
const app = getApp()
|
||||
import {detectionList} from "../../../api/checkSugar"
|
||||
import{family} from "../../../api/familyDoc"
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
time: 0,
|
||||
changeStatus:'',
|
||||
changeId:'',
|
||||
isLoading:true,
|
||||
selectstatus:false,
|
||||
selectfamily:false,
|
||||
delId:'',
|
||||
option1: [
|
||||
{ text: '全部订单', value: 0 },
|
||||
{ text: '待支付', value: 1 },
|
||||
{ text: '待绑定', value: 2 },
|
||||
{ text: '检测中', value: 3},
|
||||
{ text: '检测完成', value: 4},
|
||||
{text:'已取消',value:5}
|
||||
|
||||
],
|
||||
page:1,
|
||||
isTriggered:false,
|
||||
pageNumber:10,
|
||||
option2: [],
|
||||
detection_status: 0,
|
||||
family_id:0,
|
||||
orderList:[],
|
||||
isLock:false,
|
||||
img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static',
|
||||
fromType:''
|
||||
},
|
||||
handleRefresher(){
|
||||
this.setData({
|
||||
isLock:false,
|
||||
page:1,
|
||||
orderList:[]
|
||||
})
|
||||
this.getDetectionList();
|
||||
},
|
||||
goBack(flag=true){
|
||||
|
||||
let {fromType}=this.data;
|
||||
if(app.globalData.origion==1){
|
||||
wx.reLaunch({
|
||||
url: '/pages/index/index',
|
||||
})
|
||||
}else if(app.globalData.origion==2){
|
||||
wx.reLaunch({
|
||||
url: '/pages/index/index',
|
||||
})
|
||||
}else{
|
||||
if(fromType){
|
||||
wx.reLaunch({
|
||||
url: '/pages/my/my',
|
||||
})
|
||||
}else{
|
||||
if(true){
|
||||
wx.navigateBack({
|
||||
delta: 1,
|
||||
fail:function(){
|
||||
wx.reLaunch({
|
||||
url: '/pages/index/index',
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
lower(e) {
|
||||
if(!this.data.isLock){
|
||||
this.setData({
|
||||
page: ++this.data.page
|
||||
})
|
||||
this.getDetectionList()
|
||||
}
|
||||
},
|
||||
goExpertList(){
|
||||
app.method.navigateTo({
|
||||
url: '/sugarCheck/pages/checkOrderDetail/checkOrderDetail' //'/pages/expertConsult/expertConsult',
|
||||
})
|
||||
},
|
||||
changeStatus({ detail }){
|
||||
this.setData({
|
||||
isLock:false,
|
||||
page:1,
|
||||
selectstatus:true,
|
||||
detection_status:detail,
|
||||
orderList:[]
|
||||
})
|
||||
this.getDetectionList()
|
||||
},
|
||||
changeFamily({ detail }){
|
||||
this.setData({
|
||||
family_id:detail,
|
||||
isLock:false,
|
||||
selectfamily:true,
|
||||
page:1,
|
||||
orderList:[]
|
||||
})
|
||||
this.getDetectionList()
|
||||
},
|
||||
getDetectionList(){
|
||||
let {detection_status,family_id,page,pageNumber}=this.data;
|
||||
this.setData({
|
||||
isLoading:true
|
||||
})
|
||||
detectionList({
|
||||
detection_status,
|
||||
family_id,
|
||||
page,
|
||||
per_page:pageNumber
|
||||
}).then(data=>{
|
||||
let result=data.data;
|
||||
this.setData({
|
||||
isLoading:false
|
||||
})
|
||||
if(result.length==0){
|
||||
this.setData({
|
||||
isLock:true,
|
||||
isTriggered:false
|
||||
})
|
||||
return false
|
||||
};
|
||||
this.setData({
|
||||
orderList:this.data.orderList.concat(result),
|
||||
isTriggered:false
|
||||
})
|
||||
})
|
||||
},
|
||||
handelCancelOrder(id){
|
||||
cancelOrder(id).then(data=>{
|
||||
wx.showToast({
|
||||
title: '订单取消成功',
|
||||
icon:"none"
|
||||
})
|
||||
})
|
||||
},
|
||||
getfamily(){
|
||||
family().then(data=>{
|
||||
|
||||
let arr=[];
|
||||
data.forEach((item,index)=>{
|
||||
arr[index]={};
|
||||
let sex="";
|
||||
switch (item.sex){
|
||||
case '0':sex="未知";
|
||||
break;
|
||||
case '1':sex="男";
|
||||
break;
|
||||
case '2':sex="女";
|
||||
break;
|
||||
}
|
||||
let age=item.age;
|
||||
arr[index].text=item.card_name+"("+sex+","+age+")";
|
||||
arr[index].value=item.family_id;
|
||||
})
|
||||
arr=[{text:"全部成员",value:0}].concat(arr);
|
||||
this.setData({
|
||||
option2:arr
|
||||
})
|
||||
this.getDetectionList();
|
||||
})
|
||||
|
||||
},
|
||||
goDetail(event){
|
||||
let id=event.currentTarget.dataset.id;
|
||||
app.method.navigateTo({
|
||||
url: '/sugarCheck/pages/checkOrderDetail/checkOrderDetail?order_detection_id='+id,
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
if(options.fromType){
|
||||
this.setData({
|
||||
fromType:options.fromType
|
||||
})
|
||||
};
|
||||
if(options.prevData){
|
||||
let json=JSON.parse(options.prevData);
|
||||
this.setData({
|
||||
changeStatus:json.changeStatus,
|
||||
changeId:json.changesId
|
||||
});
|
||||
}
|
||||
this.getfamily();
|
||||
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
this.setData({
|
||||
img_host:app.hostConfig().imghost
|
||||
});
|
||||
//刷新列表
|
||||
let {delId,orderList,changeStatus,changeId}=this.data;
|
||||
if(delId){
|
||||
let list=orderList.filter((item)=>{
|
||||
return item.order_detection_id!=delId
|
||||
})
|
||||
this.setData({
|
||||
orderList:list
|
||||
})
|
||||
}else if(changeStatus && changeId){
|
||||
for (let i = 0; i < orderList.length; i++) {
|
||||
const item =orderList[i];
|
||||
if(item.order_detection_id==changeId){
|
||||
let currentitem=`orderList[${i}].detection_status`
|
||||
this.setData({
|
||||
[currentitem]:changeStatus
|
||||
})
|
||||
break;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
// this.setData({
|
||||
// isLock:false,
|
||||
// page:1,
|
||||
// orderList:[]
|
||||
// })
|
||||
// this.getDetectionList();
|
||||
// this.getfamily();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
// this.goBack(false)
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
|
||||
})
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"van-dropdown-menu": "@vant/weapp/dropdown-menu/index",
|
||||
"van-dropdown-item": "@vant/weapp/dropdown-item/index",
|
||||
"van-count-down": "@vant/weapp/count-down/index"
|
||||
|
||||
},
|
||||
"navigationStyle":"custom",
|
||||
"navigationBarTitleText":"肝胆相照互联网医院"
|
||||
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
<!--pages/consultOrder/consultOrder.wxml-->
|
||||
<wxs src="../../../filters/filter.wxs" module="timeModule"></wxs>
|
||||
<view class="page">
|
||||
<view class="ui-navigatorbar" style="border-bottom: 1rpx solid #E3E4E5;background:#fff">
|
||||
<image class="ui-navigatorbar-back" bindtap="goBack" src="{{img_host+'/back.png'}}" />
|
||||
<view class="ui-title">检测订单</view>
|
||||
</view>
|
||||
<view class="dropdown">
|
||||
<view class="bar"></view>
|
||||
<van-dropdown-menu active-color="#3CC7C0">
|
||||
<van-dropdown-item value="{{ detection_status }}" options="{{ option1 }}" title-class="droptitle {{selectstatus?'active':''}}" bind:change="changeStatus" />
|
||||
<van-dropdown-item value="{{ family_id }}" title-class="droptitle {{selectfamily?'active':''}}" options="{{ option2 }}" bind:change="changeFamily" />
|
||||
</van-dropdown-menu>
|
||||
</view>
|
||||
<scroll-view scroll-y="true" bindrefresherrefresh="handleRefresher" refresher-triggered="{{isTriggered}}" refresher-threshold="100" refresher-enabled="true" class="hasdata" bindscrolltolower="lower" wx:if="{{orderList.length>0}}">
|
||||
<view class="databox">
|
||||
<view class="datacell" bindtap="goDetail" wx:for="{{orderList}}" wx:key="order_detection_id" data-id="{{item.detection_no}}">
|
||||
<view class="titlebox">
|
||||
<view class="name" >糖组检测</view>
|
||||
|
||||
<view class="status" wx:if="{{item.detection_status==1 && item.detection_pay_status==1}}">
|
||||
<view class="waitpay">待支付</view>
|
||||
<view class="countdown">
|
||||
<van-count-down time="{{timeModule.countDown(item.created_at)}}" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="status waitpay" wx:elif="{{item.detection_status==2}}">待绑定</view>
|
||||
<view class="status waitpay" wx:elif="{{item.detection_status==3}}">检测中</view>
|
||||
<view class="status" wx:elif="{{item.detection_status==4}}" style="color:#3CC7C0">已开具报告</view>
|
||||
<view class="status" wx:elif="{{item.detection_status==5 && item.detection_pay_status!=5 }}">已取消</view>
|
||||
<view class="status" wx:elif="{{item.detection_status==5 && item.detection_pay_status==5}}">
|
||||
<view class="waitpay">支付超时</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
<view class="infobox">
|
||||
|
||||
<image src="{{item.user_doctor.avatar}}" class="headicon" wx:if="{{item.user_doctor.avatar}}" mode="aspectFill"></image>
|
||||
<image src="{{img_host+'/doctor_avatar.png'}}" class="headicon" wx:else></image>
|
||||
<view class="namebox">
|
||||
<view class="name" wx:if="{{item.user_doctor.user_name}}">{{item.user_doctor.user_name}} <text class="position">{{item.user_doctor.doctor_title}}</text></view>
|
||||
<view class="name" wx:elif="{{item.detection_status==2}}">平台分配医生中</view>
|
||||
<view class="name" wx:else>接诊医生</view>
|
||||
<view class="hospital" wx:if="{{item.user_doctor.hospital_name}}">
|
||||
{{item.user_doctor.hospital_name}}
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="row first">
|
||||
<view class="name"><text>就</text><text>诊</text><text>人</text></view>
|
||||
<view class="dot">:</view>
|
||||
<view class="desc">
|
||||
<view class="namedesc">
|
||||
{{item.patient_name}}(<text wx:if="{{item.patient_sex==0}}">未知</text><text wx:if="{{item.patient_sex==1}}">男</text><text wx:else>女</text><text decode="true" class="agebar"></text><text>{{item.patient_age}}岁)</text></view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="row rowdesc" wx:if="{{item.detection_status!=1}}">
|
||||
<view class="name">病情描述</view>
|
||||
<view class="dot">:</view>
|
||||
<view class="desc">{{item.disease_desc}}</view>
|
||||
</view>
|
||||
<view class="row rowdesc" wx:else>
|
||||
<view class="name">下单时间</view>
|
||||
<view class="dot">:</view>
|
||||
<view class="desc">{{item.created_at}}</view>
|
||||
</view> -->
|
||||
|
||||
<view class="row last" wx:if="{{item.detection_status!=1}}">
|
||||
<view class="left">
|
||||
<view class="name">下单时间</view>
|
||||
<view class="dot">:</view>
|
||||
<view class="desc">{{item.created_at}}</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view class="detail">详情</view>
|
||||
<image src="{{img_host+'/righticon.png'}}" class="righticon"> </image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="row rowdesc" wx:if="{{item.detection_status==1}}">
|
||||
<view class="name">下单时间</view>
|
||||
<view class="dot">:</view>
|
||||
<view class="desc">{{item.created_at}}</view>
|
||||
</view>
|
||||
<view class="row last" wx:if="{{item.detection_status==1}}">
|
||||
<view class="left">
|
||||
<view class="name">待付金额</view>
|
||||
<view class="dot">:</view>
|
||||
<view class="desc red">¥{{item.payment_amount_total}}</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view class="detail">详情</view>
|
||||
<image src="{{img_host+'/righticon.png'}}"class="righticon"> </image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</scroll-view>
|
||||
<view class="nodata" wx:elif="{{!isLoading && orderList.length==0}}">
|
||||
<image src="{{img_host+'/nocheck.png'}}" class="noorder"></image>
|
||||
<view class="tips">暂无检测订单</view>
|
||||
<!-- <view class="btn" bindtap="goExpertList">专家问诊</view> -->
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@@ -0,0 +1,332 @@
|
||||
/* pages/consultOrder/consultOrder.wxss */
|
||||
/**app.wxss**/
|
||||
.container {
|
||||
padding-top: 135px;
|
||||
padding-bottom: 10rpx;
|
||||
/* top:280rpx; */
|
||||
/* position: absolute; */
|
||||
width:100%;
|
||||
/* overflow-y: scroll; */
|
||||
background: #F2F2F2;
|
||||
}
|
||||
input{
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica,
|
||||
}
|
||||
page{
|
||||
position: relative;
|
||||
width:100%;
|
||||
height:100%;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica,
|
||||
Segoe UI, Arial, Roboto, 'PingFang SC', 'miui', 'Hiragino Sans GB', 'Microsoft Yahei',
|
||||
sans-serif;
|
||||
}
|
||||
.page{
|
||||
width:100vw;
|
||||
height:100vh;
|
||||
background: #f2f2f2;
|
||||
}
|
||||
.contain{padding: 0 30rpx 0rpx;height: 100%;overflow: hidden;position: relative;}
|
||||
::-webkit-scrollbar {
|
||||
display: none;
|
||||
width: 0;
|
||||
height: 0;
|
||||
color: transparent;
|
||||
}
|
||||
.van-picker__confirm {
|
||||
color:#3CC7C0!important;
|
||||
font-size: 32rpx!important;
|
||||
}
|
||||
.van-picker__title{
|
||||
font-weight: 600!important;
|
||||
color: rgba(0,0,0,0.9)!important;
|
||||
font-size: 32rpx!important;
|
||||
}
|
||||
.van-picker__cancel{
|
||||
color: rgba(0,0,0,0.6)!important;
|
||||
font-size: 32rpx!important;
|
||||
}
|
||||
.nonedata{
|
||||
width:100%;
|
||||
color:#666;
|
||||
min-height: 320rpx;
|
||||
font-size: 28rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.ui-navigatorbar {
|
||||
position: fixed;
|
||||
z-index:99;
|
||||
top: 0;
|
||||
width: 750rpx;
|
||||
height: 172rpx;
|
||||
background: #F2F2F2;
|
||||
backdrop-filter: blur(20px);
|
||||
}
|
||||
|
||||
.ui-navigatorbar-back {
|
||||
position: absolute;
|
||||
padding-left:40rpx;
|
||||
padding-right:40rpx;
|
||||
width:30rpx;
|
||||
height:60rpx;
|
||||
left: 0rpx;
|
||||
bottom: 20rpx;
|
||||
}
|
||||
|
||||
.ui-title {
|
||||
position: absolute;
|
||||
width: 350rpx;
|
||||
height: 88rpx;
|
||||
line-height: 56rpx;
|
||||
font-size: 36rpx;
|
||||
color: #000000;
|
||||
bottom: 0;
|
||||
left: 200rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.droptitle.active{
|
||||
color:#3CC7C0;
|
||||
}
|
||||
.slotmsg{
|
||||
-webkit-overflow-scrolling: touch;
|
||||
font-size: 28rpx;
|
||||
line-height:40rpx;
|
||||
max-height:60vh;
|
||||
overflow-y: auto;
|
||||
padding:48rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.van-dropdown-item__title{
|
||||
width:100%!important;
|
||||
flex:1;
|
||||
text-align: center;
|
||||
}
|
||||
.van-dropdown-item__icon{
|
||||
z-index:2;
|
||||
position: absolute!important;
|
||||
|
||||
right:25rpx;
|
||||
}
|
||||
.van-cell__value{
|
||||
flex:none!important;
|
||||
z-index:1;
|
||||
}
|
||||
.onlinebox .icon{
|
||||
top:60rpx;
|
||||
left:50%;
|
||||
position: absolute;
|
||||
margin-left: -48rpx;
|
||||
width:96rpx;
|
||||
height:34rpx;
|
||||
border-radius: 0;
|
||||
}
|
||||
.page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.dropdown {
|
||||
position: relative;
|
||||
height:102rpx;
|
||||
margin-top: 172rpx;
|
||||
}
|
||||
|
||||
.dropdown .bar {
|
||||
position: absolute;
|
||||
height: 40rpx;
|
||||
width: 1rpx;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
background: #ccc;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.van-dropdown-menu {
|
||||
box-shadow: none !important;
|
||||
border-bottom: 1rpx solid #E7E7E7;
|
||||
}
|
||||
|
||||
.btn {
|
||||
position: absolute;
|
||||
bottom: 20rpx;
|
||||
left: 32rpx;
|
||||
right: 32rpx;
|
||||
display: flex;
|
||||
height: 94rpx;
|
||||
background: #3CC7C0;
|
||||
border-radius: 47rpx;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
background: #3CC7C0;
|
||||
|
||||
}
|
||||
|
||||
.nodata {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.noorder {
|
||||
margin-top: 150rpx;
|
||||
width: 518rpx;
|
||||
height: 325rpx;
|
||||
}
|
||||
.tips {
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
}
|
||||
.hasdata{
|
||||
flex: 1;
|
||||
overflow-y: scroll;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.datacell{
|
||||
background:#fff;
|
||||
padding-bottom: 20rpx;
|
||||
margin-bottom:10rpx;
|
||||
}
|
||||
.datacell:last-child{
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.status{
|
||||
color: #333333;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.titlebox .name{
|
||||
color: #000;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.titlebox{
|
||||
padding:0 32rpx;
|
||||
height: 112rpx;
|
||||
border-bottom: 1rpx solid #E3E4E5;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.waitpay{
|
||||
text-align: right;
|
||||
color: #EF4F20
|
||||
}
|
||||
.headicon{
|
||||
width:80rpx;
|
||||
height:80rpx;
|
||||
flex-shrink: 0;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.van-count-down {
|
||||
margin-top: 5rpx;
|
||||
color: #EF4F20!important;
|
||||
}
|
||||
.infobox{
|
||||
padding:20rpx 32rpx 0;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
}
|
||||
.infobox .name{
|
||||
margin-left: 30rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
.hospital{
|
||||
margin-left: 30rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
.infobox .position{
|
||||
font-weight:normal;
|
||||
}
|
||||
.row{
|
||||
align-items: center;
|
||||
padding:0 32rpx;
|
||||
display: flex;
|
||||
line-height: 52rpx
|
||||
}
|
||||
.row.first{
|
||||
margin-top: 15rpx;
|
||||
}
|
||||
.row .name{
|
||||
white-space: nowrap;
|
||||
font-size: 28rpx;
|
||||
color:#333;
|
||||
font-weight: 600;
|
||||
width:112rpx;
|
||||
align-items: baseline;
|
||||
}
|
||||
.row.first .name{
|
||||
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
}
|
||||
.row .dot{
|
||||
align-items: baseline;
|
||||
height: 52rpx;
|
||||
font-weight: 600;
|
||||
display: flex;
|
||||
|
||||
}
|
||||
.row .desc{
|
||||
align-items: baseline;
|
||||
font-size: 28rpx;
|
||||
line-height: 52rpx;
|
||||
color:#333;
|
||||
}
|
||||
.row .desc.red{
|
||||
color:rgba(239, 79, 32, 1);
|
||||
}
|
||||
.rowdesc{
|
||||
align-items: flex-start;
|
||||
}
|
||||
.namedesc{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.rowdesc .desc{
|
||||
text-overflow: -o-ellipsis-lastline;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
line-clamp: 2;
|
||||
-webkit-box-orient: vertical
|
||||
}
|
||||
.row .price{
|
||||
color:#EF4F20;
|
||||
font-weight: bold;
|
||||
font-size:34rpx
|
||||
}
|
||||
.row.last{
|
||||
justify-content: space-between;
|
||||
}
|
||||
.row .left{
|
||||
display: flex;
|
||||
}
|
||||
.row .right{
|
||||
display: flex;
|
||||
}
|
||||
.righticon{
|
||||
width:24rpx;
|
||||
height:48rpx;
|
||||
}
|
||||
.right .detail{
|
||||
margin-right: 10rpx;
|
||||
color: #666666;
|
||||
}
|
||||
.agebar{
|
||||
display: inline-block;
|
||||
width:2rpx;
|
||||
background: #333;
|
||||
height:26rpx;
|
||||
margin: 0rpx 10rpx 0;
|
||||
}
|
||||
@@ -0,0 +1,643 @@
|
||||
// pages/medinceOrderDetail/medinceOrderDetail.js
|
||||
const app = getApp()
|
||||
import {detectionDetail,bindCheck,cancelCheckPay,delCheckOrder,cancelCheckOrder,checkInquiry} from "../../../api/checkSugar.js"
|
||||
import {cancelPay} from "../../../api/consultOrder"
|
||||
import {cancelOrder} from "../../../api/consultOrder"
|
||||
import {fllowDoctor,notfllowDoctor} from "../../../api/consultExpert"
|
||||
import {throttle} from "../../../utils/util"
|
||||
import {getSign} from "../../../api/common"
|
||||
import Dialog from '@vant/weapp/dialog/dialog';
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
time: 30 * 60 * 60 * 1000,
|
||||
showCover:true,
|
||||
isWait:true,
|
||||
cancelBtn:false,
|
||||
order:{},
|
||||
showError:false,
|
||||
pay_money:0,
|
||||
fileList:[],
|
||||
checkSatus:1,
|
||||
showCheckDialog:false,
|
||||
checkmessage:'',
|
||||
detection_bar_code:'',
|
||||
detection_code:'',
|
||||
order_detection_id:'',
|
||||
showDialog:false,
|
||||
message:'',
|
||||
fromType:'',
|
||||
user_doctor:{},
|
||||
order:{},
|
||||
patient_family_data:'',
|
||||
img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static'
|
||||
},
|
||||
onClickHide() {
|
||||
this.setData({ showCover: false });
|
||||
wx.setStorageSync("showCover",true);
|
||||
},
|
||||
closeError(){
|
||||
this.setData({ showError: false });
|
||||
},
|
||||
delImg(event) {
|
||||
let id = event.currentTarget.dataset.id;
|
||||
this.data.fileList.splice(id, 1);
|
||||
this.setData({
|
||||
fileList: this.data.fileList
|
||||
})
|
||||
},
|
||||
previewImage(event) {
|
||||
let id = event.currentTarget.dataset.id;
|
||||
let urls = this.data.fileList;
|
||||
wx.previewImage({
|
||||
current: urls[id], // 当前显示图片的http链接
|
||||
urls: urls // 需要预览的图片http链接列表
|
||||
})
|
||||
},
|
||||
uploadFile(File) {
|
||||
wx.showLoading({
|
||||
title: '图片上传中...',
|
||||
mask: true
|
||||
})
|
||||
let THIS = this;
|
||||
getSign({
|
||||
user_type: 1,
|
||||
scene: 4
|
||||
}).then((resdata) => {
|
||||
let {
|
||||
accessid,
|
||||
dir,
|
||||
policy,
|
||||
signature,
|
||||
host
|
||||
} = resdata;
|
||||
let index = File.lastIndexOf("/");
|
||||
let filename = File.substring(index + 1, File.length);
|
||||
return new Promise((resolve, reject) => {
|
||||
wx.uploadFile({
|
||||
url: host, // 仅为示例,非真实的接口地址
|
||||
filePath: File,
|
||||
name: 'file',
|
||||
formData: {
|
||||
OSSAccessKeyId: accessid,
|
||||
policy,
|
||||
key: dir + filename,
|
||||
signature
|
||||
},
|
||||
success(res) {
|
||||
if (res.statusCode === 204) {
|
||||
let url = host + '/' + dir + filename;
|
||||
THIS.setData({
|
||||
fileList: THIS.data.fileList.concat([url])
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: err => {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
})
|
||||
})
|
||||
},
|
||||
upload() {
|
||||
if(this.data.fileList.length>=3){
|
||||
wx.showToast({
|
||||
title: '检测管照片最多上传3张',
|
||||
icon:"none"
|
||||
})
|
||||
return false
|
||||
};
|
||||
let THIS = this;
|
||||
wx.chooseMedia({
|
||||
count: 3-this.data.fileList.length,
|
||||
mediaType: ['image'],
|
||||
sourceType: ['album', 'camera'],
|
||||
success(res) {
|
||||
var imgList = res.tempFiles;
|
||||
var promiseFun = [];
|
||||
for (let i = 0; i < imgList.length; i++) {
|
||||
var file = imgList[i].tempFilePath;
|
||||
promiseFun.push(
|
||||
THIS.uploadFile(file)
|
||||
)
|
||||
};
|
||||
Promise.all(promiseFun).then((res) => {
|
||||
wx.showToast({
|
||||
title: '图片上传成功',
|
||||
icon: "none"
|
||||
})
|
||||
wx.hideLoading();
|
||||
});
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
goBack(){
|
||||
let {fromType}=this.data;
|
||||
if(app.globalData.origion==1){
|
||||
wx.reLaunch({
|
||||
url: '/pages/index/index',
|
||||
})
|
||||
}else if(app.globalData.origion==2){
|
||||
wx.reLaunch({
|
||||
url: '/pages/index/index',
|
||||
})
|
||||
}else{
|
||||
if(fromType){
|
||||
let url=decodeURIComponent(fromType);
|
||||
let goUrl='';
|
||||
if(url.indexOf('?')!=-1){
|
||||
goUrl='/'+url+"&fromType="+url;
|
||||
}else{
|
||||
goUrl='/'+url+"?fromType="+url;
|
||||
}
|
||||
//处理聊天收到消息不及时;
|
||||
if(url.indexOf("TUIService/pages/index")!=-1){
|
||||
app.method.navigateTo({
|
||||
url:goUrl
|
||||
})
|
||||
}else{
|
||||
wx.redirectTo({
|
||||
url: goUrl
|
||||
})
|
||||
}
|
||||
|
||||
}else{
|
||||
wx.navigateBack({
|
||||
delta: 1,
|
||||
fail:function(){
|
||||
wx.reLaunch({
|
||||
url: '/pages/index/index',
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
bluript(event){
|
||||
const {value}=event.detail;
|
||||
const reg=/^SDB[A-Z](?:2[3-9]|2[0-2])[SP](?:1688[6-9]|1689\d|169\d\d|1[7-9]\d\d\d|[2-9][0-9]{4}|99999)$/;
|
||||
let detection_status=this.data.order.detection_status;
|
||||
if(detection_status!=3){
|
||||
if(reg.test(value)){
|
||||
this.setData({
|
||||
showError:false
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
showError:true
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
chnageIpt(event){
|
||||
const {value}=event.detail;
|
||||
this.setData({
|
||||
detection_bar_code:value
|
||||
})
|
||||
},
|
||||
handleCancelInquiryPay(){
|
||||
let {order_inquiry_id} = this.data;
|
||||
cancelPay(order_inquiry_id).then(data=>{
|
||||
wx.showToast({
|
||||
title: '取消支付成功',
|
||||
icon:'none'
|
||||
})
|
||||
this.handleCheckInquiry();
|
||||
})
|
||||
},
|
||||
handelCancelInquiryOrder(){
|
||||
let id=this.data.order_inquiry_id;
|
||||
cancelOrder(id).then(data=>{
|
||||
wx.showToast({
|
||||
title: '订单取消成功',
|
||||
icon:"none"
|
||||
});
|
||||
this.handleCheckInquiry();
|
||||
// this.goChat()
|
||||
})
|
||||
},
|
||||
handleCheckInquiry:throttle(function(){
|
||||
let id=this.data.order.order_detection_id;
|
||||
checkInquiry(id).then(data=>{
|
||||
console.log(data);
|
||||
if(data.status==1){
|
||||
this.setData({
|
||||
order_inquiry_id:data.data,
|
||||
})
|
||||
this.goChat();
|
||||
}else if(data.status==2){
|
||||
this.setData({
|
||||
showCheckDialog:true,
|
||||
order_inquiry_id:data.data,
|
||||
checkSatus:2,
|
||||
checkmessage:'当前医生有您待支付的订单,点击“继续”将为您取消订单直接进入报告解读服务。'
|
||||
})
|
||||
}else if(data.status==3){
|
||||
this.setData({
|
||||
checkSatus:3,
|
||||
showCheckDialog:true,
|
||||
order_inquiry_id:data.data,
|
||||
checkmessage:'当前医生有您待接诊的订单,点击“继续”将为您取消订单直接进入报告解读服务。'
|
||||
})
|
||||
}else if(data.status==4){
|
||||
this.setData({
|
||||
showCheckDialog:true,
|
||||
checkSatus:4,
|
||||
order_inquiry_id:data.data,
|
||||
checkmessage:'当前医生有您接诊中的订单,点击“继续”将为您直接进入报告解读服务。'
|
||||
})
|
||||
}
|
||||
})
|
||||
},1000),
|
||||
goReport:throttle(function(){
|
||||
wx.showLoading({
|
||||
mask:true,
|
||||
title: '正在打开文件...',
|
||||
});
|
||||
let url=this.data.order.detection_result_pdf;
|
||||
const randfile = new Date().getTime() + '检测报告';
|
||||
const newPath = `${wx.env.USER_DATA_PATH}/${randfile}`;
|
||||
wx.downloadFile({
|
||||
// 示例 url,并非真实存在
|
||||
url:url,
|
||||
filePath: newPath,
|
||||
success: function (res) {
|
||||
//const filePath = res.tempFilePath
|
||||
wx.openDocument({
|
||||
fileType:"pdf",
|
||||
showMenu:true,
|
||||
filePath: newPath,
|
||||
success: function (res) {
|
||||
wx.hideLoading()
|
||||
console.log('打开文档成功')
|
||||
},
|
||||
fail:function(error){
|
||||
wx.hideLoading()
|
||||
wx.showToast({
|
||||
title:res,
|
||||
icon:"none"
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
fail:function(error){
|
||||
wx.showToast({
|
||||
title:error,
|
||||
icon:"none"
|
||||
})
|
||||
}
|
||||
|
||||
})
|
||||
// app.method.navigateTo({
|
||||
// url:"/pages/linkPage/linkPage?url="+encodeURIComponent(url)
|
||||
// })
|
||||
}),
|
||||
handleBindCheck:throttle(function(){
|
||||
let id=this.data.order.order_detection_id;
|
||||
let detection_status=this.data.order.detection_status;
|
||||
if(detection_status==3){
|
||||
wx.showToast({
|
||||
title: '您已提交,请等待结果',
|
||||
icon:"none"
|
||||
})
|
||||
return false
|
||||
}
|
||||
const {detection_bar_code,fileList}=this.data;
|
||||
const reg=/^SDB[A-Z](?:2[3-9]|2[0-2])[SP](?:1688[6-9]|1689\d|169\d\d|1[7-9]\d\d\d|[2-9][0-9]{4}|99999)$/;
|
||||
if(!reg.test(detection_bar_code)){
|
||||
wx.showToast({
|
||||
title: '检测码格式不正确',
|
||||
icon:"none"
|
||||
})
|
||||
this.setData({
|
||||
showError:true
|
||||
})
|
||||
return false
|
||||
}
|
||||
bindCheck(id,{
|
||||
detection_bar_code,
|
||||
detection_pic:fileList
|
||||
}).then(data=>{
|
||||
this.handleDetectionDetail();
|
||||
wx.showToast({
|
||||
title: '提交成功',
|
||||
icon:"none"
|
||||
})
|
||||
})
|
||||
}),
|
||||
goChat:throttle(function(){
|
||||
let {user_id}=this.data.user_doctor;
|
||||
let order_inquiry_id=this.data.order.order_inquiry_id;
|
||||
let anther_order_inquiry_id=this.data.order_inquiry_id;
|
||||
let id='';
|
||||
if(!order_inquiry_id && !anther_order_inquiry_id){
|
||||
wx.showToast({
|
||||
title: '服务器错误',
|
||||
icon:'none'
|
||||
});
|
||||
return false
|
||||
};
|
||||
if(order_inquiry_id){
|
||||
id=order_inquiry_id
|
||||
}else if(anther_order_inquiry_id){
|
||||
id=anther_order_inquiry_id
|
||||
}
|
||||
app.method.navigateTo({
|
||||
url: '/TUIService/pages/index?currentConversationID=' + user_id + "&order_inquiry_id=" + id+ "&inquiry_type=5"
|
||||
})
|
||||
}),
|
||||
orderMsg(){
|
||||
wx.requestSubscribeMessage({
|
||||
tmplIds: ['82rKSdbKkbFK_tHmIMnHyfyRJq9ujvmAsTjRHdxmCdE'],
|
||||
success (res) {
|
||||
Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
confirmButtonOpenType:'contact',
|
||||
message: '立即联系客服',
|
||||
}).then(() => {
|
||||
// on confirm
|
||||
}).catch(()=>{
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
goSugar:throttle(function(){
|
||||
app.method.navigateTo({
|
||||
url: '/pages/sugarDetail/sugarDetail',
|
||||
})
|
||||
}),
|
||||
goExpert:throttle(function(){
|
||||
let id=this.data.user_doctor.doctor_id;
|
||||
app.method.navigateTo({
|
||||
url: '/pages/expertDetail/expertDetail?doctor_id='+id,
|
||||
})
|
||||
}),
|
||||
handleDetectionDetail(flag=false){
|
||||
let id =this.data.order_detection_id;
|
||||
detectionDetail(id).then(data=>{
|
||||
if(flag){
|
||||
let pages = getCurrentPages();
|
||||
let prevPage = pages[pages.length - 2]; //上一页
|
||||
prevPage.setData({
|
||||
changeStatus:data.detection_status,
|
||||
changeId:id
|
||||
});
|
||||
};
|
||||
let pay_money=(Number(data.amount_total)-Number(data.coupon_amount_total)).toFixed(2);
|
||||
this.setData({
|
||||
order:data,
|
||||
detection_bar_code:data.detection_bar_code,
|
||||
user_doctor:data.user_doctor,
|
||||
pay_money
|
||||
});
|
||||
|
||||
|
||||
if(data.detection_pic && data.detection_pic.length>0){
|
||||
this.setData({
|
||||
fileList:data.detection_pic
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
goScan:throttle(function(){
|
||||
let that=this;
|
||||
wx.scanCode({
|
||||
onlyFromCamera: true,
|
||||
scanType:['qrCode','barCode','datamatrix','pdf417'],
|
||||
success (res) {
|
||||
const reg=/^SDB[A-Z](?:2[3-9]|2[0-2])[SP](?:1688[6-9]|1689\d|169\d\d|1[7-9]\d\d\d|[2-9][0-9]{4}|99999)$/;
|
||||
console.log(res.result);
|
||||
if(reg.test(res.result)){
|
||||
that.setData({
|
||||
detection_bar_code:res.result,
|
||||
showCode:true,
|
||||
showError:false
|
||||
})
|
||||
}else{
|
||||
that.setData({
|
||||
showDialog:true,
|
||||
cancelBtn:false,
|
||||
message:'无法识别,请手动输入检测码'
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
}),
|
||||
confirmCancelOrder(){
|
||||
this.setData({
|
||||
showDialog:true,
|
||||
cancelBtn:true,
|
||||
message:"是否确定要取消检测?"
|
||||
})
|
||||
},
|
||||
confirmDelOrder(){
|
||||
this.setData({
|
||||
showDialog:true,
|
||||
cancelBtn:true,
|
||||
message:"您确定是要删除订单记录么?"
|
||||
})
|
||||
},
|
||||
confirmCancelPay(){
|
||||
this.setData({
|
||||
showDialog:true,
|
||||
cancelBtn:true,
|
||||
message:"您确定取消支付么?"
|
||||
})
|
||||
},
|
||||
confirm:throttle(function(event){
|
||||
if(event.detail && this.data.message=="您确定是要删除订单记录么?"){
|
||||
this.handelDelProduct();
|
||||
}else if(event.detail && this.data.message=="您确定取消支付么?"){
|
||||
this.handelCancelPayProduct();
|
||||
}else if(event.detail && this.data.message=="是否确定要取消检测?"){
|
||||
this.handelCancelCheckOrder();
|
||||
}
|
||||
}),
|
||||
//未支付2 //待接诊需要重新请求检测订单3
|
||||
confirmCheck:throttle(function(){
|
||||
if(this.data.checkSatus==2){
|
||||
this.handleCancelInquiryPay();
|
||||
}else if(this.data.checkSatus==3){
|
||||
this.handelCancelInquiryOrder();
|
||||
}else if(this.data.checkSatus==4){
|
||||
this.goChat();
|
||||
}
|
||||
}),
|
||||
handelCancelCheckOrder(flag=true){
|
||||
let id =this.data.order.order_detection_id;
|
||||
cancelCheckOrder(id).then(data=>{
|
||||
wx.showToast({
|
||||
title: '取消成功',
|
||||
icon:"none"
|
||||
})
|
||||
if(!flag){
|
||||
this.goChat();
|
||||
}
|
||||
this.handleDetectionDetail();
|
||||
})
|
||||
},
|
||||
handelCancelPayProduct(flag=true){
|
||||
let id =this.data.order.order_detection_id;
|
||||
cancelCheckPay(id).then(data=>{
|
||||
wx.showToast({
|
||||
title: '取消支付成功',
|
||||
icon:"none"
|
||||
})
|
||||
if(!flag){
|
||||
this.handleCheckInquiry();
|
||||
}
|
||||
this.handleDetectionDetail();
|
||||
})
|
||||
},
|
||||
copy(event){
|
||||
let text=event.target.dataset.text;
|
||||
wx.setClipboardData({
|
||||
data:text
|
||||
})
|
||||
},
|
||||
goPay:throttle(function(){
|
||||
let {order_detection_id,detection_no}=this.data.order;
|
||||
app.method.navigateTo({
|
||||
url: '/pages/payOrder/payOrder?inquiry_no='+ detection_no +"&order_detection_id="+order_detection_id+"&order_type=3&fromType="+encodeURIComponent('/sugarCheck/pages/checkOrder/checkOrder')
|
||||
})
|
||||
}),
|
||||
handelDelProduct(){
|
||||
let id =this.data.order.order_detection_id;
|
||||
delCheckOrder(id).then(data=>{
|
||||
let pages = getCurrentPages();
|
||||
//获取所需页面
|
||||
let prevPage = pages[pages.length - 2]; //上一页
|
||||
prevPage.setData({
|
||||
delId: id//需要传过去的数据
|
||||
});
|
||||
wx.navigateBack({
|
||||
delta: 1,
|
||||
})
|
||||
wx.showToast({
|
||||
title: '订单删除成功',
|
||||
icon:"none"
|
||||
});
|
||||
|
||||
})
|
||||
},
|
||||
goPrescriptionDetail:throttle(function(event){
|
||||
let id=event.currentTarget.dataset.id;
|
||||
app.method.navigateTo({
|
||||
url: '/pages/prescriptDetail/prescriptDetail?order_prescription_id='+id,
|
||||
})
|
||||
}),
|
||||
handelfllowDoctor(){
|
||||
let id=this.data.user_doctor.doctor_id
|
||||
fllowDoctor(id).then(data=>{
|
||||
this.setData({
|
||||
"user_doctor.follow":true
|
||||
})
|
||||
wx.showToast({
|
||||
title: '关注成功',
|
||||
icon:"none"
|
||||
})
|
||||
})
|
||||
},
|
||||
handenotfllowDoctor(){
|
||||
let id=this.data.user_doctor.doctor_id;
|
||||
notfllowDoctor(id).then(data=>{
|
||||
this.setData({
|
||||
"user_doctor.follow":false
|
||||
})
|
||||
wx.showToast({
|
||||
title: '已取消关注',
|
||||
icon:"none"
|
||||
})
|
||||
})
|
||||
},
|
||||
toggleFllow(){
|
||||
if(this.data.order.user_doctor.follow){
|
||||
this.handenotfllowDoctor()
|
||||
}else{
|
||||
this.handelfllowDoctor()
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
const cover=wx.getStorageSync('showCover');
|
||||
if(cover){
|
||||
this.setData({
|
||||
showCover:false
|
||||
})
|
||||
}
|
||||
if(options.fromType){
|
||||
this.setData({
|
||||
fromType:options.fromType
|
||||
})
|
||||
}
|
||||
let order_detection_id=options.order_detection_id;
|
||||
console.log(order_detection_id)
|
||||
if(order_detection_id){
|
||||
this.setData({
|
||||
order_detection_id
|
||||
});
|
||||
this.handleDetectionDetail();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
this.setData({
|
||||
img_host:app.hostConfig().imghost
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
|
||||
})
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"van-count-down": "@vant/weapp/count-down/index",
|
||||
"dialog":"../../../components/dialog/dialog",
|
||||
"van-dialog": "@vant/weapp/dialog/index",
|
||||
"van-icon": "@vant/weapp/icon/index",
|
||||
"van-overlay": "@vant/weapp/overlay/index"
|
||||
},
|
||||
"navigationStyle":"custom",
|
||||
"disableScroll":true,
|
||||
"navigationBarTitleText": "肝胆相照互联网医院"
|
||||
}
|
||||
@@ -0,0 +1,258 @@
|
||||
<!--pages/medinceOrderDetail/medinceOrderDetail.wxml-->
|
||||
<wxs src="../../../filters/filter.wxs" module="filter"></wxs>
|
||||
<view class="ui-navigatorbar" style="border-bottom: 1rpx solid #E3E4E5;background:#fff;">
|
||||
<image class="ui-navigatorbar-back" bindtap="goBack" src="../../assets/images/back.png" />
|
||||
<view class="ui-title">订单详情</view>
|
||||
</view>
|
||||
<view class="page">
|
||||
|
||||
<view class="outwraper {{order.detection_status==2?'active':''}}">
|
||||
<view class="patientbox">
|
||||
<view class="patient_name">
|
||||
就诊人信息
|
||||
</view>
|
||||
<view class="rightcon">
|
||||
{{order.patient_name}}(<text wx:if="{{order.patient_sex==1}}">男</text><text wx:elif="{{order.patient_sex==2}}">女</text><text wx:else>未知</text>|{{order.patient_age}}岁)
|
||||
</view>
|
||||
</view>
|
||||
<view class="bindbox" wx:if="{{order.detection_status==2 || order.detection_status==3 || order.detection_status==4}}">
|
||||
<view class="tiptitle" wx:if="{{!showError}}">
|
||||
<view class="tipleft">
|
||||
绑定检测码
|
||||
</view>
|
||||
<!-- <view class="tipright">
|
||||
查看手册
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="errorbox" wx:else="{{showError}}">
|
||||
<view class="errorleft">
|
||||
<image src="../../assets/images/check_error.png" class="checkerror" mode=""/>
|
||||
<text>检测码有误,请重新输入</text>
|
||||
</view>
|
||||
<image src="../../assets/images/check_close.png" class="checkclose" mode="" bindtap="closeError"/>
|
||||
</view>
|
||||
<view class="iptbox {{showError?'active':''}}" >
|
||||
<input type="text" value="{{detection_bar_code}}" class="ipt" placeholder="请输入检测码或扫描条形码绑定" bindinput="chnageIpt" bindblur="bluript" disabled="{{order.detection_status==3 || order.detection_status==4}}"/>
|
||||
<view class="mybar" wx:if="{{order.detection_status==2}}"></view>
|
||||
<image src="../../assets/images/scancode.png" class="scan" mode="" bindtap="goScan" wx:if="{{order.detection_status==2}}"/>
|
||||
</view>
|
||||
<view class="tiptitle" hidden="{{(order.detection_status==3 && fileList.length==0)|| (order.detection_status==4 && fileList.length==0)}}">
|
||||
<view class="tipleft">
|
||||
检测管照片
|
||||
</view>
|
||||
</view>
|
||||
<view class="uploadbox">
|
||||
<image wx:for="{{fileList}}" src="{{item}}" mode="aspectFill" class="upload" bindtap="previewImage" data-id="{{idx}}" wx:for-index="idx" wx:key="idx">
|
||||
<image src="{{img_host+'/xiaoclose.png'}}" class="close" catchtap="delImg" data-id="{{idx}}"></image>
|
||||
</image>
|
||||
<view class="upload" bindtap="upload" wx:if="{{order.detection_status==2}}">
|
||||
<van-icon name="plus" />
|
||||
<view class="text">
|
||||
上传
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="finish" wx:if="{{order.detection_status==3 || order.detection_status==4 }}">
|
||||
<view class="left">预计检测完成时间</view>
|
||||
<view class="right">{{order.detection_success_time}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="rowbox">
|
||||
<view class="titlebox">
|
||||
<view class="name">订单信息</view>
|
||||
|
||||
<!-- 检测订单状态(1:待支付 2:待绑定 3:检测中 4:检测完成 5:已取消) -->
|
||||
<!-- 支付状态(1:未支付 2:已支付 3:支付中 4:支付失败 5:支付超时 6:支付关闭 7:已撤销 8:转入退款) -->
|
||||
<view class="status" wx:if="{{order.detection_status==1}}">
|
||||
<view class="waitpay">待支付</view>
|
||||
<view class="countdown">
|
||||
<van-count-down time="{{filter.countDown(order.created_at)}}" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="status waitpay" wx:elif="{{order.detection_status==2}}">待绑定</view>
|
||||
<view class="status waitpay" wx:elif="{{order.detection_status==3}}">检测中</view>
|
||||
<view class="status" wx:elif="{{order.detection_status==4}}" style="color:#3CC7C0">检测完成</view>
|
||||
<view class="status" wx:elif="{{order.detection_status==5 && order.detection_pay_status!=5 }}">取消检测</view>
|
||||
<view class="status waitpay" wx:elif="{{order.detection_status==5 && order.detection_pay_status==5}}">支付超时</view>
|
||||
</view>
|
||||
<view class="row first">
|
||||
<view class="namebox">
|
||||
<view class="name">订单编号</view>
|
||||
<view class="dot">:</view>
|
||||
</view>
|
||||
<view class="rightbox">
|
||||
<view class="desc">{{order.detection_no}}</view>
|
||||
<view class="bar">
|
||||
|
|
||||
</view>
|
||||
<view class="copy" bindtap="copy" data-text="{{order.detection_no}}">复制</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="namebox">
|
||||
<view class="name">下单时间</view>
|
||||
<view class="dot">:</view>
|
||||
</view>
|
||||
<view class="desc rightbox">{{order.created_at}}</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="namebox">
|
||||
<view class="name">问诊类型</view>
|
||||
<view class="dot">:</view></view>
|
||||
<view class="desc">糖组检测</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="namebox">
|
||||
<view class="name">订单金额</view>
|
||||
<view class="dot">:</view>
|
||||
</view>
|
||||
<view class="desc rightbox">¥{{order.amount_total}}</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="namebox">
|
||||
<view class="name"><text>优</text><text>惠</text><text>券</text></view>
|
||||
<view class="dot">:</view>
|
||||
</view>
|
||||
<view class="desc rightbox" wx:if="{{order.coupon_amount_total>0}}">¥{{order.coupon_amount_total}}</view>
|
||||
<view class="desc rightbox" wx:else>无</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<view class="namebox">
|
||||
<view class="name">支付金额</view>
|
||||
<view class="dot">:</view>
|
||||
</view>
|
||||
<view class="desc price rightbox">
|
||||
¥{{pay_money}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="row beizhu" wx:if="{{order.cancel_reason}}">
|
||||
<view class="namebox">
|
||||
<view class="name"><text>备</text><text>注</text></view>
|
||||
<view class="dot">:</view>
|
||||
</view>
|
||||
<!-- 取消订单原因(1:主动取消 2:客服取消 3:支付超时) -->
|
||||
<view class="desc rightbox" wx:if="{{order.cancel_reason==1}}">主动取消 </view>
|
||||
<view class="desc rightbox" wx:elif="{{order.cancel_reason==2}}">客服取消</view>
|
||||
<view class="desc rightbox" wx:elif="{{order.cancel_reason==3}}">支付超时</view>
|
||||
</view>
|
||||
<!-- 商品订单退款状态(0:无退款 1:申请退款 2:退款中 3:退款成功 4:拒绝退款 5:退款关闭) -->
|
||||
<view class="row" wx:if="{{order.cancel_reason==2}}">
|
||||
<view class="namebox">
|
||||
<view class="name">退款进度</view>
|
||||
<view class="dot">:</view>
|
||||
</view>
|
||||
<view class="desc rightbox" wx:if="{{order.detection_refund_status==0}}">
|
||||
无退款
|
||||
</view>
|
||||
<view class="desc rightbox" wx:elif="{{order.detection_refund_status==1}}">
|
||||
申请退款
|
||||
</view>
|
||||
<view class="desc rightbox" wx:elif="{{order.detection_refund_status==2}}">
|
||||
退款中
|
||||
</view>
|
||||
<view class="desc rightbox" wx:elif="{{order.detection_refund_status==3}}">
|
||||
退款成功
|
||||
</view>
|
||||
<view class="desc rightbox" wx:elif="{{order.detection_refund_status==4}}">
|
||||
拒绝退款
|
||||
</view>
|
||||
<view class="desc rightbox" wx:elif="{{order.detection_refund_status==5}}">
|
||||
退款关闭
|
||||
</view>
|
||||
</view>
|
||||
<!-- 检测订单状态(1:待支付 2:待绑定 3:检测中 4:检测完成 5:已取消) -->
|
||||
<view class="contactbox" wx:if="{{order.detection_status==3 || order.detection_status==4}}" bindtap="orderMsg">
|
||||
<image src="../../assets/images/kefu.png" class="kefu" mode=""/>
|
||||
<text>联系客服</text>
|
||||
</view>
|
||||
<view class="contactbox" wx:if="{{order.detection_status==2}}" bindtap="confirmCancelOrder">
|
||||
<text>取消检测</text>
|
||||
</view>
|
||||
<view class="contactbox" wx:if="{{order.detection_status==5}}" bindtap="confirmDelOrder">
|
||||
<text>删除订单</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="personinfobox" bindtap="goExpert" wx:if="user_doctor && user_doctor.doctor_id">
|
||||
|
||||
<view class="namebox" style="justify-content: flex-start;">
|
||||
<image src="{{user_doctor.avatar}}" class="head" wx:if="{{user_doctor.avatar}}" mode="aspectFill"></image>
|
||||
<image src="{{img_host+'/doctor_avatar.png'}}" class="head" wx:else></image>
|
||||
<view class="namewraper">
|
||||
<view class="row">
|
||||
<view class="name">{{user_doctor.user_name}}</view>
|
||||
<view class="type" wx:if="{{user_doctor.hospital_level_name}}">{{user_doctor.hospital_level_name}}</view>
|
||||
<view class="type" wx:if="{{user_doctor.multi_point_status == 1 && user_doctor.multi_point_enable==1}}">可处方</view>
|
||||
</view>
|
||||
<view class="hospital">
|
||||
<!-- 1主任医师、2主任中医师、3副主任医师、4副主任中医师、5主治医师、8住院医师 -->
|
||||
|
||||
<text class="doctor_title" wx:if="{{user_doctor.doctor_title}}">{{user_doctor.doctor_title}}</text>
|
||||
<text class="doctor_title" wx:elif="{{user_doctor.doctor_title==2}}">主任中医师</text>
|
||||
<text>{{user_doctor.department_custom_name}}</text>
|
||||
</view>
|
||||
<view class="hospital">{{user_doctor.hospital_name}}</view>
|
||||
</view>
|
||||
<view class="guanzhu" wx:if="{{!user_doctor.follow}}" catchtap="toggleFllow">
|
||||
<image src="{{img_host+'/star.png'}}" ></image>
|
||||
<text decode="true"> 关注</text>
|
||||
</view>
|
||||
<view class="guanzhu" wx:else catchtap="toggleFllow">
|
||||
<image src="{{img_host+'/star_on.png'}}" ></image>
|
||||
<text decode="true"> 关注</text>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
<!-- <view class="borderbox">
|
||||
<view class="goodjob" style="margin-top: 30rpx;">
|
||||
擅长:{{user_doctor.be_good_at}}
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="contactbox" style="border:none;" wx:if="{{order.detection_status==2}}" bindtap="orderMsg">
|
||||
<image src="../../assets/images/kefu.png" class="kefu" mode=""/>
|
||||
<text>联系客服</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<!-- 检测订单状态(1:待支付 2:待绑定 3:检测中 4:检测完成 5:已取消) -->
|
||||
|
||||
<view class="paybox" wx:if="{{order.detection_pay_status==1}}">
|
||||
<view class="left" bindtap="confirmCancelPay">取消支付</view>
|
||||
<view class="right" bindtap="goPay">
|
||||
立即支付
|
||||
|
||||
<!-- :¥{{order.payment_amount_total}} -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="paybox" wx:if="{{order.detection_status==2 || order.detection_status==3}}">
|
||||
<view class="submitbtn {{order.detection_status==3?'active':''}}" bindtap="handleBindCheck">提交</view>
|
||||
</view>
|
||||
<view class="paybox" wx:if="{{order.detection_status==4}}">
|
||||
<view class="left" bindtap="goReport">查看报告</view>
|
||||
<view class="right" bindtap="handleCheckInquiry">
|
||||
<text>报告解读</text>
|
||||
<image src="../../assets/images/freetalk.png" class="freetalk" alt=""/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="paybox" wx:if="{{order.detection_status==5}}">
|
||||
<view class="submitbtn" bindtap="goSugar">重新检测</view>
|
||||
</view>
|
||||
|
||||
<dialog bind:confirm="confirm" cancelBtn="{{cancelBtn}}" showDialog="{{showDialog}}" message="{{message}}"></dialog>
|
||||
<van-dialog id="van-dialog" confirm-button-color="#3CC7C0" />
|
||||
<van-overlay show="{{ showCover }}" wx:if="{{order.detection_status==2}}">
|
||||
<view class="wrapper">
|
||||
<image src="../../assets/images/mask_check1.png" mode="widthFix" class="timg1" lazy-load/>
|
||||
<image src="../../assets/images/mask_check2.png" mode="widthFix" class="timg2" lazy-load/>
|
||||
<view class="button" bindtap="onClickHide">
|
||||
知道了
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</van-overlay>
|
||||
<van-dialog id="van-dialog" confirm-button-color="#3CC7C0" />
|
||||
<dialog bind:confirm="confirmCheck" cancelBtn="{{true}}" showDialog="{{showCheckDialog}}" message="{{checkmessage}}" confirmtext="继续"></dialog>
|
||||
@@ -0,0 +1,887 @@
|
||||
/* pages/medinceOrderDetail/medinceOrderDetail.wxss */
|
||||
/**app.wxss**/
|
||||
.container {
|
||||
padding-top: 135px;
|
||||
padding-bottom: 10rpx;
|
||||
/* top:280rpx; */
|
||||
/* position: absolute; */
|
||||
width:100%;
|
||||
/* overflow-y: scroll; */
|
||||
background: #F2F2F2;
|
||||
}
|
||||
input{
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica,
|
||||
}
|
||||
page{
|
||||
position: relative;
|
||||
width:100%;
|
||||
height:100%;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica,
|
||||
Segoe UI, Arial, Roboto, 'PingFang SC', 'miui', 'Hiragino Sans GB', 'Microsoft Yahei',
|
||||
sans-serif;
|
||||
}
|
||||
.page{
|
||||
width:100vw;
|
||||
height:100vh;
|
||||
background: #f2f2f2;
|
||||
}
|
||||
.contain{padding: 0 30rpx 0rpx;height: 100%;overflow: hidden;position: relative;}
|
||||
::-webkit-scrollbar {
|
||||
display: none;
|
||||
width: 0;
|
||||
height: 0;
|
||||
color: transparent;
|
||||
}
|
||||
.van-picker__confirm {
|
||||
color:#3CC7C0!important;
|
||||
font-size: 32rpx!important;
|
||||
}
|
||||
.van-picker__title{
|
||||
font-weight: 600!important;
|
||||
color: rgba(0,0,0,0.9)!important;
|
||||
font-size: 32rpx!important;
|
||||
}
|
||||
.van-picker__cancel{
|
||||
color: rgba(0,0,0,0.6)!important;
|
||||
font-size: 32rpx!important;
|
||||
}
|
||||
.nonedata{
|
||||
width:100%;
|
||||
color:#666;
|
||||
min-height: 320rpx;
|
||||
font-size: 28rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.ui-navigatorbar {
|
||||
position: fixed;
|
||||
z-index:99;
|
||||
top: 0;
|
||||
width: 750rpx;
|
||||
height: 172rpx;
|
||||
background: #F2F2F2;
|
||||
backdrop-filter: blur(20px);
|
||||
}
|
||||
|
||||
.ui-navigatorbar-back {
|
||||
position: absolute;
|
||||
padding-left:40rpx;
|
||||
padding-right:40rpx;
|
||||
width:30rpx;
|
||||
height:60rpx;
|
||||
left: 0rpx;
|
||||
bottom: 20rpx;
|
||||
}
|
||||
|
||||
.ui-title {
|
||||
position: absolute;
|
||||
width: 350rpx;
|
||||
height: 88rpx;
|
||||
line-height: 56rpx;
|
||||
font-size: 36rpx;
|
||||
color: #000000;
|
||||
bottom: 0;
|
||||
left: 200rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.droptitle.active{
|
||||
color:#3CC7C0;
|
||||
}
|
||||
.slotmsg{
|
||||
-webkit-overflow-scrolling: touch;
|
||||
font-size: 28rpx;
|
||||
line-height:40rpx;
|
||||
max-height:60vh;
|
||||
overflow-y: auto;
|
||||
padding:48rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.van-dropdown-item__title{
|
||||
width:100%!important;
|
||||
flex:1;
|
||||
text-align: center;
|
||||
}
|
||||
.van-dropdown-item__icon{
|
||||
z-index:2;
|
||||
position: absolute!important;
|
||||
|
||||
right:25rpx;
|
||||
}
|
||||
.van-cell__value{
|
||||
flex:none!important;
|
||||
z-index:1;
|
||||
}
|
||||
.onlinebox .icon{
|
||||
top:60rpx;
|
||||
left:50%;
|
||||
position: absolute;
|
||||
margin-left: -48rpx;
|
||||
width:96rpx;
|
||||
height:34rpx;
|
||||
border-radius: 0;
|
||||
}
|
||||
.page{
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-bottom:0rpx;
|
||||
}
|
||||
.outwraper{
|
||||
flex:1;
|
||||
overflow-y: scroll;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
padding-bottom: 200rpx;
|
||||
}
|
||||
.outwraper.active{
|
||||
padding-bottom: 220rpx;
|
||||
}
|
||||
.add {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 120rpx;
|
||||
background: #FFFFFF;
|
||||
font-weight: 600;
|
||||
color: #ED9C00;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.addicon{
|
||||
width: 40rpx;
|
||||
height:40rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.addressbox {
|
||||
margin-top:172rpx;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 32rpx 32rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.addressbox .left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.addressbox .icon {
|
||||
width: 40rpx;
|
||||
flex-shrink: 0;
|
||||
height: 47rpx;
|
||||
|
||||
}
|
||||
|
||||
.addressbox .info {
|
||||
margin-left: 30rpx;
|
||||
}
|
||||
|
||||
.addressbox .ricon {
|
||||
width: 24rpx;
|
||||
height: 48rpx;
|
||||
}
|
||||
|
||||
.info .name {
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
color: #333333
|
||||
}
|
||||
|
||||
.info .address {
|
||||
margin-top: 10rpx;
|
||||
color: #333333;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.row {
|
||||
align-items: center;
|
||||
padding: 0 32rpx;
|
||||
display: flex;
|
||||
line-height: 52rpx
|
||||
}
|
||||
|
||||
.row.first {
|
||||
margin-top: 34rpx;
|
||||
}
|
||||
|
||||
.rowbox .row .name {
|
||||
white-space: nowrap;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
font-weight: 600;
|
||||
display: flex;
|
||||
width:114rpx;
|
||||
align-items: baseline;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.row .dot{
|
||||
font-weight: 600;
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
}
|
||||
.row .desc {
|
||||
align-items: baseline;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.rowdesc {
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.rowdesc .desc {
|
||||
text-overflow: -o-ellipsis-lastline;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
line-clamp: 2;
|
||||
-webkit-box-orient: vertical
|
||||
}
|
||||
|
||||
.row .price {
|
||||
color: #EF4F20;
|
||||
font-weight: bold;
|
||||
font-size: 34rpx
|
||||
}
|
||||
|
||||
.row.last {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.copy {
|
||||
|
||||
height: 40rpx;
|
||||
color: #000;
|
||||
font-size: 24rpx;
|
||||
display: flex;
|
||||
margin-left: 20rpx;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
.row .left {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.row .right {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.titlebox .name {
|
||||
color: #000;
|
||||
font-size: 34rpx;
|
||||
}
|
||||
.rowbox{
|
||||
margin-top: 20rpx;
|
||||
background-color: #fff;
|
||||
padding-bottom: 30rpx;
|
||||
}
|
||||
.titlebox {
|
||||
padding: 0 32rpx;
|
||||
height: 112rpx;
|
||||
border-bottom: 1rpx solid #E3E4E5;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.titlebox .status{
|
||||
font-size: 28rpx
|
||||
}
|
||||
.waitpay {
|
||||
text-align: right;
|
||||
color: #EF4F20
|
||||
}
|
||||
|
||||
.headicon {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.van-count-down {
|
||||
margin-top: 5rpx;
|
||||
color: #EF4F20 !important;
|
||||
}
|
||||
.infobox {
|
||||
margin-top: 20rpx;
|
||||
background:#fff;
|
||||
|
||||
}
|
||||
.infobox .status{
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
.infobox .status.wait{
|
||||
color: #EF4F20;
|
||||
}
|
||||
.infobox .status.timeout{
|
||||
color: #EF4F20;
|
||||
}
|
||||
.infobox .title {
|
||||
padding: 0 32rpx;
|
||||
background-color: #fff;
|
||||
font-size: 34rpx;
|
||||
height: 112rpx;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1rpx solid #E3E4E5;
|
||||
}
|
||||
|
||||
.imgbox {
|
||||
border-radius:8rpx;
|
||||
border:1rpx solid #ccc;
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.yaoimg {
|
||||
width: 120rpx;
|
||||
height: 128rpx;
|
||||
}
|
||||
|
||||
.imgbox .desc {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
font-size: 22rpx;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
line-height: 30rpx;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.imgbox .desc .tip {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.medincebox .cell {
|
||||
padding: 30rpx 32rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-bottom: 1rpx solid #E3E4E5;
|
||||
}
|
||||
.medincebox .cell:nth-last-child(2){
|
||||
border-bottom:none;
|
||||
}
|
||||
.rightinfo {
|
||||
margin-left: 30rpx;
|
||||
flex: 1;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.medincebox .cell .name {
|
||||
word-break: break-all;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
}
|
||||
.row.beizhu{
|
||||
align-items: flex-start;
|
||||
}
|
||||
.rightinfo .own {
|
||||
margin-top: 47rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
.btnbox{
|
||||
display: flex;
|
||||
padding:0 32rpx;
|
||||
font-size: 30rpx;
|
||||
padding-bottom: 30rpx;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.btnbox .btn{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0 20rpx;
|
||||
height:58rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 30rpx;
|
||||
margin-left: 20px;
|
||||
|
||||
}
|
||||
.btnbox .orderDetail{
|
||||
background: #3CC7C0;
|
||||
color:#fff;
|
||||
border: 1rpx solid #3CC7C0;
|
||||
}
|
||||
.personinfo{
|
||||
margin-top: 20rpx;
|
||||
background: #fff;
|
||||
}
|
||||
.personinfobox {
|
||||
padding: 30rpx 32rpx 40rpx;
|
||||
background: #fff;
|
||||
margin-top: 20rpx;
|
||||
margin-bottom:10rpx;
|
||||
}
|
||||
.personinfobox .title {
|
||||
background-color: #fff;
|
||||
font-size: 32rpx;
|
||||
height: 112rpx;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 1rpx solid #E3E4E5;
|
||||
}
|
||||
.personinfobox .namebox .head {
|
||||
width: 80rpx;
|
||||
height:80rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.personinfobox .namebox .guanzhu image {
|
||||
width: 28rpx;
|
||||
height: 26rpx;
|
||||
}
|
||||
|
||||
|
||||
.personinfobox .namewraper {
|
||||
flex:1;
|
||||
display: flex;
|
||||
|
||||
justify-content: space-between;
|
||||
flex-direction: column;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.personinfobox .type {
|
||||
height: 32rpx;
|
||||
display: flex;
|
||||
margin-bottom: 6rpx;
|
||||
line-height: 32rpx;
|
||||
white-space: nowrap;
|
||||
align-items: center;
|
||||
margin-left: 18rpx;
|
||||
padding: 0rpx 6rpx;
|
||||
background: #ED9C00;
|
||||
border-radius: 4rpx;
|
||||
color: #FFFFFF;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.personinfobox .namebox .row {
|
||||
display: flex;
|
||||
padding:0;
|
||||
align-items: flex-end;
|
||||
|
||||
}
|
||||
|
||||
.personinfobox .namebox {
|
||||
display: flex;
|
||||
align-items:stretch;
|
||||
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.personinfobox .namebox .name {
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
max-width:400rpx;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
font-size: 34rpx;
|
||||
}
|
||||
|
||||
.personinfobox .position {
|
||||
font-size: 30rpx;
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
.doctor_title{
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
.personinfobox .namebox .row{
|
||||
line-height: 40rpx;
|
||||
align-items: flex-end;
|
||||
}
|
||||
.personinfobox .hospital {
|
||||
margin-top: 12rpx;
|
||||
color: #333333;
|
||||
font-size: 28rpx;
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
|
||||
.personinfobox .namebox .position {
|
||||
font-weight: normal;
|
||||
white-space: nowrap;
|
||||
margin-left: 15rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.personinfobox .goodjob {
|
||||
color: #666666;
|
||||
margin-top: 38rpx;
|
||||
line-height: 42rpx;
|
||||
margin-left: 100rpx;
|
||||
font-size: 28rpx;
|
||||
word-break: break-all;
|
||||
}
|
||||
.paybox{
|
||||
bottom:0px;
|
||||
height: 186rpx;
|
||||
background: #FFFFFF;
|
||||
position: absolute;
|
||||
display: flex;
|
||||
z-index:1;
|
||||
width:100%;
|
||||
}
|
||||
.submitbtn{
|
||||
width:100%;
|
||||
margin:16px 32rpx 0;
|
||||
height: 94rpx;
|
||||
background: #3CC7C0;
|
||||
border-radius: 47rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 36rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.submitbtn.active{
|
||||
color: #000000;
|
||||
background: rgba(0,0,0,0.1);
|
||||
}
|
||||
.paybox .left{
|
||||
height: 94rpx;
|
||||
border-radius: 47rpx;
|
||||
font-size: 36rpx;
|
||||
color: rgba(0,0,0,0.85);
|
||||
border: 1rpx solid rgba(0,0,0,0.65);
|
||||
margin-left: 32rpx;
|
||||
flex:1;
|
||||
font-size: 28rpx;
|
||||
margin-top: 16rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
}
|
||||
.orderrow{
|
||||
display: flex;
|
||||
margin:10rpx 32rpx 0;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.freetalk{
|
||||
position: absolute;
|
||||
width:403rpx;
|
||||
height:79rpx;
|
||||
top: -53rpx;
|
||||
left:25rpx;
|
||||
}
|
||||
.paybox .right{
|
||||
position: relative;
|
||||
margin-right: 32rpx;
|
||||
margin-top: 16rpx;
|
||||
color: #FFFFFF;
|
||||
display: flex;
|
||||
margin-left: 24rpx;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #3CC7C0;
|
||||
height: 94rpx;
|
||||
font-size: 36rpx;
|
||||
color: #FFFFFF;
|
||||
background: #3CC7C0;
|
||||
border-radius: 47rpx;
|
||||
flex:2;
|
||||
}
|
||||
.express{
|
||||
width: 158rpx;
|
||||
height: 60rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: #F8F8F8;
|
||||
font-size: 26rpx;
|
||||
font-weight: 400;
|
||||
color: #353535;
|
||||
border-radius: 6rpx;
|
||||
border: 1rpx solid rgba(5,5,5,0.1);
|
||||
}
|
||||
.namenum{
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
.row.wuliu{
|
||||
margin-top: 20rpx;
|
||||
align-items: flex-start;
|
||||
}
|
||||
.row.wuliu .desc{
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.desc .dizhi{
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
line-height: 28rpx;
|
||||
}
|
||||
.wuliucar{
|
||||
width:40rpx;
|
||||
height:33rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.row.wuliu .date{
|
||||
font-size: 24rpx;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
}
|
||||
.guanzhu {
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
white-space: nowrap;
|
||||
color: #3CC7C0;
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 24rpx;
|
||||
|
||||
}
|
||||
.namebox .guanzhu image {
|
||||
width: 35rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
.patientbox{
|
||||
margin-top: 172rpx;
|
||||
width:100%;
|
||||
box-sizing: border-box;
|
||||
padding:0 32rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 109rpx;
|
||||
background: #FFFFFF;
|
||||
}
|
||||
.patient_name{
|
||||
font-size: 32rpx;
|
||||
font-weight: 400;
|
||||
color: rgba(0,0,0,0.85)
|
||||
}
|
||||
.patientbox .rightcon{
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: rgba(0,0,0,0.65)
|
||||
}
|
||||
.namebox{
|
||||
display: flex;
|
||||
}
|
||||
.rowbox .row{
|
||||
justify-content: space-between;
|
||||
}
|
||||
.bar{
|
||||
margin-left: 30rpx;
|
||||
color: rgba(0,0,0,0.45);
|
||||
height: 40rpx;
|
||||
margin-bottom: 5rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.rightbox{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.bindbox{
|
||||
overflow: hidden;
|
||||
padding:0 32rpx 10rpx;
|
||||
margin:20rpx 0rpx;
|
||||
background: #FFFFFF;
|
||||
}
|
||||
.errorbox{
|
||||
margin-top: 10rpx;
|
||||
display: flex;
|
||||
height: 80rpx;
|
||||
background: #FFF1F0;
|
||||
border-radius: 8rpx;
|
||||
padding:0 20rpx;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.tiptitle{
|
||||
height: 80rpx;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.tipleft{
|
||||
font-size: 32rpx;
|
||||
color: rgba(0,0,0,0.85);
|
||||
}
|
||||
.tipright{
|
||||
color:#4096FF;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.iptbox{
|
||||
margin-top: 24rpx;
|
||||
width:100%;
|
||||
height: 78rpx;
|
||||
border-radius: 6rpx;
|
||||
border: 2rpx solid #3CC7C0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.iptbox.active{
|
||||
border: 2rpx solid #FF4D4F;
|
||||
}
|
||||
.mybar{
|
||||
height:38rpx;
|
||||
margin:0 30rpx;
|
||||
width:2rpx;
|
||||
background:#3CC7C0 ;
|
||||
}
|
||||
.ipt{
|
||||
margin-left: 20rpx;
|
||||
flex:1;
|
||||
}
|
||||
.scan{
|
||||
margin-right: 20rpx;
|
||||
width:40rpx;
|
||||
height:40rpx;
|
||||
}
|
||||
.uploadbox{
|
||||
|
||||
margin:24rpx 0rpx 0;
|
||||
display: flex;
|
||||
flex-wrap: wrap ;
|
||||
}
|
||||
.uploadbox .close{
|
||||
z-index:9;
|
||||
top:5rpx;
|
||||
right:5rpx;
|
||||
position: absolute;
|
||||
width:30rpx;
|
||||
height:30rpx;
|
||||
}
|
||||
.uploadbox .upload{
|
||||
position: relative;
|
||||
object-fit: cover;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: 5px 19rpx 5px 0;
|
||||
}
|
||||
.uploadbox .upload:nth-child(4n){
|
||||
margin-right: 0;
|
||||
}
|
||||
.van-icon-plus{
|
||||
color:#333;
|
||||
font-size: 80rpx!important;
|
||||
}
|
||||
.upload{
|
||||
width: 148rpx;
|
||||
height:148rpx;
|
||||
display: flex;
|
||||
justify-content:center ;
|
||||
align-items: center;
|
||||
background: #F2F2F2;
|
||||
border-radius: 4rpx
|
||||
}
|
||||
.uploadbox view:first-child{
|
||||
margin-left: 0!important;
|
||||
}
|
||||
.upload .text{
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.errorleft{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.checkerror{
|
||||
margin-right: 10rpx;
|
||||
width:40rpx;
|
||||
height:40rpx;
|
||||
}
|
||||
.checkclose{
|
||||
width:32rpx;
|
||||
height:32rpx;
|
||||
}
|
||||
.wrapper{
|
||||
width:100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
margin:285rpx auto;
|
||||
}
|
||||
.timg1{
|
||||
width:694rpx;
|
||||
}
|
||||
.timg2{
|
||||
width:506rpx;
|
||||
}
|
||||
.button{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 224rpx;
|
||||
font-size: 32rpx;
|
||||
height: 83rpx;
|
||||
font-weight: 500;
|
||||
margin-top: 72rpx;
|
||||
color: #FFFFFF;
|
||||
border-radius: 47rpx;
|
||||
border: 1rpx solid #FFFFFF;
|
||||
}
|
||||
.contactbox{
|
||||
width: 320rpx;
|
||||
margin:20rpx auto 0rpx;
|
||||
height: 72rpx;
|
||||
border-radius: 39rpx;
|
||||
border: 2rpx solid rgba(0,0,0,0.15);
|
||||
align-items: center;
|
||||
color: rgba(0,0,0,0.85);
|
||||
font-size: 28rpx;
|
||||
justify-content: center;
|
||||
display: flex;
|
||||
}
|
||||
.kefu{
|
||||
width: 32rpx;
|
||||
margin-right: 10rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
.finish{
|
||||
margin-top: 20rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20rpx;
|
||||
align-items: center;
|
||||
}
|
||||
.finish .left{
|
||||
font-size: 32rpx;
|
||||
font-weight: 400;
|
||||
color: rgba(0,0,0,0.85);
|
||||
}
|
||||
.finish .right{
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: rgba(0,0,0,0.45);
|
||||
}
|
||||
@@ -0,0 +1,387 @@
|
||||
// pages/sugarDetail/sugarDetail.js
|
||||
const app = getApp()
|
||||
import {throttle} from "../../../utils/util"
|
||||
import {family,addfamily} from "../../../api/familyDoc";
|
||||
import {getProject,hasCreate} from "../../../api/checkSugar"
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static',
|
||||
showdialog:false,
|
||||
cancelBtn:false,
|
||||
messageTitle:'',
|
||||
opacity:0,
|
||||
nation_id:'',
|
||||
nation_name:'',
|
||||
show:false,
|
||||
projectImg:'',
|
||||
detection_project_id:1,
|
||||
idCard:'',
|
||||
relation:'',
|
||||
phoneNumber:'',
|
||||
card_name:'',
|
||||
realName:'',
|
||||
showAdd:false,
|
||||
currentName:'',
|
||||
age:"",
|
||||
currentFamilyId:'',
|
||||
showPicker:false,
|
||||
family:[],
|
||||
columns: [{
|
||||
text: "本人",
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
text: "父母",
|
||||
value: 2
|
||||
},
|
||||
{
|
||||
text: "爱人",
|
||||
value: 3
|
||||
},
|
||||
{
|
||||
text: "子女",
|
||||
value: 4
|
||||
},
|
||||
{
|
||||
text: "亲戚",
|
||||
value: 5
|
||||
},
|
||||
{
|
||||
text: "其他 ",
|
||||
value: 6
|
||||
}
|
||||
]
|
||||
},
|
||||
onConfirmPicker(event) {
|
||||
const {value} = event.detail;
|
||||
this.setData({
|
||||
relationId: `${value.value}`,
|
||||
relation: `${value.text}`,
|
||||
showPicker: false
|
||||
});
|
||||
},
|
||||
|
||||
openPicker() {
|
||||
this.setData({
|
||||
showPicker: true
|
||||
})
|
||||
},
|
||||
closePicker() {
|
||||
this.setData({
|
||||
showPicker: false
|
||||
})
|
||||
},
|
||||
addPatient(){
|
||||
this.setData({
|
||||
showAdd:true,
|
||||
currentFamilyId:"",
|
||||
sex:""
|
||||
})
|
||||
},
|
||||
onCloseAdd() {
|
||||
this.setData({
|
||||
showAdd: false
|
||||
});
|
||||
},
|
||||
onClose(){
|
||||
this.setData({
|
||||
show:false
|
||||
})
|
||||
},
|
||||
showPatient(){
|
||||
this.setData({
|
||||
show:true
|
||||
})
|
||||
},
|
||||
onConfirm(event) {
|
||||
const { value} = event.detail;
|
||||
this.setData({
|
||||
relationId: `${value.value}`,
|
||||
relation:`${value.text}`,
|
||||
showPicker:false
|
||||
});
|
||||
},
|
||||
inputChange(e){
|
||||
this.setData({
|
||||
[e.target.dataset.id]: e.detail.value
|
||||
})
|
||||
},
|
||||
handelGetProject(){
|
||||
let {detection_project_id}=this.data;
|
||||
getProject(
|
||||
detection_project_id
|
||||
).then(data=>{
|
||||
this.setData({
|
||||
projectImg:data.img_path
|
||||
})
|
||||
})
|
||||
},
|
||||
cancelAlert(){
|
||||
this.setData({
|
||||
showdialog: false
|
||||
})
|
||||
},
|
||||
confirm(event) {
|
||||
if (event.detail) {
|
||||
this.setData({
|
||||
showdialog: false
|
||||
})
|
||||
}
|
||||
if(this.data.messageTitle=="当前患者存在进行中检测订单"){
|
||||
let {order_detection_id}=this.data;
|
||||
app.method.navigateTo({
|
||||
url: '/sugarCheck/pages/checkOrderDetail/checkOrderDetail?order_detection_id='+ order_detection_id,
|
||||
})
|
||||
}
|
||||
},
|
||||
handleHasCreate(){
|
||||
let {currentFamilyId,sex,currentName,detection_project_id,age,nation_id,nation_name}=this.data;
|
||||
hasCreate({
|
||||
family_id:currentFamilyId,
|
||||
detection_project_id:detection_project_id
|
||||
}).then(data=>{
|
||||
if(data){
|
||||
this.setData({
|
||||
showdialog:true,
|
||||
messageTitle:"当前患者存在进行中检测订单",
|
||||
order_detection_id: data,
|
||||
cancelBtn:true
|
||||
})
|
||||
}else{
|
||||
let cur_nation_id=nation_id?nation_id:'';
|
||||
let cur_nation_name=nation_name?nation_name:'';
|
||||
app.method.navigateTo({
|
||||
url: '/sugarCheck/pages/sugarSickInfo/sugarSickInfo?family_id='+currentFamilyId+"&real_name="+currentName+"&detection_project_id="+detection_project_id+"&sex="+sex+"&age="+age+"&nation_id="+cur_nation_id+"&nation_name="+cur_nation_name
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//获取身份证号信息
|
||||
getIdInfo(IdCard){
|
||||
var reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
|
||||
if(reg.test(IdCard)){
|
||||
let sex
|
||||
if (parseInt(IdCard.substr(16, 1)) % 2 === 1) {
|
||||
sex = '1'
|
||||
} else {
|
||||
sex = '2'
|
||||
}
|
||||
var ageDate = new Date()
|
||||
var month = ageDate.getMonth() + 1
|
||||
var day = ageDate.getDate()
|
||||
var age = ageDate.getFullYear() - IdCard.substring(6, 10) - 1
|
||||
if (IdCard.substring(10, 12) < month || (IdCard.substring(10, 12) === month && IdCard.substring(12, 14) <= day)) {
|
||||
age++
|
||||
}
|
||||
if (age <= 0) {
|
||||
age = 1
|
||||
}
|
||||
return { sex, age}
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
},
|
||||
addFamily(){
|
||||
let {realName,idCard,phoneNumber,relationId}=this.data;
|
||||
addfamily({
|
||||
card_name:realName,
|
||||
type:1,
|
||||
id_number:idCard,
|
||||
mobile:phoneNumber,
|
||||
is_default:0,
|
||||
relation:relationId
|
||||
}).then((data)=>{
|
||||
this.getFamily();
|
||||
this.setData({
|
||||
currentFamilyId:data.family_id,
|
||||
realName:'',
|
||||
idCard:'',
|
||||
phoneNumber:'',
|
||||
relationId:'',
|
||||
showAdd:false,
|
||||
relation:'',
|
||||
show:true
|
||||
})
|
||||
})
|
||||
},
|
||||
selectPatient(e){
|
||||
const {familyid,sex,card_name,age,nation,nation_name}=e.currentTarget.dataset;
|
||||
this.setData({
|
||||
currentFamilyId:familyid,
|
||||
sex:sex,
|
||||
nation_name:nation_name,
|
||||
age:age,
|
||||
nation_id:nation,
|
||||
currentName:card_name
|
||||
})
|
||||
},
|
||||
getFamily(){
|
||||
family().then((data)=>{
|
||||
this.setData({
|
||||
family:this.transforpage(data)
|
||||
})
|
||||
})
|
||||
},
|
||||
transforpage(arr) {
|
||||
const pages = []
|
||||
let newArr=arr.concat([{
|
||||
type:"add"
|
||||
}])
|
||||
newArr.forEach((item, index) => {
|
||||
const page = Math.floor(index / 2)
|
||||
if (!pages[page]) {
|
||||
pages[page] = []
|
||||
}
|
||||
pages[page].push(item)
|
||||
});
|
||||
return pages
|
||||
},
|
||||
goBack(){
|
||||
console.log("origion:"+app.globalData.origion)
|
||||
if(app.globalData.origion==1){
|
||||
wx.reLaunch({
|
||||
url: '/pages/index/index',
|
||||
})
|
||||
}else if(app.globalData.origion==2){
|
||||
wx.reLaunch({
|
||||
url: '/pages/index/index',
|
||||
})
|
||||
}else{
|
||||
wx.navigateBack({
|
||||
delta: 1,
|
||||
fail:function(){
|
||||
wx.reLaunch({
|
||||
url: '/pages/index/index',
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
handleThrottleSick:throttle(function(){
|
||||
|
||||
this.goSick()
|
||||
}),
|
||||
goSick(){
|
||||
|
||||
if (!/^([\u4e00-\u9fa5\·]{2,10})$/.test(this.data.realName)) {
|
||||
wx.showToast({
|
||||
title: `姓名要求在2-10个汉字`,
|
||||
icon: 'none',
|
||||
});
|
||||
return false;
|
||||
};
|
||||
if (!/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(this.data.idCard)){
|
||||
wx.showToast({
|
||||
title: `请输入有效的身份证号`,
|
||||
icon: 'none',
|
||||
});
|
||||
return false;
|
||||
};
|
||||
if(this.data.phoneNumber){
|
||||
if(!/^1[3456789]\d{9}$/.test(this.data.phoneNumber)){
|
||||
wx.showToast({
|
||||
title: `请输入有效的手机号码!`,
|
||||
icon: 'none',
|
||||
});
|
||||
return false;
|
||||
}
|
||||
};
|
||||
let idInfo=this.getIdInfo(this.data.idCard);
|
||||
if(idInfo.age<6){
|
||||
wx.showToast({
|
||||
title: `六岁以下儿童不支持线上问诊`,
|
||||
icon: 'none',
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
this.setData({
|
||||
sex:idInfo.sex,
|
||||
age:idInfo.age,
|
||||
nation_id:'',
|
||||
nation_name:'',
|
||||
currentName:this.data.realName
|
||||
})
|
||||
this.addFamily();
|
||||
|
||||
},
|
||||
onPageScroll: function(e) {
|
||||
let opacity=0;
|
||||
if(e.scrollTop/(86*2)>=1){
|
||||
opacity=1
|
||||
}else{
|
||||
opacity=e.scrollTop/(86*2)
|
||||
}
|
||||
this.setData({
|
||||
opacity:opacity
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
this.setData({
|
||||
img_host:app.hostConfig().imghost
|
||||
});
|
||||
this.handelGetProject();
|
||||
this.getFamily()
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
this.setData({
|
||||
img_host:app.hostConfig().imghost
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
// onShareAppMessage() {
|
||||
|
||||
// }
|
||||
})
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"van-popup": "@vant/weapp/popup/index",
|
||||
"dialog":"../../../components/dialog/dialog",
|
||||
"van-picker": "@vant/weapp/picker/index"
|
||||
},
|
||||
"navigationStyle":"custom"
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
<!--pages/sugarDetail/sugarDetail.wxml-->
|
||||
<view class="ui-navigatorbar" style="background-color:transparent;backdrop-filter:blur(0px)">
|
||||
<image class="ui-navigatorbar-back" bindtap="goBack" src="{{img_host+'/sugar_left.png'}}" />
|
||||
<view class="ui-title" style="color:#fff;opacity: {{1-opacity}};" >糖组检测</view>
|
||||
</view>
|
||||
<view class="page">
|
||||
|
||||
<image src="{{projectImg}}" mode="widthFix" class="dcimg" lazy-load/>
|
||||
<view class="nextbox">
|
||||
<image src="{{img_host+'/sugar_process.png'}}" mode="widthFix" class="dcimg" lazy-load />
|
||||
<view class="msgbtnbox">
|
||||
<view class="msgbtn" bindtap="showPatient">填写信息 </view>
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<van-popup show="{{ show }}" bind:close="onClose" closeable
|
||||
position="bottom" round
|
||||
custom-style="min-height: 60%">
|
||||
<view class="titlepop">选择患者</view>
|
||||
<view class="personbox">
|
||||
<view class="row" wx:for-item="itemName" wx:for="{{family}}" wx:key="*this">
|
||||
<view class="cell" wx:for-item="item" wx:for="{{itemName}}" wx:key="family_id">
|
||||
<view class="cellinner" wx:if="{{!item.type}}" bindtap="selectPatient" data-familyId="{{item.family_id}}" data-sex="{{item.sex}}" data-card_name="{{item.card_name}}" data-age="{{item.age}}" data-nation="{{item.nation_id}}" data-nation_name="{{item.nation_name}}">
|
||||
<view class="person">
|
||||
<view class="name">{{item.card_name}}</view>
|
||||
<view class="tag" wx:if="{{item.relation==1}}">本人</view>
|
||||
<view class="tag" wx:elif="{{item.relation==2}}">父母</view>
|
||||
<view class="tag" wx:elif="{{item.relation==3}}">爱人</view>
|
||||
<view class="tag" wx:elif="{{item.relation==4}}">子女</view>
|
||||
<view class="tag" wx:elif="{{item.relation==5}}">亲戚</view>
|
||||
<view class="tag" wx:elif="{{item.relation==6}}">其他</view>
|
||||
</view>
|
||||
<view class="desc">
|
||||
<view class="sex" wx:if="{{item.sex===0}}">性别未知</view>
|
||||
<view class="sex" wx:elif="{{item.sex==1}}">男</view>
|
||||
<view class="sex" wx:else>女</view>
|
||||
<view class="age">{{item.age}}岁</view>
|
||||
</view>
|
||||
<image src="{{img_host+'/gou.png'}}" class="gou" wx:if="{{item.family_id==currentFamilyId}}"></image>
|
||||
</view>
|
||||
<view class="celladd" bindtap="addPatient" wx:elif="{{item.type}}">
|
||||
+新建患者
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btnbox">
|
||||
<button class="btn" plain="true" disabled="{{currentFamilyId?false:true}}" bindtap="handleHasCreate">下一步</button>
|
||||
</view>
|
||||
</van-popup>
|
||||
<van-popup show="{{showAdd}}" round closeable z-index="999" position="bottom" custom-style="height:{{height}}rpx" bind:close="onCloseAdd">
|
||||
<view class="infobox">
|
||||
<view class="title">新建患者</view>
|
||||
<view class="info">
|
||||
<view class="name">真实姓名<text>*</text></view>
|
||||
<input value="{{realName}}" type="text" bindinput="inputChange" placeholder="请输入真实姓名" data-id="realName"/>
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="name">身份证号<text>*</text></view>
|
||||
<input value="{{idCard}}" type="idcard" bindinput="inputChange" placeholder="请输入真实身份证号" data-id="idCard"/>
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="name">联系电话</view>
|
||||
<input value="{{phoneNumber}}" type="digit" bindblur="onblur" bindfocus="onfocus" cursor-spacing="100" bindinput="inputChange" bindinput="inputChange" placeholder="请输入联系电话" data-id="phoneNumber"/>
|
||||
</view>
|
||||
<view class="info" bindtap="openPicker">
|
||||
<view class="name">患者关系</view>
|
||||
<input type="text" value="{{relation}}" placeholder="请选择与患者的关系" disabled="true" />
|
||||
</view>
|
||||
<view class="tip" >
|
||||
<view class="warntitle">温馨提示:</view>
|
||||
<view class="warn">
|
||||
<view>1、国家卫健委要求,就医行为必须实名登记,信息仅接诊医生可见,请谨慎填写患者信息。</view>
|
||||
|
||||
<view>3、6岁以下儿童不支持线上问诊,请到线下就诊。
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="next" bindtap="goSick">
|
||||
确定
|
||||
</view>
|
||||
</view>
|
||||
</van-popup>
|
||||
<van-popup show="{{ showPicker }}" round position="bottom" z-index="99999" custom-style="height:auto" bind:close="closePicker">
|
||||
<van-picker show-toolbar title="选择与患者之间的关系" columns="{{ columns }}" bind:cancel="closePicker" bind:confirm="onConfirmPicker" />
|
||||
</van-popup>
|
||||
<dialog bind:confirm="confirm" bind:cancel="cancelAlert" showDialog="{{showdialog}}" message="{{messageTitle}}" cancelBtn="{{cancelBtn}}"></dialog>
|
||||
@@ -0,0 +1,383 @@
|
||||
/* pages/sugarDetail/sugarDetail.wxss */
|
||||
.dcimg{
|
||||
width:750rpx;
|
||||
}
|
||||
/**app.wxss**/
|
||||
.container {
|
||||
padding-top: 135px;
|
||||
padding-bottom: 10rpx;
|
||||
/* top:280rpx; */
|
||||
/* position: absolute; */
|
||||
width:100%;
|
||||
/* overflow-y: scroll; */
|
||||
background: #F2F2F2;
|
||||
}
|
||||
input{
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica,
|
||||
}
|
||||
page{
|
||||
position: relative;
|
||||
width:100%;
|
||||
height:100%;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica,
|
||||
Segoe UI, Arial, Roboto, 'PingFang SC', 'miui', 'Hiragino Sans GB', 'Microsoft Yahei',
|
||||
sans-serif;
|
||||
}
|
||||
.page{
|
||||
width:100vw;
|
||||
height:100vh;
|
||||
background: #f2f2f2;
|
||||
}
|
||||
.contain{padding: 0 30rpx 0rpx;height: 100%;overflow: hidden;position: relative;}
|
||||
::-webkit-scrollbar {
|
||||
display: none;
|
||||
width: 0;
|
||||
height: 0;
|
||||
color: transparent;
|
||||
}
|
||||
.van-picker__confirm {
|
||||
color:#3CC7C0!important;
|
||||
font-size: 32rpx!important;
|
||||
}
|
||||
.van-picker__title{
|
||||
font-weight: 600!important;
|
||||
color: rgba(0,0,0,0.9)!important;
|
||||
font-size: 32rpx!important;
|
||||
}
|
||||
.van-picker__cancel{
|
||||
color: rgba(0,0,0,0.6)!important;
|
||||
font-size: 32rpx!important;
|
||||
}
|
||||
.nonedata{
|
||||
width:100%;
|
||||
color:#666;
|
||||
min-height: 320rpx;
|
||||
font-size: 28rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.ui-navigatorbar {
|
||||
position: fixed;
|
||||
z-index:99;
|
||||
top: 0;
|
||||
width: 750rpx;
|
||||
height: 172rpx;
|
||||
background: #F2F2F2;
|
||||
backdrop-filter: blur(20px);
|
||||
}
|
||||
|
||||
.ui-navigatorbar-back {
|
||||
position: absolute;
|
||||
padding-left:40rpx;
|
||||
padding-right:40rpx;
|
||||
width:30rpx;
|
||||
height:60rpx;
|
||||
left: 0rpx;
|
||||
bottom: 20rpx;
|
||||
}
|
||||
|
||||
.ui-title {
|
||||
position: absolute;
|
||||
width: 350rpx;
|
||||
height: 88rpx;
|
||||
line-height: 56rpx;
|
||||
font-size: 36rpx;
|
||||
color: #000000;
|
||||
bottom: 0;
|
||||
left: 200rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.droptitle.active{
|
||||
color:#3CC7C0;
|
||||
}
|
||||
.slotmsg{
|
||||
-webkit-overflow-scrolling: touch;
|
||||
font-size: 28rpx;
|
||||
line-height:40rpx;
|
||||
max-height:60vh;
|
||||
overflow-y: auto;
|
||||
padding:48rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.van-dropdown-item__title{
|
||||
width:100%!important;
|
||||
flex:1;
|
||||
text-align: center;
|
||||
}
|
||||
.van-dropdown-item__icon{
|
||||
z-index:2;
|
||||
position: absolute!important;
|
||||
|
||||
right:25rpx;
|
||||
}
|
||||
.van-cell__value{
|
||||
flex:none!important;
|
||||
z-index:1;
|
||||
}
|
||||
.onlinebox .icon{
|
||||
top:60rpx;
|
||||
left:50%;
|
||||
position: absolute;
|
||||
margin-left: -48rpx;
|
||||
width:96rpx;
|
||||
height:34rpx;
|
||||
border-radius: 0;
|
||||
}
|
||||
.page{
|
||||
position: relative;
|
||||
min-height: 100%;
|
||||
height:auto;
|
||||
padding-bottom: 450rpx;
|
||||
}
|
||||
.nextbox{
|
||||
position: fixed;
|
||||
bottom:0rpx;
|
||||
z-index:1;
|
||||
height:482rpx;
|
||||
width:750rpx;
|
||||
}
|
||||
.msgbtn{
|
||||
font-size: 36rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-image: linear-gradient(
|
||||
180deg,
|
||||
rgba(182, 245, 243, 1) 0,
|
||||
rgba(111, 229, 225, 1) 18.201463%,
|
||||
rgba(56, 187, 181, 1) 89.000166%,
|
||||
rgba(60, 199, 192, 1) 100%
|
||||
);
|
||||
border-radius: 47rpx;
|
||||
height:94rpx;
|
||||
width: 638rpx;
|
||||
margin:0 auto;
|
||||
color:#fff;
|
||||
}
|
||||
.msgbtnbox{
|
||||
width:100%;
|
||||
position: absolute;
|
||||
bottom:80rpx;
|
||||
}
|
||||
.ui-navigatorbar-back{
|
||||
width:24rpx;
|
||||
height:40rpx;
|
||||
}
|
||||
.personbox {
|
||||
border-radius: 10rpx;
|
||||
background-color: #fff;
|
||||
padding: 40rpx 20rpx 144rpx;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.personbox .row {
|
||||
margin-top: 30rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
}
|
||||
|
||||
.personbox .row:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.personbox .row .cell {
|
||||
position: relative;
|
||||
width: 47%;
|
||||
height: 120rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
margin-left: 30rpx;
|
||||
border-radius: 10rpx;
|
||||
border: 1px solid #CCCCCC;
|
||||
}
|
||||
|
||||
.personbox .row .cell:first-child {
|
||||
margin-left: 0rpx;
|
||||
}
|
||||
|
||||
.personbox .person {
|
||||
display: flex;
|
||||
margin: 0 25rpx;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.personbox .tag {
|
||||
margin-left: 32rpx;
|
||||
font-size: 24rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
line-height: 24rpx;
|
||||
justify-content: center;
|
||||
color: #666666;
|
||||
width: 80rpx;
|
||||
height: 32rpx;
|
||||
border-radius: 4rpx;
|
||||
transform: rotateZ(360deg);
|
||||
border: 1rpx solid #979797;
|
||||
}
|
||||
|
||||
.personbox .desc {
|
||||
display: flex;
|
||||
margin: 0 25rpx;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.personbox .name {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
max-width: 200rpx;
|
||||
text-overflow: ellipsis;
|
||||
font-size: 34rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.personbox .age {
|
||||
|
||||
margin-left: 12rpx;
|
||||
}
|
||||
|
||||
.personbox .cell .gou {
|
||||
position: absolute;
|
||||
bottom: -1rpx;
|
||||
right: 0rpx;
|
||||
width: 66rpx;
|
||||
height: 53.7rpx;
|
||||
}
|
||||
|
||||
.personbox .add {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 34rpx;
|
||||
color: #333;
|
||||
}
|
||||
.own .add.disabled{
|
||||
color: #999;
|
||||
}
|
||||
.titlepop{
|
||||
font-size: 34rpx;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
padding:40rpx 0;
|
||||
text-align: center;
|
||||
width:100%;
|
||||
border-bottom:1rpx solid #E7E7E7;
|
||||
}
|
||||
|
||||
.van-icon-cross {
|
||||
color: #333;
|
||||
font-size: 40rpx !important;
|
||||
}
|
||||
|
||||
.infobox {
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
|
||||
|
||||
.infobox .title {
|
||||
border-bottom: 1rpx solid #E7E7E7;
|
||||
text-align: center;
|
||||
font-size: 34rpx;
|
||||
padding-bottom: 35rpx;
|
||||
}
|
||||
.info {
|
||||
border-bottom: 1rpx solid #E7E7E7;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 112rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.info .name {
|
||||
white-space: nowrap;
|
||||
width: 180rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 52rpx;
|
||||
color: #333333;
|
||||
font-size: 34rpx;
|
||||
}
|
||||
|
||||
.info text {
|
||||
margin-top: 20rpx;
|
||||
color:#E34D59;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.info input {
|
||||
margin-left: 15rpx;
|
||||
margin-right: 52rpx;
|
||||
flex: 1;
|
||||
}
|
||||
.input-placeholder {
|
||||
color: #999999;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.tip{
|
||||
padding:20rpx 20rpx;
|
||||
margin:30rpx 52rpx 20rpx;
|
||||
background: #FFF2F0;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
.warntitle{
|
||||
color: #E34D59;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.warn{
|
||||
margin-top: 20rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 36rpx;
|
||||
color: #666666;
|
||||
}
|
||||
.next{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 94rpx;
|
||||
font-size: 36rpx;
|
||||
left: 30rpx;
|
||||
right: 30rpx;
|
||||
margin:0 52rpx;
|
||||
border-radius: 47rpx;
|
||||
color: #fff;
|
||||
margin-bottom: 40rpx;
|
||||
background: #3CC7C0;
|
||||
}
|
||||
.celladd{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 120rpx;
|
||||
}
|
||||
.btnbox .btn{
|
||||
border-radius: 47rpx;
|
||||
border:none;
|
||||
background: #3CC7C0!important;
|
||||
margin:0 32rpx;
|
||||
height: 94rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 36rpx;
|
||||
color: #FFFFFF!important;
|
||||
}
|
||||
.btnbox .btn[disabled]{
|
||||
color: #000000!important;
|
||||
background:rgba(0,0,0,0.1)!important;
|
||||
}
|
||||
.btnbox{
|
||||
position: fixed;
|
||||
width:100%;
|
||||
bottom:0rpx;
|
||||
height: 134rpx;
|
||||
background:#fff;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,668 @@
|
||||
// pages/sugarSickInfo/sugarSickInfo.js
|
||||
import {nation} from "../../../api/common"
|
||||
import {getLocation,getDiseaseList,getDoctorList,createDetection,getPurposeList,getProject,getArea} from "../../../api/checkSugar"
|
||||
import {getProvince,getCity,getCountry} from "../../../api/consultExpert"
|
||||
import {throttle} from "../../../utils/util"
|
||||
import Dialog from '@vant/weapp/dialog/dialog';
|
||||
import {client_type} from "../../../utils/isPc"
|
||||
let wait_time=15;
|
||||
|
||||
const beforeClose = (action) =>
|
||||
new Promise((resolve) => {
|
||||
console.log(action,wait_time);
|
||||
try {
|
||||
if (action === 'confirm' && wait_time<=0) {
|
||||
resolve(true);
|
||||
}else if (action === 'cancel') {
|
||||
resolve(true);
|
||||
}else {
|
||||
// 拦截取消操作
|
||||
resolve(false);
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
});
|
||||
const app = getApp();
|
||||
let provinceArr=[{area_id:'', area_name: "全国"}];
|
||||
let cityArr=[];
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
showSick:false,
|
||||
showNation:false,
|
||||
showDoctor:false,
|
||||
currentPatientName:'',
|
||||
showNationSelect:false,
|
||||
showCity:false,
|
||||
confirmtext:"同意",
|
||||
currentPosition:"全国",
|
||||
detection_project_id:1,
|
||||
sick_name:'',
|
||||
real_name:'',
|
||||
doctor_name:'',
|
||||
nation_name:'',
|
||||
nation_id:'',
|
||||
purpose_id:'',
|
||||
purpose_name:'',
|
||||
confirmColor:"#bfbfbf",
|
||||
nationcolumns:[],
|
||||
sickList:[],
|
||||
sex:"",
|
||||
age:'',
|
||||
showAgree:false,
|
||||
messageAgree:'',
|
||||
doctorList:[],
|
||||
timer:null,
|
||||
doctorResult:'',
|
||||
select_doctor_id:'',
|
||||
showdialog:false,
|
||||
order_detection_id:'',
|
||||
messageTitle:"",
|
||||
cancelBtn:false,
|
||||
columns: [{
|
||||
values: [],
|
||||
className: 'column1',
|
||||
},
|
||||
{
|
||||
values: [],
|
||||
className: 'column2',
|
||||
defaultIndex: 1,
|
||||
},
|
||||
{
|
||||
values: [],
|
||||
className: 'column3',
|
||||
defaultIndex: 1,
|
||||
}
|
||||
],
|
||||
sickResult:[],
|
||||
disease_ids:[],
|
||||
area:{
|
||||
province_id:'',
|
||||
city_id:'',
|
||||
county_id:''
|
||||
},
|
||||
img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static'
|
||||
},
|
||||
cancelAgree(){
|
||||
this.setData({
|
||||
showAgree: false
|
||||
})
|
||||
},
|
||||
|
||||
confirmAgree(event){
|
||||
if (event.detail ) {
|
||||
this.setData({
|
||||
showAgree: false
|
||||
})
|
||||
}
|
||||
},
|
||||
cancelAlert(){
|
||||
this.setData({
|
||||
showdialog: false
|
||||
})
|
||||
},
|
||||
confirm(event) {
|
||||
if (event.detail) {
|
||||
this.setData({
|
||||
showdialog: false
|
||||
})
|
||||
}
|
||||
if(this.data.messageTitle=="当前患者存在进行中检测订单"){
|
||||
let {order_detection_id}=this.data;
|
||||
app.method.navigateTo({
|
||||
url: '/pages/checkOrderDetail/checkOrderDetail?order_detection_id='+ order_detection_id,
|
||||
})
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
this.setData({
|
||||
family_id:options.family_id,
|
||||
real_name:options.real_name,
|
||||
sex:options.sex,
|
||||
age:options.age,
|
||||
nation_id:options.nation_id,
|
||||
nation_name:options.nation_name,
|
||||
detection_project_id:options.detection_project_id
|
||||
})
|
||||
// {{real_name}}({{sex==1?'男':'女'}} | {{age}}岁 {{showNationSelect?" | "+nation_name:''}})
|
||||
let sex=options.sex==1?'男':'女';
|
||||
if(options.nation_id){
|
||||
this.setData({
|
||||
currentPatientName:options.real_name+"("+sex+" | "+options.age+"岁 | "+options.nation_name+")",
|
||||
showNationSelect:false
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
currentPatientName:options.real_name+"("+sex+" | "+options.age+"岁"+")",
|
||||
showNationSelect:true
|
||||
})
|
||||
}
|
||||
|
||||
this.handelGetProject();
|
||||
this.handleWxLocation();
|
||||
this.getNation();
|
||||
this.handlegetDiseaseList();
|
||||
this.handleGetPurposeList();
|
||||
},
|
||||
handleWxLocation(){
|
||||
let that=this;
|
||||
try {
|
||||
wx.getFuzzyLocation({
|
||||
type: 'gcj02',
|
||||
success (res) {
|
||||
if(res.errMsg=='getFuzzyLocation:ok'){
|
||||
const latitude = res.latitude;
|
||||
const longitude = res.longitude;
|
||||
that.handleGetLocation(longitude,latitude);
|
||||
}
|
||||
|
||||
},
|
||||
fail(err){
|
||||
console.log(err)
|
||||
console.log("获取位置信息失败")
|
||||
that.handleGetDoctorList();
|
||||
}
|
||||
})
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
goAgree(){
|
||||
let {detection_project_id}=this.data;
|
||||
app.method.navigateTo({
|
||||
url:'/pages/agreement/agreement?detection_project_id='+detection_project_id
|
||||
})
|
||||
},
|
||||
handelGetProject(){
|
||||
let {detection_project_id}=this.data;
|
||||
getProject(
|
||||
detection_project_id
|
||||
).then(data=>{
|
||||
this.setData({
|
||||
nodes:data.informed_consent_form
|
||||
})
|
||||
})
|
||||
},
|
||||
handleCreateDetection:throttle(function(){
|
||||
|
||||
let {nation_id,doctorResult,sickResult,real_name,purpose_id,showNationSelect,disease_ids,timer}=this.data;
|
||||
let detection_disease_class_ids='';
|
||||
sickResult.forEach((item)=>{
|
||||
if(!detection_disease_class_ids){
|
||||
detection_disease_class_ids+=item
|
||||
}else{
|
||||
detection_disease_class_ids+=","+item
|
||||
}
|
||||
})
|
||||
if(!real_name){
|
||||
wx.showToast({
|
||||
title:"请输入真实姓名",
|
||||
icon:"none"
|
||||
});
|
||||
return false
|
||||
};
|
||||
if(!nation_id && showNationSelect){
|
||||
wx.showToast({
|
||||
title:"请选择民族",
|
||||
icon:"none"
|
||||
});
|
||||
return false
|
||||
};
|
||||
if(disease_ids.length==0){
|
||||
wx.showToast({
|
||||
title:"请选择既往病史",
|
||||
icon:"none"
|
||||
});
|
||||
return false
|
||||
};
|
||||
if(!purpose_id){
|
||||
wx.showToast({
|
||||
title:"请选择目的",
|
||||
icon:"none"
|
||||
});
|
||||
return false
|
||||
};
|
||||
if(!doctorResult){
|
||||
wx.showToast({
|
||||
title:"请选择申请医生",
|
||||
icon:"none"
|
||||
});
|
||||
return false
|
||||
};
|
||||
wait_time=15;
|
||||
this.setData({
|
||||
confirmColor:wait_time==0?"#3CC7C0":"#bfbfbf"
|
||||
});
|
||||
Dialog.confirm({
|
||||
title: '知情同意书',
|
||||
width:'710rpx',
|
||||
message: '弹窗内容',
|
||||
selector:"#agreeDialog",
|
||||
confirmButtonText :wait_time==0?"同意":"同意("+wait_time+"S)",
|
||||
beforeClose:beforeClose,
|
||||
}).then(() => {
|
||||
this.goPay();
|
||||
// on confirm
|
||||
}).catch(() => {
|
||||
console.log("none")
|
||||
// on cancel
|
||||
});
|
||||
if(this.data.timer){
|
||||
clearInterval(this.data.timer);
|
||||
};
|
||||
let timerSetInterval=setInterval(()=>{
|
||||
|
||||
if(wait_time<=1){
|
||||
clearInterval(timer);
|
||||
wait_time=0;
|
||||
this.setData({
|
||||
waitTime:0,
|
||||
confirmColor:"#3CC7C0",
|
||||
confirmtext:"同意",
|
||||
})
|
||||
return false
|
||||
}
|
||||
wait_time--;
|
||||
|
||||
this.setData({
|
||||
confirmtext:"同意("+wait_time+"S)",
|
||||
})
|
||||
},1000)
|
||||
this.setData({
|
||||
timer:timerSetInterval
|
||||
})
|
||||
|
||||
}),
|
||||
goPay:throttle(function(){
|
||||
let {family_id,nation_id,detection_project_id,doctorResult,sickResult,purpose_id}=this.data;
|
||||
let detection_disease_class_ids='';
|
||||
sickResult.forEach((item)=>{
|
||||
if(!detection_disease_class_ids){
|
||||
detection_disease_class_ids+=item
|
||||
}else{
|
||||
detection_disease_class_ids+=","+item
|
||||
}
|
||||
})
|
||||
createDetection({
|
||||
company_id:1,
|
||||
patient_id:wx.getStorageSync('CLIENT_USER_ID'),
|
||||
family_id,
|
||||
doctor_id:doctorResult,
|
||||
nation_id,
|
||||
purpose_id,
|
||||
detection_disease_class_ids,
|
||||
detection_project_id,
|
||||
client_type:client_type
|
||||
}).then(data=>{
|
||||
if(data.status==1){
|
||||
app.method.navigateTo({
|
||||
url: '/pages/payOrder/payOrder?&inquiry_no=' + data.data.inquiry_no + "&order_detection_id="+ data.data.order_no+"&order_type=3&fromType="+encodeURIComponent('pages/checkOrder/checkOrder')
|
||||
})
|
||||
}else if(data.status==2){
|
||||
this.setData({
|
||||
showdialog:true,
|
||||
messageTitle:"当前患者存在进行中检测订单",
|
||||
order_detection_id: data.data.order_no,
|
||||
cancelBtn:true
|
||||
})
|
||||
}
|
||||
})
|
||||
}),
|
||||
onChangeSick(event) {
|
||||
console.log(event.detail)
|
||||
let result=event.detail;
|
||||
this.setData({
|
||||
sickResult:result ,
|
||||
});
|
||||
const {sickList}=this.data;
|
||||
for (let i = 0; i < sickList.length; i++) {
|
||||
let temp="sickList["+i+"].check";
|
||||
if(result.indexOf(sickList[i].id)!==-1){
|
||||
this.setData({
|
||||
[temp]:true
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
[temp]:false
|
||||
})
|
||||
}
|
||||
}
|
||||
//console.log(sickList);
|
||||
|
||||
},
|
||||
onChangeDoctor(event) {
|
||||
// console.log(event)
|
||||
this.setData({
|
||||
doctorResult: event.detail,
|
||||
});
|
||||
},
|
||||
showNation() {
|
||||
this.setData({
|
||||
showNation: true
|
||||
})
|
||||
|
||||
},
|
||||
onCancelNation() {
|
||||
this.setData({
|
||||
showNation: false
|
||||
})
|
||||
},
|
||||
onConfirmNation(event) {
|
||||
const {
|
||||
value
|
||||
} = event.detail;
|
||||
this.setData({
|
||||
"nation_name": `${value.nation_name}`,
|
||||
"nation_id": `${value.nation_id}`,
|
||||
showNation: false
|
||||
})
|
||||
},
|
||||
openPurpose(){
|
||||
this.setData({
|
||||
showPurpose: true
|
||||
})
|
||||
},
|
||||
onConfirmPurpose(event) {
|
||||
const {
|
||||
value
|
||||
} = event.detail;
|
||||
this.setData({
|
||||
"purpose_name": `${value.purpose_name}`,
|
||||
"purpose_id": `${value.purpose_id}`,
|
||||
showPurpose: false
|
||||
})
|
||||
},
|
||||
onCancelPurpose(){
|
||||
this.setData({
|
||||
showPurpose: false
|
||||
})
|
||||
},
|
||||
getNation(){
|
||||
nation().then(data=>{
|
||||
this.setData({
|
||||
nationcolumns:data
|
||||
})
|
||||
})
|
||||
},
|
||||
handleGetArea(){
|
||||
getArea().then(data=>{
|
||||
console.log('获取地址')
|
||||
console.log(data)
|
||||
let position ='';
|
||||
if(data.province || data.city || data.county){
|
||||
position=data.province+data.city+data.county
|
||||
}else{
|
||||
position="全国"
|
||||
}
|
||||
this.setData({
|
||||
area:data,
|
||||
currentPosition:position
|
||||
})
|
||||
this.handleGetDoctorList();
|
||||
})
|
||||
},
|
||||
handleGetLocation(lon,lat){
|
||||
getLocation({
|
||||
lon,
|
||||
lat
|
||||
}).then(data=>{
|
||||
this.handleGetArea();
|
||||
|
||||
})
|
||||
},
|
||||
handleGetPurposeList(){
|
||||
getPurposeList().then(data=>{
|
||||
this.setData({
|
||||
purposecolumns:data
|
||||
})
|
||||
})
|
||||
},
|
||||
handlegetDiseaseList(){
|
||||
getDiseaseList({
|
||||
detection_project_id:1
|
||||
}).then(data=>{
|
||||
//let arr=[];
|
||||
data.forEach(item=>{
|
||||
item.check=false;
|
||||
})
|
||||
this.setData({
|
||||
sickList:data
|
||||
})
|
||||
})
|
||||
},
|
||||
handleGetDoctorList(){
|
||||
const {area}=this.data;
|
||||
const postData={
|
||||
company_id:1,
|
||||
province_id:area.province_id,
|
||||
city_id:area.city_id,
|
||||
county_id:area.county_id
|
||||
}
|
||||
getDoctorList(postData).then(data=>{
|
||||
this.setData({
|
||||
doctorList:data
|
||||
})
|
||||
})
|
||||
},
|
||||
toggleSick(event) {
|
||||
|
||||
const { index } = event.currentTarget.dataset;
|
||||
const checkbox = this.selectComponent(`.checkboxessick-${index}`);
|
||||
checkbox.toggle();
|
||||
},
|
||||
onClickDcotor(event){
|
||||
const {name,userid,doctorname,hospital} = event.currentTarget.dataset;
|
||||
console.log(userid,name)
|
||||
this.setData({
|
||||
doctorResult: name,
|
||||
doctor_name:doctorname+"("+hospital+")",
|
||||
showDoctor:false
|
||||
});
|
||||
},
|
||||
noop() {},
|
||||
onConfirmSick() {
|
||||
let {sickResult,sickList}=this.data;
|
||||
this.setData({
|
||||
showSick: false,
|
||||
disease_ids:sickResult
|
||||
});
|
||||
let sick_name="";
|
||||
sickList.forEach((item)=>{
|
||||
if(sickResult.indexOf(item.id)!=-1){
|
||||
if(!sick_name){
|
||||
sick_name+=item.name;
|
||||
}else{
|
||||
sick_name+=" | "+item.name
|
||||
}
|
||||
}
|
||||
})
|
||||
this.setData({
|
||||
sick_name
|
||||
})
|
||||
},
|
||||
closeDoctor(){
|
||||
this.setData({
|
||||
showDoctor: false
|
||||
})
|
||||
},
|
||||
openCity(){
|
||||
this.provinceList()
|
||||
this.setData({
|
||||
showCity:true
|
||||
})
|
||||
},
|
||||
openSick() {
|
||||
this.setData({
|
||||
showSick: true
|
||||
})
|
||||
},
|
||||
openDoctor(){
|
||||
this.setData({
|
||||
showDoctor:true
|
||||
})
|
||||
},
|
||||
closeSick() {
|
||||
this.setData({
|
||||
showSick: false
|
||||
})
|
||||
},
|
||||
provinceList(){
|
||||
getProvince().then((res)=>{
|
||||
provinceArr= provinceArr.concat(res);
|
||||
let province=[{area_id:'', area_name: "全国"}];//
|
||||
for (let i = 0; i < res.length; i++) {
|
||||
province.push(res[i]);
|
||||
};
|
||||
this.setData({
|
||||
'columns[0].values':province
|
||||
})
|
||||
//this.cityList(province[0].area_id);
|
||||
|
||||
})
|
||||
},
|
||||
cityList(area_id){
|
||||
getCity({
|
||||
area_id:area_id
|
||||
}).then((res)=>{
|
||||
|
||||
cityArr=res;
|
||||
let city=[];
|
||||
for (let i = 0; i < res.length; i++) {
|
||||
city.push(res[i]);
|
||||
};
|
||||
this.setData({
|
||||
'columns[1].values':city,
|
||||
// 'area.county_id':res[0].area_id
|
||||
})
|
||||
this.countryList(res[0].area_id);
|
||||
})
|
||||
},
|
||||
countryList(area_id){
|
||||
getCountry({
|
||||
area_id:area_id
|
||||
}).then((res)=>{
|
||||
let area=[];
|
||||
for (let i = 0; i < res.length; i++) {
|
||||
area.push(res[i]);
|
||||
};
|
||||
this.setData({
|
||||
'columns[2].values':area,
|
||||
isLoding:false
|
||||
})
|
||||
})
|
||||
},
|
||||
onConfirm(event) {
|
||||
const {value} = event.detail;
|
||||
let currentPosition=''
|
||||
for (let index = 0; index < value.length; index++) {
|
||||
if(!value[0].area_id){
|
||||
currentPosition="全国";
|
||||
this.setData({
|
||||
area:{
|
||||
province_id:'',
|
||||
city_id:'',
|
||||
county_id:'',
|
||||
province:'',
|
||||
city:'',
|
||||
county:''
|
||||
}
|
||||
})
|
||||
}else{
|
||||
currentPosition+=value[index].area_name;
|
||||
if(index===0){
|
||||
this.setData({
|
||||
'area.province_id':value[index].area_id
|
||||
})
|
||||
}else if(index==1){
|
||||
this.setData({
|
||||
'area.city_id':value[index].area_id,
|
||||
})
|
||||
}else if(index==2){
|
||||
this.setData({
|
||||
'area.county_id':value[index].area_id
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
currentPosition:currentPosition,
|
||||
showCity: false
|
||||
});
|
||||
console.log(this.data.area);
|
||||
this.handleGetDoctorList();
|
||||
},
|
||||
onChangePicker(event) {
|
||||
const { picker, value, index } = event.detail;
|
||||
if(index===0){
|
||||
let currentIndex=picker.getIndexes()[0];
|
||||
if(provinceArr[currentIndex].area_id){
|
||||
this.cityList(provinceArr[currentIndex].area_id);
|
||||
}else{
|
||||
this.setData({
|
||||
'columns[1].values':[],
|
||||
'columns[2].values':[]
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
onCancel() {
|
||||
this.setData({
|
||||
showCity: false
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
clearInterval(this.data.timer);
|
||||
// this.setData({
|
||||
// sickResult:[],
|
||||
// doctorResult:''
|
||||
// })
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
clearInterval(this.timer);
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
})
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"van-popup": "@vant/weapp/popup/index",
|
||||
"van-picker": "@vant/weapp/picker/index",
|
||||
"nav":"../../../components/nav/nav",
|
||||
"van-checkbox": "@vant/weapp/checkbox/index",
|
||||
"van-cell": "@vant/weapp/cell/index",
|
||||
"van-cell-group": "@vant/weapp/cell-group/index",
|
||||
"van-checkbox-group": "@vant/weapp/checkbox-group/index",
|
||||
"van-radio": "@vant/weapp/radio/index",
|
||||
"van-radio-group": "@vant/weapp/radio-group/index",
|
||||
"dialog":"../../../components/dialog/dialog",
|
||||
"van-dialog": "@vant/weapp/dialog/index"
|
||||
},
|
||||
"navigationStyle":"custom"
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
<!--pages/sugarSickInfo/sugarSickInfo.wxml-->
|
||||
<nav navName="填写信息"></nav>
|
||||
<view class="page">
|
||||
<view class="infobox">
|
||||
<view class="sickbox">
|
||||
<view class="info">
|
||||
<view class="name">真实姓名<text>*</text></view>
|
||||
<view class="iptbox">
|
||||
<input value="{{currentPatientName}}" type="text" placeholder="请输入真实姓名"
|
||||
disabled="{{true}}"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info" bindtap="showNation" wx:if="{{showNationSelect}}">
|
||||
<view class="name">民族<text>*</text></view>
|
||||
<view class="iptbox">
|
||||
<input value="{{nation_name}}" type="text" placeholder="请选择民族" disabled="{{true}}"/>
|
||||
<image src="{{img_host+'/righticon.png'}}" class="righticon"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info" bindtap="openSick">
|
||||
<view class="name">既往病史<text>*</text></view>
|
||||
<view class="iptbox">
|
||||
<input value="{{sick_name}}" type="text" placeholder="请选择既往病史" disabled="{{true}}" />
|
||||
<image src="{{img_host+'/righticon.png'}}" class="righticon"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info" bindtap="openPurpose">
|
||||
<view class="name">目的<text>*</text></view>
|
||||
<view class="iptbox">
|
||||
<input value="{{purpose_name}}" type="text" placeholder="请选择目的" disabled="{{true}}" />
|
||||
<image src="{{img_host+'/righticon.png'}}" class="righticon"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info" bindtap="openDoctor">
|
||||
<view class="name">申请医生<text>*</text></view>
|
||||
<view class="iptbox">
|
||||
<input value="{{doctor_name}}" type="text" placeholder="请选择申请医生" disabled="{{true}}"/>
|
||||
<image src="{{img_host+'/righticon.png'}}" class="righticon"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="tips">
|
||||
根据国家互联网诊疗相关政策的要求,请您在使用服务前仔细阅读<text class="navigator" bindtap="goAgree">《风险告知与知情同意书》</text>,肝胆相照互联网医院平台医生,仅为您提供健康咨询服务,咨询意见供您参考。继续操作表示您知悉并同意上述告诉内容。
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom">
|
||||
<view class="pay" bindtap="handleCreateDetection">
|
||||
立即支付
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<van-popup show="{{ showDoctor }}" closeable round z-index="9999" bind:close="closeDoctor" custom-style="height: 60%" position="bottom">
|
||||
<view class="sickcon">
|
||||
<view class="titlebox" style="justify-content: center;margin-top: 28rpx;">
|
||||
<view class="title"> 申请医生</view>
|
||||
</view>
|
||||
<view class="site" style="margin-bottom: 20rpx;" bindtap="openCity">
|
||||
<!-- <text wx:if="{{area.province&&area.city&&area.county}}">{{area.province}}{{area.city}}{{area.county}}</text> -->
|
||||
<text>{{currentPosition}}</text>
|
||||
<image src="../../assets/images/sugar_down.png" class="siteimg" />
|
||||
</view>
|
||||
<view class="doctorlist">
|
||||
|
||||
<van-radio-group value="{{ doctorResult }}" bind:change="onChangeDoctor" wx:if="{{doctorList.length>0}}">
|
||||
<van-cell-group >
|
||||
<van-cell border="{{false}}" wx:for="{{ doctorList }}"
|
||||
bind:click="onClickDcotor" wx:key="index" value-class="value-class" custom-class="{{item.doctor_id==doctorResult?'rootclass':''}}" clickable data-name="{{ item.doctor_id }}" data-hospital="{{item.hospital_name}}" data-doctorname="{{item.user_name}}" data-userid="{{item.user_id}}" >
|
||||
|
||||
<view slot="title" class="celltitle">
|
||||
<image src="{{item.avatar}}" class="head" wx:if="item.avatar"/>
|
||||
<image src="{{img_host+'/doctor_avatar.png'}}" class="head" wx:else/>
|
||||
<view class="namebox">
|
||||
<view class="van-cell-text">
|
||||
<text>{{ item.user_name}}</text>
|
||||
<!-- (1:主任医师 2:主任中医师 3:副主任医师 4:副主任中医师 5:主治医师 6:住院医师) -->
|
||||
<text decode="true" style="margin-left:20rpx;" wx:if="{{item.doctor_title==1}}">主任中医师</text>
|
||||
<text decode="true" style="margin-left:20rpx;" wx:elif="{{item.doctor_title==2}}">主任医师</text>
|
||||
<text decode="true" style="margin-left:20rpx;" wx:elif="{{item.doctor_title==3}}">副主任医师</text>
|
||||
<text decode="true" style="margin-left:20rpx;" wx:elif="{{item.doctor_title==4}}">副主任中医师</text>
|
||||
<text decode="true" style="margin-left:20rpx;" wx:elif="{{item.doctor_title==5}}">主治医师</text>
|
||||
<text decode="true" style="margin-left:20rpx;" wx:elif="{{item.doctor_title==6}}">住院医师</text>
|
||||
</view>
|
||||
<view class="hospital" wx:if="item.hospital">{{item.hospital_name}} </view>
|
||||
</view>
|
||||
</view>
|
||||
<van-radio checked-color="#3CC7C0" icon-size="20px" catch:tap="noop" class="checkboxesdoctor-{{ index }}" name="{{ item.doctor_id}}" data-doctorname="{{item.user_name}}" data-userid="{{item.user_id}}" catchtap="onClickDcotor" data-name="{{ item.doctor_id}}" data-hospital="{{item.hospital_name}}"/>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-radio-group>
|
||||
<view class="nonedata" wx:else>暂无医生数据!</view>
|
||||
</view>
|
||||
</view>
|
||||
</van-popup>
|
||||
<van-popup show="{{ showSick }}" round bind:close="onClose" custom-style="height: 60%;" position="bottom" custom-class="sickpop" z-index="9999" >
|
||||
<view class="sickcon">
|
||||
<view class="titlebox">
|
||||
<view class="cancel" bindtap="closeSick">取消</view>
|
||||
<view class="title"> 既往病史(最多3项)</view>
|
||||
<view class="ok" bindtap="onConfirmSick">确定</view>
|
||||
|
||||
</view>
|
||||
<van-checkbox-group value="{{ sickResult }}" bind:change="onChangeSick" max="{{3}}" style="flex:1;overflow-y: scroll;-webkit-overflow-scrolling: touch;">
|
||||
<van-cell-group>
|
||||
<van-cell border="{{false}}" wx:for="{{ sickList }}" wx:key="index" title="{{ item.name }}" value-class="value-class" clickable data-index="{{ index }}" bind:click="toggleSick">
|
||||
<van-checkbox shape="square" checked-color="#3CC7C0" icon-size="18px" catch:tap="noop" class="checkboxessick-{{ index }}" name="{{ item.id }}" disabled="{{sickResult.length==3 && !item.check}}"/>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-checkbox-group></view>
|
||||
</van-popup>
|
||||
<van-popup show="{{ showNation }}" position="bottom" custom-style="height: auto">
|
||||
<van-picker show-toolbar title="选择民族" columns="{{ nationcolumns }}" value-key="nation_name" bind:cancel="onCancelNation" bind:confirm="onConfirmNation" />
|
||||
</van-popup>
|
||||
<van-popup show="{{ showPurpose }}" position="bottom" custom-style="height: auto">
|
||||
<van-picker show-toolbar title="选择目的" columns="{{ purposecolumns }}" value-key="purpose_name" bind:cancel="onCancelPurpose" bind:confirm="onConfirmPurpose" />
|
||||
</van-popup>
|
||||
<van-popup show="{{ showCity}}" round position="bottom" custom-style="height: 50%" bind:close="onClose" z-index="10000" >
|
||||
<van-picker columns="{{ columns }}" show-toolbar title="选择地区" columns="{{ columns }}" value-key="area_name" bind:cancel="onCancel" bind:change="onChangePicker" bind:confirm="onConfirm" />
|
||||
</van-popup>
|
||||
<dialog bind:confirm="confirm" bind:cancel="cancelAlert" showDialog="{{showdialog}}" message="{{messageTitle}}" cancelBtn="{{cancelBtn}}"></dialog>
|
||||
<van-dialog id="agreeDialog" use-slot title="知情同意书" message="{{messageAgree}}" show-cancel-button="{{true}}" cancel-button-text="取消" confirm-button-text="{{confirmtext}}" confirm-button-color="{{confirmColor}}" >
|
||||
<view class="agreecon">
|
||||
<rich-text nodes="{{nodes}}" space="nbsp"></rich-text></view>
|
||||
<!-- bind:cancel="onClose" bind:close="onCloseAgree" show="{{showAgree}}"bind:confirm="confirmAgree" -->
|
||||
</van-dialog>
|
||||
<!-- <dialog bind:confirm="confirmAgree" bind:cancel="cancelAgree" showDialog="{{showAgree}}" message="{{messageAgree}}" confirmtext="{{confirmtext}}" cancelBtn="{{true}}" confirmColor="{{confirmColor}}"></dialog> -->
|
||||
|
||||
@@ -0,0 +1,327 @@
|
||||
/* pages/sugarSickInfo/sugarSickInfo.wxss */
|
||||
/**app.wxss**/
|
||||
.container {
|
||||
padding-top: 135px;
|
||||
padding-bottom: 10rpx;
|
||||
/* top:280rpx; */
|
||||
/* position: absolute; */
|
||||
width:100%;
|
||||
/* overflow-y: scroll; */
|
||||
background: #F2F2F2;
|
||||
}
|
||||
input{
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica,
|
||||
}
|
||||
page{
|
||||
position: relative;
|
||||
width:100%;
|
||||
height:100%;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica,
|
||||
Segoe UI, Arial, Roboto, 'PingFang SC', 'miui', 'Hiragino Sans GB', 'Microsoft Yahei',
|
||||
sans-serif;
|
||||
}
|
||||
.page{
|
||||
width:100vw;
|
||||
height:100vh;
|
||||
background: #f2f2f2;
|
||||
}
|
||||
.contain{padding: 0 30rpx 0rpx;height: 100%;overflow: hidden;position: relative;}
|
||||
::-webkit-scrollbar {
|
||||
display: none;
|
||||
width: 0;
|
||||
height: 0;
|
||||
color: transparent;
|
||||
}
|
||||
.van-picker__confirm {
|
||||
color:#3CC7C0!important;
|
||||
font-size: 32rpx!important;
|
||||
}
|
||||
.van-picker__title{
|
||||
font-weight: 600!important;
|
||||
color: rgba(0,0,0,0.9)!important;
|
||||
font-size: 32rpx!important;
|
||||
}
|
||||
.van-picker__cancel{
|
||||
color: rgba(0,0,0,0.6)!important;
|
||||
font-size: 32rpx!important;
|
||||
}
|
||||
.nonedata{
|
||||
width:100%;
|
||||
color:#666;
|
||||
min-height: 320rpx;
|
||||
font-size: 28rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.ui-navigatorbar {
|
||||
position: fixed;
|
||||
z-index:99;
|
||||
top: 0;
|
||||
width: 750rpx;
|
||||
height: 172rpx;
|
||||
background: #F2F2F2;
|
||||
backdrop-filter: blur(20px);
|
||||
}
|
||||
|
||||
.ui-navigatorbar-back {
|
||||
position: absolute;
|
||||
padding-left:40rpx;
|
||||
padding-right:40rpx;
|
||||
width:30rpx;
|
||||
height:60rpx;
|
||||
left: 0rpx;
|
||||
bottom: 20rpx;
|
||||
}
|
||||
|
||||
.ui-title {
|
||||
position: absolute;
|
||||
width: 350rpx;
|
||||
height: 88rpx;
|
||||
line-height: 56rpx;
|
||||
font-size: 36rpx;
|
||||
color: #000000;
|
||||
bottom: 0;
|
||||
left: 200rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.droptitle.active{
|
||||
color:#3CC7C0;
|
||||
}
|
||||
.slotmsg{
|
||||
-webkit-overflow-scrolling: touch;
|
||||
font-size: 28rpx;
|
||||
line-height:40rpx;
|
||||
max-height:60vh;
|
||||
overflow-y: auto;
|
||||
padding:48rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.van-dropdown-item__title{
|
||||
width:100%!important;
|
||||
flex:1;
|
||||
text-align: center;
|
||||
}
|
||||
.van-dropdown-item__icon{
|
||||
z-index:2;
|
||||
position: absolute!important;
|
||||
|
||||
right:25rpx;
|
||||
}
|
||||
.van-cell__value{
|
||||
flex:none!important;
|
||||
z-index:1;
|
||||
}
|
||||
.onlinebox .icon{
|
||||
top:60rpx;
|
||||
left:50%;
|
||||
position: absolute;
|
||||
margin-left: -48rpx;
|
||||
width:96rpx;
|
||||
height:34rpx;
|
||||
border-radius: 0;
|
||||
}
|
||||
.page{
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.infobox{
|
||||
overflow-y: scroll;
|
||||
flex:1;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
.sickbox{
|
||||
|
||||
padding-top: 10rpx;
|
||||
background-color: #fff;
|
||||
margin: 196rpx 32rpx 0;
|
||||
box-shadow: 0rpx 2rpx 16rpx 2rpx rgba(0,0,0,0.02);
|
||||
border-radius: 12rpx
|
||||
|
||||
}
|
||||
.info {
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 112rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.info .name {
|
||||
white-space: nowrap;
|
||||
width: 180rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left:32rpx;
|
||||
color: #333333;
|
||||
font-size: 34rpx;
|
||||
}
|
||||
|
||||
.info text {
|
||||
margin-top: 20rpx;
|
||||
color:#E34D59;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.info .iptbox{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 15rpx;
|
||||
margin-right: 32rpx;
|
||||
flex: 1;
|
||||
border-bottom: 1rpx solid #E7E7E7;
|
||||
}
|
||||
.info input {
|
||||
height:112rpx;
|
||||
position: relative;
|
||||
z-index:1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
width:100%;
|
||||
|
||||
|
||||
}
|
||||
.agreecon{
|
||||
padding:20rpx 30rpx;
|
||||
height:600rpx;
|
||||
overflow: scroll;
|
||||
}
|
||||
.info:last-child .iptbox{
|
||||
border: none;
|
||||
}
|
||||
.input-placeholder {
|
||||
color: #999999;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.tips{
|
||||
padding:24rpx 20rpx;
|
||||
margin:0rpx 32rpx 20rpx;
|
||||
font-size: 24rpx;
|
||||
color: rgba(0,0,0,0.45);
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
.warntitle{
|
||||
color: #E34D59;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.warn{
|
||||
margin-top: 20rpx;
|
||||
font-size: 24rpx;
|
||||
line-height: 36rpx;
|
||||
color: #666666;
|
||||
}
|
||||
.righticon {
|
||||
width: 24rpx;
|
||||
height: 48rpx;
|
||||
}
|
||||
.navigator{
|
||||
color: #3CC7C0 ;
|
||||
}
|
||||
.bottom{
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width:100%;
|
||||
height: 186rpx;
|
||||
background: #FFFFFF;
|
||||
}
|
||||
.bottom .pay{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 94rpx;
|
||||
background: #3CC7C0;
|
||||
border-radius: 47rpx;
|
||||
font-size: 36rpx;
|
||||
font-weight: 400;
|
||||
color: #FFFFFF;
|
||||
margin:16rpx 32rpx 0;
|
||||
}
|
||||
.sickcon{
|
||||
height:100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.titlebox{
|
||||
/* position: absolute;
|
||||
top:0; */
|
||||
display: flex;
|
||||
font-size: 32rpx;
|
||||
margin:40rpx 32rpx;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.cancel{
|
||||
color: rgba(0,0,0,0.45);
|
||||
}
|
||||
.ok{
|
||||
color: #3CC7C0;
|
||||
}
|
||||
.title{
|
||||
font-weight: 500;
|
||||
color: rgba(0,0,0,0.85);
|
||||
}
|
||||
.doctorlist{
|
||||
margin-top: 0rpx;
|
||||
flex:1;overflow-y: scroll;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
.site{
|
||||
margin:0 32rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.namebox{
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
.rootclass{
|
||||
|
||||
background: rgba(60,199,192,0.08)!important;
|
||||
}
|
||||
.van-cell-text{
|
||||
font-size: 30rpx;
|
||||
font-weight: 400;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: rgba(0,0,0,0.85)
|
||||
}
|
||||
.value-class{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.hospital{
|
||||
font-size: 24rpx;
|
||||
font-weight: 400;
|
||||
color: rgba(0,0,0,0.65)
|
||||
}
|
||||
.siteimg{
|
||||
margin-left: 8rpx;
|
||||
width: 32rpx;
|
||||
height:32rpx;
|
||||
}
|
||||
.celltitle{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.head{
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.van-hairline, .van-hairline--bottom, .van-hairline--left, .van-hairline--right, .van-hairline--surround, .van-hairline--top, .van-hairline--top-bottom {
|
||||
position: static!important;
|
||||
}
|
||||
#agreeDialog .van-dialog__header {
|
||||
padding-top:30rpx!important;
|
||||
padding-bottom: 25rpx;
|
||||
border-bottom: 1px solid rgba(0,0,0,0.1);
|
||||
}
|
||||
#agreeDialog .van-dialog__footer{
|
||||
border-top: 1px solid rgba(0,0,0,0.1);
|
||||
}
|
||||
#agreeDialog .van-dialog__button:first-child{
|
||||
border-right: 1px solid rgba(0,0,0,0.1);
|
||||
}
|
||||
Reference in New Issue
Block a user