You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

362 lines
8.1 KiB

2 years ago
<template>
2 years ago
<view class="container">
<view class="box">
<view class="boxHeader">
<view class="headerItem">
<text class="headerItemInfo">{{buyInfo.selectedProject}}</text>
<text class="headerItemInfo">{{buyInfo.selectArea}}</text>
<text class="headerItemInfo">{{buyInfo.selectbed}}</text>
</view>
<view class="headerPrice">
<text>服务金额</text>
<text class="headerPriceInfo">{{buyInfo.selectProduct.minPrice}}</text>
</view>
</view>
<view class="boxContent">
<view class="boxTitle">当日预定
</view>
<view class="boxContentList">
2 years ago
<view class="boxItem" :class="{ boxItem_on: mod.isChecked}" @click="toChange" data-type="t"
:data-item="mod" :data-index="index" v-for="(mod,index) in list.t" :key="index">
2 years ago
<view class="boxItemLeft">
<image style="width: 149rpx;height: 149rpx;border-radius: 149rpx;" :src="mod.avatar_url">
</view>
<view class="boxItemRight">
<view class="boxItemRight_r">
<view>
<text>{{mod.name}}</text>
<text style="color: #F7723F;">{{mod.price}}/</text>
</view>
<view>
<text style="font-size: 24rpx;color: #696766;">{{mod.age}}</text>
</view>
<view>
<text style="font-size: 24rpx;color: #696766;">{{mod.work_years}}年护理经验</text>
<text></text>
</view>
</view>
<view class="boxItemRight_l">
<checkbox style="transform:scale(0.8)" activeBackgroundColor="#0EE2BA"
2 years ago
backgroundColor="#FFFFFF" :checked="mod.isChecked" />
2 years ago
</view>
</view>
</view>
2 years ago
</view>
<view class="boxContentFooter" @click="toMore">
<view class="boxContentFooterBtn">查看更多 > </view>
2 years ago
</view>
<view class="boxTitle">明日预定
</view>
<view class="boxContentList">
2 years ago
<view class="boxItem" :class="{ boxItem_on: mod.isChecked}" @click="toChange" :data-item="mod"
:data-index="index" data-type="n" v-for="(mod,index) in list.n" :key="index">
2 years ago
<view class="boxItemLeft">
<image style="width: 149rpx;height: 149rpx;border-radius: 149rpx;" :src="mod.avatar_url">
</view>
<view class="boxItemRight">
<view class="boxItemRight_r">
<view>
<text>{{mod.name}}</text>
<text style="color: #F7723F;">{{mod.price}}/</text>
</view>
<view>
<text style="font-size: 24rpx;color: #696766;">{{mod.age}}</text>
</view>
<view>
<text style="font-size: 24rpx;color: #696766;">{{mod.work_years}}年护理经验</text>
<text></text>
</view>
</view>
<view class="boxItemRight_l">
<checkbox style="transform:scale(0.8)" activeBackgroundColor="#0EE2BA"
backgroundColor="#FFFFFF" :checked="mod.isChecked" />
</view>
</view>
</view>
</view>
2 years ago
<view class="boxContentFooter" @click="toMore">
<view class="boxContentFooterBtn">查看更多 > </view>
</view>
2 years ago
</view>
</view>
<view class="footer">
<view class="footerLeft">
2 years ago
<text>单价{{selectPrice==0?buyInfo.selectProduct.minPrice:selectPrice}}/ </text>
2 years ago
</view>
2 years ago
<view class="footerRight" @click="toStep" :class="{footerRightOn:buyInfo.paramedic_id!=''}">
2 years ago
<text>继续</text>
</view>
</view>
</view>
2 years ago
</template>
<script>
2 years ago
import util from "../../../../utils/util.js";
export default {
data() {
return {
loading: true,
list: {
t: [],
n: []
},
2 years ago
selectPrice: 0,
2 years ago
buyInfo: {
"selectArea": "住院部 一楼51急诊病区",
"selectbed": "101-31床",
"selectbedID": 3348,
"selectAreaID": 63,
"selectSex": {
"sex": 0,
"isChecked": true,
"selectImg": "/static/resource/icon/icon_boy_on.png",
"img": "/static/resource/icon/icon_boy.png",
"text": "男"
},
"selectFactors": [{
"id": 5,
"factor_item_id": 18
}, {
"id": 6,
"factor_item_id": 25
}, {
"id": 18,
"factor_item_id": 107
}],
"selectProduct": {
"id": 3,
"name": "院内陪护",
"minPrice": "100.00",
"maxPrice": 440
},
"selectProjectID": 3,
2 years ago
"selectedProject": "五金中医院",
"paramedic_id": ""
2 years ago
}
}
},
onShareAppMessage() {},
onLoad() {
this.loadParamedics("t");
this.loadParamedics("n");
},
onReady() {},
onHide() {},
methods: {
2 years ago
toStep() {
if (this.buyInfo.paramedic_id != "") {
uni.redirectTo({
url: "/packages/packagesPro/pages/proBuy/proBuy"
})
}
else{
util.alert("请选择护工")
}
},
toMore() {
uni.navigateTo({
url: "/packages/packagesPro/pages/proCarerList/list"
})
},
2 years ago
toChange(t) {
var i = t.currentTarget.dataset.index;
var type = t.currentTarget.dataset.type;
2 years ago
for (var mod of this.list.t) {
mod.isChecked = false;
2 years ago
}
2 years ago
for (var mod of this.list.n) {
mod.isChecked = false;
2 years ago
}
2 years ago
this.list[type][i].isChecked = true;
this.selectPrice = this.list[type][i].price;
this.buyInfo.paramedic_id = this.list[type][i].id;
2 years ago
this.$forceUpdate()
},
loadParamedics: function(x) {
var that = this;
var t = this.$moment().format('YYYY-MM-DD');
var n = this.$moment().add(1, 'd').format('YYYY-MM-DD');
var d = (x == "t" ? t : n);
util.request({
api: 'customer/get-available-paramedics',
data: {
bed_id: that.buyInfo.selectbedID,
sex: that.buyInfo.selectSex,
start_date: d,
factors: that.buyInfo.selectFactors
},
utilSuccess: function(data) {
that.list[x] = data[d]
that.loading = false;
},
utilFail: function(t) {
util.alert(t);
}
});
},
}
}
2 years ago
</script>
<style>
2 years ago
view {
box-sizing: border-box;
}
.container {
background-color: rgb(231, 245, 244) !important;
height: 100vh;
overflow: hidden;
}
.box {
background: #fff;
width: 690rpx;
border-radius: 8rpx 8rpx 8rpx 8rpx;
margin: 50rpx auto;
padding: 43rpx 20rpx;
}
.boxContent {
overflow-y: auto;
height: 65vh;
padding: 4rpx;
margin-top: 20rpx;
}
.headerItem {
display: flex;
flex-wrap: wrap;
}
text.headerItemInfo {
background: #E7F5F4;
border-radius: 4rpx 4rpx 4rpx 4rpx;
padding: 10rpx 20rpx;
margin-right: 10rpx;
margin-bottom: 20rpx;
font-size: 32rpx;
color: #303233;
}
.footer {
width: 750rpx;
height: 92rpx;
background: #FFFFFF;
position: fixed;
bottom: 0;
left: 0;
display: flex;
}
.footerLeft {
width: 60%;
line-height: 92rpx;
font-weight: 600;
font-size: 30rpx;
color: #F7723F;
padding: 0rpx 67rpx;
}
.footerRight {
width: 40%;
height: 100%;
line-height: 92rpx;
text-align: center;
2 years ago
background: #ccc;
2 years ago
color: #fff;
}
2 years ago
.footerRightOn {
background: linear-gradient(90deg, #0ee2ba, #0CC7A4);
}
2 years ago
.headerPrice {
font-size: 32rpx;
color: #303233;
}
.headerPriceInfo {
color: #F7723F;
margin-left: 20rpx;
}
.boxItem {
background: #FFFFFF;
box-shadow: 2rpx 0rpx 20rpx 0rpx #56626D;
border-radius: 4rpx 4rpx 4rpx 4rpx;
border: 3rpx solid #FFFFFF;
padding: 20rpx 15rpx;
display: flex;
width: 100%;
margin-bottom: 30rpx;
}
.boxItem_on {
border: 3rpx solid #0EE2BA !important;
box-shadow: 3rpx 0rpx 20rpx 0rpx #16A78C !important;
}
.boxContentList {
display: flex;
flex-direction: column;
}
.boxItemRight {
display: flex;
flex: 1;
margin-left: 21rpx;
}
.boxItemRight_r {
display: flex;
width: 75%;
flex-direction: column;
justify-content: space-around;
}
.boxItemRight_r view {
display: flex;
width: 100%;
justify-content: space-between;
font-weight: 300;
font-size: 26rpx;
color: #303233;
}
.boxItemRight_l {
display: flex;
align-items: center;
justify-content: flex-end;
width: 30%;
}
.boxTitle {
font-size: 32rpx;
color: #303233;
margin: 30rpx 0rpx;
}
2 years ago
.boxContentFooterBtn {
width: 347rpx;
height: 72rpx;
background: linear-gradient(90deg, #0ee2ba, #67F7DC);
border-radius: 36rpx 36rpx 36rpx 36rpx;
line-height: 72rpx;
text-align: center;
color: #fff;
font-weight: 300;
font-size: 26rpx;
margin: 20rpx auto;
}
2 years ago
</style>