xinelu-doctor-app/pages/taskReturn/taskReturn.vue

238 lines
4.8 KiB
Vue
Raw Normal View History

2023-10-24 15:45:24 +08:00
<template>
<view class="app">
<view class="top">
<view class="title">
<view class="text">
2023-10-25 11:32:27 +08:00
专家咨询{{tasklist.patientName}}
2023-10-24 15:45:24 +08:00
</view>
<view class="righttext">
2023-11-14 14:57:28 +08:00
<span v-if="tasklist.totalPrice&&tasklist.totalPrice>=0">
{{tasklist.totalPrice}}
2023-10-24 15:45:24 +08:00
</span>
<span v-else>
2023-10-25 11:32:27 +08:00
0
</span>
2023-10-24 15:45:24 +08:00
</view>
</view>
<view class="content">
<view class="time" style="line-height: 60rpx;padding-top: 15rpx;">
2023-10-25 11:32:27 +08:00
时间{{tasklist.appointmentDate}}{{' '+tasklist.appointmentStartTime}}{{'-'+tasklist.appointmentEndTime}}
2023-10-24 15:45:24 +08:00
</view>
<view class="time">
2023-10-25 11:32:27 +08:00
地点{{tasklist.address}}
2023-10-24 15:45:24 +08:00
</view>
</view>
</view>
<view class="bottom">
<view class="title">
<view class="text">
拒绝原因多选
</view>
</view>
<view class="checkboxs">
<u-checkbox-group @change="checkboxGroupChange" :wrap='true'>
2023-10-25 11:32:27 +08:00
<u-checkbox active-color="#18CBB3" @change="checkboxChange" v-model="item.checked"
v-for="(item, index) in list" :key="index" :name="item.name"
shape='circle'>{{item.name}}</u-checkbox>
2023-10-24 15:45:24 +08:00
</u-checkbox-group>
</view>
2023-10-24 16:13:53 +08:00
<u-input v-model="value" type="text" :border="true" border-color='#E6E6E6' placeholder='请输入退回原因'
2023-10-25 11:32:27 +08:00
:clearable='false' v-if="list[4].checked" />
2023-10-24 15:45:24 +08:00
</view>
2023-10-25 11:32:27 +08:00
<view class="btn" @tap='truetaskReturn'>
2023-10-24 15:45:24 +08:00
立即提交
</view>
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
2023-10-25 11:32:27 +08:00
closeHealthConsultationOrder,
} from '@/api/homepage/index.js'
2023-10-24 15:45:24 +08:00
import {
orderFallback
} from '@/api/taskReturn/taskReturn.js'
export default {
data() {
return {
tasklist: null, //传值item
taskReturnReason: '',
value: null, //input绑定
list: [{
name: '与其他工单时间冲突',
checked: false,
}, {
name: '服务要求较高,当前资质无法完成',
checked: false,
}, {
2023-10-25 11:32:27 +08:00
name: '距离较远,无法到达',
2023-10-24 15:45:24 +08:00
checked: false,
}, {
name: '价格不合理',
checked: false,
}, {
name: '其它',
checked: false,
2023-11-14 15:38:18 +08:00
}],
requestStatus: false,
2023-10-24 15:45:24 +08:00
}
},
methods: {
2023-10-25 11:32:27 +08:00
truetaskReturn() {
2023-11-14 15:38:18 +08:00
if (this.requestStatus) {
// 利用 return 终止函数继续运行
return;
2023-10-25 11:32:27 +08:00
}
2023-11-14 15:38:18 +08:00
this.requestStatus = true;
setTimeout(() => {
if (this.list[4].checked && this.value) {
this.taskReturnReason += this.value + ';'
}
var obj = {
orderNo: this.tasklist.orderNo,
remark: this.taskReturnReason,
2023-10-25 11:32:27 +08:00
}
2023-11-14 15:38:18 +08:00
closeHealthConsultationOrder(obj).then(res => {
if (res.code == 200) {
this.requestStatus = false;
this.$refs.uToast.show({
title: '工单退回成功',
type: 'success',
duration: '1500',
back: 1
})
}
})
}, 1600);
2023-10-25 11:32:27 +08:00
},
2023-10-24 15:45:24 +08:00
// 选中某个复选框时由checkbox时触发
checkboxChange(e) {},
// 选中任一checkbox时由checkbox-group触发
2023-10-25 11:32:27 +08:00
checkboxGroupChange(e) {
this.taskReturnReason = ''
e.forEach(el => {
if (el != '其它') {
this.taskReturnReason += el + ';'
}
})
},
},
onLoad(options) {
this.tasklist = JSON.parse(options.item)
2023-10-24 15:45:24 +08:00
},
}
</script>
<style lang="scss">
::v-deep .u-input {
border: 1rpx solid #E6E6E6;
width: 85%;
display: block;
margin: 20rpx auto;
2023-10-24 16:13:53 +08:00
background: #F2F2F4;
2023-10-24 15:45:24 +08:00
}
::v-deep .u-checkbox {
height: 80rpx !important;
}
2023-10-25 11:32:27 +08:00
::v-deep .u-checkbox__label {
2023-10-24 15:45:24 +08:00
font-size: 24rpx !important;
font-family: SourceHanSansSC-Medium, SourceHanSansSC;
font-weight: 500 !important;
color: #333333 !important;
2023-10-25 11:32:27 +08:00
2023-10-24 15:45:24 +08:00
}
.app {
padding: 0;
.btn {
width: 496rpx;
height: 70rpx;
background: #18CBB3;
border-radius: 50rpx;
2023-10-25 11:32:27 +08:00
2023-10-24 15:45:24 +08:00
text-align: center;
line-height: 70rpx;
color: #fff;
2023-10-24 15:54:38 +08:00
position: fixed;
2023-10-25 11:32:27 +08:00
bottom: 60rpx;
left: 50%;
transform: translateX(-50%);
2023-10-24 15:45:24 +08:00
}
.checkboxs {
padding-left: 50rpx;
}
.bottom {
padding-bottom: 40rpx;
}
.bottom,
.top {
background-color: #fff;
width: 96%;
margin: 30rpx auto 0;
color: #333333;
border-radius: 14rpx;
2023-10-25 11:32:27 +08:00
2023-10-24 15:45:24 +08:00
}
.top {
// padding-bottom: 40rpx;
.content {
padding: 0 50rpx;
font-size: 30rpx;
.time {
line-height: 90rpx;
2023-10-25 11:32:27 +08:00
2023-10-24 15:45:24 +08:00
font-size: 24rpx;
font-family: SourceHanSansSC-Medium, SourceHanSansSC;
font-weight: 500;
color: #333333;
}
.address {}
}
}
.title {
border-bottom: 1rpx solid #E6E6E6;
display: flex;
height: 100rpx;
line-height: 100rpx;
2023-10-24 15:54:38 +08:00
width: 96%;
2023-10-24 15:45:24 +08:00
position: relative;
2023-10-24 15:54:38 +08:00
left: 50%;
transform: translateX(-50%);
2023-10-24 15:45:24 +08:00
.righttext {
position: absolute;
right: 20rpx;
top: 50%;
transform: translateY(-50%);
font-size: 38rpx;
font-family: Adobe Heiti Std;
color: #EE2B2B;
}
.text {
line-height: 100rpx;
2023-10-24 15:54:38 +08:00
padding-left: 34rpx;
2023-10-25 11:32:27 +08:00
2023-10-24 15:45:24 +08:00
font-size: 32rpx;
font-family: SourceHanSansSC-Medium, SourceHanSansSC;
font-weight: 500;
color: #333333;
}
}
}
</style>