xy 2 years ago
parent 543b43e7e6
commit c197ec9b30

@ -3,7 +3,8 @@
"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue",
"^cpn-(.*)": "@/components/cpn-$1.vue"
},
"pages": [{
"pages": [
{
"path": "pages/enter/enter",
"style": {
"navigationStyle": "custom"
@ -64,7 +65,8 @@
"navigationBarTitleText": "头像裁剪",
"navigationBarBackgroundColor": "#000000"
}
}, {
},
{
"path": "pages/showimg/showimg",
"style": {
"navigationBarTextStyle": "white",
@ -73,17 +75,33 @@
"animationDuration": 300
}
}
}
],
"subPackages": [{
"root": "package_sub",
"pages": [{
"path": "pages/index/index",
},
{
"path": "pages/order/order",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/order/addOrder",
"style": {
"navigationBarTitleText": "分包页面sub_index"
"navigationStyle": "custom"
}
}]
}],
}
],
"subPackages": [
{
"root": "package_sub",
"pages": [
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "分包页面sub_index"
}
}
]
}
],
"globalStyle": {
"navigationBarTextStyle": "white",
"navigationBarTitleText": "uni-app",
@ -93,7 +111,8 @@
"tabBar": {
"color": "#ABAEBE",
"selectedColor": "#1479FF",
"list": [{
"list": [
{
"iconPath": "/static/tabbar/notification.png",
"selectedIconPath": "/static/tabbar/notification-active.png",
"pagePath": "pages/todayNursing/todayNursing",
@ -111,13 +130,18 @@
"pagePath": "pages/list/list",
"text": "护理列表"
},
{
"iconPath": "/static/tabbar/order.png",
"selectedIconPath": "/static/tabbar/order-active.png",
"pagePath": "pages/order/order",
"text": "预约护理"
},
{
"iconPath": "/static/tabbar/home.png",
"selectedIconPath": "/static/tabbar/home-active.png",
"pagePath": "pages/home/home",
"text": "我的"
}
]
}
}
}

@ -69,21 +69,23 @@
<view>实际时长</view>
</view>
<view class="content">
<view class="content-item" v-for="(item,index) in skuList" :key='item.info.id'>
<u-checkbox class="checkbox" label-size="34" size="36" :disabled="detail.status === 2"
v-model="item.isSelect" shape="square" :name="item.form.name"
@change="selectPick($event,item)">
{{item.info.name}}
</u-checkbox>
<view class="input">
<u-input :disabled="detail.status === 2 || !item.isSelect" v-model="item.form.time"
:custom-style="inputStyle" :placeholder="'需 '+ item.info.time_lenth"
placeholder-style="color:#A7AFBC;font-size:28rpx;" input-align="center"
:clearable="false" type="number" height="46">
</u-input>
<view style="font-size: 34rpx;">分钟</view>
</view>
</view>
<u-checkbox-group :max="(detail.product.demand === 1) ? 1 : 999">
<view class="content-item" v-for="(item,index) in skuList" :key='item.info.id'>
<u-checkbox class="checkbox" label-size="34" size="36" :disabled="detail.status === 2"
v-model="item.isSelect" shape="square" :name="item.form.name"
@change="selectPick($event,item)">
{{item.info.name}}
</u-checkbox>
<view class="input">
<u-input :disabled="detail.status === 2 || !item.isSelect || (detail.product.demand === 1)" v-model="item.form.time"
:custom-style="inputStyle" :placeholder="'需 '+ item.info.time_lenth"
placeholder-style="color:#A7AFBC;font-size:28rpx;" input-align="center"
:clearable="false" type="number" height="46">
</u-input>
<view style="font-size: 34rpx;">分钟</view>
</view>
</view>
</u-checkbox-group>
</view>
</view>
@ -100,7 +102,7 @@
</view>
<view class="btn" v-if="detail.status === 1" @click="$u.throttle(checkSignOut,5000)">
<view class="text1">签退</view>
<view class="text2">{{dateFormat(time,'HH:mm:ss')}}</view>
<view class="text2">{{serviceTime}}</view>
</view>
<view class="btn" v-if="detail.status === 0 && !flag" @click="$u.throttle(refreshLoaction,3000)">
<view class="text1">更新定位</view>
@ -205,6 +207,9 @@
detail: {},
time: new Date(),
timer: null,
serviceTimer: null,//
serviceTimeFlag: 0,
}
},
methods: {
@ -249,6 +254,14 @@
}
})
this.form.schedule_list_id = this.id
if (res.status === 1) {
this.serviceTimer = setInterval(() => {
this.serviceTimeFlag++;
},1000)
}
if (res.status === 3) {
clearInterval(this.serviceTimer)
}
console.log(this.skuList);
},
@ -395,7 +408,7 @@
this.$refs['imgUpload'].clearList()
this.isShowImg = false
this.getDeatil(this.id)
if(res1.tip){
this.tips = "用户服务次数已达到次数、总服务时长未满"
this.isShowModal = true
@ -449,7 +462,7 @@
// })
// return
// }
// this.saveSku().then(res => {
// this.type = 2
// this.isShowImg = true
@ -497,9 +510,9 @@
}
}
let totalTime = this.$moment(new Date()).diff(this.$moment(this.detail.sign_in), 'minutes')
if (useTotalTime <= (totalTime + 10) && useTotalTime > totalTime) {
if (useTotalTime <= (totalTime + 10) && useTotalTime > totalTime && this.detail.demand === 2) {
this.signOut()
uni.showToast({
icon:'none',
title:'请下次补足时间',
@ -546,6 +559,20 @@
}
}
},
serviceTime () {
let flag = this.serviceTimeFlag;
let totalSec = 0;
if (this.detail.sign_out) {
totalSec = moment(this.detail.sign_out).diff(moment(this.detail.sign_in),"seconds")
} else {
totalSec = moment().diff(moment(this.detail.sign_in),"seconds")
}
let sec = totalSec % 60
let min = ((totalSec - sec) / 60) % 60
let hour = (totalSec - sec - (min * 60)) / 60 / 60
return `${hour > 0 ? (hour + '时') : ''}${min > 0 ? (min + '分') : ''}${sec}`
},
typeFormat() {
return function(type) {
let map = new Map([
@ -867,6 +894,7 @@
}
.text2 {
font-size: 30rpx;
@extend .text-class;
}
}

@ -0,0 +1,213 @@
<template>
<view>
<cpn-navbar title="预约护理" :is-back="true"></cpn-navbar>
<view>
<!-- 用户信息 -->
<!-- <view class="user-info" v-if="detail.customer">-->
<!-- <view class="top">-->
<!-- <view class="left">-->
<!-- <u-image :src="detail.customer.sex === '男' ? vuex_male_img : vuex_female_img" width="104"-->
<!-- height="104" shape="circle"></u-image>-->
<!-- </view>-->
<!-- <view class="center">-->
<!-- <view class="name">{{detail.customer.name}}</view>-->
<!-- <view class="infos">-->
<!-- <view class="age">{{ageComputed(detail.customer.idcard)}}-->
<!-- </view>-->
<!-- <view class="sex">{{detail.customer.sex}}</view>-->
<!-- <view class="organ">机构护理</view>-->
<!-- </view>-->
<!-- </view>-->
<!-- <view class="right">-->
<!-- <template v-if="detail.status === 0">-->
<!-- <view class="icon1"></view>-->
<!-- <view>待护理</view>-->
<!-- </template>-->
<!-- <template v-if="detail.status === 1">-->
<!-- <view class="icon3"></view>-->
<!-- <view>护理中</view>-->
<!-- </template>-->
<!-- <template v-if="detail.status === 2">-->
<!-- <view class="icon2"></view>-->
<!-- <view>已护理</view>-->
<!-- </template>-->
<!-- </view>-->
<!-- </view>-->
<!-- <view class="line"></view>-->
<!-- <view class="bottom">-->
<!-- <view class="client">-->
<!-- <u-icon name="/static/detail/people.png" width="26" height="26"></u-icon>-->
<!-- <view>委托人{{detail.customer.contact_name}}</view>-->
<!-- </view>-->
<!-- <view class="address">-->
<!-- <u-icon name="map" width="28" height="28" color="#1479FF"></u-icon>-->
<!-- <view>{{ addressFormat(detail.customer.customer_address) }}</view>-->
<!-- </view>-->
<!-- <view class="phone">-->
<!-- <u-icon name="phone" width="28" height="28" color="#1479FF"></u-icon>-->
<!-- <view>{{detail.customer.phone}}</view>-->
<!-- </view>-->
<!-- </view>-->
<!-- </view>-->
</view>
</view>
</template>
<script>
export default {
data() {
return {};
}
}
</script>
<style lang="scss">
.user-info {
width: 710rpx;
background: #FFFFFF;
box-shadow: 0rpx 4rpx 10rpx 0rpx rgba(219, 218, 218, 0.5);
margin: 40rpx auto 0 auto;
position: relative;
.top {
display: flex;
justify-content: space-between;
align-items: flex-start;
padding-top: 34rpx;
padding-bottom: 30rpx;
.left {
padding-left: 20rpx;
}
.center {
flex: 1;
padding-left: 24rpx;
.name {
height: 48rpx;
font-size: 32rpx;
font-weight: 500;
color: #333333;
line-height: 24rpx;
}
.infos {
display: flex;
align-items: center;
padding-top: 20rpx;
.age {
height: 34rpx;
font-size: 24rpx;
font-weight: 500;
color: #A7AFBC;
line-height: 34rpx;
}
.sex {
width: 40rpx;
height: 40rpx;
background: #FDECEC;
opacity: 0.5;
font-size: 28rpx;
font-weight: 500;
color: #36596A;
text-align: center;
line-height: 40rpx;
margin-left: 20rpx;
}
.organ {
width: 140rpx;
height: 40rpx;
background: #F9F9F9;
font-size: 28rpx;
font-weight: 500;
color: #36596A;
line-height: 40rpx;
text-align: center;
margin-left: 20rpx;
}
}
}
.right {
display: flex;
align-items: center;
padding-right: 20rpx;
}
}
.line {
width: 670rpx;
height: 2rpx;
border: 2rpx solid #EEEFF5;
margin: 30rpx auto 0 auto;
}
.bottom {
padding: 26rpx 0 34rpx 24rpx;
position: relative;
.bottom-item {
display: flex;
align-items: center;
font-size: 28rpx;
font-weight: 500;
color: #36596A;
&>view {
padding-left: 16rpx;
}
}
.client {
@extend .bottom-item;
}
.address {
@extend .bottom-item;
padding-top: 18rpx;
}
.phone {
@extend .bottom-item;
padding-top: 18rpx;
}
}
.re-location {
display: flex;
align-items: center;
position: absolute;
bottom: 36rpx;
right: 20rpx;
.text {
height: 34rpx;
font-size: 24rpx;
font-weight: 500;
color: #A7AFBC;
line-height: 34rpx;
padding-right: 8rpx;
}
}
}
</style>

@ -0,0 +1,218 @@
<template>
<view>
<cpn-navbar title="预约护理"></cpn-navbar>
<view>
<!-- 搜索 -->
<view class="search">
<view class="input-content">
<u-input :clearable="false" value="" placeholder="请输入要搜索的内容" height="30" :custom-style="inputStyle"
@input=""></u-input>
</view>
<view class="icon">
<u-icon name="search" size="46" color="#ABAEBE"></u-icon>
</view>
</view>
<view class="customer-list">
<view class="customer-list__item" v-for="(item, index) in customers" :key="item.id">
<view class="top">
<view class="avatar">
<u-image :src="item.customer.sex === '男' ? vuex_male_img : vuex_female_img" height="104"
width="104" shape="circle"></u-image>
</view>
<view class="user-info">
<view class="name">{{item.customer.name}}</view>
<view class="tel">
<view>
<u-icon name="phone" size="28" color="#1479FF"></u-icon>
</view>
<view class="text">{{item.customer.phone || '无'}}</view>
</view>
<view class="address">
<view>
<u-icon name="map" size="28" color="#1479FF"></u-icon>
</view>
<view class="text">{{item.customer_address.address || '无'}}</view>
</view>
</view>
<view class="sex">
<view class="sex-text">
{{item.customer.sex || '无'}}
</view>
</view>
</view>
<view class="line"></view>
<view class="bottom" @click="toAddOrder">
<u-icon color="#1479FF" name="bell-fill"></u-icon>
<span>立即预约</span>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
inputStyle: {
width: "600rpx",
fontSize: "28rpx",
fontWeight: "500"
},
customers: [{"id":11395,"no":"202312250933084cac20335","order_id":892,"admin_id":1,"department_id":null,"customer_id":768,"product_id":24,"date":"2023-12-25","start_time":"2023-12-25 09:31:13","end_time":"2023-12-25 11:31:20","nurse_id":90,"status":2,"address_id":1592,"created_at":"2023-12-25 09:33:08","updated_at":"2023-12-25 10:32:08","deleted_at":null,"sign_in":"2023-12-25 09:39:49","sign_in_address":"江苏省苏州市吴中区太湖东路288号长桥苏州市吴中区人民政府(太湖东路北)","sign_in_loc":"31.26249,120.63212","sign_out":"2023-12-25 10:32:08","sign_out_address":"江苏省苏州市吴中区太湖东路288号长桥苏州市吴中区人民政府(太湖东路北)","sign_out_loc":"31.26249,120.63212","is_error":0,"address":"金坛区直溪镇溪滨村村民委员会","month_count":"1","month_time":"0","distance":12878.6,"status_text":"已护理","customer":{"id":768,"name":"叶华","phone":"18861212210","idcard":"320124197907010227","sex":"女","birthday":"1979-07-01","contact_name":"耿志俊","contact_phone":"18861212210","idcard_address":"直溪镇溪滨村村委会大耿庄85","is_dead":0,"remark":null,"level_id":18,"created_at":"2023-11-20 13:58:47","updated_at":"2023-11-20 13:58:47","deleted_at":null,"city_id":"21","area_id":"15","street_id":"27","level_type":34,"status":1},"customer_address":{"id":1592,"name":null,"customer_id":768,"address":"金坛区直溪镇溪滨村村民委员会","comment":null,"lat":"31.868529","lng":"119.454772","created_at":"2023-11-20 13:58:47","updated_at":"2023-11-20 13:58:47","deleted_at":null,"default":1}},{"id":11396,"no":"20231225111421dc2e75816","order_id":891,"admin_id":1,"department_id":null,"customer_id":768,"product_id":17,"date":"2023-12-25","start_time":"2023-12-25 11:14:00","end_time":"2023-12-25 12:14:02","nurse_id":90,"status":2,"address_id":1592,"created_at":"2023-12-25 11:14:21","updated_at":"2023-12-25 11:19:02","deleted_at":null,"sign_in":"2023-12-25 11:14:51","sign_in_address":"江苏省苏州市吴中区太湖东路288号长桥苏州市吴中区人民政府(太湖东路北)","sign_in_loc":"31.26249,120.63212","sign_out":"2023-12-25 11:19:01","sign_out_address":"江苏省苏州市吴中区太湖东路288号长桥苏州市吴中区人民政府(太湖东路北)","sign_out_loc":"31.26249,120.63212","is_error":0,"address":"金坛区直溪镇溪滨村村民委员会","month_count":"1","month_time":"0","distance":12878.6,"status_text":"已护理","customer":{"id":768,"name":"叶华","phone":"18861212210","idcard":"320124197907010227","sex":"女","birthday":"1979-07-01","contact_name":"耿志俊","contact_phone":"18861212210","idcard_address":"直溪镇溪滨村村委会大耿庄85","is_dead":0,"remark":null,"level_id":18,"created_at":"2023-11-20 13:58:47","updated_at":"2023-11-20 13:58:47","deleted_at":null,"city_id":"21","area_id":"15","street_id":"27","level_type":34,"status":1},"customer_address":{"id":1592,"name":null,"customer_id":768,"address":"金坛区直溪镇溪滨村村民委员会","comment":null,"lat":"31.868529","lng":"119.454772","created_at":"2023-11-20 13:58:47","updated_at":"2023-11-20 13:58:47","deleted_at":null,"default":1}},{"id":11397,"no":"20231225112026a43896149","order_id":893,"admin_id":1,"department_id":null,"customer_id":767,"product_id":24,"date":"2023-12-25","start_time":"2023-12-25 11:20:19","end_time":"2023-12-25 12:20:20","nurse_id":90,"status":1,"address_id":1591,"created_at":"2023-12-25 11:20:26","updated_at":"2023-12-25 11:20:44","deleted_at":null,"sign_in":"2023-12-25 11:20:44","sign_in_address":"江苏省苏州市吴中区太湖东路288号长桥苏州市吴中区人民政府(太湖东路北)","sign_in_loc":"31.26249,120.63212","sign_out":null,"sign_out_address":null,"sign_out_loc":null,"is_error":0,"address":"直溪镇新河村退役军人服务站","month_count":null,"month_time":null,"distance":12878.6,"status_text":"护理中","customer":{"id":767,"name":"吴浩","phone":"13813519467","idcard":"320482199412044619","sex":"男","birthday":"1994-12-04","contact_name":"吴冬兆","contact_phone":"13813519467","idcard_address":"直溪镇新河村村委会上新河村8号","is_dead":0,"remark":null,"level_id":19,"created_at":"2023-11-20 13:51:25","updated_at":"2023-11-20 13:51:25","deleted_at":null,"city_id":"21","area_id":"15","street_id":"27","level_type":35,"status":1},"customer_address":{"id":1591,"name":null,"customer_id":767,"address":"直溪镇新河村退役军人服务站","comment":null,"lat":"31.836242","lng":"119.508225","created_at":"2023-11-20 13:51:25","updated_at":"2023-11-20 13:51:25","deleted_at":null,"default":1}}]
};
},
methods: {
toAddOrder () {
uni.$u.throttle(() => {
uni.navigateTo({
url: `/pages/order/addOrder`
})
})
}
}
}
</script>
<style lang="scss">
.search {
width: 710rpx;
height: 70rpx;
background: #FFFFFF;
border: 2rpx solid #FAFBFC;
display: flex;
align-items: center;
justify-content: space-between;
margin: 24rpx 24rpx 0 24rpx;
.input-content {
margin-left: 30rpx;
}
.icon {
margin-right: 30rpx;
}
}
.customer-list {
margin-top: 26rpx;
&__item {
width: 710rpx;
background: #FFFFFF;
box-shadow: 0rpx 4rpx 10rpx 0rpx rgba(219, 218, 218, 0.5);
padding: 24rpx 0;
margin: 0 20rpx 26rpx 22rpx;
.top {
display: flex;
justify-content: space-between;
padding-bottom: 24rpx;
.avatar {
padding-top: 4rpx;
padding-left: 20rpx;
}
.user-info {
flex: 1;
padding-left: 24rpx;
.name {
width: 270rpx;
height: 48rpx;
font-size: 32rpx;
font-weight: 500;
color: #333333;
}
.tel {
height: 40rpx;
font-size: 28rpx;
font-weight: 500;
color: #36596A;
line-height: 40rpx;
display: flex;
margin-top: 18rpx;
.text {
margin-left: 10rpx;
}
}
.address {
font-size: 28rpx;
font-weight: 500;
color: #36596A;
line-height: 40rpx;
display: flex;
margin-top: 14rpx;
.text {
margin-left: 10rpx;
}
}
}
.sex {
width: 40rpx;
height: 40rpx;
background: #FDECEC;
opacity: 0.5;
display: flex;
justify-content: center;
align-items: center;
margin-right: 20rpx;
.sex-text {
width: 28rpx;
height: 34rpx;
font-size: 28rpx;
font-weight: 500;
color: #36596A;
line-height: 34rpx;
}
}
}
.line {
width: 670rpx;
height: 2rpx;
border: 2rpx solid #EEEFF5;
margin: 0 auto;
}
.bottom {
display: flex;
justify-content: center;
font-size: 32rpx;
color: #1479FF;
padding-top: 24rpx;
& > span {
letter-spacing: 2rpx;
padding: 0 10rpx;
}
}
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Loading…
Cancel
Save