Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
shidongli 2023-10-25 16:01:20 +08:00
commit f4d49a9708
7 changed files with 240 additions and 490 deletions

View File

@ -3,87 +3,70 @@
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue" "^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
}, },
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{ {
"path": "pages/login/login", "path": "pages/login/login",
"style": { "style": {
"navigationBarTitleText": "", "enablePullDownRefresh": false,
"enablePullDownRefresh": false, "navigationStyle": "custom"
"navigationStyle": "custom" }
} }, {
},{ "path": "pages/taskReturn/taskReturn",
"path" : "pages/taskReturn/taskReturn", "style": {
"style" : "navigationBarTitleText": "退回原因",
{ "enablePullDownRefresh": false
"navigationBarTitleText": "退回原因", }
"enablePullDownRefresh": false },
} {
"path": "pages/Changepassword/Changepassword",
}, "style": {
{ "navigationBarTitleText": "修改密码",
"path" : "pages/Completedwork/Completedwork", "enablePullDownRefresh": false
"style" : }
{ },
"navigationBarTitleText": "已完成工单", {
"enablePullDownRefresh": false "path": "pages/Modifyphonenumber/Modifyphonenumber",
} "style": {
"navigationBarTitleText": "修改手机号",
}, "enablePullDownRefresh": false
{ }
"path" : "pages/Changepassword/Changepassword", },
"style" : {
{ "path": "pages/myinformation/myinformation",
"navigationBarTitleText": "修改密码", "style": {
"enablePullDownRefresh": false "navigationBarTitleText": "我的",
} "enablePullDownRefresh": false
}
}, },
{
"path" : "pages/Modifyphonenumber/Modifyphonenumber",
"style" :
{
"navigationBarTitleText": "修改手机号",
"enablePullDownRefresh": false
}
},
{
"path": "pages/myinformation/myinformation",
"style": {
"navigationBarTitleText": "我的",
"enablePullDownRefresh": false
}
},
{ {
"path": "pages/ServiceSchedule/ServiceSchedule", "path": "pages/ServiceSchedule/ServiceSchedule",
"style": { "style": {
"navigationBarTitleText": "服务时间表", "navigationBarTitleText": "服务时间表",
"enablePullDownRefresh": false, "enablePullDownRefresh": false
"navigationBarBackgroundColor": "#4ac4ab"
} }
}, },
{ {
"path": "pages/homepage/homepage", "path": "pages/homepage/homepage",
"style": { "style": {
"enablePullDownRefresh": false, "navigationBarTitleText": "工单",
"navigationBarTitleText": "工单" "onReachBottomDistance": 40, //距离底部多远时触发 单位为px
"enablePullDownRefresh": true //设置参数为true
} }
} },
, { {
"path": "pages/taskDetails/taskDetails",
"style": {
"enablePullDownRefresh": false,
"navigationBarTitleText": "工单详情"
}
},
{
"path": "pages/Personalinfo/Personalinfo", "path": "pages/Personalinfo/Personalinfo",
"style": { "style": {
"navigationBarTitleText": "个人信息", "navigationBarTitleText": "个人信息",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} }
],
],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"navigationBarTitleText": "", "navigationBarTitleText": "",

View File

@ -1,197 +0,0 @@
<template>
<view class="app">
<view class="top">
<view class="text">
肚子不舒服
</view>
<view class="price">
¥200
</view>
</view>
<view class="bodys">
<view class="time">
时间
</view>
<view class="datatime">
<span>2023-09-21 13:30-14:00</span>
</view>
</view>
<view class="bottom">
<view class="time">
患者信息
</view>
<view class="info">
姓名:万鹏
</view>
<view class="info">
性别:男
</view>
<view class="info">
身份证号:372401199705254567
</view>
<view class="info">
手机号码:13454678907
</view>
<view class="info">
家庭住址:北京市昌平区振兴街幸福里
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style lang="scss">
.app {
background: #F1F1F1;
height: 100vh;
.top {
display: flex;
width: 96%;
height: 102rpx;
background: #FFFFFF;
border-radius: 14rpx;
position: relative;
left: 50%;
margin: 30rpx 0 30rpx 0;
line-height: 102rpx;
transform: translateX(-50%);
.text {
font-size: 32rpx;
font-family: SourceHanSansSC-Medium, SourceHanSansSC;
font-weight: 500;
color: #333333;
padding-left: 30rpx;
}
.price {
position: absolute;
right: 20rpx;
top: 50%;
transform: translateY(-50%);
font-size: 38rpx;
font-family: Adobe Heiti Std;
color: #EE2B2B;
}
}
.bodys {
width: 96%;
height: 200rpx;
background: #FFFFFF;
border-radius: 14rpx;
margin: 30rpx 0 30rpx 0;
left: 50%;
position: relative;
transform: translateX(-50%);
.time {
width: 96%;
padding-left: 30rpx;
border-bottom: 1rpx solid #E6E6E6;
height: 100rpx;
line-height: 100rpx;
font-size: 28rpx;
font-family: SourceHanSansSC-Medium, SourceHanSansSC;
font-weight: 500;
color: #333333;
left: 50%;
position: relative;
transform: translateX(-50%);
}
.datatime {
width: 690rpx;
height: 72rpx;
line-height: 72rpx;
background: #F7F9F8;
border-radius: 14rpx;
padding-left: 30rpx;
left: 50%;
top:18rpx;
position: relative;
transform: translateX(-50%);
}
}
.bottom {
width: 96%;
height: 470rpx;
background: #FFFFFF;
border-radius: 14rpx;
margin: 30rpx 0 30rpx 0;
left: 50%;
position: relative;
transform: translateX(-50%);
.time {
width: 96%;
padding-left: 30rpx;
border-bottom: 1rpx solid #E6E6E6;
height: 100rpx;
line-height: 100rpx;
font-size: 28rpx;
font-family: SourceHanSansSC-Medium, SourceHanSansSC;
font-weight: 500;
color: #333333;
left: 50%;
position: relative;
transform: translateX(-50%);
}
.datatime {
width: 690rpx;
height: 72rpx;
line-height: 72rpx;
background: #F7F9F8;
border-radius: 14rpx;
padding-left: 30rpx;
left: 50%;
position: relative;
transform: translateX(-50%);
}
.info {
width: 96%;
height: 72rpx;
line-height: 72rpx;
padding-left: 30rpx;
// background: red;
left: 50%;
position: relative;
transform: translateX(-50%);
font-size: 24rpx;
font-family: SourceHanSansSC-Medium, SourceHanSansSC;
font-weight: 500;
color: #333333;
}
}
}
</style>

View File

@ -57,7 +57,8 @@
<style lang="scss"> <style lang="scss">
.app { .app {
height: 100vh; height: 100vh;
background-color: #fff; // background-color: #fff;
background: #F1F1F1;
position: relative; position: relative;
.submit { .submit {
@ -84,6 +85,7 @@
font-family: Source Han Sans CN; font-family: Source Han Sans CN;
font-weight: 400; font-weight: 400;
color: #333333; color: #333333;
background: #fff;
line-height: 38rpx; line-height: 38rpx;
.pwd { .pwd {

View File

@ -2,7 +2,7 @@
<view class="app"> <view class="app">
<u-tabs :list="tabslist" :is-scroll="false" :current="tabscurrent" @change="tabschange" inactive-color='#fff' <u-tabs :list="tabslist" :is-scroll="false" :current="tabscurrent" @change="tabschange" inactive-color='#fff'
active-color='#fff'></u-tabs> active-color='#fff'></u-tabs>
<!-- <view class=""> <view class="">
<view class="top" v-if="tabscurrent==0"> <view class="top" v-if="tabscurrent==0">
<u-dropdown active-color='#26A888'> <u-dropdown active-color='#26A888'>
<u-dropdown-item v-model="optionindex" :title="optionname" :options="options" <u-dropdown-item v-model="optionindex" :title="optionname" :options="options"
@ -12,7 +12,7 @@
</view> </view>
<view class="items" v-if="missionlist.length>0"> <view class="items" v-if="missionlist.length>0">
<view class="item" v-for="(item,index) in missionlist" @click.stop='gotaskDetails(item)'> <view class="item" v-for="(item,index) in missionlist" @click.stop='gotaskDetails(item)'>
<view class="title"> <view class="title" :style="tabscurrent==1?'border:none':''">
<view class="text"> <view class="text">
专家咨询({{item.patientName}}) 专家咨询({{item.patientName}})
</view> </view>
@ -26,17 +26,42 @@
</span> </span>
</view> </view>
</view> </view>
<view class="time"> <view class="time" v-if="tabscurrent!=1">
预约时间: 预约时间:
<span>{{item.appointmentDate}}{{' '+item.appointmentStartTime}}{{'-'+item.appointmentEndTime}}</span> <span>{{item.appointmentDate}}{{' '+item.appointmentStartTime}}{{'-'+item.appointmentEndTime}}</span>
</view> </view>
<view class="time" style="line-height: 40rpx;"> <view class="time" style="line-height: 40rpx;" v-if="tabscurrent!=1">
问题简述: 问题简述:
<span>{{item.problemDescription}}</span> <span>{{item.problemDescription}}</span>
</view> </view>
<view class="address" @click.stop='goMap(item)'> <view class="tabscurrent" v-if="tabscurrent ==1">
<view class="text"> <view class="time">
{{item.serviceAddress}} 姓名:
<span>{{item.patientName}}</span>
</view>
<view class="time">
性别:
<span>{{item.sex}}</span>
</view>
<view class="time">
身份证号:
<span>{{item.cardNo}}</span>
</view>
<view class="time">
手机号码:
<span>{{item.phone}}</span>
</view>
<view class="time">
家庭住址:
<span>{{item.address}}</span>
</view>
<view class="time">
预约时间:
<span>{{item.appointmentDate}}{{' '+item.appointmentStartTime}}{{'-'+item.appointmentEndTime}}</span>
</view>
<view class="time" style="line-height: 40rpx;">
问题简述:
<span>{{item.problemDescription}}</span>
</view> </view>
</view> </view>
<view class="btns"> <view class="btns">
@ -58,7 +83,7 @@
接单 接单
</view> </view>
<view class="btnreturn" @click.stop='goconfirmCompletion(item)' <view class="btnreturn" @click.stop='goconfirmCompletion(item)'
v-if="item.orderStatus=='RECEIVED_GOODS'"> style="background-color:#18CBB3;color: #fff;" v-if="item.orderStatus=='RECEIVED_GOODS'">
完成 完成
</view> </view>
<view class="btnaccept" @click.stop='govideo(item)' v-if="item.orderStatus=='RECEIVED_GOODS'"> <view class="btnaccept" @click.stop='govideo(item)' v-if="item.orderStatus=='RECEIVED_GOODS'">
@ -70,54 +95,27 @@
<view v-else class="" style="margin-top: 100rpx;"> <view v-else class="" style="margin-top: 100rpx;">
<u-empty text="暂无工单" mode="list" icon-size='240' font-size='32'></u-empty> <u-empty text="暂无工单" mode="list" icon-size='240' font-size='32'></u-empty>
</view> </view>
<u-popup v-model="taskReturnshow" mode="center" closeable border-radius='5' width='80%' height="500rpx"> </view>
<view class="titletext"> <!-- <view class="">
<text style="font-size: 26rpx;">退回原因:</text>
<textarea name="" id="" cols="30" rows="10" style="width: 60%;" placeholder="请输入退回原因"
v-model="remark"></textarea>
</view>
<view class="btnss">
<view class="cancel" @click="taskReturnshow=false">
取消
</view>
<view class="Rescind" @click="truetaskReturn">
退回
</view>
</view>
</u-popup>
</view> -->
<view class="">
<view class="inputs" style="width: 90%;height: 60rpx;transform: none;margin: 20rpx auto;"> <view class="inputs" style="width: 90%;height: 60rpx;transform: none;margin: 20rpx auto;">
<i class="icon"></i> <i class="icon"></i>
<input type="text" name="" id="" class="input" placeholder="搜索" v-model="query.label"> <input type="text" name="" id="" class="input" placeholder="搜索" v-model="formdata.name">
</view> </view>
<view class="lists"> <view class="lists" v-if="listinfo">
<view class="item"> <view class="item" v-for="item in listinfo" @tap='goseekadvicefrom(item)'>
<image src="../../static/homepages.png" mode=""></image> <image src="../../static/headsculpture.png" mode=""></image>
<view class="name"> <view class="name">
心如止水 {{item.patientName}}
</view> </view>
<view class="text"> <view class="text">
大夫我女儿吃了药后有点发烧,怎么回事,您给看点好看说不定倒是波动的的的的 {{item.content}}
</view> </view>
<view class="count"> <view class="count" v-if="item.messageCount>0">
1 {{item.messageCount}}
</view>
</view>
<view class="item">
<image src="../../static/homepages.png" mode=""></image>
<view class="name">
心如止水
</view>
<view class="text">
大夫我女儿吃了药后有点发烧,怎么回事,您给看点好看说不定倒是波动的的的的
</view>
<view class="count">
1
</view> </view>
</view> </view>
</view> </view>
</view> </view> -->
<u-toast ref="uToast" /> <u-toast ref="uToast" />
</view> </view>
</template> </template>
@ -129,31 +127,34 @@
closeHealthConsultationOrder, closeHealthConsultationOrder,
consultationInfolist consultationInfolist
} from '@/api/homepage/index.js' } from '@/api/homepage/index.js'
import {
getSex
} from '@/utils/conversion.js'
export default { export default {
data() { data() {
return { return {
tabslist: [{ tabslist: [{
name: '全部', name: '全部工单',
value: '', value: '',
}, { }, {
name: '未解决', name: '我的工单',
value: 'RECEIVED_GOODS', value: 'RECEIVED_GOODS',
}, { }, {
name: '已解决', name: '已完成工单',
value: 'COMPLETED', value: 'COMPLETED',
}], }],
// { // {
// name: '全部工单', // name: '全部',
// value: '', // value: '',
// }, { // }, {
// name: '我的工单', // name: '未解决',
// value: 'RECEIVED_GOODS', // value: '1',
// }, { // }, {
// name: '已完成工单', // name: '已解决',
// value: 'COMPLETED', // value: '2',
// } // }
tabscurrent: 0, tabscurrent: 0,
optionindex: 1, optionindex: 0,
optionname: '全部', optionname: '全部',
options: [{ options: [{
label: '全部', label: '全部',
@ -177,18 +178,32 @@
}, },
missionlist: [], missionlist: [],
missiontotal: 0, missiontotal: 0,
taskReturnshow: false,
remark: '', remark: '',
formdata: {
pageNum: 1,
pageSize: 10,
doctorId: 1,
consultationType: 'IMAGE_TEXT_CONSULTATION',
status: '',
},
listinfo: [],
listtotal: 0,
} }
}, },
onShow() { onShow() {
// this.info(); this.info();
}, },
methods: { methods: {
//前往聊天
goseekadvicefrom(item) {
uni.navigateTo({
url: `/pages/seekadvicefrom/seekadvicefrom?item=${JSON.stringify(item)}`
})
},
//详情 //详情
gotaskDetails(item) { gotaskDetails(item) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/taskDetails/taskDetails?id=${item.consultationInfoId}` url: `/pages/taskDetails/taskDetails?id=${item.consultationInfoId}&title=${item.orderStatus}`
}) })
}, },
//完成 //完成
@ -210,23 +225,8 @@
}, },
//任务退回 //任务退回
gotaskReturn(item) { gotaskReturn(item) {
this.query.orderNo = item.orderNo uni.navigateTo({
this.taskReturnshow = true url: `/pages/taskReturn/taskReturn?item=${JSON.stringify(item)}`
},
truetaskReturn() {
var obj = {
orderNo: this.query.orderNo,
remark: this.remark,
}
closeHealthConsultationOrder(obj).then(res => {
if (res.code == 200) {
this.$refs.uToast.show({
title: '工单退回成功',
type: 'success',
duration: '1500'
})
this.info();
}
}) })
}, },
//接单 //接单
@ -249,20 +249,22 @@
info() { info() {
this.query.pageNum = 1 this.query.pageNum = 1
getList(this.query).then(res => { getList(this.query).then(res => {
res.rows.forEach(e => {
e.sex = getSex(e.cardNo)
})
this.missionlist = res.rows this.missionlist = res.rows
this.missiontotal = res.total this.missiontotal = res.total
}) })
consultationInfolist(this.formdata).then(res => {
this.listinfo = res.rows
this.listtotal = res.rows
})
}, },
tabschange(index) { tabschange(index) {
console.log(index)
this.tabscurrent = index; this.tabscurrent = index;
if(this.tabscurrent==2){
uni.navigateTo({
url:'/pages/Completedwork/Completedwork'
})
}
this.query.orderStatus = this.tabslist[index].value this.query.orderStatus = this.tabslist[index].value
this.optionname = '全部' this.optionname = '全部'
this.optionindex = 0
this.info(); this.info();
}, },
dropitemchange(e) { dropitemchange(e) {
@ -277,6 +279,7 @@
getList(this.query).then( getList(this.query).then(
res => { res => {
res.rows.forEach(e => { res.rows.forEach(e => {
e.sex = getSex(e.cardNo)
this.missionlist.push(e) this.missionlist.push(e)
}) })
}) })
@ -422,20 +425,6 @@
} }
} }
.titletext {
width: 100%;
padding: 80rpx 30rpx 0;
display: flex;
textarea {
padding: 10rpx 20rpx;
font-size: 24rpx;
border: 1rpx solid #d0d0d0;
flex: 1;
}
}
.items { .items {
width: 96%; width: 96%;
margin: 0 auto; margin: 0 auto;
@ -452,6 +441,14 @@
font-size: 30rpx; font-size: 30rpx;
padding-bottom: 60rpx; padding-bottom: 60rpx;
.tabscurrent {
width: 100%;
padding: 30rpx;
margin: 0 auto;
background: #F7F9F8;
border-radius: 14rpx;
}
.btns { .btns {
margin-top: 60rpx; margin-top: 60rpx;
display: flex; display: flex;
@ -473,7 +470,7 @@
height: 60rpx; height: 60rpx;
text-align: center; text-align: center;
line-height: 55rpx; line-height: 55rpx;
border-radius: 5rpx; border-radius: 50rpx;
border: 1px solid #18CBB3; border: 1px solid #18CBB3;
position: absolute; position: absolute;
} }
@ -491,30 +488,6 @@
} }
} }
.address {
position: relative;
.text {
width: 80%;
}
.p {
padding-left: 30rpx;
font-size: 24rpx;
color: #EA706A;
}
image {
position: absolute;
top: 50%;
left: 0rpx;
transform: translateY(-40%);
width: 25rpx;
height: 25rpx;
}
}
.time { .time {
line-height: 60rpx; line-height: 60rpx;
font-size: 24rpx; font-size: 24rpx;

View File

@ -11,12 +11,12 @@
<view style="height: 85vh; padding-top: 200rpx;" @tap='touchend'> <view style="height: 85vh; padding-top: 200rpx;" @tap='touchend'>
<view class="snedItem" v-for="(item, index) in newsList" :key="index"> <view class="snedItem" v-for="(item, index) in newsList" :key="index">
<view class="ifSend" v-if="item.senderName == userName"> <view class="ifSend" v-if="item.senderName == userName">
<view class="sendBox" v-if="item.messageType=='1'">{{item.content}}</view> <view class="sendBox" v-if="item.messageType==1">{{item.content}}</view>
<image v-if="item.messageType=='2'" :src="baseurl+item.content" class="snedItemimage" /> <image v-if="item.messageType==2" :src="baseurl+item.content" class="snedItemimage" />
<image class="head" src="@/static/headsculpture.png"></image> <image class="head" src="@/static/docHead.png"></image>
</view> </view>
<view class="doctorSend" v-else> <view class="doctorSend" v-else>
<image class="head" src="@/static/docHead.png"></image> <image class="head" src="@/static/headsculpture.png"></image>
<view class=""> <view class="">
<text>{{item.senderName}}</text> <text>{{item.senderName}}</text>
<view class="sendBox" v-if="item.content">{{item.content}}</view> <view class="sendBox" v-if="item.content">{{item.content}}</view>
@ -24,7 +24,7 @@
</view> </view>
<video v-if="item.video" :src="item.video"></video> <video v-if="item.video" :src="item.video"></video>
</view> </view>
<!-- <view class="placeholder" id="placeholder" v-if="showFunBtn"></view> --> <view class="placeholder" id="placeholder" ></view>
</view> </view>
</scroll-view> </scroll-view>
@ -87,7 +87,7 @@
return { return {
baseurl: '', baseurl: '',
title: '', title: '',
SOCKETURL: 'ws://8.131.93.145:54088/webSocket/', SOCKETURL: 'ws://192.168.16.212:8088/webSocket/',
socketOpen: false, socketOpen: false,
sendInfo: {}, sendInfo: {},
currentItem: '', currentItem: '',
@ -154,9 +154,9 @@
this.baseurl = baseurl; this.baseurl = baseurl;
// uni.closeSocket() // uni.closeSocket()
this.currentItem = JSON.parse(options.item) this.currentItem = JSON.parse(options.item)
this.title = this.currentItem.doctorName //导航栏标题 this.title = this.currentItem.patientName //导航栏标题
this.userName = this.currentItem.patientName this.userName = this.currentItem.doctorName
this.SOCKETURL = this.SOCKETURL + this.currentItem.patientId this.SOCKETURL = this.SOCKETURL + this.currentItem.doctorId
this.getPageHistory() this.getPageHistory()
this.scoket() this.scoket()
}, },
@ -192,7 +192,7 @@
Read() { Read() {
let markReadData = { let markReadData = {
consultationId: this.currentItem.id, consultationId: this.currentItem.id,
recipientId: this.currentItem.doctorId, recipientId: this.currentItem.patientId,
} }
markRead(markReadData) markRead(markReadData)
}, },
@ -234,16 +234,17 @@
if (this.socketOpen == false) { if (this.socketOpen == false) {
return return
} }
this.newsList.push({ that.newsList.push({
senderName: this.userName, senderName: that.currentItem.doctorName,
content: this.formData.content content: that.formData.content,
messageType: 1,
}) })
let obj = { let obj = {
consultationId: that.currentItem.id, consultationId: that.currentItem.id,
senderId: that.currentItem.patientId, recipientId: that.currentItem.patientId,
senderName: that.currentItem.patientName, recipientName: that.currentItem.patientName,
recipientId: that.currentItem.doctorId, senderId: that.currentItem.doctorId,
recipientName: that.currentItem.doctorName, senderName: that.currentItem.doctorName,
messageType: 1, messageType: 1,
sendTime: new Date(), sendTime: new Date(),
content: this.formData.content content: this.formData.content
@ -382,7 +383,8 @@
res.tempFilePaths.forEach(e => { res.tempFilePaths.forEach(e => {
that.newsList.push({ that.newsList.push({
imgurl: e, imgurl: e,
senderName: that.userName, messageType: 2,
senderName: that.currentItem.doctorName,
}) })
uni.uploadFile({ uni.uploadFile({
url: baseurl + url: baseurl +
@ -395,10 +397,10 @@
var fileurls = JSON.parse(resp.data) var fileurls = JSON.parse(resp.data)
let obj = { let obj = {
consultationId: that.currentItem.id, consultationId: that.currentItem.id,
senderId: that.currentItem.patientId, recipientId: that.currentItem.patientId,
senderName: that.currentItem.patientName, recipientName: that.currentItem.patientName,
recipientId: that.currentItem.doctorId, senderId: that.currentItem.doctorId,
recipientName: that.currentItem.doctorName, senderName: that.currentItem.doctorName,
messageType: 2, messageType: 2,
sendTime: new Date(), sendTime: new Date(),
content: fileurls.fileUrl content: fileurls.fileUrl
@ -462,7 +464,8 @@
console.log("webScoket监听收到的信息", res); console.log("webScoket监听收到的信息", res);
that.newsList.push({ that.newsList.push({
senderName: that.currentItem.patientName, senderName: that.currentItem.patientName,
content: JSON.parse(res.data).message content: JSON.parse(res.data).message,
messageType: JSON.parse(res.data).message
}) })
that.Read() that.Read()
}) })

View File

@ -61,11 +61,23 @@
list: null, list: null,
baseurl: null, baseurl: null,
fileUrls: [], fileUrls: [],
title: '',
}; };
}, },
onLoad(options) { onLoad(options) {
this.baseurl = baseurl this.baseurl = baseurl
this.info(options.id) this.info(options.id)
this.title = options.title
if (options.title == 'COMPLETED') {
this.title = '已完成工单'
} else {
this.title = '工单详情'
}
},
onReady() { //更改导航栏文字
uni.setNavigationBarTitle({
title: this.title,
});
}, },
methods: { methods: {
previewImage(index) { previewImage(index) {

View File

@ -3,29 +3,23 @@
<view class="top"> <view class="top">
<view class="title"> <view class="title">
<view class="text"> <view class="text">
1111 专家咨询({{tasklist.patientName}})
<!-- {{tasklist.nurseItemName}} -->
</view> </view>
<view class="righttext"> <view class="righttext">
<!-- <span v-if="tasklist.orderCommissionAmount&&tasklist.orderCommissionAmount>=0"> <span v-if="tasklist.orderCommissionAmount&&tasklist.orderCommissionAmount>=0">
¥{{tasklist.orderCommissionAmount}} ¥{{tasklist.orderCommissionAmount}}
</span> </span>
<span v-else> <span v-else>
¥ 0 ¥0
</span> --> </span>
<span>¥200</span>
</view> </view>
</view> </view>
<view class="content"> <view class="content">
<view class="time" style="line-height: 60rpx;padding-top: 15rpx;"> <view class="time" style="line-height: 60rpx;padding-top: 15rpx;">
时间:111 时间:{{tasklist.appointmentDate}}{{' '+tasklist.appointmentStartTime}}{{'-'+tasklist.appointmentEndTime}}
<!-- 时间:{{tasklist.serviceDate}}
<span style='padding-left: 10rpx;'>{{tasklist.serviceStartTime}}</span> -->
</view> </view>
<view class="time"> <view class="time">
地点:{{tasklist.address}}
地点:2032
<!-- 地点:{{tasklist.serviceAddress}} -->
</view> </view>
</view> </view>
@ -38,14 +32,15 @@
</view> </view>
<view class="checkboxs"> <view class="checkboxs">
<u-checkbox-group @change="checkboxGroupChange" :wrap='true'> <u-checkbox-group @change="checkboxGroupChange" :wrap='true'>
<u-checkbox active-color="#18CBB3" @change="checkboxChange" v-model="item.checked" v-for="(item, index) in list" <u-checkbox active-color="#18CBB3" @change="checkboxChange" v-model="item.checked"
:key="index" :name="item.name" shape='circle'>{{item.name}}</u-checkbox> v-for="(item, index) in list" :key="index" :name="item.name"
shape='circle'>{{item.name}}</u-checkbox>
</u-checkbox-group> </u-checkbox-group>
</view> </view>
<u-input v-model="value" type="text" :border="true" border-color='#E6E6E6' placeholder='请输入退回原因' <u-input v-model="value" type="text" :border="true" border-color='#E6E6E6' placeholder='请输入退回原因'
v-if="list[4].checked" /> :clearable='false' v-if="list[4].checked" />
</view> </view>
<view class="btn" @tap='taskreturn'> <view class="btn" @tap='truetaskReturn'>
立即提交 立即提交
</view> </view>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
@ -54,17 +49,15 @@
<script> <script>
import { import {
taskDetails closeHealthConsultationOrder,
} from '@/api/taskDetails/index.js' } from '@/api/homepage/index.js'
import { import {
orderFallback orderFallback
} from '@/api/taskReturn/taskReturn.js' } from '@/api/taskReturn/taskReturn.js'
export default { export default {
data() { data() {
return { return {
baseurl: null,
tasklist: null, //传值item tasklist: null, //传值item
nursePersonId: null, //护理员id
taskReturnReason: '', taskReturnReason: '',
value: null, //input绑定 value: null, //input绑定
list: [{ list: [{
@ -74,7 +67,7 @@
name: '服务要求较高,当前资质无法完成', name: '服务要求较高,当前资质无法完成',
checked: false, checked: false,
}, { }, {
name: '距离较远无法到达', name: '距离较远,无法到达',
checked: false, checked: false,
}, { }, {
name: '价格不合理', name: '价格不合理',
@ -86,60 +79,40 @@
} }
}, },
methods: { methods: {
truetaskReturn() {
if (this.list[4].checked && this.value) {
this.taskReturnReason += this.value + ';'
}
var obj = {
orderNo: this.tasklist.orderNo,
remark: this.taskReturnReason,
}
closeHealthConsultationOrder(obj).then(res => {
if (res.code == 200) {
this.$refs.uToast.show({
title: '工单退回成功',
type: 'success',
duration: '1500',
back: 1
})
}
})
},
// 选中某个复选框时,由checkbox时触发 // 选中某个复选框时,由checkbox时触发
checkboxChange(e) {}, checkboxChange(e) {},
// 选中任一checkbox时,由checkbox-group触发 // 选中任一checkbox时,由checkbox-group触发
// checkboxGroupChange(e) { checkboxGroupChange(e) {
// this.taskReturnReason = '' this.taskReturnReason = ''
// e.forEach(el => { e.forEach(el => {
// if (el != '其它') { if (el != '其它') {
// this.taskReturnReason += el + ';' this.taskReturnReason += el + ';'
// } }
// }) })
// }, },
// taskreturn() { },
// if (this.list[4].checked && this.value) { onLoad(options) {
// this.taskReturnReason += this.value + ';' this.tasklist = JSON.parse(options.item)
// }
// if (!this.tasklist.id) {
// this.tasklist.id = this.tasklist.orderDetailsId
// }
// var obj = {
// "appointmentOrderId": this.tasklist.id,
// "stationPersonId": this.nursePersonId,
// "appointmentOrderNo": this.tasklist.orderNo,
// "taskReturnReason": this.taskReturnReason,
// }
// orderFallback(obj).then(res => {
// if (res.code == 200) {
// this.$refs.uToast.show({
// title: '任务退回成功',
// type: 'success',
// duration: '1500'
// })
// setTimeout(() => {
// uni.navigateBack({
// delta: 1
// })
// }, 1500);
// } else {
// this.$refs.uToast.show({
// title: res.msg,
// type: 'error',
// duration: '1500'
// })
// }
// })
// },
}, },
// onLoad(options) {
// this.tasklist = JSON.parse(options.item)
// var that = this
// const value = uni.getStorageSync('nursePersonId');
// if (value) {
// that.nursePersonId = value
// } else {}
// },
} }
</script> </script>
@ -155,7 +128,8 @@
::v-deep .u-checkbox { ::v-deep .u-checkbox {
height: 80rpx !important; height: 80rpx !important;
} }
::v-deep .u-checkbox__label{
::v-deep .u-checkbox__label {
font-size: 24rpx !important; font-size: 24rpx !important;
font-family: SourceHanSansSC-Medium, SourceHanSansSC; font-family: SourceHanSansSC-Medium, SourceHanSansSC;
font-weight: 500 !important; font-weight: 500 !important;
@ -176,9 +150,9 @@
line-height: 70rpx; line-height: 70rpx;
color: #fff; color: #fff;
position: fixed; position: fixed;
bottom: 60rpx; bottom: 60rpx;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
} }
.checkboxs { .checkboxs {