master
xy 3 years ago
parent 2775d6b1f6
commit 113d0a55fb

@ -58,7 +58,8 @@ const install = (Vue, vm) => {
uni.showToast({
icon: "none",
title: res.data.errmsg
})
})
return false
}
} else
return res.data;

@ -1,84 +1,84 @@
<template>
<view>
<u-popup v-model="isShowIng" height="60%" mode="bottom" border-radius="14" closeable >
<view class="nursing-list">
<view v-if="nursingList && nursingList.length > 0">
<view v-for="(item,index) in nursingList" :key="index" class="list-item">
<view class="top">
<view class="time">{{item.start_time}}</view>
<view class="status">
<view class="status-icon"
:class="{icon1:item.status === 0,icon2:item.status === 2,icon3:item.status === 1}">
</view>
<view v-if="item.status === 1" class="status-text"></view>
<view v-else-if="item.status === 0" class="status-text">待护理</view>
<view v-else class="status-text">已护理</view>
</view>
</view>
<view class="line"></view>
<view class="center" @click="toDetail(item)">
<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-pop">
<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>
<u-popup v-model="isShowIng" height="60%" mode="bottom" border-radius="14" closeable>
<view class="nursing-list">
<view v-if="nursingList && nursingList.length > 0">
<view v-for="(item,index) in nursingList" :key="index" class="list-item">
<view class="top">
<view class="time">{{item.start_time}}</view>
<view class="status">
<view class="status-icon"
:class="{icon1:item.status === 0,icon2:item.status === 2,icon3:item.status === 1}">
</view>
<view v-if="item.status === 1" class="status-text"></view>
<view v-else-if="item.status === 0" class="status-text">待护理</view>
<view v-else class="status-text">已护理</view>
</view>
</view>
<view class="line"></view>
<view class="center" @click="toDetail(item)">
<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-pop">
<view class="name">{{item.customer.name}}</view>
<view class="tel">
<view>
<u-icon name="phone" size="28" color="#1479FF"></u-icon>
</view>
<view class="bottom">
<view class="to-there" @click="toThere(item)">
<view class="to-there-text">去那里</view>
<view class="to-there-icon">
<u-image src="/static/todayNursing/to-there.png" height="46" width="46"></u-image>
</view>
</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 v-else>
<u-empty mode="list" text="暂无护理"></u-empty>
</view>
<view class="bottom">
<view class="to-there" @click="toThere(item)">
<view class="to-there-text">去那里</view>
<view class="to-there-icon">
<u-image src="/static/todayNursing/to-there.png" height="46" width="46"></u-image>
</view>
</view>
</view>
</u-popup>
</view>
</view>
<view v-else>
<u-empty mode="list" text="暂无护理"></u-empty>
</view>
</view>
</u-popup>
</view>
</view>
</template>
<script>
export default {
name:"doingOrder",
name: "doingOrder",
data() {
return {
isShowIng:false,
nursingList:[],
ing:0,
isShowIng: false,
nursingList: [],
ing: 0,
};
},
methods:{
methods: {
toThere(item) {
this.$u.throttle(() => {
uni.openLocation({
@ -102,17 +102,17 @@
},
async getIngList() {
let res = await this.$u.api.nurseList({
page:1,
page_size:999,
status:1
page: 1,
page_size: 999,
status: 1
})
this.nursingList = res.data
}
},
async created() {
console.log("onShow","doorder")
console.log("onShow", "doorder")
await this.getStatistic();
if(this.ing > 0){
if (this.ing > 0) {
await this.getIngList()
this.isShowIng = true
}
@ -120,25 +120,25 @@
}
</script>
<style scoped lang="scss">
<style scoped lang="scss">
.nursing-list {
margin-top: 88rpx;
.list-item {
width: 710rpx;
background: #FFFFFF;
filter: drop-shadow(0 0 10px rgba(219, 218, 218, 0.5));
margin: 0 20rpx 26rpx 22rpx;
.top {
display: flex;
justify-content: space-between;
align-items: center;
padding: 22rpx 0;
.time {
height: 40rpx;
font-size: 40rpx;
@ -146,19 +146,19 @@
font-weight: 500;
color: #36596A;
line-height: 40rpx;
padding-left: 20rpx;
}
.status {
display: flex;
align-items: center;
.status-icon {
margin-right: 10rpx;
}
.status-text {
width: 84rpx;
height: 40rpx;
@ -167,37 +167,37 @@
font-weight: 500;
color: #36596A;
line-height: 40rpx;
margin-right: 20rpx;
}
}
}
.line {
width: 670rpx;
height: 2rpx;
border: 2rpx solid #EEEFF5;
margin: 0 auto;
}
.center {
display: flex;
justify-content: space-between;
padding-top: 24rpx;
.avatar {
padding-top: 4rpx;
padding-left: 20rpx;
}
.user-info-pop {
flex: 1;
padding-left: 24rpx;
.name {
width: 270rpx;
height: 48rpx;
@ -206,7 +206,7 @@
font-weight: 500;
color: #333333;
}
.tel {
height: 40rpx;
font-size: 28rpx;
@ -215,15 +215,15 @@
color: #36596A;
line-height: 40rpx;
display: flex;
margin-top: 18rpx;
.text {
margin-left: 10rpx;
}
}
.address {
font-size: 28rpx;
font-family: PingFang-SC-Medium, PingFang-SC;
@ -231,16 +231,16 @@
color: #36596A;
line-height: 40rpx;
display: flex;
margin-top: 14rpx;
.text {
margin-left: 10rpx;
}
}
}
.sex {
width: 40rpx;
height: 40rpx;
@ -249,9 +249,9 @@
display: flex;
justify-content: center;
align-items: center;
margin-right: 20rpx;
.sex-text {
width: 28rpx;
height: 34rpx;
@ -263,24 +263,24 @@
}
}
}
.bottom {
display: flex;
justify-content: flex-end;
align-items: center;
margin-top: 16rpx;
padding-bottom: 26rpx;
.distance {
align-items: center;
display: flex;
.distance-icon {
padding-left: 20rpx;
}
.distance-text {
height: 34rpx;
font-size: 24rpx;
@ -288,17 +288,17 @@
font-weight: 500;
color: #A7AFBC;
line-height: 34rpx;
padding-left: 20rpx;
}
}
.to-there {
display: flex;
align-items: center;
margin-right: 20rpx;
.to-there-text {
height: 34rpx;
font-size: 24rpx;
@ -306,17 +306,16 @@
font-weight: 500;
color: #A7AFBC;
line-height: 34rpx;
margin-right: 14rpx;
}
.to-there-icon {
margin-left: 3rpx;
}
}
}
}
}
</style>
</style>

@ -14,7 +14,7 @@
<view class="content__btn">
<u-button :custom-style="btnStyle1" shape="circle" type="error"
@click="$emit('update:isShow',false),clearList()">取消</u-button>
<u-button :throttle-time="3000" :custom-style="btnStyle2" shape="circle" type="primary" @click.stop="submit">确认</u-button>
<u-button :throttle-time="2000" :custom-style="btnStyle2" shape="circle" type="primary" @click.stop="submit">确认</u-button>
</view>
</view>
</u-mask>

@ -387,7 +387,7 @@
}
})
this.form.type = type
this.$u.api.processSave(this.form).then(res => {
this.$u.api.processSave(this.form).then(res1 => {
uni.showToast({
icon: 'success',
title
@ -395,16 +395,11 @@
this.$refs['imgUpload'].clearList()
this.isShowImg = false
this.getDeatil(this.id)
}).catch(err => {
uni.showToast({
title: '操作失败,请重试',
icon: "none"
})
})
}).catch(err => {
uni.showToast({
icon: 'none',
title: '图片上传失败'
if(res1.tip){
this.tips = "用户服务次数已达到次数、总服务时长未满"
this.isShowModal = true
}
})
})
},
@ -502,7 +497,7 @@
}
}
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.signOut()
uni.showToast({
@ -510,7 +505,7 @@
title:'请下次补足时间',
duration:2000
})
} else if (useTotalTime >= totalTime && useTotalTime <= (totalTime + 10)){
} else if (useTotalTime <= totalTime){
this.signOut()
} else {
this.tips="当前勾选的时间为"+useTotalTime+"分钟,实际服务时间为"+totalTime+"分钟。系统要求实际服务时间要大于您勾选的时间。";

@ -191,12 +191,12 @@
todayHour: {
title: "今日服务工时",
value: 0,
unit: "小时"
unit: "分钟"
},
monthHour: {
title: "本月服务工时",
value: 0,
unit: "小时"
unit: "分钟"
},
},
status: {

Loading…
Cancel
Save