创建订单
This commit is contained in:
parent
06d21668de
commit
ce704785b4
@ -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
|
||||
|
||||
@ -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){
|
||||
|
||||
|
||||
@ -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
|
||||
})
|
||||
|
||||
@ -3,12 +3,12 @@
|
||||
<view class="page">
|
||||
<view class="ui-navigatorbar" style="border-bottom: 1rpx solid #E3E4E5;background:#fff">
|
||||
<image class="ui-navigatorbar-back" bindtap="goBack" src="{{img_host+'/back.png'}}" />
|
||||
<view class="ui-title">检测订单</view>
|
||||
<view class="ui-title">服务包订单</view>
|
||||
</view>
|
||||
<view class="dropdown">
|
||||
<view class="bar"></view>
|
||||
<van-dropdown-menu active-color="#3CC7C0">
|
||||
<van-dropdown-item value="{{ detection_status }}" options="{{ option1 }}" title-class="droptitle {{selectstatus?'active':''}}" bind:change="changeStatus" />
|
||||
<van-dropdown-item value="{{ order_service_status }}" options="{{ option1 }}" title-class="droptitle {{selectstatus?'active':''}}" bind:change="changeStatus" />
|
||||
<van-dropdown-item value="{{ family_id }}" title-class="droptitle {{selectfamily?'active':''}}" options="{{ option2 }}" bind:change="changeFamily" />
|
||||
</van-dropdown-menu>
|
||||
</view>
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user