NurseStationApp/pages/appointmenttime/appointmenttime.vue

178 lines
4.8 KiB
Vue
Raw Normal View History

2022-10-14 19:48:48 +08:00
<template>
2022-10-20 18:38:18 +08:00
<view class="app">
2022-10-14 19:48:48 +08:00
<view class="message">请填写下面的信息</view>
2022-10-20 18:38:18 +08:00
<view class="user">
<view class="item">
<span>姓名</span>
<span>{{personInfo.patientName}}</span>
</view>
<view class="item">
<span>电话</span>
<span>{{personInfo.phone}}</span>
2022-10-14 19:48:48 +08:00
</view>
2022-10-20 18:38:18 +08:00
<view class="item">
<span>地址</span>
<span>{{personInfo.address}}</span>
2022-10-20 09:15:48 +08:00
</view>
2022-10-21 11:01:04 +08:00
<view class="selecttime" @tap='timeshow=true'>
2022-10-20 18:38:18 +08:00
<span>时间</span>
2022-10-25 08:58:53 +08:00
<text v-if="usertime==''" style="color: black;">请选择时间
<image src="../../static/jiantou.png"></image></text>
2022-10-21 17:44:04 +08:00
<text v-else style="color: black;">{{usertime}}</text>
2022-10-25 10:04:44 +08:00
2022-10-20 18:38:18 +08:00
</view>
</view>
<view class="remarks">
服务时长:{{orderlist.serveDurationUnit}}
2022-10-20 09:15:48 +08:00
</view>
2022-10-20 18:38:18 +08:00
<view class="Package">套餐信息
<text class="money">{{orderlist.nurseItemPrice}}</text>
<text class="detail">
·{{orderlist.nurseItemName}}
</text>
2022-10-14 19:48:48 +08:00
</view>
2022-10-20 18:38:18 +08:00
<view class="Consumablespackage">耗材包详情
<text class="money">{{orderlist.consumableTotalPrice}}</text>
<text class="detail">
{{orderlist.itemConsumableList}}
</text>
2022-10-14 19:48:48 +08:00
</view>
2022-10-20 18:38:18 +08:00
<view class="remarks">
2022-10-17 18:35:58 +08:00
<span>备注</span>
2022-10-20 09:15:48 +08:00
<input placeholder="">
</view>
<view class="radio-content">
<view class="radio-right">
<view class="radio" :class="radio1 == 2 ? 'radio-default':''" @tap="changeRadio2">
<view :class="radio1 == 2 ? 'radio-active':''"></view>
</view>
</view>
<text class="agreement" @tap="changeRadio2">我已阅读并同意</text>
<text @tap='maskshow=true;showRegectAgreeButton=false'>用户协议</text>
</view>
<view class="priceback">
2022-10-20 18:38:18 +08:00
<view class="prices">{{orderlist.totalPrice}}</view>
2022-10-20 09:15:48 +08:00
<view class="xiugai">修改信息</view>
<view class="queren" @tap='updata'>确认预约</view>
2022-10-17 18:35:58 +08:00
</view>
2022-10-20 09:15:48 +08:00
<u-toast ref="uToast" />
2022-10-21 11:01:04 +08:00
<upicker v-model="timeshow" mode="time" start-year='2022' :params="timeparams" @confirm='timeconfirm'></upicker>
2022-10-14 19:48:48 +08:00
</view>
</template>
<script>
2022-10-20 09:15:48 +08:00
import {
getAppStationItemInfo,
getAppPatientList,
2022-10-20 18:38:18 +08:00
submitAppointment
2022-10-20 09:15:48 +08:00
} from '@/api/appointmenttime/appointmenttime.js'
import baseurl from '@/api/baseurl.js'
2022-10-25 08:58:53 +08:00
import upicker from './@/pages/u-picker/u-picker.vue'
2022-10-14 19:48:48 +08:00
export default {
2022-10-21 11:01:04 +08:00
components: {
upicker
},
2022-10-14 19:48:48 +08:00
data() {
return {
2022-10-21 11:01:04 +08:00
timeparams: {
2022-10-20 09:15:48 +08:00
year: true,
month: true,
day: true,
2022-10-20 18:38:18 +08:00
hour: true,
2022-10-21 11:01:04 +08:00
endhour: true,
2022-10-20 18:38:18 +08:00
minute: true,
2022-10-21 11:01:04 +08:00
endminute: true,
2022-10-20 09:15:48 +08:00
},
2022-10-21 11:01:04 +08:00
timeshow: false,
2022-10-20 09:15:48 +08:00
maskshow: false,
orderlist: {
"patientId": '',
"stationId": 2,
"stationItemId": 2,
"stationItemPriceId": 3,
"serviceAddress": "",
"serviceDate": "",
"serviceStartTime": "",
"serviceEndTime": "",
"nurseItemName": "",
"nurseItemPrice": '',
"serveDurationUnit": "",
"consumableTotalPrice": '',
"totalPrice": '',
"remark": "",
"orderCount": 1,
"orderConsumableList": []
},
2022-10-14 19:48:48 +08:00
maskshow: false,
2022-10-20 09:15:48 +08:00
userlist: [],
patientId: 46,
phone: '',
patientName: '',
address: '',
usertime: '',
radio1: 1,
stationId: 2,
stationItemId: 2,
stationItemPriceId: 3,
2022-10-20 18:38:18 +08:00
username: "",
personInfo: [],
2022-10-14 19:48:48 +08:00
}
},
2022-10-20 18:38:18 +08:00
onLoad(options) {
console.log(options)
2022-10-21 17:44:04 +08:00
this.getInfo()
this.getPatientInfo()
2022-10-20 18:38:18 +08:00
//获取护理站id等信息
2022-10-21 17:44:04 +08:00
this.personInfo.patientId = options.patientId
2022-10-20 18:38:18 +08:00
this.orderlist.stationId = options.stationId
this.orderlist.stationItemId = options.stationItemId
this.orderlist.stationItemPriceId = options.stationItemPriceId
//耗材包详情方法调用
2022-10-21 11:01:04 +08:00
// this.getPatientInfo(options.stationId, options.stationItemId, options.stationItemPriceId)
2022-10-20 09:15:48 +08:00
},
2022-10-14 19:48:48 +08:00
methods: {
2022-10-21 11:01:04 +08:00
//获取时间
2022-10-21 17:44:04 +08:00
timeconfirm(e) {
2022-10-21 11:01:04 +08:00
console.log(e)
2022-10-21 17:44:04 +08:00
this.orderlist.serviceDate = e.year + '-' + e.month + '-' + e.day
this.orderlist.serviceStartTime = e.hour + ":" + e.minute
this.orderlist.serviceEndTime = e.endhour + ":" + e.endminute
this.usertime = e.year + '年' + e.month + '月' + e.day + '日' + e.hour + ":" + e.minute + '至' +e.endhour + ":" + e.endminute
console.log(this.orderlist,this.usertime)
2022-10-21 11:01:04 +08:00
},
2022-10-20 18:38:18 +08:00
getInfo() { //被护理人信息
2022-10-20 09:15:48 +08:00
getAppPatientList(this.patientId).then(res => {
2022-10-20 18:38:18 +08:00
this.personInfo = res.data[0]
console.log("this.personInfo", this.personInfo);
2022-10-20 09:15:48 +08:00
})
},
2022-10-20 18:38:18 +08:00
//获取耗材包详情
getPatientInfo(stationId, stationItemId, stationItemPriceId) {
2022-10-21 17:44:04 +08:00
getAppStationItemInfo(this.stationId, this.stationItemId, this.stationItemPriceId).then(res => {
2022-10-20 18:38:18 +08:00
console.log(res)
this.orderlist = res.data
2022-10-25 10:04:44 +08:00
//被护理人信
2022-10-20 09:15:48 +08:00
})
},
2022-10-20 18:38:18 +08:00
//确认预约
2022-10-20 09:15:48 +08:00
updata() {
this.orderlist.orderCount = 1;
// console.log(this.orderlist)
2022-10-20 18:38:18 +08:00
submitAppointment(this.orderlist).then(res => {
2022-10-20 09:15:48 +08:00
}
2022-10-14 19:48:48 +08:00
2022-10-20 18:38:18 +08:00
)
},
changeRadio2() {
this.radio1 = 2;
// console.log("个人")
},
2022-10-14 19:48:48 +08:00
2022-10-20 18:38:18 +08:00
}
2022-10-17 18:35:58 +08:00
}
2022-10-20 18:38:18 +08:00
</script>
<style lang="scss">
2022-10-25 08:58:53 +08:00
@import './appointmenttime.scss'
2022-10-14 19:48:48 +08:00
</style>