DESKTOP-L29QSFC\THINK 2 years ago
parent e3d91d758b
commit e8e087d1ad

@ -64,7 +64,7 @@
"pagePath": "/pages/order/index",
"text": "订单",
"iconPath": "/static/resource/menu/icon_order.png",
"selectedIconPath": "/static/resource/menu/icon_zhishi_on.png"
"selectedIconPath": "/static/resource/menu/icon_order_on.png"
},
{
id: 4,

@ -1,8 +1,321 @@
<template>
<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">
<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">
<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>
<view class="boxTitle">明日预定
</view>
<view class="boxContentList">
<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">
<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>
</view>
</view>
<view class="footer">
<view class="footerLeft">
<text>单价180/ </text>
</view>
<view class="footerRight">
<text>继续</text>
</view>
</view>
</view>
</template>
<script>
import util from "../../../../utils/util.js";
export default {
data() {
return {
loading: true,
list: {
t: [],
n: []
},
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,
"selectedProject": "五金中医院"
}
}
},
onShareAppMessage() {},
onLoad() {
this.loadParamedics("t");
this.loadParamedics("n");
},
onReady() {},
onHide() {},
methods: {
toChange(t) {
var i = t.currentTarget.dataset.index;
var type = t.currentTarget.dataset.type;
for(var mod of this.list.t){
mod.isChecked=false;
}
for(var mod of this.list.n){
mod.isChecked=false;
}
this.list[type][i].isChecked=true;
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);
}
});
},
}
}
</script>
<style>
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%;
background: linear-gradient(90deg, #0ee2ba, #0CC7A4);
height: 100%;
line-height: 92rpx;
text-align: center;
color: #fff;
}
.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;
}
</style>

@ -137,7 +137,7 @@
"pagePath": "pages/order/index",
"text": "订单",
"iconPath": "/static/resource/menu/icon_order.png",
"selectedIconPath": "/static/resource/menu/icon_zhishi_on.png"
"selectedIconPath": "/static/resource/menu/icon_order_on.png"
},
{
"pagePath": "pages/mine/index",

@ -5,23 +5,54 @@
请确认患者的病床信息
</view>
<view class="popcontent">
<view class="formitem" style="justify-content: space-around;">
<view class="formitem-sex" style="
display: flex;
flex-direction: column;
text-align: center;" @click="toChangeSex" :data-index="index" v-for="(mod,index) in sexArr" :key="index">
<image :src="mod.img" style="width: 80rpx;height: 80rpx;" v-if="!mod.isChecked"></image>
<image :src="mod.selectImg" style="width: 80rpx;height: 80rpx;" v-if="mod.isChecked"></image>
<text>{{mod.text}}</text>
</view>
</view>
<view class="formitem">
<view class="formitem-left">
病区/楼层
<span style="color: red;padding-right: 10rpx;">*</span>病区/楼层
</view>
<view class="formitem-right">
<picker
@change="bindMultiPickerChange"
mode=multiSelector
range-key="name"
:value="index"
:range="multiArray"
@columnchange="bindMultiPickerColumnChange"
>
<view class="uni-input">1212121</view>
<picker @change="bindMultiPickerChange" style="width: 100%;" mode=multiSelector range-key="name"
:range="multiArray" @columnchange="bindMultiPickerColumnChange">
<view class="uni-input">{{selectArea?selectArea:"请选择病区/楼层 >"}}</view>
</picker>
</view>
</view>
<view class="formitem">
<view class="formitem-left">
<span style="color: red;padding-right: 10rpx;">*</span>病床
</view>
<view class="formitem-right">
<picker @change="bindPickerChange" style="width: 100%;" :value="index" :range="array">
<view class="uni-input">{{selectbed?selectbed:"请选择病床 >"}}</view>
</picker>
</view>
</view>
<view class="formitem" v-for="(item,index) in product.factors" :key="index">
<view class="formitem-left">
<span style="color: red;padding-right: 10rpx;">*</span>
{{item.name}}
</view>
<view class="formitem-right">
<block v-for="(m,i) in item.factor_items">
<view :data-index="i" :data-pindex="index" @click="toSelectFactor" class="mformitem"
:class="{ active: m.isChecked}">{{m.name}}</view>
</block>
</view>
</view>
</view>
<view class="popfooter">
<view class="btn" @click="toStep"></view>
</view>
</view>
<tabbar :current-page="2"></tabbar>
@ -113,35 +144,27 @@
},
toChangeSex: function(t) {
var that = this;
var a;
var i = t.currentTarget.dataset.index;
var r = this.sexArr;
var s = r[i];
var n = e(r);
try {
for (n.s(); !(a = n.n()).done;) {
a.value.isChecked = false;
}
} catch (e) {
console.log('CatchClause', e);
console.log('CatchClause', e);
n.e(e);
} finally {
n.f();
for (var a of r) {
a.isChecked = false;
}
s.isChecked ? (s.isChecked = false) : (s.isChecked = true);
this.sexArr = r;
that.sexArr = r;
},
bindMultiPickerChange: function(e) {
console.log('picker发送选择改变携带值为', e.detail.value);
var t = e.detail.value;
var that = this;
this.multiIndex = e.detail.value;
this.selectArea = that.showMuti[0][t[0]].name + ' ' + that.showMuti[1][t[1]].name;
this.selectAreaID = that.showMuti[1][t[1]].id;
this.selectbedID = '';
this.selectbed = '';
that.multiIndex = e.detail.value;
that.selectArea = that.showMuti[0][t[0]].name + ' ' + that.showMuti[1][t[1]].name;
that.selectAreaID = that.showMuti[1][t[1]].id;
that.selectbedID = '';
that.selectbed = '';
that.loadBeds(that.selectAreaID);
},
@ -160,14 +183,14 @@
a.multiArray[e.detail.column + 1] = [];
a.multiArray[e.detail.column + 1] = that.toArr(i.id, e.detail.column + 1);
}
this.selectArea=that.showMuti[0][a.multiIndex[0]].name + ' ' + that.showMuti[1][a
this.selectArea = that.showMuti[0][a.multiIndex[0]].name + ' ' + that.showMuti[1][a
.multiIndex[1]
].name;
this.selectAreaID=that.showMuti[1][a.multiIndex[1]].id,
this.selectbedID= '',
this.selectbed= ''
this.selectAreaID = that.showMuti[1][a.multiIndex[1]].id;
this.selectbedID = '';
this.selectbed = '';
that.loadBeds(that.showMuti[1][a.multiIndex[1]].id);
},
@ -184,19 +207,13 @@
var r = [];
var s = this.product.factors;
if (s.length > 0) {
var n;
var c = e(s);
try {
for (c.s(); !(n = c.n()).done;) {
var o = n.value;
for (var o of s) {
var l = {};
l.title = o.name;
l.items = [];
var u;
var d = e(o.factor_items);
try {
for (d.s(); !(u = d.n()).done;) {
var h = u.value;
for (var h of o.factor_items) {
var f = {};
if (h.isChecked) {
f.id = h.factor_id;
@ -205,22 +222,10 @@
i.push(f);
}
}
} catch (e) {
console.log('CatchClause', e);
console.log('CatchClause', e);
d.e(e);
} finally {
d.f();
}
} catch (e) {} finally {}
r.push(l);
}
} catch (e) {
console.log('CatchClause', e);
console.log('CatchClause', e);
c.e(e);
} finally {
c.f();
}
} catch (e) {} finally {}
}
for (var m = true, g = 0, p = r; g < p.length; g++) {
if (0 == (h = p[g]).items.length) {
@ -247,7 +252,9 @@
selectAreaID: this.selectAreaID,
selectSex: v,
selectFactors: i,
selectProduct: this.selectProduct
selectProduct: this.selectProduct,
selectProjectID:this.selectProjectID,
selectedProject:getApp().globalData.selectedProject.name
};
uni.setStorageSync('buyinfo', y);
uni.navigateTo({
@ -314,7 +321,7 @@
showMuti: this.showMuti
};
n.showMuti[t] = JSON.parse(JSON.stringify(i));
this.setData(n);
this.showMuti = JSON.parse(JSON.stringify(n.showMuti));
return JSON.parse(JSON.stringify(a));
},
@ -345,35 +352,8 @@
var that = this;
util.request({
api: 'customer/get-product-by-project/' + that.selectProjectID,
utilSuccess: function(t) {
var i;
var r = t;
var s = r.factors;
var n = e(s);
try {
for (n.s(); !(i = n.n()).done;) {
var c;
var o = i.value;
var l = e(o.factor_items);
try {
for (l.s(); !(c = l.n()).done;) {
c.value.isChecked = false;
}
} catch (e) {
console.log('CatchClause', e);
console.log('CatchClause', e);
l.e(e);
} finally {
l.f();
}
}
} catch (e) {
console.log('CatchClause', e);
console.log('CatchClause', e);
n.e(e);
} finally {
n.f();
}
utilSuccess: function(r) {
var u = {};
u.id = r.id;
u.name = r.name;
@ -396,25 +376,18 @@
},
toSelectFactor: function(t) {
console.log(t)
var a;
var i = t.currentTarget.dataset.pindex;
var r = t.currentTarget.dataset.index;
var s = this.product;
var n = s.factors[i];
var c = e(n.factor_items);
try {
for (c.s(); !(a = c.n()).done;) {
a.value.isChecked = false;
}
} catch (e) {
console.log('CatchClause', e);
console.log('CatchClause', e);
c.e(e);
} finally {
c.f();
for (var a of n.factor_items) {
a.isChecked = false;
}
n.factor_items[r].isChecked = true;
this.product = s
this.$forceUpdate();
},
}
@ -449,4 +422,76 @@
font-size: 32rpx;
color: #303233;
}
.popcontent {
height: 80%;
overflow-y: auto;
}
.formitem {
display: flex;
justify-content: space-between;
border-bottom: 1rpx solid rgba(48, 50, 51, 0.1);
padding: 30rpx 10rpx;
}
.formitem-left {
font-weight: 300;
font-size: 26rpx;
color: #303233;
}
.formitem-right {
font-weight: 300;
font-size: 24rpx;
color: #303233;
display: flex;
flex-direction: row;
width: 70%;
flex-wrap: wrap;
justify-content: flex-end;
text-align: right;
}
.mformitem {
border: 1rpx solid #303233;
border-radius: 20rpx;
margin-right: 10rpx;
margin-bottom: 10rpx;
padding: 10rpx;
}
.active {
border: 1rpx solid #0ee2ba;
color: #0ee2ba;
}
.popfooter {
display: flex;
justify-content: center;
margin-top: 40rpx;
}
.btn {
background: linear-gradient(90deg, #0ee2ba, #67f7dc);
border-radius: 36rpx 36rpx 36rpx 36rpx;
height: 72rpx;
width: 347rpx;
font-weight: 300;
font-size: 26rpx;
line-height: 72rpx;
text-align: center;
position: relative;
color: #fff;
}
.btnbg {
width: 400rpx;
height: 76rpx;
position: absolute;
bottom: -36rpx;
left: -27rpx;
}
</style>

@ -16,7 +16,7 @@
</view>
<view class="boxItem">
<view class="boxItembox">
<view class="boxItemboxItem ">
<view class="boxItemboxItem">
<view>
<text class="htitle">找住院护工</text>
<text>平台保证</text>
@ -41,6 +41,24 @@
平台已服务<text>{{orderTotalCount}}</text>
</view>
</view>
<view class="news">
<view class="newsHeader">
<image style="width: 126rpx;
height: 31rpx;" src="../../static/resource/imgs/zhishititle.png"></image>
</view>
<view class="newsContent">
<view class="newsItem" v-for="(item,index) of news" :key="index">
<view class="newsImg">
<image style="width: 219rpx;height: 152rpx;width: 219rpx;
height: 152rpx;" :src="item.poster"></image>
</view>
<view class="newsTitle">
<text>{{item.title}}</text>
<text style="text-align: right;font-size: 24rpx;color: #F7723F;">{{item.published_at}}</text>
</view>
</view>
</view>
</view>
<tabbar :current-page="0"></tabbar>
<u-popup mode="center" v-model="showHospital" width="90%" closeable="true" border-radius="14">
<view class="popbox">
@ -67,12 +85,6 @@
</view>
</view>
</u-popup>
<view class="news">
<view class="newsHeader">
</view>
<view class="newsContent">
</view>
</view>
</view>
</template>
@ -120,8 +132,8 @@
onShareAppMessage() {},
onLoad(options) {
var that = this;
if(options.from=="selectHospital"){
that.showHospital=true;
if (options.from == "selectHospital") {
that.showHospital = true;
}
uni.getLocation({
type: 'wgs84',
@ -149,13 +161,13 @@
key: 'RA6BZ-4YLLR-HMZW4-WFR5N-6H6XQ-R6FVL'
});
var a = that.listAddr;
var list=[];
for(var b of a){
var list = [];
for (var b of a) {
list.push({
latitude: parseFloat(b.latitude),
longitude: parseFloat(b.longitude)
})
}
var lat = that.latitude;
var lon = that.longitude;
@ -168,14 +180,14 @@
success: function(t) {
t = t.result;
for (var e = 0; e < t.elements.length; e++) {
that.listAddr[e].distance = t.elements[e].distance / 1000;
that.listAddr[e].distance = t.elements[e].distance / 1000;
var n = that.listAddr[e];
if (n.distance < that.currentProject.distance) {
that.currentProject = n;
getApp().globalData.selectedProject = that.currentProject;
}
}
},
fail: function(t) {
console.error(t);
@ -198,7 +210,7 @@
api: 'customer/get-projects',
utilSuccess: function(t) {
var o = getApp().globalData.selectedProject;
that.currentProject=t[0]
that.currentProject = t[0]
that.listAddr = t;
that.getGeoCoder();
},
@ -220,6 +232,9 @@
util.request({
api: 'customer/get-training-videos',
utilSuccess: function(e) {
for (var m of e.data) {
m.poster = util.HOST + m.poster;
}
that.news = e.data
that.loading = false
},
@ -247,6 +262,11 @@
</script>
<style scoped>
.container {
background-color: rgb(231, 245, 244) !important;
padding-bottom: 200rpx;
}
view {
box-sizing: border-box;
@ -418,10 +438,28 @@
}
.news {
padding: 20rpx;
width: 100%;
min-height: 80rpx;
padding: 33rpx 37rpx;
width: 690rpx;
background: #FFFFFF;
border-radius: 8rpx 8rpx 8rpx 8rpx;
margin: 50rpx auto;
}
.newsItem {
display: flex;
margin-top: 35rpx;
}
.newsTitle {
margin-left: 32rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
padding: 4rpx;
font-weight: 300;
font-size: 26rpx;
color: #303233;
line-height: 38rpx;
width: 100%;
}
</style>
Loading…
Cancel
Save