创建订单
This commit is contained in:
parent
06d21668de
commit
ce704785b4
@ -8,12 +8,28 @@ function getServiceDetail(data){
|
|||||||
function createServiceOrder(data){
|
function createServiceOrder(data){
|
||||||
return request('/patient/service','POST',data,true)
|
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={
|
module.exports={
|
||||||
|
serviceList,
|
||||||
getItems,
|
getItems,
|
||||||
getServiceDetail,
|
getServiceDetail,
|
||||||
createServiceOrder
|
createServiceOrder
|
||||||
|
|||||||
@ -245,7 +245,7 @@ Page({
|
|||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
if(res.status==1){
|
if(res.status==1){
|
||||||
app.method.navigateTo({
|
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){
|
}else if(res.status==2){
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
// pages/consultOrder/consultOrder.js
|
// pages/consultOrder/consultOrder.js
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
import {detectionList} from "../../../api/checkSugar"
|
import {serviceList} from "../../../api/health"
|
||||||
import{family} from "../../../api/familyDoc"
|
import{family} from "../../../api/familyDoc"
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
@ -18,17 +18,16 @@ Page({
|
|||||||
option1: [
|
option1: [
|
||||||
{ text: '全部订单', value: 0 },
|
{ text: '全部订单', value: 0 },
|
||||||
{ text: '待支付', value: 1 },
|
{ text: '待支付', value: 1 },
|
||||||
{ text: '待绑定', value: 2 },
|
{ text: '待接诊', value: 2 },
|
||||||
{ text: '检测中', value: 3},
|
{ text: '服务中', value: 3},
|
||||||
{ text: '检测完成', value: 4},
|
{ text: '完成/取消', value: 4}
|
||||||
{text:'已取消',value:5}
|
|
||||||
|
|
||||||
],
|
],
|
||||||
page:1,
|
page:1,
|
||||||
isTriggered:false,
|
isTriggered:false,
|
||||||
pageNumber:10,
|
pageNumber:10,
|
||||||
option2: [],
|
option2: [],
|
||||||
detection_status: 0,
|
order_service_status: 0,
|
||||||
family_id:0,
|
family_id:0,
|
||||||
orderList:[],
|
orderList:[],
|
||||||
isLock:false,
|
isLock:false,
|
||||||
@ -41,7 +40,7 @@ Page({
|
|||||||
page:1,
|
page:1,
|
||||||
orderList:[]
|
orderList:[]
|
||||||
})
|
})
|
||||||
this.getDetectionList();
|
this.getServiceList();
|
||||||
},
|
},
|
||||||
goBack(flag=true){
|
goBack(flag=true){
|
||||||
|
|
||||||
@ -79,7 +78,7 @@ Page({
|
|||||||
this.setData({
|
this.setData({
|
||||||
page: ++this.data.page
|
page: ++this.data.page
|
||||||
})
|
})
|
||||||
this.getDetectionList()
|
this.getServiceList()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
goExpertList(){
|
goExpertList(){
|
||||||
@ -92,10 +91,10 @@ Page({
|
|||||||
isLock:false,
|
isLock:false,
|
||||||
page:1,
|
page:1,
|
||||||
selectstatus:true,
|
selectstatus:true,
|
||||||
detection_status:detail,
|
order_service_status:detail,
|
||||||
orderList:[]
|
orderList:[]
|
||||||
})
|
})
|
||||||
this.getDetectionList()
|
this.getServiceList()
|
||||||
},
|
},
|
||||||
changeFamily({ detail }){
|
changeFamily({ detail }){
|
||||||
this.setData({
|
this.setData({
|
||||||
@ -105,15 +104,15 @@ Page({
|
|||||||
page:1,
|
page:1,
|
||||||
orderList:[]
|
orderList:[]
|
||||||
})
|
})
|
||||||
this.getDetectionList()
|
this.getServiceList()
|
||||||
},
|
},
|
||||||
getDetectionList(){
|
getServiceList(){
|
||||||
let {detection_status,family_id,page,pageNumber}=this.data;
|
let {order_service_status,family_id,page,pageNumber}=this.data;
|
||||||
this.setData({
|
this.setData({
|
||||||
isLoading:true
|
isLoading:true
|
||||||
})
|
})
|
||||||
detectionList({
|
serviceList({
|
||||||
detection_status,
|
order_service_status,
|
||||||
family_id,
|
family_id,
|
||||||
page,
|
page,
|
||||||
per_page:pageNumber
|
per_page:pageNumber
|
||||||
@ -166,7 +165,7 @@ Page({
|
|||||||
this.setData({
|
this.setData({
|
||||||
option2:arr
|
option2:arr
|
||||||
})
|
})
|
||||||
this.getDetectionList();
|
this.getServiceList();
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -224,7 +223,7 @@ Page({
|
|||||||
for (let i = 0; i < orderList.length; i++) {
|
for (let i = 0; i < orderList.length; i++) {
|
||||||
const item =orderList[i];
|
const item =orderList[i];
|
||||||
if(item.order_detection_id==changeId){
|
if(item.order_detection_id==changeId){
|
||||||
let currentitem=`orderList[${i}].detection_status`
|
let currentitem=`orderList[${i}].order_service_status`
|
||||||
this.setData({
|
this.setData({
|
||||||
[currentitem]:changeStatus
|
[currentitem]:changeStatus
|
||||||
})
|
})
|
||||||
|
|||||||
@ -3,12 +3,12 @@
|
|||||||
<view class="page">
|
<view class="page">
|
||||||
<view class="ui-navigatorbar" style="border-bottom: 1rpx solid #E3E4E5;background:#fff">
|
<view class="ui-navigatorbar" style="border-bottom: 1rpx solid #E3E4E5;background:#fff">
|
||||||
<image class="ui-navigatorbar-back" bindtap="goBack" src="{{img_host+'/back.png'}}" />
|
<image class="ui-navigatorbar-back" bindtap="goBack" src="{{img_host+'/back.png'}}" />
|
||||||
<view class="ui-title">检测订单</view>
|
<view class="ui-title">服务包订单</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="dropdown">
|
<view class="dropdown">
|
||||||
<view class="bar"></view>
|
<view class="bar"></view>
|
||||||
<van-dropdown-menu active-color="#3CC7C0">
|
<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-item value="{{ family_id }}" title-class="droptitle {{selectfamily?'active':''}}" options="{{ option2 }}" bind:change="changeFamily" />
|
||||||
</van-dropdown-menu>
|
</van-dropdown-menu>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -804,6 +804,7 @@ Page({
|
|||||||
chat_id: options.chat_id,
|
chat_id: options.chat_id,
|
||||||
inquiry_type: options.inquiry_type,
|
inquiry_type: options.inquiry_type,
|
||||||
inquiry_mode: options.inquiry_mode,
|
inquiry_mode: options.inquiry_mode,
|
||||||
|
service_type:options.inquiry_mode==9?2:1,
|
||||||
sex: options.sex
|
sex: options.sex
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user