| xqd
@@ -17,15 +17,15 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="cu-list menu">
|
|
|
- <view class="cu-item arrow" @click="openhuanzhe">
|
|
|
+ <view class="cu-item arrow" v-if="type==1||type==2||type==3" @click="openhuanzhe">
|
|
|
<view class="content">
|
|
|
- <text class="text-grey">咨询患者</text>
|
|
|
+ <text class="text-grey">{{type==3?'预约患者':'咨询患者'}}</text>
|
|
|
</view>
|
|
|
<view class="action">
|
|
|
<text class="text-grey text-sm">{{value}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="cu-item arrow" @click="openphone">
|
|
|
+ <view class="cu-item arrow" v-if="type==1" @click="openphone">
|
|
|
<view class="content">
|
|
|
<text class="text-grey">接听号码</text>
|
|
|
</view>
|
| xqd
@@ -33,7 +33,7 @@
|
|
|
<text class="text-grey text-sm">{{phonenum}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="cu-item">
|
|
|
+ <view class="cu-item" v-if="type==1">
|
|
|
<view class="content">
|
|
|
<text class="text-grey">咨询时间</text>
|
|
|
</view>
|
| xqd
@@ -41,15 +41,74 @@
|
|
|
<text class="text-grey text-sm">{{doctor.phone_minutes}}分钟</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="cu-item">
|
|
|
+ <view class="cu-item" v-if="type==1||type==2">
|
|
|
<view class="content">
|
|
|
<text class="text-grey">咨询费用</text>
|
|
|
</view>
|
|
|
<view class="action">
|
|
|
- <text class="text-grey text-sm">{{doctor.phone_price}}元</text>
|
|
|
+ <text class="text-grey text-sm">{{type==1?doctor.phone_price/100:type==2?doctor.chat_price/100:doctor.appoint_price/100}}元</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="cu-item" v-if="type==3">
|
|
|
+ <view class="content">
|
|
|
+ <text class="text-grey">门诊医院</text>
|
|
|
+ </view>
|
|
|
+ <view class="action">
|
|
|
+ <text class="text-grey text-sm">门诊医院地址</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="cu-item" v-if="type==3">
|
|
|
+ <view class="content">
|
|
|
+ <text class="text-grey">预约时间</text>
|
|
|
+ </view>
|
|
|
+ <view class="action">
|
|
|
+ <text class="text-grey text-sm">{{time}}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="cu-item" v-if="type==3">
|
|
|
+ <view class="content">
|
|
|
+ <text class="text-grey">身份证</text>
|
|
|
+ </view>
|
|
|
+ <view class="action">
|
|
|
+ <input type="text" v-model="idcrad" placeholder="请输入身份证号码" placeholder-style="text-align:right" />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="cu-item" v-if="type==2">
|
|
|
+ <view class="content">
|
|
|
+ <text class="text-grey">症状描述</text>
|
|
|
+ </view>
|
|
|
+ <view class="action">
|
|
|
+ <text class="text-grey text-sm">查看范例</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <textarea v-if="type==2" v-model="zhengzhuang" value="" class="textareasty" placeholder="我有病,我还病得不轻" />
|
|
|
+ </view>
|
|
|
+ <view class="" v-if="type==2">
|
|
|
+ <view class="cu-bar bg-white margin-top">
|
|
|
+ <view class="action text-lg text-black text-bold">
|
|
|
+ 病情照片
|
|
|
+ </view>
|
|
|
+ <view class="action">
|
|
|
+ {{imgList.length}}/4
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="bg-white padding-sm text-gray">
|
|
|
+ 请上传病例照片,若是皮肤或外伤问题,请建议对准患处拍摄清晰照片(照片仅自己和医生可见)
|
|
|
+ </view>
|
|
|
+ <view class="cu-form-group">
|
|
|
+ <view class="grid col-4 grid-square flex-sub">
|
|
|
+ <view class="bg-img" v-for="(item,index) in imgList" :key="index" :data-url="imgList[index]">
|
|
|
+ <image :src='imgList[index]' mode='aspectFill'></image>
|
|
|
+ <view class="cu-tag bg-red" @click="DelImg" :data-index="index">
|
|
|
+ <text class="cuIcon-close"></text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="solids" @click="ChooseImage" v-if="imgList.length<4">
|
|
|
+ <text class="cuIcon-cameraadd"></text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
<view class="cu-bar bg-white tabbar" style="position: fixed;bottom: 0;width: 100%;">
|
|
|
<view class="submit" style="background-color: #0B73B9;color: white;" @click="gotopay">
|
|
|
立即咨询
|
| xqd
@@ -63,7 +122,7 @@
|
|
|
<view class="popup_title_text">选择就诊人</view>
|
|
|
</view>
|
|
|
<scroll-view style="height: 70%;" scroll-y="true">
|
|
|
- <view class="popup_list" v-for="(item, index) in patientList" :key="index" :data-index="index" @click="value=item.name,showpeople=false">
|
|
|
+ <view class="popup_list" v-for="(item, index) in patientList" :key="index" :data-index="index" @click="xuanzehuanzhe(item)">
|
|
|
<view class="popup_list_title">
|
|
|
<view class="title">{{item.name}}</view>
|
|
|
<view class="body">
|
| xqd
@@ -80,7 +139,8 @@
|
|
|
</scroll-view>
|
|
|
<u-gap height="10" bg-color="#f9f9f9"></u-gap>
|
|
|
<view class="popup_button">
|
|
|
- <image style="width: 32rpx;height: 32rpx;margin-right: 15rpx;" src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/img/addjiu.png" mode=""></image>
|
|
|
+ <image style="width: 32rpx;height: 32rpx;margin-right: 15rpx;" src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/img/addjiu.png"
|
|
|
+ mode=""></image>
|
|
|
<view class="" @click="addPeople">
|
|
|
添加就诊人档案
|
|
|
</view>
|
| xqd
@@ -94,12 +154,12 @@
|
|
|
</view>
|
|
|
<scroll-view style="height: 70%;" scroll-y="true">
|
|
|
<view class="phone" v-for="(item, index) in phoneList">
|
|
|
- <view class="list" @click="phoneValue=item.name">
|
|
|
+ <view class="list" @click="xuanzephone(item)">
|
|
|
<view class="title">{{item.name}}</view>
|
|
|
<view class="phone">{{item.num}}</view>
|
|
|
<view class="button">
|
|
|
<u-radio-group v-model="phoneValue">
|
|
|
- <u-radio @change="peopleRadioChange" :key="index" :name="item.name" :disabled="item.disabled">
|
|
|
+ <u-radio @change="phoneRadioChange" :key="index" :name="item.name" :disabled="item.disabled">
|
|
|
</u-radio>
|
|
|
</u-radio-group>
|
|
|
</view>
|
| xqd
@@ -115,6 +175,8 @@
|
|
|
<u-button type="primary" shape="circle" @click="confirmphone">确认</u-button>
|
|
|
</view>
|
|
|
</u-popup>
|
|
|
+ <view class="cu-tabbar-height"></view>
|
|
|
+ <view class="cu-tabbar-height"></view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
| xqd
@@ -123,7 +185,15 @@
|
|
|
onLoad(options) {
|
|
|
this.phonenum = this.phoneList[0].num
|
|
|
this.doctor = JSON.parse(options.doctor)
|
|
|
- console.log(this.doctor)
|
|
|
+ this.type = options.type
|
|
|
+ this.time=options.time
|
|
|
+ if(options.type==1){
|
|
|
+ this.price = this.doctor.phone_price
|
|
|
+ }else if(options.type==2){
|
|
|
+ this.price = this.doctor.chat_price
|
|
|
+ }else{
|
|
|
+ this.price = this.doctor.appoint_price
|
|
|
+ }
|
|
|
},
|
|
|
onShow() {
|
|
|
this.getarchives()
|
| xqd
@@ -149,12 +219,19 @@
|
|
|
disabled: false
|
|
|
}
|
|
|
],
|
|
|
+ idcrad:"",//身份证
|
|
|
+ zhengzhuang:"", //症状
|
|
|
phoneValue: '',
|
|
|
showinput: '其他手机号',
|
|
|
phonenum: "",
|
|
|
phonedata: "",
|
|
|
patientList: [],
|
|
|
- doctor: {}
|
|
|
+ doctor: {},
|
|
|
+ imgList:[],
|
|
|
+ type:"",//咨询状态
|
|
|
+ time:"",
|
|
|
+ huanzheID:"",
|
|
|
+ price:""
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
| xqd
@@ -173,26 +250,26 @@
|
|
|
phoneRadioChange(e) {
|
|
|
console.log(e);
|
|
|
},
|
|
|
- phoneListchange(item) {
|
|
|
- this.phoneValue = item
|
|
|
- console.log(this.phoneValue)
|
|
|
+ xuanzephone(item){
|
|
|
+ this.phoneValue=item.name
|
|
|
+ this.phonenum = item.num
|
|
|
},
|
|
|
- peopleListchange(item) {
|
|
|
- this.value = item
|
|
|
+ xuanzehuanzhe(item){
|
|
|
+ this.huanzheID = item.id
|
|
|
+ this.value=item.name
|
|
|
+ this.showpeople=false
|
|
|
},
|
|
|
//添加就诊人
|
|
|
addPeople(e) {
|
|
|
-
|
|
|
- },
|
|
|
- //添加手机号
|
|
|
- addPhone(e) {
|
|
|
-
|
|
|
- },
|
|
|
- a(e) {
|
|
|
- console.log(this.value);
|
|
|
+
|
|
|
},
|
|
|
confirmphone() {
|
|
|
- this.phonenum = this.phonedata
|
|
|
+ if(this.phoneValue=="其他手机号"){
|
|
|
+ this.phonenum = this.phonedata
|
|
|
+ }else{
|
|
|
+ this.phonedata = ""
|
|
|
+ }
|
|
|
+
|
|
|
this.showphone = !this.showphone
|
|
|
},
|
|
|
getarchives: async function() {
|
| xqd
@@ -201,8 +278,73 @@
|
|
|
this.patientList = res.data.data
|
|
|
}
|
|
|
},
|
|
|
- gotopay(){
|
|
|
-
|
|
|
+ gotopay:async function() {
|
|
|
+ if(this.type==1){
|
|
|
+ if(this.value!=""&&this.phonenum!=""&&this.$util.isPhoneNumber(this.phonenum)){
|
|
|
+ console.log(this.type)
|
|
|
+ console.log(this.doctor.id)
|
|
|
+ console.log(this.huanzheID)
|
|
|
+ console.log(this.price)
|
|
|
+ console.log(this.phonenum)
|
|
|
+ console.log(this.doctor.phone_minutes)
|
|
|
+ let obj={
|
|
|
+ doctorname:this.doctor.name,
|
|
|
+ product_type:this.type,
|
|
|
+ docter_id:this.doctor.id,
|
|
|
+ patient_id:this.huanzheID,
|
|
|
+ total_amount:this.price/100,
|
|
|
+ phone:this.phonenum,
|
|
|
+ phone_minutes:this.doctor.phone_minutes,
|
|
|
+ payment_type:2
|
|
|
+ }
|
|
|
+ uni.navigateTo({
|
|
|
+ url:"../order/payment?data="+JSON.stringify(obj)
|
|
|
+ })
|
|
|
+ // let res = await this.$request.post("/api/v1/order/consultPlaceOrder",{
|
|
|
+ // product_type:this.type,
|
|
|
+ // docter_id:this.doctor.id,
|
|
|
+ // patient_id:this.huanzheID,
|
|
|
+ // total_amount:this.price,
|
|
|
+ // phone:this.phonenum,
|
|
|
+ // phone_minutes:this.doctor.phone_minutes,
|
|
|
+ // payment_type:2
|
|
|
+ // })
|
|
|
+ }else{
|
|
|
+ uni.showToast({
|
|
|
+ title:"请选择完整",
|
|
|
+ icon:"none"
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ ChooseImage() {
|
|
|
+ uni.chooseImage({
|
|
|
+ count: 4, //默认9
|
|
|
+ sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
|
|
+ sourceType: ['album', 'camera'], //从相册选择
|
|
|
+ success: async (res) => {
|
|
|
+ if (this.imgList.length != 0) {
|
|
|
+ this.imgList = this.imgList.concat(res.tempFilePaths)
|
|
|
+
|
|
|
+ } else {
|
|
|
+ this.imgList = res.tempFilePaths
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ DelImg(e) {
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '确定要删除吗?',
|
|
|
+ cancelText: '再想想',
|
|
|
+ confirmText: '删除',
|
|
|
+ success: res => {
|
|
|
+ if (res.confirm) {
|
|
|
+ this.imgList.splice(e.currentTarget.dataset.index, 1);
|
|
|
+ this.imgList = this.imgList
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
};
|
| xqd
@@ -219,6 +361,13 @@
|
|
|
align-items: center;
|
|
|
border-bottom: 1rpx solid #f9f9f9;
|
|
|
}
|
|
|
+ .textareasty{
|
|
|
+ background-color: white;
|
|
|
+ border: 1px solid #efefef;
|
|
|
+ border-radius: 16rpx;
|
|
|
+ padding: 15rpx;
|
|
|
+ margin: 15rpx auto;
|
|
|
+ }
|
|
|
|
|
|
.popup_title_text {
|
|
|
width: auto;
|