订单增加详情、调整婚检跳转

main
yanzai 12 months ago
parent b065c35910
commit feb428d7b9

@ -56,6 +56,7 @@ class OrderController extends Controller
if (!!$order_info) { if (!!$order_info) {
$order_info->buy_info = json_decode($order_info->buy_info, true); $order_info->buy_info = json_decode($order_info->buy_info, true);
$order_info->erxian_appointment_info = json_decode($order_info->erxian_appointment_info, true); $order_info->erxian_appointment_info = json_decode($order_info->erxian_appointment_info, true);
$order_info->appointment_back_info = json_decode($order_info->appointment_back_info, true);
} else { } else {
return \Yz::echoError1('未找到有效订单'); return \Yz::echoError1('未找到有效订单');
} }
@ -257,6 +258,7 @@ class OrderController extends Controller
'group_name' => $group_info['group_name'], 'group_name' => $group_info['group_name'],
'items' => $group_info['items'], 'items' => $group_info['items'],
'group_id' => $group_info['group_id'], 'group_id' => $group_info['group_id'],
'have_Nx1'=> !empty($Nx1_arrInfo)
]; ];
$TJ_Leixing_id = $group_info['checkup_type_id']; $TJ_Leixing_id = $group_info['checkup_type_id'];
$title = "单位团检" . $group_info['combo_name']; $title = "单位团检" . $group_info['combo_name'];
@ -850,7 +852,7 @@ class OrderController extends Controller
} }
$cad = array_merge($cad, $cad2); $cad = array_merge($cad, $cad2);
} else { } else {
if(isset($buy_info['group']['items'])){ if(isset($buy_info['group']['items']) and $buy_info['group']['have_Nx1']===true){
$item_temp=[]; $item_temp=[];
foreach ($buy_info['group']['items'] as $gitem) { foreach ($buy_info['group']['items'] as $gitem) {
$item_temp[]=[ $item_temp[]=[

@ -6,6 +6,7 @@ use App\Http\Controllers\API\PEISApiController;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
class PersonController extends Controller class PersonController extends Controller
{ {
@ -35,6 +36,7 @@ class PersonController extends Controller
"单位Id"=>$group_info['单位Id'] "单位Id"=>$group_info['单位Id']
]; ];
$fenzu = $peis::Post('单位分组批次查询', 1, $data); $fenzu = $peis::Post('单位分组批次查询', 1, $data);
// Log::info(json_encode($fenzu,JSON_UNESCAPED_UNICODE));
if(empty($fenzu['data'])) break; if(empty($fenzu['data'])) break;
foreach ($fenzu['data'][0]['分组'] as $key => $value) { foreach ($fenzu['data'][0]['分组'] as $key => $value) {
if($value['Id']==$group_info['分组Id']){ if($value['Id']==$group_info['分组Id']){

@ -120,12 +120,27 @@
url: '/pages/main/ctime/ctime?id=' + id url: '/pages/main/ctime/ctime?id=' + id
}) })
} }
let erweima_popup=ref(null); let erweima_popup = ref(null);
let show_erweima_text=ref(''); let show_erweima_text = ref('');
const erweima_click=(text)=>{ const erweima_click = (text) => {
show_erweima_text.value=text show_erweima_text.value = text
erweima_popup.value.open() erweima_popup.value.open()
} }
let detail_popup = ref(null);
let OrderInfoDetail = ref({});
const click_detail = async (order) => {
detail_popup.value.open()
uni.showLoading();
const response = await $api("GetOrderDetail", {
id: order.id,
});
uni.hideLoading();
$response(response, () => {
if (response.status) {
OrderInfoDetail.value = response.data.info
}
})
}
onMounted(() => { onMounted(() => {
deepInfo(); deepInfo();
}); });
@ -142,11 +157,72 @@
}"></w-qrcode> }"></w-qrcode>
</view> </view>
</uni-popup> </uni-popup>
<uni-popup ref="detail_popup" type="center" :animation="false">
<view style="background-color: #fff;padding: 20rpx;border-radius: 10rpx; width: 600rpx;" v-if="OrderInfoDetail.buy_info">
<view>{{OrderInfoDetail.title}}</view>
<view class="OrderInfoRow">
<view class="row_label">体检人:</view>
<view class="row_value">{{OrderInfoDetail.name}}</view>
</view>
<view class="OrderInfoRow">
<view class="row_label">订单号:</view>
<view class="row_value">{{OrderInfoDetail.order_number}}</view>
</view>
<view class="OrderInfoRow">
<view class="row_label">类型:</view>
<view class="row_value"><span v-if="OrderInfoDetail.type==1"></span><span
v-if="OrderInfoDetail.type==2">团检</span></view>
</view>
<view class="OrderInfoRow">
<view class="row_label">预约时间:</view>
<view class="row_value">{{OrderInfoDetail.appointment_date}} {{OrderInfoDetail.appointment_time}}
</view>
</view>
<view class="OrderInfoRow" v-if="OrderInfoDetail.erxian_appointment_info &&OrderInfoDetail.erxian_appointment_info.length>0">
<view class="row_label">核磁项目:</view>
<view class="row_value" v-for="(item,index) in OrderInfoDetail.erxian_appointment_info" :key="index">
<view>{{item.name}}</view>
<view style="margin-top: 10rpx;">预约时间{{OrderInfoDetail.erxian_appointment_info[0].date}} {{OrderInfoDetail.erxian_appointment_info[0].time}}</view>
</view>
</view>
<view class="OrderInfoRow" v-if="OrderInfoDetail.source==null && OrderInfoDetail.buy_info.items && OrderInfoDetail.buy_info.items.length>0">
<view class="row_label">自选项目:</view>
<view class="row_value">
<view v-for="(item,index) in OrderInfoDetail.buy_info.items" :key="index"> {{item.name}} </view>
</view>
</view>
<view class="OrderInfoRow">
<view class="row_label">订单状态:</view>
<view class="row_value">
<view v-if="[1].includes(OrderInfoDetail.status)"> </view>
<view
v-if="[2].includes(OrderInfoDetail.status) ">
已支付 </view>
<view v-if="[3, 5].includes(OrderInfoDetail.status)"> </view>
<view v-if="[4].includes(OrderInfoDetail.status)"> </view>
</view>
</view>
<view class="OrderInfoRow">
<view class="row_label">预约状态:</view>
<view class="row_value"><span v-if="OrderInfoDetail.appointment_number"></span><span
v-else>预约未成功</span></view>
</view>
<view class="OrderInfoRow">
<view class="row_label">下单时间:</view>
<view class="row_value">{{OrderInfoDetail.created_at}}
</view>
</view>
</view>
</uni-popup>
<view v-if="!!order_info" class="order_wrapper"> <view v-if="!!order_info" class="order_wrapper">
<view class="order_status_wrapper" :class="[`status${order_info.status}`]"> <view class="order_status_wrapper" :class="[`status${order_info.status}`]">
<view v-if="[1].includes(order_info.status)"> </view> <view v-if="[1].includes(order_info.status)"> </view>
<view v-if="[2].includes(order_info.status) && order_info.appointment_number!=null && order_info.appointment_number!=''"> </view> <view
<view v-if="[2].includes(order_info.status) && (order_info.appointment_number==null || order_info.appointment_number=='')"> </view> v-if="[2].includes(order_info.status) && order_info.appointment_number!=null && order_info.appointment_number!=''">
已预约 </view>
<view
v-if="[2].includes(order_info.status) && (order_info.appointment_number==null || order_info.appointment_number=='')">
预约失败 </view>
<view v-if="[3, 5].includes(order_info.status)"> </view> <view v-if="[3, 5].includes(order_info.status)"> </view>
<view v-if="[4].includes(order_info.status)"> </view> <view v-if="[4].includes(order_info.status)"> </view>
</view> </view>
@ -163,12 +239,13 @@
<view class="order_info_line_wrapper"> <view class="order_info_line_wrapper">
<view class="order_info_line_label_wrapper">预约时间</view> <view class="order_info_line_label_wrapper">预约时间</view>
<view class="order_info_line_value_wrapper"> <view class="order_info_line_value_wrapper">
{{order_info.date}} {{order_info.time.substring(',',5)}}</view> {{order_info.date}} {{order_info.time.substring(',',5)}}
</view>
</view> </view>
</view> </view>
<view v-if="order_info.status==2 || order_info.status==4" > <view v-if="(order_info.status==2 || order_info.status==4)">
<w-qrcode @click="erweima_click(order_info.appointment_number)" class="absolute top-80rpx right-15rpx b-1 b-dashed b-#000 p-8rpx" <w-qrcode @click="erweima_click(order_info.appointment_number)"
:options="{ class="absolute top-80rpx right-15rpx b-1 b-dashed b-#000 p-8rpx" :options="{
level: 4, level: 4,
size: 150, size: 150,
code: order_info.appointment_number, code: order_info.appointment_number,
@ -177,16 +254,18 @@
</view> </view>
<view class="order_info_line_wrapper"> <view class="order_info_line_wrapper">
<view class="order_info_line_label_wrapper">订单号</view> <view class="order_info_line_label_wrapper">订单号</view>
<view class="order_info_line_value_wrapper">{{ <view class="order_info_line_value_wrapper">
order_info.order {{order_info.order}}
}}</view> </view>
</view> </view>
<view class="order_info_line_wrapper"> <view class="order_info_line_wrapper">
<view class="order_info_line_label_wrapper">类型</view> <view class="order_info_line_label_wrapper">类型</view>
<view class="order_info_line_value_wrapper">{{ <view class="order_info_line_value_wrapper">
order_info.type {{order_info.type}}
}}</view> </view>
</view> </view>
<view style="display: flex;justify-content: space-between;">
<view @click="click_detail(order_info)" class="click_detail">查看详情>>></view>
<view v-if="[1, 2, 4, 5].includes(order_info.status)" class="order_price_wrapper"> <view v-if="[1, 2, 4, 5].includes(order_info.status)" class="order_price_wrapper">
<text v-if="[1].includes(order_info.status)"></text> <text v-if="[1].includes(order_info.status)"></text>
<text v-if="[2, 4].includes(order_info.status)"></text> <text v-if="[2, 4].includes(order_info.status)"></text>
@ -195,6 +274,8 @@
v-if="order_info.true_price !== order_info.price">(实付:{{ order_info.true_price }})</text> v-if="order_info.true_price !== order_info.price">(实付:{{ order_info.true_price }})</text>
<text class="price_text">{{ order_info.price }}</text> <text class="price_text">{{ order_info.price }}</text>
</view> </view>
</view>
<view class="order_line_wrapper"></view> <view class="order_line_wrapper"></view>
<view v-if="![3].includes(order_info.status)" class="order_pay_wrapper"> <view v-if="![3].includes(order_info.status)" class="order_pay_wrapper">
<view class="order_pay_time_wrapper"> <view class="order_pay_time_wrapper">
@ -215,8 +296,9 @@
<view class="order_pay_button_wrapper"> <view class="order_pay_button_wrapper">
<view v-if="[1].includes(order_info.status)" @click="StartPay(order_info.id)" <view v-if="[1].includes(order_info.status)" @click="StartPay(order_info.id)"
class="button_item_wrapper pay_button_wrapper">继续付款</view> class="button_item_wrapper pay_button_wrapper">继续付款</view>
<view v-if="[2].includes(order_info.status) && order_info.appointment_number!=null && order_info.appointment_number!=''" @click="GaiYueClick(order_info.id)" <view
class="button_item_wrapper change_button_wrapper"> v-if="[2].includes(order_info.status) && order_info.appointment_number!=null && order_info.appointment_number!=''"
@click="GaiYueClick(order_info.id)" class="button_item_wrapper change_button_wrapper">
改约</view> 改约</view>
<view v-if="[2].includes(order_info.status)" @click="Refound(order_info.id)" <view v-if="[2].includes(order_info.status)" @click="Refound(order_info.id)"
class="button_item_wrapper refund_button_wrapper">退款</view> class="button_item_wrapper refund_button_wrapper">退款</view>
@ -314,7 +396,7 @@
font-weight: 400; font-weight: 400;
color: #111111; color: #111111;
line-height: 1; line-height: 1;
margin-top: 28rpx;
text-align: right; text-align: right;
margin-right: 30rpx; margin-right: 30rpx;
font-size: 26rpx; font-size: 26rpx;
@ -404,4 +486,28 @@
padding-top: 35rpx; padding-top: 35rpx;
margin-top: 16rpx; margin-top: 16rpx;
} }
.click_detail {
font-size: 24rpx;
color: #239ea3;
margin-left: 30rpx;
margin-top: 20rpx;
font-weight: 700;
}
.OrderInfoRow {
display: flex;
font-size: 26rpx;
margin-top: 16rpx;
color: #666;
}
.row_label {
width: 150rpx
}
.row_value {
margin-left: 20rpx;
}
</style> </style>

@ -223,7 +223,8 @@
}) })
$response(response, () => { $response(response, () => {
uni.navigateTo({ uni.navigateTo({
url: '/pages/main/combo/combo' // url: '/pages/main/combo/combo',
url: '/pages/main/selectDoctor/selectDoctor?month=all'
}) })
}) })
} }

Loading…
Cancel
Save