diff --git a/api/health.js b/api/health.js index 3ecfea1..264be4d 100644 --- a/api/health.js +++ b/api/health.js @@ -12,14 +12,14 @@ function serviceList(data){ //获取患者检测订单列表 return request('/patient/order/service','GET',data) }; function serviceDetail(id){ //获取患者检测订单详情 - return request('/patient/order/detection/'+id,'GET',{}) + return request('/patient/order/service/'+id,'GET',{}) }; function cancelCheckPay(id){ //取消支付 - return request('/patient/order/detection/cancel-pay/'+id,'PUT') + return request('/patient/order/cancel-pay/'+id,'PUT') }; function cancelCheckOrder(id){ //取消支付 - return request('/patient/order/detection/cancel/'+id,'PUT') + return request('/patient/order/cancel/'+id,'PUT') }; function delCheckOrder(id){ return request('/patient/order/detection/'+id,'DELETE') @@ -29,6 +29,9 @@ function serviceList(data){ //获取患者检测订单列表 module.exports={ + cancelCheckPay, + cancelCheckOrder, + serviceDetail, serviceList, getItems, getServiceDetail, diff --git a/healthyService/pages/healthyOrder/healthyOrder.js b/healthyService/pages/healthyOrder/healthyOrder.js index 02803f7..f336849 100644 --- a/healthyService/pages/healthyOrder/healthyOrder.js +++ b/healthyService/pages/healthyOrder/healthyOrder.js @@ -83,7 +83,7 @@ Page({ }, goExpertList(){ app.method.navigateTo({ - url: '/sugarCheck/pages/checkOrderDetail/checkOrderDetail' //'/pages/expertConsult/expertConsult', + url: '/healthyService/pages/healthyOrderDetail/healthyOrderDetail' //'/pages/expertConsult/expertConsult', }) }, changeStatus({ detail }){ @@ -172,7 +172,7 @@ Page({ goDetail(event){ let id=event.currentTarget.dataset.id; app.method.navigateTo({ - url: '/sugarCheck/pages/checkOrderDetail/checkOrderDetail?order_detection_id='+id, + url: '/healthyService/pages/healthyOrderDetail/healthyOrderDetail?order_service_id='+id, }) }, /** @@ -214,7 +214,7 @@ Page({ let {delId,orderList,changeStatus,changeId}=this.data; if(delId){ let list=orderList.filter((item)=>{ - return item.order_detection_id!=delId + return item.order_service_id!=delId }) this.setData({ orderList:list @@ -222,7 +222,7 @@ Page({ }else if(changeStatus && changeId){ for (let i = 0; i < orderList.length; i++) { const item =orderList[i]; - if(item.order_detection_id==changeId){ + if(item.order_service_id==changeId){ let currentitem=`orderList[${i}].order_service_status` this.setData({ [currentitem]:changeStatus diff --git a/healthyService/pages/healthyOrder/healthyOrder.wxml b/healthyService/pages/healthyOrder/healthyOrder.wxml index 387833b..bcc540b 100644 --- a/healthyService/pages/healthyOrder/healthyOrder.wxml +++ b/healthyService/pages/healthyOrder/healthyOrder.wxml @@ -14,21 +14,21 @@ - + - 糖组检测 + {{item.order_service_type==1?'健康包':'随访包'}} - + 待支付 - 待绑定 - 检测中 - 已开具报告 - 已取消 - + 待接诊 + 服务中 + 已完成 + 已取消 + 支付超时 @@ -40,7 +40,7 @@ {{item.user_doctor.user_name}} {{item.user_doctor.doctor_title}} - 平台分配医生中 + 平台分配医生中 接诊医生 {{item.user_doctor.hospital_name}} @@ -48,6 +48,7 @@ +
有效期:{{item.start_time+"-"+item.finish_time}}
@@ -56,7 +57,7 @@ {{item.patient_name}}(未知{{item.patient_age}}岁)
- - + 下单时间 @@ -78,12 +79,12 @@ - + 下单时间 {{item.created_at}} - + 待付金额 diff --git a/healthyService/pages/healthyOrder/healthyOrder.wxss b/healthyService/pages/healthyOrder/healthyOrder.wxss index aff8359..95323e8 100644 --- a/healthyService/pages/healthyOrder/healthyOrder.wxss +++ b/healthyService/pages/healthyOrder/healthyOrder.wxss @@ -246,6 +246,17 @@ color: #333333; .infobox .position{ font-weight:normal; } +.validatetime{ + height: 64rpx; + display: flex; + background: #FAFAFA; + padding: 10rpx; + font-size: 28rpx; + color: #333; + margin:20rpx 32rpx 0; + align-items: center; + border-radius: 8rpx; +} .row{ align-items: center; padding:0 32rpx; diff --git a/healthyService/pages/healthyOrderDetail/healthyOrderDetail.js b/healthyService/pages/healthyOrderDetail/healthyOrderDetail.js index 7e791f6..1f85c2a 100644 --- a/healthyService/pages/healthyOrderDetail/healthyOrderDetail.js +++ b/healthyService/pages/healthyOrderDetail/healthyOrderDetail.js @@ -1,6 +1,6 @@ // pages/medinceOrderDetail/medinceOrderDetail.js const app = getApp() -import {detectionDetail,bindCheck,cancelCheckPay,delCheckOrder,cancelCheckOrder,checkInquiry} from "../../../api/checkSugar.js" +import {serviceDetail,bindCheck,cancelCheckPay,delCheckOrder,cancelCheckOrder,checkInquiry} from "../../../api/health" import {cancelPay} from "../../../api/consultOrder" import {cancelOrder} from "../../../api/consultOrder" import {fllowDoctor,notfllowDoctor} from "../../../api/consultExpert" @@ -26,7 +26,7 @@ Page({ checkmessage:'', detection_bar_code:'', detection_code:'', - order_detection_id:'', + order_service_id:'', showDialog:false, message:'', fromType:'', @@ -137,7 +137,9 @@ Page({ }, goBack(){ + let {fromType}=this.data; + console.log(fromType) if(app.globalData.origion==1){ wx.reLaunch({ url: '/pages/index/index', @@ -155,6 +157,7 @@ Page({ }else{ goUrl='/'+url+"?fromType="+url; } + console.log(goUrl) //处理聊天收到消息不及时; if(url.indexOf("TUIService/pages/index")!=-1){ app.method.navigateTo({ @@ -225,7 +228,7 @@ Page({ }) }, handleCheckInquiry:throttle(function(){ - let id=this.data.order.order_detection_id; + let id=this.data.order.order_service_id; checkInquiry(id).then(data=>{ console.log(data); if(data.status==1){ @@ -300,39 +303,7 @@ Page({ // url:"/pages/linkPage/linkPage?url="+encodeURIComponent(url) // }) }), - handleBindCheck:throttle(function(){ - let id=this.data.order.order_detection_id; - let detection_status=this.data.order.detection_status; - if(detection_status==3){ - wx.showToast({ - title: '您已提交,请等待结果', - icon:"none" - }) - return false - } - const {detection_bar_code,fileList}=this.data; - const reg=/^SDB[A-Z](?:2[3-9]|2[0-2])[SP](?:1688[6-9]|1689\d|169\d\d|1[7-9]\d\d\d|[2-9][0-9]{4}|99999)$/; - if(!reg.test(detection_bar_code)){ - wx.showToast({ - title: '检测码格式不正确', - icon:"none" - }) - this.setData({ - showError:true - }) - return false - } - bindCheck(id,{ - detection_bar_code, - detection_pic:fileList - }).then(data=>{ - this.handleDetectionDetail(); - wx.showToast({ - title: '提交成功', - icon:"none" - }) - }) - }), + goChat:throttle(function(){ let {user_id}=this.data.user_doctor; let order_inquiry_id=this.data.order.order_inquiry_id; @@ -381,9 +352,9 @@ Page({ url: '/patient/pages/expertDetail/expertDetail?doctor_id='+id, }) }), - handleDetectionDetail(flag=false){ - let id =this.data.order_detection_id; - detectionDetail(id).then(data=>{ + handleServiceDetail(flag=false){ + let id =this.data.order_service_id; + serviceDetail(id).then(data=>{ if(flag){ let pages = getCurrentPages(); let prevPage = pages[pages.length - 2]; //上一页 @@ -437,7 +408,7 @@ confirmCancelOrder(){ this.setData({ showDialog:true, cancelBtn:true, - message:"是否确定要取消检测?" + message:"是否确定要取消订单?" }) }, confirmDelOrder(){ @@ -459,7 +430,7 @@ confirm:throttle(function(event){ this.handelDelProduct(); }else if(event.detail && this.data.message=="您确定取消支付么?"){ this.handelCancelPayProduct(); - }else if(event.detail && this.data.message=="是否确定要取消检测?"){ + }else if(event.detail && this.data.message=="是否确定要取消订单?"){ this.handelCancelCheckOrder(); } }), @@ -474,20 +445,17 @@ confirmCheck:throttle(function(){ } }), handelCancelCheckOrder(flag=true){ - let id =this.data.order.order_detection_id; + let id =this.data.order.order_service_no; cancelCheckOrder(id).then(data=>{ wx.showToast({ title: '取消成功', icon:"none" }) - if(!flag){ - this.goChat(); - } - this.handleDetectionDetail(); + this.handleServiceDetail(); }) }, handelCancelPayProduct(flag=true){ - let id =this.data.order.order_detection_id; + let id =this.data.order.order_service_no; cancelCheckPay(id).then(data=>{ wx.showToast({ title: '取消支付成功', @@ -496,7 +464,7 @@ handelCancelPayProduct(flag=true){ if(!flag){ this.handleCheckInquiry(); } - this.handleDetectionDetail(); + this.handleServiceDetail(); }) }, copy(event){ @@ -506,13 +474,14 @@ copy(event){ }) }, goPay:throttle(function(){ - let {order_detection_id,detection_no}=this.data.order; + let {order_service_id,order_service_no,order_service_type}=this.data.order; + let order_type=order_service_type==1?4:5; app.method.navigateTo({ - url: '/patient/pages/payOrder/payOrder?inquiry_no='+ detection_no +"&order_detection_id="+order_detection_id+"&order_type=3&fromType="+encodeURIComponent('/sugarCheck/pages/checkOrder/checkOrder') + url: '/patient/pages/payOrder/payOrder?inquiry_no='+ order_service_no +"&order_service_id="+order_service_no+"&order_type="+order_type+"&fromType="+encodeURIComponent('healthyService/pages/healthyOrder/healthyOrder') }) }), handelDelProduct(){ - let id =this.data.order.order_detection_id; + let id =this.data.order.order_service_id; delCheckOrder(id).then(data=>{ let pages = getCurrentPages(); //获取所需页面 @@ -582,13 +551,13 @@ toggleFllow(){ fromType:options.fromType }) } - let order_detection_id=options.order_detection_id; - console.log(order_detection_id) - if(order_detection_id){ + let order_service_id=options.order_service_id; + console.log(order_service_id) + if(order_service_id){ this.setData({ - order_detection_id + order_service_id }); - this.handleDetectionDetail(); + this.handleServiceDetail(); } }, diff --git a/healthyService/pages/healthyOrderDetail/healthyOrderDetail.wxml b/healthyService/pages/healthyOrderDetail/healthyOrderDetail.wxml index 0297d39..f2368fb 100644 --- a/healthyService/pages/healthyOrderDetail/healthyOrderDetail.wxml +++ b/healthyService/pages/healthyOrderDetail/healthyOrderDetail.wxml @@ -6,74 +6,33 @@ - - + + - - - - - 检测码有误,请重新输入 - - - - - - - - - - - - - - - - - 上传 - - - - - 预计检测完成时间 - {{order.detection_success_time}} - - - + --> + + 订单信息 - + 待支付 - 待绑定 - 检测中 - 检测完成 - 取消检测 - 支付超时 + 待接诊 + 服务中 + 服务完成 + 服务取消 + 支付超时 @@ -81,11 +40,11 @@ - {{order.detection_no}} + {{order.order_service_no}} | - 复制 + 复制 @@ -97,9 +56,9 @@ - 问诊类型 + 订单类型 - 糖组检测 + {{order.order_service_type==1?"健康包":'随访包'}} @@ -107,6 +66,7 @@ ¥{{order.amount_total}} + @@ -124,6 +84,7 @@ ¥{{pay_money}} + 明细 @@ -161,16 +122,16 @@ - - - 联系客服 + + 取消订单 + + + 联系客服 - - 取消检测 - - - 删除订单 - + + + + @@ -205,54 +166,30 @@ - + - - - 联系客服 - + - + 取消支付 立即支付 - - - - 提交 + + 去使用 - - 查看报告 - - 报告解读 - - - - - 重新检测 + + 去续费 + + - - - - - - 知道了 - - - - \ No newline at end of file diff --git a/healthyService/pages/healthyOrderDetail/healthyOrderDetail.wxss b/healthyService/pages/healthyOrderDetail/healthyOrderDetail.wxss index bf1b094..65202ec 100644 --- a/healthyService/pages/healthyOrderDetail/healthyOrderDetail.wxss +++ b/healthyService/pages/healthyOrderDetail/healthyOrderDetail.wxss @@ -252,9 +252,15 @@ } .copy { - + width: 80rpx; + height: 40rpx; + background: #3CC7C0; + border-radius: 6rpx; height: 40rpx; - color: #000; + color: #fff;width: 80rpx; +height: 40rpx; +background: #3CC7C0; +border-radius: 6rpx; font-size: 24rpx; display: flex; margin-left: 20rpx; @@ -546,7 +552,7 @@ } .paybox{ bottom:0px; - height: 186rpx; + height: 104rpx; background: #FFFFFF; position: absolute; display: flex; @@ -555,7 +561,7 @@ } .submitbtn{ width:100%; - margin:16px 32rpx 0; + margin:3px 32rpx 0; height: 94rpx; background: #3CC7C0; border-radius: 47rpx; @@ -570,15 +576,14 @@ color: #FFFFFF; background: rgba(0,0,0,0.1); } .paybox .left{ - height: 94rpx; + height: 104rpx; border-radius: 47rpx; font-size: 36rpx; -color: rgba(0,0,0,0.85); -border: 1rpx solid rgba(0,0,0,0.65); - margin-left: 32rpx; +color: #999; flex:1; + font-size: 28rpx; -margin-top: 16rpx; + display: flex; align-items: center; justify-content: center; @@ -598,19 +603,19 @@ margin-top: 16rpx; } .paybox .right{ position: relative; - margin-right: 32rpx; - margin-top: 16rpx; + + color: #FFFFFF; display: flex; - margin-left: 24rpx; + align-items: center; justify-content: center; background: #3CC7C0; - height: 94rpx; + height: 104rpx; font-size: 36rpx; color: #FFFFFF; background: #3CC7C0; - border-radius: 47rpx; + flex:2; } .express{ @@ -695,7 +700,7 @@ color: rgba(0,0,0,0.85) display: flex; } .rowbox .row{ - justify-content: space-between; + /* justify-content: space-between; */ } .bar{ margin-left: 30rpx; @@ -884,4 +889,45 @@ color: rgba(0,0,0,0.85); font-size: 28rpx; font-weight: 400; color: rgba(0,0,0,0.45); +} +.moneydetail{ + width: 96rpx; + height: 40rpx; + background: #3CC7C0; + border-radius: 6rpx; + font-size: 24rpx; + display: flex; + margin-left: 20rpx; + align-items: center; + justify-content: center; + color: #FFFFFF; +} +.dealbox{ + display: flex; + margin:20rpx 30rpx 0; + justify-content: flex-end; +} +.linkbtn{ + width: 168rpx; + display: flex; + height: 60rpx; + justify-content: center; + align-items: center; + font-size: 28rpx; +color: #FFFFFF; +border-radius: 29rpx; +background-color: #3CC7C0; +} +.cancelbtn{ + width: 168rpx; + display: flex; + height: 60rpx; + justify-content: center; + align-items: center; + font-size: 28rpx; +color: #FFFFFF; +border-radius: 29rpx; + +background: #CECECE; + } \ No newline at end of file diff --git a/patient/pages/payOrder/payOrder.js b/patient/pages/payOrder/payOrder.js index 4555eaa..fed9aa6 100644 --- a/patient/pages/payOrder/payOrder.js +++ b/patient/pages/payOrder/payOrder.js @@ -43,6 +43,7 @@ Page({ address_id: '', product_ids: [], order_detection_id:'', + order_service_id:'', order_product_id: '', fromType: '', showDing:false, @@ -78,8 +79,10 @@ Page({ order_inquiry_id, order_type, order_detection_id, + order_service_id, fromType } = this.data; + console.log( order_type, order_service_id) if (order_type == 1) { if (fromType) { if (fromType == "detail") { @@ -103,7 +106,7 @@ Page({ }) } }else if(order_type==3){ - console.log("2222"); + if (fromType) { wx.redirectTo({ url: '/sugarCheck/pages/checkOrderDetail/checkOrderDetail?order_detection_id=' + order_detection_id + "&fromType=" + fromType, @@ -113,6 +116,16 @@ Page({ delta: 1, }) } + }else if(order_type==4 || order_type==5){ + if (fromType) { + wx.redirectTo({ + url: '/healthyService/pages/healthyOrderDetail/healthyOrderDetail?order_service_id=' + order_service_id + "&fromType=" + fromType, + }) + } else { + wx.navigateBack({ + delta: 1, + }) + } }else { if (fromType) { wx.redirectTo({ @@ -268,6 +281,11 @@ Page({ this.setData({ order_detection_id:data.order_no }) + }else if(order_type==4 || order_type==5){ + this.setData({ + order_service_id:data.order_no + }) + } let { @@ -621,21 +639,25 @@ Page({ }) }else if(options.order_type==4){//随访包订单 + let order_service_id=options.order_service_id; this.setData({ order_type: 4, doctor_id: options.doctor_id, inquiry_type:options.inquiry_type, order_no: options.inquiry_no, chat_id: options.chat_id, + order_service_id:order_service_id?order_service_id:'', inquiry_mode: options.inquiry_mode }) }else if(options.order_type==5){//健康包订单 + let order_service_id=options.order_service_id; this.setData({ order_type:5, doctor_id: options.doctor_id, inquiry_type:options.inquiry_type, order_no: options.inquiry_no, chat_id: options.chat_id, + order_service_id:order_service_id?order_service_id:'', inquiry_mode: options.inquiry_mode }) }else { diff --git a/sugarCheck/pages/checkOrderDetail/checkOrderDetail.js b/sugarCheck/pages/checkOrderDetail/checkOrderDetail.js index 7e791f6..d0781d4 100644 --- a/sugarCheck/pages/checkOrderDetail/checkOrderDetail.js +++ b/sugarCheck/pages/checkOrderDetail/checkOrderDetail.js @@ -508,7 +508,7 @@ copy(event){ goPay:throttle(function(){ let {order_detection_id,detection_no}=this.data.order; app.method.navigateTo({ - url: '/patient/pages/payOrder/payOrder?inquiry_no='+ detection_no +"&order_detection_id="+order_detection_id+"&order_type=3&fromType="+encodeURIComponent('/sugarCheck/pages/checkOrder/checkOrder') + url: '/patient/pages/payOrder/payOrder?inquiry_no='+ detection_no +"&order_detection_id="+order_detection_id+"&order_type=3&fromType="+encodeURIComponent('sugarCheck/pages/checkOrder/checkOrder') }) }), handelDelProduct(){