123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648 |
- <template>
- <view class="main">
- <view class="cu-list menu-avatar">
- <view class="cu-item">
- <view class="cu-avatar round lg" :style="'background-image:url('+doctor.avatar+');'"></view>
- <view class="content">
- <view class="text-grey">{{doctor.name}}</view>
- <view class="text-gray text-sm flex">
- <text class="text-cut">
- 科室:{{doctor.office.name||'暂无'}} {{doctor.qualification.name||'暂无'}}
- </text>
- </view>
- </view>
- <view class="action">
- </view>
- </view>
- </view>
- <view class="cu-list menu">
- <view class="cu-item arrow" v-if="type==1||type==2||type==3" @click="openhuanzhe">
- <view class="content">
- <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" v-if="type==1" @click="openphone">
- <view class="content">
- <text class="text-grey">接听号码</text>
- </view>
- <view class="action">
- <text class="text-grey text-sm">{{phonenum}}</text>
- </view>
- </view>
- <view class="cu-item" v-if="type==1">
- <view class="content">
- <text class="text-grey">咨询时间</text>
- </view>
- <view class="action">
- <text class="text-grey text-sm">{{doctor.phone_minutes}}分钟</text>
- </view>
- </view>
- <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-red 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">{{hospital}}</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" style="text-align: right;" 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-blue text-sm" @click="isdescribe = !isdescribe">如何描述?</text>
- </view>
- </view>
- <view class="text-gray text-sm" style="margin: 25rpx 37rpx;line-height: 38rpx;" v-show="isdescribe">
- 例:宝宝18个月,脸上长了密密麻麻的疹子,如图。大概有一个星期了,孩子也不挠。每天清洗,涂了一些炉甘石洗剂,未见效,请问医生这是怎么回事?
- </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 class="text-gray text-sm" style="margin: 25rpx 37rpx;line-height: 38rpx;" v-if="type == 1">
- <rich-text :nodes="phone_notice"></rich-text>
- </view>
- <view class="text-gray text-sm" style="margin: 25rpx 37rpx;line-height: 38rpx;" v-else-if="type == 2">
- <rich-text :nodes="chat_notice"></rich-text>
- </view>
- <view class="text-gray text-sm" style="margin: 25rpx 37rpx;line-height: 38rpx;" v-else>
- <rich-text :nodes="clinic_notice"></rich-text>
- </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">
- 立即咨询
- </view>
- </view>
- <!-- 选择就诊人 -->
- <!-- model控制开关 mode控制显示方向-->
- <u-popup v-model="showpeople" mode="bottom" border-radius="14" length="50%">
- <view class="popup_title">
- <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="xuanzehuanzhe(item)">
- <view class="popup_list_title">
- <view class="title">{{item.name}}</view>
- <view class="body">
- {{item.sex==1?'男':'女'}}
- </view>
- </view>
- <view class="popup_list_button flex align-center">
- <u-radio-group v-model="value">
- <u-radio @change="peopleRadioChange" :key="index" :name="item.name">
- </u-radio>
- </u-radio-group>
- </view>
- </view>
- </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>
- <view class="" @click="addPeople">
- 添加就诊人档案
- </view>
- </view>
- </u-popup>
- <!-- 选择手机号 -->
- <u-popup v-model="showphone" mode="bottom" border-radius="14" length="50%">
- <view class="popup_title">
- <view class="popup_title_text">选择接听号码</view>
- </view>
- <scroll-view style="height: 70%;" scroll-y="true">
- <view class="phone" v-for="(item, index) in phoneList">
- <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="phoneRadioChange" :key="index" :name="item.name" :disabled="item.disabled">
- </u-radio>
- </u-radio-group>
- </view>
- </view>
- </view>
- <view style="padding: 0 50rpx;">
- <input class="padding-lr-sm" v-model="phonedata" style="border: 2rpx solid #efefef; height:90rpx;" v-if="phoneValue==showinput"
- type="number" placeholder="请输入手机号" />
- </view>
- </scroll-view>
- <u-gap height="10" bg-color="#f9f9f9"></u-gap>
- <view style="padding: 0 10%; height: 100rpx; ">
- <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>
- <u-no-network></u-no-network>
- </view>
- </template>
- <script>
- import store from '@/store'
- export default {
- onLoad(options) {
- console.log(options)
- this.phoneList[0].num = uni.getStorageSync('phone')
- this.phonenum = this.phoneList[0].num
- this.doctor = JSON.parse(options.doctor)
- this.type = options.type
- this.time=options.time
- this.hospital = options.hospital
- this.jigouid = options.jigou
- this.year = options.year
- this.yearid = options.yearid
- 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
- }
- this.$util.getAgreement().then(res => {
- this.phone_notice = res.data.phone_notice
- this.chat_notice = res.data.chat_notice
- this.clinic_notice = res.data.clinic_notice
- }).catch(err => {
-
- })
- },
- onShow() {
- this.getarchives()
- },
- data() {
- return {
- /* 就诊人 */
- showpeople: false,
- // u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
- value: '',
- /* 接听号码 */
- showphone: false,
- phoneList: [{
- name: '默认手机号',
- id: '0',
- num: '',
- disabled: false
- },
- {
- name: '其他手机号',
- id: '1',
- num: '',
- disabled: false
- }
- ],
- idcrad:"",//身份证
- zhengzhuang:"", //症状
- phoneValue: '',
- showinput: '其他手机号',
- phonenum: "",
- phonedata: "",
- patientList: [],
- doctor: {},
- imgList:[],
- type:"",//咨询状态
- time:"",
- huanzheID:"",
- price:"",
- hospital:"",
- jigouid:"",
- year:"",
- yearid:"",
- upimg:[],
- isdescribe:false,
- phone_notice:"",
- chat_notice:"",
- clinic_notice:""
- }
- },
- methods: {
- //点击咨询患者
- openhuanzhe() {
- this.showpeople = true
- },
- //点击联系号码
- openphone() {
- this.showphone = true
- },
- // 选中某个单选框时,由radio时触发
- peopleRadioChange(e) {
- console.log(e);
- },
- phoneRadioChange(e) {
- console.log(e);
- },
- xuanzephone(item){
- this.phoneValue=item.name
- this.phonenum = item.num
- },
- xuanzehuanzhe(item){
- this.huanzheID = item.id
- this.value=item.name
- this.showpeople=false
- },
- //添加就诊人
- addPeople(e) {
- uni.navigateTo({
- url:"../archives/add_archives"
- })
- },
- confirmphone() {
- if(this.phoneValue=="其他手机号"){
- this.phonenum = this.phonedata
- }else{
- this.phonedata = ""
- }
-
- this.showphone = !this.showphone
- },
- getarchives: async function() {
- let res = await this.$request.post("/api/v1/patient/patientList")
- if (res.status == 0) {
- this.patientList = res.data.data
- this.huanzheID = this.patientList[0].id
- this.value=this.patientList[0].name
- }
- },
- gotopay:async function() {
- if(this.type==1){
- if(this.value == ""){
- uni.showToast({
- title:"请选择患者",
- icon:"none"
- })
- return false
- }
- if(!this.$util.isPhoneNumber(this.phonenum)){
- uni.showToast({
- title:"请选择或填写手机号",
- icon:"none"
- })
- return false
- }
- 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
- }
- if((this.price/100) == 0){
- let res = await this.$request.post("/api/v1/order/consultPlaceOrder", {
- product_type: obj.product_type,
- docter_id: obj.docter_id,
- patient_id: obj.patient_id,
- total_amount: obj.total_amount*100,
- phone: obj.phone,
- phone_minutes: obj.phone_minutes,
- payment_type:2
- })
- if (res.status == 0) {
- uni.showToast({
- title: "提交成功!",
- icon: "none",
- duration: 1000
- })
- setTimeout(() => {
- uni.redirectTo({
- url: "../order/order?type=" + obj.product_type
- })
- }, 1000)
- }
- }else{
- uni.redirectTo({
- url:"../order/payment?data="+JSON.stringify(obj)
- })
- }
-
-
- }else if(this.type==2){
- if(this.value == ""){
- uni.showToast({
- title:"请选择患者",
- icon:"none"
- })
- return false
- }
- if(this.zhengzhuang == ""){
- uni.showToast({
- title:"请填写症状",
- icon:"none"
- })
- return false
- }
- // if(this.imgList.length == 0){
- // uni.showToast({
- // title:"请上传病情照片",
- // icon:"none"
- // })
- // return false
- // }
- let obj={
- doctorname:this.doctor.name,
- product_type:this.type,
- docter_id:this.doctor.id,
- patient_id:this.huanzheID,
- total_amount:this.price/100,
- symptoms:this.zhengzhuang,
- medical_imgs:JSON.stringify(this.upimg),
- }
- if((this.price/100) == 0){
- let res = await this.$request.post("/api/v1/order/consultPlaceOrder", {
- product_type: obj.product_type,
- docter_id: obj.docter_id,
- patient_id: obj.patient_id,
- total_amount: obj.total_amount*100,
- symptoms: obj.symptoms,
- medical_imgs: obj.medical_imgs,
- payment_type:2
- })
- if (res.status == 0) {
- uni.showToast({
- title: "提交成功!",
- icon: "none",
- duration: 1000
- })
- setTimeout(() => {
- uni.redirectTo({
- url: "../order/order?type=" + obj.product_type
- })
- }, 1000)
- }
- }else{
- uni.redirectTo({
- url:"../order/payment?data="+JSON.stringify(obj)
- })
- }
-
- }else if(this.type==3){
- if(this.value == ""){
- uni.showToast({
- title:"请选择患者",
- icon:"none"
- })
- return false
- }
- if(this.idcrad == ""&&this.$util.isIdCard(this.idcrad)){
- uni.showToast({
- title:"请填写正确身份证号",
- icon:"none"
- })
- return false
- }
- let obj={
- doctorname:this.doctor.name,
- product_type:this.type,
- docter_id:this.doctor.id,
- patient_id:this.huanzheID,
- total_amount:this.price/100,
- organization_id:this.jigouid,
- schedule_date:this.year,
- time_period_id:this.yearid,
- }
- if((this.price/100) == 0){
- let res = await this.$request.post("/api/v1/order/appointPlaceOrder", {
- product_type: obj.product_type,
- docter_id: obj.docter_id,
- patient_id: obj.patient_id,
- total_amount: obj.total_amount *100,
- organization_id: obj.organization_id,
- schedule_date:obj.schedule_date,
- time_period_id: obj.time_period_id,
- payment_type:2
- })
- if (res.status == 0) {
- uni.showToast({
- title: "提交成功!",
- icon: "none",
- duration: 1000
- })
- setTimeout(() => {
- uni.redirectTo({
- url: "../order/order?type=" + obj.product_type
- })
- }, 1000)
- }
- }else{
- uni.redirectTo({
- url:"../order/payment?data="+JSON.stringify(obj)
- })
- }
-
- }
- },
- ChooseImage() {
- uni.chooseImage({
- count: 4, //默认9
- sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
- sourceType: ['album', 'camera'], //从相册选择
- success: (res) => {
- if (this.imgList.length != 0) {
- this.imgList = this.imgList.concat(res.tempFilePaths)
- this.imgList.forEach(item=>{
- this.$request.upload("/api/v1/common/uploadFile",item).then(re=>{
- this.upimg.push(JSON.parse(re).data.url)
- console.log(this.upimg)
- })
- })
-
- } else {
- this.imgList = res.tempFilePaths
- this.imgList.forEach(item=>{
- this.$request.upload("/api/v1/common/uploadFile",item).then(re=>{
- this.upimg.push(JSON.parse(re).data.url)
- })
- })
-
- }
- }
- });
- },
- 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
- }
- }
- })
- }
- }
- };
- </script>
- <style scoped lang="scss">
- .main {}
- .popup_title {
- height: 15%;
- width: 100%;
- display: flex;
- justify-content: center;
- align-items: center;
- border-bottom: 1rpx solid #f9f9f9;
- }
- .textareasty{
- background-color: white;
- border: 1px solid #efefef;
- border-radius: 16rpx;
- padding: 15rpx;
- margin: 15rpx 15rpx;
- width: 100%;
- }
- .popup_title_text {
- width: auto;
- height: auto;
- font-size: 34rpx;
- font-weight: 540;
- }
- .popup_list {
- display: flex;
- height: 10vh;
- width: auto;
- border-bottom: 1rpx solid #f9f9f9;
- }
- .popup_list_title {
- height: 100%;
- width: 90%;
- display: inline-block;
- padding: 0 0 0 30rpx;
- .title {
- height: 50%;
- width: auto;
- font-size: 32rpx;
- font-weight: 500;
- padding: 20rpx 0 0 0;
- }
- .body {
- height: 50%;
- color: #a1a1a1;
- height: auto;
- width: auto;
- font-size: 30rpx;
- padding: 10rpx 0 0 0;
- }
- }
- .popup_button {
- height: 80rpx;
- width: 100%;
- display: flex;
- justify-content: center;
- align-items: center;
- view {
- color: #0b73ba;
- font-weight: 500;
- }
- }
- /**选择号码的样式和选择患者不同
- 需要更改样式*/
- .phone {
- height: 20%;
- width: 100%;
- .list {
- height: 100%;
- width: 100%;
- display: flex;
- padding: 0 10rpx 0 30rpx;
- .title {
- height: 100%;
- width: 65%;
- font-size: 32rpx;
- color: #7d7d7d;
- display: flex;
- align-items: center;
- }
- .phone {
- height: 100%;
- font-size: 32rpx;
- font-weight: 500;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .button {
- height: 100%;
- width: 5%;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- }
- }
- </style>
|