到检接口,团检屏蔽材料费,详情返回ct和核磁。改约

wenjuan
yanzai 1 year ago
parent d20a046a09
commit fe4a354593

@ -182,6 +182,7 @@ select combo_id as c_id,count(*) as count from orders where status in(2,4) group
$pay_item_count = 0;//需自费项目个数 $pay_item_count = 0;//需自费项目个数
$all_original_price = 0; $all_original_price = 0;
$true_price = 0; $true_price = 0;
$nmr_list=[];
if (isset($combo_id) and $combo_id != 0) { if (isset($combo_id) and $combo_id != 0) {
// $combo=DB::table('combos')->where(['hospital_id'=>$hospital_id,'combo_id'=>$combo_id,'status'=>1])->first(); // $combo=DB::table('combos')->where(['hospital_id'=>$hospital_id,'combo_id'=>$combo_id,'status'=>1])->first();
$combo = DB::select("select a.*,b.*,c.name as crowd_name from combos as a LEFT JOIN ( $combo = DB::select("select a.*,b.*,c.name as crowd_name from combos as a LEFT JOIN (
@ -231,6 +232,17 @@ select combo_id as c_id,count(*) as sale_count from orders where status in(2,4)
} }
$pay_item_count += $combo->item_count; $pay_item_count += $combo->item_count;
$true_price += $combo_info['price']; $true_price += $combo_info['price'];
//如果有影像科则存储在nmr_list
$comboItem=DB::table('combo_items')->where(['combo_id' => $combo_id, 'status' => 1,'keshi_name'=>'影像科'])->get();
if(count($comboItem)>0){
foreach ($comboItem as $item){
$nmr_list[]=[
'item_id' => $item->item_id,
'name' => $item->name,
];
}
}
} }
$items_info = false;//自选项目信息 $items_info = false;//自选项目信息
if (isset($item_ids) and !empty($item_ids)) { if (isset($item_ids) and !empty($item_ids)) {
@ -250,6 +262,14 @@ select combo_id as c_id,count(*) as sale_count from orders where status in(2,4)
$groupedData[$keshiName] = []; $groupedData[$keshiName] = [];
} }
$groupedData[$keshiName][] = ['desc' => $item->jianjie, 'name' => $item->name,'price'=>$item->price]; $groupedData[$keshiName][] = ['desc' => $item->jianjie, 'name' => $item->name,'price'=>$item->price];
//如果有影像科则存储在nmr_list字段
if($item->keshi_name=='影像科'){
$nmr_list[]=[
'item_id' => $item->item_id,
'name' => $item->name,
];
}
} }
$items_info['price'] = $price; $items_info['price'] = $price;
$items_info['original_price'] = $items_original_price; $items_info['original_price'] = $items_original_price;
@ -300,6 +320,12 @@ select combo_id as c_id,count(*) as sale_count from orders where status in(2,4)
if ($it->item_id == $item['id']) { if ($it->item_id == $item['id']) {
$item['keshi_name'] = $it->keshi_name; $item['keshi_name'] = $it->keshi_name;
$item['desc'] = $it->jianjie; $item['desc'] = $it->jianjie;
if($it->keshi_name=='影像科'){
$nmr_list[]=[
'item_id' => $it->item_id,
'name' => $it->name,
];
}
break; break;
} }
} }
@ -335,12 +361,7 @@ select combo_id as c_id,count(*) as sale_count from orders where status in(2,4)
'original_price' =>number_format($all_original_price, 2, '.', '') ,//总原价 'original_price' =>number_format($all_original_price, 2, '.', '') ,//总原价
'pay_item_count' => $pay_item_count,//需要付费的项目数量 'pay_item_count' => $pay_item_count,//需要付费的项目数量
'lose_price'=>number_format($lose_price, 2, '.', ''),//剩余的不用就会浪费的金额 'lose_price'=>number_format($lose_price, 2, '.', ''),//剩余的不用就会浪费的金额
'nmr_list' => [ 'nmr_list' => $nmr_list//核磁项目列表
[
'item_id' => "1",
"name" => "磁共振平扫(腰椎)"
]
]//核磁项目列表
]; ];
return \Yz::Return(true, "查询成功", $data); return \Yz::Return(true, "查询成功", $data);
} }

@ -51,6 +51,8 @@ class OrderController extends Controller
$order_info = DB::table('orders')->where(['id' => $id])->first(); $order_info = DB::table('orders')->where(['id' => $id])->first();
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);
}else{
return \Yz::echoError1('未找到有效订单');
} }
return \Yz::Return(true, '获取成功', [ return \Yz::Return(true, '获取成功', [
'info' => $order_info 'info' => $order_info

@ -0,0 +1,41 @@
<?php
namespace App\Http\Controllers\API\Internal;
use App\Http\Controllers\API\PEISApiController;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class OrderController extends Controller
{
//到检
public function TJCheck()
{
$password = request('password');
$serve_id = request('serve_id');
$exam_id= request('exam_id');
if ($password !== 'YRtA1rx1iWgbpYKX') return \Yz::echoError1("校验密码失败");
$orderInfo=DB::table('orders')->where('appointment_number',$serve_id)->orderBy('id','desc')->first();
if(!$orderInfo) return \Yz::echoError1("未找到有效订单");
if(!!$exam_id){
if($orderInfo->status==1) return \Yz::echoError1("订单未付款");
if($orderInfo->status==3) return \Yz::echoError1("订单已取消");
if($orderInfo->status==4 || $orderInfo->check_status==2) return \Yz::echoError1("人员已经到检");
if($orderInfo->status==5) return \Yz::echoError1("订单已退款");
$peis = new PEISApiController();
$data = [
"电话号码" => $orderInfo->phone,
"证件号码" => $orderInfo->id_number,
];
$info = $peis::Post('分诊查询体检号', $orderInfo->hospital_id,$data);
DB::table('orders')->where('id',$orderInfo->id)->update([
'status'=>4,
'tj_number'=>$info['data'][0]['体检号'],
'check_status'=>2,
'check_time'=>date('Y-m-d H:i:s')
]);
}
return \Yz::Return(true,"",['id'=>$orderInfo->id]);
}
}

@ -30,7 +30,7 @@ class PEISApiController extends Controller
$api['体检报告查询'] = "{$url}/PEISCommon/QueryExamReport/{$code}"; $api['体检报告查询'] = "{$url}/PEISCommon/QueryExamReport/{$code}";
$api['预约时段修改'] = "{$url}/PEISCommon/ModifyAppointmentDTRange/{$code}"; $api['预约时段修改'] = "{$url}/PEISCommon/ModifyAppointmentDTRange/{$code}";
$api['修改用户预约时间'] = "http://10.0.20.227:8888/ExtAPI/SetAppointmentMoment?key=YmMxOGI2MDUxZmFh&{$code}"; $api['修改用户预约时间'] = "http://10.0.20.227:8888/ExtAPI/SetAppointmentMoment?key=YmMxOGI2MDUxZmFh&{$code}";
$api['分诊查询体检号'] = "{$url}/PEISCommon/QueryEventNo/{$code}";
return $api["{$url_code}"] ?? $url_code; return $api["{$url_code}"] ?? $url_code;
} }

@ -108,6 +108,7 @@ select combo_id as c_id,count(*) as count from orders where status in(2,4) group
$pay_item_count = 0;//需自费项目个数 $pay_item_count = 0;//需自费项目个数
$all_original_price = 0; $all_original_price = 0;
$true_price = 0; $true_price = 0;
$nmr_list=[];
if (isset($combo_id) and $combo_id != 0) { if (isset($combo_id) and $combo_id != 0) {
// $combo=DB::table('combos')->where(['hospital_id'=>$hospital_id,'combo_id'=>$combo_id,'status'=>1])->first(); // $combo=DB::table('combos')->where(['hospital_id'=>$hospital_id,'combo_id'=>$combo_id,'status'=>1])->first();
$combo = DB::select("select a.*,b.*,c.name as crowd_name from combos as a LEFT JOIN ( $combo = DB::select("select a.*,b.*,c.name as crowd_name from combos as a LEFT JOIN (
@ -157,6 +158,17 @@ select combo_id as c_id,count(*) as sale_count from orders where status in(2,4)
} }
$pay_item_count += $combo->item_count; $pay_item_count += $combo->item_count;
$true_price += $combo_info['price']; $true_price += $combo_info['price'];
//如果有影像科则存储在nmr_list
$comboItem=DB::table('combo_items')->where(['combo_id' => $combo_id, 'status' => 1,'keshi_name'=>'影像科'])->get();
if(count($comboItem)>0){
foreach ($comboItem as $item){
$nmr_list[]=[
'item_id' => $item->item_id,
'name' => $item->name,
];
}
}
} }
$items_info = false;//自选项目信息 $items_info = false;//自选项目信息
if (isset($item_ids) and !empty($item_ids)) { if (isset($item_ids) and !empty($item_ids)) {
@ -176,6 +188,14 @@ select combo_id as c_id,count(*) as sale_count from orders where status in(2,4)
$groupedData[$keshiName] = []; $groupedData[$keshiName] = [];
} }
$groupedData[$keshiName][] = ['id'=>$item->item_id,'desc' => $item->jianjie, 'name' => $item->name,'price'=>$item->price]; $groupedData[$keshiName][] = ['id'=>$item->item_id,'desc' => $item->jianjie, 'name' => $item->name,'price'=>$item->price];
//如果有影像科则存储在nmr_list字段
if($item->keshi_name=='影像科'){
$nmr_list[]=[
'item_id' => $item->item_id,
'name' => $item->name,
];
}
} }
$items_info['price'] = $price; $items_info['price'] = $price;
$items_info['original_price'] = $items_original_price; $items_info['original_price'] = $items_original_price;
@ -226,6 +246,12 @@ select combo_id as c_id,count(*) as sale_count from orders where status in(2,4)
if ($it->item_id == $item['id']) { if ($it->item_id == $item['id']) {
$item['keshi_name'] = $it->keshi_name; $item['keshi_name'] = $it->keshi_name;
$item['desc'] = $it->jianjie; $item['desc'] = $it->jianjie;
if($it->keshi_name=='影像科'){
$nmr_list[]=[
'item_id' => $it->item_id,
'name' => $it->name,
];
}
break; break;
} }
} }
@ -261,10 +287,7 @@ select combo_id as c_id,count(*) as sale_count from orders where status in(2,4)
'original_price' =>number_format($all_original_price, 2, '.', '') ,//总原价 'original_price' =>number_format($all_original_price, 2, '.', '') ,//总原价
'pay_item_count' => $pay_item_count,//需要付费的项目数量 'pay_item_count' => $pay_item_count,//需要付费的项目数量
'lose_price'=>number_format($lose_price, 2, '.', ''),//剩余的不用就会浪费的金额 'lose_price'=>number_format($lose_price, 2, '.', ''),//剩余的不用就会浪费的金额
'nmr_list' => [[ 'nmr_list' => $nmr_list//核磁项目列表
'item_id' => "1",
"name" => "磁共振平扫(腰椎)"
]]//核磁项目列表
]; ];
return \Yz::Return(true, "查询成功", $data); return \Yz::Return(true, "查询成功", $data);
} }

@ -88,3 +88,4 @@ Route::group(['prefix' => 'api/Web'], function () {
//对外------ //对外------
Route::any('/TJPushInfo', 'App\Http\Controllers\API\Internal\SiXinPushController@PushInfo');//接收思信推送 Route::any('/TJPushInfo', 'App\Http\Controllers\API\Internal\SiXinPushController@PushInfo');//接收思信推送
Route::any('/TJCheck', 'App\Http\Controllers\API\Internal\OrderController@TJCheck');//到检

@ -60,7 +60,7 @@
} from "@/store"; } from "@/store";
const $store = useStore(); const $store = useStore();
import { import {
onShow onShow,onLoad
} from "@dcloudio/uni-app"; } from "@dcloudio/uni-app";
import WeeklyCalendar from '@/common/WeeklyCalendar.vue'; import WeeklyCalendar from '@/common/WeeklyCalendar.vue';
let nmr_date = ref(null); let nmr_date = ref(null);
@ -111,7 +111,7 @@
const GetOrderInfo = async () => { const GetOrderInfo = async () => {
uni.showLoading(); uni.showLoading();
const response = await $api("GetOrderDetail", { const response = await $api("GetOrderDetail", {
id: 38 id: OrderId.value
}); });
uni.hideLoading(); uni.hideLoading();
$response(response, () => { $response(response, () => {
@ -324,8 +324,8 @@
uni.showLoading(); uni.showLoading();
let data = { let data = {
orderid: orderInfo.value.id, orderid: orderInfo.value.id,
planid: tj_plan_id, planid: tj_plan_id.value,
nmrPlanid:nmr_plan_id, nmrPlanid:nmr_plan_id.value,
doctor: doctor_name.value doctor: doctor_name.value
} }
const response = await $api("ChangeAppointment", data); const response = await $api("ChangeAppointment", data);
@ -351,6 +351,10 @@
GetOrderInfo() GetOrderInfo()
}); });
let OrderId=ref(0)
onLoad((e)=>{
OrderId.value=e.id
})
onShow(() => { onShow(() => {
temp = $store.getYytjInfo() temp = $store.getYytjInfo()

@ -261,7 +261,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="botm_blank_wrapper" style="font-size: 18rpx;color: #ccc;">10111124</view> <view class="botm_blank_wrapper" style="font-size: 18rpx;color: #ccc;">10111151</view>
</view> </view>
</view> </view>
</template> </template>

@ -107,7 +107,11 @@ const Refound = async (id) => {
} }
}); });
}; };
const GaiYueClick=(id)=>{
uni.navigateTo({
url:'/pages/main/ctime/ctime?id='+id
})
}
onMounted(() => { onMounted(() => {
deepInfo(); deepInfo();
}); });
@ -188,7 +192,7 @@ onMounted(() => {
class="button_item_wrapper pay_button_wrapper" class="button_item_wrapper pay_button_wrapper"
>继续付款</view >继续付款</view
> >
<view v-if="[2].includes(order_info.status)" class="button_item_wrapper change_button_wrapper"> <view v-if="[2].includes(order_info.status)" @click="GaiYueClick(order_info.id)" class="button_item_wrapper change_button_wrapper">
改约</view> 改约</view>
<view <view
v-if="[2].includes(order_info.status)" v-if="[2].includes(order_info.status)"

@ -383,29 +383,17 @@ onShow(() => {
<view class="grow center">检查指标意义</view> <view class="grow center">检查指标意义</view>
</view> </view>
<view v-for="(val, index) in groupInfo?.items" :key="index"> <view v-for="(val, index) in groupInfo?.items" :key="index">
<view <view v-if="val.keshi_name != '材料费'">
class="flex h-55rpx bg-#9f9f9f text-#fff text-24rpx rounded-10rpx mt-10rpx" <view class="flex h-55rpx bg-#9f9f9f text-#fff text-24rpx rounded-10rpx mt-10rpx">
> <view class="min-w-155rpx max-w-155rpx center b-0 b-r-4 b-solid b-#fff"></view>
<view <view class="grow center">{{ val.keshi_name }}{{ val.children.length }}</view>
class="min-w-155rpx max-w-155rpx center b-0 b-r-4 b-solid b-#fff"
></view>
<view class="grow center"
>{{ val.keshi_name }}{{ val.children.length }}</view
>
</view> </view>
<view <view class="flex bg-#efefef text-#000 text-24rpx rounded-10rpx mt-10rpx" v-for="(v, i) in val.children" :key="i">
class="flex bg-#efefef text-#000 text-24rpx rounded-10rpx mt-10rpx" <view class="min-w-155rpx break-all max-w-155rpx center b-0 b-r-4 b-solid b-#fff p-10rpx box-border text-center">
v-for="(v, i) in val.children"
:key="i"
>
<view
class="min-w-155rpx break-all max-w-155rpx center b-0 b-r-4 b-solid b-#fff p-10rpx box-border text-center"
>
{{ v.name }} {{ v.name }}
</view> </view>
<view class="grow center p-10rpx box-border">{{ <view class="grow center p-10rpx box-border">{{v.desc || "-" }}</view>
v.desc || "-" </view>
}}</view>
</view> </view>
</view> </view>
</view> </view>

Loading…
Cancel
Save