|
@@ -7,7 +7,7 @@
|
|
<view style="width: 25%;">订单号:</view>
|
|
<view style="width: 25%;">订单号:</view>
|
|
<view style="width: 50%;">{{orderID}}</view>
|
|
<view style="width: 50%;">{{orderID}}</view>
|
|
<view style="width: 25%;" class="flex justify-center">
|
|
<view style="width: 25%;" class="flex justify-center">
|
|
- <view class="but" >门诊预约</view>
|
|
|
|
|
|
+ <view class="but">门诊预约</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- 线 -->
|
|
<!-- 线 -->
|
|
@@ -55,12 +55,14 @@
|
|
<view class="right" v-else-if="zt==3">进行中</view>
|
|
<view class="right" v-else-if="zt==3">进行中</view>
|
|
<view class="right" v-else-if="zt==4">已完成</view>
|
|
<view class="right" v-else-if="zt==4">已完成</view>
|
|
<view class="right" v-else-if="zt==5">已取消</view>
|
|
<view class="right" v-else-if="zt==5">已取消</view>
|
|
|
|
+ <view class="right" v-else-if="zt==6">已超时</view>
|
|
|
|
+ <view class="right" v-else-if="zt==7">已预约</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<u-gap height="30" bg-color="#f6f6f6"></u-gap>
|
|
<u-gap height="30" bg-color="#f6f6f6"></u-gap>
|
|
<!-- 底部按钮 -->
|
|
<!-- 底部按钮 -->
|
|
<!-- 当订单状态为未接单 zt==0 -->
|
|
<!-- 当订单状态为未接单 zt==0 -->
|
|
- <view class="bottomButton" v-if="zt <= 2">
|
|
|
|
|
|
+ <view class="bottomButton" v-if="zt == 2">
|
|
<!-- 左边的首页按钮 -->
|
|
<!-- 左边的首页按钮 -->
|
|
<view style="width: 20%;" class="flex align-center justify-center">
|
|
<view style="width: 20%;" class="flex align-center justify-center">
|
|
<u-icon name="home" size="50" @click="home"></u-icon>
|
|
<u-icon name="home" size="50" @click="home"></u-icon>
|
|
@@ -81,11 +83,11 @@
|
|
<!-- 右边的其他按钮 -->
|
|
<!-- 右边的其他按钮 -->
|
|
<view style="width: 80%;" class="flex justify-end align-center">
|
|
<view style="width: 80%;" class="flex justify-end align-center">
|
|
<view class="b">
|
|
<view class="b">
|
|
- <u-button shape="circle" :custom-style="btStyle" @click="querenok" >确认完成</u-button>
|
|
|
|
|
|
+ <u-button shape="circle" :custom-style="btStyle" @click="querenok">确认完成</u-button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="bottomButton" v-else-if="zt > 3">
|
|
|
|
|
|
+ <view class="bottomButton" v-else-if="zt > 3&&zt!=7">
|
|
<!-- 左边的首页按钮 -->
|
|
<!-- 左边的首页按钮 -->
|
|
<view style="width: 20%;" class="flex align-center justify-center">
|
|
<view style="width: 20%;" class="flex align-center justify-center">
|
|
<u-icon name="home" size="50" @click="home"></u-icon>
|
|
<u-icon name="home" size="50" @click="home"></u-icon>
|
|
@@ -97,8 +99,8 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -106,25 +108,25 @@
|
|
export default {
|
|
export default {
|
|
onLoad(options) {
|
|
onLoad(options) {
|
|
let ids = options.data;
|
|
let ids = options.data;
|
|
- if(ids!=''&&ids!=0){
|
|
|
|
|
|
+ if (ids != '' && ids != 0) {
|
|
this.xhrId = ids;
|
|
this.xhrId = ids;
|
|
// 执行渲染
|
|
// 执行渲染
|
|
this.getInfos(ids);
|
|
this.getInfos(ids);
|
|
-
|
|
|
|
- }else{
|
|
|
|
|
|
+
|
|
|
|
+ } else {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
- title:'请求错误',
|
|
|
|
- icon:'none'
|
|
|
|
|
|
+ title: '请求错误',
|
|
|
|
+ icon: 'none'
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- console.log('详情:',options);
|
|
|
|
|
|
+ console.log('详情:', options);
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
|
|
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- xhrId:0,
|
|
|
|
|
|
+ xhrId: 0,
|
|
// 上部数据
|
|
// 上部数据
|
|
orderID: 'ZX202000010', //订单号
|
|
orderID: 'ZX202000010', //订单号
|
|
|
|
|
|
@@ -132,13 +134,13 @@
|
|
name: '', //名字
|
|
name: '', //名字
|
|
age: '', //年龄
|
|
age: '', //年龄
|
|
ID: '', //身份证
|
|
ID: '', //身份证
|
|
- appointment:'',
|
|
|
|
|
|
+ appointment: '',
|
|
//下部数据
|
|
//下部数据
|
|
placeTime: '', //下单时间
|
|
placeTime: '', //下单时间
|
|
xiadankh: '', //下单客户
|
|
xiadankh: '', //下单客户
|
|
zt: 0, // 状态 0未履行 1已完成
|
|
zt: 0, // 状态 0未履行 1已完成
|
|
- local:'',
|
|
|
|
-
|
|
|
|
|
|
+ local: '',
|
|
|
|
+
|
|
//下部按钮样式
|
|
//下部按钮样式
|
|
bStyle: {
|
|
bStyle: {
|
|
width: '100%',
|
|
width: '100%',
|
|
@@ -155,19 +157,21 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
-
|
|
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 详情渲染
|
|
* 详情渲染
|
|
* @author Liu Yuanhang
|
|
* @author Liu Yuanhang
|
|
* @param {Object} id
|
|
* @param {Object} id
|
|
*/
|
|
*/
|
|
- getInfos:async function(id){
|
|
|
|
- // 获取信息
|
|
|
|
- let res = await this.$request.post("patient/orderPatientDetail",{patient_id:id});
|
|
|
|
- if(res.status==0){
|
|
|
|
- let datas = res.data;
|
|
|
|
- this.orderID = datas.order_sn;
|
|
|
|
- this.name = datas.name;
|
|
|
|
|
|
+ getInfos: async function(id) {
|
|
|
|
+ // 获取信息
|
|
|
|
+ let res = await this.$request.post("patient/orderPatientDetail", {
|
|
|
|
+ patient_id: id
|
|
|
|
+ });
|
|
|
|
+ if (res.status == 0) {
|
|
|
|
+ let datas = res.data;
|
|
|
|
+ this.orderID = datas.order_sn;
|
|
|
|
+ this.name = datas.name;
|
|
this.age = datas.numbirthday;
|
|
this.age = datas.numbirthday;
|
|
this.ID = datas.card_number;
|
|
this.ID = datas.card_number;
|
|
this.appointment = datas.appoint_time;
|
|
this.appointment = datas.appoint_time;
|
|
@@ -175,63 +179,67 @@
|
|
this.xiadankh = datas.nickname;
|
|
this.xiadankh = datas.nickname;
|
|
this.zt = datas.order_status;
|
|
this.zt = datas.order_status;
|
|
this.local = datas.organization;
|
|
this.local = datas.organization;
|
|
-
|
|
|
|
- }else{
|
|
|
|
- uni.showToast({
|
|
|
|
- title:res.message,
|
|
|
|
- duration:3000
|
|
|
|
- })
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: res.message,
|
|
|
|
+ duration: 3000
|
|
|
|
+ })
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 接单
|
|
* 接单
|
|
* @author Liu Yuanhang
|
|
* @author Liu Yuanhang
|
|
* @param {Object} e
|
|
* @param {Object} e
|
|
*/
|
|
*/
|
|
- queren:async function(e) {
|
|
|
|
|
|
+ queren: async function(e) {
|
|
this.zt = 3;
|
|
this.zt = 3;
|
|
- let res = await this.$request.post("patient/putOrderPatient",{order_id:this.xhrId});
|
|
|
|
- console.log('接单:',res);
|
|
|
|
- if(res.status==0){
|
|
|
|
|
|
+ let res = await this.$request.post("patient/putOrderPatient", {
|
|
|
|
+ order_id: this.xhrId
|
|
|
|
+ });
|
|
|
|
+ console.log('接单:', res);
|
|
|
|
+ if (res.status == 0) {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
- title:"接单成功!",
|
|
|
|
- duration:3000
|
|
|
|
|
|
+ title: "接单成功!",
|
|
|
|
+ duration: 3000
|
|
})
|
|
})
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
- title:res.message,
|
|
|
|
- duration:3000
|
|
|
|
|
|
+ title: res.message,
|
|
|
|
+ duration: 3000
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 门诊预约完成订单
|
|
* 门诊预约完成订单
|
|
* @author Liu Yuanhang
|
|
* @author Liu Yuanhang
|
|
*/
|
|
*/
|
|
- querenok:async function(){
|
|
|
|
|
|
+ querenok: async function() {
|
|
this.zt = 4;
|
|
this.zt = 4;
|
|
- let res = await this.$request.post("patient/mzPatientok",{order_id:this.xhrId});
|
|
|
|
- console.log('完成接单:',res);
|
|
|
|
- if(res.status==0){
|
|
|
|
|
|
+ let res = await this.$request.post("patient/mzPatientok", {
|
|
|
|
+ order_id: this.xhrId
|
|
|
|
+ });
|
|
|
|
+ console.log('完成接单:', res);
|
|
|
|
+ if (res.status == 0) {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
- title:"操作成功!",
|
|
|
|
- duration:3000
|
|
|
|
|
|
+ title: "操作成功!",
|
|
|
|
+ duration: 3000
|
|
})
|
|
})
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
- title:res.message,
|
|
|
|
- duration:3000
|
|
|
|
|
|
+ title: res.message,
|
|
|
|
+ duration: 3000
|
|
})
|
|
})
|
|
}
|
|
}
|
|
console.log('确认订单完成')
|
|
console.log('确认订单完成')
|
|
},
|
|
},
|
|
- home(e){
|
|
|
|
|
|
+ home(e) {
|
|
uni.switchTab({
|
|
uni.switchTab({
|
|
- url:'/pages/index/index'
|
|
|
|
|
|
+ url: '/pages/index/index'
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|