diff --git a/api/health.js b/api/health.js index 4800c35..3ecfea1 100644 --- a/api/health.js +++ b/api/health.js @@ -8,12 +8,28 @@ function getServiceDetail(data){ function createServiceOrder(data){ return request('/patient/service','POST',data,true) } +function serviceList(data){ //获取患者检测订单列表 + return request('/patient/order/service','GET',data) + }; + function serviceDetail(id){ //获取患者检测订单详情 + return request('/patient/order/detection/'+id,'GET',{}) + }; + function cancelCheckPay(id){ //取消支付 + return request('/patient/order/detection/cancel-pay/'+id,'PUT') + }; + function cancelCheckOrder(id){ //取消支付 + return request('/patient/order/detection/cancel/'+id,'PUT') + }; + function delCheckOrder(id){ + return request('/patient/order/detection/'+id,'DELETE') + }; module.exports={ + serviceList, getItems, getServiceDetail, createServiceOrder diff --git a/healthyService/pages/healthyDetail/healthyDetail.js b/healthyService/pages/healthyDetail/healthyDetail.js index 5ed7d42..590146e 100644 --- a/healthyService/pages/healthyDetail/healthyDetail.js +++ b/healthyService/pages/healthyDetail/healthyDetail.js @@ -245,7 +245,7 @@ Page({ }).then((res)=>{ if(res.status==1){ app.method.navigateTo({ - url:'/healthyService/pages/writeSick/writeSick?doctor_id='+doctor_id+"&family_id="+currentFamilyId+"&chat_id="+chat_id+"&inquiry_type="+inquiry_type+"&sex="+sex+"&inquiry_mode="+inquiry_mode+"&package_id="+follow_package_item_id + url:'/healthyService/pages/writeSick/writeSick?doctor_id='+doctor_id+"&family_id="+currentFamilyId+"&chat_id="+chat_id+"&inquiry_type="+inquiry_type+"&sex="+sex+"&inquiry_mode="+inquiry_mode }) }else if(res.status==2){ diff --git a/healthyService/pages/healthyOrder/healthyOrder.js b/healthyService/pages/healthyOrder/healthyOrder.js index 5417291..02803f7 100644 --- a/healthyService/pages/healthyOrder/healthyOrder.js +++ b/healthyService/pages/healthyOrder/healthyOrder.js @@ -1,6 +1,6 @@ // pages/consultOrder/consultOrder.js const app = getApp() -import {detectionList} from "../../../api/checkSugar" +import {serviceList} from "../../../api/health" import{family} from "../../../api/familyDoc" Page({ @@ -18,17 +18,16 @@ Page({ option1: [ { text: '全部订单', value: 0 }, { text: '待支付', value: 1 }, - { text: '待绑定', value: 2 }, - { text: '检测中', value: 3}, - { text: '检测完成', value: 4}, - {text:'已取消',value:5} + { text: '待接诊', value: 2 }, + { text: '服务中', value: 3}, + { text: '完成/取消', value: 4} ], page:1, isTriggered:false, pageNumber:10, option2: [], - detection_status: 0, + order_service_status: 0, family_id:0, orderList:[], isLock:false, @@ -41,7 +40,7 @@ Page({ page:1, orderList:[] }) - this.getDetectionList(); + this.getServiceList(); }, goBack(flag=true){ @@ -79,7 +78,7 @@ Page({ this.setData({ page: ++this.data.page }) - this.getDetectionList() + this.getServiceList() } }, goExpertList(){ @@ -92,10 +91,10 @@ Page({ isLock:false, page:1, selectstatus:true, - detection_status:detail, + order_service_status:detail, orderList:[] }) - this.getDetectionList() + this.getServiceList() }, changeFamily({ detail }){ this.setData({ @@ -105,15 +104,15 @@ Page({ page:1, orderList:[] }) - this.getDetectionList() + this.getServiceList() }, - getDetectionList(){ - let {detection_status,family_id,page,pageNumber}=this.data; + getServiceList(){ + let {order_service_status,family_id,page,pageNumber}=this.data; this.setData({ isLoading:true }) - detectionList({ - detection_status, + serviceList({ + order_service_status, family_id, page, per_page:pageNumber @@ -166,7 +165,7 @@ Page({ this.setData({ option2:arr }) - this.getDetectionList(); + this.getServiceList(); }) }, @@ -224,7 +223,7 @@ Page({ for (let i = 0; i < orderList.length; i++) { const item =orderList[i]; if(item.order_detection_id==changeId){ - let currentitem=`orderList[${i}].detection_status` + 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 8a33a73..387833b 100644 --- a/healthyService/pages/healthyOrder/healthyOrder.wxml +++ b/healthyService/pages/healthyOrder/healthyOrder.wxml @@ -3,12 +3,12 @@ - 检测订单 + 服务包订单 - + diff --git a/healthyService/pages/writeSick/writeSick.js b/healthyService/pages/writeSick/writeSick.js index 0681775..06418cb 100644 --- a/healthyService/pages/writeSick/writeSick.js +++ b/healthyService/pages/writeSick/writeSick.js @@ -804,6 +804,7 @@ Page({ chat_id: options.chat_id, inquiry_type: options.inquiry_type, inquiry_mode: options.inquiry_mode, + service_type:options.inquiry_mode==9?2:1, sex: options.sex }) } else {