鹿和sa0ChunLuyu 1 year ago
commit fe9205cdfd

@ -433,7 +433,19 @@ select combo_id as c_id,count(*) as sale_count from orders where status in(2,4)
$true_price = $true_price + $group_info[0]['sixi_zong_ji_jin_e']; $true_price = $true_price + $group_info[0]['sixi_zong_ji_jin_e'];
$true_price = ($true_price - $group_info[0]['tongshou_xiane']) > 0 ? $true_price - $group_info[0]['tongshou_xiane'] : 0; $true_price = ($true_price - $group_info[0]['tongshou_xiane']) > 0 ? $true_price - $group_info[0]['tongshou_xiane'] : 0;
//如果有多选一项目
//构建多选一数据
$Nx1_arrInfo=[];
if(isset($duo_xuan_yi) and !empty($duo_xuan_yi)){
foreach ($duo_xuan_yi as $r_k=>$r_v){
$Nx1_arrInfo[]=[
'id' => $r_v['item_id'],
'name' => $r_v['item_name'],
];
}
}
$group_info[0]['items'] =array_merge($group_info[0]['items'],$Nx1_arrInfo); //合并多选一
// return \Yz::Return(true,"",$group_info[0]['items']);
$all_items = DB::table('items')->where(['status' => 1])->get(); $all_items = DB::table('items')->where(['status' => 1])->get();
$item_new = []; $item_new = [];
foreach ($group_info[0]['items'] as $item) { foreach ($group_info[0]['items'] as $item) {

@ -16,6 +16,7 @@ class PersonController extends Controller
$group_list=[]; $group_list=[];
foreach ($info['data'] as $it) { foreach ($info['data'] as $it) {
$items = []; $items = [];
$duoxuan_yi=[];
$group_info = $it; $group_info = $it;
if (isset($group_info['项目列表'])) { if (isset($group_info['项目列表'])) {
foreach ($group_info['项目列表'] as $datum) { foreach ($group_info['项目列表'] as $datum) {
@ -25,6 +26,60 @@ class PersonController extends Controller
]; ];
} }
} }
if(isset($group_info['单位Id']) and !empty($group_info['单位Id']) and isset($group_info['分组Id']) and !empty($group_info['分组Id'])){
$peis = new PEISApiController();
$data=[
"单位Id"=>$group_info['单位Id']
];
$fenzu = $peis::Post('单位分组批次查询', 1, $data);
foreach ($fenzu['data'][0]['分组'] as $key => $value) {
if($value['Id']==$group_info['分组Id']){
if (isset($value['包含项目信息'])) {
foreach ($value['包含项目信息'] as $datum) {
$items[] = [
'id' => $datum['Id'],
'name' => $datum['名称'],
];
}
}
if(isset($value['包含多选一组'])){
//多选一
$duo_xuan_yi=[];
$N1=$value['包含多选一组'];
foreach ($N1 as $k=>$v){
$duo_xuan_yi[$k][]=[
'zu_name'=>$v['组名称'],
'item_list'=>[]
];
foreach ($v['包含项目'] as $k2=>$v2){
$duo_xuan_yi[$k]['item_list'][]=
[
'item_id' =>$v2['Id'],
'item_name' => $v2['名称'],
'price'=>$v2['价格']
];
}
}
$duoxuan_yi= $duo_xuan_yi;
}
break;
}
}
}
$checkup_type=DB::table('checkup_type')->where(['status'=>1,'is_del'=>0])->get(); $checkup_type=DB::table('checkup_type')->where(['status'=>1,'is_del'=>0])->get();
$checkup_type_id=0; $checkup_type_id=0;
foreach ($checkup_type as $ct) { foreach ($checkup_type as $ct) {
@ -44,8 +99,11 @@ class PersonController extends Controller
'group_id' => $group_info['预约Id'], 'group_id' => $group_info['预约Id'],
'tongshou_xiane'=>$group_info['统收限额'], 'tongshou_xiane'=>$group_info['统收限额'],
'sixi_zong_ji_jin_e'=>$group_info['总计金额'], 'sixi_zong_ji_jin_e'=>$group_info['总计金额'],
'danwei_id'=>$group_info['单位Id'],
'fenzu_id'=>$group_info['分组Id'],
'checkup_type_id'=>$checkup_type_id, 'checkup_type_id'=>$checkup_type_id,
'items' => $items, 'items' => $items,
'duo_xuan_yi'=>$duoxuan_yi,
]; ];
$group_list[]=$data; $group_list[]=$data;
} }
@ -81,9 +139,12 @@ class PersonController extends Controller
//获取团检套餐 //获取团检套餐
public function GetGroupCombo() public function GetGroupCombo()
{ {
$hospital_id = request('hospital_id'); $hospital_id = request('hospital_id');
$group_id = request('group_id'); $group_id = request('group_id');
if (!isset($group_id)) return \Yz::echoError1('group_id不能为空'); if (!isset($group_id)) return \Yz::echoError1('group_id不能为空');
$data = [ $data = [
'电话号码' => null, '电话号码' => null,
'证件号码' => null, '证件号码' => null,

@ -37,6 +37,7 @@ class PEISApiController extends Controller
$api['预约时段修改'] = "{$url}/PEISCommon/ModifyAppointmentDTRange?key=YmMxOGI2MDUxZmFh"; $api['预约时段修改'] = "{$url}/PEISCommon/ModifyAppointmentDTRange?key=YmMxOGI2MDUxZmFh";
$api['修改用户预约时间'] = "{$url}/ExtAPI/SetAppointmentMoment?key=YmMxOGI2MDUxZmFh&{$code}"; $api['修改用户预约时间'] = "{$url}/ExtAPI/SetAppointmentMoment?key=YmMxOGI2MDUxZmFh&{$code}";
$api['分诊查询体检号'] = "{$url}/PEISCommon/QueryEventNo?key=YmMxOGI2MDUxZmFh"; $api['分诊查询体检号'] = "{$url}/PEISCommon/QueryEventNo?key=YmMxOGI2MDUxZmFh";
$api['单位分组批次查询'] = "{$url}/PEISCommon/QueryBatchAndGroup?key=YmMxOGI2MDUxZmFh";
$api['报告时间计算'] = "{$url}/Home/CalcReportDays?eventNo={$code}"; $api['报告时间计算'] = "{$url}/Home/CalcReportDays?eventNo={$code}";
$api['弃检接口'] = "{$url}/Home/AbandonCheck"; $api['弃检接口'] = "{$url}/Home/AbandonCheck";
@ -58,6 +59,8 @@ class PEISApiController extends Controller
$api['预约时段修改'] = "{$url}/PEISCommon/ModifyAppointmentDTRange/{$code}"; $api['预约时段修改'] = "{$url}/PEISCommon/ModifyAppointmentDTRange/{$code}";
$api['修改用户预约时间'] = "http://220.174.210.111:8888/ExtAPI/SetAppointmentMoment?key=YmMxOGI2MDUxZmFh&{$code}"; $api['修改用户预约时间'] = "http://220.174.210.111:8888/ExtAPI/SetAppointmentMoment?key=YmMxOGI2MDUxZmFh&{$code}";
$api['分诊查询体检号'] = "{$url}/PEISCommon/QueryEventNo/{$code}"; $api['分诊查询体检号'] = "{$url}/PEISCommon/QueryEventNo/{$code}";
$api['单位分组批次查询'] = "{$url}/PEISCommon/QueryBatchAndGroup/{$code}";
$api['报告时间计算'] = "{$url}/Home/CalcReportDays?eventNo={$code}";
$api['弃检接口'] = "{$url}/Home/AbandonCheck/{$code}"; $api['弃检接口'] = "{$url}/Home/AbandonCheck/{$code}";
} }

@ -14,6 +14,13 @@ const person_list = ref([]);
let popup = ref(null); let popup = ref(null);
let unitList = ref([]); // let unitList = ref([]); //
let popupMultiple = ref(false); //
let multipleList = ref([]); //
let multipleIndex = ref(0); //
let itemIds = ref([]); // id
let itemId = ref(""); // id
const getPersonList = async () => { const getPersonList = async () => {
uni.showLoading(); uni.showLoading();
const response = await $api("GetPersonList"); const response = await $api("GetPersonList");
@ -72,7 +79,18 @@ const getGroupCombo = async (info) => {
url: "/pages/main/tj/selectType", url: "/pages/main/tj/selectType",
}); });
} else { } else {
// //
//
if (data.duo_xuan_yi.length > 0) {
popupMultiple.value.open("center");
multipleIndex.value = 0;
itemIds.value = [];
$store.setDuoXuanYi([]);
itemId.value = "";
multipleList.value = data.duo_xuan_yi;
return;
}
uni.navigateTo({ uni.navigateTo({
url: "/pages/main/tj/tjxq?groupId=" + info.group_id, url: "/pages/main/tj/tjxq?groupId=" + info.group_id,
}); });
@ -80,7 +98,35 @@ const getGroupCombo = async (info) => {
} }
}); });
}; };
const nextItemClick = () => {
let groupInfo=$store.getGroupInfo();
console.log('----',groupInfo)
if (!itemId.value) {
uni.$lu.toast("请选择项目");
return;
}
let item_name="";
multipleList.value[multipleIndex.value]['item_list'].forEach((vv,ii)=>{
if(vv.item_id==itemId.value){
item_name=vv.item_name
}
})
itemIds.value.push({
item_id: itemId.value,
item_name:item_name,
zu_name: multipleList.value[multipleIndex.value]["0"]["zu_name"],
});
if (multipleIndex.value == multipleList.value.length - 1) {
$store.setDuoXuanYi(itemIds.value);
popupMultiple.value.close();
uni.navigateTo({
url: "/pages/main/tj/tjxq?groupId=" + groupInfo.group_id,
});
return;
}
itemId.value = "";
multipleIndex.value = multipleIndex.value + 1;
};
onShow(() => { onShow(() => {
if (!!config_ref.value) { if (!!config_ref.value) {
getPersonList(); getPersonList();
@ -90,6 +136,54 @@ onShow(() => {
<template> <template>
<DraggableButton /> <DraggableButton />
<view> <view>
<uni-popup ref="popupMultiple" class="w-full">
<view class="rounded-10rpx px-20rpx pb-55rpx box-border bg-#fff w-95vw">
<view
class="center relative pt-40rpx pb-30rpx text-36rpx rounded-t-15rpx box-border"
>
<text class="line-height-[1] text-32rpx">请选择</text>
<uni-icons
@click="popupMultiple.close()"
type="closeempty"
color="#A6A6A6"
size="26"
class="absolute right-40rpx"
></uni-icons>
</view>
<view class="bg-#F8F8F8 px-20rpx box-border rounded-10rpx">
<view
v-for="(item, index) in multipleList[multipleIndex]['item_list']"
:key="index"
@click="itemId = item.item_id"
class="px-20rpx box-border b-b-1 b-#EAEAEA b-solid bs between h-100rpx"
>
<text class="text-#000000 text-30rpx">{{ item.item_name }}</text>
<view class="center">
<text class="text-#EC3D15 text-20rpx mt-10rpx mr-5rpx">¥</text>
<text class="text-#EC3D15 text-32rpx mb-0">{{ item.price }}</text>
<uni-icons
class="ml-28rpx"
color="#239EA3"
:type="itemId == item.item_id ? 'checkbox-filled' : 'circle'"
size="30"
></uni-icons>
</view>
</view>
</view>
<view class="text-#239EA3 text-28rpx my-45rpx text-center"
>当前套餐包含一个可自由{{
multipleList[multipleIndex]["item_list"].length
}}选1的体检项目<br />根据您的实际情况自行选择</view
>
<view
class="w-270rpx h-80rpx bg-#239EA3 center text-#F8F8F8 text-30rpx rounded-10rpx mx-auto"
@click="nextItemClick()"
>{{
multipleIndex == multipleList.length - 1 ? "确定" : "下一项"
}}</view
>
</view>
</uni-popup>
<view v-if="!!$store.config"> <view v-if="!!$store.config">
<view :ref="configRef"></view> <view :ref="configRef"></view>
</view> </view>

@ -178,6 +178,15 @@
if (response.data.group_info[0].items?.length) { if (response.data.group_info[0].items?.length) {
status.value = 3; status.value = 3;
} }
if(groupInfo.value.items?.length){
groupInfo.value.itemscount=0;
let itemscount=0
groupInfo.value.items.forEach((v,i)=>{
if(v.keshi_name!="材料费")
itemscount=itemscount+v.children.length
})
groupInfo.value.itemscount=itemscount
}
} }
losePrice.value = response.data.lose_price; losePrice.value = response.data.lose_price;
comboInfo.value = response.data.combo_info; comboInfo.value = response.data.combo_info;
@ -384,7 +393,7 @@
<!-- 团检内自带的项目 --> <!-- 团检内自带的项目 -->
<view v-if="groupInfo?.items?.length" class="mb-20rpx"> <view v-if="groupInfo?.items?.length" class="mb-20rpx">
<!-- 套餐 --> <!-- 套餐 -->
<view class="text-#2E2E2E text-30rpx center mb-20rpx">套餐项目{{ groupInfo?.items?.length }}</view> <view class="text-#2E2E2E text-30rpx center mb-20rpx">套餐项目{{ groupInfo.itemscount }}</view>
<view class="flex h-67rpx bg-#239ea3 text-#fff text-26rpx rounded-10rpx"> <view class="flex h-67rpx bg-#239ea3 text-#fff text-26rpx rounded-10rpx">
<view class="min-w-155rpx max-w-155rpx center b-0 b-r-4 b-solid b-#fff">检查项目</view> <view class="min-w-155rpx max-w-155rpx center b-0 b-r-4 b-solid b-#fff">检查项目</view>
<view class="grow center">检查指标意义</view> <view class="grow center">检查指标意义</view>

Loading…
Cancel
Save