master
xy 3 years ago
parent 2775d6b1f6
commit 113d0a55fb

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

@ -1,7 +1,7 @@
<template> <template>
<view> <view>
<u-popup v-model="isShowIng" height="60%" mode="bottom" border-radius="14" closeable > <u-popup v-model="isShowIng" height="60%" mode="bottom" border-radius="14" closeable>
<view class="nursing-list"> <view class="nursing-list">
<view v-if="nursingList && nursingList.length > 0"> <view v-if="nursingList && nursingList.length > 0">
<view v-for="(item,index) in nursingList" :key="index" class="list-item"> <view v-for="(item,index) in nursingList" :key="index" class="list-item">
@ -70,15 +70,15 @@
<script> <script>
export default { export default {
name:"doingOrder", name: "doingOrder",
data() { data() {
return { return {
isShowIng:false, isShowIng: false,
nursingList:[], nursingList: [],
ing:0, ing: 0,
}; };
}, },
methods:{ methods: {
toThere(item) { toThere(item) {
this.$u.throttle(() => { this.$u.throttle(() => {
uni.openLocation({ uni.openLocation({
@ -102,17 +102,17 @@
}, },
async getIngList() { async getIngList() {
let res = await this.$u.api.nurseList({ let res = await this.$u.api.nurseList({
page:1, page: 1,
page_size:999, page_size: 999,
status:1 status: 1
}) })
this.nursingList = res.data this.nursingList = res.data
} }
}, },
async created() { async created() {
console.log("onShow","doorder") console.log("onShow", "doorder")
await this.getStatistic(); await this.getStatistic();
if(this.ing > 0){ if (this.ing > 0) {
await this.getIngList() await this.getIngList()
this.isShowIng = true this.isShowIng = true
} }
@ -318,5 +318,4 @@
} }
} }
} }
</style> </style>

@ -14,7 +14,7 @@
<view class="content__btn"> <view class="content__btn">
<u-button :custom-style="btnStyle1" shape="circle" type="error" <u-button :custom-style="btnStyle1" shape="circle" type="error"
@click="$emit('update:isShow',false),clearList()">取消</u-button> @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>
</view> </view>
</u-mask> </u-mask>

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

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

Loading…
Cancel
Save